/* =============================================================
   ServeAxis Design System — serveaxis.css
   Single source of truth for all CSS variables, atoms, layout.
   Loaded by base.html via {% static %}.
   ============================================================= */

/* ── CSS VARIABLES ── */
:root {
  --bg:        #060E1A;
  --surface:   #0B1628;
  --surface2:  #0F1E35;
  --surface3:  #152540;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.13);
  --text:      #D9ECFF;
  --text-soft: #8AAAC8;
  --text-muted:#3D5472;

  --indigo:    #6C8AFF;
  --indigo-lt: rgba(108,138,255,0.12);
  --indigo-md: rgba(108,138,255,0.20);
  --violet:    #A78BFA;
  --emerald:   #2DD4A0;
  --em-lt:     rgba(45,212,160,0.12);
  --amber:     #F59E0B;
  --am-lt:     rgba(245,158,11,0.12);
  --rose:      #F43F5E;
  --ro-lt:     rgba(244,63,94,0.12);
  --sky:       #38BDF8;
  --sk-lt:     rgba(56,189,248,0.12);
  --cyan:      #22D3EE;
  --slate:     #64748B;

  --font:  'Plus Jakarta Sans', sans-serif;
  --head:  'Plus Jakarta Sans', sans-serif;
  --mono:  'JetBrains Mono', monospace;
  --sw:    228px;
  --th:    58px;
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: auto; /* 🔥 THIS WAS BLOCKING WIDTH + SCROLL */
  font-family: var(--font); background: var(--bg);
  color: var(--text); font-size: 13px;
}

/* ── SHELL GRID ── */
.shell {
  display: grid;
  grid-template-rows: var(--th) 1fr;
  grid-template-columns: var(--sw) 1fr;
  grid-template-areas: "top top" "side main";
  height: 100vh; width: 100vw;
  transition: grid-template-columns .25s cubic-bezier(.4,0,.2,1);
}
.shell.sb-collapsed { grid-template-columns: 54px 1fr; }

/* ── TOPBAR ── */
.topbar {
  grid-area: top; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 12px;
  position: relative; z-index: 30;
}
.topbar::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,transparent,rgba(108,138,255,0.6) 35%,rgba(45,212,160,0.4) 65%,transparent);
}

/* Logo */
.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-svg { width: 36px; height: 36px; }
.logo-name { font-family: var(--head); font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.05em; }
.logo-name span { color: var(--indigo); }
.logo-tag { font-size: 9px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: white; display: block; margin-top: 1px; }
.top-div { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }

/* Client pill */
.client-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,163,224,0.08); border: 1px solid rgba(0,163,224,0.22);
  border-radius: 9px; padding: 5px 12px; cursor: pointer; transition: all .2s;
}
.client-pill:hover { background: rgba(0,163,224,0.14); border-color: rgba(0,163,224,0.4); }
.client-pip {
  width: 7px; height: 7px; border-radius: 50%; background: #00A3E0;
  box-shadow: 0 0 6px rgba(0,163,224,0.6); animation: pip 2s infinite;
}
.client-name-top { font-size: 12px; font-weight: 600; color: #00A3E0; font-family: var(--head); }
.client-type-top { font-size: 10px; color: white; }
.active-badge { font-size: 9px; font-weight: 700; background: rgba(0,163,224,0.15); color: #00A3E0; border-radius: 99px; padding: 2px 8px; }

/* Search */
.top-search {
  flex: 1; max-width: 260px; display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; padding: 6px 12px; transition: border-color .2s;
}
.top-search:focus-within { border-color: var(--indigo); }
.top-search i { color: white; font-size: 12px; }
.top-search input {
  border: none; background: transparent; outline: none;
  font-family: var(--font); font-size: 12px; color: var(--text);
  width: 100%; caret-color: var(--indigo);
}
.top-search input::placeholder { color: white; }

/* Top right */
.top-right { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.live-chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(45,212,160,0.07); border: 1px solid rgba(45,212,160,0.2);
  border-radius: 99px; padding: 4px 10px;
  font-size: 11px; font-weight: 500; color: var(--emerald); font-family: var(--mono);
}
.live-pip { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); animation: pip 2s infinite; }
@keyframes pip { 0%,100%{opacity:1} 50%{opacity:.3} }

.tb-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: white; cursor: pointer; transition: all .18s; font-size: 14px; position: relative;
}
.tb-btn:hover { border-color: var(--border2); color: var(--text); }
.notif-dot {
  position: absolute; top: -2px; right: -2px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--rose); border: 2px solid var(--surface);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; cursor: pointer; font-family: var(--head);
}

