/* ==========================================================================
   World-Class Humanitarian & Grants Admin Dashboard Portal Stylesheet
   Enterprise SaaS / Linear & Stripe Inspired Architecture
   Complete Synchronous Light & Dark Theme Support
   ========================================================================== */

:root {
    --wp-admin-bar-height: 0px !important;
}

html, body, html body.admin-dashboard-body, html body.admin-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#wpadminbar {
    display: none !important;
    height: 0px !important;
    visibility: hidden !important;
}

body.admin-bar,
body.admin-bar-present,
html:has(#wpadminbar) body {
    --wp-admin-bar-height: 0px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar,
    body.admin-bar-present,
    html:has(#wpadminbar) body {
        --wp-admin-bar-height: 0px !important;
    }
}

:root,
html[data-theme="dark"],
body[data-theme="dark"] {
    --adm-bg: #070c18;
    --adm-surface: #0c1529;
    --adm-card-bg: #0f1a34;
    --adm-card-hover: #142244;
    --adm-border: rgba(255, 255, 255, 0.08);
    --adm-border-subtle: rgba(255, 255, 255, 0.04);
    --adm-text-main: #f8fafc;
    --adm-text-muted: #94a3b8;
    --adm-text-subtle: #64748b;
    --adm-primary: #0284c7;
    --adm-primary-hover: #0369a1;
    --adm-primary-glow: rgba(2, 132, 199, 0.25);
    --adm-accent-amber: #f59e0b;
    --adm-accent-green: #10b981;
    --adm-accent-cyan: #06b6d4;
    --adm-accent-purple: #8b5cf6;
    --adm-topbar-bg: rgba(12, 21, 41, 0.92);
    --adm-sidebar-bg: #091022;
    --adm-table-header: #0d172e;
    --adm-table-row-hover: rgba(255, 255, 255, 0.025);
    --adm-input-bg: #0d172e;
    --adm-input-border: #1e2e50;
    --adm-input-text: #f8fafc;
    --adm-modal-overlay: rgba(3, 7, 18, 0.85);
    --adm-modal-bg: #0f1a34;
    --adm-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"],
body[data-theme="light"] {
    --adm-bg: #f1f5f9;
    --adm-surface: #ffffff;
    --adm-card-bg: #ffffff;
    --adm-card-hover: #f8fafc;
    --adm-border: #e2e8f0;
    --adm-border-subtle: #edf2f7;
    --adm-text-main: #0f172a;
    --adm-text-muted: #475569;
    --adm-text-subtle: #64748b;
    --adm-primary: #0284c7;
    --adm-primary-hover: #0369a1;
    --adm-primary-glow: rgba(2, 132, 199, 0.15);
    --adm-accent-amber: #d97706;
    --adm-accent-green: #059669;
    --adm-accent-cyan: #0891b2;
    --adm-accent-purple: #7c3aed;
    --adm-topbar-bg: rgba(255, 255, 255, 0.96);
    --adm-sidebar-bg: #ffffff;
    --adm-table-header: #f8fafc;
    --adm-table-row-hover: #f8fafc;
    --adm-input-bg: #ffffff;
    --adm-input-border: #cbd5e1;
    --adm-input-text: #0f172a;
    --adm-modal-overlay: rgba(15, 23, 42, 0.65);
    --adm-modal-bg: #ffffff;
    --adm-shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

body.admin-dashboard-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--adm-bg) !important;
    color: var(--adm-text-main) !important;
    min-height: 100vh;
    margin: 0;
    padding: 0 !important;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   STATE 1: AUTH GUARD SCREEN
   ========================================================================== */
.auth-card-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: radial-gradient(circle at 50% 10%, rgba(2, 132, 199, 0.12) 0%, transparent 60%);
}

