/* ── ALPHA LLC · CRM ────────────────────────────────────────────────
   Palette, type and rules from Alpha LLC Brand Guidelines v1.0.

   THE GOLD RULE: gold covers no more than 10% of any layout. Past that it
   stops signaling and starts decorating. Signal Gold is reserved for the
   primary action, the active nav item, and links. Everything structural is
   Obsidian, Graphite, Steel Navy and Iron.

   The brand runs dark. There is no light-mode palette by design.
   ------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Core */
  --obsidian:   #070B14;   /* primary ground, carries most surfaces */
  --graphite:   #0C111C;   /* cards and raised surfaces */
  --steel-navy: #233247;   /* panels and blocks raised above obsidian */
  --iron:       #4A5670;   /* dividers, captions, quiet detail */
  --gold:       #E3B84A;   /* Signal Gold — the accent, used sparingly */
  --gold-light: #F6D687;   /* highlight, gradients, small emphasis */
  --off-white:  #F2F5FA;   /* headlines and type on dark */
  --slate:      #93A2BA;   /* body copy on dark */

  /* Mapped to the app's existing tokens */
  --bg:         var(--obsidian);
  --bg2:        #090E18;
  --bg3:        var(--graphite);
  --bg4:        #141C2C;
  --panel:      var(--steel-navy);
  --border:     rgba(74,86,112,0.28);
  --border2:    rgba(74,86,112,0.45);
  --accent:     var(--gold);
  --accent2:    var(--gold-light);
  --accent3:    #C9A03A;
  --text:       var(--off-white);
  --text2:      var(--slate);
  --text3:      var(--iron);

  /* Status semantics. Deliberately muted so that nothing out-shouts gold. */
  --green:      #4FA97F;
  --green2:     #3C8A66;
  --red:        #C4645C;
  --yellow:     #C9A03A;
  --purple:     #6E7FA8;
  --cyan:       #5A8CA8;

  --sidebar-w:  260px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --shadow:     0 4px 24px rgba(0,0,0,0.55);
  --glow:       0 0 40px rgba(227,184,74,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

/* ── App Shell ───────────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.brand-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 38px;
}
.brand-icon img { width: 100%; height: 100%; display: block; }

.brand-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
}

.brand-sub {
  font-size: 10.5px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1px;
  padding-left: 48px;
}

.nav-section { padding: 16px 12px 8px; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 2px;
  position: relative;
}

.nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  text-decoration: none;
}

.nav-link.active {
  background: rgba(227,184,74,0.12);
  color: var(--accent);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  background: rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.nav-link.active .nav-icon { background: rgba(79,142,247,0.15); }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--steel-navy), #2E4160);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
  flex-shrink: 0;
}

.user-info-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.2; }
.user-info-role { font-size: 11px; color: var(--text3); text-transform: capitalize; margin-top: 1px; }

/* ── Main Content ─────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  background: rgba(13,19,32,0.8);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-title { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.topbar-breadcrumb { font-size: 13px; color: var(--text3); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text3);
  width: 200px;
  cursor: pointer;
  transition: all 0.2s;
}

.topbar-search:hover { border-color: var(--border2); color: var(--text2); }

.topbar-action {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text2);
}

.topbar-action:hover { background: rgba(255,255,255,0.08); color: var(--text); border-color: var(--border2); }

.content { padding: 28px 32px; flex: 1; }

/* ── Hero Banner ─────────────────────────────────────────────── */
.hero-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 28px;
  height: 180px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

.hero-banner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.3;
  mix-blend-mode: luminosity;
}

.hero-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,19,32,0.95) 0%, rgba(13,19,32,0.6) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 32px 36px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.hero-sub { font-size: 14px; color: rgba(255,255,255,0.6); }