/* ── USER DROPDOWN ── */
.user-menu-wrap { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border-radius: 99px; cursor: pointer;
  background: var(--surface2); border: 1px solid var(--border); transition: all .18s;
}
.user-btn:hover { border-color: var(--border2); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff; font-family: var(--head); flex-shrink: 0;
}
.user-name { font-size: 11.5px; font-weight: 600; color: var(--text); }
.user-caret { font-size: 10px; color: white; margin-left: 2px; transition: transform .18s; }
.user-btn.open .user-caret { transform: rotate(180deg); }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 210px; background: var(--surface2);
  border: 1px solid var(--border2); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden; z-index: 100;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: all .18s ease;
}
.user-dropdown.open { opacity: 1; transform: translateY(0); pointer-events: all; }
.user-dd-header {
  padding: 12px 14px 10px; border-bottom: 1px solid var(--border);
  background: rgba(108,138,255,0.06);
}
.user-dd-name { font-size: 13px; font-weight: 700; color: var(--text); }
.user-dd-email { font-size: 10.5px; color: white; margin-top: 1px; }
.user-dd-badge {
  display: inline-block; font-size: 9px; font-weight: 700; padding: 2px 7px;
  border-radius: 99px; background: var(--indigo-md); color: var(--indigo); margin-top: 5px;
}
.user-dd-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; font-size: 12px; color: var(--text-soft);
  cursor: pointer; transition: background .15s; text-decoration: none;
}
.user-dd-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.user-dd-item i { font-size: 13px; min-width: 16px; color: white; }
.user-dd-item:hover i { color: var(--indigo); }
.user-dd-sep { height: 1px; background: var(--border); margin: 3px 0; }
.user-dd-item.danger { color: var(--rose); }
.user-dd-item.danger i { color: var(--rose); }
.user-dd-item.danger:hover { background: var(--ro-lt); }

/* ── SIDEBAR ── */
.sidebar {
  grid-area: side; background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 12px 0 6px;
  overflow: hidden; transition: width .25s cubic-bezier(.4,0,.2,1);
  width: var(--sw);
}
.sidebar.collapsed { width: 54px; }
.sidebar.collapsed .sb-section,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-chip,
.sidebar.collapsed .rag-dot,
.sidebar.collapsed .role-row span,
.sidebar.collapsed .role-badge { display: none; }
.sidebar.collapsed .role-row { justify-content: center; padding: 8px 0 4px; }
.sidebar.collapsed .nav-item {
  padding: 9px 0; margin: 1px 0; border-radius: 0;
  justify-content: center; border-left-color: transparent;
}
.sidebar.collapsed .nav-item.active {
  background: var(--indigo-lt); border-left: 2.5px solid var(--indigo);
}
.sidebar.collapsed .nav-item i { min-width: unset; }
.sidebar.collapsed .sb-bottom .nav-item { padding: 9px 0; justify-content: center; }
.sidebar.collapsed .sb-toggle { margin: 0 auto; }

.no-sidebar {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Hide sidebar layout only for NEST contractor users */
.shell.shell-no-sidebar {
  grid-template-columns: 1fr !important;
  grid-template-areas:
    "top"
    "main";
}

.shell.shell-no-sidebar .main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* optional safety */
.shell.shell-no-sidebar .sidebar {
  display: none !important;
}

.sb-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--surface2); border: 1px solid var(--border);
  color: white; cursor: pointer; transition: all .18s;
  font-size: 13px; flex-shrink: 0; margin-left: auto; margin-right: 6px;
}
.sb-toggle:hover { border-color: var(--border2); color: var(--text); }