.auth-top-actions {
    max-width: 440px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--adm-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-back-link:hover {
    color: var(--adm-primary);
}

.auth-card {
    max-width: 440px;
    width: 100%;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), 0 0 40px var(--adm-primary-glow);
    border-radius: 24px;
    padding: 40px 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-avatar-wrapper {
    margin-bottom: 20px;
}

.auth-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.12);
    border: 2px solid var(--adm-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--adm-primary);
    font-size: 1.8rem;
    box-shadow: 0 0 24px var(--adm-primary-glow);
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--adm-text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 0.84rem;
    color: var(--adm-text-muted);
    margin-bottom: 22px;
    line-height: 1.5;
}

.auth-helper-pill {
    width: 100%;
    margin-bottom: 20px;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(2, 132, 199, 0.08);
    border: 1px dashed var(--adm-primary);
    font-size: 0.8rem;
    color: var(--adm-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-fill-admin-pill {
    background: var(--adm-primary);
    color: #ffffff;
    border: none;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-fill-admin-pill:hover {
    background: var(--adm-primary-hover);
}

.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 6px;
}

.auth-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--adm-text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-icon {
    position: absolute;
    left: 14px;
    color: var(--adm-text-subtle);
    font-size: 1rem;
}

.auth-input-wrapper input {
    width: 100%;
    height: 48px;
    background: var(--adm-input-bg);
    border: 1.5px solid var(--adm-input-border);
    border-radius: 12px;
    padding: 10px 14px 10px 42px;
    color: var(--adm-input-text);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
}

.auth-input-wrapper input:focus {
    border-color: var(--adm-primary);
    box-shadow: 0 0 0 3px var(--adm-primary-glow);
}

.auth-pwd-toggle {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--adm-text-subtle);
    font-size: 1rem;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}

.auth-pwd-toggle:hover {
    color: var(--adm-primary);
}

.auth-input-wrapper input[type="password"],
.auth-input-wrapper input[name="pwd"] {
    padding-right: 44px;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px var(--adm-primary-glow);
    transition: all 0.25s ease;
    margin-top: 6px;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px var(--adm-primary-glow);
}

.auth-secured {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--adm-text-subtle);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   STATE 2: WORLD-CLASS DASHBOARD LAYOUT
   ========================================================================== */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - var(--wp-admin-bar-height, 0px));
    width: 100%;
    background-color: var(--adm-bg);
    position: relative;
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: var(--wp-admin-bar-height, 0px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

/* SIDEBAR NAVIGATION - FIXED & PINNED */
.dashboard-sidebar {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    background-color: var(--adm-sidebar-bg);
    border-right: 1px solid var(--adm-border);
    display: flex;
    flex-direction: column;
    padding: 16px 14px 14px 14px;
    position: fixed;
    top: 0 !important;
    left: 0;
    bottom: 0;
    height: 100vh !important;
    z-index: 900;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease;
    box-sizing: border-box;
}

[data-theme="light"] .dashboard-sidebar {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 4px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

[data-theme="light"] .dashboard-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px 14px 6px;
    border-bottom: 1px solid var(--adm-border-subtle);
    margin-bottom: 12px;
    flex-shrink: 0;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 14px var(--adm-primary-glow);
    flex-shrink: 0;
}

.brand-text-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-text-block .brand-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--adm-text-main);
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap;
}

.brand-text-block .brand-sub {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--adm-primary);
    letter-spacing: 0.8px;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    margin-bottom: 10px;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--adm-text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.sidebar-menu-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--adm-text-subtle);
    transition: color 0.2s;
    flex-shrink: 0;
}

.sidebar-menu-item:hover {
    background: var(--adm-card-hover);
    color: var(--adm-text-main);
}

.sidebar-menu-item:hover i {
    color: var(--adm-primary);
}

.sidebar-menu-item.active {
    background: rgba(2, 132, 199, 0.12);
    color: var(--adm-primary);
    font-weight: 700;
    border: 1px solid rgba(2, 132, 199, 0.25);
}

