/* DataTables — PsikoTest theme */

.dataTables_wrapper {
    font-family: 'Inter', sans-serif;
    color: #374151;
}

/* ── Top controls ── */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1.25rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
}

.dataTables_wrapper .dataTables_filter {
    text-align: right;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 220px;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    font-size: 0.875rem;
    color: #111827;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat 0.65rem center / 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.dataTables_wrapper .dataTables_filter input::placeholder {
    color: #9ca3af;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    padding: 0.375rem 1.75rem 0.375rem 0.625rem;
    font-size: 0.875rem;
    color: #374151;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ── Table ── */
table.dataTable {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    margin: 0 !important;
}

table.dataTable thead th {
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7280;
    background: #f9fafb;
    vertical-align: middle;
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc,
table.dataTable thead th.sorting_asc_disabled,
table.dataTable thead th.sorting_desc_disabled {
    background-image: none !important;
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    cursor: pointer;
    padding-right: 1.75rem !important;
    position: relative;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.625rem;
    opacity: 0.35;
}

table.dataTable thead th.sorting::after { content: '⇅'; }
table.dataTable thead th.sorting_asc::after { content: '↑'; opacity: 1; color: #4f46e5; }
table.dataTable thead th.sorting_desc::after { content: '↓'; opacity: 1; color: #4f46e5; }

table.dataTable tbody td {
    padding: 1rem 1.5rem !important;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #374151;
}

table.dataTable tbody tr {
    transition: background-color 0.12s;
}

table.dataTable tbody tr:hover td {
    background-color: #f9fafb;
}

table.dataTable tbody tr:last-child td {
    border-bottom: none;
}

table.dataTable.no-footer {
    border-bottom: none;
}

/* ── Bottom bar ── */
.dataTables_wrapper .dataTables_info {
    font-size: 0.8125rem;
    color: #6b7280;
    padding-top: 1.25rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2.125rem;
    height: 2.125rem;
    padding: 0 0.625rem !important;
    margin: 0 !important;
    border-radius: 0.5rem !important;
    border: 1px solid #e5e7eb !important;
    background: #fff !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Processing ── */
.dataTables_wrapper .dataTables_processing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 0.875rem;
    font-weight: 500;
    color: #4f46e5;
    z-index: 10;
}

/* ── Empty state ── */
table.dataTable tbody td.dataTables_empty {
    padding: 2.5rem 1.5rem !important;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ── Responsive toolbar ── */
@media (max-width: 640px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: left;
        float: none;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        min-width: 0;
        margin-left: 0;
        margin-top: 0.375rem;
    }

    .dataTables_wrapper .dataTables_filter label {
        flex-direction: column;
        align-items: stretch;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        justify-content: center;
        float: none;
    }
}