.sb-section {
  font-size: 9px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: white;
  padding: 10px 16px 4px; margin-top: 2px; white-space: nowrap;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px 8px 14px; margin: 1px 7px 1px 0;
  border-radius: 0 9px 9px 0;
  color: white; cursor: pointer; transition: all .16s;
  border-left: 2.5px solid transparent; font-weight: 400; text-decoration: none;
  font-size: 12.5px; white-space: nowrap;
}
.nav-item i { font-size: 14px; min-width: 17px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-soft); }
.nav-item.active {
  background: var(--indigo-lt); color: var(--indigo);
  border-left-color: var(--indigo); font-weight: 600;
}
.nav-item.active i { color: var(--indigo); }

.nav-chip { margin-left: auto; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 99px; flex-shrink: 0; }
.nc-red  { background: var(--ro-lt); color: var(--rose); }
.nc-am   { background: var(--am-lt); color: var(--amber); }
.nc-em   { background: var(--em-lt); color: var(--emerald); }
.nc-sky  { background: var(--sk-lt); color: var(--sky); }
.nc-ind  { background: var(--indigo-md); color: var(--indigo); }
.nc-gray { background: rgba(100,116,139,0.14); color: white; }

.rag-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-left: auto; }
.rag-g { background: var(--emerald); box-shadow: 0 0 5px rgba(45,212,160,0.5); }
.rag-a { background: var(--amber); box-shadow: 0 0 5px rgba(245,158,11,0.5); }
.rag-r { background: var(--rose); box-shadow: 0 0 5px rgba(244,63,94,0.5); }

.sb-bottom { margin-top: auto; border-top: 1px solid var(--border); padding: 6px 0 0; }
.role-row { display: flex; align-items: center; gap: 8px; padding: 8px 14px 4px; font-size: 10px; color: white; }
.role-badge { font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(108,138,255,0.15); color: var(--indigo); }

/* ── MAIN ── */
.main {
  grid-area: main;
  background: var(--bg);
  overflow: auto; /* 🔥 CRITICAL FIX */
  position: relative;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;
}
.main::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(108,138,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(45,212,160,0.04) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 55% 50%, rgba(0,163,224,0.025) 0%, transparent 60%);
}

/* ── TAB PANELS ── */
.tp { position: absolute; inset: 0; padding: 16px 20px; display: none; flex-direction: column; gap: 11px; z-index: 1; overflow: hidden; }
.tp.active { display: flex; animation: tpIn .22s ease both; }
@keyframes tpIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:none} }