.sidebar-menu-item.active i {
    color: var(--adm-primary);
}

.menu-badge {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--adm-text-muted);
}

[data-theme="light"] .menu-badge {
    background: #e2e8f0;
    color: #475569;
}

.menu-badge.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--adm-accent-amber);
}

.menu-badge.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--adm-accent-green);
}

/* Sidebar Footer */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--adm-border-subtle);
    flex-shrink: 0;
    margin-top: auto;
}

.staff-profile-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    background: var(--adm-card-hover);
}

.staff-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.76rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.staff-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.staff-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--adm-text-main);
    line-height: 1.2;
}

.staff-role {
    font-size: 0.66rem;
    color: var(--adm-text-subtle);
    line-height: 1.2;
}

.sidebar-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.sidebar-logout-btn:hover {
    background: #ef4444;
    color: #ffffff;
}

/* MAIN CONTENT AREA */
.dashboard-main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 24px 48px 24px;
    margin-left: 260px;
    width: calc(100% - 260px);
    box-sizing: border-box;
}

/* TOPBAR */
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    border-bottom: 1px solid var(--adm-border);
    margin-bottom: 20px;
    position: sticky;
    top: 0 !important;
    margin-top: 0 !important;
    background: var(--adm-topbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 800;
    margin-left: -24px;
    margin-right: -24px;
    padding: 0 24px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    display: none;
    background: var(--adm-card-hover);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-main);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    border-color: var(--adm-primary);
    color: var(--adm-primary);
}

.system-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--adm-accent-green);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.system-status-pill .pill-mobile-text {
    display: none;
}

.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--adm-accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.topbar-search-box i {
    position: absolute;
    left: 14px;
    color: var(--adm-text-subtle);
    font-size: 0.9rem;
    pointer-events: none;
}

.topbar-search-box input {
    height: 40px;
    width: 280px;
    background: var(--adm-input-bg);
    border: 1.5px solid var(--adm-input-border);
    border-radius: 10px;
    padding: 6px 14px 6px 38px;
    color: var(--adm-input-text);
    font-size: 0.82rem;
    outline: none;
    transition: all 0.25s ease;
}

.topbar-search-box input:focus {
    width: 330px;
    border-color: var(--adm-primary);
    box-shadow: 0 0 0 3px var(--adm-primary-glow);
}

.btn-topbar-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--adm-surface);
    border: 1.5px solid var(--adm-border);
    color: var(--adm-text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-topbar-action:hover {
    background: var(--adm-card-hover);
    border-color: var(--adm-primary);
    color: var(--adm-primary);
}

.admin-theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--adm-surface);
    border: 1.5px solid var(--adm-border);
    color: var(--adm-text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-theme-toggle-btn:hover {
    border-color: var(--adm-primary);
    color: var(--adm-primary);
}

/* PANELS ARCHITECTURE */
.dashboard-panel {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.dashboard-panel.active {
    display: flex;
}

/* PANEL HEADER BANNER */
.panel-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--adm-primary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.panel-heading {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--adm-text-main);
    letter-spacing: -0.5px;
}

.panel-sub {
    font-size: 0.86rem;
    color: var(--adm-text-muted);
    margin-top: 3px;
    max-width: 720px;
    line-height: 1.45;
}

.btn-refresh-telemetry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    background: var(--adm-surface);
    border: 1.5px solid var(--adm-border);
    color: var(--adm-text-main);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh-telemetry:hover {
    border-color: var(--adm-primary);
    color: var(--adm-primary);
}

/* KPI CARDS GRID */
.kpi-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.kpi-card {
    background: var(--adm-card-bg);
    border: 1px solid var(--adm-border);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--adm-shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--adm-primary);
}

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

