:root {
    --primary-color: #036eab;
    --light-bg: #f3fbfe;
}

/* ========== BASE STYLES ========== */
body {
    background-color: #f3fbfe;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 0 !important;
    overflow-x: hidden;
    font-family: "Cairo", sans-serif;
}

/* ========== CAIRO TYPOGRAPHY ========== */

/* All elements inherit Cairo (exclude ::before / ::after so FA / Bootstrap Icons keep their glyph fonts) */
* {
    font-family: "Cairo", sans-serif;
}

/* Body text — Regular */
body, p, span, td, li, label, input, textarea, select, button {
    font-weight: 400;
}

/* Headings — Cairo Medium (500) */
h1, h2, h3, h4, h5, h6 {
    font-family: "Cairo", sans-serif;
    font-weight: 500;
    line-height: 1.3;
}

/* Page / card / section titles */
.nav-summary,
.modal-title,
.wl-modal-title,
.card-title,
.visits-page h5,
.whitelist-title,
.blacklist-title,
.users-title,
.visits-title,
.analytics-title,
.page-title,
.section-title,
.dropdown-toggle.nav-summary {
    font-family: "Cairo", sans-serif;
    font-weight: 500 !important;
}

/* Table column headers — Cairo Medium */
th,
.whitelist-table-wrapper thead th,
.blacklist-table-wrapper thead th,
.visits-table-wrapper  thead th,
.users-table-wrapper   thead th,
.table thead th {
    font-family: "Cairo", sans-serif;
    font-weight: 500;
}

/* Modal headers & step labels */
.wl-modal-title,
.wl-step-title,
.wl-section-label,
.modal-header .modal-title,
.header-left .modal-title,
.visits-modal .modal-title {
    font-family: "Cairo", sans-serif;
    font-weight: 500;
}

/* Sidebar nav links */
.nav-link,
.sidebar-label,
.sidebar1 a,
.sidebar1 span {
    font-family: "Cairo", sans-serif;
    font-weight: 400;
}

/* Buttons — Cairo Medium for legibility */
.btn,
button,
.wl-btn-next,
.wl-btn-save,
.wl-btn-back,
.btn-save,
.btn-cancel {
    font-family: "Cairo", sans-serif;
    font-weight: 500;
}

/* ========================================= */

.form-control {
    font-size: 0.8rem !important;
    text-align: center !important;
}

.modal-backdrop {
    width: 100vw !important;
}

.mian-header {
    position: sticky !important;
    width: 100% !important;
    z-index: 1000 !important;
    border: 0.5px solid rgb(232, 232, 232) !important;
    top: 0 !important;
}

.main-content {
    align-items: end !important;
    /* Flex items default to min-width:auto and won't shrink below their content,
       so wide content (e.g. charts that grew while the menu was collapsed) keeps
       the page from shrinking back when the menu re-expands. min-width:0 lets it
       reflow correctly; overflow-x guards against any residual horizontal spill. */
    min-width: 0;
    overflow-x: hidden;
}

/* Pointer-cursor utility. It's referenced widely in the markup (logout item,
   user menu, notification controls, etc.) but was never actually defined, so
   those clickable elements showed the default arrow instead of a hand. */
.cursor-pointer { cursor: pointer; }

.sidebar1 {
    position: sticky !important;
    top: 0 !important;
    border: 0.5px solid rgb(232, 232, 232) !important;
    width: 217px !important;
    left: 0 !important;
    height: 100vh !important;
    margin: 0 !important;
}

/* smart-search-wrapper & smart-search-field are defined in the Header Search section below */

.smart-search-input {
    padding-left: 4.2rem; /* مساحة للأيقونات */
    cursor: pointer;
    width: 100%;
}

.smart-search-actions {
    position: absolute;
    top: 50%;
    left: 10px; /* شمال */
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0px;
    z-index: 5;
    color: #6c757d;
}

    .smart-search-actions i {
        cursor: pointer;
    }

.smart-search-chevron {
    font-size: 0.75rem; /* تصغير السهم */
}

.smart-search-dropdown {
    width: 100%;
}

.smart-search-toggle-btn {
    border: none;
    background-color: unset;
}

.more-btn {
    width: 44px;
    height: 36px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid gray;
    border-radius: 8px;
    padding: 5px 10px;
}

    .more-btn i {
        font-size: 20px;
        color: #6c757d;
    }

    .more-btn::after {
        display: none !important;
    }

    .more-btn:hover {
        background: #f5fbff;
    }


.table thead th {
    position: sticky !important;
    top: 0 !important;
    background: #f8f9fa !important;
}



svg {
    width: 25px;
    height: 25px;
    fill: #086cac;
    transition: fill 0.3s;
    margin-bottom: 0.3rem;
}

.side-icon {
    margin-right: 0.8rem;
}

header svg {
    fill: #576265;
}

/* ========== SIDEBAR ========== */
.sidebar1 {
    transition: all 0.3s ease !important;
    background-color: white !important;
    flex-shrink: 0;
    overflow-x: hidden;
}

/* Kill the horizontal scrollbar inside the sidebar.
   The inner <nav> uses Bootstrap's `overflow-auto` (both axes) — we keep
   vertical scrolling for long menus but suppress horizontal overflow.
   Also constrain icon SVGs (viewBox is "0 0 640 640" and without explicit
   width they can render large enough to push rows past the 217px width). */
.sidebar1 nav.overflow-auto {
    overflow-x: hidden !important;
    overflow-y: auto;
}

.sidebar1 .side-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.sidebar1 .side-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Allow flex children to shrink below their intrinsic content size so text
   can compress instead of forcing horizontal overflow. */
.sidebar1 .nav-summary,
.sidebar1 .nav-summary2 {
    min-width: 0;
}

/* Make the main sidebar a bit wider and stop it from being squeezed, so menu
   labels (e.g. "Reports & Analytics") stay on a single line. It still grows if
   a label is longer than the minimum. */
.sidebar1.sidebar-mobile {
    flex-shrink: 0;
    min-width: 250px;
}

.sidebar1 .nav-summary {
    white-space: nowrap;
}



.sidebar-mobile.open {
    transform: translateX(0);
}

.sidebar1 .logo {
    text-align: center !important;
    font-size: 2.4rem !important;
}

    .sidebar1 .logo span {
        font-size: 2.4rem !important;
    }

.logo {
    color: var(--primary-color);
    font-weight: bold;
    font-family: sans-serif;
}

    .logo span {
        background-color: var(--primary-color);
        color: white;
        border-radius: 50%;
        margin-left: 4px;
        font-size: 1.2rem;
        padding: 0.6rem 0.4rem;
    }

.nav-link,
.nav-summary {
    color: #363635;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

    .nav-link:hover,
    .nav-summary:hover {
        background-color: rgba(3, 110, 171, 0.1);
        color: var(--primary-color);
    }

.nav-summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.dropdown-toggle::after {
    content: "\F282" !important;
    border: none !important;
}

/* Chevron appears ONLY on items that expand a sub-menu — i.e. whose
   .nav-submenu actually has children. Plain links (empty .nav-submenu) show no
   arrow, signalling that they navigate directly to a page. */
.nav-summary::after {
    content: none;
}

.nav-item:has(> .nav-submenu:not(:empty)) > .nav-summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    /* `auto` pushes the chevron to the end of the flex row so every chevron
       lands at the same right-hand column regardless of label length. */
    margin-left: auto;
    padding-left: 0.5rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.nav-summary[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.nav-submenu {
    margin-left: 2rem;
}

.nav-summary2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: small;
    cursor: pointer;
}

    .nav-summary2 svg {
        width: 20px;
        height: 20px;
        margin: 0;
        padding: 0;
    }

    .nav-summary2::after {
        content: "\F282";
        font-family: "bootstrap-icons";
        font-size: 10px;
        margin-left: 0;
        order: -1;
        transition: transform 0.3s;
        font-weight: bold;
    }

    .nav-summary2[aria-expanded="true"]::after {
        transform: rotate(180deg);
    }

/* ========== FORM STYLES ========== */
.form-card {
    background: #fff;
    padding: 45px 35px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    width: 40%;
    transition: all 0.3s ease;
}

.form-title {
    font-size: 30px;
    font-weight: 600;
    text-align: center;
    color: #036eab;
    margin-bottom: 10px;
}

    .form-title span {
        background-color: #036eab;
        color: #fff;
        padding: 0.6rem 0.4rem;
        border-radius: 50%;
    }

.btn-copy {
    background-color: #343a40;
    color: #fff;
    font-weight: 500;
    width: 120px;
    transition: 0.2s ease;
}

    .btn-copy:hover {
        background-color: #000;
        color: #fff;
    }

.btn-save {
    background-color: #036eab;
    color: #fff;
    font-weight: 500;
    width: 120px;
    transition: 0.2s ease;
}

    .btn-save:hover {
        background-color: #025c8c;
        color: #fff;
    }

.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 4px;
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.form-control.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: none !important;
}

/* ========== DASHBOARD CARDS ========== */
.stats-card {
    background: #e9f4fb;
    border-radius: 26px;
    padding: 12px;
    min-height: 80px !important;
    margin-top: 1rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-left: 6px solid #0d74b9;
}

.stats-icon {
    font-size: 30px;
    color: #0d74b9;
}

.stats-number {
    font-size: 19px;
    font-weight: 700;
    color: #0d74b9;
}

.stats-title {
    color: #687286;
    font-weight: 500;
}

    .stats-title i {
        font-size: 22px;
    }

.growth-box {
    background: #dff4e6;
    color: #4e8b63;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

    .growth-box i {
        font-size: 14px;
    }

.dash-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #d9e8ef;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.03);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #0b72b5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-item {
    border-bottom: 1px solid #e6e6e6;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.view-all {
    background: #eaf5ff;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    color: #0b72b5;
    cursor: pointer;
}

.visit-item {
    border-bottom: 1px solid #e6e6e6;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.status {
    color: #0b72b5;
    font-weight: 500;
}

/* ========== CHARTS ========== */
.chart-card {
    background: #f2fbff;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #d7e7ef;
}

.chart-container canvas {
    width: 220px !important;
    height: 220px !important;
    margin: auto;
}

.chart-title {
    font-size: 20px;
    font-weight: 600;
    margin-left: 10px;
    color: #0b4f72;
}

.chart-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.legend-box {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

/* ========== ICONS & BADGES ========== */
.icon-box {
    width: 2rem;
    height: 2rem;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    position: relative;
}

.icon {
    font-size: 1rem;
    color: #4b5659;
}

.badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    position: absolute;
    top: 15%;
    right: 15%;
}

/* ══════════════════════════════════════════════════
   NOTIFICATIONS BELL + DROPDOWN PANEL
   ══════════════════════════════════════════════════ */

/* The bell is a <button> (so it's keyboard-accessible) — kill the default
   padding/font/outline so it looks identical to the original .icon-box. */
.notif-bell-btn {
    padding: 0;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    box-sizing: border-box;
}

.notif-bell-btn:hover {
    background: #f4f9ff;
    border-color: #b9d4f0;
}

.notif-bell-btn.active {
    background: #eaf4fb;
    border-color: #1177bb;
}

