.revoked-btn {
    cursor: not-allowed;
    opacity: 0.65;
    border-style: dashed;
}

/* ==========================================================================
   Dark Theme Overrides
   ========================================================================== */

/* ── Page header ── */
html[data-bs-theme="dark"] .page-header h3 {
    color: #e2e8f0;
}

/* ── Card ── */
html[data-bs-theme="dark"] .card {
    background-color: #1e2a3a;
    border-color: #2d3f55;
    box-shadow: -8px 12px 18px 0 rgba(0, 0, 0, 0.3);
}

/* ── Table ── */
html[data-bs-theme="dark"] .table {
    color: #e2e8f0;
    border-color: #2d3f55;
}

    html[data-bs-theme="dark"] .table thead th {
        color: #94a3b8;
        border-bottom-color: #2d3f55;
        background-color: transparent;
    }

    html[data-bs-theme="dark"] .table-light,
    html[data-bs-theme="dark"] .table thead.table-light {
        background-color: #1a2535 !important;
        color: #94a3b8 !important;
        border-color: #2d3f55 !important;
    }

        html[data-bs-theme="dark"] .table-light th,
        html[data-bs-theme="dark"] .table-light td {
            background-color: #1a2535 !important;
            color: #94a3b8 !important;
            border-color: #2d3f55 !important;
        }

    html[data-bs-theme="dark"] .table tbody td {
        border-color: #2d3f55;
    }

html[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: #243447 !important;
    color: #e2e8f0;
}

    html[data-bs-theme="dark"] .table-hover tbody tr:hover td {
        color: #e2e8f0;
    }

html[data-bs-theme="dark"] .sorting:hover {
    background-color: #243447;
}

html[data-bs-theme="dark"] .partialSorting:hover {
    background-color: #243447;
}

/* ── Form controls ── */
html[data-bs-theme="dark"] .form-label {
    color: #cbd5e1;
}

html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
    background-color: #243447;
    border-color: #2d3f55;
    color: #e2e8f0;
}

    html[data-bs-theme="dark"] .form-control:focus,
    html[data-bs-theme="dark"] .form-select:focus {
        background-color: #243447;
        border-color: #435ebe;
        color: #e2e8f0;
        box-shadow: 0 0 0 0.2rem rgba(67, 94, 190, 0.25);
    }

    html[data-bs-theme="dark"] .form-control::placeholder {
        color: #64748b;
    }

    html[data-bs-theme="dark"] .form-control:disabled,
    html[data-bs-theme="dark"] .form-select:disabled {
        background-color: #1a2535;
        color: #64748b;
    }

/* ── Input group (search bar) ── */
html[data-bs-theme="dark"] .input-group-text {
    background-color: #243447;
    border-color: #2d3f55;
    color: #94a3b8;
}

