/* admin.css — Fulfiller Portal Companion Styles
 * Base layout, state, animation, and light-mode rules that complement Tailwind utilities.
 * Tailwind handles structural and visual utilities; this file handles:
 *   • CSS custom properties
 *   • Pseudo-elements (::before / ::after)
 *   • @keyframes animations
 *   • JS-toggled state classes (.active, .open, body.light-mode)
 *   • Scrollbar styling
 *   • Complex descendant/sibling selectors
 */

/* ─── CSS CUSTOM PROPERTIES ─── */
:root{
  --p:#A100FF;--pl:#BF5AFF;--pd:#7300BF;--pa:rgba(161,0,255,.12);
  --bk:#080014;--bk2:#0f0020;--bk3:#1a0035;
  --ok:#00C07F;--warn:#FF8C00;--danger:#FF3B30;--info:#3B82F6;
  --t1:#0d0020;--t2:#3d2a5c;--t3:#7c6a9a;
  --font:'Graphik','Segoe UI',Arial,Helvetica,sans-serif;
  --r:12px;--rl:16px;--ease:cubic-bezier(.4,0,.2,1);
  --color-text-dim:rgba(255,255,255,.4);
  --color-text-soft:rgba(255,255,255,.75);
  --color-input-bg:rgba(255,255,255,.07);
  --color-border-muted:rgba(255,255,255,.12);
  --color-border-faint:rgba(255,255,255,.06);
  --text-primary:rgba(255,255,255,1);
  --text-secondary:rgba(255,255,255,.45);
  --text-muted:rgba(255,255,255,.35);
}
*{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;}
body{font-family:var(--font);background:var(--bk);color:#fff;overflow-x:hidden;min-height:100vh;}
button,input,select,textarea{font-family:var(--font);}

/* ─── GRADIENT ORBS (body pseudo-elements) ─── */
body::before{content:'';position:fixed;top:-20%;left:-10%;width:60%;height:60%;background:radial-gradient(circle,rgba(161,0,255,.1) 0%,transparent 70%);pointer-events:none;z-index:0;animation:orbFloat 8s ease-in-out infinite;}
body::after{content:'';position:fixed;bottom:-20%;right:-10%;width:50%;height:50%;background:radial-gradient(circle,rgba(161,0,255,.08) 0%,transparent 70%);pointer-events:none;z-index:0;animation:orbFloat 12s ease-in-out infinite reverse;}
@keyframes orbFloat{0%,100%{transform:translate(0,0);}33%{transform:translate(3%,2%);}66%{transform:translate(-2%,3%);}}
#bg-canvas{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:0;opacity:.6;}

/* ─── TYPOGRAPHY: em inside headings/logo ─── */
.ln-main em{color:var(--pl);font-style:normal;}
.sec-h em{color:var(--pl);font-style:normal;}

/* ─── LIVE DATA INDICATOR (pulsing dot next to "Real-time summary…") ─── */
.live-indicator{display:inline-block;width:7px;height:7px;border-radius:50%;background:#22c55e;margin-right:6px;vertical-align:middle;box-shadow:0 0 0 0 rgba(34,197,94,.65);animation:liveDotPulse 2s infinite;}
@keyframes liveDotPulse{0%{box-shadow:0 0 0 0 rgba(34,197,94,.65);}70%{box-shadow:0 0 0 6px rgba(34,197,94,0);}100%{box-shadow:0 0 0 0 rgba(34,197,94,0);}}

/* ─── PROGRAM HEALTH SCORE donut inner circle (theme-aware, avoids white patch in dark mode) ─── */
.phs-donut-inner{background:var(--bk3,#1a0035);}
body.light-mode .phs-donut-inner{background:#fff;}

/* ─── IMPLEMENTATION REPORT status donut hole (same theme-aware fix, matches Program Health Score) ─── */
.status-donut-hole{fill:var(--bk3,#1a0035);}
body.light-mode .status-donut-hole{fill:#fff;}

/* ─── THEME TOGGLE (JS-toggled light mode state) ─── */
body.light-mode .theme-toggle{background:rgba(161,0,255,.12);border-color:rgba(161,0,255,.25);}
body.light-mode .theme-toggle:hover{background:rgba(161,0,255,.18);}
body.light-mode .tt-icon{right:auto;left:8px;}
body.light-mode .tt-knob{left:calc(100% - 23px);background:#fff;box-shadow:0 1px 4px rgba(161,0,255,.3);}

/* ─── NAV USER MENU ─── */
.nav-user-menu{background:rgba(14,0,30,.97);border:1px solid rgba(161,0,255,.25);box-shadow:0 8px 32px rgba(0,0,0,.5);}
.nav-user-menu .nav-menu-name{color:#fff;}
.nav-user-menu .nav-menu-email{color:rgba(255,255,255,.55);}
.nav-user-menu button{background:rgba(161,0,255,.16);border:1px solid rgba(161,0,255,.35);color:#fff;}
.nav-user-menu button:hover{background:rgba(161,0,255,.28);}
body.light-mode .nav-user-menu{background:rgba(255,255,255,.98);border-color:rgba(161,0,255,.2);box-shadow:0 8px 32px rgba(161,0,255,.12);}
body.light-mode .nav-user-menu .nav-menu-name{color:#1a0035;}
body.light-mode .nav-user-menu .nav-menu-email{color:#7c6a9a;}
body.light-mode .nav-user-menu button{background:rgba(161,0,255,.08);border-color:rgba(161,0,255,.25);color:#3d2a5c;}
body.light-mode .nav-user-menu button:hover{background:rgba(161,0,255,.18);}

/* ─── SIDEBAR STATES ─── */
.sidebar.open{transform:translateX(0);}
.sb-overlay.open{display:block;}
.sb-item:hover{background:rgba(161,0,255,.08);color:rgba(255,255,255,.85);}
.sb-item.active{background:rgba(161,0,255,.15);color:#fff;border:1px solid rgba(161,0,255,.25);}
.sb-item .sb-ic{width:28px;height:28px;border-radius:8px;background:rgba(161,0,255,.1);display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;}
.sb-item.active .sb-ic{background:rgba(161,0,255,.25);}
.sb-item.disabled{opacity:.45;cursor:not-allowed;pointer-events:none;}
.sb-item.disabled:hover{background:none;color:rgba(255,255,255,.6);}
.sb-footer-btn:hover{background:rgba(161,0,255,.08);color:rgba(255,255,255,.85);}
.sb-footer-btn .sb-ic{width:28px;height:28px;border-radius:8px;background:rgba(161,0,255,.1);display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;}
@media(min-width:901px){.sb-footer{display:none !important;}}

/* ─── HAMBURGER ANIMATION (JS-toggled .open) ─── */
.admin-hamburger span{display:block;width:18px;height:2px;background:rgba(255,255,255,.85);border-radius:2px;transition:transform .25s,opacity .25s;}
.admin-hamburger:hover{background:rgba(161,0,255,.1);border-color:rgba(161,0,255,.5);}
.admin-hamburger.open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.admin-hamburger.open span:nth-child(2){opacity:0;transform:scaleX(0);}
.admin-hamburger.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* ─── PORTAL SECTION VISIBILITY (JS-toggled .active) ─── */
.portal-section{display:none;}
.portal-section.active{display:block;}

/* ─── STAT CARD PSEUDO + TOOLTIP ─── */
.stat-card::before{content:'';position:absolute;top:-30px;right:-30px;width:80px;height:80px;border-radius:50%;}
.stat-info:hover .stat-info-icon{color:rgba(161,0,255,.75);}
.stat-info:hover .stat-tip{opacity:1;}
.stat-tip::after{content:'';position:absolute;top:100%;right:12px;border:5px solid transparent;border-top-color:rgba(16,0,36,.97);}

/* ─── CHART PERIOD BUTTON STATES (JS .active) ─── */
.chart-period button{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:100px;padding:6px 14px;font-size:11px;font-weight:500;color:rgba(255,255,255,.6);cursor:pointer;transition:all .15s;font-family:var(--font);}
.chart-period button.active{background:rgba(161,0,255,.15);border-color:rgba(161,0,255,.3);color:var(--pl);}
.chart-period button:hover{background:rgba(161,0,255,.1);color:rgba(255,255,255,.8);}
#range-error{display:none;align-items:center;gap:5px;font-size:11px;font-weight:500;color:var(--danger);line-height:1.4;}
#range-from,#range-to{color-scheme:dark;}

/* ─── TABLE SCROLLBAR ─── */
.table-scroll::-webkit-scrollbar{height:6px;}
.table-scroll::-webkit-scrollbar-track{background:rgba(255,255,255,.04);}
.table-scroll::-webkit-scrollbar-thumb{background:rgba(161,0,255,.35);border-radius:3px;}
.table-scroll::-webkit-scrollbar-thumb:hover{background:rgba(161,0,255,.6);}
table{width:100%;border-collapse:collapse;}
thead{background:rgba(161,0,255,.06);}
th{padding:12px 14px;text-align:left;font-size:11px;font-weight:600;color:rgba(255,255,255,.5);text-transform:uppercase;letter-spacing:.8px;border-bottom:1px solid rgba(161,0,255,.1);white-space:nowrap;}
td{padding:12px 14px;font-size:12.5px;color:rgba(255,255,255,.75);border-bottom:1px solid rgba(255,255,255,.04);white-space:nowrap;}
tr:hover td{background:rgba(161,0,255,.04);}

/* ─── FAQ MODAL OVERLAY (JS .open) ─── */
.faq-modal-overlay{display:none;}
.faq-modal-overlay.open{display:flex;}
.faq-tab-btn.active{color:var(--pl);border-bottom-color:var(--p);}
.faq-modal-input option{background:#1a0035;color:#fff;}
.tbl-filter option{background:var(--bk2);color:#fff;}
.col-filter option{background:var(--bk2);color:#fff;}
.plans-toggle .tog.active{background:rgba(161,0,255,.2);color:var(--pl);}

/* ─── ACTIVITY LOG BADGES (category / status pills) ─── */
.al-actor-role{display:inline-block;margin-top:2px;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;padding:1px 7px;border-radius:100px;}
.al-actor-role.admin{background:rgba(161,0,255,.14);border:1px solid rgba(161,0,255,.3);color:var(--pl);}
.al-actor-role.developer{background:rgba(59,130,246,.14);border:1px solid rgba(59,130,246,.3);color:var(--info);}
.al-actor-role.agent{background:rgba(0,192,127,.12);border:1px solid rgba(0,192,127,.3);color:var(--success);}
.al-cat{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:100px;font-size:10px;font-weight:600;white-space:nowrap;}
.al-cat .dot{width:5px;height:5px;border-radius:50%;flex-shrink:0;}
.al-cat.auth{background:rgba(59,130,246,.12);border:1px solid rgba(59,130,246,.25);color:var(--info);}
.al-cat.auth .dot{background:var(--info);}
.al-cat.request{background:rgba(161,0,255,.12);border:1px solid rgba(161,0,255,.25);color:var(--pl);}
.al-cat.request .dot{background:var(--pl);}
.al-cat.user{background:rgba(255,140,0,.12);border:1px solid rgba(255,140,0,.25);color:#f59e0b;}
.al-cat.user .dot{background:#f59e0b;}
.al-cat.faq{background:rgba(0,192,127,.12);border:1px solid rgba(0,192,127,.25);color:var(--ok);}
.al-cat.faq .dot{background:var(--ok);}
.al-cat.isp{background:rgba(0,192,127,.12);border:1px solid rgba(0,192,127,.25);color:var(--ok);}
.al-cat.isp .dot{background:var(--ok);}
.al-cat.feedback{background:rgba(45,212,191,.12);border:1px solid rgba(45,212,191,.28);color:#2dd4bf;}
.al-cat.feedback .dot{background:#2dd4bf;}
.al-cat.plan{background:rgba(255,140,0,.12);border:1px solid rgba(255,140,0,.25);color:#f59e0b;}
.al-cat.plan .dot{background:#f59e0b;}
.al-cat.system{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.15);color:rgba(255,255,255,.6);}
.al-cat.system .dot{background:rgba(255,255,255,.5);}
.al-cat.pilot{background:rgba(161,0,255,.12);border:1px solid rgba(161,0,255,.25);color:var(--pl);}
.al-cat.pilot .dot{background:var(--pl);}
.al-cat.exemption{background:rgba(255,140,0,.12);border:1px solid rgba(255,140,0,.25);color:#f59e0b;}
.al-cat.exemption .dot{background:#f59e0b;}
.al-cat.servicenow{background:rgba(59,130,246,.12);border:1px solid rgba(59,130,246,.25);color:var(--info);}
.al-cat.servicenow .dot{background:var(--info);}
.al-actor-name{font-weight:700;font-size:12.5px;color:#fff;}
.al-target{display:inline-block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom;color:rgba(255,255,255,.75);}
.al-time{display:flex;flex-direction:column;line-height:1.35;}
.al-time .al-date{font-size:12px;font-weight:600;color:rgba(255,255,255,.85);}
.al-time .al-clock{font-size:11px;color:rgba(255,255,255,.4);}
.al-status{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;}
.al-status .dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}
.al-status.success{color:var(--ok);}
.al-status.success .dot{background:var(--ok);box-shadow:0 0 6px rgba(0,192,127,.5);}
.al-status.failed{color:#f87171;}
.al-status.failed .dot{background:#f87171;box-shadow:0 0 6px rgba(255,59,48,.5);}
.al-status.notable{color:#f59e0b;}
.al-status.notable .dot{background:#f59e0b;box-shadow:0 0 6px rgba(255,140,0,.5);}

/* ─── ISP MODAL OVERLAY (JS .open) ─── */
.isp-modal-overlay{display:none;}
.isp-modal-overlay.open{display:flex;}

/* ─── ISP PROGRESS TRACKER (JS state classes) ─── */
.isp-prog-step{display:flex;gap:14px;align-items:flex-start;}
.isp-prog-dot{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;flex-shrink:0;border:2px solid rgba(255,255,255,.18);background:transparent;color:rgba(255,255,255,.25);transition:all .2s;}
.isp-prog-line{width:2px;flex:1;min-height:16px;background:rgba(255,255,255,.1);margin:3px auto 0;}
.isp-prog-line.done{background:#22c55e;}
/* done */
.isp-prog-step.done .isp-prog-dot{border-color:#22c55e;color:#22c55e;background:transparent;}
.isp-prog-step.done .isp-prog-name{color:#22c55e;font-weight:600;}
.isp-prog-step.done .isp-prog-sub{color:rgba(34,197,94,.5);}
/* active */
.isp-prog-step.active .isp-prog-dot{border-color:var(--pl);color:var(--pl);background:rgba(161,0,255,.08);box-shadow:0 0 12px rgba(161,0,255,.25);}
.isp-prog-step.active .isp-prog-name{color:#fff;font-weight:700;}
.isp-prog-step.active .isp-prog-sub{color:rgba(191,90,255,.55);}
/* failed */
.isp-prog-step.failed .isp-prog-dot{border-color:var(--danger);color:var(--danger);background:rgba(255,59,48,.06);}
.isp-prog-step.failed .isp-prog-name{color:var(--danger);font-weight:600;}
.isp-prog-step.failed .isp-prog-sub{color:rgba(248,113,113,.5);}
/* skipped (steps after a failed step) */
.isp-prog-step.skipped .isp-prog-dot{border-color:rgba(255,255,255,.08);color:rgba(255,255,255,.12);background:transparent;}
.isp-prog-step.skipped .isp-prog-name{color:rgba(255,255,255,.15);}
.isp-prog-step.skipped .isp-prog-sub{color:rgba(255,255,255,.08);}
/* upcoming */
.isp-prog-step.upcoming .isp-prog-name{color:rgba(255,255,255,.35);}
.isp-prog-step.upcoming .isp-prog-sub{color:rgba(255,255,255,.2);}

/* ─── ISP TYPE BADGE ─── */
.isp-type-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:20px;font-size:11.5px;font-weight:600;white-space:nowrap;font-family:var(--font);border:none;}
.isp-type-badge.nc{background:rgba(255,255,255,.09);color:rgba(255,255,255,.65);}
.isp-type-badge.migration{background:rgba(255,255,255,.09);color:rgba(255,255,255,.65);}

/* ─── ISP STATUS BADGE ─── */
.isp-status-badge{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;font-family:var(--font);}
.isp-status-badge::before{content:'';width:7px;height:7px;border-radius:50%;flex-shrink:0;}
.isp-status-badge.pending{color:#fbbf24;}
.isp-status-badge.pending::before{background:#fbbf24;box-shadow:0 0 5px rgba(251,191,36,.5);}
.isp-status-badge.feasible{color:#34d399;}
.isp-status-badge.feasible::before{background:#34d399;box-shadow:0 0 5px rgba(52,211,153,.5);}
.isp-status-badge.not-feasible{color:#f87171;}
.isp-status-badge.not-feasible::before{background:#f87171;box-shadow:0 0 5px rgba(248,113,113,.4);}
.isp-status-badge.installation{color:#60a5fa;}
.isp-status-badge.installation::before{background:#60a5fa;box-shadow:0 0 5px rgba(96,165,250,.5);}
.isp-status-badge.ongoing{color:#fb923c;}
.isp-status-badge.ongoing::before{background:#fb923c;box-shadow:0 0 5px rgba(251,146,60,.4);}
.isp-status-badge.completed{color:#34d399;}
.isp-status-badge.completed::before{background:#34d399;box-shadow:0 0 5px rgba(52,211,153,.5);}
.isp-status-badge.awarded{color:#c4b5fd;}
.isp-status-badge.awarded::before{background:#c4b5fd;box-shadow:0 0 5px rgba(196,181,253,.4);}
.isp-status-badge.default{color:rgba(255,255,255,.5);}
.isp-status-badge.default::before{background:rgba(255,255,255,.3);}

/* ─── GRAPHIK CELL (replaces mono for ISP table) ─── */
.fl-cell-graphik{font-family:var(--font);font-size:12.5px;color:rgba(255,255,255,.75);}

/* ─── FL UPDATE DROPDOWN (JS .open) ─── */
.fl-upd-dd{display:none;}
.fl-upd-dd.open{display:block;}
.fl-upd-btn.open .fl-upd-caret{transform:rotate(180deg);}
.fl-view-btn.active{background:rgba(161,0,255,.2);color:var(--pl);}
/* Dark mode: option dropdown backgrounds */
.fl-filter-dd option{background:#1a0035;color:#fff;}
.isp-nf-select option{background:#1a0035;color:#fff;}

/* ─── BULK BAR / PROVISION PANEL (JS show/hide) ─── */
.bulk-bar{display:none;}
.bulk-bar.show{display:flex;}
.provision-panel{display:none;}
.provision-panel.open{display:block;}

/* ─── ISP ROW SELECTION ─── */
tr.isp-row-selected > td{background:rgba(161,0,255,.08)!important;}
.isp-cb{vertical-align:middle;}
/* Hide checkbox column for non-ISP (admin/TSP) view */
body:not(.isp-view) .isp-cb{display:none!important;}
body:not(.isp-view) #isp-bulk-bar{display:none!important;}
/* Bulk bar light mode */
body.light-mode .isp-bulk-bar-wrap{background:rgba(161,0,255,.06)!important;border-color:rgba(161,0,255,.25)!important;}
body.light-mode #isp-bulk-count{color:#7300bf!important;}

/* ─── DCC CHECKBOX SWATCH (::after pseudo) ─── */
.dcc-check-swatch::after{content:'✓';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;color:#fff;line-height:1;}
.dcc-check-label input[type="checkbox"]:not(:checked) ~ .dcc-check-swatch{opacity:.35;}
.dcc-check-label input[type="checkbox"]:not(:checked) ~ .dcc-check-swatch::after{display:none;}
.dcc-check-label input[type="checkbox"]{display:none;}

/* ─── ISP VIEW (JS body class toggles) ─── */
body.isp-view #sb-section-content,
body.isp-view #sb-section-management,
body.isp-view #sb-section-partners,
body.isp-view #sb-section-leadership,
body.isp-view #sb-impl-report-item{display:none !important;}
body.isp-view #isp-selector{display:none !important;}
body.isp-view #isp-dash-selector{display:none !important;}
body.isp-view.isp-nc-only .col-isp-type{display:none !important;}
body.isp-nc-only #isp-type-dropdown{display:none !important;}
body.isp-nc-only #fl-type-dropdown{display:none !important;}
body.isp-nc-only .fl-col-type{display:none !important;}
#isp-type-toggle-wrap{display:none;}
body.isp-view:not(.isp-nc-only) #isp-type-toggle-wrap{display:flex;}
#isp-status-dropdown-wrap{display:none;align-items:center;gap:8px;}
body.isp-view #isp-status-dropdown-wrap{display:flex !important;}
body.isp-view #isp-pills-wrap{display:none !important;}
.isp-pill.active{background:rgba(161,0,255,.15);border-color:rgba(161,0,255,.35);color:var(--pl);}

/* ─── TOAST NOTIFICATIONS ─── */
#toast-container{position:fixed;bottom:24px;right:24px;z-index:9999;display:flex;flex-direction:column;gap:10px;pointer-events:none;}
.toast{display:flex;align-items:flex-start;gap:12px;min-width:280px;max-width:380px;background:rgba(18,0,40,.95);border:1px solid rgba(161,0,255,.25);border-radius:14px;padding:14px 16px;box-shadow:0 8px 32px rgba(0,0,0,.45);pointer-events:all;animation:toastIn .3s cubic-bezier(.4,0,.2,1);transition:all .3s;}
.toast.toast-hide{animation:toastOut .3s cubic-bezier(.4,0,.2,1) forwards;}
.toast-icon{font-size:17px;flex-shrink:0;margin-top:1px;}
.toast-body{flex:1;}
.toast-title{font-size:13px;font-weight:700;color:#fff;margin-bottom:2px;}
.toast-msg{font-size:12px;color:rgba(255,255,255,.55);line-height:1.4;}
.toast-close{background:none;border:none;color:rgba(255,255,255,.3);font-size:16px;cursor:pointer;padding:0;line-height:1;flex-shrink:0;transition:color .15s;}
.toast-close:hover{color:rgba(255,255,255,.7);}
.toast.success{border-color:rgba(0,192,127,.35);}
.toast.success .toast-icon::before{content:'✅';}
.toast.error{border-color:rgba(255,59,48,.35);}
.toast.error .toast-icon::before{content:'❌';}
.toast.info{border-color:rgba(161,0,255,.4);}
.toast.info .toast-icon::before{content:'ℹ️';}
.toast.warn{border-color:rgba(255,140,0,.35);}
.toast.warn .toast-icon::before{content:'⚠️';}
@keyframes toastIn{from{opacity:0;transform:translateX(40px);}to{opacity:1;transform:translateX(0);}}
@keyframes toastOut{from{opacity:1;transform:translateX(0);}to{opacity:0;transform:translateX(40px);}}

/* ─── SURVEYS TABLE ─── */
.survey-stat-grid{grid-template-columns:repeat(3,1fr)!important;}
#sec-surveys .table-scroll table{min-width:unset;width:100%;table-layout:auto;}
#sec-surveys .table-scroll td,#sec-surveys .table-scroll th{white-space:nowrap;padding:10px 14px;}
#sec-surveys tbody tr{cursor:pointer;transition:background .15s;}
#sec-surveys tbody tr:hover{background:rgba(161,0,255,.08);}
#sec-activity-logs tbody tr{cursor:pointer;transition:background .15s;}
#sec-activity-logs tbody tr:hover{background:rgba(161,0,255,.08);}
#sec-activity-logs #al-filter-row th:last-child{min-width:190px;}
#al-date-range{cursor:pointer;}
#survey-filter-row th{padding:5px 8px;background:rgba(161,0,255,.05);border-bottom:1px solid rgba(161,0,255,.12);}
.um-row-selected td{background:rgba(161,0,255,.07);}

/* ─── REQ STATUS PILLS ─── */
.req-status-pill{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;font-size:11px;font-weight:600;letter-spacing:.3px;white-space:nowrap;border:1px solid transparent;}
.req-status-pill.s-open{background:rgba(59,130,246,.18);color:#93c5fd;border-color:rgba(59,130,246,.3);}
.req-status-pill.s-pending{background:rgba(245,158,11,.18);color:#fcd34d;border-color:rgba(245,158,11,.3);}
.req-status-pill.s-reviewed{background:rgba(139,92,246,.18);color:#c4b5fd;border-color:rgba(139,92,246,.3);}
.req-status-pill.s-wip{background:rgba(99,102,241,.18);color:#a5b4fc;border-color:rgba(99,102,241,.3);}
.req-status-pill.s-closed-complete{background:rgba(34,197,94,.18);color:#86efac;border-color:rgba(34,197,94,.3);}
.req-status-pill.s-closed-incomplete{background:rgba(249,115,22,.18);color:#fdba74;border-color:rgba(249,115,22,.3);}
.req-status-pill.s-closed-skipped{background:rgba(107,114,128,.18);color:#d1d5db;border-color:rgba(107,114,128,.3);}
.req-status-pill.s-cancelled{background:rgba(239,68,68,.18);color:#fca5a5;border-color:rgba(239,68,68,.3);}
#req-status-legend{padding:10px 22px 0;flex-wrap:wrap;gap:6px;margin-bottom:4px;}
.install-pref-val{white-space:normal!important;word-break:break-word!important;}

/* ─── REQ TABLE (mirror 314: plain header, subtle row zebra/hover) ─── */
.req-table thead tr{background:transparent !important;}
.req-table thead th{text-align:left !important;}
.req-table.rfi-table td{text-align:left !important;padding:8px 14px !important;}
.req-table-header {
  background: transparent !important;
  color: rgba(255,255,255,.7) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 2px solid rgba(161,0,255,.15);
}
body.light-mode .req-table-header{background:#f3ecfb !important;color:#4c1d95 !important;border-bottom-color:rgba(124,58,237,.25) !important;}
.req-table tbody tr:nth-child(even) td{background:rgba(161,0,255,.03);}
.req-table tbody tr:hover td{background:rgba(161,0,255,.07);}

/* ─── ACTIVITY LOGS TABLE — fixed column proportions (see <colgroup> in admin.html) ─── */
.al-log-table{table-layout:fixed;}


/* ─── REQ PAGINATION ─── */
.req-pagination-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:12px 20px;border-top:1px solid rgba(161,0,255,.12);}
.req-pagination-count{font-size:12px;color:var(--t3);}
.req-pagination{display:flex;gap:6px;flex-wrap:wrap;}
.req-page-btn{min-width:30px;height:30px;padding:0 8px;border-radius:8px;border:1px solid rgba(161,0,255,.25);background:rgba(255,255,255,.08);color:rgba(255,255,255,.75);font-size:12px;font-weight:600;cursor:pointer;transition:all .15s;}
.req-page-btn:hover:not(:disabled):not(.active){background:rgba(161,0,255,.12);}
.req-page-btn.active{background:#7c3aed;border-color:#7c3aed;color:#fff;}
.req-page-btn.active:hover{background:#6d28d9;border-color:#6d28d9;}
.req-page-btn:disabled{opacity:.4;cursor:not-allowed;}
.req-page-nav{font-weight:500;color:rgba(255,255,255,.55);}
body.light-mode .req-pagination-bar{border-top-color:rgba(124,58,237,.15);}
body.light-mode .req-page-btn{background:#fff;border-color:rgba(124,58,237,.2);color:#4c1d95;}
body.light-mode .req-page-btn:hover:not(:disabled):not(.active){background:#f3ecfb;}
body.light-mode .req-page-btn.active{background:#7c3aed;border-color:#7c3aed;color:#fff;}
body.light-mode .req-page-btn.active:hover{background:#6d28d9;border-color:#6d28d9;}
body.light-mode .req-page-nav{color:#7c5aa8;}

/* ─── REQ TOOLBAR BUTTONS (mirror 314 colors, same shape/color in both modes) ─── */
.fbtn-out.req-btn-export,
.fbtn-out.req-btn-reset{border-radius:10px;}
.fbtn-out.req-btn-export{background:#7c3aed;color:#fff;border-color:#7c3aed;}
.fbtn-out.req-btn-export:hover{background:#6d28d9;border-color:#6d28d9;}
.fbtn-out.req-btn-reset{background:rgb(191,90,255);color:#fff;border-color:rgb(191,90,255);}
.fbtn-out.req-btn-reset:hover{filter:brightness(1.08);}
.req-date-input::placeholder{color:#BF5AFF;}
body.light-mode .fbtn-out.req-btn-export{background:#7c3aed !important;color:#fff !important;border-color:#7c3aed !important;}
body.light-mode .fbtn-out.req-btn-export:hover{background:#6d28d9 !important;border-color:#6d28d9 !important;}
body.light-mode .fbtn-out.req-btn-reset{background:rgb(191,90,255) !important;color:#fff !important;border-color:rgb(191,90,255) !important;}
body.light-mode .fbtn-out.req-btn-reset:hover{filter:brightness(1.08);}

/* ─── ACTION COLUMN DROPDOWN OPTIONS (dark background to match fbtn-out style) ─── */
select.fbtn-out option{background:#1a0035;color:#fff;}
body.light-mode select.fbtn-out option{background:#fff;color:#1a0035;}

/* ─── ACTION MODAL CARD (solid bg so content doesn’t bleed through overlay) ─── */
body.light-mode .isp-action-modal-card{background:#fff !important;border-color:rgba(161,0,255,.2) !important;}

/* ─── ISP TOOLBAR BUTTONS (Export outlined, Group by Status filled) ─── */
.fbtn-out.isp-btn-export,
.fbtn-out.isp-btn-group,
.fbtn-out.isp-btn-reset{border-radius:10px;font-size:13px;font-weight:600;}
.fbtn-out.isp-btn-export{background:transparent;color:#ea580c;border-color:#ea580c;}
.fbtn-out.isp-btn-export:hover{background:rgba(234,88,12,.08);}
.fbtn-out.isp-btn-group{background:var(--p,#A100FF);color:#fff;border-color:var(--p,#A100FF);}
.fbtn-out.isp-btn-group:hover{filter:brightness(1.1);}
.fbtn-out.isp-btn-reset{font-size:11px;padding:8px 14px;border-color:rgba(161,0,255,.25);}
body.light-mode .fbtn-out.isp-btn-export{background:transparent !important;color:#ea580c !important;border-color:#ea580c !important;}
body.light-mode .fbtn-out.isp-btn-export:hover{background:rgba(234,88,12,.06) !important;}
body.light-mode .fbtn-out.isp-btn-group{background:#7c3aed !important;color:#fff !important;border-color:#7c3aed !important;}
body.light-mode .fbtn-out.isp-btn-group:hover{background:#6d28d9 !important;}
body.light-mode .fbtn-out.isp-btn-reset{border-color:rgba(124,58,237,.2) !important;color:#7c3aed !important;background:transparent !important;}

/* ─── ISP STAT BADGES (subtle in dark mode, opaque pastel in light mode) ─── */
.isp-stat-badge{display:inline-block;margin-top:8px;font-size:11px;font-weight:600;border-radius:12px;padding:2px 10px;}
.isp-stat-badge--green{color:#34d399;background:rgba(52,211,153,.12);}
.isp-stat-badge--orange{color:#fb923c;background:rgba(251,146,60,.12);}
.isp-stat-badge--purple{color:#c084fc;background:rgba(192,132,252,.12);}
body.light-mode .isp-stat-badge--green{color:#166534;background:#dcfce7;}
body.light-mode .isp-stat-badge--orange{color:#92400e;background:#fef3c7;}
body.light-mode .isp-stat-badge--purple{color:#6b21a8;background:#f3e8ff;}

/* ─── REQ FILTERS (same shape in both modes, colors adapt per mode) ─── */
select.req-filter-select,
input.req-date-input {
  border-radius: 10px;
  font-weight: 600;
  font-size: 11px;
}
select.req-filter-select{
  color:#d8b4fe;
  padding: 8px 22px 8px 10px !important;
  background-position: right 8px center !important;
}
body.light-mode select.req-filter-select,
body.light-mode input.req-date-input {
  background-color: #f3ecfb;
  color: #7c3aed;
  border-color: rgba(124,58,237,.15);
}
body.light-mode select.req-filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath fill='%237c3aed' d='M6 7L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
}
body.light-mode .req-date-input::placeholder{color:#7c3aed;}

/* ─── REQ SEARCH CLEAR (x) BUTTON ─── */
.req-search-wrap{position:relative;flex:1;min-width:220px;}
.req-search-wrap input.fi{width:100%;padding-right:34px;font-size:13px;}
.req-search-clear{position:absolute;top:50%;right:8px;transform:translateY(-50%);width:22px;height:22px;border:none;border-radius:50%;background:rgba(255,255,255,.1);color:rgba(255,255,255,.6);cursor:pointer;font-size:13px;line-height:1;display:flex;align-items:center;justify-content:center;transition:all .15s;}
.req-search-clear:hover{background:rgba(255,255,255,.18);color:#fff;}
body.light-mode .req-search-clear{background:rgba(124,58,237,.1);color:#7c3aed;}
body.light-mode .req-search-clear:hover{background:rgba(124,58,237,.2);}


/* ─── REQ DATE RANGE CALENDAR (custom dropdown) ─── */
.req-cal-dd{background:#1a0035;border:1px solid rgba(161,0,255,.25);border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.5);padding:12px;width:260px;}
body.light-mode .req-cal-dd{background:#fff;border-color:rgba(161,0,255,.15);}
.req-cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;font-size:13px;font-weight:700;}
.req-cal-head button{background:none;border:none;color:var(--pl);font-size:16px;cursor:pointer;padding:2px 8px;border-radius:6px;}
.req-cal-head button:hover{background:rgba(161,0,255,.1);}
.req-cal-weekdays{display:grid;grid-template-columns:repeat(7,1fr);font-size:10px;color:rgba(255,255,255,.4);text-align:center;margin-bottom:4px;}
body.light-mode .req-cal-weekdays{color:#7c6a9a;}
.req-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;}
.req-cal-day{background:none;border:none;border-radius:6px;padding:6px 0;font-size:12px;color:rgba(255,255,255,.8);cursor:pointer;}
body.light-mode .req-cal-day{color:#1a0035;}
.req-cal-day:hover{background:rgba(161,0,255,.15);}
.req-cal-day.muted{color:rgba(255,255,255,.2);}
body.light-mode .req-cal-day.muted{color:rgba(26,0,53,.25);}
.req-cal-day.in-range{background:rgba(161,0,255,.18);}
.req-cal-day.selected{background:var(--p);color:#fff;font-weight:700;}

/* ─── REQ DETAIL SIDE PANEL (slide-in, mirror 314) ─── */
.req-panel-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:300;}
.req-side-panel{position:fixed;top:0;right:0;bottom:0;width:440px;max-width:92vw;background:#1a0035;border-left:1px solid rgba(161,0,255,.2);z-index:301;overflow-y:auto;box-shadow:-8px 0 32px rgba(0,0,0,.35);padding:24px;animation:reqPanelSlideIn .25s ease;}
body.light-mode .req-side-panel{background:#fff;border-left-color:rgba(161,0,255,.15);}
@keyframes reqPanelSlideIn{from{transform:translateX(100%);}to{transform:translateX(0);}}
.req-detail-h{border-bottom:1px solid rgba(161,0,255,.15);padding-bottom:6px;font-weight:700;}
body.light-mode .req-detail-h{border-bottom-color:rgba(124,58,237,.15);}

/* ─── ACTIVITY LOG DETAIL MODAL ─── */
.al-detail-modal{background:#1a0035;border:1px solid rgba(161,0,255,.2);border-radius:20px;width:100%;max-width:560px;box-shadow:0 24px 64px rgba(0,0,0,.4);overflow:hidden;}
body.light-mode .al-detail-modal{background:#fff;border-color:rgba(161,0,255,.15);}
.al-detail-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--t3);margin-bottom:4px;}
.al-detail-section{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:var(--pl);margin-bottom:12px;}

/* ─── EXEMPTION STAT CARD TOOLTIPS ─── */
.ex-modal-card{background:#1a0035;}
body.light-mode .ex-modal-card{background:#fff !important;border-color:rgba(161,0,255,.2) !important;}
.stat-info{position:absolute;top:10px;right:12px;z-index:5;display:flex;align-items:center;cursor:default;}
.stat-info-icon{font-size:14px;color:rgba(255,255,255,.28);line-height:1;transition:color .15s;user-select:none;}
.stat-info:hover .stat-info-icon{color:rgba(161,0,255,.7);}
.stat-tip{position:absolute;bottom:calc(100% + 8px);right:-4px;width:220px;border-radius:10px;padding:9px 12px;font-size:11px;line-height:1.55;color:rgba(255,255,255,.8);white-space:normal;pointer-events:none;opacity:0;transition:opacity .15s;z-index:50;box-shadow:0 8px 24px rgba(0,0,0,.5);background:rgba(16,0,36,.97);border:1px solid rgba(161,0,255,.3);}
.stat-info:hover .stat-tip{opacity:1;}
body.light-mode .stat-info-icon{color:rgba(0,0,0,.5);}
body.light-mode .stat-info:hover .stat-info-icon{color:rgba(161,0,255,.7);}
body.light-mode .stat-tip{background:rgba(255,255,255,.97);color:#111827;border-color:rgba(161,0,255,.2);box-shadow:0 8px 24px rgba(0,0,0,.15);}

/* ─── REQ LEGEND PILLS (mirror 314 colors exactly) ─── */
.req-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 4px;
  border: 1px solid;
}
.req-legend-pill.open {
  background:rgba(129,140,248,.15);
  color:#818cf8;
  border-color:rgba(129,140,248,.4);
}
.req-legend-pill.pending {
  background:rgba(251,146,60,.15);
  color:#fb923c;
  border-color:rgba(251,146,60,.4);
}
.req-legend-pill.reviewed {
  background:rgba(56,189,248,.15);
  color:#38bdf8;
  border-color:rgba(56,189,248,.4);
}
.req-legend-pill.wip {
  background:rgba(107,123,247,.15);
  color:#6B7BF7;
  border-color:rgba(107,123,247,.4);
}
.req-legend-pill.complete {
  background:rgba(52,211,153,.15);
  color:#34d399;
  border-color:rgba(52,211,153,.4);
}
.req-legend-pill.incomplete {
  background:rgba(248,113,113,.15);
  color:#f87171;
  border-color:rgba(248,113,113,.4);
}
.req-legend-pill.skipped {
  background:rgba(167,139,250,.15);
  color:#a78bfa;
  border-color:rgba(167,139,250,.4);
}
.req-legend-pill.cancelled {
  background:rgba(148,163,184,.15);
  color:#94a3b8;
  border-color:rgba(148,163,184,.4);
}


/* ─── REQ DETAIL PANEL ─── */
#req-detail-panel{background:#1a0035 !important;border-left:1px solid rgba(161,0,255,.2);display:flex;flex-direction:column;gap:0;top:76px !important;height:calc(100vh - 76px) !important;}
#req-detail-overlay{background:rgba(0,0,0,.35);top:76px !important;}
#req-detail-panel .req-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;margin-bottom:16px;}
#req-detail-panel .req-section-title{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--pl,#a100ff);margin:16px 0 8px;padding-bottom:4px;border-bottom:.5px solid rgba(161,0,255,.2);}
#req-detail-panel .req-detail-item{display:flex;flex-direction:column;gap:2px;}
#req-detail-panel .req-detail-lbl{font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:rgba(255,255,255,.4);}
#req-detail-panel .req-detail-val{font-size:13px;color:rgba(255,255,255,.88);word-break:break-word;white-space:normal;line-height:1.4;}
@media(max-width:768px){#req-detail-panel{top:56px !important;height:calc(100vh - 56px) !important;width:100vw !important;}#req-detail-overlay{top:56px !important;}}

/* ─── HOTLINE MANAGEMENT ─── */
.hotline-mgmt-card{background:rgba(255,255,255,.04);border:1px solid rgba(161,0,255,.12);border-radius:12px;padding:16px 20px;margin-bottom:12px;}
.hotline-mgmt-isp{font-size:15px;font-weight:700;color:rgba(255,255,255,.88);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;}
.hotline-mgmt-row{display:grid;grid-template-columns:120px 1fr 1fr auto;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid rgba(161,0,255,.08);font-size:12px;}
.hotline-mgmt-row:last-child{border-bottom:none;}
@media(max-width:600px){
  .hotline-mgmt-row{grid-template-columns:1fr auto;grid-template-rows:auto auto auto;row-gap:2px;}
  .hotline-mgmt-row>span:nth-child(1){grid-column:1;grid-row:1;}
  .hotline-mgmt-row>span:nth-child(2){grid-column:1;grid-row:2;color:rgba(255,255,255,.85);word-break:break-word;white-space:normal;}
  .hotline-mgmt-row>span:nth-child(3){grid-column:1;grid-row:3;color:rgba(255,255,255,.45);font-size:11px;word-break:break-word;white-space:normal;}
  .hotline-mgmt-row>div:last-child{grid-column:2;grid-row:1/4;align-self:center;}
}
.condition-grid{overflow-x:auto;margin-top:8px;}
.condition-table{width:100%;border-collapse:collapse;font-size:12px;}
.condition-table th{padding:8px 12px;text-align:center;background:rgba(161,0,255,.12);color:var(--pl);font-weight:700;font-size:11px;white-space:nowrap;}
.condition-table td{padding:8px 12px;text-align:center;border-bottom:1px solid rgba(161,0,255,.08);color:rgba(255,255,255,.7);}
.condition-table td:first-child{text-align:left;font-weight:600;color:rgba(255,255,255,.88);}

/* ─── PLAN FORM ─── */
.plan-form-select{color:#fff;}
.plan-form-select option{background:var(--bk2);color:#fff;}

/* ─── FULFILLER CELL CLASSES (JS-generated) ─── */
.fl-cell-mono{font-family:monospace;font-size:11.5px;color:rgba(255,255,255,.55);white-space:nowrap;}
.fl-cell-name{font-weight:600;color:#fff;}
.fl-cell-sub{font-size:11px;color:rgba(255,255,255,.4);}
.fl-cell-addr{font-size:12px;color:rgba(255,255,255,.6);max-width:140px;white-space:normal;line-height:1.4;}
.isp-tbl-mig-note{font-size:11px;color:rgba(255,255,255,.3);font-style:italic;}
.isp-tbl-type{font-size:12px;color:rgba(255,255,255,.7);white-space:nowrap;}

/* ─── FLATPICKR DARK THEME ─── */
.flatpickr-calendar.al-fp .flatpickr-day.selected,
.flatpickr-calendar.al-fp .flatpickr-day.startRange,
.flatpickr-calendar.al-fp .flatpickr-day.endRange{background:var(--p);border-color:var(--p);color:#fff;}
.flatpickr-calendar.al-fp .flatpickr-day.inRange{background:rgba(161,0,255,.18);border-color:transparent;box-shadow:-5px 0 0 rgba(161,0,255,.18),5px 0 0 rgba(161,0,255,.18);}
.flatpickr-calendar.al-fp .flatpickr-day:hover{background:rgba(161,0,255,.2);}
body:not(.light-mode) .flatpickr-calendar.al-fp{background:#1a0035;border:1px solid rgba(161,0,255,.25);box-shadow:0 12px 40px rgba(0,0,0,.5);}
body:not(.light-mode) .flatpickr-calendar.al-fp.arrowTop:before,body:not(.light-mode) .flatpickr-calendar.al-fp.arrowTop:after{border-bottom-color:#1a0035;}
body:not(.light-mode) .flatpickr-calendar.al-fp.arrowBottom:before,body:not(.light-mode) .flatpickr-calendar.al-fp.arrowBottom:after{border-top-color:#1a0035;}
body:not(.light-mode) .flatpickr-calendar.al-fp .flatpickr-months .flatpickr-month,
body:not(.light-mode) .flatpickr-calendar.al-fp .flatpickr-current-month input.cur-year,
body:not(.light-mode) .flatpickr-calendar.al-fp span.flatpickr-day{color:rgba(255,255,255,.85);}
body:not(.light-mode) .flatpickr-calendar.al-fp .flatpickr-weekday{color:rgba(255,255,255,.5);}
body:not(.light-mode) .flatpickr-calendar.al-fp .flatpickr-day.prevMonthDay,
body:not(.light-mode) .flatpickr-calendar.al-fp .flatpickr-day.nextMonthDay,
body:not(.light-mode) .flatpickr-calendar.al-fp .flatpickr-day.flatpickr-disabled{color:rgba(255,255,255,.25);}
body:not(.light-mode) .flatpickr-calendar.al-fp .flatpickr-months .flatpickr-prev-month svg,
body:not(.light-mode) .flatpickr-calendar.al-fp .flatpickr-months .flatpickr-next-month svg{fill:rgba(255,255,255,.7);}
body:not(.light-mode) .flatpickr-calendar.al-fp .flatpickr-monthDropdown-months{background:#1a0035;color:#fff;}

/* ─── REQ DATE RANGE PICKER (req-fp) — mirrors al-fp ─── */
.flatpickr-calendar.req-fp .flatpickr-day.selected,
.flatpickr-calendar.req-fp .flatpickr-day.startRange,
.flatpickr-calendar.req-fp .flatpickr-day.endRange{background:var(--p);border-color:var(--p);color:#fff;}
.flatpickr-calendar.req-fp .flatpickr-day.inRange{background:rgba(161,0,255,.18);border-color:transparent;box-shadow:-5px 0 0 rgba(161,0,255,.18),5px 0 0 rgba(161,0,255,.18);}
.flatpickr-calendar.req-fp .flatpickr-day:hover{background:rgba(161,0,255,.2);}
body:not(.light-mode) .flatpickr-calendar.req-fp{background:#1a0035;border:1px solid rgba(161,0,255,.25);box-shadow:0 12px 40px rgba(0,0,0,.5);}
body:not(.light-mode) .flatpickr-calendar.req-fp.arrowTop:before,body:not(.light-mode) .flatpickr-calendar.req-fp.arrowTop:after{border-bottom-color:#1a0035;}
body:not(.light-mode) .flatpickr-calendar.req-fp.arrowBottom:before,body:not(.light-mode) .flatpickr-calendar.req-fp.arrowBottom:after{border-top-color:#1a0035;}
body:not(.light-mode) .flatpickr-calendar.req-fp .flatpickr-months .flatpickr-month,
body:not(.light-mode) .flatpickr-calendar.req-fp .flatpickr-current-month input.cur-year,
body:not(.light-mode) .flatpickr-calendar.req-fp span.flatpickr-day{color:rgba(255,255,255,.85);}
body:not(.light-mode) .flatpickr-calendar.req-fp .flatpickr-weekday{color:rgba(255,255,255,.5);}
body:not(.light-mode) .flatpickr-calendar.req-fp .flatpickr-day.prevMonthDay,
body:not(.light-mode) .flatpickr-calendar.req-fp .flatpickr-day.nextMonthDay,
body:not(.light-mode) .flatpickr-calendar.req-fp .flatpickr-day.flatpickr-disabled{color:rgba(255,255,255,.25);}
body:not(.light-mode) .flatpickr-calendar.req-fp .flatpickr-months .flatpickr-prev-month svg,
body:not(.light-mode) .flatpickr-calendar.req-fp .flatpickr-months .flatpickr-next-month svg{fill:rgba(255,255,255,.7);}
body:not(.light-mode) .flatpickr-calendar.req-fp .flatpickr-monthDropdown-months{background:#1a0035;color:#fff;}
/* Light mode: ensure navigation arrows are visible */
body.light-mode .flatpickr-calendar.req-fp .flatpickr-months .flatpickr-prev-month svg,
body.light-mode .flatpickr-calendar.req-fp .flatpickr-months .flatpickr-next-month svg{fill:rgba(161,0,255,.8);}
body.light-mode .flatpickr-calendar.al-fp .flatpickr-months .flatpickr-prev-month svg,
body.light-mode .flatpickr-calendar.al-fp .flatpickr-months .flatpickr-next-month svg{fill:rgba(161,0,255,.8);}

/* ─── LIGHT MODE OVERRIDES ─── */
body.light-mode{
  background:#f8f6fb;color:#1a0035;
  --color-text-dim:#7c6a9a;
  --color-text-soft:#3d2a5c;
  --color-input-bg:rgba(0,0,0,.04);
  --color-border-muted:rgba(161,0,255,.15);
  --color-border-faint:rgba(0,0,0,.06);
  --text-primary:#1a0035;
  --text-secondary:#7c6a9a;
  --text-muted:#9d8bb5;
}
body.light-mode::before{background:radial-gradient(circle,rgba(161,0,255,.06) 0%,transparent 70%);}
body.light-mode::after{background:radial-gradient(circle,rgba(161,0,255,.04) 0%,transparent 70%);}
body.light-mode .ln-main em{color:var(--pl);}
body.light-mode nav{background:linear-gradient(90deg,rgba(255,255,255,.95),rgba(248,246,251,.95)) !important;border-bottom-color:rgba(161,0,255,.1) !important;}
body.light-mode .sec-h{color:#1a0035;}
body.light-mode .sec-sub{color:#7c6a9a;}
body.light-mode .sidebar{background:#f3eeff;border-right-color:rgba(161,0,255,.12);}
body.light-mode .sb-item{color:#5a3c82;}
body.light-mode .sb-item:hover{background:rgba(161,0,255,.06);}
body.light-mode .sb-item.active{background:rgba(161,0,255,.1);color:#1a0035;border-color:rgba(161,0,255,.2);}
body.light-mode .sb-item.disabled{color:#a07cc5;}
body.light-mode .sb-footer-btn{color:#5a3c82;}
body.light-mode .sb-footer-btn:hover{background:rgba(161,0,255,.06);color:#1a0035;}
body.light-mode .admin-hamburger{border-color:rgba(161,0,255,.25);}
body.light-mode .admin-hamburger span{background:rgba(13,0,32,.7);}
body.light-mode .stat-card{background:rgba(255,255,255,.8);border-color:rgba(161,0,255,.1);box-shadow:0 2px 12px rgba(161,0,255,.05);}
body.light-mode .chart-wrap{background:rgba(255,255,255,.8);border-color:rgba(161,0,255,.1);}
body.light-mode .chart-title{color:#1a0035;}
body.light-mode .chart-period button{background:rgba(161,0,255,.06);border-color:rgba(161,0,255,.15);color:#5a3c82;}
body.light-mode .chart-period button.active{background:rgba(161,0,255,.15);border-color:rgba(161,0,255,.3);color:var(--pl);}
body.light-mode .chart-period button:hover{background:rgba(161,0,255,.1);color:#3d2a5c;}
body.light-mode #range-error{color:#c62828;}
body.light-mode #range-from,body.light-mode #range-to{color-scheme:light;}
body.light-mode .table-wrap{background:rgba(255,255,255,.8);border-color:rgba(161,0,255,.1);}
body.light-mode .table-scroll::-webkit-scrollbar-thumb{background:rgba(161,0,255,.25);}
body.light-mode .table-title{color:#1a0035;}
.table-search{color:#fff;}
body.light-mode .table-search{background:rgba(0,0,0,.03);border-color:rgba(161,0,255,.12);color:#1a0035;}
body.light-mode .table-search::placeholder{color:#7c6a9a;}
body.light-mode thead{background:rgba(161,0,255,.04);}
body.light-mode th{color:#7c6a9a;border-bottom-color:rgba(161,0,255,.08);}
body.light-mode td{color:#3d2a5c;border-bottom-color:rgba(161,0,255,.06);}
body.light-mode tr:hover td{background:rgba(161,0,255,.03);}
body.light-mode .tbl-filter{background:rgba(161,0,255,.06);border-color:rgba(161,0,255,.15);}
body.light-mode .tbl-filter option{background:#fff;color:#1a0035;}
body.light-mode .col-filter{background:rgba(0,0,0,.04);border-color:rgba(161,0,255,.15);color:#3d2a5c;}
body.light-mode .col-filter option{background:#fff;color:#1a0035;}
body.light-mode #survey-filter-row th{background:rgba(161,0,255,.04);}
body.light-mode #sec-surveys tbody tr:hover{background:rgba(161,0,255,.06);}
body.light-mode #sec-activity-logs tbody tr:hover{background:rgba(161,0,255,.06);}
body.light-mode .faq-modal{background:#fff;border-color:rgba(161,0,255,.18);box-shadow:0 24px 64px rgba(161,0,255,.12);}
body.light-mode .faq-modal-title{color:#1a0035;}
body.light-mode .faq-modal-close{color:#7c6a9a;}
body.light-mode .faq-modal .font-mono{color:#5a3c82;}
body.light-mode .faq-modal-lbl{color:#7c6a9a;}
body.light-mode .faq-modal-input{background:rgba(0,0,0,.03);border-color:rgba(161,0,255,.18);color:#1a0035;}
body.light-mode .faq-modal-input::placeholder{color:#7c6a9a;}
body.light-mode .faq-modal-input option{background:#fff;color:#1a0035;}
body.light-mode .faq-modal-cancel{background:rgba(0,0,0,.04);border-color:rgba(161,0,255,.15);color:#5a3c82;}
body.light-mode .faq-modal-cancel:hover{background:rgba(161,0,255,.06);color:#1a0035;}
body.light-mode .faq-tab-btn{color:rgba(0,0,0,.4);}
body.light-mode .faq-tab-btn.active{color:var(--p);border-bottom-color:var(--p);}
body.light-mode .condition-table td{color:#3a2a5c;}
body.light-mode .condition-table td:first-child{color:#1a0035;}
body.light-mode .condition-table .cond-sub-label{color:#7c6a9a;}
body.light-mode .faq-item{background:rgba(255,255,255,.8);border-color:rgba(161,0,255,.1);}
body.light-mode .faq-item-q{color:#1a0035;}
body.light-mode .faq-item-a{color:#5a3c82;}
.fb-field-lbl{color:rgba(255,255,255,.4);}
.fb-field-val{color:rgba(255,255,255,.85);}
body.light-mode .fb-item{background:rgba(255,255,255,.8);border-color:rgba(161,0,255,.1);}
body.light-mode .fb-item-subj{color:#1a0035;}
body.light-mode .fb-item-msg{color:#5a3c82;}
body.light-mode .fb-item-meta{color:#1a0035;}
body.light-mode .fb-field-lbl{color:#3d2a5c;font-weight:700;}
body.light-mode .fb-field-val{color:#1a0035;}
body.light-mode .fb-reply-input{background:rgba(0,0,0,.03);border-color:rgba(161,0,255,.12);color:#1a0035;}
body.light-mode .fb-reply-input::placeholder{color:#7c6a9a;}
body.light-mode .plans-toggle{background:rgba(161,0,255,.08);}
body.light-mode .plans-toggle .tog{color:#7c6a9a;}
body.light-mode .plans-toggle .tog.active{background:rgba(161,0,255,.12);color:#5b21b6;}
body.light-mode .isp-pill{background:rgba(0,0,0,.04);border-color:rgba(161,0,255,.15);color:#5a3c82;}
body.light-mode .isp-pill.active{background:rgba(161,0,255,.1);border-color:rgba(161,0,255,.3);color:var(--p);}
body.light-mode .isp-search-input{background:rgba(0,0,0,.03);border-color:rgba(161,0,255,.25);color:#1a0035;}
body.light-mode .isp-search-input::placeholder{color:#a07cc5;}
body.light-mode .fl-search-input{background:rgba(0,0,0,.03);border-color:rgba(161,0,255,.25);color:#1a0035;}
body.light-mode .fl-search-input::placeholder{color:#a07cc5;}
body.light-mode .isp-status-select{background:rgba(161,0,255,.06);border-color:rgba(161,0,255,.2);color:var(--p);}
body.light-mode .isp-modal{background:#fff;border-color:rgba(161,0,255,.2);}
body.light-mode .isp-modal.rd-modal{background:#fff !important;}
/* ISP detail modal — light mode text fixes */
body.light-mode .isp-modal #isp-m-ref{color:#1a0035 !important;}
body.light-mode .isp-modal #isp-m-address{color:#1a0035 !important;}
body.light-mode .isp-modal #isp-m-employee,
body.light-mode .isp-modal #isp-m-eid,
body.light-mode .isp-modal #isp-m-plan,
body.light-mode .isp-modal #isp-m-type,
body.light-mode .isp-modal #isp-m-speed,
body.light-mode .isp-modal #isp-m-cost,
body.light-mode .isp-modal #isp-m-submitted{color:#1a0035 !important;}
body.light-mode .isp-modal #isp-m-ritm{color:var(--p) !important;}
body.light-mode .isp-modal #isp-m-landmark{color:#3d2a5c !important;}
body.light-mode .isp-modal #isp-m-coords{color:#1a0035 !important;}
body.light-mode .isp-modal #isp-m-preferred-time{color:#3d2a5c !important;}
/* Address block outer container — plain gray in light mode */
body.light-mode .isp-m-addr-block{background:rgba(0,0,0,.03) !important;border-color:rgba(0,0,0,.1) !important;}
/* Address block inner containers (coordinates/landmark) → gray */
body.light-mode .isp-modal [style*="rgba(0,0,0,.25)"]{background:rgba(0,0,0,.04) !important;}
/* Info cards (employee, plan, type, date) → plain gray */
body.light-mode .isp-modal [style*="rgba(255,255,255,.04)"]{background:rgba(0,0,0,.03) !important;border-color:rgba(0,0,0,.1) !important;}
/* Small uppercase labels */
body.light-mode .isp-modal [style*="rgba(255,255,255,.35)"]{color:rgba(0,0,0,.4) !important;}
/* Staging progress section container */
body.light-mode .isp-modal [style*="rgba(255,255,255,.03)"]{background:rgba(0,0,0,.02) !important;border-color:rgba(0,0,0,.08) !important;}
body.light-mode .isp-nf-modal{background:#fff;border-color:rgba(220,38,38,.2);}
body.light-mode .isp-nf-lbl{color:#7c6a9a;}
body.light-mode .isp-nf-select{background:rgba(0,0,0,.03);border-color:rgba(161,0,255,.18);color:#1a0035;}
body.light-mode .isp-nf-select option{background:#fff;color:#1a0035;}
body.light-mode .isp-nf-textarea{background:rgba(0,0,0,.03);border-color:rgba(161,0,255,.18);color:#1a0035;}
body.light-mode .isp-nf-textarea::placeholder{color:#7c6a9a;}
body.light-mode #isp-nf-info-row{background:rgba(220,38,38,.04) !important;border-color:rgba(220,38,38,.15) !important;color:#3d2a5c !important;}
/* Light mode: isp-nf-modal full override (override Tailwind arbitrary [background:#120028]) */
body.light-mode .isp-nf-modal{background:#fff !important;border-color:rgba(220,38,38,.2) !important;}
body.light-mode .isp-nf-modal [style*="color:#fff"]{color:#1a0035 !important;}
body.light-mode .isp-nf-modal [style*="rgba(255,255,255"]{color:#7c6a9a !important;}
body.light-mode .isp-nf-modal .fl-modal-emp{color:#1a0035 !important;}
body.light-mode .isp-nf-cancel{color:#3d2a5c !important;border-color:rgba(0,0,0,.2) !important;}
body.light-mode .isp-nf-modal .isp-modal-close-btn{background:rgba(0,0,0,.05) !important;border-color:rgba(0,0,0,.12) !important;color:rgba(0,0,0,.4) !important;}
/* Light mode: type & status badge text color adjustment */
body.light-mode .isp-type-badge.nc{background:rgba(0,0,0,.06);border:none;color:#3d2a5c;}
body.light-mode .isp-type-badge.migration{background:rgba(0,0,0,.06);border:none;color:#3d2a5c;}
body.light-mode .isp-status-badge.pending{color:#d97706;}
body.light-mode .isp-status-badge.pending::before{background:#d97706;}
body.light-mode .isp-status-badge.feasible{color:#059669;}
body.light-mode .isp-status-badge.feasible::before{background:#059669;}
body.light-mode .isp-status-badge.not-feasible{color:#dc2626;}
body.light-mode .isp-status-badge.not-feasible::before{background:#dc2626;}
body.light-mode .isp-status-badge.installation{color:#2563eb;}
body.light-mode .isp-status-badge.installation::before{background:#2563eb;}
body.light-mode .isp-status-badge.ongoing{color:#ea580c;}
body.light-mode .isp-status-badge.ongoing::before{background:#ea580c;}
body.light-mode .isp-status-badge.completed{color:#059669;}
body.light-mode .isp-status-badge.completed::before{background:#059669;}
body.light-mode .isp-status-badge.awarded{color:#7c3aed;}
body.light-mode .isp-status-badge.awarded::before{background:#7c3aed;}
/* Light mode: action buttons consistent */
body.light-mode .isp-act-btn{background:rgba(59,130,246,.08) !important;border-color:rgba(59,130,246,.25) !important;color:#2563eb !important;}
body.light-mode .isp-act-eye-btn{background:rgba(0,0,0,.04) !important;border-color:rgba(0,0,0,.18) !important;color:#3d2a5c !important;}
body.light-mode .fl-cell-graphik{color:#3d2a5c;}
body.light-mode .req-detail-lbl{color:#7c6a9a;}
body.light-mode .req-detail-val{color:#1a0035;}
body.light-mode #req-detail-panel{background:#ffffff !important;border-left:1px solid rgba(161,0,255,.15);}
body.light-mode #req-detail-overlay{background:rgba(0,0,0,.15);}
body.light-mode #req-detail-panel .req-detail-lbl{color:#7c6a9a;}
body.light-mode #req-detail-panel .req-detail-val{color:#1a0035;}
body.light-mode .provision-panel{background:rgba(255,255,255,.85);border-color:rgba(161,0,255,.1);}
body.light-mode .provision-title{color:#1a0035;}
body.light-mode .provision-sub{color:#7c6a9a;}
body.light-mode .provision-lbl{color:#7c6a9a;}
body.light-mode .provision-emails{background:rgba(0,0,0,.03);border-color:rgba(161,0,255,.18);color:#1a0035;}
body.light-mode .provision-emails::placeholder{color:#7c6a9a;}
body.light-mode .provision-role-select{background:#fff;border-color:rgba(161,0,255,.18);color:#1a0035;}
body.light-mode .provision-cancel{color:#5a3c82;border-color:rgba(161,0,255,.2);}
body.light-mode .bulk-bar{background:rgba(161,0,255,.05);border-color:rgba(161,0,255,.15);}
body.light-mode .bulk-count{color:#1a0035;}
body.light-mode .bulk-role-select{background:#fff;border-color:rgba(161,0,255,.15);color:#1a0035;}
body.light-mode .um-role-action{background:#fff;border-color:rgba(161,0,255,.12);color:#1a0035;}
body.light-mode .um-user-count{color:#7c6a9a;}
body.light-mode .um-pagination{color:#7c6a9a;}
body.light-mode .um-page-btn{background:rgba(0,0,0,.04);border-color:rgba(161,0,255,.15);color:#5a3c82;}
body.light-mode .al-actor-name{color:#1a0035;}
body.light-mode .al-cat.system{background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.12);color:#5a3c82;}
body.light-mode .al-target{color:#5a3c82;}
body.light-mode .al-time .al-date{color:#1a0035;}
body.light-mode .al-time .al-clock{color:#7c6a9a;}
body.light-mode .isp-breakdown-wrap{background:rgba(255,255,255,.8);border-color:rgba(161,0,255,.1);}
body.light-mode .isp-breakdown-title{color:#1a0035;}
body.light-mode .isp-bk-card{background:rgba(255,255,255,.6);border-color:rgba(161,0,255,.1);}
body.light-mode .isp-bk-name{color:#1a0035;}
body.light-mode .isp-bk-total{color:#3d2a5c;}
body.light-mode .stat-info-icon{color:rgba(0,0,0,.55);}
body.light-mode .stat-info:hover .stat-info-icon{color:rgba(161,0,255,.65);}
body.light-mode .stat-tip{background:#fff;border-color:rgba(161,0,255,.2);color:#3d2a5c;box-shadow:0 8px 24px rgba(161,0,255,.15);}
body.light-mode .stat-tip::after{border-top-color:#fff;}
body.light-mode .toast{background:rgba(255,255,255,.97);border-color:rgba(161,0,255,.2);}
body.light-mode .toast-title{color:#1a0035;}
body.light-mode .toast-msg{color:#7c6a9a;}
body.light-mode .toast-close{color:rgba(0,0,0,.3);}
body.light-mode .toast-close:hover{color:#1a0035;}
body.light-mode .fl-stat-card{background:#fff;border-color:rgba(0,0,0,.07);}
body.light-mode .fl-stat-lbl{color:#7c6a9a;}
/* ─── ISP DASHBOARD light mode ─── */
body.light-mode .isp-dash-stat{background:rgba(255,255,255,.85) !important;border-color:rgba(161,0,255,.12) !important;box-shadow:0 2px 12px rgba(161,0,255,.06);}
body.light-mode #sec-isp-dashboard [class~="rounded-2xl"]{background:rgba(255,255,255,.85) !important;border-color:rgba(161,0,255,.12) !important;box-shadow:0 2px 12px rgba(161,0,255,.06);}
body.light-mode .fl-expand-title{color:#1a0035;}
body.light-mode .fl-expand-count{color:rgba(0,0,0,.4);}
body.light-mode .fl-title{color:#1a0035;}
body.light-mode .fl-subtitle{color:#7c6a9a;}
body.light-mode .fl-filter-dd{background:rgba(161,0,255,.06);border-color:rgba(161,0,255,.2);color:var(--pl);}
body.light-mode .fl-filter-dd option{background:#fff;color:#1a0035;}
body.light-mode .fl-view-btn{color:#7c6a9a;}
body.light-mode .fl-view-btn.active{background:rgba(161,0,255,.1);color:var(--p);}
body.light-mode .fl-upd-btn{background:rgba(59,130,246,.08);border-color:rgba(59,130,246,.2);color:#2563eb;}
body.light-mode .fl-upd-dd{background:#fff;border-color:rgba(161,0,255,.2);}
body.light-mode .fl-detail-modal{background:#fff;border-color:rgba(161,0,255,.15);color:#1a0035;}
body.light-mode .fl-modal-name{color:#1a0035;}
body.light-mode .fl-modal-lbl{color:rgba(0,0,0,.45);}
body.light-mode .fl-modal-val{color:#1a0035;}
body.light-mode .fl-action-modal{background:#fff;border-color:rgba(161,0,255,.15);color:#1a0035;}
body.light-mode .fl-action-modal .text-white{color:#1a0035;}
body.light-mode .fl-action-modal .text-white\/45{color:#7c6a9a;}
body.light-mode .fl-action-modal .text-white\/40{color:#7c6a9a;}
body.light-mode .fl-action-modal .text-white\/60{color:#5a3c82;}
body.light-mode .fl-action-modal .isp-modal-close-btn{background:rgba(0,0,0,.05);border-color:rgba(0,0,0,.12);color:rgba(0,0,0,.4);}
body.light-mode .fl-action-modal .border-white\/\[\.18\]{border-color:rgba(0,0,0,.15);}
body.light-mode .fl-action-modal .bg-white\/\[\.06\]{background:rgba(0,0,0,.04);}
body.light-mode .fl-action-modal .border-white\/\[\.12\]{border-color:rgba(0,0,0,.1);}
body.light-mode .fl-modal-emp{color:#1a0035 !important;}
body.light-mode .fl-action-modal-title{color:#1a0035;}
body.light-mode .fl-action-modal-val{color:#1a0035;}
body.light-mode .isp-prog-dot{border-color:rgba(0,0,0,.35) !important;color:rgba(0,0,0,.5) !important;background:transparent !important;}
body.light-mode .isp-prog-step.active .isp-prog-dot{background:rgba(161,0,255,.06) !important;border-color:var(--p) !important;color:var(--p) !important;box-shadow:0 0 12px rgba(161,0,255,.18) !important;}
body.light-mode .isp-prog-step.done .isp-prog-dot{background:transparent !important;border-color:#16a34a !important;color:#16a34a !important;}
body.light-mode .isp-prog-step.failed .isp-prog-dot{background:rgba(220,38,38,.05) !important;border-color:#dc2626 !important;color:#dc2626 !important;}
body.light-mode .isp-prog-step.skipped .isp-prog-dot{border-color:rgba(0,0,0,.08) !important;color:rgba(0,0,0,.12) !important;background:transparent !important;}
body.light-mode .isp-prog-line{background:rgba(0,0,0,.1) !important;}
body.light-mode .isp-prog-line.done{background:#16a34a !important;}
body.light-mode .isp-prog-name{color:rgba(0,0,0,.7) !important;}
body.light-mode .isp-prog-sub{color:rgba(0,0,0,.45) !important;}
body.light-mode .isp-prog-step.active .isp-prog-name{color:var(--p) !important;}
body.light-mode .isp-prog-step.done .isp-prog-name{color:#16a34a !important;}
body.light-mode .isp-prog-step.failed .isp-prog-name{color:#dc2626 !important;}
body.light-mode .isp-prog-step.skipped .isp-prog-name{color:rgba(0,0,0,.15) !important;}
body.light-mode .isp-prog-step.skipped .isp-prog-sub{color:rgba(0,0,0,.1) !important;}
/* NF block light mode text fix */
body.light-mode #isp-m-nf-reason-val{color:#1a0035 !important;}
body.light-mode #isp-m-nf-remarks-val{color:#3d2a5c !important;}
body.light-mode .hotline-mgmt-card{background:#fff;border-color:rgba(161,0,255,.15);}
body.light-mode .hotline-mgmt-isp{color:#1a0035;}
body.light-mode .fl-cell-name{color:#1a0035;}
body.light-mode .fl-cell-mono{color:#000;}
body.light-mode .fl-cell-addr{color:#5a3c82;}
body.light-mode .isp-tbl-mig-note{color:rgba(0,0,0,.3) !important;}
body.light-mode .plan-form-select{color:#1a0035;}
body.light-mode .plan-form-select option{background:#fff;color:#1a0035;}
body.light-mode .dcc-check-label{color:#3d2a5c;}
body.light-mode .dcc-check-count{color:#a07cc5;}
body.light-mode .dcc-date-range-label{color:#a07cc5;}
body.light-mode .dcc-date-range-val{color:#3d2a5c;}

/* ─── LIGHT MODE: Fix Tailwind text-white on light backgrounds ─── */
/* When body switches to light mode, the nav becomes white bg and the main
   content area becomes #f8f6fb. Every element using Tailwind's text-white
   utility becomes invisible. These rules flip those to dark readable colors. */

/* Nav (white/near-white background in light mode) */
body.light-mode nav [class*="text-white"]{color:#1a0035 !important;}
body.light-mode nav strong{color:#1a0035 !important;}
body.light-mode #nav-portal-label{color:#7c6a9a !important;}
body.light-mode #nav-greet{color:#3d2a5c !important;}

/* Sidebar section group labels (MAIN, CONTENT, MANAGEMENT etc.) */
body.light-mode .sidebar [class*="text-white"]{color:#9a7cc0 !important;}
body.light-mode #sb-profile-name{color:#1a0035 !important;}
body.light-mode #sb-profile-role{color:var(--pl) !important;}

/* Main content area — override all text-white Tailwind utilities */
body.light-mode main [class*="text-white"]{color:#3d2a5c !important;}

/* RESTORE: keep white text on explicitly colored backgrounds (buttons, avatars, badges) */
body.light-mode [class*="bg-primary"][class*="text-white"]{color:#fff !important;}
body.light-mode [class*="bg-danger"][class*="text-white"]{color:#fff !important;}
body.light-mode [class*="bg-success"][class*="text-white"]{color:#fff !important;}
body.light-mode [class*="bg-warning"][class*="text-white"]{color:#fff !important;}
body.light-mode [class*="bg-info"][class*="text-white"]{color:#fff !important;}

/* ─── DARK MODE GLOW ENHANCEMENTS ─── */
body:not(.light-mode) #sec-dashboard{background:radial-gradient(ellipse at 20% 50%,rgba(139,92,246,.05) 0%,transparent 60%),radial-gradient(ellipse at 80% 20%,rgba(52,211,153,.03) 0%,transparent 60%);position:relative;isolation:isolate;}
body:not(.light-mode) .chart-wrap{background:rgba(255,255,255,.04);border-color:rgba(139,92,246,.2);box-shadow:0 0 24px rgba(139,92,246,.15),0 0 48px rgba(139,92,246,.05);}
body:not(.light-mode) .stat-card{background:rgba(255,255,255,.03);border:1px solid rgba(139,92,246,.2);border-top:2px solid rgba(139,92,246,.6);transition:border-color .2s,box-shadow .2s,transform .2s;}
/* FIX 1 — Uniform purple glow on all stat cards */
body:not(.light-mode) .stat-card:hover{box-shadow:0 0 24px rgba(139,92,246,.35);}
/* FIX 2 — Light mode stat card glow */
body.light-mode .stat-card{box-shadow:0 2px 8px rgba(0,0,0,.06),0 0 12px rgba(139,92,246,.08);border-color:rgba(139,92,246,.12);}
body.light-mode .stat-card:hover{box-shadow:0 4px 16px rgba(0,0,0,.08),0 0 20px rgba(139,92,246,.14);transition:box-shadow .2s ease,transform .2s ease;transform:translateY(-1px);}
/* ENHANCEMENT 4 — Live indicator pulse dot */
.live-indicator{display:inline-block;width:8px;height:8px;border-radius:50%;background:#34d399;margin-right:8px;vertical-align:middle;animation:livePulse 2s ease-in-out infinite;}
@keyframes livePulse{0%,100%{box-shadow:0 0 0 0 rgba(52,211,153,.7);opacity:1;}50%{box-shadow:0 0 0 6px rgba(52,211,153,0);opacity:.8;}}
/* ENHANCEMENT 5 — Dot-grid background (dark mode only) */
body:not(.light-mode) #sec-dashboard::before{content:'';position:absolute;inset:0;z-index:-1;background-image:radial-gradient(circle,rgba(139,92,246,.15) 1px,transparent 1px);background-size:32px 32px;opacity:.4;animation:gridDrift 20s linear infinite;pointer-events:none;}
@keyframes gridDrift{0%{background-position:0 0;}100%{background-position:32px 32px;}}
/* STAT CARD TYPOGRAPHY — larger bolder number */
.stat-card > div:first-child{font-size:3rem;font-weight:800;}
/* CALENDAR DISABLED DATES */
.cal-disabled{opacity:.3;cursor:not-allowed;pointer-events:none;}
/* ─── IMPLEMENTATION REPORT ─── */
/* ISP bar canvas fills its dynamic wrapper height */
#ir-isp-chart-wrap canvas { width:100% !important; display:block; }
/* Dark mode glow for the report section */
body:not(.light-mode) #sec-impl-report{background:radial-gradient(ellipse at 20% 50%,rgba(139,92,246,.05) 0%,transparent 60%),radial-gradient(ellipse at 80% 20%,rgba(52,211,153,.03) 0%,transparent 60%);}
/* PROGRAM HEALTH SCORE PANEL */
.phs-sub{color:rgba(255,255,255,.4);}
.phs-muted{color:rgba(255,255,255,.35);}
.phs-pct-text{color:#34d399;}
.phs-metric-row{display:flex;flex-direction:column;gap:2px;padding:8px 12px;border-radius:10px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.05);}
.phs-metric-lbl{font-size:11px;font-weight:600;color:rgba(255,255,255,.4);text-transform:uppercase;letter-spacing:.5px;}
.phs-metric-val{font-size:18px;font-weight:700;color:#fff;}
.phs-status-name{color:rgba(255,255,255,.65);}
.phs-count{color:rgba(255,255,255,.75);}
body.light-mode .phs-sub{color:#7c6a9a;}
body.light-mode .phs-muted{color:#a07cc5;}
body.light-mode .phs-metric-row{background:rgba(161,0,255,.04);border-color:rgba(161,0,255,.1);}
body.light-mode .phs-metric-lbl{color:#7c6a9a;}
body.light-mode .phs-metric-val{color:#1a0035;}
body.light-mode .phs-status-name{color:#3d2a5c;}
body.light-mode .phs-count{color:#3d2a5c;}
body.light-mode .phs-pct-text{/* color set by JS based on score; already readable */}
body.light-mode #phs-track{stroke:rgba(139,92,246,.12);}

/* ─── FOOTER LIGHT MODE ─── */
body.light-mode footer{background:#f8f7ff !important;border-top-color:rgba(139,92,246,.15);}
body.light-mode footer span{color:#6b7280;}
/* Hide footer when any modal overlay is open */
body:has(.isp-modal-overlay.open) footer,
body:has(.faq-modal-overlay.open) footer{display:none !important;}

/* ─── IMPLEMENTATION REPORT ─── */
/* ISP bar canvas fills its dynamic wrapper height */
#ir-isp-chart-wrap canvas { width:100% !important; display:block; }
/* Dark mode glow for the report section */
body:not(.light-mode) #sec-impl-report{background:radial-gradient(ellipse at 20% 50%,rgba(139,92,246,.05) 0%,transparent 60%),radial-gradient(ellipse at 80% 20%,rgba(52,211,153,.03) 0%,transparent 60%);}
/* ─── REQUEST DETAILS REDESIGN MODAL (rd-*) ─── */
.rd-modal{background:#120028;border:1px solid rgba(161,0,255,.25);border-radius:18px;width:100%;max-width:580px;margin:16px;box-shadow:0 24px 64px rgba(0,0,0,.6);overflow:hidden;}
.rd-inner{padding:22px 24px 20px;display:flex;flex-direction:column;gap:13px;}
/* Header */
.rd-hdr{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.rd-hdr-left{display:flex;flex-direction:column;gap:2px;}
.rd-section-lbl{font-size:10px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:rgba(255,255,255,.35);}
.rd-ref-id{font-family:monospace;font-size:20px;font-weight:700;color:#fff;letter-spacing:-.5px;line-height:1.2;}
.rd-hdr-right{display:flex;align-items:center;gap:8px;flex-shrink:0;padding-top:4px;}
.rd-type-badge{display:inline-flex;align-items:center;padding:3px 11px;border-radius:100px;font-size:11px;font-weight:600;background:rgba(161,0,255,.12);border:1px solid rgba(161,0,255,.3);color:#BF5AFF;white-space:nowrap;}
.rd-close{width:28px;height:28px;border-radius:8px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);color:rgba(255,255,255,.45);font-size:13px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s;font-family:var(--font);}
.rd-close:hover{background:rgba(255,255,255,.12);color:#fff;}
/* Cards */
.rd-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);border-radius:10px;padding:12px 14px;}
/* Address Card */
.rd-addr-line{font-size:14px;font-weight:600;color:rgba(255,255,255,.9);line-height:1.45;margin-bottom:8px;}
.rd-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px;}
.rd-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:100px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.09);font-size:12px;color:rgba(255,255,255,.55);white-space:nowrap;}
.rd-addr-landmark{font-size:12px;color:rgba(255,255,255,.4);font-style:italic;}
/* 2-column grid */
.rd-cols-2{display:grid;grid-template-columns:1fr 1fr;gap:9px;}
.rd-field-lbl{display:block;font-size:10px;font-weight:700;letter-spacing:.7px;text-transform:uppercase;color:rgba(255,255,255,.35);margin-bottom:5px;}
.rd-field-main{display:block;font-size:14px;font-weight:600;color:#fff;line-height:1.3;}
.rd-field-sub{display:block;font-size:12px;color:rgba(255,255,255,.45);margin-top:3px;}
/* Meta row */
.rd-meta-row{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);border-radius:10px;}
.rd-meta-date{font-size:12.5px;color:rgba(255,255,255,.5);}
.rd-ritm-val{font-family:monospace;font-size:12.5px;font-weight:600;color:#BF5AFF;}
/* Staging Progress Steps */
.rd-steps{display:flex;flex-direction:column;}
.rd-step{display:flex;gap:10px;align-items:flex-start;}
.rd-step-left{display:flex;flex-direction:column;align-items:center;width:24px;flex-shrink:0;}
.rd-step-dot{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11.5px;font-weight:700;border:1.5px solid rgba(255,255,255,.2);background:transparent;color:rgba(255,255,255,.3);transition:all .2s;flex-shrink:0;line-height:1;}
.rd-step-line{width:1.5px;flex:1;min-height:20px;background:rgba(255,255,255,.1);margin:3px auto 0;}
.rd-step-info{padding-bottom:20px;flex:1;min-width:0;}
.rd-step-name{display:block;font-size:13.5px;font-weight:600;color:rgba(255,255,255,.35);line-height:1.3;}
.rd-step-sub{display:block;font-size:12px;color:rgba(255,255,255,.22);margin-top:2px;}
/* Step state: done — green */
.rd-step.done .rd-step-dot{background:rgba(34,197,94,.18);border-color:#22c55e;color:#22c55e;}
.rd-step.done .rd-step-line{background:#22c55e;}
.rd-step.done .rd-step-name{color:#4ade80;font-weight:600;}
.rd-step.done .rd-step-sub{color:rgba(74,222,128,.45);}
/* Step state: active — amber */
.rd-step.active .rd-step-dot{border-color:#f59e0b;background:rgba(245,158,11,.12);color:#fbbf24;box-shadow:0 0 8px rgba(245,158,11,.3);}
.rd-step.active .rd-step-name{color:#fbbf24;font-weight:700;}
.rd-step.active .rd-step-sub{color:rgba(251,191,36,.55);}
/* Step state: failed */
.rd-step.failed .rd-step-dot{border-color:#FF3B30;color:#FF3B30;background:rgba(255,59,48,.08);}
.rd-step.failed .rd-step-name{color:#f87171;}
.rd-step.failed .rd-step-sub{color:rgba(248,113,113,.45);}
/* Step state: skipped */
.rd-step.skipped .rd-step-dot{border-color:rgba(255,255,255,.08);color:rgba(255,255,255,.12);}
.rd-step.skipped .rd-step-name{color:rgba(255,255,255,.15);}
.rd-step.skipped .rd-step-sub{color:rgba(255,255,255,.08);}

/* ─── RD MODAL LIGHT MODE ─── */
body.light-mode .rd-modal{background:#fff;border-color:rgba(161,0,255,.18);}
body.light-mode .rd-section-lbl{color:rgba(0,0,0,.4);}
body.light-mode .rd-ref-id{color:#1a0035;}
body.light-mode .rd-type-badge{background:rgba(161,0,255,.08);border-color:rgba(161,0,255,.25);color:#7300BF;}
body.light-mode .rd-close{background:rgba(0,0,0,.05);border-color:rgba(0,0,0,.1);color:rgba(0,0,0,.4);}
body.light-mode .rd-close:hover{background:rgba(0,0,0,.1);color:#1a0035;}
body.light-mode .rd-card{background:rgba(0,0,0,.03);border-color:rgba(0,0,0,.07);}
body.light-mode .rd-addr-line{color:#1a0035;}
body.light-mode .rd-chip{background:rgba(0,0,0,.05);border-color:rgba(0,0,0,.08);color:#5a3c82;}
body.light-mode .rd-addr-landmark{color:#7c6a9a;}
body.light-mode .rd-field-lbl{color:rgba(0,0,0,.4);}
body.light-mode .rd-field-main{color:#1a0035;}
body.light-mode .rd-field-sub{color:#7c6a9a;}
body.light-mode .rd-meta-row{background:rgba(0,0,0,.03);border-color:rgba(0,0,0,.07);}
body.light-mode .rd-meta-date{color:#7c6a9a;}
body.light-mode .rd-ritm-val{color:var(--p);}
body.light-mode .rd-step-dot{border-color:rgba(0,0,0,.2);color:rgba(0,0,0,.3);}
body.light-mode .rd-step-line{background:rgba(0,0,0,.1);}
body.light-mode .rd-step-name{color:rgba(0,0,0,.4);}
body.light-mode .rd-step-sub{color:rgba(0,0,0,.25);}
body.light-mode .rd-step.done .rd-step-dot{background:rgba(22,163,74,.1);border-color:#16a34a;color:#16a34a;}
body.light-mode .rd-step.done .rd-step-line{background:#16a34a;}
body.light-mode .rd-step.done .rd-step-name{color:#15803d;}
body.light-mode .rd-step.done .rd-step-sub{color:rgba(22,163,74,.55);}
body.light-mode .rd-step.active .rd-step-dot{border-color:#d97706;background:rgba(217,119,6,.08);color:#d97706;box-shadow:0 0 6px rgba(217,119,6,.2);}
body.light-mode .rd-step.active .rd-step-name{color:#b45309;font-weight:700;}
body.light-mode .rd-step.active .rd-step-sub{color:rgba(180,83,9,.55);}
body.light-mode .rd-step.failed .rd-step-dot{border-color:#dc2626;color:#dc2626;background:rgba(220,38,38,.05);}
body.light-mode .rd-step.failed .rd-step-name{color:#dc2626;}
body.light-mode .rd-step.skipped .rd-step-dot{border-color:rgba(0,0,0,.08);color:rgba(0,0,0,.12);}
body.light-mode .rd-step.skipped .rd-step-name{color:rgba(0,0,0,.15);}
body.light-mode .rd-step.skipped .rd-step-sub{color:rgba(0,0,0,.1);}

/* ─── RESPONSIVE MEDIA QUERIES ─── */
@media(max-width:900px){
  .survey-stat-grid{grid-template-columns:1fr 1fr!important;}
}
@media(max-width:600px){
  .survey-stat-grid{grid-template-columns:1fr!important;}
  .rd-cols-2{grid-template-columns:1fr!important;}
}
/* --- PILOT MANAGEMENT PANELS --- */
.pilot-panel{background:rgba(255,255,255,.04);border:1px solid rgba(161,0,255,.15);border-radius:12px;padding:24px;}
body.light-mode .pilot-panel{background:#fff;border-color:#eceef2;box-shadow:0 2px 8px #f0f1f4;color:#1a0035;}
.pilot-panel .pilot-panel-title{font-size:15px;font-weight:700;margin-bottom:4px;color:rgba(255,255,255,.92);}
body.light-mode .pilot-panel .pilot-panel-title{color:#111;}
.pilot-panel label{color:rgba(255,255,255,.58);}
body.light-mode .pilot-panel label{color:#555;}
.pilot-file-wrap{display:flex;align-items:center;height:38px;border:1px solid rgba(161,0,255,.2);border-radius:8px;background:rgba(255,255,255,.05);padding:0 8px;gap:8px;}
body.light-mode .pilot-file-wrap{background:#fff;border-color:#eceef2;}
.pilot-batch-row{display:flex;align-items:center;gap:14px;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.06);font-size:14px;}
.pilot-batch-row:last-child{border-bottom:none;}
.pilot-batch-row.alt{background:rgba(255,255,255,.025);}
body.light-mode .pilot-batch-row{border-bottom-color:#f0f1f4;}
body.light-mode .pilot-batch-row.alt{background:#fafafa;}
.pilot-batch-name{font-weight:700;color:rgba(255,255,255,.9);}
body.light-mode .pilot-batch-name{color:#111;}
.pilot-batch-meta{font-size:12px;color:rgba(255,255,255,.42);margin-top:2px;}
body.light-mode .pilot-batch-meta{color:#888;}
.pilot-tour-next:focus{outline:2px solid rgba(161,0,255,.7);outline-offset:2px;}

/* --- PILOT MANAGEMENT PANELS --- */
.pilot-panel{background:rgba(255,255,255,.04);border:1px solid rgba(161,0,255,.15);border-radius:12px;padding:24px;}
body.light-mode .pilot-panel{background:#fff;border-color:#eceef2;box-shadow:0 2px 8px #f0f1f4;color:#1a0035;}
.pilot-panel .pilot-panel-title{font-size:15px;font-weight:700;margin-bottom:4px;color:rgba(255,255,255,.92);}
body.light-mode .pilot-panel .pilot-panel-title{color:#111;}
.pilot-panel label{color:rgba(255,255,255,.58);}
body.light-mode .pilot-panel label{color:#555;}
.pilot-file-wrap{display:flex;align-items:center;height:38px;border:1px solid rgba(161,0,255,.2);border-radius:8px;background:rgba(255,255,255,.05);padding:0 8px;gap:8px;}
body.light-mode .pilot-file-wrap{background:#fff;border-color:#eceef2;}
.pilot-batch-row{display:flex;align-items:center;gap:14px;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.06);font-size:14px;}
.pilot-batch-row:last-child{border-bottom:none;}
.pilot-batch-row.alt{background:rgba(255,255,255,.025);}
body.light-mode .pilot-batch-row{border-bottom-color:#f0f1f4;}
body.light-mode .pilot-batch-row.alt{background:#fafafa;}
.pilot-batch-name{font-weight:700;color:rgba(255,255,255,.9);}
body.light-mode .pilot-batch-name{color:#111;}
.pilot-batch-meta{font-size:12px;color:rgba(255,255,255,.42);margin-top:2px;}
body.light-mode .pilot-batch-meta{color:#888;}
.pilot-tour-next:focus{outline:2px solid rgba(161,0,255,.7);outline-offset:2px;}