.notif-bell-btn:focus-visible {
    outline: 2px solid #1177bb;
    outline-offset: 2px;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 100px;
    background: linear-gradient(135deg, #d63a4f, #e57080);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(214, 58, 79, 0.35);
    border: 2px solid #fff;
    box-sizing: content-box;
    pointer-events: none;
}

/* Transparent overlay that catches outside clicks. The notif panel
   uses a higher z-index so it sits above this overlay. */
.header-outside-click {
    position: fixed;
    inset: 0;
    /* Must sit BELOW the header (.mian-header is position:sticky; z-index:1000,
       which forms a stacking context that traps its dropdown/notif children).
       If the overlay is above the header, it covers those popups and swallows
       their clicks (e.g. Logout). Keep it above page content but below 1000. */
    z-index: 999;
    background: transparent;
}

.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #e3eaf6;
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(20, 50, 120, 0.18),
                0  4px 14px rgba(20, 50, 120, 0.06);
    z-index: 1100;
    overflow: hidden;
    animation: notifPanelIn 0.18s ease;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

@keyframes notifPanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(135deg, #086cac 0%, #0a93e0 100%);
    color: #fff;
}

.notif-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.notif-panel-title i { font-size: 16px; opacity: 0.95; }

.notif-count-pill {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 100px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

.notif-mark-all {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.notif-mark-all:hover { background: rgba(255, 255, 255, 0.30); }

/* List */
.notif-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 14px;
    border-bottom: 1px solid #f0f4fa;
    cursor: pointer;
    transition: background 0.15s ease;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover      { background: #f6f9fd; }

.notif-item.unread { background: #f4f9ff; }
.notif-item.unread:hover { background: #ecf3fc; }

.notif-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.notif-item-icon.success { background: #e3f9ee; color: #178e54; }
.notif-item-icon.warning { background: #fff3df; color: #b3722b; }
.notif-item-icon.danger  { background: #ffe7ec; color: #c8334b; }
.notif-item-icon.info    { background: #e6f2fb; color: #1177bb; }
.notif-item-icon.neutral { background: #eef2f8; color: #4a5b7c; }

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #1a2b4b;
    margin-bottom: 2px;
    line-height: 1.35;
}

.notif-item-desc {
    font-size: 12.5px;
    color: #5b6a85;
    line-height: 1.45;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notif-item-time {
    font-size: 11.5px;
    color: #8896b1;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
}

.notif-item-time i { font-size: 11px; }

.notif-item-dot {
    position: absolute;
    top: 16px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d63a4f;
    box-shadow: 0 0 0 3px rgba(214, 58, 79, 0.18);
}

/* Empty state */
.notif-empty {
    padding: 38px 22px 36px;
    text-align: center;
    color: #5b6a85;
}

.notif-empty-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef4ff, #dde8f7);
    color: #1177bb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.notif-empty-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #36456a;
    line-height: 1.5;
    max-width: 260px;
    margin: 0 auto;
}

/* Scrollbar polish for the list */
.notif-list::-webkit-scrollbar { width: 7px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb {
    background: #d2dde9;
    border-radius: 7px;
}
.notif-list::-webkit-scrollbar-thumb:hover { background: #bccbdc; }

/* Mobile: panel becomes near-full-width and anchored to viewport edges */
@media (max-width: 600px) {
    .notif-panel {
        width: calc(100vw - 16px);
        right: -8px;
    }
}

.four-circls svg {
    width: 1.1rem;
}

.stat-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-value {
    color: var(--primary-color);
    font-weight: bold;
}

.progress {
    height: 0.5rem;
}

.chart-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notification-badge {
    background-color: rgba(3, 110, 171, 0.1);
    color: var(--primary-color);
}

.status-badge {
    background-color: rgba(3, 110, 171, 0.1);
    color: var(--primary-color);
}

/* ========== TABLES ========== */
.table {
    min-width: 1178px;
    width: 100% !important;
    border-collapse: collapse;
    overflow-x: auto !important;
    overflow-y: auto !important;
}

.table-responsive {
    height: auto !important;
}

    .table-responsive thead th {
        position: sticky !important;
        top: 0 !important;
        background-color: #f8f9fa !important;
    }

td i {
    cursor: pointer !important;
    color: #025c8c !important;
}

.form-label {
    margin: 0 !important;
}

.custom-border {
    border-color: #e5e5e5 !important;
}

/* ========== PAGINATION ========== */
.pagination-container {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 8px 20px;
}

.page-item .page-link {
    border: none;
    color: #6c7a89;
    font-weight: 500;
}

.page-item.active .page-link {
    background-color: #0d3344;
    color: white;
    border-radius: 6px;
}

.page-link:hover {
    background-color: #f1f1f1;
    border-radius: 6px;
}

.disabled .page-link {
    opacity: 0.4;
}

.items-select {
    background: #f3f3f3;
    border-radius: 10px;
    padding: 6px 12px;
    border: none;
    font-weight: 500;
}

.pagination.numbers-rtl {
    direction: rtl;
}

    .pagination.numbers-rtl .page-link {
        direction: ltr;
    }


.custom-modal {
    border-radius: 22px;
    padding: 10px !important;
}

.main-container2 {
    margin-top: 0.2rem !important;
}

.my-center {
    width: 100% !important;
}

.custom-modal .modal-header {
    padding: 20px 30px !important;
    border-bottom: 1px solid #e5e5e5;
}

.full-width {
    width: 100% !important;
}

.custom-modal .modal-body {
    padding: 30px 40px !important;
}

#uploadBox i {
    color: rgb(48, 48, 48) !important;
}

.modal-body > div {
    border: 0.5px solid rgb(229, 229, 229) !important;
    border-radius: 10px !important;
    padding: 0.4rem !important;
    overflow-x: hidden;
    margin-top: 0.01rem !important;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px 30px;
}

    .form-grid .full {
        grid-column: span 3;
    }

.upload-box {
    border: 2px dashed #c7c7c7;
    border-radius: 12px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

    .upload-box i {
        font-size: 30px;
        color: #086cac;
    }

    .upload-box p {
        margin: 5px 0 0;
    }

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

    .overlay.active {
        display: block;
    }

.no-arrow::after {
    display: none !important;
}



@media (max-width: 768px) {
    .sidebar-mobile {
        position: relative;
        transform: translateX(0);
        height: 100vh;
        bottom: 0 !important;
    }

    .header-responsive {
        display: flex !important;
        flex-direction: column-reverse !important;
    }
}

/* Tablet & Small Desktop */
@media (max-width: 1200px) {
    #openRoleModal {
        white-space: nowrap !important;
        font-size: 14px !important;
    }

    .position-relative input {
        min-width: 180px !important;
    }
}

@media (max-width: 992px) {
    .form-card {
        width: 80%;
    }

    .position-relative input {
        min-width: 100% !important;
    }

    .gap-3 {
        gap: 10px !important;
    }

    .pagination-container {
        gap: 15px !important;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .role-modal * {
        font-size: 7px !important;
    }

    .sidebar1 {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        height: auto;
        width: 280px;
        transform: translateX(100%);
        z-index: 1050;
        scrollbar-width: auto;
    }

    .modal-dialog {
        max-width: 90% !important;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

        .form-grid .full {
            grid-column: span 1;
        }

    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .table-wide {
        min-width: 900px !important;
    }

    .main-user {
        width: 100% !important;
        margin: auto;
    }

    h5 {
        font-size: 16px !important;
    }

    #openRoleModal {
        padding: 6px 15px !important;
    }

    .top-header-mobile,
    .d-flex.w-100.flex-column.flex-md-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    #openRoleModal {
        width: 100% !important;
    }

    .btn-filter-mobile,
    .btn.border.border-info-subtle {
        width: fit-content !important;
        align-self: flex-end !important;
    }

    .pagination-container {
        flex-direction: row !important;
        gap: 10px !important;
        text-align: center;
        white-space: nowrap;
        flex-wrap: nowrap !important;
        width: auto !important;
        overflow-x: auto !important;
    }

    #itemsPerPage {
        width: 100px !important;
    }

    .my-center {
        width: 100% !important;
    }

    header {
        width: 93vw !important;
    }
}

.table td,
.table th {
    padding: 5px !important;
    font-size: 0.8rem !important;
}

@media (max-width: 767px) {
    [id="openRoleModal"] {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    html,
    body {
        overflow-x: hidden !important;
        width: 100vw !important;
        align-items: center !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: start !important;
    }

        body > div {
            width: 93vw !important;
            overflow-x: hidden !important;
        }

    .main-content {
        width: 100% !important;
    }

    .mySearch-select {
        visibility: hidden !important;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .form-card {
        width: 100%;
        padding: 30px 20px;
    }

    .form-title {
        font-size: 24px;
    }

    .btn-copy,
    .btn-save {
        width: 48%;
        font-size: 14px;
    }

    .d-flex {
        gap: 10px;
    }

    .main-content {
        margin-top: 1rem !important;
    }

    .main-user {
        margin: 0 auto !important;
        padding: 15px !important;
        width: 100% !important;
    }

    .stats-card,
    .dash-card,
    .chart-card,
    .visit-item,
    .note-item,
    .upcoming-card,
    .notifications-card {
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
    }

        .stats-card > *,
        .visit-item > *,
        .note-item > * {
            margin-left: auto !important;
            margin-right: auto !important;
        }

    h5 {
        font-size: 15px !important;
    }

    .header-container,
    .d-flex.w-100 {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .position-relative {
        width: 100% !important;
    }

        .position-relative input {
            width: 100% !important;
            min-width: unset !important;
        }

    #openRoleModal,
    .btn.border {
        width: 100% !important;
    }

    .modal-dialog {
        max-width: 95% !important;
        margin: auto;
    }

    .modal-body {
        font-size: 0.6rem !important;
    }

    .modal-footer button {
        width: 40% !important;
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
    }

    .modal.show .modal-dialog {
        display: flex !important;
        align-items: center; /* توسيط رأسي */
        justify-content: center; /* توسيط أفقي */
        min-height: 100vh; /* خلي ارتفاعها قد الشاشة */
        margin: 0 auto; /* منع المسافات */
    }

    table thead {
        font-size: 13px !important;
    }

    table tbody td {
        font-size: 13px !important;
    }

    table {
        font-size: 13px !important;
    }


    #rangeText {
        font-size: 14px !important;
    }

    .items-select {
        width: 100px !important;
    }

    .pagination {
        justify-content: center !important;
    }

    .pagination-container {
        flex-direction: row !important;
        gap: 10px !important;
        text-align: center;
        white-space: nowrap;
        flex-wrap: nowrap !important;
        width: auto !important;
        overflow-x: auto !important;
    }
}

@media (max-width: 768px) {
    .filter-row {
        flex-wrap: nowrap !important;
    }

    .container {
        width: 100% !important;
    }

    .edit-container div {
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

        .edit-container div div {
            width: 30% !important;
            flex-grow: 0 !important;
            flex-direction: column !important;
        }

    .card {
        width: 100% !important;
        background-color: transparent !important;
    }
}

.fa-edit {
    font-size: 1rem !important; /* أو أكبر */
    color: #086cac !important;
}
/* ================================
   RESPONSIVE – TABLET (768px–991px)
================================ */
@media (min-width: 768px) and (max-width: 991px) {
    header {
        width: 100vw !important;
    }
    /* ===== Sidebar ===== */
    .sidebar1 {
        padding: 20px 15px !important;
    }

        .sidebar1 .logo {
            font-size: 1.6rem !important;
        }

    .side-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .nav-summary {
        font-size: 0.95rem !important;
        gap: 10px !important;
    }

    /* ===== Main Content ===== */
    .main-content {
        width: 100vw !important;
    }

        /* الهيدر الثابت */
        .main-content header {
            padding: 15px !important;
        }

    /* ===== Layout Width ===== */
    .d-flex.gap-4 {
        gap: 1rem !important; /* علشان المسافات متبقاش كبيرة */
    }

    /* ======"Content Cards" إن وُجدت ===== */
    .card {
        padding: 15px !important;
    }

    /* ===== Fix Overflow ===== */
    body,
    html {
        overflow-x: hidden !important;
    }
}

#dataBody tr:hover {
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-user,
    .card {
        border: none !important;
        padding: 0 !important;
        background-color: transparent;
    }

    .my-center {
        margin: auto !important;
    }

    .main-content {
        padding: 0 !important;
        background-color: transparent !important;
    }

    .card-custom,
    .card-body {
        border: none !important;
        border: 1px solid rgb(210, 210, 210) !important;
        background-color: white;
        border-radius: 10px;
        width: 100% !important;
        margin: auto !important;
        padding: 0.6rem !important;
    }

    /* المودال نفسه */
    .location-modal .modal-dialog {
        max-width: 95% !important;
        margin: auto;
    }

    .location-modal .modal-content {
        border-radius: 18px !important;
    }

    .modal-content {
        width: 100vw !important;
    }

        .modal-content #uploadBox {
            height: auto !important;
            text-align: center;
            overflow: hidden !important;
        }

            .modal-content #uploadBox p {
                width: 100%;
            }

            .modal-content #uploadBox i {
                margin: auto !important;
            }

    .location-modal .modal-body {
        padding: 20px !important;
    }

        /* خليهم 2 كولوم زي الصورة */
        .location-modal .modal-body .row > div {
            flex: 0 0 50% !important;
            max-width: 50% !important;
        }

    /* ضبط الحقول */
    .location-modal label {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .location-modal input,
    .location-modal select {
        font-size: 13px;
        padding: 8px 10px !important;
        border-radius: 10px !important;
    }

    /* الفوتر */
    .location-modal .modal-footer {
        flex-direction: row !important;
        gap: 12px !important;
        padding: 18px !important;
    }

        .location-modal .modal-footer .btn {
            width: 40% !important;
        }

    .location-modal .modal-footer {
        flex-wrap: nowrap !important;
    }

    .add-role input[type="checkbox"] {
        width: 16px !important;
        height: 16px !important;
        cursor: pointer;
    }

    .add-role {
        border: none !important;
        box-shadow: none !important;
    }

        .add-role > div > div {
            padding: 0 !important;
            padding: 0 !important;
        }

    #allPermission2, .first-input {
        width: 15%;
    }
}

.modal-narrow {
    max-width: 40vw !important; /* قلّل أو كبّر زي ما تحب */
}

.add-role input[type="checkbox"] {
    cursor: pointer !important;
}

@media (max-width: 768px) {
    .modal-narrow {
        max-width: 95vw !important; /* في الموبايل يرجع طبيعي */
    }

    #allPermission2 {
        justify-content: start !important;
    }
}

@media (max-width: 768px) {
    #viewModal .row {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }

    .main-container2 {
        margin-top: 0 !important;
    }

    .sidebar1 {
        margin: 0 !important;
        bottom: 0 !important;
        left: unset !important;
        width: auto !important;
    }

    #viewModal .row > div {
        width: 100% !important;
    }
}

.row-accepted {
    background-color: #eefdf4 !important; /* أخضر فاتح */
    color: #166534;
}

.row-rejected {
    background-color: #fdeeee !important; /* أحمر فاتح */
    color: #991b1b;
}

.table-header-width {
    width: 150px
}
/* ===== Collapsed (mini) sidebar — icon-only rail ===== */
/* NOTE: width alone isn't enough — the base `.sidebar1.sidebar-mobile` sets
   `min-width: 250px`, which would clamp the element back to 250px. We must
   override min/max-width here too so the rail actually collapses. */
.sidebar1.sidebar-mini {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    padding: 12px 8px !important;
    align-items: center !important;
}

    /* Let each row span the rail so the hover highlight is full-width */
    .sidebar1.sidebar-mini nav {
        width: 100% !important;
        align-items: stretch !important;
    }

    /* Center each item and hide its text label (icon only) */
    .sidebar1.sidebar-mini .nav-summary,
    .sidebar1.sidebar-mini .nav-summary2 {
        justify-content: center !important;
        width: 100% !important;
        padding: 0.6rem 0 !important;
        font-size: 0 !important; /* collapses the text node, icon stays (sized below) */
    }

    /* Consistent icon size, centered, no label gap */
    .sidebar1.sidebar-mini .side-icon {
        margin: 0 !important;
        width: 26px !important;
        height: 26px !important;
    }

        .sidebar1.sidebar-mini .side-icon svg {
            width: 26px !important;
            height: 26px !important;
        }

    /* No expand-chevrons and no sub-menus in the collapsed rail */
    .sidebar1.sidebar-mini .nav-summary::after,
    .sidebar1.sidebar-mini .nav-summary2::after {
        display: none !important;
    }

    .sidebar1.sidebar-mini .nav-submenu {
        display: none !important;
    }

    /* Hide the wordmark cleanly (no reserved empty gap) */
    .sidebar1.sidebar-mini .logo {
        display: none !important;
    }

    /* The "✕" is the mobile drawer's close button — it has no purpose in the
       collapsed desktop rail, so hide it there (it stays available on mobile). */
    .sidebar1.sidebar-mini #closeSidebar {
        display: none !important;
    }

/* The bottom toggle button stays centered in the rail */
.sidebar1.sidebar-mini > .btn {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

.disabled-select {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.position-relative select {
    padding-right: 2rem;
}

.spinner-border.position-absolute {
    width: 1rem;
    height: 1rem;
}

.zoomable-image {
    transition: transform 0.2s ease;
}

    .zoomable-image:hover {
        transform: scale(1.03);
    }

/* =============================================
   Blacklist Modal – Stylesheet
   ============================================= */

/* ── MODAL CONTENT ── */
.blacklist-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

/* ── HEADER ── */
.blacklist-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between; /* اتنين على الطرفين */
}

    .blacklist-modal .modal-header .header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .blacklist-modal .modal-header .header-icon {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        color: #fff;
        flex-shrink: 0;
    }

    .blacklist-modal .modal-header .modal-title {
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .blacklist-modal .modal-header .modal-subtitle {
        color: rgba(255, 255, 255, 0.65);
        font-size: 11px;
    }

.blacklist-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .blacklist-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* ── BODY ── */
.blacklist-modal .modal-body {
    padding: 20px 24px;
    background: #f9fafb;
}

/* ── LABELS ── */
.blacklist-modal .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
    display: block;
}

/* ── INPUT GROUP ── */
.blacklist-modal .input-group-text {
    background: #fff;
    border-color: #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.blacklist-modal .form-control {
    border-color: #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

    .blacklist-modal .form-control:focus {
        border-color: #0a63a3;
        box-shadow: 0 0 0 3px rgba(10, 99, 163, 0.1);
        border-left: none;
    }

.blacklist-modal .input-group:focus-within .input-group-text {
    border-color: #0a63a3;
}

/* ── UPLOAD BOX ── */
.blacklist-modal .upload-label {
    cursor: pointer;
    display: block;
    width: 100%;
}

.blacklist-modal .upload-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px dashed #d1d5db;
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

    .blacklist-modal .upload-box:hover {
        border-color: #0a63a3;
        background: #f0f7ff;
    }

.blacklist-modal .upload-icon-box {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: #e8f2fb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a63a3;
    font-size: 16px;
}

.blacklist-modal .upload-text-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.blacklist-modal .upload-text-sub {
    font-size: 11px;
    color: #9ca3af;
}

.blacklist-modal .upload-badges {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.blacklist-modal .upload-badge {
    background: #e8f2fb;
    color: #0a63a3;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

/* ── WARNING ── */
.blacklist-modal .warning-bar {
    margin: 0 16px 10px;
    padding: 8px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── FOOTER ── */
.blacklist-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.blacklist-modal .btn-save {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10, 99, 163, 0.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

    .blacklist-modal .btn-save:hover {
        box-shadow: 0 5px 16px rgba(10, 99, 163, 0.4);
        transform: translateY(-1px);
        color: #fff;
    }

.blacklist-modal .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    transition: background 0.2s;
}

    .blacklist-modal .btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }

/* =============================================
   Whitelist Modal – Stylesheet
   ============================================= */

/* ── MODAL CONTENT ── */
.whitelist-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
    width: 65%;
    margin: auto;
}

/* ── HEADER ── */
.whitelist-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .whitelist-modal .modal-header .header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .whitelist-modal .modal-header .header-icon {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        color: #fff;
        flex-shrink: 0;
    }

    .whitelist-modal .modal-header .modal-title {
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .whitelist-modal .modal-header .modal-subtitle {
        color: rgba(255, 255, 255, 0.65);
        font-size: 11px;
    }

.whitelist-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .whitelist-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* ── BODY ── */
.whitelist-modal .modal-body {
    padding: 18px 24px;
    background: #f9fafb;
}

/* ── LABELS ── */
.whitelist-modal .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
    display: block;
}

/* ── INPUT GROUP ── */
.whitelist-modal .input-group-text {
    background: #fff;
    border-color: #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.whitelist-modal .form-control {
    border-color: #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

    .whitelist-modal .form-control:focus {
        border-color: #0a63a3;
        box-shadow: 0 0 0 3px rgba(10, 99, 163, 0.1);
        border-left: none;
    }

.whitelist-modal .input-group:focus-within .input-group-text {
    border-color: #0a63a3;
}

.whitelist-modal .form-control:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* ── UPLOAD BOX ── */
.whitelist-modal .upload-label {
    cursor: pointer;
    display: block;
    width: 100%;
}

.whitelist-modal .upload-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px dashed #d1d5db;
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

    .whitelist-modal .upload-box:hover {
        border-color: #0a63a3;
        background: #f0f7ff;
    }

.whitelist-modal .upload-icon-box {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: #e8f2fb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a63a3;
    font-size: 16px;
}

.whitelist-modal .upload-text-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.whitelist-modal .upload-text-sub {
    font-size: 11px;
    color: #9ca3af;
}

.whitelist-modal .upload-badges {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.whitelist-modal .upload-badge {
    background: #e8f2fb;
    color: #0a63a3;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

/* ── WARNING ── */
.whitelist-modal .warning-bar {
    margin: 0 16px 10px;
    padding: 8px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── FOOTER ── */
.whitelist-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.whitelist-modal .btn-save {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10, 99, 163, 0.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

    .whitelist-modal .btn-save:hover {
        box-shadow: 0 5px 16px rgba(10, 99, 163, 0.4);
        transform: translateY(-1px);
        color: #fff;
    }

.whitelist-modal .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    transition: background 0.2s;
}

    .whitelist-modal .btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }

/* =============================================
   SubLocation Modal – Stylesheet
   ============================================= */

/* ── MODAL CONTENT ── */
.sublocation-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

/* ── HEADER ── */
.sublocation-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sublocation-modal .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sublocation-modal .header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}

.sublocation-modal .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.sublocation-modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.sublocation-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .sublocation-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* ── BODY ── */
.sublocation-modal .modal-body {
    padding: 18px 24px;
    background: #f9fafb;
}

/* ── LABELS ── */
.sublocation-modal .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
    display: block;
}

/* ── INPUT GROUP ── */
.sublocation-modal .input-group-text {
    background: #fff;
    border-color: #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.sublocation-modal .form-control,
.sublocation-modal .form-select {
    border-color: #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

    .sublocation-modal .form-control:focus,
    .sublocation-modal .form-select:focus {
        border-color: #0a63a3;
        box-shadow: 0 0 0 3px rgba(10, 99, 163, 0.1);
        border-left: none;
    }

.sublocation-modal .input-group:focus-within .input-group-text {
    border-color: #0a63a3;
}

.sublocation-modal .form-control:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* ── WARNING ── */
.sublocation-modal .warning-bar {
    margin: 0 16px 10px;
    padding: 8px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── FOOTER ── */
.sublocation-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.sublocation-modal .btn-save {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10, 99, 163, 0.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

    .sublocation-modal .btn-save:hover {
        box-shadow: 0 5px 16px rgba(10, 99, 163, 0.4);
        transform: translateY(-1px);
        color: #fff;
    }

.sublocation-modal .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    transition: background 0.2s;
}

    .sublocation-modal .btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }

/* =============================================
   Location Page – Table Styles
   ============================================= */

.location-title {
    white-space: nowrap;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #086cac !important;
    cursor: pointer;
    letter-spacing: -0.01em;
}

/* ── TABLE WRAPPER ── */
.location-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    border: 1.5px solid #d0e6f5;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(8, 108, 172, 0.08);
    background: #fff;
}

.location-table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(135deg, #086cac 0%, #0a93e0 100%) !important;
    color: #fff !important;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 13px 14px;
    border: none !important;
}

.location-table-wrapper thead th:first-child { border-radius: 12px 0 0 0; }
.location-table-wrapper thead th:last-child  { border-radius: 0 12px 0 0; }

.location-table-wrapper tbody tr {
    border-bottom: 1px solid #eef3f8;
    transition: background 0.15s;
}

.location-table-wrapper tbody tr:last-child { border-bottom: none; }
.location-table-wrapper tbody tr:hover { background: #f0f8ff !important; }
.location-table-wrapper tbody tr:nth-child(even) { background: #f8fbff; }

.location-table-wrapper tbody td {
    font-size: 13px;
    padding: 11px 14px;
    white-space: nowrap;
    color: #1e3a52;
    vertical-align: middle;
    border: none;
}

.location-table-wrapper tbody td.text-muted {
    padding: 40px;
    color: #9ca3af !important;
    font-size: 14px;
}

/* ── ACTION ICONS ── */
.location-table-wrapper tbody td a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
    margin: 0 2px;
    color: #6b7280;
}

.location-table-wrapper tbody td a:hover { background: #f0f8ff; transform: scale(1.1); }
.location-table-wrapper tbody td a:has(.text-danger):hover { background: #fff1f2; }
.location-table-wrapper tbody td a:has(.fa-edit):hover     { background: #e0f2fe; }

@media (max-width: 767px) {
    .location-header {
        flex-wrap: wrap;
    }

    .location-title {
        font-size: 14px !important;
    }

    .location-table th,
    .location-table td {
        font-size: 11px;
        padding: 6px 4px;
        white-space: nowrap;
    }

    .pagination-container {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start !important;
    }

        .pagination-container input.form-control {
            width: 70px !important;
        }
}

/* =============================================
   Visits Page – Stylesheet
   ============================================= */

/* ── CARD LAYOUT ── */
.visits-page {
    height: calc(107vh - 120px);
    display: flex;
    flex-direction: column;
}

    .visits-page .card-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 16px;
    }

/* ── HEADER ── */
.visits-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.visits-title {
    white-space: nowrap;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #086cac !important;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.visits-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ── TABLE WRAPPER ── */
.visits-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    border: 1.5px solid #d0e6f5;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(8, 108, 172, 0.08);
    background: #fff;
}

    .visits-table-wrapper table {
        min-width: 900px;
    }

    .visits-table-wrapper thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        background: linear-gradient(135deg, #086cac 0%, #0a93e0 100%) !important;
        color: #fff !important;
        font-size: 11.5px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        white-space: nowrap;
        padding: 13px 14px;
        border: none !important;
    }

    .visits-table-wrapper thead th:first-child { border-radius: 12px 0 0 0; }
    .visits-table-wrapper thead th:last-child  { border-radius: 0 12px 0 0; }

    .visits-table-wrapper tbody tr {
        border-bottom: 1px solid #eef3f8;
        transition: background 0.15s;
    }

    .visits-table-wrapper tbody tr:last-child { border-bottom: none; }

    .visits-table-wrapper tbody tr:hover {
        background: #f0f8ff !important;
    }

    .visits-table-wrapper tbody td {
        font-size: 13px;
        padding: 11px 14px;
        white-space: nowrap;
        color: #1e3a52;
        vertical-align: middle;
        border: none;
    }

    .visits-table-wrapper tbody tr:nth-child(even) { background: #f8fbff; }

    .visits-table-wrapper tbody td.text-muted {
        padding: 40px;
        color: #9ca3af !important;
        font-size: 14px;
    }

/* ── ACTION ICONS ── */
.visits-table-wrapper tbody td a,
.visits-table-wrapper tbody td i[role="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
    margin: 0 2px;
    color: #6b7280;
    cursor: pointer;
}

    .visits-table-wrapper tbody td a:hover,
    .visits-table-wrapper tbody td i[role="button"]:hover {
        background: #f0f8ff;
        transform: scale(1.1);
    }

    .visits-table-wrapper tbody td a:has(.text-danger):hover { background: #fff1f2; }
    .visits-table-wrapper tbody td a:has(.fa-edit):hover     { background: #e0f2fe; }

/* ── ROW STATUS COLORS: consolidated into the single .row-accepted/.row-rejected
   rules above (this duplicate was silently overridden by their !important
   backgrounds, so only its text colors applied — now merged up). ── */

/* ── PAGINATION ── */
.visits-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 10px 4px 2px;
    margin-top: 6px;
    border-top: 1.5px solid #e8f1f8;
    gap: 8px;
}

/* ── MODAL ── */
.visits-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

.visits-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.visits-modal .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.visits-modal .header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}

.visits-modal .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.visits-modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.visits-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .visits-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.visits-modal .modal-body {
    padding: 18px 24px;
    background: #f9fafb;
}

.visits-modal .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
    display: block;
}

.visits-modal .input-group-text {
    background: #fff;
    border-color: #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.visits-modal .form-control {
    border-color: #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

    .visits-modal .form-control:focus {
        border-color: #0a63a3;
        box-shadow: 0 0 0 3px rgba(10, 99, 163, 0.1);
        border-left: none;
    }

.visits-modal .input-group:focus-within .input-group-text {
    border-color: #0a63a3;
}

/* upload */
.visits-modal .upload-label {
    cursor: pointer;
    display: block;
    width: 100%;
}

.visits-modal .upload-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px dashed #d1d5db;
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

    .visits-modal .upload-box:hover {
        border-color: #0a63a3;
        background: #f0f7ff;
    }

.visits-modal .upload-icon-box {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: #e8f2fb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a63a3;
    font-size: 16px;
}

.visits-modal .upload-text-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.visits-modal .upload-text-sub {
    font-size: 11px;
    color: #9ca3af;
}

.visits-modal .upload-badges {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.visits-modal .upload-badge {
    background: #e8f2fb;
    color: #0a63a3;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

/* warning */
.visits-modal .warning-bar {
    margin: 0 16px 10px;
    padding: 8px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* footer */
.visits-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.visits-modal .btn-save {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10, 99, 163, 0.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

    .visits-modal .btn-save:hover {
        box-shadow: 0 5px 16px rgba(10, 99, 163, 0.4);
        transform: translateY(-1px);
        color: #fff;
    }

.visits-modal .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    transition: background 0.2s;
}

    .visits-modal .btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }

/* ── CONFIRM DECLINE MODAL ── */
.confirm-modal .modal-content {
    border-radius: 20px;
    border: none;
    text-align: center;
    padding: 28px 24px;
}

.confirm-modal .confirm-icon {
    width: 80px;
    height: 80px;
    background: #ffebeb;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px;
    font-size: 40px;
    color: #e74c3c;
}

.confirm-modal h4 {
    color: #344767;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 16px;
}

.confirm-modal .btn-confirm-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    font-weight: 600;
    font-size: 13px;
}

.confirm-modal .btn-confirm-yes {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    font-weight: 600;
    font-size: 13px;
}

/* ── MOBILE ── */
@media (max-width: 767px) {


    .visits-pagination {
        flex-wrap: wrap;
    }

        .visits-pagination > div {
            flex: 1 1 auto;
        }

    .visits-modal .modal-body .row > [class*="col-4"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .visits-modal .modal-body .row > [class*="col-6"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* =============================================
   Appointment Modal – Step Wizard
   ============================================= */

/* Step indicator bar */
.step-indicator {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-top: 20px;
    margin-bottom: 24px;
    padding: 0 8px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

/* Connecting line between steps */
.step-line {
    flex: 1;
    height: 2px;
    background: #dee2e6;
    margin-top: 18px;
    align-self: flex-start;
    transition: background 0.3s;
}

.step-line.done {
    background: #198754;
}

/* Numbered circle */
.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
    z-index: 1;
    position: relative;
}

.step-item.active .step-circle {
    border-color: #0d6efd;
    background: #0d6efd;
    color: #fff;
}

.step-item.done .step-circle {
    border-color: #198754;
    background: #198754;
    color: #fff;
}

/* Step label */
.step-label {
    font-size: 11px;
    color: #6c757d;
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
}

.step-item.active .step-label {
    color: #0d6efd;
    font-weight: 700;
}

.step-item.done .step-label {
    color: #198754;
    font-weight: 600;
}

/* Optional section notice (blue info banner) */
.optional-section-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e7f1ff;
    border: 1px solid #b6d4fe;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #084298;
    margin-bottom: 16px;
}

.optional-section-notice i {
    font-size: 16px;
    flex-shrink: 0;
    color: #0d6efd;
}

/* Required star */
.required-star {
    color: #dc3545;
    margin-inline-start: 2px;
    font-weight: 700;
}

/* Optional tag badge */
.optional-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #6c757d;
    background: #f0f0f0;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1px 7px;
    margin-inline-start: 6px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

/* Step content panel */
.step-panel {
    animation: stepFadeIn 0.2s ease;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Whitelist / Blacklist – Stepper Modal (wl-*)
   ============================================= */

.wl-modal .modal-dialog {
    max-width: 680px;
}

.wl-modal .modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.18);
}

/* ── Header ── */
.wl-modal-header {
    background: linear-gradient(135deg, #086cac 0%, #0a93e0 100%);
    padding: 1.4rem 1.8rem 1rem;
    position: relative;
}

.wl-modal-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.wl-modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wl-modal-icon {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    backdrop-filter: blur(6px);
}

.wl-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.wl-modal-subtitle {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

.wl-btn-close {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.wl-btn-close:hover {
    background: rgba(255,255,255,0.3);
}

/* ── Stepper ── */
.wl-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 0.5rem;
}

.wl-step {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
}

.wl-step-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 1;
}

.wl-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    transition: all 0.3s;
    flex-shrink: 0;
}

.wl-step.active .wl-step-num {
    background: #fff;
    border-color: #fff;
    color: #086cac;
}

.wl-step.done .wl-step-num {
    background: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.9);
    color: #086cac;
}

.wl-step-label {
    display: flex;
    flex-direction: column;
}

.wl-step-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    transition: color 0.3s;
    white-space: nowrap;
}

.wl-step.active .wl-step-title,
.wl-step.done .wl-step-title {
    color: #fff;
}

.wl-step-badge {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

.wl-step.active .wl-step-badge {
    color: rgba(255,255,255,0.8);
}

.wl-step-connector {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.2);
    margin: 0 8px;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.wl-step-connector-fill {
    height: 100%;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    width: 0%;
    transition: width 0.4s ease;
}

.wl-step-connector-fill.done {
    width: 100%;
}

/* ── Body ── */
.wl-modal-body {
    padding: 1.6rem 1.8rem;
    background: #fff;
    min-height: 320px;
}

.wl-step-panel {
    display: none;
    animation: wlFadeSlideIn 0.3s ease;
}

.wl-step-panel.active {
    display: block;
}

@keyframes wlFadeSlideIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Section label ── */
.wl-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #086cac;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wl-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8f4fb;
}

/* Optional badge */
.optional-badge {
    display: inline-flex;
    align-items: center;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 100px;
    padding: 2px 8px;
    font-size: 0.62rem;
    font-weight: 600;
    color: #0284c7;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-right: 6px;
}

/* ── Fields ── */
.wl-field {
    margin-bottom: 1rem;
}

.wl-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.35rem;
}

.wl-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.wl-input-wrap:focus-within {
    border-color: #086cac;
    box-shadow: 0 0 0 3px rgba(8,108,172,0.1);
}

.wl-input-icon {
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.85rem;
    flex-shrink: 0;
    background: #f9fafb;
    border-right: 1.5px solid #e5e7eb;
    align-self: stretch;
}

.wl-input-wrap input,
.wl-input-wrap textarea {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: #111827;
    background: transparent;
    width: 100%;
}

.wl-input-wrap input::placeholder {
    color: #d1d5db;
}

.wl-input-wrap input[disabled] {
    background: #f9fafb;
    color: #9ca3af;
}

/* ── Upload ── */
.wl-upload-label {
    cursor: pointer;
    display: block;
}

.wl-upload-box {
    border: 2px dashed #bfdbfe;
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f9ff;
    transition: all 0.2s;
}

.wl-upload-box:hover {
    border-color: #086cac;
    background: #e0f2fe;
}

.wl-upload-icon {
    width: 40px;
    height: 40px;
    background: #bfdbfe;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #086cac;
    flex-shrink: 0;
}

.wl-upload-text {
    font-size: 0.83rem;
    font-weight: 600;
    color: #374151;
}

.wl-upload-sub {
    font-size: 0.73rem;
    color: #9ca3af;
    margin-top: 2px;
}

.wl-upload-badges {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.wl-upload-badge {
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.65rem;
    font-weight: 700;
}

/* ── Warning ── */
.wl-warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    color: #dc2626;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0.75rem 1.8rem;
}

/* ── Footer ── */
.wl-modal-footer {
    padding: 1rem 1.8rem;
    background: #f9fafb;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wl-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s;
}

.wl-dot.active {
    background: #086cac;
    width: 22px;
    border-radius: 4px;
}

.wl-footer-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wl-btn-back {
    padding: 0.55rem 1.2rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wl-btn-back:hover {
    border-color: #086cac;
    color: #086cac;
}

.wl-btn-next {
    padding: 0.55rem 1.4rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #086cac, #0a93e0);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(8,108,172,0.3);
}

.wl-btn-next:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.wl-btn-save {
    padding: 0.55rem 1.4rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(5,150,105,0.3);
}

.wl-btn-save:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* =============================================
   Users Page – Stylesheet
   ============================================= */

/* ── CARD LAYOUT ── */
.users-page {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

    .users-page .card-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 16px;
    }

/* ── HEADER ── */
.users-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.users-title {
    white-space: nowrap;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #086cac !important;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.users-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── TABLE WRAPPER ── */
.users-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    border: 1.5px solid #d0e6f5;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(8, 108, 172, 0.08);
    background: #fff;
}

.users-table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(135deg, #086cac 0%, #0a93e0 100%) !important;
    color: #fff !important;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 13px 14px;
    border: none !important;
}

.users-table-wrapper thead th:first-child { border-radius: 12px 0 0 0; }
.users-table-wrapper thead th:last-child  { border-radius: 0 12px 0 0; }

.users-table-wrapper tbody tr {
    border-bottom: 1px solid #eef3f8;
    transition: background 0.15s;
}

.users-table-wrapper tbody tr:last-child { border-bottom: none; }
.users-table-wrapper tbody tr:hover { background: #f0f8ff !important; }
.users-table-wrapper tbody tr:nth-child(even) { background: #f8fbff; }

.users-table-wrapper tbody td {
    font-size: 13px;
    padding: 11px 14px;
    white-space: nowrap;
    color: #1e3a52;
    vertical-align: middle;
    border: none;
}

.users-table-wrapper tbody td.text-muted {
    padding: 40px;
    color: #9ca3af !important;
    font-size: 14px;
}

/* ── ACTION ICONS ── */
.users-table-wrapper tbody td a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
    margin: 0 2px;
    color: #6b7280;
}

.users-table-wrapper tbody td a:hover { background: #f0f8ff; transform: scale(1.1); }
.users-table-wrapper tbody td a:has(.text-danger):hover { background: #fff1f2; }
.users-table-wrapper tbody td a:has(.fa-edit):hover     { background: #e0f2fe; }

/* ── PAGINATION ── */
.users-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 10px 4px 2px;
    margin-top: 6px;
    border-top: 1.5px solid #e8f1f8;
    gap: 8px;
}

/* ── SHARED MODAL BASE ── */
.users-modal .modal-content,
.view-user-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

/* ── ADD/EDIT MODAL HEADER ── */
.users-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.users-modal .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.users-modal .header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}

.users-modal .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.users-modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.users-modal .btn-close-custom,
.view-user-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .users-modal .btn-close-custom:hover,
    .view-user-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* ── ADD/EDIT MODAL BODY ── */
.users-modal .modal-body {
    padding: 18px 24px;
    background: #f9fafb;
}

.users-modal .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
    display: block;
}

.users-modal .input-group-text {
    background: #fff;
    border-color: #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.users-modal .form-control,
.users-modal .form-select {
    border-color: #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

    .users-modal .form-control:focus,
    .users-modal .form-select:focus {
        border-color: #0a63a3;
        box-shadow: 0 0 0 3px rgba(10, 99, 163, 0.1);
        border-left: none;
    }

.users-modal .input-group:focus-within .input-group-text {
    border-color: #0a63a3;
}

/* ── WARNING ── */
.users-modal .warning-bar {
    margin: 0 16px 10px;
    padding: 8px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── FOOTER ── */
.users-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.users-modal .btn-save {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10, 99, 163, 0.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

    .users-modal .btn-save:hover {
        box-shadow: 0 5px 16px rgba(10, 99, 163, 0.4);
        transform: translateY(-1px);
        color: #fff;
    }

.users-modal .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    transition: background 0.2s;
}

    .users-modal .btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }

/* ── VIEW USER MODAL ── */
.view-user-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-user-modal .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.view-user-modal .modal-body {
    padding: 24px;
    background: #f9fafb;
}

.view-user-modal .detail-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.view-user-modal .detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9ca3af;
    margin-bottom: 4px;
}

.view-user-modal .detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.view-user-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.view-user-modal .btn-edit {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10, 99, 163, 0.3);
}

.view-user-modal .btn-close-view {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
}

/* ── MOBILE ── */
@media (max-width: 767px) {
    .users-page {
        height: calc(100vh - 100px);
    }

    .users-pagination {
        flex-wrap: wrap;
    }
}

/* =============================================
   Roles & Permissions Page – Stylesheet
   ============================================= */

/* ── CARD LAYOUT ── */
.roles-page {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

    .roles-page .card-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 16px;
    }

/* ── HEADER ── */
.roles-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.roles-title {
    white-space: nowrap;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #086cac !important;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.roles-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── TABLE WRAPPER ── */
.roles-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    border: 1.5px solid #d0e6f5;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(8, 108, 172, 0.08);
    background: #fff;
}

.roles-table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(135deg, #086cac 0%, #0a93e0 100%) !important;
    color: #fff !important;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 13px 14px;
    border: none !important;
}

.roles-table-wrapper thead th:first-child { border-radius: 12px 0 0 0; }
.roles-table-wrapper thead th:last-child  { border-radius: 0 12px 0 0; }

.roles-table-wrapper tbody tr {
    border-bottom: 1px solid #eef3f8;
    transition: background 0.15s;
}

.roles-table-wrapper tbody tr:last-child { border-bottom: none; }
.roles-table-wrapper tbody tr:hover { background: #f0f8ff !important; }
.roles-table-wrapper tbody tr:nth-child(even) { background: #f8fbff; }

.roles-table-wrapper tbody td {
    font-size: 13px;
    padding: 11px 14px;
    white-space: nowrap;
    color: #1e3a52;
    vertical-align: middle;
    border: none;
}

.roles-table-wrapper tbody td.text-muted {
    padding: 40px;
    color: #9ca3af !important;
    font-size: 14px;
}

/* ── ACTION ICONS ── */
.roles-table-wrapper tbody td a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
    margin: 0 2px;
    color: #6b7280;
}

.roles-table-wrapper tbody td a:hover { background: #f0f8ff; transform: scale(1.1); }
.roles-table-wrapper tbody td a:has(.text-danger):hover        { background: #fff1f2; }
.roles-table-wrapper tbody td a:has(.fa-edit):hover            { background: #e0f2fe; }
.roles-table-wrapper tbody td a:has(.fa-pen-to-square):hover   { background: #e0f2fe; }

/* ── PAGINATION ── */
.roles-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 10px 4px 2px;
    margin-top: 6px;
    border-top: 1.5px solid #e8f1f8;
    gap: 8px;
}

/* ── MODAL ── */
.roles-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

.roles-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.roles-modal .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.roles-modal .header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}

.roles-modal .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.roles-modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.roles-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .roles-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* ── MODAL BODY ── */
.roles-modal .modal-body {
    padding: 20px 24px;
    background: #f9fafb;
}

.roles-modal .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
    display: block;
}

.roles-modal .input-group-text {
    background: #fff;
    border-color: #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.roles-modal .form-control {
    border-color: #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

    .roles-modal .form-control:focus {
        border-color: #0a63a3;
        box-shadow: 0 0 0 3px rgba(10, 99, 163, 0.1);
        border-left: none;
    }

.roles-modal .input-group:focus-within .input-group-text {
    border-color: #0a63a3;
}

/* ── PERMISSIONS SECTION ── */
.permissions-section-title {
    background: #e8f2fb;
    color: #0a63a3;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permissions-grid {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

    /* header row */
    .permissions-grid .perm-header {
        display: grid;
        grid-template-columns: minmax(160px, 1fr) 1fr 1fr 1fr;
        padding: 10px 16px;
        background: #f3f4f6;
        border-bottom: 1px solid #e5e7eb;
        font-size: 12px;
        font-weight: 700;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    /* data rows */
    .permissions-grid .perm-row {
        display: grid;
        grid-template-columns: minmax(160px, 1fr) 1fr 1fr 1fr;
        padding: 10px 16px;
        border-bottom: 1px solid #f3f4f6;
        align-items: center;
        transition: background 0.15s;
    }

        .permissions-grid .perm-row:last-child {
            border-bottom: none;
        }

        .permissions-grid .perm-row:hover {
            background: #f9fafb;
        }

/* checkbox cell */
.perm-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .perm-cell label {
        font-size: 13px;
        color: #374151;
        margin: 0;
        cursor: pointer;
    }

.perm-check {
    width: 18px;
    height: 18px;
    accent-color: #0a63a3;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── WARNING ── */
.roles-modal .warning-bar {
    margin: 0 16px 10px;
    padding: 8px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── FOOTER ── */
.roles-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.roles-modal .btn-save {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10, 99, 163, 0.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

    .roles-modal .btn-save:hover {
        box-shadow: 0 5px 16px rgba(10, 99, 163, 0.4);
        transform: translateY(-1px);
        color: #fff;
    }

.roles-modal .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    transition: background 0.2s;
}

    .roles-modal .btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }

/* ── MOBILE ── */
@media (max-width: 767px) {
    .roles-page {
        height: calc(100vh - 100px);
    }

    .roles-pagination {
        flex-wrap: wrap;
    }

    /* make permissions grid scroll horizontally on mobile */
    .permissions-grid .perm-header,
    .permissions-grid .perm-row {
        grid-template-columns: minmax(150px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr);
        min-width: 560px;
    }
}

/* ══ تحسينات المودال للموبايل لضمان التمرير الكامل ══ */

/* 1. ضبط الحاوية الرئيسية للمودال */
.roles-modal .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
    margin: 0.5rem auto;
}

@media (max-width: 576px) {
    .roles-modal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem auto;
        /* التأكد من أن المودال لا يتجاوز طول الشاشة */
        height: calc(100vh - 1rem);
    }

    .roles-modal .modal-content {
        max-height: 100%;
        display: flex;
        flex-direction: column;
        border-radius: 15px;
        overflow: hidden; /* لمنع المحتوى من الخروج عن الحدود المستديرة */
    }
    /* 2. جعل جسم المودال هو الجزء القابل للتمرير */
    .roles-modal .modal-body {
        flex: 1 1 auto;
        overflow-y: auto; /* تفعيل التمرير العمودي */
        padding: 15px;
        -webkit-overflow-scrolling: touch; /* تمرير ناعم على iOS */
    }
    /* 3. تثبيت الهيدر والفوتر */
    .roles-modal .modal-header {
        flex-shrink: 0;
        padding: 12px 15px;
    }

    .roles-modal .modal-footer {
        flex-shrink: 0;
        padding: 12px 15px;
        background: #f8f9fa;
        display: flex;
        gap: 10px;
    }

        .roles-modal .modal-footer button {
            flex: 1;
            margin: 0 !important;
            padding: 10px;
        }
    /* 4. تحسين عرض الصلاحيات في الموبايل */
    .permissions-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        border: 1px solid #eee;
        border-radius: 8px;
        overflow: hidden;
    }

    .perm-header {
        display: none !important; /* إخفاء الهيدر القديم */
    }

    .perm-row {
        display: flex !important;
        flex-direction: column !important;
        padding: 10px !important;
        border-bottom: 1px solid #eee;
        background: #fff;
    }

        .perm-row:last-child {
            border-bottom: none;
        }

    .perm-cell {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 8px 0 !important;
        width: 100% !important;
        text-align: left !important;
    }

        .perm-cell input[type="checkbox"] {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .perm-cell label {
            margin: 0;
            font-size: 0.95rem;
            cursor: pointer;
            flex: 1;
        }
    /* إضافة عنوان للمجموعة في الموبايل */
    .mobile-group-label {
        display: block;
        font-weight: bold;
        color: #086cac;
        font-size: 0.85rem;
        margin-bottom: 5px;
        text-transform: uppercase;
    }
}

/* تنسيقات عامة للـ checkboxes */
.perm-check {
    cursor: pointer;
}

/* =============================================
   Whitelist Page – Stylesheet
   ============================================= */

/* ── CARD LAYOUT ── */
.whitelist-page {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

    .whitelist-page .card-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 16px;
    }

/* ── HEADER ── */
.whitelist-header .dropdown-menu {
    margin-left: 5px;
}

.whitelist-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.whitelist-title {
    white-space: nowrap;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #086cac !important;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.whitelist-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── TABLE WRAPPER ── */
.whitelist-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    border: 1.5px solid #d0e6f5;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(8, 108, 172, 0.08);
    background: #fff;
}

/* ── TABLE HEAD ── */
/* Bootstrap 5 forces background via .table > :not(caption) > * > * — need !important to override */
.whitelist-table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(135deg, #086cac 0%, #0a93e0 100%) !important;
    color: #fff !important;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 13px 14px;
    border: none !important;
}

.whitelist-table-wrapper thead th:first-child {
    border-radius: 12px 0 0 0;
}

.whitelist-table-wrapper thead th:last-child {
    border-radius: 0 12px 0 0;
}

/* ── TABLE BODY ── */
.whitelist-table-wrapper tbody tr {
    border-bottom: 1px solid #eef3f8;
    transition: background 0.15s;
}

    .whitelist-table-wrapper tbody tr:last-child {
        border-bottom: none;
    }

    .whitelist-table-wrapper tbody tr:hover {
        background: #f0f8ff !important;
    }

    .whitelist-table-wrapper tbody td {
        font-size: 13px;
        padding: 11px 14px;
        white-space: nowrap;
        color: #1e3a52;
        vertical-align: middle;
        border: none;
    }

    /* Striped rows */
    .whitelist-table-wrapper tbody tr:nth-child(even) {
        background: #f8fbff;
    }

    /* Empty state */
    .whitelist-table-wrapper tbody td.text-muted {
        padding: 40px;
        color: #9ca3af !important;
        font-size: 14px;
    }

/* ── ACTION ICONS ── */
.whitelist-table-wrapper tbody td a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
    margin: 0 2px;
    color: #6b7280;
}

    .whitelist-table-wrapper tbody td a:hover {
        background: #f0f8ff;
        transform: scale(1.1);
    }

    .whitelist-table-wrapper tbody td a .text-danger {
        color: #ef4444 !important;
    }

    .whitelist-table-wrapper tbody td a:has(.text-danger):hover {
        background: #fff1f2;
    }

    .whitelist-table-wrapper tbody td a .fa-edit {
        color: #086cac;
    }

    .whitelist-table-wrapper tbody td a:has(.fa-edit):hover {
        background: #e0f2fe;
    }

/* ── PAGINATION ── */
.whitelist-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 10px 4px 2px;
    margin-top: 6px;
    border-top: 1.5px solid #e8f1f8;
    gap: 8px;
}

/* ── MODAL ── */
.whitelist-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
    width: 65%;
    margin: auto;
}

.whitelist-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.whitelist-modal .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.whitelist-modal .header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}

.whitelist-modal .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.whitelist-modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.whitelist-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .whitelist-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.whitelist-modal .modal-body {
    padding: 18px 24px;
    background: #f9fafb;
}

.whitelist-modal .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
    display: block;
}

.whitelist-modal .input-group-text {
    background: #fff;
    border-color: #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.whitelist-modal .form-control {
    border-color: #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

    .whitelist-modal .form-control:focus {
        border-color: #0a63a3;
        box-shadow: 0 0 0 3px rgba(10, 99, 163, 0.1);
        border-left: none;
    }

.whitelist-modal .input-group:focus-within .input-group-text {
    border-color: #0a63a3;
}

.whitelist-modal .form-control:disabled {
    background: #f3f4f6;
    color: #9ca3af;
}

.whitelist-modal .upload-label {
    cursor: pointer;
    display: block;
    width: 100%;
}

.whitelist-modal .upload-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px dashed #d1d5db;
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

    .whitelist-modal .upload-box:hover {
        border-color: #0a63a3;
        background: #f0f7ff;
    }

.whitelist-modal .upload-icon-box {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: #e8f2fb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a63a3;
    font-size: 16px;
}

.whitelist-modal .upload-text-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.whitelist-modal .upload-text-sub {
    font-size: 11px;
    color: #9ca3af;
}

.whitelist-modal .upload-badges {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.whitelist-modal .upload-badge {
    background: #e8f2fb;
    color: #0a63a3;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

.whitelist-modal .warning-bar {
    margin: 0 16px 10px;
    padding: 8px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whitelist-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.whitelist-modal .btn-save {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10,99,163,.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

    .whitelist-modal .btn-save:hover {
        box-shadow: 0 5px 16px rgba(10,99,163,.4);
        transform: translateY(-1px);
        color: #fff;
    }

.whitelist-modal .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    transition: background 0.2s;
}

    .whitelist-modal .btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }

/* ── MOBILE ── */
@media (max-width: 767px) {
    .whitelist-page {
        height: calc(100vh - 100px);
    }

    .whitelist-pagination {
        flex-wrap: wrap;
    }

    .whitelist-modal .modal-content {
        width: 95%;
    }
}

/* =============================================
   Blacklist Page – Stylesheet
   ============================================= */

/* ── CARD LAYOUT ── */
.blacklist-page {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

    .blacklist-page .card-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 16px;
    }

/* ── HEADER ── */
.blacklist-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.blacklist-title {
    white-space: nowrap;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #086cac !important;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.blacklist-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── TABLE WRAPPER ── */
.blacklist-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    border: 1.5px solid #d0e6f5;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(8, 108, 172, 0.08);
    background: #fff;
}

/* ── TABLE HEAD ── */
.blacklist-table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(135deg, #086cac 0%, #0a93e0 100%) !important;
    color: #fff !important;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 13px 14px;
    border: none !important;
}

.blacklist-table-wrapper thead th:first-child {
    border-radius: 12px 0 0 0;
}

.blacklist-table-wrapper thead th:last-child {
    border-radius: 0 12px 0 0;
}

/* ── TABLE BODY ── */
.blacklist-table-wrapper tbody tr {
    border-bottom: 1px solid #eef3f8;
    transition: background 0.15s;
}

    .blacklist-table-wrapper tbody tr:last-child {
        border-bottom: none;
    }

    .blacklist-table-wrapper tbody tr:hover {
        background: #f0f8ff !important;
    }

    .blacklist-table-wrapper tbody td {
        font-size: 13px;
        padding: 11px 14px;
        white-space: nowrap;
        color: #1e3a52;
        vertical-align: middle;
        border: none;
    }

    /* Striped rows */
    .blacklist-table-wrapper tbody tr:nth-child(even) {
        background: #f8fbff;
    }

    /* Empty state */
    .blacklist-table-wrapper tbody td.text-muted {
        padding: 40px;
        color: #9ca3af !important;
        font-size: 14px;
    }

/* ── ACTION ICONS ── */
.blacklist-table-wrapper tbody td a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
    margin: 0 2px;
    color: #6b7280;
}

    .blacklist-table-wrapper tbody td a:hover {
        background: #f0f8ff;
        transform: scale(1.1);
    }

    .blacklist-table-wrapper tbody td a .text-danger {
        color: #ef4444 !important;
    }

    .blacklist-table-wrapper tbody td a:has(.text-danger):hover {
        background: #fff1f2;
    }

    .blacklist-table-wrapper tbody td a .fa-edit {
        color: #086cac;
    }

    .blacklist-table-wrapper tbody td a:has(.fa-edit):hover {
        background: #e0f2fe;
    }

/* ── PAGINATION ── */
.blacklist-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 10px 4px 2px;
    margin-top: 6px;
    border-top: 1.5px solid #e8f1f8;
    gap: 8px;
}

/* ── MODAL ── */
.blacklist-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

.blacklist-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blacklist-modal .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blacklist-modal .header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}

.blacklist-modal .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.blacklist-modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.blacklist-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .blacklist-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.blacklist-modal .modal-body {
    padding: 18px 24px;
    background: #f9fafb;
}

.blacklist-modal .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
    display: block;
}

.blacklist-modal .input-group-text {
    background: #fff;
    border-color: #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.blacklist-modal .form-control {
    border-color: #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

    .blacklist-modal .form-control:focus {
        border-color: #0a63a3;
        box-shadow: 0 0 0 3px rgba(10, 99, 163, 0.1);
        border-left: none;
    }

.blacklist-modal .input-group:focus-within .input-group-text {
    border-color: #0a63a3;
}

.blacklist-modal .upload-label {
    cursor: pointer;
    display: block;
    width: 100%;
}

.blacklist-modal .upload-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px dashed #d1d5db;
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

    .blacklist-modal .upload-box:hover {
        border-color: #0a63a3;
        background: #f0f7ff;
    }

.blacklist-modal .upload-icon-box {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: #e8f2fb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a63a3;
    font-size: 16px;
}

.blacklist-modal .upload-text-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.blacklist-modal .upload-text-sub {
    font-size: 11px;
    color: #9ca3af;
}

.blacklist-modal .upload-badges {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.blacklist-modal .upload-badge {
    background: #e8f2fb;
    color: #0a63a3;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

.blacklist-modal .warning-bar {
    margin: 0 16px 10px;
    padding: 8px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blacklist-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.blacklist-modal .btn-save {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10,99,163,.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

    .blacklist-modal .btn-save:hover {
        box-shadow: 0 5px 16px rgba(10,99,163,.4);
        transform: translateY(-1px);
        color: #fff;
    }

.blacklist-modal .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    transition: background 0.2s;
}

    .blacklist-modal .btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }

/* ── MOBILE ── */
@media (max-width: 767px) {
    .blacklist-page {
        height: calc(100vh - 100px);
    }

    .blacklist-pagination {
        flex-wrap: wrap;
    }
}

/* =============================================
   Search Page – Stylesheet
   ============================================= */

/* ── CARD LAYOUT ── */
.search-page {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

    .search-page .card-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 16px;
    }

/* ── HEADER ── */
.search-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.search-title {
    white-space: nowrap;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #086cac !important;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── FILTER BAR ── */
.search-filter-bar {
    flex-shrink: 0;
    padding: 10px 0;
    margin-bottom: 8px;
}

/* ── TABLE WRAPPER ── */
.search-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    border: 1.5px solid #d0e6f5;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(8, 108, 172, 0.08);
    background: #fff;
}

.search-table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(135deg, #086cac 0%, #0a93e0 100%) !important;
    color: #fff !important;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 13px 14px;
    border: none !important;
}

.search-table-wrapper thead th:first-child { border-radius: 12px 0 0 0; }
.search-table-wrapper thead th:last-child  { border-radius: 0 12px 0 0; }

.search-table-wrapper tbody tr {
    border-bottom: 1px solid #eef3f8;
    transition: background 0.15s;
}

.search-table-wrapper tbody tr:last-child { border-bottom: none; }
.search-table-wrapper tbody tr:hover { background: #f0f8ff !important; }
.search-table-wrapper tbody tr:nth-child(even) { background: #f8fbff; }

.search-table-wrapper tbody td {
    font-size: 13px;
    padding: 11px 14px;
    white-space: nowrap;
    color: #1e3a52;
    vertical-align: middle;
    border: none;
}

.search-table-wrapper tbody td.text-muted {
    padding: 40px;
    color: #9ca3af !important;
    font-size: 14px;
}

/* ── ACTION ICONS ── */
.search-table-wrapper tbody td i[role="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
    margin: 0 2px;
}

.search-table-wrapper tbody td i[role="button"]:hover {
    background: #e0f2fe;
    transform: scale(1.1);
}

/* ── PAGINATION ── */
.search-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid #e5e7eb;
    gap: 8px;
}

/* ── VIEW MODAL ── */
.view-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

.view-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-modal .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.view-modal .header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}

.view-modal .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.view-modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.view-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .view-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.view-modal .modal-body {
    padding: 20px 24px;
    background: #f9fafb;
}

/* section card inside modal */
.view-modal .section-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 16px;
}

.view-modal .section-card-header {
    background: #f3f4f6;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.view-modal .section-card-body {
    padding: 16px;
}

.view-modal .detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9ca3af;
    margin-bottom: 3px;
}

.view-modal .detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

/* ── ZOOM MODAL ── */
.zoom-modal .modal-content {
    background: transparent;
    border: none;
}

/* ── MOBILE ── */
@media (max-width: 767px) {
    .search-page {
        height: calc(100vh - 100px);
    }

    .search-pagination {
        flex-wrap: wrap;
    }
}

/* =============================================
   Header Search Input – Stylesheet
   ============================================= */

.smart-search-wrapper {
    position: relative;
    min-width: 320px;
    max-width: 480px;
    width: 100%;
}

.smart-search-field {
    position: relative;
}

/* ── INPUT GROUP ── */
.header-search-group {
    border-radius: 24px;
    overflow: hidden;
    border: 1.5px solid #b6d0ea;
    box-shadow: 0 2px 10px rgba(8, 108, 172, 0.12), 0 1px 3px rgba(0,0,0,0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f0f8ff;
}

/* Icon cell — solid brand-blue badge on the left */
.header-search-icon {
    background: #086cac;
    border: none;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    border-radius: 24px 0 0 24px !important;
    transition: background 0.2s;
    padding: 0 13px;
    min-height: 34px;
}

    .header-search-icon:hover {
        background: #0a7ec2;
    }

/* Input field */
.header-search-input {
    border: none;
    border-left: none;
    border-right: none;
    font-size: 13px;
    font-weight: 500;
    color: #1e3a52;
    background: #f0f8ff;
    border-radius: 0 !important;
    padding: 7px 12px;
    box-shadow: none !important;
}

    .header-search-input::placeholder {
        color: #6b9abf;
        font-size: 13px;
        font-weight: 400;
    }

    .header-search-input:focus {
        background: #fff;
        box-shadow: none !important;
        outline: none;
    }

/* Glow the whole group on focus */
.header-search-group:focus-within {
    border-color: #086cac;
    box-shadow: 0 0 0 3.5px rgba(8, 108, 172, 0.18), 0 2px 10px rgba(8, 108, 172, 0.1);
    background: #fff;
}

.header-search-group:focus-within .header-search-input {
    background: #fff;
}

.header-search-group:focus-within .header-search-chevron {
    background: #fff;
    border-color: transparent;
}

/* Chevron (advanced search toggle) */
.header-search-chevron {
    background: #f0f8ff;
    border: none;
    border-left: 1px solid #cce0f0;
    color: #086cac;
    font-size: 11px;
    cursor: pointer;
    border-radius: 0 24px 24px 0 !important;
    padding: 0 13px;
    transition: color 0.15s, background 0.15s;
    min-height: 34px;
}

    .header-search-chevron:hover {
        background: #dbeeff;
        color: #054f80;
    }

/* ── DROPDOWN ── */
.smart-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 4px 0;
    min-width: 200px;
}

    .smart-search-dropdown .dropdown-item {
        font-size: 13px;
        padding: 8px 16px;
        color: #374151;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: background 0.15s;
    }

        .smart-search-dropdown .dropdown-item:hover {
            background: #f0f7ff;
            color: #0a63a3;
        }

/* =============================================
   Advanced Search Modal – Stylesheet
   ============================================= */

.advanced-search-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

/* ── HEADER ── */
.advanced-search-modal .modal-header {
    background: linear-gradient(135deg, #0a63a3 0%, #1a80c8 100%);
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.advanced-search-modal .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.advanced-search-modal .header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}

.advanced-search-modal .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.advanced-search-modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.advanced-search-modal .btn-close-custom {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}

    .advanced-search-modal .btn-close-custom:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* ── BODY ── */
.advanced-search-modal .modal-body {
    padding: 18px 24px;
    background: #f9fafb;
}

.advanced-search-modal .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
    display: block;
}

.advanced-search-modal .input-group-text {
    background: #fff;
    border-color: #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.advanced-search-modal .form-control,
.advanced-search-modal .form-select {
    border-color: #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

    .advanced-search-modal .form-control:focus,
    .advanced-search-modal .form-select:focus {
        border-color: #0a63a3;
        box-shadow: 0 0 0 3px rgba(10, 99, 163, 0.1);
        border-left: none;
    }

.advanced-search-modal .input-group:focus-within .input-group-text {
    border-color: #0a63a3;
}

/* ── WARNING ── */
.advanced-search-modal .warning-bar {
    padding: 8px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── FOOTER ── */
.advanced-search-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.advanced-search-modal .btn-save {
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    box-shadow: 0 3px 10px rgba(10, 99, 163, 0.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

    .advanced-search-modal .btn-save:hover {
        box-shadow: 0 5px 16px rgba(10, 99, 163, 0.4);
        transform: translateY(-1px);
        color: #fff;
    }

.advanced-search-modal .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 24px;
    transition: background 0.2s;
}

    .advanced-search-modal .btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }

/* ===== Advanced Search: quick-date chips + active-filter summary ===== */
.advanced-search-modal .as-quick-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.advanced-search-modal .as-quick-dates-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-inline-end: 2px;
}

.advanced-search-modal .as-quick-chip {
    border: 1px solid #cfe0ee;
    background: #f1f7fc;
    color: #0a63a3;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    padding: 6px 11px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

    .advanced-search-modal .as-quick-chip:hover {
        background: #e2eef9;
        border-color: #0a63a3;
    }

    .advanced-search-modal .as-quick-chip.active {
        background: #0a63a3;
        border-color: #0a63a3;
        color: #fff;
        box-shadow: 0 2px 6px rgba(10,99,163,0.25);
    }

.advanced-search-modal .as-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 10px 12px;
    background: #eef5fb;
    border: 1px solid #d8e7f3;
    border-radius: 10px;
}

.advanced-search-modal .as-summary-title {
    font-size: 11px;
    font-weight: 700;
    color: #0a63a3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.advanced-search-modal .as-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.advanced-search-modal .as-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #d8e7f3;
    color: #1f2937;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

    .advanced-search-modal .as-summary-pill i {
        color: #0a63a3;
        font-size: 11px;
    }

    .advanced-search-modal .as-summary-sep {
        color: #9ca3af !important;
    }

/* Labeled "Advanced Search" entry button in the header search bar */
.header-search-chevron {
    white-space: nowrap;
    font-weight: 600;
    gap: 5px;
}

.attachment-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    transition: all 0.2s;
}

    .attachment-card:hover {
        border-color: #0a63a3;
        box-shadow: 0 4px 12px rgba(10,99,163,0.12);
    }

.attachment-preview {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border-bottom: 1px solid #e5e7eb;
    overflow: hidden;
    cursor: pointer;
}

    .attachment-preview img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .attachment-preview .file-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        color: #6b7280;
    }

        .attachment-preview .file-icon i {
            font-size: 48px;
            color: #0a63a3;
        }

        .attachment-preview .file-icon span {
            font-size: 11px;
            font-weight: 600;
            color: #6b7280;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

.attachment-footer {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fff;
}

.attachment-filename {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.attachment-download-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #0a63a3, #1a80c8);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}

    .attachment-download-btn:hover {
        color: #fff;
        box-shadow: 0 3px 8px rgba(10,99,163,0.3);
        transform: translateY(-1px);
    }

/* ─── Meeting Rooms ─────────────────────────────────────────────────────── */
.mr-page .mr-grid-wrapper {
    overflow-x: auto;
    margin-top: 8px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
}

.mr-page .mr-grid {
    display: grid;
    min-width: 900px;
    background: #fff;
}

.mr-page .mr-cell {
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 6px 4px;
    font-size: 12px;
    min-height: 38px;
    box-sizing: border-box;
}

.mr-page .mr-time-head,
.mr-page .mr-day-head {
    background: #f8f9fa;
    text-align: center;
    font-weight: 600;
    color: #495057;
    padding: 8px 4px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.mr-page .mr-day-head.mr-today {
    background: #e6f0f7;
    color: #086cac;
}

.mr-page .mr-time-label {
    background: #fafbfc;
    text-align: center;
    color: #6c757d;
    font-weight: 500;
    border-right: 2px solid #e1e4e8;
    padding-top: 8px;
}

.mr-page .mr-slot {
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
}

.mr-page .mr-slot:hover {
    filter: brightness(0.95);
}

.mr-page .mr-free    { background: #d4edda; }
.mr-page .mr-mine    { background: #cfe2ff; color: #084298; }
.mr-page .mr-others  { background: #f8d7da; color: #842029; cursor: not-allowed; }
.mr-page .mr-pending { background: #fff3cd; color: #664d03; }
.mr-page .mr-closed  { background: #e9ecef; color: #aaa; cursor: not-allowed; }

.mr-page .mr-slot-title {
    font-weight: 600;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mr-page .mr-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 4px;
    border: 1px solid rgba(0,0,0,0.08);
    vertical-align: middle;
}

/* ─── Booking details modal ─────────────────────────────────────── */
.mr-detail {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Hero strip at the top */
.mr-detail-hero {
    background: linear-gradient(135deg, #086cac 0%, #0a8bc9 100%);
    color: #fff;
    padding: 20px 24px;
    border-radius: 12px;
    margin: -8px -8px 4px;
    position: relative;
    overflow: hidden;
}

.mr-detail-hero::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.mr-detail-status {
    margin-bottom: 8px;
}

    .mr-detail-status .badge {
        font-size: 11px;
        padding: 5px 10px;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

.mr-detail-title {
    color: #fff;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-size: 20px;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.mr-detail-when {
    color: rgba(255, 255, 255, 0.92);
    font-size: 13.5px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Info cards (Organizer + Room) */
.mr-info-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #fafbfc;
    border: 1px solid #eef0f3;
    border-radius: 10px;
    height: 100%;
}

.mr-info-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 16px;
}

.mr-info-body {
    min-width: 0;
    flex: 1;
}

.mr-info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 2px;
}

.mr-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    word-break: break-word;
}

.mr-info-sub {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
    word-break: break-all;
}

/* Section blocks (Agenda, Attendees) */
.mr-detail-section {
    background: #fafbfc;
    border: 1px solid #eef0f3;
    border-radius: 10px;
    padding: 14px;
}

.mr-detail-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #086cac;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.mr-attendee-count {
    margin-left: auto;
    background: #e6f0f7;
    color: #086cac;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.mr-detail-agenda {
    color: #495057;
    font-size: 13.5px;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Attendee cards */
.mr-attendee-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.mr-attendee-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .mr-attendee-card:hover {
        border-color: #086cac;
        box-shadow: 0 2px 8px rgba(8, 108, 172, 0.08);
    }

.mr-attendee-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #086cac, #0a8bc9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.mr-attendee-info {
    min-width: 0;
    flex: 1;
}

.mr-attendee-name {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mr-attendee-email {
    font-size: 11.5px;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mr-attendee-checkin {
    color: #198754;
    font-size: 16px;
    flex-shrink: 0;
}

/* ─── Blacklist alert banner (Visitor Registration) ─────────────── */
.vr-blacklist-banner {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin: 14px 0 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border-radius: 12px;
    border: 2px solid #7f1d1d;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    direction: rtl;
    text-align: right;
    animation: vr-blacklist-slide 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

    .vr-blacklist-banner::before {
        content: "";
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient(
            45deg,
            transparent,
            transparent 12px,
            rgba(255, 255, 255, 0.04) 12px,
            rgba(255, 255, 255, 0.04) 24px
        );
        pointer-events: none;
    }

.vr-blacklist-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    animation: vr-blacklist-pulse 1.4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.vr-blacklist-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.vr-blacklist-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.vr-blacklist-msg {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
}

    .vr-blacklist-msg b {
        font-weight: 700;
        background: rgba(255, 255, 255, 0.2);
        padding: 1px 7px;
        border-radius: 4px;
    }

.vr-blacklist-reason {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.18);
    border-right: 3px solid rgba(255, 255, 255, 0.55);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #fff;
    word-break: break-word;
}

.vr-blacklist-reason-label {
    font-weight: 700;
    margin-left: 6px;
    opacity: 0.95;
}

    .vr-blacklist-reason-label i {
        margin-left: 3px;
        font-size: 13px;
    }

.vr-blacklist-reason-text {
    font-weight: 500;
}

@keyframes vr-blacklist-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

@keyframes vr-blacklist-slide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Whitelist alert banner — info / positive ────────────────── */
.vr-whitelist-banner {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin: 14px 0 10px;
    padding: 14px 16px;
    color: #fff;
    border-radius: 12px;
    direction: rtl;
    text-align: right;
    animation: vr-blacklist-slide 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

/* Active permit — green */
.vr-whitelist-banner.vr-whitelist-active {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: 2px solid #14532d;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.30);
}

/* Expired permit — amber */
.vr-whitelist-banner.vr-whitelist-expired {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border: 2px solid #78350f;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.30);
}

/* Not yet active — slate-blue */
.vr-whitelist-banner.vr-whitelist-future {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    border: 2px solid #1e293b;
    box-shadow: 0 4px 14px rgba(71, 85, 105, 0.30);
}

.vr-whitelist-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.vr-whitelist-banner.vr-whitelist-active .vr-whitelist-icon {
    animation: vr-whitelist-glow 1.8s ease-in-out infinite;
}

.vr-whitelist-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.vr-whitelist-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.vr-whitelist-msg {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
}

    .vr-whitelist-msg b {
        font-weight: 700;
        background: rgba(255, 255, 255, 0.2);
        padding: 1px 7px;
        border-radius: 4px;
    }

.vr-whitelist-meta {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.35);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.95);
}

    .vr-whitelist-meta span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .vr-whitelist-meta small {
        opacity: 0.85;
    }

    .vr-whitelist-meta b {
        font-weight: 700;
    }

    .vr-whitelist-meta i {
        font-size: 13px;
        opacity: 0.9;
    }

@keyframes vr-whitelist-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
    }
    50% {
        box-shadow: 0 0 0 9px rgba(255, 255, 255, 0);
    }
}

/* ─── Appointment banner — today's scheduled visit ───────────── */
.vr-appt-banner {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin: 14px 0 10px;
    padding: 14px 16px;
    color: #fff;
    border-radius: 12px;
    direction: rtl;
    text-align: right;
    animation: vr-blacklist-slide 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

/* Approved appointment — cyan/teal */
.vr-appt-banner.vr-appt-approved {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    border: 2px solid #155e75;
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.30);
}

/* Pending appointment — indigo */
.vr-appt-banner.vr-appt-pending {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: 2px solid #3730a3;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.30);
}

/* Rejected appointment — neutral grey */
.vr-appt-banner.vr-appt-rejected {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border: 2px solid #374151;
    box-shadow: 0 4px 14px rgba(107, 114, 128, 0.30);
}

.vr-appt-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.vr-appt-banner.vr-appt-approved .vr-appt-icon {
    animation: vr-whitelist-glow 1.8s ease-in-out infinite;
}

.vr-appt-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.vr-appt-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.vr-appt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.35);
}

    .vr-appt-meta span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .vr-appt-meta small {
        opacity: 0.85;
    }

    .vr-appt-meta b {
        font-weight: 700;
    }

    .vr-appt-meta i {
        font-size: 13px;
        opacity: 0.9;
    }

.vr-appt-notes {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.18);
    border-right: 3px solid rgba(255, 255, 255, 0.55);
    border-radius: 6px;
    font-size: 12.5px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    word-break: break-word;
}

    .vr-appt-notes i {
        margin-top: 2px;
        opacity: 0.85;
        flex-shrink: 0;
    }

/* ─── Navbar "مواعيد اليوم" button + badge ─────────────────────── */
.vr-today-appts-btn {
    position: relative;
}

.vr-today-appts-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #dc2626;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    animation: vr-today-pop 0.4s ease-out;
}

@keyframes vr-today-pop {
    0%   { transform: scale(0.5); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1);    opacity: 1; }
}

/* ─── مواعيد اليوم — Today's Appointments modal ─────────────── */
.vr-today-modal .modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.vr-today-modal-header {
    background: linear-gradient(135deg, #086cac 0%, #0a8bc9 100%);
    color: #fff;
    padding: 16px 20px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .vr-today-modal-header .modal-title {
        color: #fff;
        font-weight: 800;
        font-size: 18px;
    }

    .vr-today-modal-header .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
        opacity: 0.85;
    }

.vr-today-modal-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

.vr-today-modal-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

.vr-today-modal-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    margin-right: 6px;
}

.vr-today-modal .modal-body {
    padding: 16px 18px;
    max-height: 65vh;
    overflow-y: auto;
}

/* Empty state */
.vr-today-empty {
    text-align: center;
    padding: 36px 12px;
    color: #475569;
}

    .vr-today-empty i {
        font-size: 48px;
        color: #cbd5e1;
    }

/* Modal sizing for desktops (use the available width without overflowing). */
@media (min-width: 992px) {
    .vr-today-modal .modal-xl {
        max-width: min(1180px, 95vw);
    }
}

@media (min-width: 1600px) {
    .vr-today-modal .modal-xl {
        max-width: 1320px;
    }
}

/* Wrapper — give the table room to breathe and avoid horizontal scroll on
   normal desktop widths, but still allow it on very narrow windows. */
.vr-today-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow-x: auto;
}

/* Table */
.vr-today-table {
    direction: rtl;
    text-align: right;
    table-layout: fixed;
    width: 100%;
    margin-bottom: 0;
}

    .vr-today-table thead th {
        background: #f8fafc;
        color: #475569;
        font-weight: 700;
        font-size: 12.5px;
        border-bottom: 2px solid #e2e8f0;
        padding: 10px 12px;
        text-align: right;
        white-space: nowrap;
    }

    .vr-today-table tbody td {
        padding: 12px;
        font-size: 13px;
        vertical-align: middle;
        border-bottom: 1px solid #f1f5f9;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .vr-today-table tbody tr:hover td {
        background: #f8fbff;
    }

/* Column widths — distribute the available width so essentials stay readable. */
.vr-today-table .vr-today-col-num     { width: 44px;  text-align: center; }
.vr-today-table .vr-today-col-time    { width: 90px;  white-space: nowrap; }
.vr-today-table .vr-today-col-status  { width: 120px; white-space: nowrap; }
.vr-today-table .vr-today-col-name    { width: 18%; }
.vr-today-table .vr-today-col-loc     { width: 22%; }
.vr-today-table .vr-today-col-purpose { width: 22%; }
.vr-today-table .vr-today-col-host    { width: 14%; }

/* On smaller windows, drop secondary columns instead of scrolling sideways. */
@media (max-width: 1199.98px) {
    .vr-today-table .vr-today-col-host { display: none; }
    .vr-today-table .vr-today-col-name    { width: 22%; }
    .vr-today-table .vr-today-col-loc     { width: 28%; }
    .vr-today-table .vr-today-col-purpose { width: 26%; }
}

@media (max-width: 991.98px) {
    .vr-today-table .vr-today-col-purpose { display: none; }
    .vr-today-table .vr-today-col-name    { width: 32%; }
    .vr-today-table .vr-today-col-loc     { width: 36%; }
}

.vr-today-mono {
    font-family: 'Courier New', monospace;
    font-size: 12.5px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #334155;
}

.vr-today-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: #0e7490;
    background: #ecfeff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12.5px;
}

    .vr-today-time i {
        font-size: 12px;
        opacity: 0.85;
    }

/* Status pills */
.vr-today-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

.vr-today-status-approved {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.vr-today-status-rejected {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.vr-today-status-pending {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.vr-today-status-other {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.vr-today-modal .modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 18px;
    background: #fafbfc;
}

/* Modal-level: prevent any horizontal leak */
#bookingModal .modal-body {
    overflow-x: hidden;
    padding: 16px;
}

#bookingModal .modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

#bookingModal .modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 18px;
}

#bookingModal .modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 18px;
}