html[data-bs-theme="dark"] .input-group .form-control {
    background-color: #243447;
    border-color: #2d3f55;
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .input-group:focus-within .input-group-text {
    border-color: #435ebe;
}

/* Fix: bg-light on input-group-text in dark mode */
html[data-bs-theme="dark"] .input-group-text.bg-light {
    background-color: #243447 !important;
    border-color: #2d3f55 !important;
}

/* ── Select2 ── */
html[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
html[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #243447;
    border-color: #2d3f55;
    color: #e2e8f0;
}

    html[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #e2e8f0;
    }

    html[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
        color: #64748b;
    }

    html[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
        border-color: #94a3b8 transparent transparent transparent;
    }

html[data-bs-theme="dark"] .select2-dropdown {
    background-color: #1e2a3a;
    border-color: #2d3f55;
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option {
    color: #e2e8f0;
    background-color: #1e2a3a;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #435ebe;
    color: #fff;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #243447;
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color: #243447;
    border-color: #2d3f55;
    color: #e2e8f0;
}

/* ── Pagination ── */
html[data-bs-theme="dark"] .pagination-wrapper {
    border-top-color: #2d3f55;
}

html[data-bs-theme="dark"] .pagination .page-link {
    background-color: #1e2a3a;
    border-color: #2d3f55;
    color: #7c9fd4;
}

    html[data-bs-theme="dark"] .pagination .page-link:hover {
        background-color: #243447;
        border-color: #2d3f55;
        color: #a5c0e8;
    }

html[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #435ebe;
    border-color: #435ebe;
    color: #fff;
}

html[data-bs-theme="dark"] .pagination .page-item.disabled .page-link,
html[data-bs-theme="dark"] .pagination .page-item.disabled span {
    background-color: #1a2535;
    border-color: #2d3f55;
    color: #4a5568;
}

/* ── Nested table / accordion ── */
html[data-bs-theme="dark"] .hiddenRow .bg-light {
    background-color: #1a2535 !important;
}

/* ── List loader overlay ── */
html[data-bs-theme="dark"] .list-loader {
    background: rgba(30, 42, 58, 0.85);
    color: #e2e8f0;
}

/* ── Empty state ── */
html[data-bs-theme="dark"] .table-empty-state .text-muted {
    color: #64748b !important;
}

/* ── Notification items ── */
html[data-bs-theme="dark"] .notification-item.unread {
    background-color: #243447;
}

html[data-bs-theme="dark"] .notification-item:hover {
    background-color: #2d3f55;
}

/* ── Buttons ── */
html[data-bs-theme="dark"] .btn-outline-secondary {
    color: #94a3b8;
    border-color: #2d3f55;
}

    html[data-bs-theme="dark"] .btn-outline-secondary:hover {
        background-color: #2d3f55;
        border-color: #2d3f55;
        color: #e2e8f0;
    }

/* ── Text utilities ── */
html[data-bs-theme="dark"] .text-muted {
    color: #64748b !important;
}

html[data-bs-theme="dark"] .fw-medium {
    color: #e2e8f0;
}

.select2-results__options {
    padding-left: 0 !important;
}

.select2-selection__clear {
    height: 43px !important;
}

html[data-bs-theme="dark"] #searchInput {
    padding-left: 0 !important;
}

/* ── Notification unread row ── */
tr.notification-unread td:first-child {
    border-left: 3px solid #f7b924;
}

/* Light theme */
tr.notification-unread {
    background-color: rgba(247, 185, 36, 0.08) !important;
}

    tr.notification-unread td {
        color: inherit;
    }

    tr.notification-unread .fw-medium {
        color: inherit;
        font-weight: 600 !important;
    }

/* Dark theme */
html[data-bs-theme="dark"] tr.notification-unread {
    background-color: rgba(247, 185, 36, 0.07) !important;
}

    html[data-bs-theme="dark"] tr.notification-unread td {
        color: #e2e8f0;
    }

    html[data-bs-theme="dark"] tr.notification-unread .fw-medium {
        color: #f1f5f9 !important;
    }

.select2-selection__placeholder {
    font-size: 13px;
    font-weight: 300;
    color: #a1adb9 !important;
    font-family: inherit;
}

.select2-container--default .select2-search--inline .select2-search__field {
    font-size: 13px;
    font-weight: 300;
    color: #a1adb9 !important;
    font-family: inherit;
    margin-top: 11px;
    margin-left: 8px;
}

/* ── Nested Table Animations & Styles ── */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nested-detail-panel {
    border-radius: 12px;
    overflow: hidden;
}

.nested-subtable thead th {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    padding: 10px 15px;
    border-bottom-width: 1px;
}

.nested-subtable tbody td {
    padding: 12px 15px;
}

.filtered-out {
    display: none !important;
}

.nested-pagination .btn {
    border-color: #dee2e6;
    background-color: #fff;
}

    .nested-pagination .btn:hover:not(:disabled) {
        background-color: #f8f9fa;
        border-color: #c1c9d0;
    }

/* Dark mode for nested panels */
html[data-bs-theme="dark"] .nested-detail-panel {
    background-color: #1a2535 !important;
    border-color: #435ebe !important;
}

html[data-bs-theme="dark"] .nested-subtable thead {
    background-color: #243447 !important;
}

html[data-bs-theme="dark"] .nested-subtable tbody tr:hover {
    background-color: #2d3f55 !important;
}


/* ── Form Validation ── */
.text-danger.small, 
span[class*="field-validation-"],
.field-validation-error {
    font-size: 0.85rem !important;
    font-weight: 500;
    margin-top: 4px;
    display: block;
}

.form-group label .text-danger {
    font-size: 1.1rem;
    margin-left: 2px;
}