.kpi-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--adm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.kpi-icon-box.blue { background: rgba(2, 132, 199, 0.12); color: var(--adm-primary); }
.kpi-icon-box.amber { background: rgba(245, 158, 11, 0.12); color: var(--adm-accent-amber); }
.kpi-icon-box.green { background: rgba(16, 185, 129, 0.12); color: var(--adm-accent-green); }
.kpi-icon-box.purple { background: rgba(139, 92, 246, 0.12); color: var(--adm-accent-purple); }

.kpi-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--adm-text-main);
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.kpi-footer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 600;
}

.kpi-footer.positive { color: var(--adm-accent-green); }
.kpi-footer.neutral { color: var(--adm-accent-amber); }

/* ANALYTICS DOUBLE GRID */
.analytics-double-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.analytics-card {
    background: var(--adm-card-bg);
    border: 1px solid var(--adm-border);
    border-radius: 18px;
    padding: 26px;
    box-shadow: var(--adm-shadow-card);
    display: flex;
    flex-direction: column;
}

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

.card-box-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--adm-text-main);
}

.card-box-sub {
    font-size: 0.78rem;
    color: var(--adm-text-muted);
    margin-top: 3px;
}

.card-tag-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--adm-text-muted);
}

[data-theme="light"] .card-tag-pill {
    background: #f1f5f9;
    color: #475569;
}

.card-tag-pill.active-pill {
    background: rgba(16, 185, 129, 0.12);
    color: var(--adm-accent-green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Program Bars List */
.program-bars-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.program-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.prog-name {
    font-weight: 700;
    color: var(--adm-text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.prog-icon {
    font-size: 0.95rem;
}

.prog-icon.amber { color: var(--adm-accent-amber); }
.prog-icon.green { color: var(--adm-accent-green); }
.prog-icon.cyan { color: var(--adm-accent-cyan); }
.prog-icon.purple { color: var(--adm-accent-purple); }
.prog-icon.blue { color: var(--adm-primary); }

.prog-count {
    font-weight: 700;
    color: var(--adm-text-muted);
    font-size: 0.78rem;
}

.prog-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

[data-theme="light"] .prog-track {
    background: #e2e8f0;
}

.prog-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.amber-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.green-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.cyan-fill { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.purple-fill { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.blue-fill { background: linear-gradient(90deg, #0284c7, #38bdf8); }

/* Interactive Chart Graph */
.interactive-chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 160px;
    padding: 10px 10px 0 10px;
    border-bottom: 1px solid var(--adm-border);
    margin-bottom: 24px;
}

.chart-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.chart-bar {
    width: 24px;
    border-radius: 6px 6px 0 0;
    background: rgba(2, 132, 199, 0.35);
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-bar:hover {
    background: var(--adm-primary);
    transform: scaleY(1.05);
}

.chart-bar.bar-active {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 0 14px var(--adm-primary-glow);
}

.chart-col-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--adm-text-subtle);
}

.chart-col-label.today-lbl {
    color: var(--adm-primary);
    font-weight: 800;
}

/* Checklist items */
.audit-checklist-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-heading {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--adm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--adm-text-main);
}

.check-item.ok i {
    color: var(--adm-accent-green);
    font-size: 0.95rem;
}

/* ==========================================================================
   PANEL 2: ALL DATA SUBMISSIONS TABLE & TOOLS
   ========================================================================== */
.table-card-container {
    background: var(--adm-card-bg);
    border: 1px solid var(--adm-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--adm-shadow-card);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.table-top-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.section-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--adm-primary);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.table-main-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--adm-text-main);
}

.table-sub-title {
    font-size: 0.82rem;
    color: var(--adm-text-muted);
    margin-top: 4px;
}

.table-tools-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-action-tool {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--adm-surface);
    border: 1.5px solid var(--adm-border);
    color: var(--adm-text-main);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-tool:hover {
    border-color: var(--adm-primary);
    color: var(--adm-primary);
}

/* Filter Tabs Row */
.filter-tabs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--adm-border-subtle);
    padding-bottom: 12px;
    overflow-x: auto;
}

.tab-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--adm-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-filter-btn:hover {
    background: var(--adm-card-hover);
    color: var(--adm-text-main);
}

.tab-filter-btn.active {
    background: var(--adm-surface);
    border-color: var(--adm-border);
    color: var(--adm-primary);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-count-pill {
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--adm-text-muted);
}

[data-theme="light"] .tab-count-pill {
    background: #e2e8f0;
    color: #475569;
}

.tab-count-pill.tab-warning { background: rgba(245, 158, 11, 0.15); color: var(--adm-accent-amber); }
.tab-count-pill.tab-success { background: rgba(16, 185, 129, 0.15); color: var(--adm-accent-green); }
.tab-count-pill.tab-primary { background: rgba(2, 132, 199, 0.15); color: var(--adm-primary); }

/* DATA TABLE */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--adm-border);
    border-radius: 14px 14px 0 0;
    border-bottom: none;
}

