    /* HHOcare Styles v6 - Clients Module Added */
    @import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700&display=swap');

    :root {
        /* Surfaces */
        --bg: #F8FAFC;
        --bg2: #FFFFFF;
        --card: #FFFFFF;
        --sidebar-bg: #FFFFFF;
        --topbar-bg: rgba(255,255,255,0.85);
        --input-bg: #F1F5F9;
        /* Separators & fills */
        --sep: rgba(15, 23, 42, 0.07);
        --border: rgba(15, 23, 42, 0.07);
        --fill: rgba(2, 110, 199, 0.05);
        --fill2: rgba(2, 110, 199, 0.10);
        /* Text */
        --label: #0F172A;
        --label2: #64748B;
        --label3: #94A3B8;
        --label4: rgba(148, 163, 184, 0.35);
        /* Brand — Arctic Cross primary */
        --blue: #0284C7;
        --brand: #0284C7;
        --blue-dark: #0369A1;
        --blue-light: #F0F9FF;
        --green: #22C55E;
        --orange: #F97316;
        --red: #EF4444;
        --indigo: #0284C7;
        --teal: #0D9488;
        --amber: #F59E0B;
        --purple: #8B5CF6;
        /* Layout */
        --sidebar-w: 244px;
        --topbar-h: 68px;
        --r: 14px;
        --r-lg: 22px;
        --r-xl: 28px;
        /* Premium shadow system */
        --sh-sm: 0 0 0 1px rgba(0,0,0,.03), 0 1px 3px rgba(0,0,0,.04), 0 8px 20px rgba(0,0,0,.04);
        --sh-md: 0 0 0 1px rgba(0,0,0,.03), 0 4px 8px rgba(0,0,0,.06), 0 16px 32px rgba(0,0,0,.07);
        --sh-lg: 0 0 0 1px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.10), 0 32px 64px rgba(0,0,0,.12);
    }

    *,
    *::before,
    *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0
    }

    html {
        -webkit-font-smoothing: antialiased
    }

    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        background: var(--bg);
        color: var(--label);
        display: flex;
        min-height: 100vh;
        overflow-x: hidden
    }

    ::-webkit-scrollbar {
        width: 4px;
        height: 4px
    }

    ::-webkit-scrollbar-thumb {
        background: var(--label4);
        border-radius: 2px
    }

    /* SIDEBAR */
    :root {
        --sidebar-w-collapsed: 68px;
    }

    .sidebar {
        width: var(--sidebar-w);
        background: var(--sidebar-bg);
        border-right: 1px solid var(--sep);
        box-shadow: 1px 0 0 var(--sep), 4px 0 24px rgba(0,0,0,.04);
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        overflow: hidden;
        transition: transform .3s cubic-bezier(.4, 0, .2, 1), width .28s cubic-bezier(.4, 0, .2, 1);
    }

    .sidebar-nav {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
    }
    .sidebar-nav::-webkit-scrollbar { width: 4px }
    .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,.1); border-radius: 4px }

    /* ── Sidebar Logo ── */
    .sidebar-logo {
        height: 68px;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 14px 0 16px;
        border-bottom: 1px solid var(--sep);
        flex-shrink: 0;
        overflow: visible;
    }

    .sidebar-logo-icon {
        width: 40px;
        height: 40px;
        background: none;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        overflow: visible;
    }

    .sidebar-logo-text {
        font-size: 18px;
        font-weight: 900;
        color: var(--label);
        letter-spacing: -0.5px;
        white-space: nowrap;
        flex: 1;
        overflow: hidden;
    }

    .sidebar-logo-accent {
        color: var(--blue);
    }

    .sidebar-logo .sidebar-collapse-btn {
        margin-left: auto;
        flex-shrink: 0;
    }

    /* Sidebar brand (logo + app name) */
    .sidebar-brand {
        padding: 14px 16px;
        border-bottom: 1px solid var(--sep);
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0
    }

    .brand-icon {
        width: 34px;
        height: 34px;
        background: var(--blue);
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 16px;
        flex-shrink: 0
    }

    .brand-text { flex: 1; min-width: 0 }

    .brand-name {
        font-size: 15px;
        font-weight: 700;
        color: var(--label);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2
    }

    .brand-tagline {
        font-size: 10px;
        font-weight: 500;
        color: var(--label3);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    /* SA company banner */
    .sa-company-banner {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        background: rgba(37,99,235,.08);
        border-bottom: 1px solid var(--sep);
        font-size: 12px;
        font-weight: 600;
        color: var(--blue);
        flex-shrink: 0
    }

    .sa-company-banner button {
        margin-left: auto;
        background: none;
        border: none;
        color: var(--label3);
        cursor: pointer;
        font-size: 14px;
        padding: 2px 4px;
        border-radius: 4px
    }

    .sa-company-banner button:hover { color: var(--red) }

    /* (dead SA toggle CSS removed) */

    .sidebar-company-name {
        padding: 10px 16px 4px;
        font-size: 11px;
        font-weight: 700;
        color: var(--blue);
        text-transform: uppercase;
        letter-spacing: .5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .nav-section-label {
        padding: 10px 16px 4px;
        font-size: 10px;
        font-weight: 700;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .5px
    }

    /* HIPAA badge in sidebar */
    .hipaa-badge {
        margin: auto 12px 10px;
        padding: 6px 10px;
        border-radius: 8px;
        background: rgba(27,58,107,.07);
        color: var(--blue);
        font-size: 11px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 6px
    }

    .sidebar-header {
        padding: 10px 12px;
        margin: 0 8px 8px;
        border-radius: var(--r);
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
        cursor: pointer;
        transition: background .15s, box-shadow .15s;
        background: var(--card);
        border: 1px solid var(--sep);
        box-shadow: var(--sh-sm);
    }

    .sidebar-header:hover {
        background: var(--bg);
        box-shadow: var(--sh-md);
    }

    /* User menu dropdown */
    .user-menu {
        display: none;
        position: fixed;
        bottom: 80px;
        left: 18px;
        width: calc(var(--sidebar-w) - 36px);
        background: var(--card);
        border: 1px solid var(--sep);
        border-radius: 14px;
        box-shadow: 0 -8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
        z-index: 300;
        overflow: hidden;
        animation: slideUpMenu .15s ease;
    }
    .user-menu.open { display: block; }
    @keyframes slideUpMenu { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
    .user-menu-info {
        padding: 14px 14px 10px;
    }
    .user-menu-name {
        font-size: 13px;
        font-weight: 700;
        color: var(--label);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .user-menu-email {
        font-size: 11px;
        color: var(--label3);
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 2px;
    }
    .user-menu-divider {
        height: 1px;
        background: var(--sep);
        margin: 4px 0;
    }
    .user-menu-item {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 14px;
        background: none;
        border: none;
        font-size: 13px;
        font-weight: 600;
        color: var(--label2);
        cursor: pointer;
        text-align: left;
        font-family: inherit;
        transition: background .12s, color .12s;
    }
    .user-menu-item i { width: 14px; font-size: 12px; color: var(--label3); }
    .user-menu-item:hover { background: var(--fill); color: var(--label); }
    .user-menu-item:hover i { color: var(--blue); }
    .user-menu-signout { color: var(--label2) !important; margin-bottom: 4px; }
    .user-menu-signout i { color: var(--label3) !important; }
    .user-menu-signout:hover { background: var(--fill) !important; color: var(--label) !important; }
    .sidebar-header { position: relative; }

    .sidebar-header-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 1px
    }

    .sidebar-header-appname {
        font-size: 10px;
        font-weight: 700;
        color: var(--label3);
        letter-spacing: .5px;
        text-transform: uppercase;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block
    }

    .sidebar-header-username {
        font-size: 13px;
        font-weight: 700;
        color: var(--label);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        line-height: 1.3
    }

    .sidebar-header-email {
        font-size: 11px;
        font-weight: 500;
        color: var(--label3);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: none
    }

    .sidebar-collapse-btn {
        width: 26px;
        height: 26px;
        background: none;
        border: none;
        border-radius: 7px;
        color: var(--label3);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        flex-shrink: 0;
        transition: all .15s
    }

    .sidebar-collapse-btn:hover {
        background: var(--fill2);
        color: var(--blue)
    }

    /* Sidebar footer actions */
    .sidebar-footer-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
        gap: 8px
    }

    .sidebar-icon-btn {
        width: 28px;
        height: 28px;
        background: none;
        border: none;
        border-radius: 8px;
        color: var(--label3);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        transition: all .15s;
        flex-shrink: 0
    }

    .sidebar-icon-btn:hover {
        background: var(--fill);
        color: var(--blue)
    }

    /* View toggle (list/card) */
    .view-toggle {
        display: flex;
        background: var(--fill);
        border-radius: 8px;
        padding: 2px;
        gap: 2px
    }

    .view-toggle-btn {
        background: none;
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 6px;
        color: var(--label3);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-family: inherit;
        white-space: nowrap;
        transition: all .15s
    }

    .view-toggle-btn.active {
        background: var(--bg2, #fff);
        color: var(--brand, #0284C7);
        box-shadow: 0 1px 4px rgba(0, 0, 0, .08)
    }

    .view-toggle-btn:hover:not(.active) {
        color: var(--label)
    }

    /* Text variant for matrix view toggle (By Caregiver / By Requirement) */
    .view-toggle-text .view-toggle-btn {
        width: auto;
        padding: 0 14px;
        height: 32px;
        font-size: 12px;
        font-weight: 600;
    }

    .nav-section {
        padding: 4px 8px
    }

    .nav-label {
        font-size: 10px;
        font-weight: 900;
        color: var(--label3);
        letter-spacing: .2em;
        text-transform: uppercase;
        padding: 0 22px;
        display: block;
        margin: 20px 0 6px;
        white-space: nowrap;
        overflow: hidden
    }

    .nav-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        border-radius: 12px;
        color: var(--label3);
        cursor: pointer;
        transition: background .15s, color .15s;
        text-decoration: none;
        font-size: 13.5px;
        font-weight: 500;
        letter-spacing: -0.1px;
        margin: 0 8px 2px;
        position: relative;
        white-space: nowrap
    }

    .nav-item:hover {
        background: var(--bg);
        color: var(--label)
    }

    .nav-item:hover .nav-icon {
        color: var(--label) !important
    }

    .nav-item.active {
        background: var(--blue);
        color: #fff;
        font-weight: 600;
        box-shadow: 0 4px 14px rgba(2,110,199,.25)
    }

    .nav-item.active::before {
        display: none
    }

    .nav-item.active .nav-icon {
        color: #fff !important;
        background: transparent !important;
        box-shadow: none !important
    }

    .nav-item.active .nav-badge {
        background: rgba(255,255,255,.25);
        color: #fff
    }

    .nav-icon {
        width: 20px;
        height: 20px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        flex-shrink: 0;
        color: var(--label3);
        background: transparent !important;
        box-shadow: none !important
    }

    .nav-badge {
        margin-left: auto;
        background: #EF4444;
        color: white;
        font-size: 10px;
        font-weight: 800;
        min-width: 18px;
        height: 18px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        flex-shrink: 0
    }

    .sidebar-footer {
        margin-top: auto;
        padding: 10px 12px 14px;
        border-top: 1px solid var(--sep);
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: rgba(248,250,252,.5);
        position: relative;
    }

    .footer-user-info {
        flex: 1;
        min-width: 0
    }

    .footer-name {
        font-size: 13px;
        font-weight: 700;
        color: var(--label);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3
    }

    .footer-email {
        font-size: 11px;
        color: var(--label3);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .footer-logout-btn {
        background: none;
        border: none;
        color: var(--label3);
        cursor: pointer;
        font-size: 15px;
        padding: 6px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: color .15s, background .15s
    }

    .footer-logout-btn:hover { color: var(--red); background: rgba(239,68,68,.08) }

    .btn-logout {
        width: 100%;
        padding: 9px 14px;
        background: rgba(239, 68, 68, .07);
        color: #DC2626;
        border: 1px solid rgba(239, 68, 68, .12);
        border-radius: 10px;
        font-family: 'Inter', sans-serif;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        transition: background .15s;
        white-space: nowrap
    }

    .btn-logout:hover {
        background: rgba(239, 68, 68, .13)
    }

    /* COLLAPSED SIDEBAR */
    .sidebar.collapsed {
        width: var(--sidebar-w-collapsed)
    }

    .sidebar.collapsed .sidebar-header-info,
    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .nav-item>span:not(.nav-icon),
    .sidebar.collapsed .btn-logout-label,
    .sidebar.collapsed .sidebar-footer-actions .sidebar-hipaa,
    .sidebar.collapsed .sidebar-logo-text,
    .sidebar.collapsed .sidebar-logo .sidebar-collapse-btn,
    .sidebar.collapsed .sidebar-logout-icon {
        display: none
    }

    .sidebar.collapsed .sidebar-logo {
        justify-content: center;
        padding: 0;
        gap: 0
    }

    .sidebar.collapsed .sidebar-header {
        padding: 10px 8px;
        justify-content: center;
        gap: 0;
        margin: 0 6px 8px
    }

    .sidebar.collapsed .sidebar-collapse-btn {
        margin: 0
    }

    .sidebar.collapsed .sidebar-footer-actions {
        justify-content: center;
        gap: 4px
    }

    .sidebar.collapsed .nav-section {
        padding: 4px 8px
    }

    .sidebar.collapsed .nav-item {
        justify-content: center;
        padding: 9px;
        gap: 0
    }

    .sidebar.collapsed .nav-item.active::before {
        top: 4px;
        bottom: 4px
    }

    .sidebar.collapsed .nav-icon {
        width: 26px;
        height: 26px;
        font-size: 15px
    }

    .sidebar.collapsed .nav-badge {
        display: none
    }

    .sidebar.collapsed .sidebar-footer {
        padding: 10px 8px 14px
    }

    .sidebar.collapsed .btn-logout {
        padding: 9px;
        justify-content: center
    }

    /* Tooltips when collapsed */
    .sidebar.collapsed .nav-item[data-tooltip] {
        position: relative
    }

    .sidebar.collapsed .nav-item[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        background: #1e293b;
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        padding: 5px 10px;
        border-radius: 7px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity .12s;
        z-index: 300;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .2)
    }

    .sidebar.collapsed .nav-item[data-tooltip]:hover::after {
        opacity: 1
    }

    /* MAIN */
    .main {
        margin-left: var(--sidebar-w);
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        transition: margin-left .25s ease;
    }

    .main.sidebar-collapsed {
        margin-left: var(--sidebar-w-collapsed)
    }

    /* TOPBAR */
    .topbar {
        display: none;
    }

    .topbar-right {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        flex-shrink: 0
    }

    .topbar-title {
        font-size: 15px;
        font-weight: 700;
        color: var(--label2);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: -0.2px
    }

    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 18px;
        color: var(--label2);
        cursor: pointer;
        padding: 8px;
        border-radius: 10px;
        flex-shrink: 0;
        transition: background .15s, color .15s
    }

    .hamburger:hover { background: var(--fill); color: var(--label) }

    .topbar-avatar {
        width: 36px;
        height: 36px;
        border-radius: 11px;
        overflow: hidden;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 800;
        color: #fff;
        flex-shrink: 0;
        border: 2px solid var(--sep);
        transition: box-shadow .15s;
        margin-left: 4px
    }
    .topbar-avatar:hover { box-shadow: var(--sh-sm) }
    .topbar-avatar img { width: 100%; height: 100%; object-fit: cover; display: none }

    .topbar-notif-btn { position: relative }
    .topbar-notif-dot {
        position: absolute;
        top: 5px; right: 5px;
        width: 7px; height: 7px;
        background: #EF4444;
        border-radius: 50%;
        border: 2px solid var(--card);
        animation: pulse 2s infinite;
        display: none
    }
    .topbar-sep {
        width: 1px; height: 24px;
        background: var(--sep);
        margin: 0 4px;
        flex-shrink: 0
    }

    .hamburger:hover { background: var(--fill) }

    .topbar-icon-btn {
        background: var(--fill);
        border: 1px solid var(--sep);
        color: var(--label2);
        width: 38px;
        height: 38px;
        border-radius: 11px;
        cursor: pointer;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: background .15s, color .15s
    }

    .topbar-icon-btn:hover { background: var(--fill2); color: var(--label) }

    /* Notification group pill (matches design's rounded container) */
    .topbar-icon-group {
        display: flex;
        align-items: center;
        background: rgba(15,23,42,.04);
        border: 1px solid var(--sep);
        border-radius: 14px;
        padding: 3px;
        gap: 2px
    }
    .topbar-icon-group .topbar-icon-btn {
        background: transparent;
        border: none
    }
    .topbar-icon-group .topbar-icon-btn:hover {
        background: var(--card);
        box-shadow: var(--sh-sm)
    }

    .topbar-add-btn { flex-shrink: 0 }

    /* PAGE TOOLBAR (search/filter bar above tables) */
    .page-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 16px;
        flex-wrap: wrap
    }

    .toolbar-filters {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        flex: 1
    }

    .toolbar-filters input,
    .toolbar-filters select {
        height: 40px;
        padding: 0 13px;
        background: var(--card);
        border: 1.5px solid var(--sep);
        border-radius: 11px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        color: var(--label);
        outline: none;
        transition: border-color .15s, box-shadow .15s;
        min-width: 0
    }

    .toolbar-filters input { min-width: 180px; flex: 1 }
    .toolbar-filters select { min-width: 120px }

    .toolbar-filters input:focus,
    .toolbar-filters select:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 3px rgba(2,110,199,.08)
    }

    .toolbar-filters input::placeholder { color: var(--label3) }

    .toolbar-right {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0
    }

    .toolbar-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0
    }

    /* Mobile floating menu button (replaces topbar hamburger) */
    .mobile-menu-btn {
        display: none;
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 60;
        background: var(--blue);
        border: none;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 15px;
        color: #fff;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(79, 107, 237, .35)
    }

    /* Sidebar HIPAA badge */
    .sidebar-hipaa {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        font-weight: 600;
        padding: 6px 10px;
        border-radius: 8px;
        background: rgba(79, 107, 237, .1);
        color: var(--blue);
        margin-bottom: 8px;
        white-space: nowrap;
        overflow: hidden
    }

    .sidebar.collapsed .sidebar-hipaa .hipaa-label {
        display: none
    }

    /* Dashboard banner theme/refresh buttons */
    .dash-theme-btn {
        background: rgba(255, 255, 255, .15);
        border: 1px solid rgba(255, 255, 255, .25);
        color: #fff;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background .15s
    }

    .dash-theme-btn:hover {
        background: rgba(255, 255, 255, .25)
    }

    /* TOPBAR GLOBAL SEARCH */
    .topbar-search {
        position: relative;
        flex: 1;
        max-width: 400px;
        margin: 0 12px
    }

    .topbar-search i.search-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--label3);
        font-size: 14px;
        pointer-events: none
    }

    .topbar-search input {
        width: 100%;
        padding: 9px 16px 9px 40px;
        border: 2px solid transparent;
        border-radius: 16px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 500;
        background: var(--fill);
        color: var(--label);
        outline: none;
        transition: all .2s
    }

    .topbar-search input:focus {
        border-color: var(--blue);
        background: var(--card);
        box-shadow: 0 0 0 3px rgba(2,110,199,.10)
    }

    .topbar-search input::placeholder {
        color: var(--label3);
        font-weight: 400
    }

    .global-results {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        background: var(--card);
        border-radius: 12px;
        box-shadow: var(--sh-lg);
        border: 1px solid var(--sep);
        z-index: 200;
        overflow: hidden;
        display: none;
        max-height: 320px;
        overflow-y: auto
    }

    .global-results.show {
        display: block
    }

    .gr-section {
        padding: 6px 0
    }

    .gr-label {
        font-size: 10px;
        font-weight: 700;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .6px;
        padding: 6px 14px 4px
    }

    .gr-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 14px;
        cursor: pointer;
        transition: background .12s
    }

    .gr-item:hover {
        background: var(--fill)
    }

    .gr-avatar {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 10px;
        font-weight: 800;
        flex-shrink: 0
    }

    .gr-name {
        font-size: 13px;
        font-weight: 600;
        color: var(--label)
    }

    .gr-sub {
        font-size: 11px;
        color: var(--label3)
    }

    .gr-empty {
        padding: 16px;
        text-align: center;
        font-size: 13px;
        color: var(--label3)
    }

    /* ALERT CARD ACTIONS */
    .ac-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 10px;
        padding-top: 8px;
        border-top: 0.5px solid var(--sep)
    }

    /* BUTTONS */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        white-space: nowrap;
        text-decoration: none
    }
    .btn-sm { padding: 6px 12px !important; font-size: 12px !important; border-radius: 9px !important }
    .btn-success {
        background: var(--green); color: #fff; border: none; padding: 9px 20px;
        border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s;
        box-shadow: 0 2px 8px rgba(34,197,94,.3)
    }
    .btn-text { background: none; border: none; color: inherit; padding: 0; font-weight: inherit; cursor: pointer; font-size: inherit; font-family: inherit }

    .btn-primary {
        background: var(--blue);
        color: white;
        border: none;
        padding: 9px 20px;
        border-radius: 12px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 7px;
        transition: all .18s;
        box-shadow: 0 4px 14px rgba(2,110,199,.3)
    }

    .btn-primary:hover {
        background: var(--blue-dark);
        box-shadow: 0 6px 20px rgba(2,110,199,.4);
        transform: translateY(-1px)
    }

    .btn-primary:active {
        transform: translateY(0)
    }

    .btn-ghost {
        background: var(--fill);
        border: 1px solid var(--sep);
        color: var(--label2);
        padding: 9px 18px;
        border-radius: 12px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all .15s
    }

    .btn-ghost:hover {
        background: var(--fill2);
        color: var(--label);
        border-color: var(--border)
    }

    .btn-danger {
        background: var(--red);
        color: white;
        border: none;
        padding: 9px 20px;
        border-radius: 12px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 2px 8px rgba(239,68,68,.28);
        transition: all .15s
    }

    .btn-danger:hover {
        background: #DC2626;
        transform: translateY(-1px)
    }

    .btn-icon {
        width: 34px;
        height: 34px;
        background: var(--fill);
        border: 1px solid var(--sep);
        border-radius: 10px;
        color: var(--label2);
        cursor: pointer;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all .15s
    }

    .btn-icon:hover {
        background: var(--fill2);
        color: var(--blue);
        transform: scale(1.05)
    }

    /* PAGES */
    .page-content {
        padding: 18px 20px;
        flex: 1;
        min-width: 0;
        overflow-x: hidden
    }

    .page {
        display: none;
        animation: fadeIn .2s ease
    }

    .page.active {
        display: block
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(5px)
        }

        to {
            opacity: 1;
            transform: translateY(0)
        }
    }

    .page-header {
        margin-bottom: 20px
    }

    .page-header.flex-between {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px
    }

    .page-h1 {
        font-size: 26px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -.5px;
        line-height: 1.1
    }

    .page-sub {
        font-size: 13px;
        font-weight: 500;
        color: var(--label2);
        margin-top: 3px
    }

    /* LOADING */
    .loading-screen {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        min-height: 400px
    }

    .loader-wrap {
        text-align: center
    }

    .pulse-ring {
        width: 64px;
        height: 64px;
        border: 2.5px solid var(--brand);
        border-radius: 50%;
        margin: 0 auto 16px;
        animation: pulse 1.4s ease-in-out infinite
    }

    @keyframes pulse {
        0% {
            transform: scale(.85);
            opacity: 1
        }

        100% {
            transform: scale(1.3);
            opacity: 0
        }
    }

    .loader-icon {
        font-size: 28px;
        color: var(--brand);
        display: block;
        margin: -46px auto 16px
    }

    .loader-wrap p {
        color: var(--label2);
        font-size: 13px;
        font-weight: 500;
        margin-top: 16px
    }

    /* DASHBOARD BANNER */
    /* PAGE HEADER (replaces dash-banner) */
    .page-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 14px;
        gap: 12px;
        flex-wrap: wrap
    }

    .page-header-left { flex: 1; min-width: 0 }

    .page-live-badge-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px
    }

    .page-live-badge {
        display: inline-flex;
        align-items: center;
        background: var(--blue-light);
        color: var(--blue);
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .8px;
        padding: 3px 8px;
        border-radius: 6px
    }

    .page-live-dot {
        width: 7px;
        height: 7px;
        background: #10B981;
        border-radius: 50%;
        animation: pulse 2s infinite;
        flex-shrink: 0;
        box-shadow: 0 0 0 3px rgba(16,185,129,.2)
    }

    .page-header-title {
        font-size: 22px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -.6px;
        line-height: 1;
        margin-bottom: 4px
    }

    .page-header-sub {
        font-size: 12px;
        color: var(--label3);
        font-weight: 500
    }

    .page-header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0
    }

    /* Keep backward compat for company row */
    .dash-banner-left { flex-shrink: 0 }

    /* Company row above greeting */
    .dash-company-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px
    }

    .dash-company-icon {
        width: 24px;
        height: 24px;
        background: rgba(2, 110, 199, .08);
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--blue);
        font-size: 11px;
        flex-shrink: 0
    }

    .dash-company-name {
        font-size: 11px;
        font-weight: 600;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .8px
    }

    .dash-greeting {
        font-size: 19px;
        font-weight: 800;
        color: #fff;
        letter-spacing: -.3px;
        line-height: 1.1
    }

    .dash-sub {
        font-size: 12px;
        font-weight: 500;
        color: rgba(255, 255, 255, .75);
        margin-top: 3px
    }

    .dash-banner-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        flex-shrink: 0;
        min-width: 240px
    }

    .dash-banner-search {
        position: relative;
        width: 100%
    }

    .dash-banner-search i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--label3);
        font-size: 13px;
        pointer-events: none
    }

    .dash-banner-search input {
        width: 100%;
        padding: 9px 12px 9px 34px;
        border: 1.5px solid var(--sep);
        border-radius: 12px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 500;
        background: var(--fill);
        color: var(--label);
        outline: none;
        transition: all .2s;
        box-sizing: border-box
    }

    .dash-banner-search input::placeholder {
        color: var(--label3);
        font-weight: 400
    }

    .dash-banner-search input:focus {
        border-color: var(--blue);
        background: var(--card);
        box-shadow: 0 0 0 3px rgba(2,110,199,.10)
    }

    .dash-banner .dash-search-filters {
        display: flex;
        gap: 5px;
        justify-content: flex-end
    }

    .dash-banner .dash-sf-btn {
        padding: 5px 12px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, .2);
        background: rgba(255, 255, 255, .1);
        font-family: 'Inter', sans-serif;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
        color: rgba(255, 255, 255, .8);
        display: flex;
        align-items: center;
        gap: 5px;
        transition: all .12s
    }

    .dash-banner .dash-sf-btn:hover {
        background: rgba(255, 255, 255, .2);
        color: #fff;
        border-color: rgba(255, 255, 255, .35)
    }

    .dash-banner .dash-sf-btn.active {
        background: rgba(255, 255, 255, .25);
        color: #fff;
        border-color: rgba(255, 255, 255, .4)
    }

    .dash-weather-widget {
        display: flex;
        align-items: center;
        gap: 10px
    }

    .dash-weather-icon {
        font-size: 26px;
        color: #fff;
        line-height: 1
    }

    .dash-weather-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 1px
    }

    .dash-weather-temp {
        font-size: 20px;
        font-weight: 800;
        color: #fff;
        line-height: 1.1
    }

    .dash-weather-desc {
        font-size: 10px;
        font-weight: 700;
        color: rgba(255, 255, 255, .75);
        text-transform: uppercase;
        letter-spacing: .4px
    }

    .dash-weather-loc {
        font-size: 10px;
        color: rgba(255, 255, 255, .55)
    }

    .weather-loc-btn {
        background: rgba(255, 255, 255, .15);
        border: 1px solid rgba(255, 255, 255, .25);
        color: rgba(255, 255, 255, .85);
        font-size: 11px;
        font-weight: 600;
        padding: 5px 12px;
        border-radius: 20px;
        cursor: pointer;
        transition: background .15s;
        white-space: nowrap
    }

    .weather-loc-btn:hover {
        background: rgba(255, 255, 255, .25);
        color: #fff
    }

    /* KPI GRID + CARDS */
    .kpi-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 16px;
        margin-bottom: 20px
    }

    .kpi-card {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 20px 22px;
        box-shadow: var(--sh-sm);
        border: 1px solid var(--sep);
        display: flex;
        align-items: center;
        gap: 16px;
        transition: transform .18s, box-shadow .18s;
        cursor: default;
        position: relative;
        overflow: hidden
    }

    .kpi-card::after {
        content: '';
        position: absolute;
        right: -20px;
        bottom: -20px;
        width: 80px;
        height: 80px;
        background: var(--fill);
        border-radius: 50%;
        pointer-events: none;
        transition: background .18s
    }

    .kpi-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--sh-md)
    }

    .kpi-card:hover::after {
        background: var(--fill2)
    }

    .kpi-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex-shrink: 0
    }

    .kpi-icon.blue   { background: rgba(2,110,199,.10);  color: #026ec7 }
    .kpi-icon.green  { background: rgba(34,197,94,.12);  color: #16A34A }
    .kpi-icon.amber  { background: rgba(245,158,11,.12); color: #D97706 }
    .kpi-icon.teal   { background: rgba(13,148,136,.12); color: #0D9488 }
    .kpi-icon.red    { background: rgba(239,68,68,.12);  color: #DC2626 }
    .kpi-icon.indigo { background: rgba(99,102,241,.12); color: #6366F1 }
    .kpi-icon.purple { background: rgba(139,92,246,.12); color: #7C3AED }

    .kpi-body { display: flex; flex-direction: column; gap: 4px; min-width: 0 }

    .kpi-value {
        font-size: 28px;
        font-weight: 900;
        color: var(--label);
        letter-spacing: -1.5px;
        line-height: 1
    }

    .kpi-label {
        font-size: 11px;
        font-weight: 700;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .5px;
        white-space: nowrap
    }

    .kpi-status {
        font-size: 11px;
        color: var(--label3);
        margin-top: 2px
    }

    /* KPI ROW */
    .kpi-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-bottom: 24px
    }

    .kpi-card2 {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 20px 20px 16px;
        box-shadow: var(--sh-sm);
        border: 1px solid var(--sep);
        display: flex;
        flex-direction: column;
        gap: 14px;
        position: relative;
        overflow: hidden;
        transition: transform .2s, box-shadow .2s;
        cursor: pointer
    }

    .kpi-card2::after {
        content: '';
        position: absolute;
        right: -16px;
        bottom: -16px;
        width: 80px;
        height: 80px;
        background: var(--fill);
        border-radius: 50%;
        pointer-events: none;
        transition: background .2s
    }

    .kpi-card2:hover {
        transform: translateY(-3px);
        box-shadow: var(--sh-md)
    }

    .kpi-card2:hover::after { background: var(--fill2) }

    .kpi-card2-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start
    }

    .kpi2-left {
        display: flex;
        flex-direction: column;
        gap: 4px
    }

    .kpi2-lbl {
        font-size: 10px;
        font-weight: 700;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .6px;
        display: block;
        margin-bottom: 2px
    }

    .kpi2-val {
        font-size: 28px;
        font-weight: 900;
        color: var(--label);
        letter-spacing: -1.2px;
        line-height: 1
    }

    .kpi2-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 19px;
        flex-shrink: 0;
        transition: background .2s, color .2s
    }

    .kpi2-icon-neutral {
        background: var(--bg);
        color: var(--label2);
        border: 1px solid var(--sep)
    }

    .kpi-card2:hover .kpi2-icon-neutral {
        background: var(--blue-light);
        color: var(--blue)
    }

    .kpi2-subtext {
        display: flex;
        align-items: center;
        gap: 6px;
        padding-top: 10px;
        margin-top: 10px;
        border-top: 1px solid var(--sep)
    }

    .kpi2-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        flex-shrink: 0
    }

    .kpi2-dot-green { background: #22C55E; box-shadow: 0 0 0 2px rgba(34,197,94,.2) }
    .kpi2-dot-amber { background: #F59E0B; box-shadow: 0 0 0 2px rgba(245,158,11,.2) }
    .kpi2-dot-red   { background: #EF4444; box-shadow: 0 0 0 2px rgba(239,68,68,.2) }
    .kpi2-dot-blue  { background: var(--blue); box-shadow: 0 0 0 2px rgba(2,110,199,.15) }

    .kpi2-subtext span:last-child {
        font-size: 11px;
        font-weight: 600;
        color: var(--label3)
    }

    .kpi-status {
        font-size: 11px;
        font-weight: 600;
        color: var(--label3);
        margin-top: 4px
    }

    /* KPI colored accent lines (subtle top border) are removed in favor of neutral design */

    /* DASHBOARD QUICK SEARCH */
    .dash-search-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
        flex-wrap: wrap
    }

    .dash-search-filters {
        display: flex;
        gap: 6px;
        align-items: center
    }

    .dash-sf-btn {
        padding: 7px 14px;
        border-radius: 10px;
        border: 1px solid var(--sep);
        background: var(--card);
        font-family: 'Inter', sans-serif;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        color: var(--label2);
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all .12s;
        box-shadow: var(--sh-sm)
    }

    .dash-sf-btn:hover {
        border-color: var(--blue);
        color: var(--blue)
    }

    .dash-sf-btn.active {
        background: var(--blue);
        color: white;
        border-color: var(--blue)
    }

    .dash-search-results {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        background: var(--card);
        border: 1px solid var(--sep);
        border-radius: var(--r-lg);
        box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
        overflow: hidden;
        overflow-y: auto;
        max-height: 480px;
        z-index: 300
    }

    .dsr-section {
        padding: 10px 16px 4px
    }

    .dsr-label {
        font-size: 10px;
        font-weight: 700;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .5px;
        margin-bottom: 6px
    }

    .dsr-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 8px;
        padding-bottom: 10px
    }

    .dsr-card {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        border-radius: 10px;
        background: var(--bg);
        cursor: pointer;
        transition: background .12s;
        border: 1px solid var(--sep)
    }

    .dsr-card:hover {
        background: var(--fill);
        border-color: var(--blue)
    }

    .dsr-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 11px;
        color: white;
        flex-shrink: 0
    }

    .dsr-info {
        flex: 1;
        min-width: 0
    }

    .dsr-name {
        font-weight: 700;
        font-size: 13px;
        color: var(--label);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .dsr-sub {
        font-size: 11px;
        color: var(--label3);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .dsr-action {
        opacity: 0;
        transition: opacity .12s
    }

    .dsr-card:hover .dsr-action {
        opacity: 1
    }

    .dsr-empty {
        padding: 20px 16px;
        text-align: center;
        font-size: 13px;
        color: var(--label3);
        font-weight: 500
    }

    /* DASHBOARD MAIN LAYOUT */
    .dash-main-row {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 24px;
        align-items: start
    }

    .dash-charts-col {
        display: flex;
        flex-direction: column;
        gap: 24px
    }

    .dash-charts-top {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 16px
    }

    .dash-charts-bottom {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px
    }

    .dash-right-col {
        display: flex;
        flex-direction: column;
        gap: 20px
    }

    /* CHARTS */
    .chart-card {
        background: var(--card);
        border-radius: var(--r-xl);
        padding: 24px 24px 20px;
        box-shadow: var(--sh-sm);
        border: 1px solid var(--sep);
        overflow: hidden;
        transition: box-shadow .15s
    }

    .chart-card:hover {
        box-shadow: var(--sh-md)
    }

    .chart-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 16px
    }

    .chart-header h3 {
        font-size: 16px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -.3px;
        margin-bottom: 4px
    }

    .chart-sub {
        font-size: 12px;
        font-weight: 500;
        color: var(--label3);
        display: block
    }

    .chart-body {
        position: relative;
        height: 180px;
        display: flex;
        align-items: center;
        justify-content: center
    }

    .chart-body.donut-body {
        height: 160px
    }

    .chart-body canvas {
        max-height: 180px
    }

    .donut-legend {
        display: flex;
        gap: 8px;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 10px
    }

    .legend-item {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 11px;
        font-weight: 600;
        color: var(--label2);
        cursor: default
    }

    .legend-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0
    }

    /* Range selector */
    .chart-range {
        display: flex;
        gap: 2px;
        align-items: center;
        background: var(--fill);
        padding: 3px;
        border-radius: 12px;
        border: 1px solid var(--sep)
    }

    .range-btn {
        padding: 5px 12px;
        border-radius: 9px;
        border: none;
        background: transparent;
        font-size: 11px;
        font-weight: 700;
        color: var(--label3);
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        transition: all .15s;
        line-height: 1.4
    }

    .range-btn:hover {
        color: var(--label)
    }

    .range-btn.active {
        background: var(--card);
        color: var(--label);
        box-shadow: var(--sh-sm)
    }

    /* DOCUMENT TYPE ARROW BAR CHART */
    .doc-type-bars {
        padding: 6px 2px;
        display: flex;
        flex-direction: column;
        gap: 5px;
        justify-content: center
    }

    .hbar-row {
        display: flex;
        flex-direction: column;
        gap: 2px
    }

    .hbar-label {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 2px
    }

    .hbar-track {
        width: 100%;
        background: rgba(0, 0, 0, .04);
        border-radius: 4px;
        height: 16px;
        position: relative
    }

    .hbar-fill {
        height: 100%;
        min-width: 28px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        transition: width .5s ease;
        clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%);
        border-radius: 3px 0 0 3px
    }

    .hbar-val {
        font-size: 10px;
        font-weight: 800;
        color: white;
        padding-right: 14px;
        white-space: nowrap
    }

    /* PANELS */
    .panel {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 14px 16px;
        box-shadow: var(--sh-sm);
        border: 1px solid var(--sep);
        overflow: hidden
    }

    .panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px
    }

    .panel-header h3 {
        font-size: 14px;
        font-weight: 700;
        color: var(--label);
        display: flex;
        align-items: center;
        gap: 7px
    }

    .see-all {
        font-size: 12px;
        color: var(--blue);
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 3px;
        font-weight: 700;
        text-decoration: none
    }

    /* ALERT ROWS */
    .alert-row {
        display: grid;
        grid-template-columns: 34px 1fr 1fr auto auto;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        border-radius: 10px;
        background: var(--bg);
        margin-bottom: 5px;
        transition: background .15s
    }

    .alert-row:hover {
        background: var(--fill)
    }

    .a-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 10px;
        color: white;
        flex-shrink: 0
    }

    .a-avatar.red {
        background: linear-gradient(145deg, #FF6B47, #FF3B30)
    }

    .a-avatar.amber {
        background: linear-gradient(145deg, #FFD60A, #FF9500)
    }

    .a-name {
        font-weight: 700;
        font-size: 13px;
        color: var(--label)
    }

    .a-sub {
        font-size: 11px;
        color: var(--label2)
    }

    .a-doc {
        font-size: 13px;
        font-weight: 500;
        color: var(--label)
    }

    .a-date {
        font-size: 11px;
        color: var(--label3)
    }

    /* HEALTH SCORE PANEL */
    .health-panel {
        background: #0c3f6e !important;
        border-radius: var(--r-xl) !important;
        padding: 24px 22px !important;
        position: relative;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(12,63,110,.35), 0 0 0 1px rgba(12,63,110,.4) !important
    }

    .health-panel::before {
        content: '';
        position: absolute;
        right: -50px; bottom: -50px;
        width: 160px; height: 160px;
        background: rgba(2,110,199,.25);
        border-radius: 50%;
        filter: blur(50px);
        pointer-events: none
    }

    .health-panel::after {
        content: '';
        position: absolute;
        left: -30px; top: -30px;
        width: 100px; height: 100px;
        background: rgba(255,255,255,.04);
        border-radius: 50%;
        filter: blur(30px);
        pointer-events: none
    }

    .health-panel-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 18px
    }

    .health-panel-icon {
        width: 40px; height: 40px;
        background: rgba(255,255,255,.10);
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(186,224,253,1);
        font-size: 17px;
        flex-shrink: 0
    }

    .health-panel-eyebrow {
        font-size: 10px;
        font-weight: 900;
        color: rgba(186,224,253,.8);
        text-transform: uppercase;
        letter-spacing: .2em
    }

    .health-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        z-index: 2
    }

    .health-ring-wrap {
        position: relative;
        width: 140px;
        height: 140px;
        flex-shrink: 0;
        margin: 0 auto 16px
    }

    .health-ring-svg {
        width: 100px;
        height: 100px;
        transform: rotate(-90deg)
    }

    .health-ring-bg {
        fill: none;
        stroke: rgba(255,255,255,.07);
        stroke-width: 7
    }

    .health-ring-fill {
        fill: none;
        stroke: #fff;
        stroke-width: 7;
        stroke-linecap: round;
        stroke-dasharray: 238.76;
        stroke-dashoffset: 238.76;
        transition: stroke-dashoffset .8s ease
    }

    .health-ring-text {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center
    }

    .health-pct {
        font-size: 20px;
        font-weight: 900;
        color: #fff;
        letter-spacing: -1px;
        line-height: 1
    }

    .health-pct-lbl {
        font-size: 9px;
        font-weight: 800;
        color: rgba(186,224,253,.7);
        text-transform: uppercase;
        letter-spacing: .15em;
        margin-top: 3px
    }

    .health-stats {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        margin-bottom: 16px
    }

    .hs-stat {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        border-radius: 10px;
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.08)
    }

    .hs-val {
        font-size: 16px;
        font-weight: 900;
        letter-spacing: -.5px
    }

    .hs-lbl {
        font-size: 11px;
        font-weight: 600;
        color: rgba(186,224,253,.7)
    }

    .hs-green { color: #4ade80 }
    .hs-amber { color: #fbbf24 }
    .hs-red { color: #f87171 }

    .health-audit-btn {
        width: 100%;
        background: rgba(255,255,255,.12);
        border: 1px solid rgba(255,255,255,.15);
        color: #fff;
        font-size: 12px;
        font-weight: 800;
        padding: 11px 16px;
        border-radius: 12px;
        cursor: pointer;
        transition: background .15s;
        font-family: 'Inter', sans-serif;
        letter-spacing: .3px
    }

    .health-audit-btn:hover {
        background: rgba(255,255,255,.18)
    }

    /* Quick Actions panel */
    .dash-quick-panel {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 18px 16px;
        box-shadow: var(--sh-sm);
        border: 1px solid var(--sep)
    }

    .dash-quick-panel h3 {
        font-size: 13px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -.2px;
        margin-bottom: 14px
    }

    .dash-quick-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px
    }

    .dash-qa2-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 14px 10px;
        border-radius: var(--r);
        background: var(--bg);
        border: 1px solid transparent;
        cursor: pointer;
        transition: all .15s;
        font-family: 'Inter', sans-serif
    }

    .dash-qa2-btn:hover {
        background: var(--card);
        border-color: var(--sep);
        box-shadow: var(--sh-sm);
        transform: translateY(-1px)
    }

    .dash-qa2-icon {
        width: 40px; height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 17px
    }

    .dash-qa2-lbl {
        font-size: 11px;
        font-weight: 700;
        color: var(--label2)
    }

    /* Deadlines panel */
    .dash-deadlines-panel {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 18px 16px;
        box-shadow: var(--sh-sm);
        border: 1px solid var(--sep)
    }

    .dash-deadlines-panel .panel-header {
        margin-bottom: 12px
    }

    .deadline-item {
        padding: 10px 12px;
        border-radius: 10px;
        background: var(--bg);
        border: 1px solid var(--sep);
        margin-bottom: 8px;
        cursor: pointer;
        transition: all .15s
    }

    .deadline-item:hover {
        background: var(--card);
        border-color: var(--blue);
        box-shadow: var(--sh-sm)
    }

    .deadline-item:last-child { margin-bottom: 0 }

    .deadline-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 4px
    }

    .deadline-title {
        font-size: 12px;
        font-weight: 700;
        color: var(--label)
    }

    .deadline-dot-urgent {
        width: 7px; height: 7px;
        background: #EF4444;
        border-radius: 50%;
        animation: pulse 2s infinite
    }

    .deadline-dot-normal {
        width: 7px; height: 7px;
        background: var(--blue);
        border-radius: 50%
    }

    .deadline-desc {
        font-size: 11px;
        color: var(--label3);
        font-weight: 500;
        margin-bottom: 4px
    }

    .deadline-date {
        font-size: 10px;
        font-weight: 700;
        color: var(--label3)
    }

    .hs-red {
        color: #DC2626
    }

    /* TODAY'S FOCUS CARD */
    .today-focus {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 16px;
        border-radius: var(--r-lg);
        background: linear-gradient(135deg, #FEF2F2, #FFF7ED);
        border: 1.5px solid #FCA5A5;
        box-shadow: 0 2px 8px rgba(239, 68, 68, .1)
    }

    .today-focus.amber {
        background: linear-gradient(135deg, #FFFBEB, #FFF7ED);
        border-color: #FCD34D;
        box-shadow: 0 2px 8px rgba(245, 158, 11, .1)
    }

    .tf-icon-wrap {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: #EF4444;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 15px;
        flex-shrink: 0
    }

    .today-focus.amber .tf-icon-wrap {
        background: #F59E0B
    }

    .tf-body {
        flex: 1;
        min-width: 0
    }

    .tf-eyebrow {
        font-size: 10px;
        font-weight: 700;
        color: #EF4444;
        text-transform: uppercase;
        letter-spacing: .5px;
        display: block
    }

    .today-focus.amber .tf-eyebrow {
        color: #D97706
    }

    .tf-msg {
        font-size: 12px;
        font-weight: 600;
        color: #1F2937;
        display: block;
        line-height: 1.35;
        margin-top: 2px
    }

    .tf-btn {
        padding: 6px 12px;
        border-radius: 8px;
        background: #EF4444;
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
        border: none;
        font-family: 'Inter', sans-serif;
        transition: opacity .15s;
        flex-shrink: 0
    }

    .today-focus.amber .tf-btn {
        background: #F59E0B
    }

    .tf-btn:hover {
        opacity: .85
    }

    /* REDESIGNED ALERT CARDS */
    .dash-action-card {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 10px;
        border-radius: 10px;
        background: var(--bg);
        margin-bottom: 5px;
        border-left: 3px solid transparent;
        transition: background .15s
    }

    .dash-action-card:hover {
        background: var(--fill)
    }

    .dash-action-card.expired {
        border-left-color: #EF4444
    }

    .dash-action-card.expiring {
        border-left-color: #F59E0B
    }

    .dac-avatar {
        width: 33px;
        height: 33px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 11px;
        color: #fff;
        flex-shrink: 0
    }

    .dac-avatar.red {
        background: linear-gradient(145deg, #FF6B47, #FF3B30)
    }

    .dac-avatar.amber {
        background: linear-gradient(145deg, #FFD60A, #FF9500)
    }

    .dac-info {
        flex: 1;
        min-width: 0
    }

    .dac-name {
        font-weight: 700;
        font-size: 12px;
        color: var(--label);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .dac-sub {
        font-size: 11px;
        color: var(--label3);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .dac-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 3px;
        flex-shrink: 0
    }

    .dac-chip {
        font-size: 10px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 20px;
        white-space: nowrap
    }

    .dac-chip.expired {
        background: rgba(239, 68, 68, .12);
        color: #DC2626
    }

    .dac-chip.expiring {
        background: rgba(245, 158, 11, .12);
        color: #D97706
    }

    .dac-days {
        font-size: 10px;
        color: var(--label3);
        font-weight: 500
    }

    /* REDESIGNED VISIT CARDS */
    .visit-group-hdr {
        font-size: 10px;
        font-weight: 800;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .5px;
        margin: 8px 0 5px;
        padding-left: 3px
    }

    .visit-group-hdr.overdue-hdr {
        color: #DC2626
    }

    .dash-visit-card {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 10px;
        border-radius: 10px;
        background: var(--bg);
        margin-bottom: 5px;
        border-left: 3px solid transparent;
        transition: background .15s
    }

    .dash-visit-card:hover {
        background: var(--fill)
    }

    .dash-visit-card.overdue {
        border-left-color: #EF4444
    }

    .dash-visit-card.due-soon {
        border-left-color: #4F6BED
    }

    .dvc-avatar {
        width: 33px;
        height: 33px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 11px;
        color: #fff;
        flex-shrink: 0;
        background: linear-gradient(145deg, #667EEA, #764BA2)
    }

    .dvc-info {
        flex: 1;
        min-width: 0
    }

    .dvc-name {
        font-weight: 700;
        font-size: 12px;
        color: var(--label);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .dvc-sub {
        font-size: 11px;
        color: var(--label3);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .dvc-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        flex-shrink: 0
    }

    .dvc-chip {
        font-size: 10px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 20px;
        white-space: nowrap
    }

    .dvc-chip.overdue {
        background: rgba(239, 68, 68, .12);
        color: #DC2626
    }

    .dvc-chip.due-soon {
        background: rgba(79, 107, 237, .1);
        color: #4F6BED
    }

    .dvc-open {
        background: var(--blue);
        color: #fff;
        border: none;
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        display: flex;
        align-items: center;
        gap: 4px;
        transition: opacity .12s
    }

    .dvc-open:hover {
        opacity: .85
    }

    /* RECENT ACTIVITY */
    .dash-act-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 2px;
        border-bottom: 1px solid var(--sep)
    }

    .dash-act-item:last-child {
        border-bottom: none
    }

    .dact-icon {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        flex-shrink: 0;
        background: var(--bg)
    }

    .dact-body {
        flex: 1;
        min-width: 0
    }

    .dact-text {
        font-size: 12px;
        color: var(--label2);
        line-height: 1.35;
        display: block
    }

    .dact-time {
        font-size: 10px;
        color: var(--label3);
        font-weight: 500;
        margin-top: 2px;
        display: block
    }

    /* BANNER QUICK ACTIONS */
    .dash-quick-actions {
        display: flex;
        gap: 7px;
        margin-top: 6px;
        flex-wrap: wrap;
        justify-content: flex-end
    }

    .dash-qa-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 7px 13px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, .22);
        background: rgba(255, 255, 255, .12);
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        transition: all .15s;
        white-space: nowrap
    }

    .dash-qa-btn:hover {
        background: rgba(255, 255, 255, .25);
        border-color: rgba(255, 255, 255, .38)
    }

    .dash-qa-btn i {
        font-size: 11px
    }

    /* KPI STATUS TEXT */
    .kpi-status {
        font-size: 10px;
        font-weight: 600;
        margin-top: 1px;
        display: block
    }

    .kpi-status.ok {
        color: #16A34A
    }

    .kpi-status.warn {
        color: #D97706
    }

    .kpi-status.danger {
        color: #DC2626
    }

    /* DASHBOARD NICE EMPTY STATE */
    .dash-empty-nice {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 14px 4px;
        color: var(--label3);
        font-size: 13px;
        font-weight: 500
    }

    .dash-empty-nice i {
        font-size: 16px;
        opacity: .55
    }

    /* TALLER CHART BODY */
    .chart-body-tall {
        height: 280px !important
    }

    /* PILLS */
    .pill {
        padding: 3px 9px;
        border-radius: 100px;
        font-size: 11px;
        font-weight: 800;
        white-space: nowrap
    }

    .pill-expired {
        background: rgba(255, 59, 48, .12);
        color: var(--red)
    }

    .pill-soon {
        background: rgba(255, 149, 0, .12);
        color: #C47700
    }

    .pill-valid {
        background: rgba(52, 199, 89, .12);
        color: #1A9640
    }

    .pill-pending {
        background: var(--label4);
        color: var(--label2)
    }

    /* EMPTY STATE */
    .empty-state {
        text-align: center;
        padding: 20px;
        color: var(--label3);
        font-size: 13px;
        font-weight: 500;
    }

    .empty-state i { display: none }

    .empty-state strong {
        font-size: 13px;
        font-weight: 600;
        color: var(--label2);
        display: block;
    }

    .empty-state p {
        font-size: 12px;
        font-weight: 500;
        color: var(--label3);
        margin: 2px 0 0;
    }

    .empty-state-text {
        text-align: center;
        padding: 20px;
        color: var(--label3);
        font-size: 13px;
        font-weight: 500;
    }

    /* FILTER BAR */
    .filter-bar {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 16px;
        align-items: center
    }

    .search-wrap {
        position: relative;
        flex: 1;
        min-width: 220px
    }

    .search-wrap i {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--label3);
        font-size: 14px
    }

    .search-wrap input {
        width: 100%;
        padding: 10px 14px 10px 40px;
        border: 1.5px solid var(--sep);
        border-radius: 12px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 500;
        background: var(--card);
        color: var(--label);
        outline: none;
        box-shadow: var(--sh-sm)
    }

    .search-wrap input:focus {
        box-shadow: 0 0 0 3px rgba(27, 58, 107, .12);
        border-color: var(--blue)
    }

    .search-wrap input::placeholder {
        color: var(--label3)
    }

    .filter-bar select {
        padding: 10px 28px 10px 12px;
        border: 1px solid var(--sep);
        border-radius: 10px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 500;
        background: var(--card);
        color: var(--label);
        cursor: pointer;
        outline: none;
        box-shadow: var(--sh-sm);
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center
    }

    /* EMPLOYEE / MEMBER GRID */
    .emp-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px
    }

    /* List view */
    .emp-grid.list-view {
        display: flex;
        flex-direction: column;
        gap: 0;
        border: 1px solid var(--sep);
        border-radius: var(--r);
        overflow: hidden
    }

    .emp-grid.list-view .emp-card {
        border-radius: 0;
        box-shadow: none;
        padding: 10px 16px;
        display: flex;
        align-items: center;
        gap: 14px;
        border-bottom: 1px solid var(--sep)
    }

    .emp-grid.list-view .emp-card:last-child {
        border-bottom: none
    }

    .emp-grid.list-view .emp-card:hover {
        transform: none;
        background: var(--fill)
    }

    .emp-grid.list-view .emp-card-header {
        margin-bottom: 0;
        flex-shrink: 0
    }

    .emp-grid.list-view .emp-avatar {
        width: 36px;
        height: 36px;
        font-size: 12px;
        border-radius: 10px
    }

    .emp-grid.list-view .emp-card-body {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 16px
    }

    .emp-grid.list-view .emp-card-name {
        font-size: 13px;
        margin-bottom: 0
    }

    .emp-grid.list-view .emp-card-role {
        font-size: 11px;
        margin-bottom: 0
    }

    .emp-grid.list-view .emp-card-meta {
        margin-bottom: 0;
        flex-wrap: nowrap;
        overflow: hidden
    }

    .emp-grid.list-view .emp-card-footer {
        margin-left: auto;
        flex-shrink: 0
    }

    .emp-grid.list-view .emp-code {
        margin-bottom: 0
    }

    .emp-card {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 16px;
        box-shadow: var(--sh-sm);
        cursor: pointer;
        transition: transform .15s, box-shadow .15s;
        position: relative
    }

    .emp-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--sh-md)
    }

    .emp-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px
    }

    .emp-avatar {
        width: 46px;
        height: 46px;
        border-radius: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--brand, #0284C7);
        color: white;
        font-weight: 800;
        font-size: 15px;
        box-shadow: 0 4px 12px rgba(2,132,199, .25)
    }

    .emp-card-actions {
        display: flex;
        gap: 5px
    }

    .emp-code {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        font-weight: 800;
        color: #0D9488;
        background: rgba(13, 148, 136, .1);
        padding: 2px 8px;
        border-radius: 100px;
        margin-bottom: 5px
    }

    .emp-card-name {
        font-weight: 800;
        font-size: 14px;
        color: var(--label);
        letter-spacing: -.2px;
        margin-bottom: 2px
    }

    .emp-card-role {
        font-size: 12px;
        font-weight: 600;
        color: var(--label2);
        margin-bottom: 8px
    }

    .emp-card-meta {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        font-size: 11px;
        font-weight: 500;
        color: var(--label2);
        margin-bottom: 10px
    }

    .emp-card-meta i {
        margin-right: 3px;
        color: var(--label3)
    }

    .emp-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap
    }

    .badge-danger {
        background: rgba(255, 59, 48, .12);
        color: var(--red);
        font-size: 11px;
        font-weight: 800;
        padding: 3px 9px;
        border-radius: 100px
    }

    .badge-warn {
        background: rgba(255, 149, 0, .12);
        color: #C47700;
        font-size: 11px;
        font-weight: 800;
        padding: 3px 9px;
        border-radius: 100px
    }

    .badge-ok {
        background: rgba(52, 199, 89, .12);
        color: #1A9640;
        font-size: 11px;
        font-weight: 800;
        padding: 3px 9px;
        border-radius: 100px
    }

    .badge-none {
        background: var(--label4);
        color: var(--label3);
        font-size: 11px;
        font-weight: 800;
        padding: 3px 9px;
        border-radius: 100px
    }

    .badge-danger i, .badge-warn i, .badge-ok i { margin-right: 3px; font-size: 10px }

    .emp-type {
        font-size: 10px;
        font-weight: 700;
        color: var(--label3);
        background: var(--bg);
        padding: 2px 7px;
        border-radius: 100px;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    /* TABLE */
    .table-wrap {
        background: var(--card);
        border-radius: var(--r-lg);
        box-shadow: var(--sh-sm);
        border: 1px solid var(--sep);
        overflow: auto;
        position: relative
    }

    .data-table {
        width: 100%;
        border-collapse: collapse
    }

    .data-table thead {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--bg);
        backdrop-filter: blur(12px)
    }

    .data-table th {
        padding: 10px 16px;
        text-align: left;
        font-size: 10px;
        font-weight: 800;
        color: var(--label3);
        letter-spacing: .06em;
        text-transform: uppercase;
        border-bottom: 1px solid var(--sep);
        white-space: nowrap;
        user-select: none
    }

    .data-table th.sortable {
        cursor: pointer;
        transition: color .12s
    }

    .data-table th.sortable:hover {
        color: var(--blue)
    }

    .data-table th.sortable::after {
        content: '\f0dc';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 9px;
        margin-left: 5px;
        opacity: .3;
        transition: opacity .12s
    }

    .data-table th.sort-asc::after {
        content: '\f0de';
        opacity: .8;
        color: var(--blue)
    }

    .data-table th.sort-desc::after {
        content: '\f0dd';
        opacity: .8;
        color: var(--blue)
    }

    .data-table td {
        padding: 11px 16px;
        border-bottom: 1px solid var(--sep);
        font-size: 13px;
        vertical-align: middle;
        color: var(--label)
    }

    .data-table tr:last-child td {
        border-bottom: none
    }

    .data-table tbody tr {
        transition: background .1s
    }

    .data-table tbody tr:hover td {
        background: var(--fill)
    }

    .data-table tbody tr.selected td {
        background: rgba(27, 58, 107, .07) !important;
        border-bottom-color: rgba(27, 58, 107, .12)
    }

    .data-table tbody tr.selected td:first-child {
        box-shadow: inset 3px 0 0 var(--blue)
    }

    .tbl-actions {
        display: flex;
        gap: 5px
    }

    .tbl-btn {
        width: 28px;
        height: 28px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all .15s
    }

    .tbl-edit {
        background: rgba(27, 58, 107, .1);
        color: var(--blue)
    }

    .tbl-edit:hover {
        background: var(--blue);
        color: white
    }

    .tbl-del {
        background: rgba(255, 59, 48, .1);
        color: var(--red)
    }

    .tbl-del:hover {
        background: var(--red);
        color: white
    }

    .emp-cell {
        display: flex;
        flex-direction: column
    }

    .emp-name-t {
        font-weight: 700;
        color: var(--label);
        font-size: 13px
    }

    .emp-id-t {
        font-size: 11px;
        color: var(--label3)
    }

    /* Bulk action bar */
    .bulk-bar {
        display: none;
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--blue);
        color: white;
        padding: 10px 16px;
        align-items: center;
        gap: 12px;
        border-radius: 0 0 var(--r-lg) var(--r-lg);
        z-index: 3;
        animation: slideUp .18s ease
    }

    .bulk-bar.visible {
        display: flex
    }

    .bulk-bar-count {
        font-size: 13px;
        font-weight: 700;
        flex: 1
    }

    .bulk-bar-btn {
        padding: 6px 14px;
        border-radius: 8px;
        border: 1.5px solid rgba(255, 255, 255, .35);
        background: rgba(255, 255, 255, .1);
        color: white;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: background .12s;
        font-family: 'Inter', sans-serif
    }

    .bulk-bar-btn:hover {
        background: rgba(255, 255, 255, .22)
    }

    .bulk-bar-btn.danger {
        border-color: rgba(255, 100, 80, .6);
        background: rgba(255, 80, 60, .18)
    }

    .bulk-bar-btn.danger:hover {
        background: rgba(255, 80, 60, .35)
    }

    @keyframes slideUp {
        from {
            transform: translateY(8px);
            opacity: 0
        }

        to {
            transform: translateY(0);
            opacity: 1
        }
    }

    /* ALERTS PAGE */
    .tab-bar {
        display: flex;
        gap: 6px;
        margin-bottom: 18px;
        flex-wrap: wrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin
    }

    .tab-btn {
        padding: 8px 18px;
        border-radius: 12px;
        border: 1.5px solid var(--sep);
        background: var(--card);
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        color: var(--label2);
        display: flex;
        align-items: center;
        gap: 7px;
        transition: all .15s;
        box-shadow: var(--sh-sm)
    }

    .tab-btn.active {
        background: var(--blue);
        color: white;
        border-color: var(--blue);
        font-weight: 700;
        box-shadow: 0 4px 14px rgba(2,110,199,.28)
    }

    .tab-count {
        background: rgba(255, 59, 48, .9);
        color: white;
        padding: 1px 6px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 800
    }

    .tab-btn:not(.active) .tab-count {
        background: var(--label4);
        color: var(--label2)
    }

    .tab-content {
        display: none
    }

    .tab-content.active {
        display: block
    }

    .alert-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 12px
    }

    .alert-card {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 16px;
        box-shadow: var(--sh-sm);
        transition: transform .15s, box-shadow .15s
    }

    .alert-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--sh-md)
    }
    .alert-card.critical {
        border-left: 3px solid var(--danger)
    }

    .alert-summary-banner {
        display: flex; align-items: center; gap: 16px; padding: 14px 20px;
        background: linear-gradient(135deg, #fef2f2, #fff1f2);
        border: 1px solid #fecaca; border-radius: var(--r);
        margin-bottom: 14px; font-size: 14px; font-weight: 600; color: #991b1b
    }
    .alert-summary-banner .summary-count {
        font-size: 28px; font-weight: 800; color: #dc2626; line-height: 1
    }
    .alert-summary-banner .summary-items {
        display: flex; gap: 16px; flex: 1; flex-wrap: wrap
    }
    .alert-summary-banner .summary-item {
        display: flex; align-items: center; gap: 6px; font-size: 12px;
        font-weight: 600; color: var(--label2); background: #fff;
        padding: 4px 12px; border-radius: 20px; border: 1px solid var(--sep)
    }
    .alert-summary-banner .summary-item i { font-size: 10px }
    .alert-summary-banner .si-danger { color: #dc2626 }
    .alert-summary-banner .si-warn { color: #d97706 }
    .alert-summary-banner .si-blue { color: var(--blue) }

    .alert-filters {
        display: flex; gap: 10px; margin-bottom: 12px;
        position: relative; z-index: 10
    }
    .alert-filters select {
        padding: 8px 12px; border: 1px solid var(--sep); border-radius: var(--r);
        font-size: 13px; font-weight: 600; background: var(--card); color: var(--label);
        font-family: inherit; cursor: pointer
    }

    .alert-card-top {
        height: 3px;
        border-radius: 3px;
        margin-bottom: 14px;
        background: linear-gradient(90deg, #FF6B47, #FF3B30)
    }

    .alert-card-top.warn {
        background: linear-gradient(90deg, #FFD60A, #FF9500)
    }

    .ac-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 8px
    }

    .ac-name {
        font-weight: 800;
        font-size: 14px;
        color: var(--label)
    }

    .ac-id {
        font-size: 11px;
        color: var(--label3)
    }

    .ac-doc {
        font-size: 13px;
        color: var(--label);
        margin-bottom: 7px;
        font-weight: 600
    }

    .ac-meta {
        display: flex;
        gap: 10px;
        font-size: 11px;
        color: var(--label2);
        font-weight: 500;
        flex-wrap: wrap
    }

    /* DOC SECTIONS */
    .doc-section {
        background: var(--card);
        border-radius: var(--r-lg);
        box-shadow: var(--sh-sm);
        margin-bottom: 16px;
        overflow: hidden
    }

    .doc-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 13px 18px;
        background: var(--bg);
        border-bottom: 1px solid var(--sep);
        flex-wrap: wrap;
        gap: 8px
    }

    .doc-section-title {
        font-weight: 800;
        font-size: 14px;
        color: var(--label);
        display: flex;
        align-items: center;
        gap: 7px
    }

    .doc-section-title i {
        color: var(--blue)
    }

    .doc-section .table-wrap {
        border-radius: 0;
        box-shadow: none
    }

    /* REPORTS */
    .report-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin-bottom: 18px
    }

    .report-kpi {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 16px 18px;
        box-shadow: var(--sh-sm)
    }

    .report-kpi-val {
        font-size: 30px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -1px;
        line-height: 1
    }

    .report-kpi-lbl {
        font-size: 12px;
        font-weight: 600;
        color: var(--label2);
        margin-top: 4px
    }

    .report-progress {
        height: 5px;
        background: var(--fill);
        border-radius: 3px;
        margin-top: 10px;
        overflow: hidden
    }

    .report-progress-bar {
        height: 100%;
        border-radius: 3px;
        transition: width .5s ease
    }

    .report-section {
        background: var(--card);
        border-radius: var(--r-lg);
        box-shadow: var(--sh-sm);
        margin-bottom: 16px;
        overflow: hidden
    }

    .report-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 18px;
        background: var(--bg);
        border-bottom: 1px solid var(--sep);
        flex-wrap: wrap;
        gap: 8px
    }

    .report-section-header h3 {
        font-size: 14px;
        font-weight: 800;
        color: var(--label);
        display: flex;
        align-items: center;
        gap: 7px
    }

    .report-section-header h3 i {
        color: var(--blue)
    }

    .report-section-header p {
        font-size: 12px;
        color: var(--label3);
        font-weight: 500
    }

    .report-section .table-wrap {
        border-radius: 0;
        box-shadow: none
    }

    /* SUPPORT */
    .access-card {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 32px;
        box-shadow: var(--sh-sm);
        max-width: 600px
    }

    .access-icon {
        font-size: 40px;
        color: var(--brand);
        margin-bottom: 12px
    }

    .access-card h2 {
        font-size: 20px;
        font-weight: 800;
        color: var(--label);
        margin-bottom: 10px
    }

    .access-card>p {
        color: var(--label2);
        margin-bottom: 20px;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.6
    }

    .support-contact-card {
        display: flex;
        gap: 16px;
        align-items: center;
        background: rgba(27, 58, 107, .05);
        border-radius: 14px;
        padding: 18px 20px;
        border: 1px solid rgba(27, 58, 107, .12)
    }

    .support-avatar {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #1B3A6B, #0D9488);
        color: white;
        font-weight: 800;
        font-size: 17px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 14px rgba(27, 58, 107, .3)
    }

    .support-name {
        font-weight: 800;
        font-size: 15px;
        color: var(--label);
        margin-bottom: 2px
    }

    .support-role {
        font-size: 12px;
        color: var(--label2);
        font-weight: 600;
        margin-bottom: 8px
    }

    .support-links {
        display: flex;
        gap: 8px;
        flex-wrap: wrap
    }

    .support-link {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 13px;
        font-weight: 700;
        color: var(--blue);
        background: rgba(27, 58, 107, .08);
        padding: 5px 11px;
        border-radius: 100px;
        text-decoration: none;
        transition: background .15s
    }

    .support-link:hover {
        background: rgba(27, 58, 107, .15)
    }

    /* MODALS */
    .modal-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .38);
        z-index: 200;
        align-items: center;
        justify-content: center;
        padding: 20px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        animation: overlayIn .2s ease
    }

    .modal-overlay.open {
        display: flex
    }

    .modal-overlay.closing {
        animation: overlayOut .2s ease forwards
    }

    .modal-overlay.closing .modal {
        animation: modalOut .2s cubic-bezier(.55, .06, .68, .19) forwards
    }

    .modal {
        background: var(--bg2);
        border-radius: 26px;
        width: 100%;
        max-width: 660px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 24px 80px rgba(0,0,0,.22);
        animation: modalIn .28s cubic-bezier(.34, 1.56, .64, 1)
    }

    .modal-sm {
        max-width: 420px
    }

    .modal-wide {
        max-width: 900px
    }

    @keyframes overlayIn {
        from {
            opacity: 0
        }

        to {
            opacity: 1
        }
    }

    @keyframes overlayOut {
        from {
            opacity: 1
        }

        to {
            opacity: 0
        }
    }

    @keyframes modalIn {
        from {
            opacity: 0;
            transform: scale(.92) translateY(12px)
        }

        to {
            opacity: 1;
            transform: scale(1) translateY(0)
        }
    }

    @keyframes modalOut {
        from {
            opacity: 1;
            transform: scale(1) translateY(0)
        }

        to {
            opacity: 0;
            transform: scale(.93) translateY(8px)
        }
    }

    /* Delete modal */
    .del-modal-icon {
        font-size: 44px;
        margin-bottom: 14px;
        color: var(--red)
    }

    .del-msg {
        font-size: 14px;
        color: var(--label);
        font-weight: 600
    }

    .del-warn {
        color: #C47700;
        font-size: 12px;
        font-weight: 600;
        margin-top: 6px;
        display: flex;
        align-items: center;
        gap: 5px;
        justify-content: center
    }

    .modal-header {
        padding: 20px 24px 16px;
        border-bottom: 1px solid var(--sep);
        display: flex;
        justify-content: space-between;
        align-items: center
    }

    .modal-header h2 {
        font-size: 17px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -.3px
    }

    .modal-close {
        width: 28px;
        height: 28px;
        border: none;
        background: var(--fill);
        border-radius: 50%;
        cursor: pointer;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--label2);
        transition: all .15s
    }

    .modal-close:hover {
        background: var(--fill2)
    }

    .modal-body {
        padding: 18px 22px;
        overflow-y: auto;
        flex: 1
    }

    .modal-footer {
        padding: 12px 22px;
        border-top: 0.5px solid var(--sep);
        display: flex;
        justify-content: flex-end;
        gap: 8px
    }

    /* FORMS */
    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px
    }

    .form-group {
        display: flex;
        flex-direction: column;
        gap: 5px
    }

    .form-group label {
        font-size: 11px;
        font-weight: 700;
        color: var(--label2);
        text-transform: uppercase;
        letter-spacing: .3px
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        border: 1px solid var(--sep);
        border-radius: 10px;
        font-family: 'Inter', sans-serif;
        font-size: 13.5px;
        font-weight: 400;
        background: var(--input-bg);
        color: var(--label);
        outline: none;
        transition: border-color .15s, box-shadow .15s;
        appearance: none;
        -webkit-appearance: none
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        box-shadow: 0 0 0 3px rgba(27, 58, 107, .12);
        border-color: var(--blue);
        background: var(--card)
    }

    .form-group select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        padding-right: 28px
    }

    textarea {
        resize: vertical
    }

    .code-wrap {
        display: flex;
        align-items: center;
        background: var(--bg);
        border: 1.5px solid var(--sep);
        border-radius: 11px;
        overflow: hidden;
        transition: border-color .15s
    }

    .code-wrap:focus-within {
        border-color: var(--blue);
        box-shadow: 0 0 0 3px rgba(27, 58, 107, .12)
    }

    .code-prefix {
        padding: 0 10px;
        font-weight: 800;
        font-size: 13px;
        color: #0D9488;
        background: rgba(13, 148, 136, .08);
        border-right: 1.5px solid var(--sep);
        height: 42px;
        display: flex;
        align-items: center
    }

    .code-wrap input {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        flex: 1;
        letter-spacing: 2px;
        font-weight: 700;
        font-size: 15px
    }

    /* INFO BOXES */
    .info-box {
        display: flex;
        gap: 10px;
        align-items: flex-start;
        background: rgba(27, 58, 107, .06);
        border-radius: 11px;
        padding: 12px 14px
    }

    .info-box i {
        color: var(--blue);
        margin-top: 2px;
        flex-shrink: 0
    }

    .info-box strong {
        font-size: 13px;
        color: var(--label);
        font-weight: 700;
        display: block;
        margin-bottom: 2px
    }

    .info-box p {
        font-size: 12px;
        color: var(--label2);
        font-weight: 500;
        margin: 0
    }

    .info-box-amber {
        background: rgba(255, 149, 0, .08)
    }

    .info-box-amber i {
        color: #C47700
    }

    /* DETAIL MODAL — ENTERPRISE TWO-COLUMN */
    .detail-modal-extra-wide { max-width: 1100px }

    .detail-profile-header {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 24px 28px;
        border-bottom: 1px solid var(--separator);
        background: linear-gradient(135deg, #f0f7ff 0%, #f8fbff 60%, #fff 100%)
    }
    .detail-avatar {
        width: 72px; height: 72px; border-radius: 50%;
        background: #026ec7; color: #fff;
        display: flex; align-items: center; justify-content: center;
        font-size: 24px; font-weight: 700; flex-shrink: 0;
        letter-spacing: 1px;
        box-shadow: 0 2px 8px rgba(2, 110, 199, .25)
    }
    .detail-avatar.has-photo { box-shadow: 0 2px 8px rgba(0,0,0,.15) }
    .detail-header-info { flex: 1; min-width: 0 }
    .detail-header-name {
        font-size: 22px; font-weight: 800; color: var(--label);
        margin: 0 0 6px; line-height: 1.2; letter-spacing: -0.3px
    }
    .detail-header-badges {
        display: flex; gap: 8px; flex-wrap: wrap; align-items: center
    }
    .detail-badge {
        display: inline-flex; align-items: center; gap: 4px;
        font-size: 11px; font-weight: 600; padding: 4px 12px;
        border-radius: 20px; background: var(--fill); color: var(--label2)
    }
    .detail-badge i { font-size: 10px }
    .detail-badge-active { background: #e8f5e9; color: #2e7d32 }
    .detail-badge-inactive { background: #fce4ec; color: #c62828 }
    .detail-badge-code { background: #e3f2fd; color: #0d47a1; font-weight: 700 }
    .detail-header-actions { display: flex; gap: 8px; flex-shrink: 0 }

    .detail-columns {
        display: grid; grid-template-columns: 340px 1fr;
        min-height: 350px
    }
    .detail-left {
        border-right: 1px solid var(--separator);
        padding: 20px 24px;
        overflow-y: auto; max-height: 60vh;
        background: #fff
    }
    .detail-right {
        padding: 20px 24px;
        overflow-y: auto; max-height: 60vh;
        background: var(--bg2)
    }

    .detail-section {
        margin-bottom: 20px
    }
    .detail-section:last-child { margin-bottom: 8px }
    .detail-section-title {
        font-size: 10px; font-weight: 700; text-transform: uppercase;
        letter-spacing: 0.8px; color: var(--blue);
        margin-bottom: 10px; padding-bottom: 6px;
        border-bottom: 2px solid var(--fill)
    }
    .detail-field {
        display: flex; justify-content: space-between;
        padding: 6px 0; font-size: 13px;
        border-bottom: 1px solid var(--fill)
    }
    .detail-field:last-child { border-bottom: none }
    .detail-field-label {
        color: var(--label3); font-weight: 500; flex-shrink: 0; margin-right: 12px
    }
    .detail-field-value {
        color: var(--label); font-weight: 600; text-align: right;
        word-break: break-word
    }
    .detail-field-value.muted { color: var(--label3); font-weight: 400; font-style: italic }

    .detail-right-title {
        font-size: 14px; font-weight: 700; color: var(--label);
        margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
        padding-bottom: 10px; border-bottom: 1px solid var(--fill)
    }
    .detail-right-title:not(:first-child) { margin-top: 24px }
    .detail-right-title i { color: var(--blue); font-size: 15px }
    .detail-right-title .count-badge {
        font-size: 11px; font-weight: 700; background: var(--blue);
        color: #fff; padding: 2px 9px; border-radius: 10px;
        min-width: 22px; text-align: center
    }
    .detail-right-title .btn { border: 1px solid var(--separator) }

    /* Detail modal responsive */
    @media(max-width:900px) {
        .detail-columns { grid-template-columns: 1fr; min-height: auto }
        .detail-left { border-right: none; border-bottom: 1px solid var(--separator); max-height: none }
        .detail-right { max-height: none }
        .detail-modal-extra-wide { max-width: 95vw }
    }
    @media(max-width:480px) {
        .detail-profile-header { flex-wrap: wrap; padding: 16px; gap: 12px }
        .detail-avatar { width: 52px; height: 52px; font-size: 18px }
        .detail-header-name { font-size: 18px }
        .detail-left, .detail-right { padding: 14px 16px }
    }

    /* AUDIT LOG */
    .audit-hipaa-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(34, 197, 94, .1);
        color: #15803D;
        border: 1px solid rgba(34, 197, 94, .25);
        font-size: 11px;
        font-weight: 800;
        padding: 5px 12px;
        border-radius: 100px
    }

    /* TOAST */
    .toast {
        position: fixed;
        bottom: 28px;
        right: 28px;
        background: rgba(22, 25, 38, .96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        color: white;
        padding: 13px 16px 0;
        border-radius: 14px;
        font-size: 13px;
        font-weight: 600;
        box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
        transform: translateY(90px) scale(.9);
        opacity: 0;
        transition: all .32s cubic-bezier(.34, 1.56, .64, 1);
        z-index: 9999;
        max-width: 340px;
        min-width: 220px;
        overflow: hidden
    }

    .toast.show {
        transform: translateY(0) scale(1);
        opacity: 1
    }

    .toast-content {
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 13px
    }

    .toast-icon {
        font-size: 16px;
        flex-shrink: 0;
        line-height: 1
    }

    .toast-msg {
        flex: 1;
        line-height: 1.4
    }

    .toast-close {
        background: none;
        border: none;
        color: rgba(255, 255, 255, .45);
        cursor: pointer;
        font-size: 13px;
        padding: 0;
        margin-left: 6px;
        flex-shrink: 0;
        line-height: 1;
        transition: color .12s
    }

    .toast-close:hover {
        color: white
    }

    .toast-progress {
        height: 3px;
        background: rgba(255, 255, 255, .12);
        margin: 0 -1px
    }

    .toast-progress-bar {
        height: 100%;
        width: 100%;
        border-radius: 0;
        transition: width linear;
        animation: toastCountdown 3.5s linear forwards
    }

    .toast.success .toast-icon {
        color: #34C759
    }

    .toast.success .toast-progress-bar {
        background: #34C759
    }

    .toast.error .toast-icon {
        color: #FF3B30
    }

    .toast.error .toast-progress-bar {
        background: #FF3B30
    }

    .toast.warning .toast-icon {
        color: #FF9500
    }

    .toast.warning .toast-progress-bar {
        background: #FF9500
    }

    .toast.info .toast-icon {
        color: #1B3A6B
    }

    .toast.info .toast-progress-bar {
        background: #1B3A6B
    }

    @keyframes toastCountdown {
        from {
            width: 100%
        }

        to {
            width: 0%
        }
    }

    /* PAGE LOADING BAR */
    .page-load-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        z-index: 9998;
        background: transparent;
        pointer-events: none
    }

    .page-load-bar-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--blue), #14B8A6);
        width: 0%;
        transition: width .3s ease;
        border-radius: 0 2px 2px 0
    }

    .page-load-bar.loading .page-load-bar-fill {
        width: 70%;
        transition: width 1.2s ease
    }

    .page-load-bar.done .page-load-bar-fill {
        width: 100%;
        transition: width .2s ease
    }

    /* SKELETON LOADER */
    @keyframes shimmer {
        0% {
            background-position: -500px 0
        }

        100% {
            background-position: 500px 0
        }
    }

    .skel {
        background: linear-gradient(90deg, var(--fill) 25%, var(--fill2) 50%, var(--fill) 75%);
        background-size: 1000px 100%;
        animation: shimmer 1.4s infinite linear;
        border-radius: 6px
    }

    .skel-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 14px;
        border-bottom: .5px solid var(--sep)
    }

    .skel-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        flex-shrink: 0
    }

    .skel-line {
        height: 11px;
        border-radius: 5px
    }

    .skel-line.w30 {
        width: 30%
    }

    .skel-line.w50 {
        width: 50%
    }

    .skel-line.w70 {
        width: 70%
    }

    .skel-line.w90 {
        width: 90%
    }

    .skel-cell {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px
    }

    .skel-block {
        height: 120px;
        border-radius: var(--r);
        margin: 14px
    }

    /* OVERLAY */
    .overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .4);
        z-index: 99
    }

    /* RESPONSIVE */
    @media(max-width:1400px) {
        .kpi-row {
            grid-template-columns: repeat(3, 1fr)
        }
        .dash-main-row {
            grid-template-columns: 1fr 300px
        }
    }

    @media(max-width:1200px) {
        .dash-main-row {
            grid-template-columns: 1fr
        }

        .dash-right-col {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px
        }
    }

    @media(max-width:900px) {
        .dash-charts-top {
            grid-template-columns: 1fr
        }

        .dash-charts-bottom {
            grid-template-columns: 1fr
        }

        .dash-right-col {
            grid-template-columns: 1fr
        }
    }

    @media(max-width:768px) {
        .sidebar {
            transform: translateX(-100%)
        }

        .sidebar.open {
            transform: translateX(0)
        }

        .overlay.active {
            display: block
        }

        .main {
            margin-left: 0
        }

        .mobile-menu-btn {
            display: flex
        }

        .kpi-row {
            grid-template-columns: repeat(2, 1fr)
        }

        .kpi-grid {
            grid-template-columns: 1fr 1fr
        }

        .page-content {
            padding: 14px
        }

        .form-grid {
            grid-template-columns: 1fr
        }

        .report-grid {
            grid-template-columns: 1fr 1fr
        }

        .alert-row {
            grid-template-columns: 34px 1fr
        }

        .company-grid {
            grid-template-columns: 1fr
        }

        .emp-grid:not(.list-view) {
            grid-template-columns: 1fr 1fr
        }

        .dash-main-row {
            grid-template-columns: 1fr
        }

        .page-toolbar {
            flex-direction: column;
            align-items: stretch
        }

        .toolbar-filters {
            flex-wrap: wrap
        }
    }

    @media(max-width:480px) {
        .kpi-row {
            grid-template-columns: 1fr
        }

        .report-grid {
            grid-template-columns: 1fr
        }

        .page-header {
            flex-direction: column;
            align-items: flex-start
        }

        .page-header-actions {
            width: 100%;
            flex-wrap: wrap
        }

        .dash-banner-search {
            max-width: 100%
        }
    }

    /* CALENDAR */
    .cal-toolbar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 14px;
        flex-wrap: wrap
    }

    .cal-month-label {
        font-size: 18px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -.3px;
        min-width: 200px;
        text-align: center
    }

    .cal-legend {
        display: flex;
        gap: 10px;
        margin-left: auto;
        align-items: center;
        flex-wrap: wrap
    }

    .cal-leg {
        font-size: 11px;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 5px
    }

    .cal-leg::before {
        content: '';
        width: 10px;
        height: 10px;
        border-radius: 50%;
        display: inline-block
    }

    .cal-leg-exp::before {
        background: #EF4444
    }

    .cal-leg-soon::before {
        background: #F59E0B
    }

    .cal-leg-valid::before {
        background: #22C55E
    }

    .cal-grid-header {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
        margin-bottom: 4px
    }

    .cal-grid-header span {
        text-align: center;
        font-size: 11px;
        font-weight: 700;
        color: var(--label3);
        padding: 6px 0;
        text-transform: uppercase;
        letter-spacing: .5px
    }

    .cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        margin-bottom: 16px
    }

    .cal-cell {
        background: var(--card);
        border-radius: 10px;
        min-height: 72px;
        padding: 8px;
        cursor: default;
        position: relative;
        box-shadow: var(--sh-sm);
        transition: transform .12s, box-shadow .12s;
        display: flex;
        flex-direction: column;
        gap: 4px
    }

    .cal-cell-empty {
        background: transparent;
        box-shadow: none
    }

    .cal-cell.cal-has-docs {
        cursor: pointer
    }

    .cal-cell.cal-has-docs:hover {
        transform: translateY(-2px);
        box-shadow: var(--sh-md)
    }

    .cal-cell.cal-today .cal-day-num {
        background: var(--blue);
        color: white;
        border-radius: 50%;
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center
    }

    .cal-day-num {
        font-size: 13px;
        font-weight: 700;
        color: var(--label);
        line-height: 1
    }

    .cal-count {
        font-size: 10px;
        font-weight: 800;
        color: white;
        background: var(--blue);
        border-radius: 100px;
        padding: 1px 5px;
        align-self: flex-start
    }

    .cal-dots {
        display: flex;
        gap: 3px;
        flex-wrap: wrap;
        margin-top: auto
    }

    .cal-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        display: inline-block
    }

    .cal-dot-exp {
        background: #EF4444
    }

    .cal-dot-soon {
        background: #F59E0B
    }

    .cal-dot-valid {
        background: #22C55E
    }

    .cal-clickable { cursor: pointer }
    .cal-clickable:hover { transform: translateY(-2px); box-shadow: var(--sh-md) }
    .cal-dot-event { background: #6366F1 }
    .cal-leg-event::before { background: #6366F1 }

    .cal-evt-chip {
        font-size: 10px;
        font-weight: 600;
        color: #fff;
        background: #6366F1;
        border-radius: 4px;
        padding: 1px 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .cal-section-lbl {
        font-size: 11px;
        font-weight: 700;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .5px;
        padding: 8px 12px 4px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .cal-evt-row { background: rgba(99, 102, 241, .06); border: 1px solid rgba(99,102,241,.15); }

    .cal-day-panel {
        margin-top: 4px
    }

    .cal-doc-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 10px;
        background: var(--bg);
        margin-bottom: 6px
    }

    .cal-doc-info {
        flex: 1;
        min-width: 0
    }

    .cal-doc-name {
        font-size: 13px;
        font-weight: 700;
        color: var(--label);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .cal-doc-type {
        font-size: 11px;
        color: var(--label2);
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    /* REPORT FILTER SYSTEM */
    .rpt-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        gap: 10px;
        flex-wrap: wrap;
        padding: 10px 14px;
        background: var(--bg);
        border: 1px solid var(--sep);
        border-radius: var(--r);
        transition: background .2s, border-color .2s
    }

    .rpt-toolbar.has-selection {
        background: rgba(27, 58, 107, .06);
        border-color: rgba(27, 58, 107, .25)
    }

    .rpt-count {
        font-size: 13px;
        font-weight: 600;
        color: var(--label2)
    }

    .rpt-count strong {
        color: var(--blue);
        font-weight: 800
    }

    .rpt-actions {
        display: flex;
        gap: 8px;
        align-items: center
    }

    /* Checkbox column */
    .data-table th:first-child,
    .data-table td:first-child {
        width: 40px;
        padding-left: 14px;
        padding-right: 6px
    }

    .rpt-cb {
        width: 16px;
        height: 16px;
        accent-color: var(--blue);
        cursor: pointer;
        border-radius: 4px
    }

    /* Report tab panels */
    .rpt-panel {
        display: none
    }

    .rpt-panel.active {
        display: block
    }

    /* USER MANAGEMENT */
    .usr-av {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 12px;
        font-weight: 800;
        flex-shrink: 0
    }

    .usr-nm {
        font-size: 13px;
        font-weight: 700;
        color: var(--label)
    }

    .usr-em {
        font-size: 11px;
        color: var(--label3);
        font-weight: 500
    }

    .pill-admin {
        background: rgba(27, 58, 107, .12);
        color: #152D57
    }

    .pill-staff {
        background: rgba(100, 116, 160, .1);
        color: #6B7A96
    }

    .pill-blocked {
        background: rgba(239, 68, 68, .1);
        color: #DC2626
    }

    /* PROFILE PIC AVATAR */
    .footer-avatar-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
        background: var(--fill);
        border-radius: 10px;
        margin-bottom: 8px;
        cursor: pointer;
        transition: background .15s
    }

    .footer-avatar-wrap:hover {
        background: var(--fill2)
    }

    .footer-avatar {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
        border: 2px solid var(--sep)
    }

    .footer-avatar-initials {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: linear-gradient(135deg, #1B3A6B, #152D57);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 800;
        font-size: 13px;
        flex-shrink: 0
    }

    .footer-avatar-info {
        min-width: 0;
        flex: 1
    }

    .footer-avatar-name {
        font-size: 13px;
        font-weight: 700;
        color: var(--label);
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .footer-avatar-hint {
        font-size: 10px;
        font-weight: 500;
        color: var(--label3);
        display: block
    }

    /* PROFILE PIC PREVIEW */
    .profile-pic-preview {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 16px 0
    }

    .profile-pic-preview img {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid var(--sep);
        box-shadow: var(--sh-md)
    }

    .profile-pic-placeholder {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background: var(--fill);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        color: var(--label3);
        border: 3px dashed var(--sep)
    }

    /* SUPER ADMIN BANNER */
    .sa-company-banner {
        padding: 8px 14px;
        background: linear-gradient(90deg, #0D9488, #152D57);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-shrink: 0
    }

    .sa-banner-label {
        font-size: 10px;
        font-weight: 700;
        color: rgba(255, 255, 255, .7);
        text-transform: uppercase;
        letter-spacing: .5px;
        display: block
    }

    .sa-banner-name {
        font-size: 13px;
        font-weight: 800;
        color: #fff;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .sa-exit-btn {
        background: rgba(255, 255, 255, .2);
        border: 1px solid rgba(255, 255, 255, .3);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 8px;
        cursor: pointer;
        white-space: nowrap;
        transition: background .15s;
        flex-shrink: 0
    }

    .sa-exit-btn:hover {
        background: rgba(255, 255, 255, .3)
    }

    /* TASK CARDS */
    .task-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 14px
    }

    .task-card {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 16px;
        box-shadow: var(--sh-sm);
        transition: transform .15s, box-shadow .15s;
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 10px
    }

    .task-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--sh-md)
    }

    .task-card-top {
        height: 3px;
        border-radius: 3px;
        background: linear-gradient(90deg, #EC4899, #BE185D);
        margin: -16px -16px 0;
        border-radius: var(--r-lg) var(--r-lg) 0 0
    }

    .task-card-top.overdue {
        background: linear-gradient(90deg, #EF4444, #DC2626)
    }

    .task-card-top.done {
        background: linear-gradient(90deg, #22C55E, #16A34A)
    }

    .task-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
        margin-top: 6px
    }

    .task-title {
        font-size: 14px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -.2px;
        flex: 1;
        line-height: 1.3
    }

    .task-note {
        font-size: 12px;
        font-weight: 500;
        color: var(--label2);
        line-height: 1.5;
        flex: 1
    }

    .task-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding-top: 8px;
        border-top: 0.5px solid var(--sep);
        font-size: 11px;
        color: var(--label3);
        font-weight: 500
    }

    .task-meta-row {
        display: flex;
        align-items: center;
        gap: 6px
    }

    .task-meta-row i {
        width: 14px;
        text-align: center;
        color: var(--label3)
    }

    .task-overdue .task-meta-row.due-date {
        color: #DC2626;
        font-weight: 700
    }

    .task-overdue .task-meta-row.due-date i {
        color: #DC2626
    }

    .task-actions {
        display: flex;
        justify-content: flex-end;
        gap: 6px;
        margin-top: auto
    }

    .task-pill {
        padding: 3px 8px;
        border-radius: 100px;
        font-size: 10px;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        gap: 4px
    }

    .task-pill-pending {
        background: rgba(236, 72, 153, .1);
        color: #BE185D
    }

    .task-pill-overdue {
        background: rgba(239, 68, 68, .12);
        color: #DC2626
    }

    .task-pill-done {
        background: rgba(34, 197, 94, .12);
        color: #16A34A
    }

    /* COMPANY GRID (super admin) */
    .company-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 14px
    }

    .company-card {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 18px;
        box-shadow: var(--sh-sm);
        cursor: pointer;
        transition: transform .15s, box-shadow .15s;
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: relative
    }

    .company-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--sh-md)
    }

    .company-card-header {
        display: flex;
        align-items: flex-start;
        gap: 12px
    }

    .company-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
        background: linear-gradient(135deg, #0D9488, #152D57);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 18px;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(13, 148, 136, .3)
    }

    .company-name {
        font-size: 15px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -.2px;
        flex: 1
    }

    .company-id {
        font-size: 11px;
        font-weight: 600;
        color: var(--label3);
        margin-top: 2px
    }

    .company-ssid {
        font-size: 10px;
        font-weight: 500;
        color: var(--label3);
        background: var(--bg);
        padding: 3px 8px;
        border-radius: 6px;
        font-family: 'Courier New', monospace;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .company-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 10px;
        border-top: 0.5px solid var(--sep)
    }

    /* Root admin delete/recover */
    .company-card-deleted {
        opacity: 0.65;
        border-color: #6B728040 !important;
        background: var(--fill) !important;
        position: relative;
    }
    .company-deleted-banner {
        background: rgba(107,114,128,.15);
        color: #6B7280;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        padding: 4px 10px;
        border-radius: 6px;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    .root-delete-btn {
        color: #EF4444 !important;
    }
    .root-delete-btn:hover {
        background: rgba(239,68,68,.08) !important;
    }
    .root-recover-btn {
        color: #22C55E !important;
    }
    .root-recover-btn:hover {
        background: rgba(34,197,94,.08) !important;
    }

    .company-status-live {
        background: rgba(34, 197, 94, .12);
        color: #16A34A;
        font-size: 11px;
        font-weight: 800;
        padding: 3px 9px;
        border-radius: 100px;
        display: inline-flex;
        align-items: center;
        gap: 4px
    }

    .company-status-pending {
        background: rgba(245, 158, 11, .12);
        color: #D97706;
        font-size: 11px;
        font-weight: 800;
        padding: 3px 9px;
        border-radius: 100px;
        display: inline-flex;
        align-items: center;
        gap: 4px
    }

    .company-status-live::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #16A34A;
        display: inline-block
    }

    .company-status-pending::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #D97706;
        display: inline-block
    }

    .company-enter-btn {
        background: rgba(13, 148, 136, .1);
        border: none;
        color: #0D9488;
        font-size: 12px;
        font-weight: 700;
        padding: 5px 11px;
        border-radius: 8px;
        cursor: pointer;
        transition: background .15s
    }

    .company-enter-btn:hover {
        background: rgba(13, 148, 136, .2)
    }

    /* COLLAPSIBLE COMPANY DATA NAV */
    .nav-collapse-btn {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 10px;
        border: none;
        background: rgba(13, 148, 136, .08);
        border-radius: 9px;
        color: #0D9488;
        font-family: 'Inter', sans-serif;
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        transition: background .15s;
        text-align: left;
        margin-bottom: 2px
    }

    .nav-collapse-btn:hover {
        background: rgba(13, 148, 136, .15)
    }

    .nav-collapse-btn i {
        font-size: 9px;
        transition: transform .2s;
        flex-shrink: 0
    }

    /* (dead SA collapse/expand CSS removed) */

    /* SA DASHBOARD KPI CARDS */
    .sa-kpi-row {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
        margin-bottom: 20px
    }

    .sa-kpi-card {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 18px 16px;
        box-shadow: var(--sh-sm);
        display: flex;
        flex-direction: column;
        gap: 6px;
        transition: transform .15s, box-shadow .15s
    }

    .sa-kpi-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--sh-md)
    }

    .sa-kpi-icon {
        width: 36px;
        height: 36px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        margin-bottom: 2px
    }

    .sa-kpi-val {
        font-size: 26px;
        font-weight: 800;
        color: var(--label);
        letter-spacing: -1px;
        line-height: 1
    }

    .sa-kpi-lbl {
        font-size: 11px;
        font-weight: 600;
        color: var(--label2)
    }

    .sa-kpi-purple .sa-kpi-icon {
        background: rgba(13, 148, 136, .12);
        color: #0D9488
    }

    .sa-kpi-green .sa-kpi-icon {
        background: rgba(34, 197, 94, .12);
        color: #16A34A
    }

    .sa-kpi-amber .sa-kpi-icon {
        background: rgba(245, 158, 11, .12);
        color: #D97706
    }

    .sa-kpi-blue .sa-kpi-icon {
        background: rgba(59, 130, 246, .12);
        color: #3B82F6
    }

    .sa-kpi-teal .sa-kpi-icon {
        background: rgba(14, 165, 233, .12);
        color: #0EA5E9
    }

    .sa-kpi-red .sa-kpi-icon {
        background: rgba(239, 68, 68, .12);
        color: #DC2626
    }

    @media(max-width:1200px) {
        .sa-kpi-row {
            grid-template-columns: repeat(3, 1fr)
        }
    }

    @media(max-width:600px) {
        .sa-kpi-row {
            grid-template-columns: repeat(2, 1fr)
        }
    }

    /* ── ANNOUNCEMENT BANNER ────────────────────────────────────── */
    .announcement-banner {
        background: linear-gradient(135deg, #1B3A6B, #1D3461);
        border-radius: var(--r-lg);
        padding: 0;
        margin-bottom: 14px;
        overflow: hidden;
        box-shadow: 0 4px 16px rgba(27, 58, 107, .22)
    }

    .ann-inner {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px
    }

    .ann-icon-wrap {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        background: rgba(245, 158, 11, .2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #F59E0B;
        font-size: 14px;
        flex-shrink: 0
    }

    .ann-body {
        flex: 1;
        min-width: 0
    }

    .ann-title {
        font-size: 13px;
        font-weight: 800;
        color: #fff;
        display: block
    }

    .ann-msg {
        font-size: 12px;
        color: rgba(255, 255, 255, .7);
        display: block;
        margin-top: 2px;
        line-height: 1.4
    }

    .ann-meta {
        font-size: 10px;
        color: rgba(255, 255, 255, .4);
        font-weight: 600;
        white-space: nowrap;
        flex-shrink: 0
    }

    .ann-dismiss {
        background: rgba(255, 255, 255, .1);
        border: 1px solid rgba(255, 255, 255, .2);
        color: rgba(255, 255, 255, .7);
        width: 28px;
        height: 28px;
        border-radius: 7px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        flex-shrink: 0;
        transition: background .15s
    }

    .ann-dismiss:hover {
        background: rgba(255, 255, 255, .2);
        color: #fff
    }

    .ann-icon {
        font-size: 16px;
        color: #F59E0B;
        flex-shrink: 0
    }

    .ann-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0
    }

    .ann-more {
        background: rgba(255, 255, 255, .12);
        border: 1px solid rgba(255, 255, 255, .2);
        color: rgba(255, 255, 255, .85);
        padding: 5px 12px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer
    }

    /* ── SA USERS PAGE ───────────────────────────────────────────── */
    .sa-user-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 14px
    }

    .sa-user-card {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 18px;
        box-shadow: var(--sh-sm);
        border: 1px solid var(--sep);
        display: flex;
        align-items: center;
        gap: 14px;
        transition: box-shadow .15s
    }

    .sa-user-card:hover {
        box-shadow: var(--sh-md)
    }

    .sa-user-card.root-card {
        border-color: rgba(139, 92, 246, .3);
        background: linear-gradient(135deg, var(--card), rgba(139, 92, 246, .04))
    }

    .sau-avatar {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 900;
        font-size: 16px;
        color: #fff;
        flex-shrink: 0;
        background: linear-gradient(135deg, #8B5CF6, #7C3AED)
    }

    .sau-avatar.root {
        background: linear-gradient(135deg, #F59E0B, #D97706)
    }

    .sau-info {
        flex: 1;
        min-width: 0
    }

    .sau-name {
        font-size: 14px;
        font-weight: 800;
        color: var(--label);
        line-height: 1.2
    }

    .sau-email {
        font-size: 12px;
        color: var(--label3);
        margin-top: 2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .sau-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 10px;
        font-weight: 700;
        padding: 3px 9px;
        border-radius: 20px;
        margin-top: 5px
    }

    .sau-badge.root {
        background: rgba(245, 158, 11, .12);
        color: #D97706
    }

    .sau-badge.sa {
        background: rgba(139, 92, 246, .12);
        color: #8B5CF6
    }

    .sau-actions {
        display: flex;
        gap: 6px;
        flex-shrink: 0
    }

    .sau-remove-btn {
        background: rgba(239, 68, 68, .08);
        border: 1px solid rgba(239, 68, 68, .2);
        color: #DC2626;
        font-size: 12px;
        font-weight: 700;
        padding: 6px 12px;
        border-radius: 8px;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        transition: all .15s
    }

    .sau-remove-btn:hover {
        background: rgba(239, 68, 68, .15)
    }

    /* ── BROADCASTS PAGE ────────────────────────────────────────── */
    .broadcast-card {
        background: var(--card);
        border-radius: var(--r-lg);
        padding: 18px;
        box-shadow: var(--sh-sm);
        border: 1px solid var(--sep);
        margin-bottom: 10px;
        transition: box-shadow .15s
    }

    .broadcast-card:hover {
        box-shadow: var(--sh-md)
    }

    .bc-header {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 8px
    }

    .bc-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: linear-gradient(135deg, #F59E0B, #D97706);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 15px;
        flex-shrink: 0
    }

    .bc-title-row {
        flex: 1;
        min-width: 0
    }

    .bc-title {
        font-size: 14px;
        font-weight: 800;
        color: var(--label);
        line-height: 1.2
    }

    .bc-target {
        font-size: 11px;
        font-weight: 600;
        margin-top: 3px
    }

    .bc-target.all {
        color: #4F6BED
    }

    .bc-target.company {
        color: #0D9488
    }

    .bc-message {
        font-size: 13px;
        color: var(--label2);
        line-height: 1.5;
        margin-bottom: 10px
    }

    .bc-footer {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap
    }

    .bc-meta {
        font-size: 11px;
        color: var(--label3);
        display: flex;
        align-items: center;
        gap: 5px
    }

    .bc-expiry {
        font-size: 11px;
        font-weight: 600
    }

    .bc-expiry.active {
        color: #16A34A
    }

    .bc-expiry.expired {
        color: #DC2626
    }

    .bc-delete-btn {
        margin-left: auto;
        background: rgba(239, 68, 68, .08);
        border: 1px solid rgba(239, 68, 68, .15);
        color: #DC2626;
        font-size: 11px;
        font-weight: 700;
        padding: 5px 10px;
        border-radius: 7px;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        transition: all .15s
    }

    .bc-delete-btn:hover {
        background: rgba(239, 68, 68, .15)
    }

    /* ── SUPPORT CENTER ─────────────────────────────────────────── */
    .sc-hero {
        display: flex;
        align-items: center;
        gap: 18px;
        background: linear-gradient(135deg, #1B2437, #2D3A52);
        border-radius: 18px;
        padding: 24px 28px;
        margin-bottom: 24px
    }

    .sc-hero-icon {
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, #0D9488, #0A7A6E);
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 24px;
        flex-shrink: 0;
        box-shadow: 0 6px 20px rgba(13, 148, 136, .4)
    }

    .sc-hero-text {
        flex: 1
    }

    .sc-hero-title {
        font-size: 22px;
        font-weight: 800;
        color: #fff;
        letter-spacing: -.3px
    }

    .sc-hero-sub {
        font-size: 13px;
        color: rgba(255, 255, 255, .55);
        margin-top: 3px
    }

    .sc-hero-badge {
        background: rgba(13, 148, 136, .25);
        color: #5EEAD4;
        border: 1px solid rgba(13, 148, 136, .3);
        border-radius: 8px;
        padding: 4px 12px;
        font-size: 12px;
        font-weight: 700;
        flex-shrink: 0
    }

    .sc-tabs {
        display: flex;
        gap: 6px;
        margin-bottom: 24px;
        flex-wrap: wrap
    }

    .sc-tab {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 9px 16px;
        border: 1.5px solid var(--border);
        border-radius: 10px;
        background: var(--card);
        color: var(--label2);
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all .15s
    }

    .sc-tab:hover {
        border-color: var(--blue);
        color: var(--blue)
    }

    .sc-tab.active {
        background: var(--blue);
        border-color: var(--blue);
        color: #fff;
        box-shadow: 0 3px 10px rgba(13, 148, 136, .3)
    }

    .sc-section {
        display: none
    }

    .sc-section.active {
        display: block
    }

    .sc-intro {
        font-size: 14px;
        color: var(--label2);
        line-height: 1.7;
        margin-bottom: 24px;
        padding: 16px 20px;
        background: var(--fill);
        border-radius: 12px;
        border-left: 4px solid var(--blue)
    }

    .sc-kpi-strip {
        display: flex;
        gap: 12px;
        margin-bottom: 28px;
        flex-wrap: wrap
    }

    .sc-kpi {
        flex: 1;
        min-width: 100px;
        text-align: center;
        background: var(--card);
        border: 1.5px solid var(--border);
        border-radius: 14px;
        padding: 16px 12px
    }

    .sc-kpi-num {
        font-size: 26px;
        font-weight: 800;
        color: var(--blue);
        letter-spacing: -.5px
    }

    .sc-kpi-lbl {
        font-size: 11px;
        font-weight: 600;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .5px;
        margin-top: 3px
    }

    .sc-cat-label {
        font-size: 11px;
        font-weight: 700;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .8px;
        margin-bottom: 12px;
        margin-top: 28px;
        display: flex;
        align-items: center;
        gap: 8px
    }

    .sc-cat-label::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border)
    }

    .sc-feature-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px
    }

    .sc-grid-3 {
        grid-template-columns: repeat(3, 1fr)
    }

    @media(max-width:900px) {

        .sc-feature-grid,
        .sc-grid-3 {
            grid-template-columns: 1fr
        }
    }

    .sc-card {
        display: flex;
        gap: 14px;
        align-items: flex-start;
        background: var(--card);
        border: 1.5px solid var(--border);
        border-radius: 14px;
        padding: 16px;
        transition: box-shadow .15s, border-color .15s
    }

    .sc-card:hover {
        box-shadow: 0 4px 20px rgba(0, 0, 0, .07);
        border-color: var(--blue-light, rgba(13, 148, 136, .3))
    }

    .sc-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 18px;
        flex-shrink: 0
    }

    .sc-card-body {
        flex: 1
    }

    .sc-card-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--label);
        margin-bottom: 5px
    }

    .sc-card-desc {
        font-size: 12px;
        color: var(--label2);
        line-height: 1.65
    }

    .sc-card-blue {
        border-top: 3px solid #3B82F6
    }

    .sc-card-green {
        border-top: 3px solid #22C55E
    }

    .sc-card-purple {
        border-top: 3px solid #0D9488
    }

    .sc-card-amber {
        border-top: 3px solid #F59E0B
    }

    .sc-card-red {
        border-top: 3px solid #EF4444
    }

    .sc-card-teal {
        border-top: 3px solid #0EA5E9
    }

    .sc-card-pink {
        border-top: 3px solid #EC4899
    }

    .sc-pill-card {
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--card);
        border: 1.5px solid var(--border);
        border-radius: 10px;
        padding: 12px 14px;
        font-size: 12px;
        font-weight: 500;
        color: var(--label2)
    }

    .sc-pill-card i {
        font-size: 16px;
        flex-shrink: 0
    }

    .sc-file-card {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: var(--fill);
        border: 1.5px solid var(--border);
        border-radius: 10px;
        padding: 14px 16px
    }

    .sc-file-name {
        font-size: 13px;
        font-weight: 700;
        color: var(--blue);
        font-family: 'Courier New', monospace
    }

    .sc-file-desc {
        font-size: 11px;
        color: var(--label2);
        line-height: 1.5
    }

    /* ── COMPANY SUPPORT GUIDE ──────────────────────────────────── */
    .sup-search-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--card);
        border: 1.5px solid var(--sep);
        border-radius: 12px;
        padding: 10px 16px;
        margin-bottom: 16px;
        transition: border-color .15s
    }

    .sup-search-wrap:focus-within {
        border-color: var(--blue)
    }

    .sup-search-wrap>i {
        color: var(--label3);
        font-size: 14px;
        flex-shrink: 0
    }

    .sup-search-wrap input {
        flex: 1;
        border: none;
        background: none;
        font-size: 13px;
        color: var(--label);
        font-family: inherit;
        outline: none
    }

    .sup-search-wrap input::placeholder {
        color: var(--label3)
    }

    .sup-search-count {
        font-size: 12px;
        font-weight: 600;
        color: var(--label3);
        white-space: nowrap;
        flex-shrink: 0
    }

    .sup-guide {
        display: flex;
        flex-direction: column;
        gap: 8px
    }

    .sup-accordion {
        background: var(--card);
        border: 1px solid var(--sep);
        border-radius: 14px;
        overflow: hidden;
        box-shadow: var(--sh-sm)
    }

    .sup-accordion-hdr {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 18px;
        cursor: pointer;
        user-select: none;
        transition: background .12s
    }

    .sup-accordion-hdr:hover {
        background: var(--fill)
    }

    .sup-section-hdr-inner {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 800;
        color: var(--label)
    }

    .sup-accordion-meta {
        display: flex;
        align-items: center;
        gap: 10px
    }

    .sup-card-count {
        font-size: 11px;
        font-weight: 600;
        color: var(--label3)
    }

    .sup-chevron {
        font-size: 11px;
        color: var(--label3);
        transition: transform .2s
    }

    .sup-accordion.open .sup-chevron {
        transform: rotate(180deg)
    }

    .sup-accordion-body {
        display: none;
        padding: 0 14px 14px
    }

    .sup-accordion.open .sup-accordion-body {
        display: block
    }

    .sup-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding-top: 10px
    }

    @media(max-width:768px) {
        .sup-grid {
            grid-template-columns: 1fr
        }
    }

    .sup-card {
        background: var(--fill);
        border-radius: 10px;
        padding: 14px;
        border-left: 3px solid var(--sep);
        transition: border-color .15s
    }

    .sup-card:hover {
        border-left-color: var(--blue)
    }

    .sup-card-title {
        font-size: 13px;
        font-weight: 700;
        color: var(--label);
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        gap: 8px
    }

    .sup-card-title i {
        color: var(--blue);
        font-size: 12px
    }

    .sup-card-body {
        font-size: 12px;
        color: var(--label2);
        line-height: 1.7
    }

    /* ══════════════════════════════════════════════════════════
       COMPATIBILITY LAYER — classes used in app.html
       ══════════════════════════════════════════════════════════ */

    /* ── ICON BUTTON ───────────────────────────────────────────── */
    .icon-btn {
        background: none;
        border: 1px solid var(--border);
        color: var(--label2);
        width: 34px;
        height: 34px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: background .15s, color .15s;
        flex-shrink: 0
    }

    .icon-btn:hover { background: var(--fill); color: var(--label) }

    /* ── MODALS ────────────────────────────────────────────────── */
    /* .modal-box is an alias for .modal */
    .modal-box {
        background: var(--bg2);
        border-radius: 18px;
        width: 100%;
        max-width: 660px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        box-shadow: 0 24px 80px rgba(0,0,0,.25);
        animation: modalIn .28s cubic-bezier(.34,1.56,.64,1)
    }

    .modal-large { max-width: 860px }

    .modal-icon {
        width: 54px;
        height: 54px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        margin: 0 auto 12px;
        flex-shrink: 0
    }

    .modal-icon.warn  { background: rgba(245,158,11,.12); color: #D97706 }
    .modal-icon.danger{ background: rgba(239,68,68,.12);  color: #DC2626 }
    .modal-icon.info  { background: rgba(37,99,235,.1);   color: #2563EB }
    .modal-icon.success{ background: rgba(34,197,94,.1);  color: #16A34A }

    .modal-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 16px 22px;
        border-top: 1px solid var(--sep)
    }

    .modal-actions.centered { justify-content: center }

    .modal-subtitle {
        font-size: 12px;
        color: var(--label3);
        margin-top: 2px
    }

    .centered { justify-content: center }

    /* ── LOADING OVERLAY ───────────────────────────────────────── */
    #loading {
        position: fixed;
        inset: 0;
        background: var(--bg);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px
    }

    .loading-spinner {
        font-size: 40px;
        color: var(--blue)
    }

    .loading-text {
        font-size: 14px;
        font-weight: 600;
        color: var(--label2)
    }

    /* ── FORMS ─────────────────────────────────────────────────── */
    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px
    }

    .form-group {
        display: flex;
        flex-direction: column;
        gap: 5px
    }

    .form-group.full-width { grid-column: 1 / -1 }
    .full-width { grid-column: 1 / -1 }
    .flex-1 { flex: 1; min-width: 0 }

    .form-group label {
        font-size: 12px;
        font-weight: 600;
        color: var(--label2)
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        background: var(--input-bg);
        border: 1.5px solid var(--sep);
        border-radius: 11px;
        padding: 10px 13px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        color: var(--label);
        transition: border-color .15s, box-shadow .15s;
        width: 100%
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--blue);
        background: var(--card);
        box-shadow: 0 0 0 3px rgba(2,110,199,.10)
    }

    .required::after { content: ' *'; color: var(--red) }

    .dup-warning {
        font-size: 12px;
        color: var(--red);
        margin-top: 4px;
        display: none
    }

    /* ── DASHBOARD ─────────────────────────────────────────────── */
    .dash-greeting-row {
        margin-bottom: 20px
    }

    .dash-greeting-row h2 {
        font-size: 22px;
        font-weight: 800;
        color: var(--label)
    }

    .dash-greeting-row p {
        font-size: 13px;
        color: var(--label2);
        margin-top: 3px
    }

    .dash-company-row {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 4px
    }
    .dash-company-row .dash-company-icon {
        background: rgba(2, 110, 199, .08);
        color: var(--blue);
    }
    .dash-company-row .dash-company-name {
        color: var(--label3);
    }

    .today-focus {
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(245,158,11,.1);
        border: 1px solid rgba(245,158,11,.2);
        border-radius: var(--r);
        padding: 12px 16px;
        margin-bottom: 16px;
        font-size: 13px;
        font-weight: 500;
        color: #92400E
    }

    .dash-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 16px
    }

    .dash-card {
        background: var(--card);
        border-radius: var(--r);
        padding: 18px 20px;
        box-shadow: var(--sh-sm)
    }

    .dash-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px
    }

    .dash-card-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--label)
    }

    .dash-list { display: flex; flex-direction: column; gap: 8px }

    .dash-search-wrap {
        position: relative;
        margin-bottom: 14px
    }

    .dash-search-box {
        width: 100%;
        background: var(--input-bg);
        border: 1px solid var(--border);
        border-radius: 9px;
        padding: 8px 12px 8px 36px;
        font-size: 13px;
        font-family: 'Inter', sans-serif;
        color: var(--label)
    }

    .dash-search-box:focus { outline: none; border-color: var(--blue) }

    /* ── SECTION / VIEW ────────────────────────────────────────── */
    .section-heading {
        font-size: 16px;
        font-weight: 700;
        color: var(--label);
        margin-bottom: 12px
    }

    .view-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 14px
    }

    .view-field {
        display: flex;
        flex-direction: column;
        gap: 2px
    }

    .view-field label {
        font-size: 11px;
        font-weight: 600;
        color: var(--label3);
        text-transform: uppercase;
        letter-spacing: .4px
    }

    .view-field span {
        font-size: 14px;
        color: var(--label);
        font-weight: 500
    }

    /* ── CHART / CANVAS ────────────────────────────────────────── */
    .chart-canvas-wrap { position: relative; width: 100%; height: 220px }
    .donut-canvas-wrap { position: relative; width: 180px; height: 180px; margin: 0 auto }
    .donut-wrap { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap }
    .bar-chart-wrap { position: relative; width: 100%; height: 200px }
    .chart-range-btns { display: flex; gap: 6px; margin-bottom: 10px }

    /* ── DOCUMENTS TABS ────────────────────────────────────────── */
    .doc-tabs { display: flex; gap: 4px; margin-bottom: 14px }
    .doc-tab {
        padding: 7px 14px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        background: var(--fill);
        color: var(--label2);
        border: 1px solid transparent;
        transition: all .15s
    }
    .doc-tab.active { background: var(--blue); color: #fff }

    /* ── VISITS TABS ───────────────────────────────────────────── */
    .visit-tabs { display: flex; gap: 4px; margin-bottom: 14px }
    .visit-tab {
        padding: 7px 14px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        background: var(--fill);
        color: var(--label2);
        border: 1px solid transparent;
        transition: all .15s
    }
    .visit-tab.active { background: var(--blue); color: #fff }

    /* ── TASKS ─────────────────────────────────────────────────── */
    .tasks-tabs { display: flex; gap: 4px; margin-bottom: 14px }
    .tasks-tab {
        padding: 7px 14px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        background: var(--fill);
        color: var(--label2);
        transition: all .15s
    }
    .tasks-tab.active { background: var(--blue); color: #fff }
    .tasks-kpi-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap }
    .task-kpi-chip {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: var(--card);
        border: 1px solid var(--sep);
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        color: var(--label2)
    }
    .tasks-grid { display: flex; flex-direction: column; gap: 10px }
    .pending { color: var(--orange) }

    /* ── READINESS ─────────────────────────────────────────────── */
    .readiness-header {
        display: flex;
        align-items: center;
        gap: 40px;
        margin-bottom: 28px;
        padding: 32px;
        background: var(--card);
        border-radius: var(--r-xl);
        border: 1px solid var(--sep);
        box-shadow: var(--sh-sm)
    }
    .readiness-header-text { flex: 1 }
    .readiness-header-text h3 { font-size: 28px; font-weight: 900; color: var(--label); letter-spacing: -0.8px; margin-bottom: 8px }
    .readiness-header-text p { font-size: 15px; color: var(--label3); font-weight: 500; margin-bottom: 16px }
    .readiness-score-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0 }
    .health-score-wrap { position: relative; width: 140px; height: 140px }
    .health-ring { width: 100%; height: 100% }
    .health-score-inner {
        position: absolute; inset: 0;
        display: flex; flex-direction: column; align-items: center; justify-content: center
    }
    .health-score-val { font-size: 28px; font-weight: 900; color: var(--label); letter-spacing: -1px }
    .health-score-label { font-size: 10px; color: var(--label3); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-top: 2px }
    .readiness-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px }
    .readiness-bar {
        height: 8px;
        background: var(--fill);
        border-radius: 100px;
        overflow: hidden;
        border: 1px solid var(--sep)
    }
    .readiness-bar-fill { height: 100%; border-radius: 100px; transition: width .8s ease }
    .readiness-compliance-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px
    }
    .readiness-compliance-label { font-size: 11px; font-weight: 800; color: var(--label3); text-transform: uppercase; letter-spacing: .08em }
    .readiness-compliance-status { font-size: 11px; font-weight: 800; color: #16A34A; text-transform: uppercase }
    .hs-detail { font-size: 12px; color: var(--label2); margin-top: 4px }

    /* ── ALERTS ────────────────────────────────────────────────── */
    .alerts-section { margin-bottom: 20px }
    .alerts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 12px }
    .alert-cards { display: flex; flex-direction: column; gap: 10px }

    /* ── POLICIES ──────────────────────────────────────────────── */
    .pol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px }
    .pol-ack-summary { font-size: 12px; color: var(--label3); margin-top: 6px }
    .proof-section { margin-top: 10px }

    /* ── COMPANIES (SA) ────────────────────────────────────────── */
    .companies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px }

    /* ── REPORTS ───────────────────────────────────────────────── */
    .reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px }

    /* ── USERS ─────────────────────────────────────────────────── */
    .usr-list { display: flex; flex-direction: column; gap: 10px }

    /* ── SUBSCRIPTION ──────────────────────────────────────────── */
    .plan-banner {
        background: linear-gradient(135deg, var(--blue), #2563EB);
        color: #fff;
        border-radius: var(--r);
        padding: 20px 24px;
        margin-bottom: 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap
    }
    .sub-current { margin-bottom: 16px }
    .sub-current-card {
        background: var(--card);
        border-radius: var(--r);
        padding: 18px 22px;
        box-shadow: var(--sh-sm);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap
    }
    .sub-current-left { display: flex; flex-direction: column; gap: 4px }
    .sub-plan-rate { font-size: 28px; font-weight: 800; color: var(--label); letter-spacing: -1px }
    .sub-plan-users { font-size: 12px; color: var(--label3) }
    .varies-notice { font-size: 12px; color: var(--label3); margin-top: 4px; font-style: italic }

    /* ── SUPPORT ───────────────────────────────────────────────── */
    .support-wrap { max-width: 780px }
    .support-header { margin-bottom: 16px }
    .support-header h2 { font-size: 18px; font-weight: 700; color: var(--label) }
    .support-label { font-size: 12px; font-weight: 600; color: var(--label2); margin-bottom: 6px }
    .support-card {
        background: var(--card);
        border-radius: var(--r);
        padding: 16px 18px;
        box-shadow: var(--sh-sm);
        margin-bottom: 12px
    }

    /* ── HELP PAGE ──────────────────────────────────────────────── */
    .help-section-label {
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .06em;
        color: var(--label3);
        text-transform: uppercase;
        margin-bottom: 12px
    }
    .help-feature-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 12px;
        margin-bottom: 8px
    }
    .help-feature-card {
        background: var(--card);
        border: 1px solid var(--sep);
        border-radius: var(--r);
        padding: 16px;
        display: flex;
        gap: 14px;
        align-items: flex-start
    }
    .help-feature-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        flex-shrink: 0
    }
    .help-feature-body { flex: 1; min-width: 0 }
    .help-feature-title {
        font-size: 13px;
        font-weight: 700;
        color: var(--label);
        margin-bottom: 5px
    }
    .help-feature-desc {
        font-size: 12px;
        color: var(--label3);
        line-height: 1.55
    }
    .help-faq { display: flex; flex-direction: column; gap: 5px; margin-bottom: 0 }
    .help-faq-q { font-size: 13px; font-weight: 700; color: var(--label) }
    .help-faq-a { font-size: 12px; color: var(--label3); line-height: 1.55 }

    /* ── SA DASHBOARD ──────────────────────────────────────────── */
    .sa-dash-content { margin-top: 16px }

    /* ── BROADCASTS ────────────────────────────────────────────── */
    .broadcasts-list { display: flex; flex-direction: column; gap: 12px }

    /* ── PAYMENTS ──────────────────────────────────────────────── */
    .payments-list { display: flex; flex-direction: column; gap: 10px }

    /* ── PROFILE ───────────────────────────────────────────────── */
    .uprof-avatar {
        width: 72px;
        height: 72px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--blue), #2563EB);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-weight: 800;
        font-size: 24px;
        flex-shrink: 0;
        overflow: hidden
    }
    .uprof-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%
    }
    .uprof-avatar-section { display: flex; align-items: center; gap: 14px; margin-bottom: 18px }
    .uprof-avatar-actions { display: flex; flex-direction: column; gap: 6px }

    /* ── RESULT COUNT ──────────────────────────────────────────── */
    .result-count {
        font-size: 12px;
        color: var(--label3);
        margin-bottom: 10px
    }

    /* ── KPI GRID 4 (4-column variant) ────────────────────────── */
    .kpi-grid-4 {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
        margin-bottom: 20px
    }

    /* ── ANNOUNCEMENT BANNER ───────────────────────────────────── */
    .announcement-banner {
        background: linear-gradient(90deg, #1B3A6B, #2563EB);
        color: #fff;
        border-radius: var(--r);
        padding: 12px 18px;
        margin-bottom: 16px
    }
    .ann-inner { display: flex; align-items: center; gap: 12px }
    .ann-body { flex: 1; min-width: 0 }
    .ann-title { font-size: 14px; font-weight: 700 }
    .ann-msg { font-size: 12px; opacity: .85; margin-top: 2px }
    .ann-meta { font-size: 11px; opacity: .6; margin-top: 2px }
    .ann-more { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap }

    /* ── PURPLE COLOR VARIANT ──────────────────────────────────── */
    .kpi-icon.purple { background: rgba(139,92,246,.12); color: #7C3AED }

    /* ── DARK MODE THEME ──────────────────────────────────────── */
    [data-theme="dark"] {
        --bg: #0F1117;
        --bg2: #171923;
        --card: #1E2130;
        --sidebar-bg: #13151E;
        --topbar-bg: rgba(23,25,35,0.88);
        --input-bg: #252836;
        --sep: rgba(255, 255, 255, 0.07);
        --border: rgba(255, 255, 255, 0.07);
        --fill: rgba(2, 110, 199, 0.10);
        --fill2: rgba(2, 110, 199, 0.18);
        --label: #F1F5F9;
        --label2: #94A3B8;
        --label3: #64748B;
        --label4: rgba(100, 116, 136, 0.25);
        --sh-sm: 0 0 0 1px rgba(255,255,255,.04), 0 2px 8px rgba(0,0,0,.3);
        --sh-md: 0 0 0 1px rgba(255,255,255,.04), 0 8px 24px rgba(0,0,0,.4);
        --sh-lg: 0 0 0 1px rgba(255,255,255,.04), 0 24px 64px rgba(0,0,0,.6);
    }

    /* Body & layout */
    [data-theme="dark"] body {
        background: var(--bg);
        color: var(--label);
    }

    [data-theme="dark"] .sidebar {
        box-shadow: 1px 0 0 rgba(255,255,255,.05), 4px 0 24px rgba(0,0,0,.3);
    }

    [data-theme="dark"] .sidebar-logo-icon {
        box-shadow: none;
    }

    [data-theme="dark"] .nav-item.active {
        box-shadow: 0 4px 14px rgba(2,110,199,.35)
    }

    [data-theme="dark"] .kpi-card::after {
        background: rgba(255,255,255,.02)
    }

    [data-theme="dark"] .kpi-card:hover::after {
        background: rgba(255,255,255,.04)
    }

    /* Cards & surfaces */
    [data-theme="dark"] .modal {
        background: var(--bg2);
    }

    [data-theme="dark"] .doc-section-header,
    [data-theme="dark"] .report-section-header {
        background: rgba(255, 255, 255, 0.03);
    }

    [data-theme="dark"] .data-table thead {
        background: rgba(20, 22, 32, 0.97);
        backdrop-filter: none;
    }

    /* Inputs & controls */
    [data-theme="dark"] .form-group input,
    [data-theme="dark"] .form-group select,
    [data-theme="dark"] .form-group textarea {
        background: var(--input-bg);
        color: var(--label);
        border-color: var(--sep);
    }

    [data-theme="dark"] .form-group input::placeholder,
    [data-theme="dark"] .form-group textarea::placeholder {
        color: var(--label3);
    }

    [data-theme="dark"] .code-wrap {
        background: var(--input-bg);
    }

    [data-theme="dark"] .code-wrap input {
        color: var(--label);
    }

    [data-theme="dark"] .code-prefix {
        background: rgba(27, 58, 107, 0.15);
        color: #5EEAD4;
        border-right-color: var(--sep);
    }

    [data-theme="dark"] .topbar-search input {
        color: var(--label);
    }

    [data-theme="dark"] .topbar-search input::placeholder {
        color: var(--label3);
    }

    [data-theme="dark"] .search-wrap input {
        color: var(--label);
    }

    [data-theme="dark"] .search-wrap input::placeholder {
        color: var(--label3);
    }

    [data-theme="dark"] .filter-bar select {
        color: var(--label);
    }

    [data-theme="dark"] .data-table tbody tr.selected td {
        background: rgba(27, 58, 107, .12) !important
    }

    [data-theme="dark"] .rpt-toolbar.has-selection {
        background: rgba(27, 58, 107, .1);
        border-color: rgba(27, 58, 107, .3)
    }

    [data-theme="dark"] .bulk-bar {
        background: #152D57
    }

    [data-theme="dark"] .rate-input:focus {
        border-color: var(--blue);
    }

    /* Health panel — stays dark in dark mode */
    [data-theme="dark"] .health-panel {
        background: #071e38 !important;
    }

    /* Support center */
    [data-theme="dark"] .sc-card,
    [data-theme="dark"] .sc-kpi,
    [data-theme="dark"] .sc-pill-card,
    [data-theme="dark"] .sc-file-card {
        background: var(--card);
        border-color: var(--sep);
    }

    [data-theme="dark"] .sc-intro {
        background: var(--fill);
        border-left-color: var(--blue);
    }

    [data-theme="dark"] .sc-tab {
        background: var(--card);
        border-color: var(--sep);
        color: var(--label2);
    }

    [data-theme="dark"] .sc-tab:hover {
        border-color: var(--blue);
        color: var(--blue);
    }

    [data-theme="dark"] .sc-tab.active {
        background: var(--blue);
        border-color: var(--blue);
        color: #fff;
    }

    [data-theme="dark"] .sc-hero {
        background: linear-gradient(135deg, #1B1E2E, #252B3D);
    }

    /* Support guide */
    [data-theme="dark"] .sup-card:hover {
        border-left-color: var(--blue);
    }

    /* Dark mode nav */
    [data-theme="dark"] .nav-icon {
        color: var(--label3);
    }

    [data-theme="dark"] .nav-item:hover .nav-icon {
        color: #5EEAD4 !important;
    }

    [data-theme="dark"] .nav-item:hover {
        color: var(--label);
    }

    [data-theme="dark"] .nav-item.active {
        background: rgba(27, 58, 107, 0.18);
        color: #5EEAD4;
    }

    [data-theme="dark"] .nav-item.active .nav-icon {
        color: #5EEAD4 !important;
    }

    [data-theme="dark"] .nav-label {
        color: rgba(255, 255, 255, 0.2);
    }

    /* Dark mode nav collapse button */
    [data-theme="dark"] .nav-collapse-btn {
        background: rgba(27, 58, 107, 0.12);
        color: #5EEAD4;
    }

    [data-theme="dark"] .nav-collapse-btn:hover {
        background: rgba(27, 58, 107, 0.22);
    }

    /* Dark mode sidebar header & footer icons */
    [data-theme="dark"] .sidebar-header {
        background: rgba(255,255,255,.04);
        border-color: rgba(255,255,255,.08);
    }

    [data-theme="dark"] .sidebar-header:hover {
        background: rgba(255, 255, 255, .07);
    }

    [data-theme="dark"] .sidebar-footer {
        background: rgba(0,0,0,.1)
    }

    [data-theme="dark"] .topbar-icon-group {
        background: rgba(255,255,255,.06);
        border-color: rgba(255,255,255,.08)
    }

    [data-theme="dark"] .sidebar-icon-btn:hover {
        background: rgba(255, 255, 255, .08);
        color: #5EEAD4;
    }

    [data-theme="dark"] .sidebar-header-appname {
        color: rgba(255, 255, 255, .3);
    }

    /* Scrollbar */
    [data-theme="dark"] ::-webkit-scrollbar-track {
        background: var(--bg);
    }

    [data-theme="dark"] ::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.12);
    }

    /* Toast in dark */
    [data-theme="dark"] .toast {
        background: rgba(20, 23, 38, .98);
    }

    [data-theme="dark"] .skel {
        background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .04) 75%);
        background-size: 1000px 100%;
    }

    /* ── THEME TOGGLE BUTTON ──────────────────────────────────── */
    #theme-toggle-btn {
        position: relative;
    }

    #theme-toggle-btn i {
        transition: transform .3s ease, opacity .2s;
    }

    /* ── SUBSCRIPTION PAGE ────────────────────────────────────── */
    .sub-current-banner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        background: var(--card);
        border: 1px solid var(--sep);
        border-radius: var(--r);
        padding: 18px 22px;
        margin-bottom: 16px;
        flex-wrap: wrap
    }

    .sub-current-label {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .6px;
        color: var(--label3);
        display: block;
        margin-bottom: 4px
    }

    .sub-current-plan {
        font-size: 20px;
        font-weight: 800;
        color: var(--label);
        display: block
    }

    .sub-current-rate {
        font-size: 13px;
        font-weight: 600;
        color: var(--label3);
        margin-top: 2px;
        display: block
    }

    .sub-current-right {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center
    }

    .sub-plan-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 700
    }

    .sub-plan-badge.active {
        background: #D1FAE5;
        color: #065F46
    }

    .sub-plan-badge.trial {
        background: #EDE9FE;
        color: #5B21B6
    }

    .sub-plan-badge.none {
        background: var(--fill);
        color: var(--label3)
    }

    [data-theme="dark"] .sub-plan-badge.active {
        background: rgba(5, 150, 105, .2);
        color: #34D399
    }

    [data-theme="dark"] .sub-plan-badge.trial {
        background: rgba(139, 92, 246, .2);
        color: #A78BFA
    }

    .sub-trial-banner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        background: linear-gradient(135deg, rgba(79, 107, 237, .07), rgba(79, 107, 237, .03));
        border: 1px solid rgba(79, 107, 237, .2);
        border-radius: var(--r);
        padding: 16px 20px;
        margin-bottom: 20px;
        flex-wrap: wrap
    }

    .sub-trial-left {
        display: flex;
        align-items: center;
        gap: 14px
    }

    .sub-trial-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--label)
    }

    .sub-trial-sub {
        font-size: 12px;
        color: var(--label3);
        margin-top: 2px
    }

    .sub-plans-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        margin-bottom: 16px
    }

    @media(max-width:900px) {
        .sub-plans-grid {
            grid-template-columns: 1fr
        }
    }

    .sub-plan-card {
        background: var(--card);
        border: 1.5px solid var(--sep);
        border-radius: var(--r-lg);
        padding: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: box-shadow .2s, border-color .2s
    }

    .sub-plan-card:hover {
        box-shadow: var(--sh-md)
    }

    .sub-plan-card.current {
        border-color: #4F6BED;
        box-shadow: 0 0 0 3px rgba(79, 107, 237, .12)
    }

    .sub-plan-accent {
        height: 4px;
        width: 100%
    }

    .sub-plan-body {
        padding: 22px 20px 18px;
        flex: 1;
        display: flex;
        flex-direction: column
    }

    .sub-plan-name {
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .5px;
        color: var(--label3);
        margin-bottom: 6px
    }

    .sub-plan-price {
        font-size: 34px;
        font-weight: 900;
        color: var(--label);
        letter-spacing: -1px;
        line-height: 1
    }

    .sub-plan-price span {
        font-size: 15px;
        font-weight: 500;
        color: var(--label3);
        letter-spacing: 0
    }

    .sub-plan-tagline {
        font-size: 12px;
        color: var(--label3);
        margin-top: 6px;
        margin-bottom: 14px
    }

    .sub-plan-features {
        list-style: none;
        padding: 0;
        margin: 0 0 18px;
        display: flex;
        flex-direction: column;
        gap: 7px;
        flex: 1
    }

    .sub-plan-features li {
        font-size: 12px;
        color: var(--label2);
        display: flex;
        align-items: center;
        gap: 7px
    }

    .sub-plan-features li i {
        color: #4F6BED;
        font-size: 11px;
        flex-shrink: 0
    }

    .sub-plan-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0 20px 20px
    }

    .sub-plan-actions .btn-primary {
        justify-content: center;
        text-decoration: none;
        font-size: 13px
    }

    .sub-plan-actions .btn-ghost {
        justify-content: center;
        font-size: 13px
    }

    .sub-custom-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        background: var(--card);
        border: 1px solid var(--sep);
        border-radius: var(--r);
        padding: 18px 22px;
        flex-wrap: wrap
    }

    .sub-custom-left {
        display: flex;
        align-items: center;
        gap: 14px
    }

    .sub-plan-card.popular {
        border-color: #F59E0B;
        box-shadow: 0 0 0 3px rgba(245,158,11,.12);
        position: relative
    }

    .sub-plan-popular-badge {
        position: absolute;
        top: -11px;
        left: 50%;
        transform: translateX(-50%);
        background: #F59E0B;
        color: #fff;
        font-size: 10px;
        font-weight: 800;
        padding: 3px 12px;
        border-radius: 100px;
        white-space: nowrap;
        letter-spacing: .3px
    }
}

