:root {
    --bg:      #0e2d52;
    --panel:   #163d6a;
    --panel-2: #1e4d82;
    --text:    #ddeeff;
    --muted:   #7aaecf;
    --line:    rgba(50,130,210,0.18);
    --accent:  #1460b8;
    --orange:  #c85800;
    --success: #156b38;
    --danger:  #b82020;
    --warning: #c85800;

    /* highlight colours for text on dark bg */
    --hi-blue:   #5ba8f5;
    --hi-orange: #f87c30;
    --hi-green:  #3dcf74;
    --hi-red:    #f87171;
}
* { box-sizing: border-box; }
body { margin:0; font-family:Arial,sans-serif; background:var(--bg); color:var(--text); font-size:14px; }

/* ── Topbar ── */
.topbar {
    display:flex; justify-content:space-between; align-items:center;
    padding:10px 20px; background:#0a1e3c;
    border-bottom:3px solid var(--orange);
    position:sticky; top:0; z-index:200; gap:12px;
}
.brand { display:flex; align-items:center; gap:12px; }
.logo {
    width:38px; height:38px; border-radius:10px;
    background:linear-gradient(135deg,#c85800 0%,#e07520 100%);
    color:#fff; display:flex; align-items:center; justify-content:center;
    font-weight:bold; font-size:13px;
    border:1px solid rgba(255,140,60,0.4); flex-shrink:0;
    box-shadow:0 2px 10px rgba(200,88,0,0.3);
}
.title { font-size:17px; font-weight:700; color:#ddeeff; }
.subtitle { font-size:11px; color:var(--muted); margin-top:1px; display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.nav-role-badge { display:inline-block; padding:1px 6px; background:rgba(200,88,0,0.2); color:var(--hi-orange); border-radius:4px; font-size:10px; font-weight:700; border:1px solid rgba(200,88,0,0.3); }
.nav-links { display:flex; align-items:center; gap:3px; flex-wrap:wrap; }
.nav-links a, .nav-dropdown-trigger { color:var(--text); text-decoration:none; font-size:13px; padding:6px 10px; border-radius:8px; cursor:pointer; transition:background 0.15s; white-space:nowrap; }
.nav-links a:hover, .nav-dropdown-trigger:hover { background:rgba(50,130,210,0.12); color:var(--hi-blue); }
.nav-links a.active, .nav-dropdown-trigger.active { background:rgba(200,88,0,0.15); color:var(--hi-orange); border-bottom:2px solid var(--hi-orange); }
.btn-nav-logout { background:rgba(184,32,32,0.12)!important; color:var(--hi-red)!important; border:1px solid rgba(184,32,32,0.25)!important; border-radius:8px; }
.btn-nav-logout:hover { background:rgba(184,32,32,0.2)!important; }
.nav-dropdown { position:relative; }
.nav-dropdown-menu { display:none; position:absolute; right:0; top:calc(100% + 6px); background:#163d6a; border:1px solid var(--line); border-radius:10px; min-width:185px; padding:6px; box-shadow:0 8px 24px rgba(0,0,0,0.5); z-index:200; }
.nav-dropdown:hover .nav-dropdown-menu { display:block; }
.nav-dropdown-menu a { display:block; padding:8px 12px; border-radius:6px; color:var(--text); text-decoration:none; font-size:13px; }
.nav-dropdown-menu a:hover { background:rgba(50,130,210,0.1); color:var(--hi-blue); }

/* ── Layout ── */
.page-container { max-width:1140px; margin:0 auto; padding:26px 20px; }
.page-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:20px; gap:12px; flex-wrap:wrap; }
.page-header h1 { margin:0; font-size:22px; color:var(--text); }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:18px; }

/* ── Cards ── */
.card { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:22px; margin-bottom:18px; box-shadow:0 4px 20px rgba(0,0,0,0.3); }
.card-link { display:block; text-decoration:none; color:inherit; cursor:pointer; transition:border-color 0.15s, box-shadow 0.15s; }
.card-link:hover { border-color:rgba(200,88,0,0.4); box-shadow:0 4px 20px rgba(200,88,0,0.1); }
.card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.card-header h2 { margin:0; font-size:15px; color:var(--hi-blue); }

/* ── Stats ── */
.stats-row { display:grid; grid-template-columns:repeat(auto-fill,minmax(175px,1fr)); gap:14px; margin-bottom:20px; }
.stat-card { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:18px; border-left:3px solid transparent; }
.stat-card-accent { border-left-color:var(--hi-blue); background:rgba(20,96,184,0.07); }
.stat-card-orange { border-left-color:var(--hi-orange); background:rgba(200,88,0,0.07); }
.stat-card-green  { border-left-color:var(--hi-green);  background:rgba(21,107,56,0.07); }
.stat-label { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-bottom:8px; }
.stat-value { font-size:24px; font-weight:700; }
.stat-value.accent  { color:var(--hi-blue); }
.stat-value.warning { color:var(--hi-orange); }
.stat-value.success { color:var(--hi-green); }
.stat-value.danger  { color:var(--hi-red); }

/* ── Auth ── */
.auth-card { max-width:460px; margin:40px auto; }
h1,h2,h3 { margin-top:0; }
.muted { color:var(--muted); }

/* ── Forms ── */
.form-grid { display:grid; gap:16px; margin-top:4px; }
.form-group label { display:block; margin-bottom:6px; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.form-group input, .form-group select, .form-group textarea { width:100%; padding:10px 12px; border-radius:8px; border:1px solid var(--line); background:rgba(20,60,120,0.15); color:var(--text); font-size:14px; font-family:inherit; transition:border-color 0.15s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline:none; border-color:rgba(91,168,245,0.6); box-shadow:0 0 0 2px rgba(20,96,184,0.15); }
.input-disabled { opacity:.5; cursor:not-allowed; }
.form-hint { display:block; margin-top:4px; font-size:11px; color:var(--muted); }
.form-section-title { font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; padding-top:8px; border-top:1px solid var(--line); }
.form-optional { font-weight:400; font-size:11px; color:var(--muted); text-transform:none; }
.form-actions { display:flex; gap:10px; align-items:center; padding-top:4px; flex-wrap:wrap; }
.req-star { color:var(--hi-red); font-size:12px; }
.checkbox-group { display:flex; gap:16px; flex-wrap:wrap; }
.checkbox-label { display:flex; align-items:flex-start; gap:8px; cursor:pointer; font-size:13px; color:var(--text); line-height:1.5; }
.checkbox-label input { width:auto; margin-top:3px; }
select option { background:#163d6a; }

/* ── File upload ── */
.file-upload-wrapper input[type=file] { padding:8px 12px; cursor:pointer; }
.file-hint { font-size:12px; color:var(--muted); margin-top:5px; }
.justif-info-box { padding:12px 14px; background:rgba(20,96,184,0.1); border:1px solid rgba(91,168,245,0.25); border-radius:8px; font-size:13px; color:var(--hi-blue); line-height:1.6; }
.justif-info-box p { margin:0; }
.info-box { padding:12px 14px; border-radius:8px; font-size:13px; line-height:1.6; margin-bottom:12px; background:rgba(20,60,120,0.18); border:1px solid var(--line); color:var(--muted); }
.info-box-bank { background:rgba(21,107,56,0.1); border:1px solid rgba(61,207,116,0.25); color:var(--hi-green); }
.radio-option { display:flex; align-items:flex-start; gap:10px; cursor:pointer; padding:10px 14px; border-radius:8px; border:1px solid var(--line); background:rgba(20,60,120,0.1); flex:1; transition:border-color .15s; }
.radio-option:has(input:checked) { border-color:var(--hi-orange); background:rgba(200,88,0,0.08); }
.radio-label-text { display:flex; flex-direction:column; }

/* ── Signature pad ── */
.sig-pad-wrapper { background:rgba(10,30,70,0.5); border:1.5px dashed rgba(50,130,210,0.3); border-radius:10px; padding:8px; display:inline-block; }
.sig-canvas { display:block; border-radius:6px; background:rgba(5,15,35,0.8); cursor:crosshair; touch-action:none; }
.sig-preview-img { max-width:280px; max-height:100px; border-radius:6px; background:rgba(5,15,35,0.8); border:1px solid var(--line); display:block; }
.sig-preview-box { background:rgba(5,15,35,0.8); border:1px solid var(--line); border-radius:8px; padding:10px; display:inline-block; }
.sig-on-file { background:rgba(21,107,56,0.08); border:1px solid rgba(61,207,116,0.25); border-radius:8px; padding:12px; display:inline-block; }

/* ── Buttons ── */
.btn { display:inline-flex; align-items:center; gap:6px; padding:9px 16px; border:none; border-radius:8px; cursor:pointer; font-weight:600; font-size:13px; text-decoration:none; transition:opacity 0.15s, background 0.15s; white-space:nowrap; }
.btn:hover { opacity:.85; }
.btn-primary { background:linear-gradient(135deg,#1460b8 0%,#1a7fd4 100%); color:white; box-shadow:0 2px 8px rgba(20,96,184,0.3); }
.btn-secondary { background:rgba(50,130,210,0.1); color:var(--text); border:1px solid var(--line); }
.btn-success { background:linear-gradient(135deg,#156b38 0%,#1a8f4a 100%); color:white; box-shadow:0 2px 8px rgba(21,107,56,0.3); }
.btn-danger { background:linear-gradient(135deg,#b82020 0%,#d42828 100%); color:white; }
.btn-warning { background:linear-gradient(135deg,#c85800 0%,#e06a00 100%); color:white; box-shadow:0 2px 8px rgba(200,88,0,0.3); }
.btn-sm { padding:6px 12px; font-size:12px; }
.btn-xs { padding:4px 10px; font-size:11px; border-radius:6px; }
.btn.action-btn-disabled { opacity:.4; pointer-events:none; }
.link-sm { font-size:12px; color:var(--hi-blue); text-decoration:none; }
.link-sm:hover { text-decoration:underline; }

/* ── Flash messages ── */
.flash-wrapper { margin-bottom:18px; }
.flash { padding:11px 14px; border-radius:10px; margin-bottom:8px; font-size:13px; border:1px solid transparent; }
.flash-success { background:rgba(21,107,56,.15);  border-color:rgba(61,207,116,.3);  color:var(--hi-green); }
.flash-danger  { background:rgba(184,32,32,.15);  border-color:rgba(248,113,113,.3); color:var(--hi-red); }
.flash-warning { background:rgba(200,88,0,.15);   border-color:rgba(248,124,48,.3);  color:var(--hi-orange); }
.flash-info    { background:rgba(20,96,184,.12);  border-color:rgba(91,168,245,.3);  color:var(--hi-blue); }

/* ── Blocked alert ── */
.alert-blocked { padding:14px 18px; background:rgba(184,32,32,0.12); border:1px solid rgba(184,32,32,0.4); border-radius:12px; margin-bottom:18px; font-size:14px; line-height:1.6; color:var(--hi-red); }

/* ── Badges ── */
.badge { display:inline-block; padding:2px 8px; border-radius:20px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.badge-lg { padding:4px 12px; font-size:12px; }
.badge-xs { padding:1px 6px; font-size:10px; border-radius:10px; }
.badge-draft    { background:rgba(100,130,160,.2); color:#94a3b8; }
.badge-pending  { background:rgba(200,88,0,.2);    color:var(--hi-orange); }
.badge-approved { background:rgba(20,96,184,.2);   color:var(--hi-blue); }
.badge-rejected { background:rgba(184,32,32,.2);   color:var(--hi-red); }
.badge-paid     { background:rgba(21,107,56,.2);   color:var(--hi-green); }
.badge-l1               { background:rgba(200,88,0,.18);   color:var(--hi-orange); }
.badge-info             { background:rgba(20,96,184,.2);   color:var(--hi-blue); }
.badge-paid-confirm     { background:rgba(21,107,56,.25);  color:var(--hi-green); }
.badge-warning-plain    { background:rgba(200,88,0,.2);    color:var(--hi-orange); }
.badge-finance-approved { background:rgba(20,96,184,.22);  color:var(--hi-blue); }
.badge-finance--approved{ background:rgba(20,96,184,.22);  color:var(--hi-blue); }
.badge-cfo-approved     { background:rgba(120,80,220,.22); color:#c4b5fd; }
.badge-cfo--approved    { background:rgba(120,80,220,.22); color:#c4b5fd; }
.badge-bank             { background:rgba(21,107,56,.18);  color:var(--hi-green); }
.badge-cash             { background:rgba(200,88,0,.18);   color:var(--hi-orange); }

/* ── Tables ── */
.table-wrapper { overflow-x:auto; }
.data-table { width:100%; border-collapse:collapse; font-size:13px; }
.data-table th { text-align:left; padding:10px 12px; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); border-bottom:1px solid var(--line); white-space:nowrap; background:rgba(10,25,50,0.4); }
.data-table td { padding:11px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
.data-table tr:last-child td { border-bottom:none; }
.data-table tr:hover td { background:rgba(50,130,210,0.06); }
.text-right { text-align:right; }
.mono { font-family:monospace; font-size:12px; color:var(--hi-blue); }

/* ── Dashboard actions ── */
.action-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.action-btn { display:flex; flex-direction:column; align-items:center; gap:6px; padding:14px 10px; border-radius:10px; background:rgba(20,60,120,0.12); border:1px solid var(--line); color:var(--text); text-decoration:none; font-size:12px; font-weight:600; text-align:center; transition:background 0.15s, border-color 0.15s; }
.action-btn:hover { background:rgba(20,96,184,0.15); border-color:rgba(91,168,245,0.35); color:var(--hi-blue); }
.action-btn.warning-btn { background:rgba(200,88,0,.1); border-color:rgba(200,88,0,.25); }
.action-btn.warning-btn:hover { background:rgba(200,88,0,.18); color:var(--hi-orange); border-color:rgba(248,124,48,.4); }
.action-btn.success-btn { background:rgba(21,107,56,.1); border-color:rgba(21,107,56,.25); }
.action-btn.success-btn:hover { background:rgba(21,107,56,.18); color:var(--hi-green); border-color:rgba(61,207,116,.4); }
.action-icon { font-size:20px; }

/* ── Request list rows ── */
.request-list { display:flex; flex-direction:column; }
.request-row { display:flex; justify-content:space-between; align-items:flex-start; padding:10px 8px; border-bottom:1px solid var(--line); text-decoration:none; color:inherit; transition:background 0.1s; border-radius:8px; gap:10px; }
.request-row:hover { background:rgba(50,130,210,0.06); }
.request-row:last-child { border-bottom:none; }
.req-ref { font-size:12px; font-family:monospace; color:var(--hi-blue); }
.req-purpose { font-size:13px; margin-top:2px; }
.req-amount { font-weight:700; font-size:13px; color:var(--hi-orange); }

/* ── Profile ── */
.profile-avatar { width:64px; height:64px; border-radius:50%; background:linear-gradient(135deg,#0e3a70 0%,#1460b8 100%); color:var(--hi-blue); display:flex; align-items:center; justify-content:center; font-size:28px; font-weight:700; border:2px solid rgba(91,168,245,0.3); }
.detail-grid { display:flex; flex-direction:column; }
.detail-row { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); gap:16px; }
.detail-row:last-child { border-bottom:none; }
.detail-label { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; flex-shrink:0; }
.role-badge { display:inline-block; padding:2px 8px; background:rgba(200,88,0,0.18); color:var(--hi-orange); border-radius:6px; font-size:11px; font-weight:700; margin-right:4px; border:1px solid rgba(200,88,0,0.25); }

/* ── Timeline ── */
.timeline { display:flex; flex-direction:column; gap:14px; }
.timeline-item { display:flex; gap:12px; }
.timeline-dot { width:12px; height:12px; border-radius:50%; flex-shrink:0; margin-top:4px; }
.dot-green  { background:var(--hi-green); box-shadow:0 0 6px rgba(61,207,116,.5); }
.dot-red    { background:var(--hi-red);   box-shadow:0 0 6px rgba(248,113,113,.5); }
.dot-orange { background:var(--hi-orange);box-shadow:0 0 6px rgba(248,124,48,.5); }
.timeline-body { flex:1; }
.timeline-header { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* ── Amount ── */
.amount-large { font-size:20px; font-weight:700; color:var(--hi-blue); }

/* ── Alerts ── */
.alert { padding:12px 14px; border-radius:10px; font-size:13px; margin-bottom:14px; border:1px solid transparent; }
.alert-warning { background:rgba(200,88,0,.12); border-color:rgba(200,88,0,.3);  color:var(--hi-orange); }
.alert-danger  { background:rgba(184,32,32,.12); border-color:rgba(184,32,32,.3); color:var(--hi-red); }

/* ── Action row ── */
.action-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* ── Users ── */
.user-cell { display:flex; align-items:center; gap:10px; }
.avatar-sm { width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,#0e3a70,#1460b8); color:var(--hi-blue); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; flex-shrink:0; }

/* ── Filter bar ── */
.filter-bar { padding:14px 18px; display:flex; align-items:center; gap:14px; margin-bottom:0; border-radius:14px 14px 0 0; border-bottom:none; background:rgba(10,25,50,0.4); }
.filter-bar + .card { border-radius:0 0 14px 14px; }
.filter-label { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.filter-pills { display:flex; gap:6px; flex-wrap:wrap; }
.pill { padding:4px 12px; border-radius:20px; font-size:11px; font-weight:600; text-decoration:none; background:rgba(50,130,210,0.08); color:var(--muted); border:1px solid transparent; text-transform:uppercase; letter-spacing:.03em; transition:background 0.1s; }
.pill:hover { background:rgba(50,130,210,0.14); color:var(--text); }
.pill-active { background:rgba(200,88,0,0.2); color:var(--hi-orange); border-color:rgba(200,88,0,0.3); }
.pill-pending { color:var(--hi-orange); }
.pill-approved { color:var(--hi-blue); }
.pill-rejected { color:var(--hi-red); }
.pill-paid { color:var(--hi-green); }
.pill-draft { color:var(--muted); }

/* ── Justification countdown bar ── */
.justif-countdown-bar { display:flex; flex-direction:column; gap:8px; padding:14px 16px; border-radius:10px; margin-bottom:14px; }
.jcb-red    { background:rgba(184,32,32,0.1); border:1px solid rgba(184,32,32,0.3); }
.jcb-orange { background:rgba(200,88,0,0.1); border:1px solid rgba(200,88,0,0.3); }
.jcb-blue   { background:rgba(20,96,184,0.1); border:1px solid rgba(20,96,184,0.25); }
.jcb-label  { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.jcb-count  { font-size:32px; font-weight:700; line-height:1; }
.jcb-bar-outer { height:6px; background:rgba(50,130,210,0.15); border-radius:3px; overflow:hidden; }
.jcb-bar-inner { height:100%; background:var(--accent); border-radius:3px; transition:width 0.3s; }
.jcb-red .jcb-bar-inner { background:var(--hi-red); }
.jcb-orange .jcb-bar-inner { background:var(--hi-orange); }

/* ── Justification status panels ── */
.justif-status-panel { display:flex; align-items:center; gap:14px; padding:14px 16px; border-radius:10px; margin-bottom:12px; }
.js-icon { font-size:24px; flex-shrink:0; }
.js-validated { background:rgba(21,107,56,.1); border:1px solid rgba(61,207,116,.3); }
.js-rejected  { background:rgba(184,32,32,.1); border:1px solid rgba(184,32,32,.3); }
.js-review    { background:rgba(200,88,0,.1);  border:1px solid rgba(200,88,0,.3); }
.js-overdue   { background:rgba(184,32,32,.15); border:1px solid rgba(184,32,32,.5); }

/* ── Justification dashboard tracker ── */
.justif-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); gap:10px; }
.justif-row:last-child { border-bottom:none; }
.justif-badge { display:inline-block; padding:4px 10px; border-radius:8px; font-size:11px; font-weight:700; text-transform:uppercase; }
.justif-ok      { background:rgba(20,96,184,.15);  color:var(--hi-blue); }
.justif-warning { background:rgba(200,88,0,.15);   color:var(--hi-orange); }
.justif-urgent  { background:rgba(184,32,32,.2);   color:var(--hi-red); }
.justif-overdue { background:rgba(184,32,32,.3);   color:#fca5a5; }
.justif-review  { background:rgba(200,88,0,.15);   color:var(--hi-orange); }
.justif-rejected{ background:rgba(184,32,32,.15);  color:var(--hi-red); }

/* ── Currency selector ── */
.currency-selector-bar { display:flex; align-items:center; gap:14px; margin-bottom:0; border-radius:14px 14px 0 0; border-bottom:none; padding:12px 18px; flex-wrap:wrap; background:rgba(10,25,50,0.4); }
.currency-selector-bar + .stats-row { margin-top:0; }
.rate-info-badge { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--muted); margin-left:auto; }
.rate-dot { width:6px; height:6px; border-radius:50%; background:var(--hi-green); flex-shrink:0; box-shadow:0 0 5px rgba(61,207,116,.5); }

/* ── Email config ── */
.email-status-row { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); margin-bottom:4px; }

/* ── Pagination ── */
.pagination-row { display:flex; align-items:center; gap:12px; padding-top:16px; border-top:1px solid var(--line); }

/* ── Colors ── */
.text-success { color:var(--hi-green); }
.text-danger  { color:var(--hi-red); }
.text-warning { color:var(--hi-orange); }

/* ── Misc ── */
.empty-state { padding:40px; text-align:center; color:var(--muted); }
.empty-state p { margin-bottom:16px; }
.helper-box { margin-top:18px; padding:14px; border-radius:10px; background:rgba(20,60,120,0.12); border:1px solid var(--line); font-size:13px; line-height:1.7; }

/* ── Hamburger & mobile nav ──────────────────────────────────────────────── */
.hamburger {
    display:none; background:rgba(50,130,210,0.12); border:1px solid rgba(50,130,210,0.2);
    cursor:pointer; padding:8px 10px; color:var(--text); flex-shrink:0; margin-left:auto;
    align-items:center; justify-content:center; border-radius:8px;
    transition:background 0.15s; min-width:42px; min-height:38px;
}
.hamburger:hover, .hamburger:active { background:rgba(50,130,210,0.25); }
.nav-overlay {
    display:none; position:fixed; inset:0; background:rgba(0,0,0,0.55);
    z-index:149;
}
.nav-overlay.nav-open { display:block; }
.nav-drawer-head { display:none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width:768px) {
    .topbar { flex-wrap:nowrap; padding:10px 14px; gap:8px; align-items:center; flex-direction:row; }
    .hamburger { display:flex; }

    .nav-links {
        display:flex !important; flex-direction:column; gap:2px;
        position:fixed; top:0; right:-300px; bottom:0; width:280px;
        background:#122848; border-left:1px solid var(--line);
        padding:0 12px 20px; z-index:201; overflow-y:auto;
        transition:right 0.25s ease; box-shadow:-8px 0 32px rgba(0,0,0,0.6);
    }
    .nav-links.nav-open { right:0; }

    .nav-drawer-head {
        display:flex; justify-content:space-between; align-items:center;
        padding:14px 4px 10px; margin-bottom:6px;
        border-bottom:1px solid var(--line);
        font-size:11px; font-weight:700; color:var(--muted);
        text-transform:uppercase; letter-spacing:.06em;
    }
    .nav-close-btn {
        background:none; border:none; color:var(--muted); cursor:pointer;
        font-size:18px; padding:2px 6px; border-radius:6px; line-height:1;
    }
    .nav-close-btn:hover { background:rgba(50,130,210,0.1); color:var(--text); }

    .nav-links a, .nav-dropdown-trigger {
        padding:12px 10px; border-radius:8px; font-size:15px;
        display:block; width:100%;
    }
    .btn-nav-logout { text-align:center; justify-content:center; margin-top:8px; }

    .nav-dropdown { position:static; }
    .nav-dropdown:hover .nav-dropdown-menu { display:block; }
    .nav-dropdown-menu {
        display:block; position:static; box-shadow:none; border:none;
        background:rgba(50,130,210,0.06); border-radius:8px;
        min-width:auto; margin:4px 0 4px 10px; padding:4px;
    }
    .nav-dropdown-menu a { font-size:14px; padding:10px 12px; }

    .brand { min-width:0; flex:1; overflow:hidden; }
    .title { font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .subtitle { display:none; }

    .page-container { padding:16px 14px; }
    .page-header h1 { font-size:19px; }
    .card { padding:16px 14px; }

    .stats-row { grid-template-columns:1fr 1fr; gap:10px; }
    .stat-value { font-size:20px; }

    .two-col { grid-template-columns:1fr; }
    .action-grid { grid-template-columns:1fr 1fr; }

    .filter-bar { flex-direction:column; align-items:flex-start; gap:10px; padding:12px 14px; }

    .form-group input, .form-group select, .form-group textarea { font-size:16px; }

    .detail-row { flex-direction:column; align-items:flex-start; gap:3px; padding:10px 0; }
    .detail-label { font-size:11px; }

    .btn { min-height:44px; padding:10px 16px; }
    .btn-sm { min-height:38px; padding:8px 14px; }
    .btn-xs { min-height:32px; padding:5px 10px; }

    .action-row { gap:8px; flex-wrap:wrap; }
    .table-wrapper { overflow-x:auto; -webkit-overflow-scrolling:touch; }
    .timeline { gap:10px; }
    .auth-card { margin:20px auto; }
    .page-header { gap:8px; margin-bottom:14px; }
}

/* ── Password reveal toggle ───────────────────────────────────────────────── */
.pw-wrap { position:relative; }
.pw-wrap input[type="password"],
.pw-wrap input[type="text"] { padding-right:40px !important; }
.pw-toggle {
    position:absolute; right:10px; top:50%; transform:translateY(-50%);
    background:none; border:none; cursor:pointer; color:#5a8cb0;
    padding:0; line-height:1; display:flex; align-items:center;
    justify-content:center; user-select:none; -webkit-user-select:none;
}
.pw-toggle:hover { color:var(--hi-blue); }
.pw-toggle svg { width:17px; height:17px; pointer-events:none; display:block; }
.pw-toggle .icon-eye-off { display:none; }
.pw-wrap.pw-showing .icon-eye { display:none; }
.pw-wrap.pw-showing .icon-eye-off { display:block; }

/* ── Background Slideshow ─────────────────────────────────────────────────── */
#bg-slideshow {
    position:fixed; inset:0; z-index:-1; overflow:hidden;
    background:#0a1e3c;
}
.bg-slide {
    position:absolute; inset:0;
    background-size:cover; background-position:center center; background-repeat:no-repeat;
    opacity:0; transition:opacity 1.5s ease-in-out;
    overflow:hidden;
}
.bg-slide-visible { opacity:1; }

/* dim the media so text/UI remains readable */
#bg-slideshow::after {
    content:''; position:absolute; inset:0;
    background:rgba(5,15,40,0.60);
    pointer-events:none; z-index:1;
}

/* make the body transparent so the fixed bg shows through */
body { background:transparent; }

/* Keep topbar/cards legible over a photo background.
   NOTE: Do NOT add backdrop-filter to .topbar — it creates a stacking context
   that breaks position:fixed on .nav-links (the mobile drawer). */
.topbar { background:rgba(10,30,60,0.92) !important; }
.card   { background:rgba(22,61,106,0.88) !important; backdrop-filter:blur(4px); }

/* ── Admin Background Media Grid ──────────────────────────────────────────── */
.bg-media-grid {
    display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px;
}
.bg-media-card {
    border:1px solid var(--line); border-radius:12px; overflow:hidden;
    background:rgba(10,30,70,0.4); display:flex; flex-direction:column;
}
.bg-media-disabled { opacity:0.45; }
.bg-media-thumb {
    position:relative; height:130px; background:#0a1830; overflow:hidden;
}
.bg-media-thumb img,
.bg-media-thumb video {
    width:100%; height:100%; object-fit:cover; display:block;
}
.bg-media-vid-badge {
    position:absolute; top:6px; left:6px; background:rgba(0,0,0,0.65);
    color:#fff; font-size:10px; font-weight:700; padding:2px 6px; border-radius:4px;
    letter-spacing:0.5px;
}
.bg-media-off-badge {
    position:absolute; top:6px; right:6px; background:rgba(184,32,32,0.8);
    color:#fff; font-size:10px; font-weight:700; padding:2px 6px; border-radius:4px;
}
.bg-media-info { padding:8px 10px; flex:1; }
.bg-media-name {
    font-size:12px; font-weight:600; white-space:nowrap;
    overflow:hidden; text-overflow:ellipsis; margin-bottom:2px;
}
.bg-media-actions { display:flex; gap:6px; padding:8px 10px; border-top:1px solid var(--line); }