/* TABLE PAGINATION TOOLBAR */
.table-pagination-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 0 0 14px 14px;
    flex-wrap: wrap;
    gap: 14px;
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pagination-info-text {
    font-size: 0.82rem;
    color: var(--adm-text-muted);
}
.pagination-info-text strong {
    color: var(--adm-text-main);
    font-weight: 700;
}

.pagination-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--adm-text-subtle);
    font-weight: 600;
}

.pagination-size-selector select {
    background: var(--adm-card-bg);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-main);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.pagination-size-selector select:focus {
    border-color: var(--adm-primary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-page-nav,
.btn-page-num {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--adm-border);
    background: var(--adm-card-bg);
    color: var(--adm-text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-page-nav:hover:not(:disabled),
.btn-page-num:hover:not(.active) {
    border-color: var(--adm-primary);
    color: var(--adm-primary);
    background: var(--adm-card-hover);
}

.btn-page-num.active {
    background: var(--adm-primary);
    border-color: var(--adm-primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--adm-primary-glow);
}

.btn-page-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: var(--adm-border-subtle);
}

.page-single-label {
    font-size: 0.78rem;
    color: var(--adm-text-subtle);
    font-weight: 600;
    padding: 0 8px;
}

.page-ellipsis {
    color: var(--adm-text-subtle);
    padding: 0 4px;
    font-size: 0.82rem;
}

.enterprise-data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.84rem;
}

.enterprise-data-table thead th {
    background-color: var(--adm-table-header);
    color: var(--adm-text-muted);
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--adm-border);
    white-space: nowrap;
}

.enterprise-data-table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--adm-border-subtle);
    vertical-align: middle;
    color: var(--adm-text-main);
    transition: background 0.15s;
}

.enterprise-data-table tbody tr:hover td {
    background-color: var(--adm-table-row-hover);
}

/* Case Ref Badge */
.ref-badge-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.case-ref-pill {
    font-family: monospace, inherit;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.25);
    color: var(--adm-primary);
    white-space: nowrap;
}

.copy-mini-btn {
    background: none;
    border: none;
    color: var(--adm-text-subtle);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
    transition: color 0.2s;
}

.copy-mini-btn:hover {
    color: var(--adm-primary);
}

/* User Meta Cell */
.user-meta-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-name-meta {
    display: flex;
    flex-direction: column;
}

.user-name-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--adm-text-main);
}