/* ═══════════════════════════════════════════════════════
   PORTAL MODE — hide topbar, zero padding-top
   ═══════════════════════════════════════════════════════ */

/* Topbar is visible for all users */

/* ═══════════════════════════════════════════════════════
   SUPER ADMIN — TOP NAV (master mode)
   ═══════════════════════════════════════════════════════ */

/* When SA is in master mode, hide sidebar + collapse main */
body.sa-master-mode #sidebar            { display: none !important; }
body.sa-master-mode #main               { margin-left: 0 !important; width: 100% !important; }
body.sa-master-mode #sidebar-hamburger  { display: none !important; }
body.sa-master-mode .topbar             { display: none !important; }
body.sa-master-mode #sa-topnav          { display: flex !important; }
body.sa-master-mode #page-content       { padding: 24px !important; }

.sa-topnav {
    position: sticky; top: 0; z-index: 200;
    background: #0F172A;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; gap: 0;
    height: 56px; padding: 0 24px;
    flex-shrink: 0;
}

.sa-topnav-brand {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; color: rgba(255,255,255,.9);
    padding-right: 24px; border-right: 1px solid rgba(255,255,255,.1);
    margin-right: 8px; white-space: nowrap; flex-shrink: 0;
}
.sa-topnav-brand i { color: #60A5FA; font-size: 16px; }
.sa-topnav-brand strong { font-weight: 800; color: #fff; }

.sa-topnav-links {
    display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto;
    scrollbar-width: none;
}
.sa-topnav-links::-webkit-scrollbar { display: none; }

.sa-topnav-item {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: rgba(255,255,255,.55);
    cursor: pointer; white-space: nowrap;
    transition: background .12s, color .12s;
    text-decoration: none; user-select: none;
}
.sa-topnav-item i { font-size: 12px; }
.sa-topnav-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.sa-topnav-item.active { background: rgba(96,165,250,.18); color: #93C5FD; font-weight: 600; }

.sa-topnav-right {
    display: flex; align-items: center; gap: 12px;
    padding-left: 16px; border-left: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
}
.sa-topnav-user {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: rgba(255,255,255,.6);
}
.sa-topnav-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #2563EB, #0EA5E9);
    color: #fff; font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sa-topnav-logout {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.4); font-size: 14px; padding: 6px;
    border-radius: 6px; transition: color .15s, background .15s;
}
.sa-topnav-logout:hover { color: #F87171; background: rgba(239,68,68,.1); }

/* SA topnav responsive */
@media (max-width: 1024px) {
    .sa-topnav-links { gap: 2px; }
    .sa-topnav-item { font-size: 12px; padding: 6px 10px; }
}
@media (max-width: 768px) {
    .sa-topnav { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
    .sa-topnav-links { flex-wrap: wrap; gap: 4px; order: 3; width: 100%; }
    .sa-topnav-item { font-size: 11px; padding: 5px 8px; }
    .sa-topnav-name { display: none; }
    body.sa-master-mode #main { padding-top: 0; }
}

/* Portal Preview button in SA topnav */
.sa-preview-btn {
    background: rgba(99,102,241,.15) !important;
    color: #A5B4FC !important;
    border: 1px solid rgba(99,102,241,.3) !important;
    border-radius: 8px !important;
    margin-left: 8px;
}
.sa-preview-btn:hover {
    background: rgba(99,102,241,.28) !important;
    color: #fff !important;
}

/* Floating preview bar */
.sa-preview-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: linear-gradient(90deg, #4F46E5, #7C3AED);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 20px;
    font-size: 13px;
    box-shadow: 0 2px 12px rgba(79,70,229,.35);
}
.sa-preview-bar span { flex: 1; }
.sa-preview-exit-btn {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
}
.sa-preview-exit-btn:hover { background: rgba(255,255,255,.25); }

/* Push content down when preview bar is visible */
body.sa-preview-mode .topbar { margin-top: 40px; }
body.sa-preview-mode #sidebar { top: 40px; }

/* ═══════════════════════════════════════════════════════
   SUPER ADMIN — DASHBOARD & PAGES
   ═══════════════════════════════════════════════════════ */

/* Metrics bar */
.sa-metrics-bar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
@media (max-width: 1200px) { .sa-metrics-bar { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .sa-metrics-bar { grid-template-columns: repeat(2, 1fr); } }

.sa-metric {
    background: var(--card);
    border: 1px solid var(--sep);
    border-radius: var(--r);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow .15s;
}
.sa-metric:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }

.sa-metric-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.sa-metric-icon.blue   { background: #EFF6FF; color: #2563EB; }
.sa-metric-icon.green  { background: #F0FDF4; color: #16A34A; }
.sa-metric-icon.amber  { background: #FFFBEB; color: #D97706; }
.sa-metric-icon.red    { background: #FEF2F2; color: #EF4444; }
.sa-metric-icon.teal   { background: #F0F9FF; color: #0EA5E9; }
.sa-metric-icon.purple { background: #F5F3FF; color: #7C3AED; }

.sa-metric-val  { font-size: 22px; font-weight: 900; color: var(--label); line-height: 1; }
.sa-metric-lbl  { font-size: 11px; color: var(--label3); margin-top: 3px; font-weight: 500; }

/* Two-column layout */
.sa-dash-row {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1100px) { .sa-dash-row { grid-template-columns: 1fr; } }

.sa-dash-col-main { display: flex; flex-direction: column; gap: 20px; }
.sa-dash-col-side { display: flex; flex-direction: column; gap: 20px; }

/* Panels */
.sa-panel {
    background: var(--card);
    border: 1px solid var(--sep);
    border-radius: var(--r);
    overflow: hidden;
}
.sa-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--sep);
}
.sa-panel-title {
    font-size: 13px; font-weight: 700; color: var(--label);
    display: flex; align-items: center; gap: 8px;
}
.sa-panel-title i { color: var(--blue); }
.sa-overdue-title i { color: #EF4444; }
.sa-panel-body { padding: 12px 16px; }

/* SA table */
.sa-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sa-table th {
    text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--label3);
    padding: 8px 10px; border-bottom: 1px solid var(--sep);
}
.sa-table td { padding: 10px 10px; border-bottom: 1px solid var(--sep); color: var(--label); }
.sa-table tr:last-child td { border-bottom: none; }
.sa-table tr:hover td { background: var(--fill); }

/* Company cell */
.sa-co-cell { display: flex; align-items: center; gap: 10px; }
.sa-co-avatar {
    width: 34px; height: 34px; border-radius: 8px;
    background: linear-gradient(135deg, #2563EB, #0EA5E9);
    color: #fff; font-size: 14px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sa-co-avatar.sm { width: 28px; height: 28px; font-size: 12px; border-radius: 6px; }
.sa-co-avatar.red    { background: linear-gradient(135deg, #EF4444, #DC2626); }
.sa-co-avatar.blue   { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.sa-co-avatar.amber  { background: linear-gradient(135deg, #F59E0B, #D97706); }
.sa-co-name  { font-size: 13px; font-weight: 700; color: var(--label); }
.sa-co-id    { font-size: 10px; color: var(--label3); }
.sa-muted    { font-size: 12px; color: var(--label3); }

/* Badges */
.sa-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 100px;
}
.badge-green  { background: #F0FDF4; color: #16A34A; }
.badge-amber  { background: #FFFBEB; color: #D97706; }
.badge-red    { background: #FEF2F2; color: #DC2626; }
.badge-blue   { background: #EFF6FF; color: #2563EB; }
.badge-gray   { background: #F1F5F9; color: #64748B; }

.sa-pill { display: inline-flex; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 100px; }
.sa-pill.teal { background: rgba(13,148,136,.1); color: #0D9488; }

.sa-company-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--fill); border: 1px solid var(--sep);
    font-size: 11px; font-weight: 600; color: var(--label2);
    padding: 3px 8px; border-radius: 6px;
}

/* Trial rows */
.sa-trial-row {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid var(--sep);
}
.sa-trial-row:last-child { border-bottom: none; padding-bottom: 0; }
.sa-trial-info { flex: 1; min-width: 0; }

/* Empty state */
.sa-empty {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 24px 16px; font-size: 13px; color: var(--label3);
}

/* Status donut */
.sa-donut-wrap {
    position: relative; width: 160px; height: 160px;
    margin: 0 auto 16px;
}
.sa-donut-center {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; pointer-events: none;
}
.sa-donut-num  { font-size: 28px; font-weight: 900; color: var(--label); line-height: 1; }
.sa-donut-sub  { font-size: 10px; color: var(--label3); margin-top: 2px; }
.sa-donut-legend { display: flex; flex-direction: column; gap: 8px; }
.sa-legend-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--label);
}
.sa-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.sa-legend-lbl { flex: 1; }
.sa-legend-val { font-weight: 800; color: var(--label); }

/* Revenue panel */
.sa-revenue-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sa-rev-item { text-align: center; padding: 12px 8px; background: var(--fill); border-radius: 10px; }
.sa-rev-lbl  { font-size: 10px; color: var(--label3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.sa-rev-val  { font-size: 16px; font-weight: 900; }
.sa-rev-val.green { color: #16A34A; }
.sa-rev-val.blue  { color: #2563EB; }
.sa-rev-val.teal  { color: #0D9488; }

/* ─── DASHBOARD DRAG-AND-DROP ─────────────────────────────── */
.drag-handle {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--label3);
    cursor: grab;
    font-size: 12px;
    border-radius: 5px;
    background: var(--fill);
    border: 1px solid var(--sep);
    z-index: 2;
    transition: background .15s, color .15s;
}
.drag-handle:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.drag-handle:active { cursor: grabbing; }

/* Only show handles and outline in edit mode */
body.dash-edit-mode .drag-handle { display: flex; }
body.dash-edit-mode .kpi-card2,
body.dash-edit-mode .chart-card,
body.dash-edit-mode .panel,
body.dash-edit-mode .today-focus {
    outline: 2px dashed var(--sep);
    outline-offset: 2px;
}
.kpi-card2,
.chart-card,
.panel,
.today-focus { position: relative; }

/* Edit layout button active state */
.dash-edit-layout-btn.active {
    background: var(--blue) !important;
    color: #fff !important;
    border-color: var(--blue) !important;
}

.drag-ghost { opacity: .4; background: var(--bg) !important; border: 2px dashed var(--blue) !important; outline: none !important; }
.drag-chosen { box-shadow: 0 8px 32px rgba(0,0,0,.18) !important; transform: scale(1.02); }
.drag-dragging { opacity: .95; }

/* ── DOCUMENT TYPE COMPLIANCE PANEL ─────────────────────────── */
.doctype-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--sep);
}
.doctype-row:last-child { border-bottom: none; }
.doctype-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.doctype-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--label);
}
.doctype-pct {
    font-size: 12px;
    font-weight: 700;
}
.doctype-bar-bg {
    height: 5px;
    background: var(--sep);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}
.doctype-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .4s;
}
.doctype-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.doctype-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
}
.doctype-chip.red   { background: rgba(239,68,68,.12);  color: #DC2626; }
.doctype-chip.amber { background: rgba(245,158,11,.12); color: #D97706; }
.doctype-chip.green { background: rgba(22,163,74,.12);  color: #16A34A; }
.doctype-chip.blue  { background: rgba(79,107,237,.12); color: #4F6BED; }

/* ── MY TASKS PANEL ─────────────────────────────────────────── */
.dash-task-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--sep);
    gap: 12px;
}
.dash-task-row:last-child { border-bottom: none; }
.dash-task-row:hover { background: var(--bg); margin: 0 -16px; padding: 10px 16px; border-radius: 8px; }
.dtr-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dtr-title { font-size: 13px; font-weight: 600; color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtr-sub { font-size: 11px; color: var(--label3); }

/* ── KPI ICON COLORS ─────────────────────────────────────────── */
.kpi2-icon-indigo { background: rgba(79,107,237,.12); color: #4F6BED; }
.kpi2-icon-purple { background: rgba(139,92,246,.12);  color: #8B5CF6; }
.kpi2-icon-green  { background: rgba(22,163,74,.12);   color: #16A34A; }
.kpi2-icon-amber  { background: rgba(245,158,11,.12);  color: #D97706; }
.kpi2-icon-red    { background: rgba(239,68,68,.12);   color: #DC2626; }
.kpi2-icon-blue   { background: rgba(59,130,246,.12);  color: #3B82F6; }

/* ── SETTINGS PAGE ───────────────────────────────────────────── */
.settings-wrap {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 0 48px;
}
.settings-section {
    background: var(--card);
    border: 1px solid var(--sep);
    border-radius: 16px;
    overflow: hidden;
}
.settings-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--sep);
}
.settings-section-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--label);
    margin: 0 0 2px;
}
.settings-section-header p {
    font-size: 12px;
    color: var(--label3);
    margin: 0;
}
.settings-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.settings-fields { padding: 4px 0; }
.settings-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    border-bottom: 1px solid var(--sep);
    gap: 12px;
}
.settings-field:last-child { border-bottom: none; }
.settings-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--label2);
    min-width: 140px;
    flex-shrink: 0;
}
.settings-field-val {
    font-size: 13px;
    color: var(--label);
    font-weight: 500;
}
.settings-field-row { align-items: flex-start; }
.settings-field-row label { margin-bottom: 2px; }
.settings-field-desc {
    display: block;
    font-size: 11px;
    color: var(--label3);
    font-weight: 400;
    margin-top: 2px;
}
.stg-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--fill);
    color: var(--label2);
}
.stg-badge-green {
    background: rgba(22,163,74,.1);
    color: #16A34A;
}
.stg-toggle-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 8px;
    border: 1px solid var(--sep);
    background: var(--fill);
    color: var(--label2);
    cursor: pointer;
    flex-shrink: 0;
}
.stg-toggle-btn:hover { background: var(--bg); }

/* ═══════════════════════════════════════════════════
   DASHBOARD REDESIGN — matches clean UI design file
   ═══════════════════════════════════════════════════ */

/* KPI row: 6 equal columns on wide screens */
.kpi-row {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
/* KPI responsive handled in restored section below */

/* KPI card: match reference — rounded 20px, tighter */
.kpi-card2 {
    border-radius: 20px;
    padding: 20px;
    gap: 10px;
}
.kpi-card2::after { display: none; } /* remove the decorative circle */

/* KPI icon: reference style — gray bg, brand on hover */
.kpi2-icon { border-radius: 10px; font-size: 14px; width: 32px !important; height: 32px !important; }
.kpi2-val   { font-size: 20px; letter-spacing: -0.5px; }
.kpi2-lbl   { font-size: 8px; letter-spacing: .6px; }
.kpi2-subtext { padding-top: 4px; margin-top: 4px; font-size: 10px; }

/* ══════════════════════════════════════════════════════════════ */
/*  TOP NAVIGATION BAR                                           */
/* ══════════════════════════════════════════════════════════════ */

.topnav {
    position: sticky; top: 0; z-index: 200;
    background: var(--card);
    border-bottom: 1px solid var(--sep);
}
.topnav-inner {
    display: flex; align-items: center;
    padding: 0 20px; height: 56px; gap: 0;
}
.topnav-logo {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; text-decoration: none; flex-shrink: 0; margin-right: 20px;
}
.topnav-logo-icon {
    width: 32px; height: 32px; background: #026ec7; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px;
    box-shadow: 0 2px 8px rgba(2,110,199,.25);
}
.topnav-logo-text {
    font-size: 16px; font-weight: 900; color: var(--label); letter-spacing: -.5px;
}
.topnav-logo-accent { color: #026ec7; }

/* Nav tabs — centered pill style */
.topnav-links {
    display: flex; align-items: center; gap: 2px;
    background: var(--fill2); border-radius: 12px; padding: 3px;
    position: absolute; left: 50%; transform: translateX(-50%);
}
.topnav-inner { position: relative; }
.topnav-dropdown { position: relative; }
.topnav-link {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 16px; border-radius: 10px; border: none; background: none;
    font-size: 13px; font-weight: 500; color: var(--label3);
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.topnav-link:hover { color: var(--label); background: rgba(255,255,255,.6); }
.topnav-link.active, .topnav-link.open {
    background: var(--card); color: var(--label); font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.topnav-link i { font-size: 8px; transition: transform .2s; opacity: .5; }
.topnav-link.open i { transform: rotate(180deg); }

/* Dropdown menu */
.topnav-drop-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0;
    background: var(--card); border: 1px solid var(--sep); border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.12); padding: 6px; min-width: 200px;
    z-index: 300;
}
.topnav-drop-menu.open { display: block; }
.topnav-drop-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
    color: var(--label2); cursor: pointer; text-decoration: none;
    transition: all .12s;
}
.topnav-drop-item:hover { background: var(--fill2); color: var(--label); }
.topnav-drop-item.active { background: rgba(2,110,199,.08); color: #026ec7; font-weight: 600; }
.topnav-drop-item i { width: 16px; text-align: center; font-size: 13px; }
.topnav-badge {
    background: #EF4444; color: #fff; font-size: 10px; font-weight: 700;
    padding: 1px 6px; border-radius: 10px; margin-left: auto;
}

/* Right section */
.topnav-right {
    display: flex; align-items: center; gap: 8px; margin-left: 16px;
}
.topnav-search {
    display: flex; align-items: center; gap: 6px;
    background: var(--fill2); border: 1px solid var(--sep);
    border-radius: 10px; padding: 7px 12px;
}
.topnav-search i { font-size: 12px; color: var(--label3); }
.topnav-search input {
    border: none; background: none; outline: none; font-size: 12px;
    color: var(--label); width: 130px; font-family: inherit;
}
.topnav-icon-btn {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--sep);
    background: var(--card); color: var(--label2); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all .12s; position: relative;
}
.topnav-icon-btn:hover { background: var(--fill2); color: var(--label); }

/* Profile */
.topnav-profile {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 12px 4px 4px; border-radius: 28px; cursor: pointer;
    transition: background .12s; margin-left: 4px;
    background: var(--fill2); border: 1px solid var(--sep);
}
.topnav-profile:hover { background: var(--sep); }
.topnav-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
    background: #026ec7;
}
.topnav-username {
    font-size: 13px; font-weight: 600; color: var(--label);
    max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Profile dropdown */
.topnav-profile-menu {
    display: none; position: absolute; top: 56px; right: 16px;
    background: var(--card); border: 1px solid var(--sep); border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.12); padding: 6px; min-width: 220px;
    z-index: 300;
}
.topnav-profile-menu.open { display: block; }

/* Mobile hamburger */
.topnav-hamburger {
    display: none; width: 36px; height: 36px; border: none; background: none;
    color: var(--label); font-size: 18px; cursor: pointer; border-radius: 8px;
}
@media(max-width:768px) {
    .topnav-hamburger { display: flex; align-items: center; justify-content: center; }
    .topnav-links { display: none; }
    .topnav-links.mobile-open {
        display: flex; flex-direction: column; position: absolute;
        top: 60px; left: 0; right: 0; background: var(--card);
        border-bottom: 1px solid var(--sep); padding: 12px;
        box-shadow: 0 8px 24px rgba(0,0,0,.1); z-index: 300;
    }
    .topnav-links.mobile-open .topnav-dropdown { width: 100%; }
    .topnav-links.mobile-open .topnav-link { width: 100%; justify-content: space-between; }
    .topnav-links.mobile-open .topnav-drop-menu { position: static; box-shadow: none; border: none; }
    .topnav-search input { width: 80px; }
    .topnav-username { display: none; }
}

/* Page background */
.page-content {
    background: var(--bg);
}

/* ══════════════════════════════════════════════════════════════ */
/*  CLINICAL DASHBOARD                                           */
/* ══════════════════════════════════════════════════════════════ */

/* ── SIDEBAR + MAIN SPLIT (reference layout) ── */
.dash-split {
    display: flex; gap: 0; min-height: calc(100vh - 68px);
}

/* LEFT DATA SIDEBAR */
.dash-sidebar {
    width: 260px; flex-shrink: 0;
    background: var(--card);
    border-right: 1px solid var(--sep);
    display: flex; flex-direction: column;
    height: auto; min-height: 100%;
    overflow-y: auto;
}
.dash-sidebar-header {
    padding: 20px 16px 0;
}
.dash-sidebar-header h2 {
    font-size: 15px; font-weight: 800; color: var(--label);
    margin: 0 0 14px; letter-spacing: -.2px;
}
.dash-sidebar-tabs {
    display: flex; gap: 4px; background: var(--fill2);
    padding: 3px; border-radius: 10px;
}
.dsb-tab {
    padding: 7px 16px; border-radius: 8px; border: none;
    font-size: 11px; font-weight: 600; cursor: pointer;
    background: transparent; color: var(--label3);
    transition: all .15s; flex: 1; text-align: center;
}
.dsb-tab.active {
    background: #026ec7; color: #fff;
    box-shadow: 0 2px 6px rgba(2,110,199,.3);
}
.dsb-tab:hover:not(.active) { color: var(--label); }
.dash-sidebar-count {
    padding: 12px 16px 6px; font-size: 10px; font-weight: 700;
    color: var(--label3); text-transform: uppercase; letter-spacing: .8px;
}
.dash-sidebar-count span { color: #EF4444; font-weight: 800; font-size: 12px; }
.dash-sidebar-list {
    flex: 1; overflow-y: auto; padding: 6px 10px 16px;
}

/* MAIN CONTENT AREA (right of sidebar) */
.dash-main-area {
    flex: 1; min-width: 0;
    padding: 16px 20px;
    display: flex; flex-direction: column; gap: 12px;
    overflow-x: hidden;
}

/* Greeting */
.dash-greeting-row { margin-bottom: 0; }
.dash-greeting-title {
    font-size: 22px; font-weight: 800; color: var(--label);
    letter-spacing: -.5px; margin: 0 0 2px;
}
.dash-greeting-sub { font-size: 13px; color: var(--label3); margin: 0; }
.dash-company-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 10px; font-weight: 600; color: var(--label3);
    text-transform: uppercase; letter-spacing: .8px; margin-bottom: 4px;
}

/* Pipeline Stepper */
.dash-pipeline {
    display: flex; align-items: center;
    background: var(--card); border-radius: 12px; padding: 14px 24px;
    border: 1px solid var(--sep); box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.pipe-step { display: flex; align-items: center; gap: 8px; }
.pipe-dot {
    width: 12px; height: 12px; border-radius: 50%;
    border: 2.5px solid var(--sep); background: var(--card); flex-shrink: 0;
}
.pipe-tracked .pipe-dot { border-color: #026ec7; background: #026ec7; }
.pipe-valid .pipe-dot { border-color: #16A34A; background: #16A34A; }
.pipe-expiring .pipe-dot { border-color: #F59E0B; background: #F59E0B; }
.pipe-expired .pipe-dot { border-color: #EF4444; background: #EF4444; }
.pipe-info { display: flex; flex-direction: column; }
.pipe-num { font-size: 16px; font-weight: 800; color: var(--label); line-height: 1; }
.pipe-lbl { font-size: 9px; font-weight: 600; color: var(--label3); text-transform: uppercase; letter-spacing: .5px; }
.pipe-line { flex: 1; height: 3px; margin: 0 10px; border-radius: 2px; min-width: 20px; }
.pipe-line-green { background: linear-gradient(90deg, #026ec7, #16A34A); }
.pipe-line-amber { background: linear-gradient(90deg, #16A34A, #F59E0B); }
.pipe-line-red { background: linear-gradient(90deg, #F59E0B, #EF4444); }

/* 3-panel row */
.dash-panels-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr);
    gap: 12px; align-items: start;
}
.dash-panels-row > .clinical-card {
    min-height: 340px;
}

/* Clinical Cards */
.clinical-card {
    background: var(--card); border-radius: 14px; padding: 18px;
    border: 1px solid var(--sep); box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.clinical-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
}
.clinical-card-header h3 {
    font-size: 13px; font-weight: 700; color: var(--label); margin: 0;
    display: flex; align-items: center;
}

/* Responsive */
@media(max-width:1100px) {
    .dash-panels-row { grid-template-columns: 1fr 1fr; }
}
@media(max-width:768px) {
    .dash-split { flex-direction: column; }
    .dash-sidebar { width: 100%; border-right: none; border-radius: 14px; max-height: 300px; }
    .dash-panels-row { grid-template-columns: 1fr; }
}

/* Scoring Card (center) */
.scoring-card {
    text-align: center; padding: 20px 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.scoring-eyebrow {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--label3); margin-bottom: 10px;
}
.scoring-card .health-ring-wrap { margin: 0 auto 10px; }
.scoring-card .health-ring-svg { width: 110px; height: 110px; }
.scoring-card .health-pct { font-size: 24px; }
.scoring-stats {
    display: flex; justify-content: center; gap: 20px; margin-bottom: 14px;
}
.sc-stat { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.sc-num { font-size: 18px; font-weight: 800; line-height: 1; }
.sc-lbl { font-size: 9px; font-weight: 600; color: var(--label3); text-transform: uppercase; }
.sc-green .sc-num { color: #16A34A; }
.sc-amber .sc-num { color: #F59E0B; }
.sc-red .sc-num { color: #EF4444; }
.scoring-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: 10px; border: none;
    background: #026ec7; color: #fff; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s;
}
.scoring-btn:hover { background: #0258a3; }

/* Agency Overview Card */
.agency-card {
    display: flex; flex-direction: column;
}
.agency-info { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.agency-row {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 6px; border-bottom: 1px solid var(--sep);
}
.agency-row:last-child { border-bottom: none; padding-bottom: 0; }
.agency-label {
    font-size: 12px; color: var(--label3); display: flex; align-items: center; gap: 8px;
}
.agency-label i { width: 14px; text-align: center; color: var(--label3); }
.agency-val { font-size: 13px; font-weight: 600; color: var(--label); }

/* Quick Actions mini grid */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qa-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 12px; border-radius: 10px; border: 1px solid var(--sep);
    background: var(--card); font-size: 12px; font-weight: 600;
    color: var(--label2); cursor: pointer; transition: all .12s;
}
.qa-btn:hover { background: var(--fill2); color: #026ec7; border-color: #026ec7; }
.qa-btn i { font-size: 12px; }

/* Hide unused elements */
.dash-hero, .dash-qa-bar, .dash-clinical,
.dash-col-left, .dash-col-center, .dash-col-right { display: none !important; }
.topnav { display: none !important; }

/* Dashboard elements — NO !important on display, so page hiding works */
.health-panel {
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(12,63,110,.35), 0 0 0 1px rgba(12,63,110,.4);
}
.kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media(min-width:1400px) { .kpi-row { grid-template-columns: repeat(6, 1fr); } }
@media(max-width:900px)  { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:480px)  { .kpi-row { grid-template-columns: 1fr; } }
.kpi-card2 {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    padding: 12px 14px;
    position: relative;
    background: var(--card);
    border: 1px solid var(--sep);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    min-width: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.kpi-card2:hover {
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(2,110,199,.12);
}
.kpi-card2 .kpi-card2-top { flex-shrink: 0; }
.kpi-card2 .kpi2-left { min-width: 0; overflow: hidden; }
.kpi-card2 .kpi2-lbl {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.kpi-card2 .kpi2-subtext {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-main-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 340px); gap: 12px; }

/* Panel header: tighter */
.panel-header { margin-bottom: 12px; }
.panel-header h3 { font-size: 13px; }

/* ── NOTIFICATION PANEL ─────────────────────────────────────── */
.notif-panel {
    position: fixed;
    top: 56px;
    right: 16px;
    width: 340px;
    background: var(--card);
    border: 1px solid var(--sep);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    z-index: 500;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: notifSlideIn .18s ease;
}
@keyframes notifSlideIn {
    from { opacity:0; transform:translateY(-8px); }
    to   { opacity:1; transform:translateY(0); }
}
.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--sep);
}
.notif-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--label);
}
.notif-panel-close {
    width: 28px; height: 28px;
    border: none;
    background: var(--fill);
    border-radius: 8px;
    color: var(--label3);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.notif-panel-body {
    flex: 1;
    max-height: 360px;
    overflow-y: auto;
    padding: 8px 0;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .15s;
}
.notif-item:hover { background: var(--fill); }
.notif-item.unread { background: rgba(79,107,237,.04); }
.notif-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.notif-dot-blue { background: #3B82F6; }
.notif-dot-red  { background: #EF4444; }
.notif-dot-amber{ background: #F59E0B; }
.notif-dot-green{ background: #22C55E; }
.notif-dot-gray { background: #9CA3AF; }
.notif-content { flex: 1; min-width: 0; }
.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--label);
    margin-bottom: 2px;
}
.notif-desc {
    font-size: 12px;
    color: var(--label3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-time {
    font-size: 11px;
    color: var(--label4, #9CA3AF);
    white-space: nowrap;
    flex-shrink: 0;
}
.notif-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--label3);
    font-size: 13px;
}
.notif-panel-footer {
    border-top: 1px solid var(--sep);
    padding: 12px 16px;
}
.notif-mark-all {
    width: 100%;
    background: var(--fill);
    border: 1px solid var(--sep);
    border-radius: 8px;
    padding: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--label2);
    cursor: pointer;
    transition: background .15s;
}
.notif-mark-all:hover { background: var(--sep); }

/* ── SUBSCRIPTION TIERS ──────────────────────────────────────── */
.sub-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--label3);
    margin: 24px 0 14px;
}
.sub-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
}
@media(max-width:900px) { .sub-tier-grid { grid-template-columns: 1fr; } }
.sub-tier-card {
    background: var(--card);
    border: 1.5px solid var(--sep);
    border-radius: 18px;
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sub-tier-featured {
    border-color: #4F6BED;
    box-shadow: 0 0 0 1px #4F6BED22, 0 8px 24px rgba(79,107,237,.12);
}
.sub-tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #4F6BED;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
}
.sub-tier-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sub-tier-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.sub-tier-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--label);
}
.sub-tier-tagline {
    font-size: 12px;
    color: var(--label3);
    margin-top: 2px;
}
.sub-tier-price {
    font-size: 32px;
    font-weight: 900;
    color: var(--label);
    line-height: 1;
}
.sub-tier-price span {
    font-size: 14px;
    font-weight: 500;
    color: var(--label3);
}
.sub-tier-features {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sub-tier-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--label2);
}
.sub-tier-features li .fa-check { color: #22C55E; font-size: 11px; }
.sub-tier-features li .fa-xmark.sub-feat-no { color: #D1D5DB; font-size: 11px; }
.sub-tier-features li .sub-feat-no ~ * { color: var(--label4, #9CA3AF); }
.sub-tier-btn {
    display: block;
    text-align: center;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
}
.sub-status-badge {
    background: rgba(22,163,74,.1);
    color: #16A34A;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ── NOTIFICATION PANEL ─────────────────────────────────────── */
.notif-panel {
    position: fixed;
    top: 56px;
    right: 16px;
    width: 340px;
    background: var(--card);
    border: 1px solid var(--sep);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    z-index: 500;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: notifSlideIn .18s ease;
}
@keyframes notifSlideIn {
    from { opacity:0; transform:translateY(-8px); }
    to   { opacity:1; transform:translateY(0); }
}
.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--sep);
}
.notif-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--label);
}
.notif-panel-close {
    width: 28px; height: 28px;
    border: none;
    background: var(--fill);
    border-radius: 8px;
    color: var(--label3);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.notif-panel-body {
    flex: 1;
    max-height: 360px;
    overflow-y: auto;
    padding: 8px 0;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .15s;
}
.notif-item:hover { background: var(--fill); }
.notif-item.unread { background: rgba(79,107,237,.04); }
.notif-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.notif-dot-blue  { background: #3B82F6; }
.notif-dot-red   { background: #EF4444; }
.notif-dot-amber { background: #F59E0B; }
.notif-dot-green { background: #22C55E; }
.notif-dot-gray  { background: #9CA3AF; }
.notif-content { flex: 1; min-width: 0; }
.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--label);
    margin-bottom: 2px;
}
.notif-desc {
    font-size: 12px;
    color: var(--label3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-time {
    font-size: 11px;
    color: var(--label3);
    white-space: nowrap;
    flex-shrink: 0;
}
.notif-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--label3);
    font-size: 13px;
}
.notif-panel-footer {
    border-top: 1px solid var(--sep);
    padding: 12px 16px;
}
.notif-mark-all {
    width: 100%;
    background: var(--fill);
    border: 1px solid var(--sep);
    border-radius: 8px;
    padding: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--label2);
    cursor: pointer;
    transition: background .15s;
}
.notif-mark-all:hover { background: var(--sep); }

/* ── PAGE BAR (non-dashboard header) ───────────────────────── */
.page-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    height: 58px;
    background: var(--card);
    border-bottom: 1px solid var(--sep);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.page-bar .hamburger {
    color: var(--label3);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.page-bar .hamburger:hover { background: var(--fill); color: var(--label); }
.page-bar-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--label);
    letter-spacing: -.2px;
    flex: 1;
}

/* ── EMPLOYEE MODAL — form section headings ─────────────────── */
.form-section-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--label3);
    padding: 0 0 10px;
    border-bottom: 1px solid var(--sep);
    margin: 16px 0 14px;
}
.form-section-label:first-child { margin-top: 0; }

/* ─── HELP TOOLTIPS ──────────────────────────────────────── */
.help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--label3);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    margin-left: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}
#htip {
    display: none;
    position: fixed;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    padding: 8px 12px;
    border-radius: 8px;
    width: 240px;
    white-space: normal;
    z-index: 99999;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    pointer-events: none;
}
#htip.show { display: block }
#htip-arrow {
    position: fixed;
    width: 0; height: 0;
    border: 6px solid transparent;
    z-index: 99999;
    pointer-events: none;
    display: none;
}
#htip-arrow.show { display: block }

/* ─── PAGINATION ─────────────────────────────────────────── */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px 4px;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.pager-info {
    font-size: 13px;
    color: var(--label3);
}
.pager-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pager-per-page {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid var(--sep);
    border-radius: 6px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
}
.pager-btn {
    font-size: 12px;
    padding: 5px 12px;
    border: 1px solid var(--sep);
    border-radius: 6px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: background .15s;
}
.pager-btn:hover:not(:disabled) { background: var(--hover); }
.pager-btn:disabled { opacity: .4; cursor: default; }
.pager-page {
    font-size: 13px;
    color: var(--label2);
    min-width: 50px;
    text-align: center;
}

/* ─── BULK ACTIONS ───────────────────────────────────────── */
.bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.bulk-count {
    font-size: 13px;
    font-weight: 700;
    color: #1D4ED8;
    min-width: 90px;
}
.bulk-link {
    font-size: 12px;
    color: #026ec7;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
}
.bulk-link:hover { opacity: .7; }
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.bulk-status-select {
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid var(--sep);
    border-radius: 7px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
}
.btn-danger {
    background: #EF4444;
    color: #fff;
    border: none;
}
.btn-danger:hover { background: #DC2626; }
.bulk-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #026ec7;
    cursor: pointer;
    flex-shrink: 0;
}
.emp-card.bulk-selected {
    outline: 2px solid #026ec7;
    background: #EFF6FF;
}

/* ── INCIDENT PIPELINE ─────────────────────────────────────── */
.inc-pipeline {
    display: flex;
    align-items: center;
    padding: 20px 24px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--sep);
    margin: 0 -24px;
    overflow-x: auto;
    gap: 0;
}
.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    opacity: .4;
    transition: opacity .15s;
}
.pipeline-step.done { opacity: .7; }
.pipeline-step.active { opacity: 1; }
.pipe-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--label3);
    border: 2px solid var(--label3);
    transition: background .15s, border-color .15s;
    position: relative;
}
.pipeline-step.done .pipe-dot {
    background: var(--blue);
    border-color: var(--blue);
}
.pipeline-step.active .pipe-dot {
    background: #fff;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(2,110,199,.2);
    width: 18px;
    height: 18px;
}
.pipeline-step.active .pipe-dot::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--blue);
}
.pipe-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--label3);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.pipeline-step.active .pipe-label { color: var(--blue); }
.pipeline-step.done .pipe-label { color: var(--label2); }
.pipeline-line {
    flex: 1;
    height: 2px;
    background: var(--sep);
    min-width: 20px;
    margin-bottom: 22px;
}

/* ── ACTIVITY LOG ──────────────────────────────────────────── */
.activity-log-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--sep);
}
.activity-log-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--label2);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.activity-log-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.activity-entry {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-left: 2px solid var(--sep);
    padding-left: 16px;
    margin-left: 6px;
    position: relative;
}
.activity-dot {
    position: absolute;
    left: -5px;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    border: 2px solid var(--bg2);
    flex-shrink: 0;
}
.activity-content { flex: 1; }
.activity-action {
    font-size: 13px;
    font-weight: 500;
    color: var(--label);
    line-height: 1.4;
}
.activity-meta {
    font-size: 11px;
    color: var(--label3);
    margin-top: 2px;
}
.activity-empty {
    font-size: 13px;
    color: var(--label3);
    padding: 8px 0;
    font-style: italic;
}

/* ── COMPLIANCE REQUIREMENTS ───────────────────────────────── */
.req-info-bar {
    background: var(--fill);
    border: 1px solid var(--blue-light);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--label2);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.req-info-bar i { color: var(--blue); flex-shrink: 0; }
.req-category-section { margin-bottom: 28px; }
.req-category-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--label2);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.req-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}
.req-card {
    background: var(--card);
    border: 1px solid var(--sep);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow .12s;
}
.req-card:hover { box-shadow: var(--sh-sm); }
.req-inactive { opacity: .5; }
.req-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.req-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--label);
    flex: 1;
    line-height: 1.4;
}
.req-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.req-renewal {
    font-size: 11px;
    color: var(--label3);
    display: flex;
    align-items: center;
    gap: 4px;
}
.req-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.req-required { background: rgba(2,110,199,.1); color: var(--blue); }
.req-optional { background: var(--bg); color: var(--label3); }
.req-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Toggle switch */
.req-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}
.req-toggle input { opacity: 0; width: 0; height: 0; }
.req-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--sep);
    border-radius: 100px;
    transition: background .2s;
}
.req-toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.req-toggle input:checked + .req-toggle-slider { background: var(--blue); }
.req-toggle input:checked + .req-toggle-slider::before { transform: translateX(16px); }

/* Modal XL */
.modal.modal-xl { max-width: 760px; max-height: 90vh; overflow-y: auto; }

/* ── ONBOARDING WIZARD ─────────────────────────────────────── */
.ob-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(15,23,42,.7); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; animation: fadeIn .2s ease;
}
.ob-card {
    background: var(--card); border-radius: 28px; width: 100%; max-width: 580px;
    box-shadow: 0 32px 80px rgba(0,0,0,.3); position: relative; overflow: hidden;
}
.ob-progress { height: 4px; background: var(--border); }
.ob-progress-fill { height: 100%; background: var(--blue); transition: width .4s ease; border-radius: 0 2px 2px 0; }
.ob-steps-row {
    display: flex; align-items: center; justify-content: center; gap: 0;
    padding: 24px 32px 0;
}
.ob-step-dot {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--bg2); color: var(--label3);
    font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    transition: all .3s; flex-shrink: 0;
}
.ob-step-dot.active { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(2,110,199,.15); }
.ob-step-dot.done { background: #10B981; color: #fff; }
.ob-step-line { flex: 1; height: 2px; background: var(--border); max-width: 60px; transition: background .3s; }
.ob-step-line.done { background: #10B981; }
.ob-step {
    display: none; padding: 32px 36px 36px; text-align: center;
}
.ob-step.active { display: block; animation: slideUp .25s ease; }
.ob-icon {
    width: 64px; height: 64px; border-radius: 20px;
    background: rgba(2,110,199,.1); color: var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin: 0 auto 20px;
}
.ob-step h2 { font-size: 22px; font-weight: 800; color: var(--label1); margin-bottom: 8px; }
.ob-sub { font-size: 14px; color: var(--label3); line-height: 1.6; margin-bottom: 24px; }
.ob-checklist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; text-align: left; }
.ob-check-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 600; color: var(--label2);
    padding: 10px 14px; border-radius: 12px; background: var(--bg2);
}
.ob-check-item i { font-size: 16px; color: var(--label4); }
.ob-check-item.done i { color: #10B981; }
.ob-check-item.done { color: var(--label3); text-decoration: line-through; opacity: .6; }
.ob-form { text-align: left; }
.ob-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.ob-form .form-group { margin-bottom: 12px; }
.ob-form .form-group label { font-size: 12px; font-weight: 600; color: var(--label2); margin-bottom: 4px; display: block; }
.ob-form .form-group input,
.ob-form .form-group select {
    width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 13px; font-family: inherit; background: var(--bg2); color: var(--label1);
    outline: none; transition: border-color .15s;
}
.ob-form .form-group input:focus,
.ob-form .form-group select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(2,110,199,.1); }
.ob-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.ob-btn { width: 100%; justify-content: center; padding: 13px; font-size: 15px; border-radius: 12px; }
.ob-btn-skip { font-size: 13px; color: var(--label4); }
@media (max-width: 520px) {
    .ob-card { border-radius: 20px; }
    .ob-step { padding: 24px 20px 28px; }
    .ob-form-row { grid-template-columns: 1fr; }
    .ob-steps-row { padding: 16px 20px 0; }
}