/* ── Stat Cards ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover { transform: translateY(-2px); border-color: var(--border2); }

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.stat-icon.blue   { background: rgba(227,184,74,0.12); }
.stat-icon.green  { background: rgba(16,185,129,0.12); }
.stat-icon.yellow { background: rgba(245,158,11,0.12); }
.stat-icon.purple { background: rgba(110,127,168,0.16); }
.stat-icon.red    { background: rgba(239,68,68,0.12); }
.stat-icon.cyan   { background: rgba(90,140,168,0.16); }

.stat-label { font-size: 12px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }
.stat-value { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -1px; }
.stat-sub   { font-size: 12px; color: var(--text3); margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-trend-up   { color: var(--green); }
.stat-trend-down { color: var(--red); }

.stat-card-glow {
  position: absolute; bottom: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.15;
}

.stat-card.blue   .stat-card-glow { background: var(--accent); }
.stat-card.green  .stat-card-glow { background: var(--green); }
.stat-card.yellow .stat-card-glow { background: var(--yellow); }
.stat-card.purple .stat-card-glow { background: var(--purple); }
.stat-card.cyan   .stat-card-glow { background: var(--cyan); }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--border2); }
.card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

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

.card-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* ── Tables ──────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.table th {
  background: rgba(255,255,255,0.02);
  padding: 11px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13.5px;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 12px; color: var(--text3); }

/* ── Lead Name with Avatar ───────────────────────────────────── */
.lead-cell { display: flex; align-items: center; gap: 10px; }
.lead-initials {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e3a5f, #2e4d7a);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #93c5fd;
  flex-shrink: 0;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.badge-new             { background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid rgba(100,116,139,0.2); }
.badge-contacted       { background: rgba(227,184,74,0.12);  color: var(--gold-light); border: 1px solid rgba(227,184,74,0.22); }
.badge-interested      { background: rgba(16,185,129,0.12);  color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.badge-not_interested  { background: rgba(239,68,68,0.12);   color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.badge-callback        { background: rgba(245,158,11,0.12);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }
.badge-closed_won      { background: rgba(16,185,129,0.18);  color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.badge-closed_lost     { background: rgba(239,68,68,0.18);   color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.badge-dnc             { background: rgba(110,127,168,0.16);  color: #a78bfa; border: 1px solid rgba(139,92,246,0.2); }
.badge-admin           { background: rgba(239,68,68,0.12);   color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.badge-manager         { background: rgba(245,158,11,0.12);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }
.badge-agent           { background: rgba(227,184,74,0.12);  color: var(--gold-light); border: 1px solid rgba(227,184,74,0.22); }
.badge-active          { background: rgba(16,185,129,0.12);  color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.badge-inactive        { background: rgba(100,116,139,0.08); color: #64748b; border: 1px solid rgba(100,116,139,0.15); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none !important;
  letter-spacing: -0.1px;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--accent);  color: #fff; box-shadow: 0 4px 14px rgba(79,142,247,0.35); }
.btn-success   { background: var(--green);   color: #fff; box-shadow: 0 4px 14px rgba(16,185,129,0.3); }
.btn-danger    { background: var(--red);     color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,0.3); }
.btn-warning   { background: var(--yellow);  color: #000; }
.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text2); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.09); border-color: var(--border2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid transparent; }
.btn-ghost:hover { background: rgba(255,255,255,0.05); border-color: var(--border); color: var(--text); }
.btn-sm  { padding: 6px 14px; font-size: 12.5px; }
.btn-xs  { padding: 4px 10px; font-size: 11.5px; border-radius: 7px; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 20px; }

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-input,
input.form-input,
select.form-input,
textarea.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}

.form-input:focus { border-color: var(--accent); background: rgba(79,142,247,0.05); box-shadow: 0 0 0 3px rgba(227,184,74,0.12); }
.form-input::placeholder { color: var(--text3); }
select.form-input { appearance: none; cursor: pointer; }

.form-help  { font-size: 12px; color: var(--text3); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; }

/* ── Page Header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
}

.page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.page-sub { font-size: 13.5px; color: var(--text3); margin-top: 3px; }

/* ── Filter Bar ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
}

.filter-bar .form-input { width: auto; min-width: 140px; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.alert-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); color: #34d399; }
.alert-error   { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.2);  color: #f87171; }
.alert-warning { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); color: #fbbf24; }

/* ── Login Page ──────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

.login-visual {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.login-visual img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.login-visual-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #070b14 0%, rgba(30,27,75,0.7) 100%);
}

.login-visual-content {
  position: relative;
  z-index: 2;
  padding: 48px;
  color: #fff;
}

.login-visual-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.8px;
}

.login-visual-sub { font-size: 16px; color: rgba(255,255,255,0.5); max-width: 340px; line-height: 1.6; }

.login-features { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.login-feature  { display: flex; align-items: center; gap: 14px; }
.login-feature-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.login-feature-text { font-size: 13.5px; color: rgba(255,255,255,0.55); }
.login-feature-text strong { color: rgba(255,255,255,0.85); font-weight: 600; display: block; margin-bottom: 1px; }

.login-panel {
  width: 460px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  border-left: 1px solid var(--border);
}

.login-box { width: 100%; }

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.login-logo .brand-icon { width: 52px; height: 52px; flex: 0 0 52px; }
.login-logo .brand-name { font-size: 20px; }

.login-heading { font-family: 'Montserrat', sans-serif; font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -0.5px; }
.login-sub { font-size: 14px; color: var(--text3); margin-bottom: 32px; }

/* ── Detail Layout ───────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.detail-item .label { font-size: 11px; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 5px; }
.detail-item .value { font-size: 14.5px; color: var(--text); font-weight: 500; }

/* ── Timeline ────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: var(--border2); border-radius: 2px; }

.timeline-item { position: relative; margin-bottom: 22px; }
.timeline-dot { position: absolute; left: -22px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg2); box-shadow: 0 0 8px rgba(79,142,247,0.5); }
.timeline-time { font-size: 11.5px; color: var(--text3); font-weight: 500; margin-bottom: 3px; }
.timeline-body { font-size: 13.5px; color: var(--text); }
.timeline-note { font-size: 12.5px; color: var(--text3); margin-top: 5px; font-style: italic; padding: 6px 10px; background: rgba(255,255,255,0.03); border-radius: 6px; border-left: 2px solid var(--border2); }

/* ── Agent Profile Card ──────────────────────────────────────── */
.agent-profile-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 24px;
}

.agent-cover {
  height: 120px;
  background: linear-gradient(135deg, #1e3a5f, #312e81);
  position: relative;
  overflow: hidden;
}

.agent-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.2; }

.agent-cover-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,58,95,0.8), rgba(49,46,129,0.6)); }

.agent-profile-body { padding: 0 28px 24px; }

.agent-avatar-wrap { margin-top: -28px; margin-bottom: 16px; }

.agent-avatar-lg {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--steel-navy), #2E4160);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
  border: 3px solid var(--bg2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* ── Performance bars ────────────────────────────────────────── */
.perf-bar { margin-bottom: 14px; }
.perf-bar-label { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.perf-bar-label span:first-child { color: var(--text2); font-weight: 500; }
.perf-bar-label span:last-child  { color: var(--text3); font-weight: 600; }
.perf-bar-track { height: 6px; background: rgba(255,255,255,0.06); border-radius: 100px; overflow: hidden; }
.perf-bar-fill  { height: 100%; border-radius: 100px; transition: width 0.8s ease; }
.perf-bar-fill.green  { background: linear-gradient(90deg, var(--green), #6FC79B); }
.perf-bar-fill.red    { background: linear-gradient(90deg, var(--red), #D98980); }
.perf-bar-fill.yellow { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.perf-bar-fill.blue   { background: linear-gradient(90deg, var(--iron), #67759A); }
.perf-bar-fill.purple { background: linear-gradient(90deg, var(--iron), var(--slate)); }

/* ── Grid Layout Helpers ─────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-3-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text3);
}

.empty-state-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}

.empty-state-title { font-size: 16px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.empty-state-sub   { font-size: 13.5px; line-height: 1.6; max-width: 300px; margin: 0 auto; }

/* ── Divider / Separator ─────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Utils ───────────────────────────────────────────────────── */
.text-muted    { color: var(--text3); }
.text-secondary{ color: var(--text2); }
.text-green    { color: var(--green); }
.text-red      { color: var(--red); }
.text-yellow   { color: var(--yellow); }
.text-accent   { color: var(--accent); }
.text-purple   { color: var(--purple); }
.flex          { display: flex; }
.flex-col      { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between{ justify-content: space-between; }
.justify-end   { justify-content: flex-end; }
.gap-8         { gap: 8px; }
.gap-12        { gap: 12px; }
.gap-16        { gap: 16px; }
.gap-20        { gap: 20px; }
.mt-4          { margin-top: 4px; }
.mt-8          { margin-top: 8px; }
.mt-12         { margin-top: 12px; }
.mt-16         { margin-top: 16px; }
.mt-24         { margin-top: 24px; }
.mb-12         { margin-bottom: 12px; }
.mb-16         { margin-bottom: 16px; }
.mb-24         { margin-bottom: 24px; }
.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }
.text-sm       { font-size: 12.5px; }
.text-xs       { font-size: 11.5px; }
.rounded       { border-radius: var(--radius); }
.rounded-lg    { border-radius: var(--radius-lg); }
.w-full        { width: 100%; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ── Alpha LLC wordmark ──────────────────────────────────────────
   Lockup composition, per brand: ALPHA in off-white, LLC in Signal
   Gold, tagline beneath in small letterspaced uppercase. The tagline
   is never rewritten, shortened, or translated. */
.brand-name { font-family: 'Montserrat', sans-serif; letter-spacing: 1.5px; }
.brand-name .llc { color: var(--gold); }
.brand-sub {
  font-family: 'Manrope', sans-serif;
  font-size: 8.5px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--iron);
}
.login-logo .brand-name { letter-spacing: 2px; }
.login-logo .brand-sub { font-size: 9px; letter-spacing: 1.6px; }

/* Raised panels use Steel Navy, the one surface allowed above obsidian. */
.stat-card, .card, .table-wrap, .filter-bar { background: var(--graphite); }
.alert { border-radius: var(--radius); }

/* Gold is spent on the primary action and the active nav item only. */
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--obsidian);
  font-weight: 700;
  border: none;
}
.btn-primary:hover { filter: brightness(1.06); color: var(--obsidian); }
.btn-secondary { background: var(--steel-navy); color: var(--off-white); border: 1px solid var(--border2); }
.btn-secondary:hover { background: #2B3D57; }
.nav-link.active { color: var(--gold); }


/* ── Brand surfaces ──────────────────────────────────────────────
   No photography. The approved Obsidian → Steel Navy gradient carries
   the hero and the sign-in panel instead. */
.hero-banner, .login-visual {
  background: linear-gradient(135deg, var(--obsidian) 0%, #101A2B 55%, var(--steel-navy) 100%);
}
.hero-banner { border: 1px solid var(--border); }
.hero-title { font-family: 'Montserrat', sans-serif; }
.hero-banner img, .login-visual img { display: none; }

/* The tagline is never rewritten or shortened, so it must fit as written. */
.sidebar .brand-sub { font-size: 7.5px; letter-spacing: 0.45px; white-space: nowrap; }

/* One gold element per view: the sign-in button carries it here. */
.login-visual-title { font-family: 'Montserrat', sans-serif; }

/* ── Mobile (phones + small tablets) ─────────────────────────────────
   The sidebar becomes a slide-in drawer behind a hamburger button; tables
   scroll sideways instead of crushing; grids stack. Nothing changes ≥901px. */
.menu-btn { display: none; }

@media (max-width: 900px) {
  .menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--graphite); border: 1px solid var(--border2);
    color: var(--off-white); font-size: 18px; cursor: pointer; flex: 0 0 40px;
  }
  .sidebar {
    transform: translateX(-105%); transition: transform .22s ease;
    width: 82%; max-width: 300px; z-index: 300;
    box-shadow: 8px 0 40px rgba(0,0,0,.55);
  }
  body.nav-open .sidebar { transform: none; }
  .nav-scrim {
    display: none; position: fixed; inset: 0; z-index: 250;
    background: rgba(0,0,0,.55);
  }
  body.nav-open .nav-scrim { display: block; }

  .main { margin-left: 0; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .content { padding: 16px 14px 48px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid-2, .grid-3, .grid-1-2, .grid-3-1 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-header .flex { flex-wrap: wrap; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar .form-input { min-width: 0 !important; flex: 1 1 140px; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 640px; }

  .hero-banner { padding: 20px 16px; }
  .hero-title { font-size: 22px; }
  .dial-phone { font-size: 26px; }
  .login-visual { display: none; }          /* phone shows the sign-in card only */
  .login-panel { width: 100%; }
  .portal { padding: 0 14px 40px; }
  .portal-top { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .outcome-grid { grid-template-columns: 1fr !important; }
}