.cnic-sub-text {
    font-size: 0.74rem;
    font-family: monospace, inherit;
    color: var(--adm-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Contact Meta Cell */
.contact-meta-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.78rem;
}

.contact-email {
    color: var(--adm-text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.contact-phone {
    color: var(--adm-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-2fa-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--adm-accent-green);
    margin-top: 2px;
}

/* Address & City Cell */
.address-cell {
    max-width: 230px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--adm-text-muted);
    line-height: 1.4;
}

.city-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(2, 132, 199, 0.12);
    border: 1px solid rgba(2, 132, 199, 0.25);
    color: var(--adm-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

[data-theme="light"] .city-pill-badge {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0369a1;
}

.address-detail-text {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 0.76rem;
    color: var(--adm-text-muted);
    word-break: break-word;
}

.address-detail-text i {
    color: var(--adm-text-subtle);
    margin-top: 3px;
    font-size: 0.72rem;
}

.highlight-city {
    color: var(--adm-primary) !important;
    font-weight: 800 !important;
}

/* Program Pill Cell */
.prog-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    color: var(--adm-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

/* Verification Meta Cell */
.verification-meta-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bio-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--adm-accent-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    width: fit-content;
}

.doc-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--adm-text-muted);
}

/* Inline Status Dropdown */
.status-inline-select {
    font-size: 0.76rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.status-inline-select.status-review {
    background-color: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: var(--adm-accent-amber);
}

.status-inline-select.status-approved {
    background-color: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--adm-accent-green);
}

.status-inline-select.status-disbursed {
    background-color: rgba(2, 132, 199, 0.12);
    border-color: rgba(2, 132, 199, 0.35);
    color: var(--adm-primary);
}

.status-inline-select.status-rejected {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

.status-inline-select option {
    background-color: var(--adm-surface);
    color: var(--adm-text-main);
}

/* Date Cell */
.date-cell-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.78rem;
    color: var(--adm-text-main);
}

.date-cell-text small {
    color: var(--adm-text-subtle);
}

/* Actions Cell */
.actions-cell-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--adm-border);
    transition: all 0.2s ease;
}

.btn-table-action.btn-view {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.25);
    color: var(--adm-primary);
}

.btn-table-action.btn-view:hover {
    background: var(--adm-primary);
    color: #ffffff;
}

.btn-table-action.btn-del {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.btn-table-action.btn-del:hover {
    background: #ef4444;
    color: #ffffff;
}

/* No records row */
.no-records-row {
    padding: 60px 20px !important;
    text-align: center;
}

.no-records-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.empty-icon {
    font-size: 2.5rem;
    color: var(--adm-text-subtle);
    margin-bottom: 6px;
}

.no-records-content h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--adm-text-main);
}

.no-records-content p {
    font-size: 0.82rem;
    color: var(--adm-text-muted);
    max-width: 420px;
}

/* ==========================================================================
   WORLD-CLASS BENEFICIARY DOSSIER INSPECTOR MODAL
   ========================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--adm-modal-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
}
.modal-overlay.active,
.modal-overlay[style*="display: flex"] {
    display: flex;
}

.dossier-modal-card {
    background: var(--adm-modal-bg);
    border: 1px solid var(--adm-border);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
    border-radius: 22px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dossier-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    border-bottom: 1px solid var(--adm-border);
    background: var(--adm-surface);
}

.dossier-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dossier-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--adm-primary-glow);
}

.dossier-title-block {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dossier-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dossier-name-row h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--adm-text-main);
}

.verified-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--adm-accent-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.dossier-case-tag {
    font-size: 0.78rem;
    color: var(--adm-text-muted);
}

.dossier-case-tag strong {
    color: var(--adm-primary);
    font-family: monospace, inherit;
}

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

.btn-dossier-print {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-main);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-dossier-print:hover {
    border-color: var(--adm-primary);
    color: var(--adm-primary);
}

.btn-dossier-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--adm-text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

[data-theme="light"] .btn-dossier-close {
    background: #f1f5f9;
}

.btn-dossier-close:hover {
    background: #ef4444;
    color: #ffffff;
}

/* Modal Body */
.dossier-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Action Ribbon */
.dossier-action-ribbon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--adm-card-hover);
    border: 1px solid var(--adm-border);
    flex-wrap: wrap;
    gap: 14px;
}

.ribbon-status-current {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ribbon-lbl {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--adm-text-muted);
}

.ribbon-pill {
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.12);
    border: 1px solid var(--adm-primary);
    color: var(--adm-primary);
}