/* ── DASHBOARD SETUP PROGRESS BAR ──────────────────────────── */
.setup-bar {
    background: linear-gradient(135deg, rgba(2,110,199,.06), rgba(2,110,199,.02));
    border: 1.5px solid rgba(2,110,199,.15); border-radius: 16px;
    padding: 16px 20px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 16px;
}
.setup-bar-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(2,110,199,.1); color: var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.setup-bar-info { flex: 1; }
.setup-bar-title { font-size: 13px; font-weight: 700; color: var(--label1); margin-bottom: 4px; }
.setup-bar-sub { font-size: 11px; color: var(--label3); }
.setup-bar-track { height: 6px; background: var(--border); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.setup-bar-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width .4s ease; }
.setup-bar-action { flex-shrink: 0; }
.setup-bar-action button { font-size: 12px; padding: 6px 14px; }

/* ── ACTIVITY FEED ──────────────────────────────────────────── */
.activity-feed-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.af-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    transition: background .15s; cursor: default;
}
.af-item:hover { background: var(--bg2); }
.af-icon {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
}
.af-icon.green  { background: rgba(16,185,129,.1); color: #10B981; }
.af-icon.blue   { background: rgba(2,110,199,.1); color: #026ec7; }
.af-icon.amber  { background: rgba(245,158,11,.1); color: #F59E0B; }
.af-icon.red    { background: rgba(239,68,68,.1); color: #EF4444; }
.af-icon.purple { background: rgba(139,92,246,.1); color: #8B5CF6; }
.af-icon.teal   { background: rgba(13,148,136,.1); color: #0D9488; }
.af-body { flex: 1; min-width: 0; }
.af-text { font-size: 12px; font-weight: 600; color: var(--label1); line-height: 1.4; }
.af-text strong { font-weight: 700; }
.af-time { font-size: 10px; color: var(--label4); margin-top: 2px; }
.af-empty { text-align: center; padding: 24px; color: var(--label4); font-size: 13px; }

/* ── ROLE BADGES ────────────────────────────────────────────── */
.role-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; display: inline-block; }
.role-badge.admin { background: rgba(2,110,199,.1); color: #026ec7; }
.role-badge.supervisor { background: rgba(245,158,11,.1); color: #D97706; }
.role-badge.staff { background: rgba(100,116,139,.1); color: #64748B; }
.role-badge.viewer { background: rgba(139,92,246,.1); color: #8B5CF6; }

/* ── ENTITY AVATAR MODAL ──────────────────────────────────── */
.avatar-tab-bar { display: flex; gap: 4px; justify-content: center; margin-bottom: 16px; }
.avatar-tab { padding: 8px 20px; border-radius: 8px; border: 1px solid var(--border1); background: var(--surface1); font-size: 13px; font-weight: 600; color: var(--label2); cursor: pointer; transition: all .15s; }
.avatar-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.avatar-tab:hover:not(.active) { background: var(--surface2); }
.avatar-preview { width: 120px; height: 120px; border-radius: 50%; background: var(--surface2); margin: 0 auto; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 3px solid var(--border1); position: relative; }
.avatar-preview-init { font-size: 36px; font-weight: 700; color: var(--label3); display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.avatar-camera-wrap { border-radius: 12px; overflow: hidden; max-width: 300px; margin: 0 auto; }
.detail-avatar.has-photo:hover::after { content: '\f030'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; inset: 0; background: rgba(0,0,0,.4); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; border-radius: 50%; }
.detail-avatar { position: relative; overflow: hidden; }
img.emp-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
img.gr-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.stg-toggle-on { background: #16A34A !important; color: #fff !important; border-color: #16A34A !important; }

/* ── CUSTOM DROPDOWN (enterprise select replacement) ──────── */
.cd-wrap { position: relative; display: inline-block; min-width: 0; }
.cd-trigger { display: flex; align-items: center; gap: 6px; padding: 7px 28px 7px 10px; font-size: 13px; font-weight: 500; color: var(--label1); background: var(--surface1); border: 1px solid var(--border1); border-radius: 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color .15s, box-shadow .15s; user-select: none; position: relative; }
.cd-trigger:hover { border-color: var(--blue); }
.cd-trigger::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 9px; color: var(--label3); position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.cd-trigger.cd-open { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(2,110,199,.12); }
.cd-trigger.cd-open::after { content: '\f077'; }
.cd-menu { position: fixed; z-index: 99999; min-width: 180px; max-height: 280px; overflow-y: auto; background: #ffffff; border: 1px solid var(--border1); border-radius: 10px; box-shadow: 0 16px 40px rgba(15,23,42,.18), 0 4px 12px rgba(15,23,42,.08); padding: 6px; display: none; }
.cd-menu.cd-visible { display: block; }
.cd-option { padding: 9px 14px; font-size: 13px; color: var(--label, #0F172A); border-radius: 7px; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; font-weight: 500; }
.cd-option:hover { background: rgba(2,132,199,.08); color: var(--brand, #0284C7); }
.cd-option.cd-selected { color: var(--brand, #0284C7); font-weight: 600; background: rgba(2,132,199,.1); }
.cd-option.cd-selected::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 10px; margin-right: 8px; color: var(--brand, #0284C7); }
.cd-optgroup { padding: 8px 14px 4px; font-size: 10px; font-weight: 700; color: var(--label3); text-transform: uppercase; letter-spacing: .8px; }

/* ── CUSTOM FIELDS ADMIN ──────────────────────────────────── */
.cf-admin-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border1); border-radius: 10px; margin-bottom: 6px; background: var(--surface1); }
.cf-admin-info { display: flex; align-items: center; gap: 10px; }
.cf-admin-name { font-size: 13px; font-weight: 600; color: var(--label1); }
.cf-admin-meta { font-size: 11px; color: var(--label3); margin-top: 1px; }
.cf-admin-actions { display: flex; gap: 4px; }

/* ── ENTITY TIMELINE ──────────────────────────────────────── */
/* ASSIGNMENT LIST */
/* SMALL AVATAR (used in assignment rows, picker items) */
.avatar-sm {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
    letter-spacing: 0.5px;
    background: var(--brand, #0284C7)
}
img.avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0 }

.assignment-list { display: flex; flex-direction: column; gap: 6px }
.assignment-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 8px; background: var(--fill); transition: background 0.15s }
.assignment-row:hover { background: var(--separator) }
.assignment-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0 }
.assignment-name { font-size: 13px; font-weight: 600; color: var(--label) }
.assignment-code { font-size: 11px; color: var(--label3) }
.assign-picker-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 8px }
.assign-picker-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s }
.assign-picker-item:hover { background: var(--fill) }
.empty-state-small { text-align: center; padding: 20px; color: var(--label3); font-size: 13px }

/* COMPLIANCE MATRIX */
.matrix-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch }
.matrix-table { min-width: 100%; border-collapse: collapse }
.matrix-table th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; padding: 10px 8px }
.matrix-name-col { min-width: 180px; position: sticky; left: 0; background: var(--bg2); z-index: 2 }
.matrix-req-col { max-width: 120px; overflow: hidden; text-overflow: ellipsis }
.matrix-cell { text-align: center; font-size: 14px; padding: 8px 6px }
.matrix-valid { color: #16A34A }
.matrix-valid i { opacity: 0.7 }
.matrix-expiring { color: #C47700; background: rgba(255, 149, 0, .06) }
.matrix-expired { color: var(--red); background: rgba(255, 59, 48, .06) }
.matrix-missing { color: var(--label4) }
.matrix-row-missing { background: rgba(255, 59, 48, .04) }
thead .matrix-name-col { background: var(--bg) }

/* ── Compliance Checklist (detail modals) ── */
.compliance-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px }
.compliance-list-wrap { border: 1px solid var(--border1); border-radius: 10px; overflow: hidden; margin-bottom: 12px }
.comp-group-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--label3); padding: 8px 14px; background: var(--fill); border-bottom: 1px solid var(--border1) }
.comp-group-title:not(:first-child) { border-top: 1px solid var(--border1) }
.comp-group-title i { margin-right: 4px; color: var(--brand); font-size: 11px }
.comp-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--fill); font-size: 13px; transition: background .1s }
.comp-row:last-child { border-bottom: none }
.comp-row:hover { background: #FAFBFC }
.comp-icon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0 }
.comp-icon-valid { background: rgba(34,197,94,.12); color: #16A34A }
.comp-icon-expiring { background: rgba(249,115,22,.12); color: var(--orange) }
.comp-icon-expired { background: rgba(239,68,68,.12); color: var(--red) }
.comp-icon-missing { background: var(--fill); color: var(--label3) }
.comp-icon-nottracked { background: transparent; color: var(--label4) }
.comp-name { flex: 1; font-weight: 500 }
.comp-name small { display: block; font-size: 11px; font-weight: 400; color: var(--label3); margin-top: 1px }
.comp-expiry { min-width: 70px; text-align: right }
.comp-action { flex-shrink: 0 }
.comp-action .btn { padding: 4px 10px; font-size: 10px; border-radius: 6px }
.comp-btn-renew { background: var(--red) !important; color: #fff }
.comp-btn-opt { color: var(--label3) !important }
.comp-row-wrap { border-bottom: 1px solid var(--fill) }
.comp-row-wrap:last-child { border-bottom: none }
.comp-row-wrap .comp-row { border-bottom: none }

/* Inline quick-add form */
.comp-inline-form { display: flex; align-items: center; gap: 12px; padding: 8px 14px 12px 48px; background: var(--fill); border-top: 1px solid var(--border1); animation: compSlideDown .15s ease }
@keyframes compSlideDown { from { opacity: 0; max-height: 0 } to { opacity: 1; max-height: 60px } }
.comp-inline-fields { display: flex; gap: 10px; flex: 1 }
.comp-inline-field { display: flex; flex-direction: column; gap: 2px }
.comp-inline-field label { font-size: 10px; font-weight: 600; color: var(--label3); text-transform: uppercase; letter-spacing: .3px }
.comp-inline-field input { font-family: inherit; font-size: 12px; padding: 5px 8px; border: 1px solid var(--border1); border-radius: 6px; background: var(--bg2); color: var(--label); width: 140px }
.comp-inline-field input:focus { border-color: var(--brand); outline: none }
.comp-inline-auto { font-weight: 400; text-transform: none; letter-spacing: 0; font-style: italic }
.comp-inline-actions { display: flex; gap: 4px; flex-shrink: 0 }

/* Caregiver card compliance bar */
.emp-comp-bar { padding: 6px 0 2px; cursor: pointer }
.emp-comp-bar:hover .emp-comp-bar-track { box-shadow: 0 0 0 2px rgba(2,132,199,.15) }
.emp-comp-bar-label { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--label3); margin-bottom: 3px }
.emp-comp-bar-label i { font-size: 10px; color: var(--brand) }
.emp-comp-bar-label span:first-of-type { flex: 1 }
.emp-comp-bar-track { height: 4px; background: var(--fill); border-radius: 2px; overflow: hidden; transition: box-shadow .15s }
.emp-comp-bar-fill { height: 100%; border-radius: 2px; transition: width .3s }
.emp-track-btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-family: inherit; font-size: 10px; font-weight: 600; border: 1px solid var(--brand); background: rgba(2,132,199,.06); color: var(--brand); cursor: pointer; transition: all .12s }
.emp-track-btn:hover { background: rgba(2,132,199,.12) }
.emp-track-btn i { font-size: 9px }
.emp-comp-mini { font-size: 11px; font-weight: 700; margin-left: 4px }

/* ── Bulk Document Entry ── */
.bulk-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--label3); margin: 18px 0 8px; display: flex; align-items: center; gap: 6px }
.bulk-group-label:first-child { margin-top: 0 }
.bulk-group-label i { color: var(--brand); font-size: 12px }
.bulk-grid-header { display: grid; grid-template-columns: 1fr 140px 160px 80px; gap: 10px; font-size: 11px; font-weight: 700; color: var(--label3); text-transform: uppercase; letter-spacing: .3px; padding-bottom: 6px; border-bottom: 1px solid var(--border1) }
.bulk-row-entry { display: grid; grid-template-columns: 1fr 140px 160px 80px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--fill); font-size: 13px }
.bulk-row-name { font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.bulk-req-badge { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; text-transform: uppercase; letter-spacing: .3px }
.bulk-req-required { background: rgba(2,132,199,.1); color: var(--brand) }
.bulk-req-optional { background: var(--fill); color: var(--label3) }
.bulk-row-entry input[type="date"] { font-family: inherit; font-size: 12px; padding: 6px 8px; border: 1px solid var(--border1); border-radius: 6px; background: var(--bg2); color: var(--label); width: 100% }
.bulk-row-entry input:focus { border-color: var(--brand); outline: none }
.bulk-auto-label { font-size: 11px; color: var(--label3); font-style: italic }
.bulk-status { text-align: center }

/* ── Documents: View Toggle + Version Badge + History ── */
.doc-view-toggle { display: inline-flex; background: var(--bg2); border: 1px solid var(--border1); border-radius: 8px; padding: 3px; gap: 2px; margin-right: 8px }
.doc-view-btn { padding: 6px 12px; border: none; background: transparent; border-radius: 6px; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--label2); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all .15s }
.doc-view-btn i { font-size: 11px }
.doc-view-btn:hover { color: var(--label) }
.doc-view-btn.active { background: var(--brand); color: #fff; box-shadow: 0 1px 3px rgba(2,132,199,.3) }

.doc-view-info-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(2,132,199,.06); border: 1px solid rgba(2,132,199,.18); border-radius: 8px; font-size: 12px; color: var(--deep, #0C4A6E); margin-bottom: 16px }
.doc-view-info-banner i { color: var(--brand) }
.doc-view-info-banner.doc-view-warn { background: rgba(249,115,22,.08); border-color: rgba(249,115,22,.25); color: #9A3412 }
.doc-view-info-banner.doc-view-warn i { color: var(--orange) }

.version-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 600; background: rgba(148,163,184,.12); color: var(--label2); cursor: pointer; transition: all .12s; border: 1px solid transparent; margin-left: 6px; vertical-align: middle }
.version-badge:hover { background: rgba(2,132,199,.1); color: var(--brand); border-color: rgba(2,132,199,.3) }
.version-badge i { font-size: 9px }

.tbl-history { background: rgba(100,116,139,.1); color: var(--label2); position: relative }
.tbl-history:hover:not(:disabled) { background: rgba(100,116,139,.18) }
.tbl-history:disabled { opacity: .35; cursor: not-allowed }
.tbl-history.has-history { background: rgba(2,132,199,.08); color: var(--brand) }
.tbl-history.has-history:hover { background: rgba(2,132,199,.15) }
.tbl-history .history-dot { position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; background: var(--brand); border-radius: 50% }

/* ── History Modal Timeline ── */
.history-summary { display: flex; gap: 16px; padding: 14px 16px; background: var(--fill); border-radius: 10px; margin-bottom: 20px }
.history-summary-item { flex: 1 }
.history-summary-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--label3); margin-bottom: 4px }
.history-summary-value { font-size: 14px; font-weight: 700; color: var(--label) }
.history-summary-value.brand { color: var(--brand) }

.history-timeline { position: relative; padding-left: 24px }
.history-timeline::before { content: ''; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 2px; background: var(--border1) }
.history-entry { position: relative; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--border1); border-radius: 10px; margin-bottom: 12px }
.history-entry::before { content: ''; position: absolute; left: -19px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg2); border: 3px solid var(--border1) }
.history-entry.current { border-color: var(--brand); background: rgba(2,132,199,.04) }
.history-entry.current::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 3px rgba(2,132,199,.2) }
.history-entry.expired::before { background: var(--bg2); border-color: var(--red) }
.history-entry-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px }
.history-entry-title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px }
.history-entry-title .pill { font-size: 10px; padding: 2px 8px }
.history-entry-meta { font-size: 11px; color: var(--label3) }
.history-entry-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; font-size: 12px }
.history-entry-field { display: flex; flex-direction: column; gap: 2px }
.history-entry-field label { font-size: 10px; color: var(--label3); text-transform: uppercase; letter-spacing: .3px; font-weight: 600 }
.history-entry-field span { font-size: 12px; color: var(--label); font-weight: 500 }
.history-entry-actions { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--fill); display: flex; gap: 6px }
.history-entry-actions .btn-sm { padding: 4px 10px; font-size: 10px }