/* ── ATOMS: PAGE HEADER ── */
.ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ph-title { font-family: var(--head); font-size: 21px; font-weight: 800; color: var(--text); letter-spacing: -0.04em; line-height: 1; }
.ph-title em { font-style: normal; color: var(--indigo); }
.ph-sub { font-size: 11px; color: white; margin-top: 3px; font-weight: 400; }
.ph-right { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

/* ── ATOMS: BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 8px;
  font-size: 11.5px; font-weight: 600; cursor: pointer; border: none; transition: all .18s;
  font-family: var(--font); white-space: nowrap; text-decoration: none;
}
.btn-ind  { background: var(--indigo); color: #fff; box-shadow: 0 2px 12px rgba(108,138,255,0.3); }
.btn-ind:hover { background: #7b9bff; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(108,138,255,0.45); }
.btn-em   { background: var(--emerald); color: #021a11; font-weight: 700; }
.btn-em:hover { background: #25c494; transform: translateY(-1px); }
.btn-rose { background: var(--rose); color: #fff; }
.btn-outline { background: var(--surface); color: var(--text-soft); border: 1px solid var(--border); box-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.btn-outline:hover { border-color: var(--border2); color: var(--text); }
.btn-sm   { padding: 5px 10px; font-size: 11px; border-radius: 7px; }

/* ── ATOMS: CARDS ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 2px 20px rgba(0,0,0,0.5); overflow: hidden; position: relative; }
.card-p { padding: 13px 15px; }
.card-accent { position: absolute; top: 0; left: 0; right: 0; height: 2.5px; border-radius: 13px 13px 0 0; }
.card-title { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: white; margin-bottom: 10px; }

/* ── ATOMS: STATUS PILLS ── */
.sp { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 99px; }
.sp::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.s-live  { background: var(--em-lt); color: var(--emerald); } .s-live::before  { background: var(--emerald); }
.s-pend  { background: var(--am-lt); color: var(--amber); }  .s-pend::before  { background: var(--amber); }
.s-risk  { background: var(--ro-lt); color: var(--rose); }   .s-risk::before  { background: var(--rose); }
.s-info  { background: var(--sk-lt); color: var(--sky); }    .s-info::before  { background: var(--sky); }
.s-ind   { background: var(--indigo-md); color: var(--indigo); } .s-ind::before { background: var(--indigo); }
.s-gray  { background: rgba(100,116,139,0.14); color: var(--slate); } .s-gray::before { background: var(--slate); }

/* ── ATOMS: PROGRESS BARS ── */
.btr { height: 3px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; margin-top: 7px; }
.bf  { height: 100%; border-radius: 99px; animation: bfg 1.2s ease-out both; }
@keyframes bfg { from{width:0} }
.bf-ind  { background: linear-gradient(90deg,#5571e8,var(--indigo)); }
.bf-em   { background: linear-gradient(90deg,#1ec48c,var(--emerald)); }
.bf-am   { background: linear-gradient(90deg,#d97706,var(--amber)); }
.bf-ro   { background: linear-gradient(90deg,#e11d48,var(--rose)); }
.bf-sk   { background: linear-gradient(90deg,#0284c7,var(--sky)); }
.bf-cyan { background: linear-gradient(90deg,#0891b2,var(--cyan)); }

/* ── ATOMS: TABLES ── */
.tbl-wrap { overflow-y: auto; flex: 1; min-height: 0; }
.tbl-wrap::-webkit-scrollbar { width: 3px; }
.tbl-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: white; padding: 8px 11px; border-bottom: 1px solid var(--border);
  text-align: left; background: rgba(255,255,255,0.02); white-space: nowrap;
}
tbody td { padding: 8px 11px; border-bottom: 1px solid rgba(255,255,255,0.035); vertical-align: middle; color: var(--text-soft); font-size: 12px; }
tbody td strong { color: var(--text); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.025); }

/* ── LAYOUT HELPERS ── */
.rf  { display: flex; gap: 10px; flex: 1; min-height: 0; }
.cf  { display: flex; flex-direction: column; gap: 10px; }
.f1  { flex: 1; min-height: 0; min-width: 0; }
.f0  { flex-shrink: 0; }
.kg  { display: grid; gap: 9px; }
.kg5 { grid-template-columns: repeat(5,1fr); }
.kg4 { grid-template-columns: repeat(4,1fr); }
.kg3 { grid-template-columns: repeat(3,1fr); }

/* ── KPI CARDS ── */
.kpi { padding: 13px 14px 11px; }
.kpi-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; margin-bottom: 9px; }
.kpi-lbl  { font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: white; }
.kpi-val  { font-family: var(--head); font-size: 27px; font-weight: 800; letter-spacing: -0.05em; margin: 3px 0 2px; line-height: 1; }
.kpi-sub  { font-size: 10.5px; display: flex; align-items: center; gap: 3px; }
.up   { color: var(--emerald); }
.down { color: var(--rose); }
.warn { color: var(--amber); }
.info { color: var(--sky); }

/* ── EXEC SUMMARY BAR ── */
.exec-bar {
  background: linear-gradient(90deg,rgba(108,138,255,0.08) 0%,rgba(45,212,160,0.05) 60%,rgba(0,163,224,0.06) 100%);
  border: 1px solid rgba(108,138,255,0.18); border-radius: 12px; padding: 13px 20px;
  display: flex; align-items: center; position: relative; overflow: hidden;
}
.exec-bar::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg,var(--indigo),var(--emerald)); border-radius: 3px 0 0 3px;
}
.exec-metric { display: flex; flex-direction: column; align-items: center; flex: 1; border-right: 1px solid rgba(255,255,255,0.07); padding: 0 16px; }
.exec-metric:last-child { border-right: none; }
.exec-val   { font-family: var(--head); font-size: 28px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.exec-lbl   { font-size: 10px; font-weight: 500; color: white; margin-top: 2px; letter-spacing: .04em; }
.exec-delta { font-size: 10px; font-weight: 600; margin-top: 3px; display: flex; align-items: center; gap: 2px; }

/* ── ALERT STRIP ── */
.alerts-strip { display: flex; gap: 8px; align-items: stretch; }
.alert-card {
  flex: 1; display: flex; align-items: center; gap: 10px;
  border-radius: 10px; padding: 9px 13px; border: 1px solid;
  cursor: pointer; transition: all .18s; position: relative; overflow: hidden;
}
.alert-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2.5px; border-radius: 2px 0 0 2px; }
.alert-card.crit   { background: rgba(244,63,94,0.06);  border-color: rgba(244,63,94,0.2); }
.alert-card.crit::before  { background: var(--rose); }
.alert-card.warn   { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.2); }
.alert-card.warn::before  { background: var(--amber); }
.alert-card.info-a { background: rgba(56,189,248,0.06); border-color: rgba(56,189,248,0.18); }
.alert-card.info-a::before { background: var(--sky); }
.alert-card:hover  { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.alert-icon  { font-size: 18px; flex-shrink: 0; }
.alert-label { font-size: 11.5px; font-weight: 600; color: var(--text); }
.alert-sub   { font-size: 10.5px; color: white; margin-top: 1px; }
.alert-badge { margin-left: auto; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 99px; flex-shrink: 0; white-space: nowrap; }
.ab-red  { background: var(--ro-lt); color: var(--rose); }
.ab-am   { background: var(--am-lt); color: var(--amber); }
.ab-sky  { background: var(--sk-lt); color: var(--sky); }

/* ── DEPT HEALTH GRID ── */
.dept-health-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.dept-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 13px; cursor: pointer;
  transition: all .2s; position: relative; overflow: hidden;
}
.dept-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: 11px 11px 0 0; }
.dept-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.4); }
.dept-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dept-emoji   { font-size: 16px; }
.dept-rag     { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dept-rag.g   { background: var(--emerald); box-shadow: 0 0 6px rgba(45,212,160,0.6); }
.dept-rag.a   { background: var(--amber);   box-shadow: 0 0 6px rgba(245,158,11,0.6); }
.dept-rag.r   { background: var(--rose);    box-shadow: 0 0 6px rgba(244,63,94,0.6); }
.dept-name    { font-size: 12px; font-weight: 700; color: var(--text); font-family: var(--head); letter-spacing: -0.01em; }
.dept-kpi     { font-family: var(--head); font-size: 20px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 4px 0 2px; }
.dept-kpi-lbl { font-size: 10px; color: white; }
.dept-bar     { height: 2.5px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.dept-bar-fill { height: 100%; border-radius: 99px; animation: bfg 1.4s ease-out both; }

/* ── ACTIVITY FEED ── */
.feed-item {
  display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 9px; margin-bottom: 5px;
}
.feed-dot  { width: 7px; height: 7px; border-radius: 50%; margin-top: 3px; flex-shrink: 0; }
.feed-body { flex: 1; min-width: 0; }
.feed-body strong { font-size: 11.5px; font-weight: 600; color: var(--text); display: block; }
.feed-body span   { font-size: 10.5px; color: white; }
.feed-time { font-size: 10px; color: white; white-space: nowrap; font-family: var(--mono); flex-shrink: 0; margin-top: 1px; }

/* ── PROCESS CATALOG ── */
.process-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; flex: 1; }
.proc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 15px; cursor: pointer;
  transition: all .22s; display: flex; flex-direction: column; gap: 7px;
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
}
.proc-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2.5px; border-radius: 12px 12px 0 0; }
.proc-card:hover { border-color: rgba(108,138,255,0.4); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.5); }
.proc-icon-wrap { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 2px; }
.proc-name  { font-family: var(--head); font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; line-height: 1.3; }
.proc-desc  { font-size: 11px; color: white; line-height: 1.6; flex: 1; }
.proc-foot  { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid var(--border); margin-top: auto; }
.proc-arrow { width: 24px; height: 24px; border-radius: 6px; background: var(--indigo-lt); display: flex; align-items: center; justify-content: center; color: var(--indigo); font-size: 13px; transition: all .18s; }
.proc-card:hover .proc-arrow { background: var(--indigo); color: #fff; }

/* ── AUTOMATION CATALOG ── */
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 9px; }
.auto-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; padding: 13px; cursor: pointer;
  transition: all .2s; position: relative; overflow: hidden;
}
.auto-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: 11px 11px 0 0; }
.auto-card:hover { border-color: rgba(108,138,255,0.35); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.4); }
.auto-card-name { font-size: 12.5px; font-weight: 700; color: var(--text); margin: 7px 0 4px; font-family: var(--head); }
.auto-card-desc { font-size: 10.5px; color: white; line-height: 1.6; margin-bottom: 9px; }
.auto-card-foot { display: flex; align-items: center; justify-content: space-between; }
.run-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: var(--indigo); color: #fff; transition: all .18s; }
.run-btn:hover { background: #7b9bff; }

/* ── BILLING: UTILITY ── */
.util-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.util-row  { display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,0.035); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.util-ic   { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.util-lbl  { font-size: 10px; color: white; font-weight: 500; }
.util-val  { font-family: var(--head); font-size: 16px; font-weight: 800; letter-spacing: -0.03em; }
.util-sub  { font-size: 10px; }

/* ── DONUT CHART ── */
.donut-wrap   { display: flex; align-items: center; gap: 12px; }
.donut        { position: relative; width: 76px; height: 76px; flex-shrink: 0; }
.donut svg    { transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 14px; font-weight: 800; color: var(--text); }
.donut-legend { display: flex; flex-direction: column; gap: 5px; }
.dl-item      { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: white; }
.dl-dot       { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }

/* ── PROCESS WORKFLOW STEPS ── */
.steps-row { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; flex: 1; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 10px;
  text-align: center; cursor: pointer; transition: all .22s; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.step:hover, .step.on {
  border-color: rgba(108,138,255,0.55); background: rgba(108,138,255,0.09);
  transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.step-n  { font-size: 9px; font-weight: 800; letter-spacing: .12em; color: var(--indigo); text-transform: uppercase; font-family: var(--head); }
.step-e  { font-size: 26px; }
.step-nm { font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; font-family: var(--head); }
.step-d  { font-size: 10.5px; color: white; line-height: 1.55; }

/* ── CLIENT CARDS ── */
.client-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; transition: all .2s; position: relative; overflow: hidden; }
.client-card:hover { border-color: rgba(108,138,255,0.4); box-shadow: 0 6px 24px rgba(0,0,0,0.4); transform: translateY(-2px); }
.cc-logo   { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; }
.cc-name   { font-family: var(--head); font-size: 13px; font-weight: 800; color: var(--text); }
.cc-sector { font-size: 10px; color: white; margin-top: 1px; margin-bottom: 9px; }
.cc-stats  { display: flex; gap: 10px; }
.cc-stat-v { font-family: var(--head); font-size: 15px; font-weight: 800; color: var(--text); }
.cc-stat-l { font-size: 9px; color: white; text-transform: uppercase; letter-spacing: .06em; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.09); border-radius: 99px; }
input { caret-color: var(--indigo); }


/* ── Dev Banner ── */
@keyframes triggerPulse {
  0%,100% { box-shadow:0 4px 12px rgba(239,68,68,0.5); }
  50%      { box-shadow:0 4px 22px rgba(239,68,68,0.85); }
}
@keyframes bannerIn {
  from { opacity:0; max-height:0; padding-top:0; padding-bottom:0; }
  to   { opacity:1; max-height:60px; padding-top:9px; padding-bottom:9px; }
}
@keyframes bannerOut {
  from { opacity:1; max-height:60px; }
  to   { opacity:0; max-height:0; padding-top:0; padding-bottom:0; }
}
#dev-banner {
  overflow: hidden;
}
#dev-banner.animate-in  { animation: bannerIn  .3s ease both; }
#dev-banner.animate-out { animation: bannerOut .4s ease both; }

/* ── EXTRA BLOCK (page-level overrides injected per template) ── */