.ribbon-change-controller {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ribbon-change-controller label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--adm-text-main);
}

.dossier-status-select {
    height: 38px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--adm-input-bg);
    border: 1.5px solid var(--adm-input-border);
    color: var(--adm-input-text);
    font-size: 0.82rem;
    font-weight: 700;
    outline: none;
    font-family: inherit;
}

.btn-save-status-now {
    height: 38px;
    padding: 0 16px;
    border-radius: 8px;
    background: var(--adm-primary);
    color: #ffffff;
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-save-status-now:hover {
    background: var(--adm-primary-hover);
}

/* Content 2-Column Grid */
.dossier-content-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 22px;
}

.dossier-section-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dossier-sect-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--adm-text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--adm-border-subtle);
}

.dossier-sect-title i {
    color: var(--adm-primary);
}

.dossier-fields-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dossier-field-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--adm-border-subtle);
}

.d-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--adm-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.d-label i {
    width: 14px;
}

.d-val {
    font-size: 0.86rem;
    color: var(--adm-text-main);
}

.d-val.font-semibold { font-weight: 700; }
.d-val.font-mono { font-family: monospace, inherit; }

.d-val.highlight-gold {
    color: var(--adm-accent-amber);
    font-weight: 800;
}

.prog-highlight-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid var(--adm-primary);
    color: var(--adm-primary);
    font-weight: 800;
    font-size: 0.82rem;
    width: fit-content;
}

.action-link-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--adm-accent-green);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.12);
}

.badge-green-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--adm-accent-green);
}

/* Biometric Score Box */
.biometric-score-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.bio-score-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bio-score-left i {
    font-size: 1.6rem;
    color: var(--adm-accent-green);
}

.bio-score-left strong {
    font-size: 0.84rem;
    color: var(--adm-text-main);
    display: block;
}

.bio-score-left p {
    font-size: 0.74rem;
    color: var(--adm-text-muted);
}

.score-badge {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--adm-accent-green);
}

/* Side-by-Side Document Photos Viewer */
.dossier-docs-viewer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.doc-viewer-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    background: var(--adm-card-hover);
    border: 1px solid var(--adm-border);
}

.doc-side-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--adm-text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.doc-img-container {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.doc-img-container:hover img {
    transform: scale(1.08);
}

.doc-verif-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--adm-accent-green);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Trustee Notes Box */
.trustee-notes-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trustee-notes-box label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--adm-text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trustee-notes-box textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--adm-input-bg);
    border: 1.5px solid var(--adm-input-border);
    color: var(--adm-input-text);
    font-family: inherit;
    font-size: 0.8rem;
    outline: none;
    resize: vertical;
}

.trustee-notes-box textarea:focus {
    border-color: var(--adm-primary);
}

/* Modal Footer */
.dossier-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    border-top: 1px solid var(--adm-border);
    background: var(--adm-surface);
}

.footer-notice {
    font-size: 0.72rem;
    color: var(--adm-text-subtle);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-dossier-dismiss {
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-main);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-dossier-dismiss:hover {
    background: var(--adm-card-hover);
    color: var(--adm-text-main);
}

/* ADMIN TOAST */
.admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    animation: slideToastUp 0.3s ease;
}

.admin-toast.toast-success { background: #10b981; color: #ffffff; }
.admin-toast.toast-error { background: #ef4444; color: #ffffff; }
.admin-toast.toast-info { background: #0284c7; color: #ffffff; }

@keyframes slideToastUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   SETTINGS & SECURITY AUDIT TIMELINE PANELS
   ========================================================================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.settings-card,
.security-timeline-card {
    background: var(--adm-card-bg);
    border: 1px solid var(--adm-border);
    border-radius: 18px;
    padding: 26px;
    box-shadow: var(--adm-shadow-card);
}

.settings-box-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--adm-text-main);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--adm-border-subtle);
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--adm-border-subtle);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.settings-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--adm-text-main);
}