/* ── HHO Confirm / Alert Modal (replaces native browser dialogs) ── */
.hho-confirm-modal { max-width: 440px !important }
.hho-confirm-body { padding: 28px 28px 20px; text-align: center }
.hho-confirm-body .modal-icon { margin: 0 auto 14px }
.hho-confirm-title { font-size: 18px; font-weight: 700; color: var(--label); margin-bottom: 10px }
.hho-confirm-msg { font-size: 13px; color: var(--label2); line-height: 1.55; margin-bottom: 0 }
.hho-confirm-msg strong { color: var(--label) }
.hho-confirm-footer { display: flex !important; justify-content: flex-end; gap: 8px; padding: 14px 22px; background: var(--fill); border-top: 1px solid var(--border1) }
.hho-confirm-footer .btn { padding: 8px 18px; font-size: 13px }
.btn-danger { background: var(--red); color: #fff; border: none }
.btn-danger:hover { background: #DC2626 }

/* ── Archive / Delete Modal (compact enterprise) ── */
.archive-modal { max-width: 460px !important }
.archive-modal-body { padding: 28px 28px 20px; text-align: center }
.archive-modal-body .modal-icon { margin: 0 auto 14px }
.archive-modal-title { font-size: 18px; font-weight: 700; color: var(--label); margin-bottom: 10px }
.archive-modal-msg { font-size: 13px; color: var(--label2); line-height: 1.5; margin-bottom: 14px }
.archive-modal-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: rgba(2,132,199,.06); border: 1px solid rgba(2,132,199,.15); border-radius: 8px; font-size: 12px; color: var(--deep, #0C4A6E); text-align: left; line-height: 1.4 }
.archive-modal-note i { color: var(--brand); font-size: 14px; margin-top: 1px; flex-shrink: 0 }
.archive-modal-footer { display: flex !important; justify-content: space-between !important; align-items: center; padding: 14px 22px; background: var(--fill); border-top: 1px solid var(--border1) }
.archive-modal-actions { display: flex; gap: 8px }
.archive-modal-actions .btn { padding: 8px 14px; font-size: 12px }
.btn-warn { background: var(--orange); color: #fff; border: none }
.btn-warn:hover { background: #EA580C }
.btn-warn i { font-size: 11px }

/* ── Entity Tabs (Caregivers / Clients toggle on Documents + Matrix) ── */
.entity-tabs { display: inline-flex; background: var(--fill); padding: 4px; border-radius: 10px; gap: 2px; margin-bottom: 16px }
.entity-tab { padding: 8px 18px; border: none; background: transparent; border-radius: 7px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--label2); cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all .15s }
.entity-tab i { font-size: 12px }
.entity-tab.active { background: var(--bg2); color: var(--brand); box-shadow: 0 1px 4px rgba(15,23,42,.08) }
.entity-tab .count { background: rgba(148,163,184,.15); color: var(--label2); padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 700 }
.entity-tab.active .count { background: rgba(2,132,199,.1); color: var(--brand) }

/* ── Show Inactive Toggle (Compliance Settings) ── */
.show-inactive-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--bg2); border: 1px solid var(--border1); border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--label2); cursor: pointer; transition: all .12s; user-select: none }
.show-inactive-toggle:hover { border-color: var(--brand); color: var(--brand) }
.show-inactive-toggle i { color: var(--label3); font-size: 11px }
.show-inactive-toggle.on { background: rgba(2,132,199,.06); border-color: rgba(2,132,199,.4); color: var(--brand) }
.show-inactive-toggle.on i { color: var(--brand) }
.toggle-track-mini { width: 28px; height: 16px; background: var(--fill); border-radius: 8px; position: relative; transition: background .15s; flex-shrink: 0 }
.toggle-track-mini::after { content: ''; position: absolute; width: 12px; height: 12px; background: #fff; border-radius: 50%; top: 2px; left: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .15s }
.show-inactive-toggle.on .toggle-track-mini { background: var(--brand) }
.show-inactive-toggle.on .toggle-track-mini::after { transform: translateX(12px) }

/* ── Compliance Settings Empty State ── */
.req-empty-state { text-align: center; padding: 60px 40px; background: var(--bg2); border: 2px dashed var(--border1); border-radius: 14px; max-width: 600px; margin: 30px auto }
.req-empty-icon { width: 72px; height: 72px; background: rgba(2,132,199,.08); color: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 20px }
.req-empty-title { font-size: 18px; font-weight: 700; color: var(--label); margin-bottom: 8px }
.req-empty-msg { font-size: 13px; color: var(--label2); line-height: 1.6; margin-bottom: 24px; max-width: 440px; margin-left: auto; margin-right: auto }
.req-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap }

/* ── Compliance Requirement Cards (active + inactive) ── */
.req-card { background: var(--bg2); border: 1px solid var(--border1); border-radius: 10px; padding: 14px 16px; transition: all .12s; display: flex; flex-direction: column }
.req-card:hover { border-color: rgba(2,132,199,.3); box-shadow: 0 4px 12px rgba(15,23,42,.06) }
.req-card.req-inactive { opacity: .55; background: var(--fill); border-style: dashed }
.req-card.req-inactive .req-name { color: var(--label3) }
.req-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 8px }
.req-name { font-weight: 600; font-size: 13px; line-height: 1.3; flex: 1 }
.req-meta { display: flex; gap: 10px; align-items: center; font-size: 11px; color: var(--label3); margin-bottom: 10px; flex-wrap: wrap }
.req-renewal { display: flex; align-items: center; gap: 4px }
.req-status { padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .3px }
.req-required { background: rgba(2,132,199,.1); color: var(--brand) }
.req-optional { background: var(--fill); color: var(--label3) }
.req-inactive-pill { background: rgba(148,163,184,.15); color: var(--label3) }

