/* DataTables — moderný vzhľad v sab-* téme */
.sab-dt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sab-dt-length label,
.sab-dt-filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sab-text-light);
}

.sab-dt-length select,
.sab-dt-filter input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--sab-gray-light);
    border-radius: var(--sab-radius);
    outline: none;
    font-size: 0.9rem;
    transition: border-color var(--sab-transition), box-shadow var(--sab-transition);
}

.sab-dt-filter input {
    min-width: 220px;
}

.sab-dt-length select:focus,
.sab-dt-filter input:focus {
    border-color: var(--sab-teal);
    box-shadow: 0 0 0 3px rgba(28, 176, 149, 0.15);
}

.sab-dt-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--sab-text-light);
}

.sab-dt-paginate .paginate_button {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    margin: 0 0.15rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--sab-navy);
    background: var(--sab-bg-alt);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--sab-transition), color var(--sab-transition);
}

.sab-dt-paginate .paginate_button:hover {
    background: var(--sab-teal-light);
    color: var(--sab-teal-dark);
}

.sab-dt-paginate .paginate_button.current {
    background: var(--sab-teal);
    color: var(--sab-white);
}

.sab-dt-paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: default;
}

table.sab-table,
table.dataTable.sab-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.92rem;
}

table.sab-table thead th,
table.dataTable.sab-table thead th {
    background: var(--sab-navy);
    color: var(--sab-white);
    font-weight: 600;
    padding: 0.85rem 1rem;
    text-align: left;
    border: none;
    white-space: nowrap;
}

table.sab-table thead th:first-child {
    border-radius: var(--sab-radius) 0 0 0;
}

table.sab-table thead th:last-child {
    border-radius: 0 var(--sab-radius) 0 0;
}

table.sab-table tbody td,
table.dataTable.sab-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--sab-gray-light);
    vertical-align: middle;
}

table.sab-table tbody tr:hover td,
table.dataTable.sab-table tbody tr:hover td {
    background: var(--sab-teal-light);
}

table.sab-table tbody tr:nth-child(even) td {
    background: var(--sab-bg);
}

table.sab-table tbody tr:nth-child(even):hover td {
    background: var(--sab-teal-light);
}

table.dataTable.sab-table .dataTables_empty {
    text-align: center;
    padding: 2rem;
    color: var(--sab-text-light);
}

.dataTables_processing {
    background: var(--sab-white);
    border-radius: var(--sab-radius);
    box-shadow: var(--sab-shadow);
    padding: 1rem 1.5rem !important;
    color: var(--sab-navy);
    font-weight: 600;
}

.sab-table-wrap {
    overflow-x: auto;
    border-radius: var(--sab-radius);
}

.sab-table-download {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--sab-teal-dark);
    white-space: nowrap;
}

.sab-table-download:hover {
    color: var(--sab-navy);
}

@media (max-width: 767px) {
    .sab-dt-toolbar,
    .sab-dt-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .sab-dt-filter input {
        width: 100%;
        min-width: 0;
    }
}