.settings-desc {
    font-size: 0.74rem;
    color: var(--adm-text-muted);
    max-width: 240px;
    line-height: 1.4;
}

.settings-select {
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--adm-input-bg);
    border: 1.5px solid var(--adm-input-border);
    color: var(--adm-input-text);
    font-size: 0.8rem;
    font-weight: 600;
    outline: none;
}

/* Switch Slider */
.switch-slider {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.switch-slider input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--adm-input-border);
    border-radius: 34px;
    transition: .3s;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: .3s;
}

.switch-slider input:checked + .slider-round {
    background-color: var(--adm-primary);
}

.switch-slider input:checked + .slider-round:before {
    transform: translateX(20px);
}

/* Security Timeline */
.audit-timeline {
    position: relative;
    padding-left: 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.audit-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--adm-border);
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--adm-surface);
    border: 2px solid var(--adm-primary);
}

.timeline-dot.success { border-color: var(--adm-accent-green); }

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

.timeline-event {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--adm-text-main);
}

.timeline-time {
    font-size: 0.72rem;
    color: var(--adm-text-subtle);
    font-weight: 600;
}

.timeline-desc {
    font-size: 0.78rem;
    color: var(--adm-text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1150px) {
    .analytics-double-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dossier-content-grid {
        grid-template-columns: 1fr;
    }
    .topbar-search-box input {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
        min-height: 100vh;
    }
    .sidebar-backdrop {
        display: block;
    }
    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }
    .dashboard-sidebar {
        position: fixed;
        left: -300px;
        top: 0 !important;
        width: 260px;
        max-width: 85vw;
        height: 100vh !important;
        z-index: 9500;
        border-right: 1px solid var(--adm-border);
        border-bottom: none;
        box-shadow: none;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
        padding: 16px 14px 14px 14px;
    }
    .dashboard-sidebar.sidebar-mobile-open {
        left: 0;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
    }
    .sidebar-toggle-btn {
        display: inline-flex;
    }
    .dashboard-main-content {
        margin-left: 0;
        width: 100%;
        padding: 0 14px 40px 14px;
    }
    .admin-topbar {
        height: auto;
        min-height: 58px;
        margin-left: -14px;
        margin-right: -14px;
        padding: 10px 14px;
        gap: 10px;
    }
    .topbar-left {
        gap: 10px;
        align-items: center;
        flex-shrink: 0;
    }
    .system-status-pill .pill-full-text {
        display: none;
    }
    .system-status-pill .pill-mobile-text {
        display: inline;
        font-size: 0.72rem;
    }
    .system-status-pill {
        padding: 4px 10px;
        gap: 6px;
    }
    .topbar-search-box {
        display: none;
    }
    .kpi-metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .btn-topbar-action span,
    .admin-topbar .btn-theme-toggle #admin-theme-label {
        display: none;
    }
    .btn-topbar-action,
    .admin-topbar .btn-theme-toggle {
        width: 36px;
        height: 36px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
    }
    .topbar-right {
        gap: 6px;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .dashboard-header .header-actions {
        width: 100%;
    }
    .dashboard-header .header-actions button {
        width: 100%;
        justify-content: center;
    }
    .table-top-control-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .table-tools-right {
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }
    .table-tools-right button,
    .table-tools-right select,
    .table-tools-right input {
        width: 100%;
    }
    .filter-tabs-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        width: 100%;
    }
    .filter-tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
    .table-card-container {
        padding: 14px;
        border-radius: 14px;
    }
    .modal-card {
        width: 96%;
        max-width: 96%;
        margin: 10px auto;
    }
}

@media (max-width: 480px) {
    .system-status-pill {
        display: none;
    }
    .kpi-metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .auth-login-card {
        padding: 24px 16px;
        border-radius: 16px;
        margin: 15px auto;
    }
}