/* Required/Optional toggle slider */
.req-toggle { position: relative; display: inline-block; width: 32px; height: 18px; flex-shrink: 0 }
.req-toggle input { opacity: 0; width: 0; height: 0 }
.req-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #CBD5E1; border-radius: 18px; transition: .2s }
.req-toggle-slider::before { content: ''; position: absolute; height: 14px; width: 14px; left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: .2s }
.req-toggle input:checked + .req-toggle-slider { background: var(--brand) }
.req-toggle input:checked + .req-toggle-slider::before { transform: translateX(14px) }

/* Action buttons (edit/delete/restore) */
.req-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: auto }
.req-btn { width: 28px; height: 28px; border: none; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; transition: all .12s }
.req-btn-edit { background: rgba(2,132,199,.08); color: var(--brand) }
.req-btn-edit:hover { background: rgba(2,132,199,.15) }
.req-btn-delete { background: rgba(239,68,68,.08); color: var(--red) }
.req-btn-delete:hover { background: rgba(239,68,68,.15) }
.req-btn-restore { background: rgba(34,197,94,.1); color: #16A34A }
.req-btn-restore:hover { background: rgba(34,197,94,.18) }

/* Category section */
.req-category-section { margin-bottom: 28px }
.req-category-title { font-size: 13px; font-weight: 700; color: var(--label); margin-bottom: 12px; display: flex; align-items: center; gap: 8px }
.req-category-title i { color: var(--brand); font-size: 14px }
.req-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px }

/* ── Custom Renewal Period (Compliance Settings req-modal) ── */
.req-renewal-custom { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 12px; background: rgba(2,132,199,.06); border: 1px solid rgba(2,132,199,.18); border-radius: 8px }
.req-renewal-custom-label { font-size: 13px; font-weight: 600; color: var(--label2); flex-shrink: 0 }
.req-renewal-custom input[type="number"] { width: 80px; padding: 7px 10px; font-size: 13px; border: 1px solid var(--border1); border-radius: 6px; background: #fff; color: var(--label); font-family: inherit }
.req-renewal-custom input[type="number"]:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 2px rgba(2,132,199,.12) }
.req-renewal-custom select { padding: 7px 10px; font-size: 13px; border: 1px solid var(--border1); border-radius: 6px; background: #fff; color: var(--label); font-family: inherit }
.req-renewal-custom select:focus { border-color: var(--brand); outline: none }

.detail-timeline-section { padding: 0 28px 28px; border-top: 1px solid var(--fill); margin-top: 4px }
.timeline-feed { max-height: 360px; overflow-y: auto; padding-right: 4px; }
.tl-date-sep { font-size: 11px; font-weight: 700; color: var(--label3); text-transform: uppercase; letter-spacing: .5px; padding: 12px 0 6px; border-bottom: 1px solid var(--border1); margin-bottom: 8px; }
.tl-date-sep:first-child { padding-top: 0; }
.tl-entry { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.tl-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.tl-body { flex: 1; min-width: 0; }
.tl-summary { font-size: 13px; font-weight: 500; color: var(--label1); line-height: 1.4; }
.tl-meta { font-size: 11px; color: var(--label4); margin-top: 2px; }

/* ─── SEARCHABLE SELECT ─────────────────────────────────────── */
.ss-wrap { position: relative; width: 100%; }
.ss-input {
    width: 100%; padding: 10px 36px 10px 12px; border: 1px solid var(--sep);
    border-radius: var(--r); background: var(--input-bg); color: var(--label);
    font-size: 14px; font-family: inherit; outline: none; transition: border .15s;
    box-sizing: border-box; cursor: text;
}
.ss-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(2,110,199,.1); }
.ss-input::placeholder { color: var(--label3); }
.ss-input.ss-has-value { font-weight: 600; color: var(--label); cursor: default; }
.ss-clear {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; border-radius: 50%; border: none; padding: 0;
    background: var(--fill2); color: var(--label3); font-size: 12px;
    cursor: pointer; display: none; align-items: center; justify-content: center;
    line-height: 1; transition: background .15s;
}
.ss-clear:hover { background: var(--red); color: #fff; }
.ss-has-value ~ .ss-clear { display: flex; }
.ss-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--card); border: 1px solid var(--sep);
    border-radius: var(--r); box-shadow: var(--sh-md);
    max-height: 240px; overflow-y: auto; z-index: 99999;
    display: none; overscroll-behavior: contain;
}
.ss-dropdown.ss-open { display: block; }
.ss-option {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; cursor: pointer; transition: background .1s;
    font-size: 13px; color: var(--label); border-bottom: 1px solid var(--fill);
}
.ss-option:last-child { border-bottom: none; }
.ss-option:hover, .ss-option.ss-highlighted { background: var(--fill2); }
.ss-option .ss-name { font-weight: 600; flex-shrink: 0; }
.ss-option .ss-sep { color: var(--label4); font-size: 11px; }
.ss-option .ss-code { color: var(--blue); font-size: 12px; font-weight: 500; }
.ss-option .ss-office { color: var(--label3); font-size: 12px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.ss-empty { padding: 14px; text-align: center; color: var(--label3); font-size: 13px; }
.ss-hidden-val { display: none; }
