:root {
  --bg-dark:       #111111;
  --bg-dark-soft:  #1C1C1C;
  --gold:          #D4AF37;
  --gold-soft:     #F4E5B2;
  --gold-glow:     rgba(212, 175, 55, 0.15);
  --ink:           #111111;
  --ink-soft:      #4A4A4A;
  --ink-muted:     #8A8680;
  --line:          #EAE6DF;
  --bg-card:       #FFFFFF;
  --bg-page:       #FAF9F6;
  --font-display:  'Instrument Serif', Georgia, serif;
  --font-body:     'Manrope', system-ui, sans-serif;
  --radius-lg:     20px;
  --radius-md:     14px;
  --radius-sm:     10px;
  --success:       #1B7F4B;
  --success-bg:    #EEF8F1;
  --danger:        #C0392B;
  --danger-bg:     #FDF1EF;
  --warning-ink:   #8a6d10;
  --info:          #2B6CB0;
  --info-bg:       #EBF4FC;
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;
  --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --sidebar-w:     220px;
  --warning-bg:    #FEF9EC;
  --warning-line:  #F4E5B2;
  --bg:            #FAF8F4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-page);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html, body { height: 100%; overflow: hidden; }

.screen { min-height: 100vh; }

/* LOGIN */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, var(--bg-dark-soft, var(--bg-dark)) 0%, var(--bg-dark) 70%);
  height: 100vh;
  overflow: auto;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 320px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  text-align: center;
}

.login-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  margin-bottom: 14px;
  box-shadow: 0 0 20px var(--gold-glow);
}

.login-title {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--ink);
  margin-bottom: 4px;
}

.login-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.login-card label {
  display: block;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 14px;
  margin-bottom: 5px;
}

.login-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  box-sizing: border-box;
}

.login-card input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.login-card button {
  width: 100%;
  margin-top: 22px;
  padding: 12px;
  background: linear-gradient(135deg, var(--bg-dark-soft, var(--bg-dark)), var(--bg-dark));
  color: var(--gold);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.15s ease;
}

.login-card button:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.login-card button:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

.login-error {
  margin-top: 12px;
  font-size: 12.5px;
  color: #B3261E;
  min-height: 16px;
}

.login-success {
  margin-top: 12px;
  padding: 10px 14px;
  background: #EEF9F0;
  border: 1px solid #C9E9CF;
  border-radius: var(--radius-sm);
  color: #1B7F4B;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}

.login-footer-link {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12.5px;
}

.login-footer-link a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.login-footer-link a:hover { color: #8a6d10; border-color: var(--gold); }

/* =========================================================
   APP LAYOUT — real sidebar + topbar, faithful port of the
   live portal's structure
   ========================================================= */
.app { display: flex; height: 100vh; }
#app-screen { height: 100vh; overflow: hidden; }

/* --- SIDEBAR --- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.sidebar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 30%;
  bottom: 30%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0.3;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
  flex-shrink: 0;
}

.sidebar-brand { min-width: 0; }

.sidebar-brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-sub {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #8a6d10;
  margin-top: 1px;
}

/* --- NAV --- */
.nav-menu {
  padding: 8px 10px 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 10px 8px 6px;
  user-select: none;
}

.nav-group-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 12px 8px 4px;
  user-select: none;
}
.nav-group-label:first-of-type { padding-top: 4px; }

.nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2px;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item:active { transform: scale(0.98); }

.nav-item.active {
  background: var(--gold);
  color: var(--ink);
  box-shadow: none;
}

.nav-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255,255,255,0.45);
}

.nav-item.active .nav-icon { color: #0f0f0f; }

.nav-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255,255,255,0.7);
}

.nav-item.active .nav-label { color: #0f0f0f; font-weight: 600; }

/* --- USER BADGE / FOOTER --- */
.sidebar-footer {
  padding: 10px 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sf-identity {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.sf-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4AF37 0%, #B8941E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  color: #0f0f0f;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.sf-info { min-width: 0; flex: 1; }

.sf-name {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.sf-role {
  color: var(--gold);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 1px;
  display: block;
}

.sf-signout {
  width: 100%;
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
  box-sizing: border-box;
  white-space: nowrap;
}

.sf-signout:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-color: rgba(255,255,255,0.28);
}

.sf-signout svg { flex-shrink: 0; }

/* --- MAIN --- */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* --- TOPBAR --- */
.topbar {
  padding: 24px 40px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-page);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.topbar-title { flex-shrink: 0; }

.mobile-nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 38px; height: 38px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.mobile-sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 999; }
.mobile-sidebar-backdrop.show { display: block; }

/* =========================================================
   MOBILE APP SHELL — below this width, the sidebar becomes a
   slide-in drawer (hidden by default) instead of a permanent
   220px column, which would otherwise eat most of a phone screen.
   ========================================================= */
@media (max-width: 860px) {
  .mobile-nav-toggle { display: flex; }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  }
  .sidebar.open { transform: translateX(0); }

  .topbar { padding: 16px 16px 14px; gap: 12px; }
  .content { padding: 16px !important; }

  .ct-filter-bar, .ph-header, .pc-filter-bar, .rd-filter-bar, .rl-tabs,
  .na-filter-row, .filter-group { flex-wrap: wrap; }

  .ct-kpi-hero, .ph-kpis, .pc-kpis, .rd-kpis, .home-kpis {
    grid-template-columns: 1fr 1fr !important;
  }

  .ct-modal, .ph-modal, .rec-modal, .pc-modal,
  .rd-modal, .na-modal, .set-modal, .dep-modal, .confirm-modal {
    max-width: 94vw !important;
    margin: 0 3vw;
  }
}

@media (max-width: 480px) {
  .ct-kpi-hero, .ph-kpis, .pc-kpis, .rd-kpis, .home-kpis {
    grid-template-columns: 1fr !important;
  }
}


.topbar-eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.topbar h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 1;
}

.topbar-meta {
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  margin-left: auto;
}

/* --- CONTENT --- */
.content { flex: 1; overflow-y: auto; padding: 32px 40px 48px; }

/* HOME DASHBOARD (minimal, proves the data round-trip) */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-dark);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  border-left: 2px solid var(--gold);
}

.kpi-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 30px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 28px 0 14px;
}

.loading, .error-box {
  padding: 40px;
  text-align: center;
  color: var(--ink-muted);
}

.error-box { color: #B3261E; }

/* PRODUCTION MODULE */
.bar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.bar-label {
  width: 150px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  color: var(--ink-soft);
}

.bar-track {
  flex: 1;
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
  height: 26px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: 6px;
  min-width: 2px;
}

.bar-value {
  width: 110px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

/* SIMPLE TABLE (Recruitment / New Agents / Commission) */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 13px;
}

.simple-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-page);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
}

.simple-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.simple-table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--gold-glow);
  color: #8B6914;
}

/* =========================================================
   PRODUCTION MODULE — faithful port of the live portal's CSS
   ========================================================= */
.prod-toggle { display: inline-flex; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 4px; margin-bottom: 24px; gap: 4px; }
.prod-toggle button { border: none; background: none; padding: 9px 20px; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--ink-muted); cursor: pointer; transition: background 0.18s ease, color 0.18s ease; letter-spacing: 0.2px; }
.prod-toggle button.active { background: var(--bg-dark); color: var(--gold); }
.prod-filters { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-muted); }
.month-pills { display: flex; flex-wrap: wrap; gap: 6px; max-width: 640px; }
.pill { border: 1px solid var(--line); background: var(--bg-card); padding: 7px 14px; border-radius: 999px; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all 0.15s ease; }
.pill:hover { border-color: var(--gold); }
.pill.active { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.filter-select { padding: 9px 14px; border: 1px solid var(--line); background: var(--bg-card); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; color: var(--ink); cursor: pointer; min-width: 200px; outline: none; }
.filter-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.prod-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.prod-card { background: var(--bg-dark); color: #fff; border-radius: var(--radius-md); padding: 24px; position: relative; overflow: hidden; }
.prod-card::after { content: ''; position: absolute; top: -30px; right: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--gold); opacity: 0.12; }
.prod-card .pc-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.prod-card .pc-value { font-family: var(--font-display); font-size: 38px; line-height: 1; letter-spacing: -1px; }
.prod-card .pc-sub { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.6); }
.prod-block { margin-bottom: 28px; }
.prod-block-title { font-family: var(--font-display); font-size: 24px; font-weight: 400; letter-spacing: -0.3px; margin-bottom: 16px; }
.trend-chart { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px 24px 16px; }
.lb-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: 8px; transition: border-color 0.15s ease, transform 0.15s ease; }
.lb-row:hover { border-color: var(--gold); transform: translateX(3px); }
.lb-rank { font-family: var(--font-display); font-size: 28px; width: 44px; text-align: center; color: var(--ink-muted); flex-shrink: 0; }
.lb-row.top-1 .lb-rank, .lb-row.top-2 .lb-rank, .lb-row.top-3 .lb-rank { color: var(--gold); }
.lb-row.top-1 { box-shadow: inset 3px 0 0 var(--gold); }
.lb-name { flex: 1; font-weight: 600; font-size: 14.5px; }
.lb-bar-track { width: 200px; flex-shrink: 0; background: rgba(0,0,0,0.04); height: 8px; border-radius: 4px; overflow: hidden; }
.lb-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 4px; }
.lb-value { width: 120px; flex-shrink: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-count { font-size: 11px; color: var(--ink-muted); font-weight: 600; }
.prod-notice { background: rgba(212,175,55,0.1); border: 1px solid var(--gold); border-radius: var(--radius-sm); padding: 10px 16px; font-size: 12.5px; color: #8B6914; margin-bottom: 20px; font-weight: 600; }
.prod-empty { padding: 60px; text-align: center; color: var(--ink-muted); font-style: italic; }
.prod-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.prod-refresh { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--ink); font-family: var(--font-body); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color 0.15s ease; }
.prod-refresh:hover { border-color: var(--gold); }
.prod-refresh.spinning { opacity: 0.6; pointer-events: none; }

/* ---- SNAPSHOT ---- */
.snap-hero { background:#111; border-radius:var(--radius-md); padding:20px 24px; margin-bottom:14px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; }
.snap-hero-stats { display:flex; gap:28px; flex-wrap:wrap; }
.snap-month-pills { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.snap-two-col { display:grid; grid-template-columns:1fr 1.7fr; gap:12px; }
.snap-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; }
.snap-panel-head { padding:13px 16px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; font-size:12.5px; font-weight:600; color:var(--ink); }
.snap-bars { padding:12px 16px; }
.snap-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.snap-bar-label { font-size:12px; color:var(--ink); width:80px; flex-shrink:0; font-weight:500; }
.snap-bar-track { flex:1; height:22px; background:#F5F3EF; border-radius:5px; overflow:hidden; }
.snap-bar-fill { height:100%; background:#D4AF37; border-radius:5px; opacity:0.75; transition:width 0.3s ease; }
.snap-bar-fill.top { background:linear-gradient(90deg,#D4AF37,#B8941E); opacity:1; }
.snap-bar-amt { font-size:11px; font-weight:600; color:var(--ink); width:52px; text-align:right; flex-shrink:0; }
.snap-agent-grid { padding:10px 12px; display:grid; grid-template-columns:repeat(3,1fr); gap:8px; max-height:320px; overflow-y:auto; }
.snap-agent-card { background:#F5F3EF; border-radius:8px; padding:10px 12px; }
.snap-agent-card.zero { background:#FAFAFA; border:1px dashed var(--line); opacity:0.55; }
.snap-agent-name { font-size:11px; font-weight:600; color:var(--ink); margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.snap-agent-total { font-size:14px; font-weight:700; color:var(--ink); line-height:1.2; }
.snap-agent-count { font-size:9.5px; color:var(--ink-muted); margin-top:1px; }
.snap-agent-bar { margin-top:6px; height:3px; background:var(--line); border-radius:2px; overflow:hidden; }

/* ---- 2025 PRODUCTION REPORT ---- */
.p25-kpi-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px; }
.p25-kpi { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:16px 18px; }
.p25-kpi-label { font-size:9px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:6px; }
.p25-kpi-value { font-family:var(--font-display); font-size:24px; color:var(--ink); line-height:1; margin-bottom:4px; }
.p25-kpi-sub { font-size:11px; color:var(--ink-muted); }
.p25-two-col { display:grid; grid-template-columns:1fr 1.5fr; gap:14px; margin-bottom:16px; }
.p25-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; }
.p25-panel-head { padding:13px 16px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; font-size:12.5px; font-weight:600; color:var(--ink); }
.p25-bars { padding:12px 16px; }
.p25-bar-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.p25-bar-row.self .p25-bar-label { color:#D4AF37; font-weight:700; }
.p25-bar-label { font-size:11px; color:var(--ink); width:86px; flex-shrink:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.p25-bar-track { flex:1; height:18px; background:#F5F3EF; border-radius:4px; overflow:hidden; }
.p25-bar-fill { height:100%; background:#D4AF37; border-radius:4px; opacity:0.75; }
.p25-bar-fill.self { background:linear-gradient(90deg,#D4AF37,#B8941E); opacity:1; }
.p25-bar-amt { font-size:10px; font-weight:600; color:var(--ink); width:38px; text-align:right; flex-shrink:0; }
.p25-bar-sep { border-top:1px dashed var(--line); margin:6px 0; }
.p25-top3 { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:10px; }
.p25-self-strip { background:linear-gradient(135deg,#111 0%,#1C1C1C 100%); border-radius:12px; padding:14px 18px; border-left:3px solid #D4AF37; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.p25-all-section { margin-top:4px; }
.p25-all-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; flex-wrap:wrap; gap:10px; }
.p25-search { font-size:13px; padding:8px 14px; border:1px solid var(--line); border-radius:8px; background:var(--bg-card); color:var(--ink); font-family:var(--font-body); width:220px; outline:none; transition:border-color 0.15s; }
.p25-search:focus { border-color:var(--gold); }
.p25-card-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.p25-agent-card { transition:opacity 0.2s ease, transform 0.2s ease; }

/* =========================================================
   DEBT REPORT MODULE — faithful port of the live portal's CSS
   ========================================================= */
  /* ---- DEBT TABS ---- */
  .debt-tab-bar { display:flex; gap:2px; margin-bottom:18px; border-bottom:1px solid var(--line); }
  .debt-disclaimer { font-size:11.5px; color:var(--ink-muted); font-style:italic; margin-bottom:16px; }
  .debt-tab { background:none; border:none; padding:10px 18px; font-family:var(--font-body); font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap; transition:color 0.15s,border-color 0.15s; }
  .debt-tab:hover { color:var(--ink); }
  .debt-tab.active { color:var(--ink); border-bottom-color:var(--gold); }

  /* ---- FILTERS ---- */
  .debt-filters { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; align-items:center; }
  .debt-filter-label { font-size:10px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-muted); }
  .debt-select { font-size:12.5px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:var(--bg-card); color:var(--ink); font-family:var(--font-body); cursor:pointer; }

  /* ---- CURRENT DEBT: by carrier ---- */
  .debt-carrier-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; margin-top:4px; }
  .debt-carrier-card { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:18px 20px; }
  .debt-carrier-name { font-size:11px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:4px; }
  .debt-carrier-date { font-size:11px; color:var(--ink-muted); margin-bottom:14px; }
  .debt-agent-row { display:flex; justify-content:space-between; align-items:center; padding:7px 0; border-bottom:1px solid var(--line); }
  .debt-agent-row:last-child { border-bottom:none; }
  .debt-agent-name { font-size:13px; color:var(--ink); }
  .debt-agent-amt { font-size:13px; font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; }
  .debt-flag { display:inline-block; font-size:9px; font-weight:700; letter-spacing:0.8px; padding:2px 7px; border-radius:10px; text-transform:uppercase; margin-left:6px; }
  .debt-flag.new { background:#FEE2E2; color:#991B1B; }
  .debt-flag.inc { background:#FEF3C7; color:#92400E; }
  .debt-flag.dec { background:#D1FAE5; color:#065F46; }

  /* ---- CURRENT DEBT: by agent profile ---- */
  .debt-profile { max-width:640px; }
  .debt-profile-header { display:flex; align-items:center; gap:14px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--line); }
  .debt-profile-avatar { width:42px; height:42px; border-radius:50%; background:linear-gradient(135deg,#D4AF37,#B8941E); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-size:16px; color:#0f0f0f; font-weight:600; flex-shrink:0; }
  .debt-profile-name { font-family:var(--font-display); font-size:22px; color:var(--ink); }
  .debt-profile-status { font-size:11px; font-weight:700; letter-spacing:1px; padding:3px 10px; border-radius:10px; display:inline-block; margin-top:4px; }
  .debt-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
  .debt-bar-carrier { font-size:12px; color:var(--ink-soft); width:110px; flex-shrink:0; }
  .debt-bar-track { flex:1; height:6px; background:var(--line); border-radius:3px; overflow:hidden; }
  .debt-bar-fill { height:100%; border-radius:3px; background:var(--gold); }
  .debt-bar-fill.new { background:#EF4444; }
  .debt-bar-fill.inc { background:#F59E0B; }
  .debt-bar-fill.dec { background:#10B981; }
  .debt-bar-amt { font-size:12px; font-weight:600; color:var(--ink); width:80px; text-align:right; font-variant-numeric:tabular-nums; flex-shrink:0; }

  /* ---- HISTORY: by agent (Option B cards) ---- */
  .hist-agent-select-wrap { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:18px; }
  .hist-agent-name-header { font-family:var(--font-display); font-size:20px; color:var(--ink); margin-bottom:2px; }
  .hist-agent-sub { font-size:12px; color:var(--ink-muted); margin-bottom:14px; }
  .hist-month-cards { display:flex; flex-direction:column; gap:10px; }
  .hist-month-card { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; }
  .hist-month-card.latest { border:2px solid var(--gold); }
  .hist-weeks-toggle { padding:8px 16px; border-top:1px solid var(--line); font-size:11.5px; font-weight:600; color:#8a6d10; cursor:pointer; user-select:none; transition:background 0.15s ease; }
  .hist-weeks-toggle:hover { background:rgba(212,175,55,0.05); }
  .hist-weeks-body { padding:4px 16px 10px; border-top:1px solid var(--line); }
  .hist-week-row { display:flex; align-items:center; gap:10px; padding:5px 0; font-size:12px; }
  .hist-week-date { color:var(--ink-muted); width:60px; flex-shrink:0; }
  .hist-week-total { color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; width:90px; flex-shrink:0; }
  .hist-week-block { padding:6px 0; border-bottom:1px dashed var(--line); }
  .hist-week-block:last-child { border-bottom:none; }
  .hist-week-carriers { padding-left:0; margin-top:2px; display:flex; flex-wrap:wrap; gap:6px; font-size:11.5px; }
  .hist-gran-toggle { display:flex; gap:2px; background:var(--bg-card); border:1px solid var(--line); border-radius:10px; padding:3px; width:fit-content; margin-bottom:14px; }
  .hist-gran-toggle button { background:none; border:none; padding:7px 16px; font-family:var(--font-body); font-size:12.5px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .hist-gran-toggle button.active { background:#111; color:#D4AF37; }
  .hist-weekly-note { font-size:11px; color:var(--ink-muted); font-style:italic; margin-top:8px; }
  .hist-month-head { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; background:rgba(0,0,0,0.02); border-bottom:1px solid var(--line); flex-wrap:wrap; gap:8px; }
  .hist-month-title { display:flex; align-items:center; gap:8px; }
  .hist-month-label { font-size:13px; font-weight:600; color:var(--ink); }
  .hist-latest-badge { font-size:9.5px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:#8a6d10; background:#FEF3C7; padding:2px 8px; border-radius:20px; }
  .hist-month-right { display:flex; align-items:center; gap:8px; }
  .hist-trend-pill { font-size:11px; font-weight:600; padding:2px 9px; border-radius:20px; }
  .hist-trend-pill.down { color:#065F46; background:#D1FAE5; }
  .hist-trend-pill.up { color:#991B1B; background:#FEE2E2; }
  .hist-trend-pill.same { color:var(--ink-muted); background:var(--line); }
  .hist-month-total { font-size:14px; font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; }
  .hist-month-body { padding:10px 16px; display:flex; flex-wrap:wrap; gap:6px 16px; }
  .hist-carrier-chip { font-size:12px; color:var(--ink-soft); }
  .hist-carrier-chip span { color:var(--ink); font-weight:500; }
  .hist-carrier-chip.zero { color:var(--ink-muted); text-decoration:line-through; }
  .hist-empty { padding:16px; font-size:12.5px; font-style:italic; color:var(--ink-muted); text-align:center; }

  /* ---- HISTORY: by carrier (Option A table) ---- */
  .hist-carrier-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius-md); }
  .hist-carrier-table { width:100%; border-collapse:collapse; font-size:12.5px; }
  .hist-carrier-table th { background:var(--bg-dark); color:#fff; text-align:right; padding:9px 12px; font-size:11px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase; white-space:nowrap; border-right:1px solid rgba(255,255,255,0.06); }
  .hist-carrier-table th:first-child { text-align:left; }
  .hist-carrier-table th:last-child { border-right:none; }
  .hist-carrier-table td { padding:13px 12px; border-bottom:1px solid var(--line); border-right:1px solid var(--line); text-align:right; font-variant-numeric:tabular-nums; color:var(--ink-soft); white-space:nowrap; }
  .hist-carrier-table td:first-child { text-align:left; color:var(--ink); font-weight:500; border-right:1px solid var(--line); }
  .hist-carrier-table td:last-child { border-right:none; font-weight:600; color:var(--ink); }
  .hist-carrier-table tr:last-child td { border-bottom:none; }
  .hist-carrier-table tr:hover td { background:rgba(212,175,55,0.04); }
  .hist-carrier-table td.zero { color:var(--ink-muted); }



/* =========================================================
   HOME MODULE — faithful port of the live portal's CSS
   ========================================================= */

  /* HOME PAGE */
  .home-greeting { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 16px; }
  .home-greeting .hg-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #8a6d10; margin-bottom: 6px; }
  .home-greeting .hg-name { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--ink); margin-bottom: 4px; letter-spacing: -0.6px; }
  .home-greeting .hg-sub { font-size: 13px; color: var(--ink-soft); }
  .home-greeting .hg-refresh { font-size: 11px; color: var(--ink-muted); text-align: right; }

  .home-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
  @media (max-width: 900px) { .home-kpis { grid-template-columns: repeat(2, 1fr); } }
  
  .kpi-card { background: var(--bg-card); border-radius: var(--radius-md); padding: 18px; border-left: 3px solid var(--gold); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .kpi-card.kpi-bad { border-left-color: #C0392B; }
  .kpi-card .kc-label { font-size: 9.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
  .kpi-card .kc-value { font-family: var(--font-display); font-size: 28px; line-height: 1; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.5px; }
  
  /* Twin mini-cards inside one KPI slot */
  .kpi-twin { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-card.kpi-mini { padding: 14px 12px; }
  .kpi-card.kpi-mini .kc-label { font-size: 8.5px; letter-spacing: 1.2px; margin-bottom: 7px; }
  .kpi-card.kpi-mini .kc-value { font-size: 20px; margin-bottom: 6px; letter-spacing: -0.3px; }
  .kpi-card.kpi-mini .kc-sub { font-size: 10.5px; }
  .kpi-card.kpi-mini .kpi-pill { padding: 2px 7px; font-size: 9.5px; }
  .kpi-card .kc-sub { font-size: 11.5px; color: var(--ink-soft); }
  .kpi-card .kc-sub.up { color: #1B7F4B; font-weight: 600; }
  .kpi-card .kc-sub.down { color: #C0392B; font-weight: 600; }
  .kpi-card .kc-sub.muted { color: var(--ink-muted); }
  
  .kpi-card.kpi-rank { background: var(--bg-dark); color: #fff; position: relative; overflow: hidden; }
  .kpi-card.kpi-rank::after { content: ''; position: absolute; top: -22px; right: -22px; width: 70px; height: 70px; border-radius: 50%; background: var(--gold); opacity: 0.15; }
  .kpi-card.kpi-rank .kc-label { color: var(--gold); position: relative; z-index: 1; }
  .kpi-card.kpi-rank .kc-value { color: #fff; position: relative; z-index: 1; font-size: 32px; }
  .kpi-card.kpi-rank .kc-value small { font-family: var(--font-body); font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.6); margin-left: 4px; }
  .kpi-card.kpi-rank .kc-sub { color: rgba(255,255,255,0.7); position: relative; z-index: 1; }
  
  .kpi-pill { display: inline-block; padding: 3px 9px; border-radius: 10px; font-size: 10px; font-weight: 700; }
  .kpi-pill.pill-inc { background: #f8d4d0; color: #A0271C; }
  .kpi-pill.pill-new { background: #f8d4d0; color: #A0271C; }
  .kpi-pill.pill-dec { background: #D4F4DD; color: #1B7F4B; }
  
  .home-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 24px; }
  @media (max-width: 900px) { .home-row { grid-template-columns: 1fr; } }
  
  .home-panel { background: var(--bg-card); border-radius: var(--radius-md); padding: 18px 22px; border: 1px solid var(--line); }
  .home-panel .hp-label { font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 14px; }
  
  .home-bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; }
  .home-bars .hb-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; }
  .home-bars .hb-val { font-size: 9.5px; color: var(--ink); font-weight: 600; white-space: nowrap; }
  .home-bars .hb-val.hb-cur { font-weight: 700; }
  .home-bars .hb-bar { width: 100%; border-radius: 3px 3px 0 0; background: var(--ink); flex-shrink: 0; }
  .home-bars .hb-bar.hb-cur { background: var(--gold); }
  .home-bars .hb-label { font-size: 10px; color: var(--ink-soft); margin-top: auto; }
  .home-bars .hb-label.hb-cur { color: var(--ink); font-weight: 600; }
  
  .home-leaders .leader-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f0eee8; }
  .home-leaders .leader-row:last-child { border-bottom: none; }
  .leader-rank { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
  .leader-rank.lr-1 { background: var(--gold); color: var(--ink); }
  .leader-rank.lr-2 { background: #c5c2b9; color: var(--ink); }
  .leader-rank.lr-3 { background: #cd7f32; color: #fff; }
  .leader-name { flex: 1; font-size: 13px; color: var(--ink); font-weight: 600; }
  .leader-count { font-size: 10.5px; color: var(--ink-muted); font-weight: 400; }
  .leader-amount { font-family: var(--font-display); font-size: 15px; color: var(--ink); }
  
  .rank-window .rw-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
  .rw-row .rw-rank { width: 26px; font-size: 11px; color: var(--ink-soft); font-weight: 600; text-align: center; }
  .rw-row .rw-name { flex: 1; font-size: 12.5px; color: var(--ink-soft); }
  .rw-row .rw-val { font-size: 11px; color: var(--ink-muted); }
  .rank-window .rw-row.rw-self { background: #fbf3d6; border-radius: 8px; border-left: 3px solid var(--gold); padding: 10px 12px; margin: 4px -6px; }
  .rank-window .rw-row.rw-self .rw-rank { font-size: 13px; color: var(--ink); font-weight: 700; }
  .rank-window .rw-row.rw-self .rw-name { font-size: 13px; color: var(--ink); font-weight: 700; }
  .rank-window .rw-row.rw-self .rw-val { font-family: var(--font-display); font-size: 14px; color: var(--ink); }
  .rank-window .rw-empty { padding: 16px; font-style: italic; color: var(--ink-muted); font-size: 12.5px; text-align: center; }
  .rank-window .rw-separator { text-align: center; color: var(--ink-muted); font-size: 16px; letter-spacing: 4px; padding: 6px 0; }
  
  .home-attention { background: var(--bg-card); border-radius: var(--radius-md); padding: 16px 22px; border: 1px solid var(--line); }
  .ha-label { font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
  .ha-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
  .ha-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .ha-dot.dot-warn { background: #E0A800; }
  .ha-dot.dot-bad { background: #C0392B; }
  .ha-dot.dot-info { background: #2D7DD2; }
  .ha-text { flex: 1; font-size: 13px; color: var(--ink); }
  .ha-text strong { font-weight: 700; }
  .ha-link { font-size: 11px; font-weight: 700; color: #8a6d10; cursor: pointer; transition: color 0.15s ease; letter-spacing: 0.4px; }
  .ha-link:hover { color: var(--gold); }
  .ha-empty { padding: 8px 0; font-style: italic; color: var(--ink-muted); font-size: 13px; }


  .ann-strip { display:flex; gap:12px; overflow-x:auto; margin-bottom:18px; padding-bottom:4px; }
  .ann-card { flex:0 0 auto; min-width:260px; max-width:340px; background:linear-gradient(135deg,#111 0%,#1C1C1C 100%); border-radius:var(--radius-md); border-left:3px solid #D4AF37; padding:14px 16px; display:flex; align-items:center; gap:12px; }
  .ann-icon { font-size:26px; flex-shrink:0; width:42px; height:42px; display:flex; align-items:center; justify-content:center; background:rgba(212,175,55,0.12); border-radius:10px; }
  .ann-text { min-width:0; }
  .ann-title { font-size:13px; font-weight:700; color:#fff; line-height:1.3; margin-bottom:2px; }
  .ann-msg { font-size:11.5px; color:rgba(255,255,255,0.55); line-height:1.35; }

  /* Banner-style cards (custom designed graphics) */
  .ann-card-banner { flex-direction:column; align-items:stretch; min-width:320px; max-width:420px; padding:0; border-left:3px solid #D4AF37; overflow:hidden; }
  .ann-banner-img { width:100%; height:auto; display:block; }
  .ann-banner-text { padding:12px 16px; }
  .ann-card-banner .ann-title { margin-bottom:3px; }

  @media (max-width:700px) { .ann-card { min-width:220px; } .ann-card-banner { min-width:260px; } }
  .ann-manage-btn { flex:0 0 auto; align-self:center; background:none; border:1.5px dashed rgba(212,175,55,0.5); color:#D4AF37; border-radius:var(--radius-md); padding:14px 18px; font-size:12.5px; font-weight:700; cursor:pointer; white-space:nowrap; }
  .ann-manage-btn:hover { background:rgba(212,175,55,0.08); }


/* =========================================================
   SYSTEM HEALTH MODULE — faithful port of the live portal's CSS
   ========================================================= */

  .sh-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
  .sh-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .sh-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .sh-refresh-btn { background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:13px; font-weight:700; letter-spacing:0.3px; cursor:pointer; transition:opacity 0.15s; }
  .sh-refresh-btn:hover { opacity:0.9; }
  .sh-refresh-btn:disabled { opacity:0.5; cursor:not-allowed; }

  .sh-summary { display:flex; gap:10px; margin-bottom:18px; }
  .sh-summary-card { flex:1; background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:14px 18px; }
  .sh-summary-card.good { border-color:#A7E3C5; background:#F0FBF5; }
  .sh-summary-card.bad { border-color:#F4B8B0; background:#FDF1EF; }
  .sh-summary-label { font-size:9px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:6px; }
  .sh-summary-value { font-family:var(--font-display); font-size:26px; line-height:1; }
  .sh-summary-card.good .sh-summary-value { color:#1B7F4B; }
  .sh-summary-card.bad .sh-summary-value { color:#C0392B; }

  .sh-list-wrap { border:1px solid var(--line); border-radius:var(--radius-md); background:var(--bg-card); overflow:hidden; }
  .sh-row { display:flex; align-items:center; gap:12px; padding:11px 18px; border-bottom:1px solid var(--line); }
  .sh-row:last-child { border-bottom:none; }
  .sh-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
  .sh-dot.ok { background:#1B7F4B; box-shadow:0 0 0 3px rgba(27,127,75,0.15); }
  .sh-dot.fail { background:#C0392B; box-shadow:0 0 0 3px rgba(192,57,43,0.15); }
  .sh-row-label { font-size:13px; font-weight:600; color:var(--ink); flex:1; }
  .sh-row-meta { font-size:11px; color:var(--ink-muted); }
  .sh-row-error { font-size:11.5px; color:#C0392B; margin-top:2px; }
  .sh-row-main { flex:1; min-width:0; }
  .sh-loading { padding:40px; text-align:center; color:var(--ink-muted); font-size:13px; font-style:italic; }


/* =========================================================
   RACE TO 100 MODULE — faithful port of the live portal's CSS
   (note: .prod-refresh already defined by Production module;
   Race100's own .prod-refresh override below is compatible)
   ========================================================= */

  .r100-hero { background:#0a0a0a; border-radius:var(--radius-md); padding:32px 28px 24px; margin-bottom:18px; text-align:center; position:relative; overflow:hidden; }
  .r100-hero::before { content:''; position:absolute; inset:0; background:radial-gradient(circle at 20% 20%, rgba(212,175,55,0.08) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(212,175,55,0.06) 0%, transparent 50%); }
  .r100-title { font-family:var(--font-display); font-size:32px; color:#D4AF37; letter-spacing:1px; position:relative; z-index:1; }
  .r100-sub { font-size:12px; color:rgba(255,255,255,0.45); margin-top:8px; position:relative; z-index:1; }
  .r100-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:18px; }
  .r100-card { background:#1a1a1a; border-radius:var(--radius-md); overflow:hidden; }
  .r100-card-head { background:#1a1a1a; color:#D4AF37; font-size:11px; font-weight:700; letter-spacing:1px; padding:14px 18px 8px; }
  .r100-card-value { background:#0d0d0d; color:#fff; font-family:var(--font-display); font-size:34px; padding:6px 18px; text-align:right; }
  .r100-card-goal { background:#0d0d0d; color:#555; font-size:11px; padding:4px 18px 8px; }
  .r100-card-pct { background:#0d0d0d; color:#D4AF37; font-size:13px; font-weight:700; padding:0 18px 12px; }
  .r100-bar-wrap { background:#1a1a1a; padding:10px 18px 16px; }
  .r100-bar-track { height:10px; background:#0d0d0d; border-radius:5px; overflow:hidden; }
  .r100-bar-fill { height:100%; background:linear-gradient(90deg,#B8941E,#D4AF37); border-radius:5px; transition:width 0.6s cubic-bezier(0.2,0.9,0.3,1); }
  .r100-footer { background:#0a0a0a; border-radius:var(--radius-md); padding:20px; text-align:center; color:#666; font-style:italic; font-size:13px; }
  .r100-loading-empty { padding:60px; text-align:center; color:var(--ink-muted); font-style:italic; }
  .prod-refresh { font-size:12px; font-weight:600; padding:7px 14px; border-radius:8px; border:1px solid var(--line); background:var(--bg-card); color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); transition:all 0.15s ease; }
  .prod-refresh:hover { border-color:var(--gold); color:var(--ink); }
  @media (max-width:900px) { .r100-cards { grid-template-columns:1fr; } }


/* =========================================================
   BOOK OF BUSINESS MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .bob-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
  .bob-statpills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
  .bob-spill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--bg-card); padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all 0.15s ease; }
  .bob-spill:hover { border-color: var(--gold); }
  .bob-spill.active { background: var(--bg-dark); color: #fff; border-color: var(--bg-dark); }
  .bob-spill .bob-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
  .bob-dot-active { background: #2ECC71; }
  .bob-dot-approved { background: #2D7DD2; }
  .bob-dot-pending { background: #E0A800; }
  .bob-dot-lapse { background: #E8590C; }
  .bob-dot-bad { background: #C0392B; }
  .bob-dot-all { background: var(--gold); }
  .bob-controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
  .bob-search { padding: 9px 14px; border: 1px solid var(--line); background: var(--bg-card); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; color: var(--ink); outline: none; min-width: 220px; }
  .bob-search:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
  .bob-summary { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
  .bob-summary strong { font-family: var(--font-display); font-size: 22px; font-weight: 400; color: var(--ink); letter-spacing: -0.3px; }
  .bob-status-breakdown { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
  .bob-status-breakdown-item { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
  .bob-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg-card); }
  .bob-page-btn { background: none; border: 1px solid var(--line); border-radius: 7px; padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; font-family: var(--font-body); }
  .bob-page-btn:hover:not(:disabled) { background: #FEF9EC; border-color: #D4AF37; }
  .bob-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
  .bob-page-info { font-size: 11.5px; color: var(--ink-muted); }
  .stpill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
  .stpill-active { background: #D4F4DD; color: #1B7F4B; }
  .stpill-approved { background: #D6E8F8; color: #1B5A92; }
  .stpill-pending { background: #FBEFC9; color: #8B6914; }
  .stpill-lapse { background: #FBDCC9; color: #B0480C; }
  .stpill-bad { background: #F8D4D0; color: #A0271C; }
  .bob-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); max-height: calc(100vh - 360px); }
  .bob-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .bob-table thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-dark); color: #fff; text-align: left; padding: 11px 14px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; white-space: nowrap; }
  .bob-table thead th.num { text-align: right; }
  .bob-table tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
  .bob-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
  .bob-table tbody tr:hover td { background: rgba(212,175,55,0.05); }
  .bob-table tbody td.policy { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
  .bob-notes { max-width: 220px; white-space: normal !important; font-size: 12px; color: var(--ink-muted); line-height: 1.4; }
  .bob-edit-cell { width: 52px; text-align: center; padding: 5px 8px !important; }
  .bob-edit-btn { font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 5px; border: none; background: #D4AF37; color: #0f0f0f; cursor: pointer; font-family: var(--font-body); letter-spacing: 0.3px; transition: all 0.15s ease; white-space: nowrap; box-shadow: 0 1px 3px rgba(212,175,55,0.4); }
  .bob-edit-btn:hover { background: #B8941E; transform: scale(1.04); }
  .bob-tip-banner { background: #FEF9EC; border: 1px solid #F4E5B2; border-radius: var(--radius-md); padding: 11px 16px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .bob-tip-banner span { font-size: 12.5px; color: #8a6d10; line-height: 1.5; }
  .bob-tip-dismiss { background: none; border: none; color: #8a6d10; font-size: 13px; cursor: pointer; flex-shrink: 0; padding: 2px 4px; opacity: 0.6; transition: opacity 0.15s ease; }
  .bob-tip-dismiss:hover { opacity: 1; }
  .bob-empty { padding: 50px; text-align: center; color: var(--ink-muted); font-style: italic; }
  .bob-update-note { font-size: 12px; color: #8a6d10; background: #FEF9EC; border: 1px solid #F4E5B2; border-radius: 8px; padding: 8px 14px; margin-bottom: 12px; display: inline-block; }
  .bob-update-note.muted { color: var(--ink-muted); background: var(--bg); border-color: var(--line); font-style: italic; }


/* =========================================================
   COMMISSION DASHBOARD MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .comm-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
  .comm-controls { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
  .comm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
  .comm-card { background: var(--bg-dark); color: #fff; border-radius: var(--radius-md); padding: 24px; position: relative; overflow: hidden; }
  .comm-card::after { content: ''; position: absolute; top: -30px; right: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--gold); opacity: 0.12; }
  .comm-card .cc-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
  .comm-card .cc-value { font-family: var(--font-display); font-size: 34px; line-height: 1; letter-spacing: -1px; }
  .comm-card .cc-sub { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.6); }

  /* ---- COMMISSION TABLE ---- */
  .comm-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); }
  .comm-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
  .comm-table thead tr { background: var(--bg-dark); }
  .comm-table th { padding: 11px 14px; color: rgba(255,255,255,0.75); font-size: 11px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; text-align: left; border-right: 1px solid rgba(255,255,255,0.06); white-space: nowrap; }
  .comm-table th:last-child { border-right: none; }
  .comm-table th.r { text-align: right; }
  .comm-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; }
  .comm-table td:last-child { border-right: none; }
  .comm-table tr:last-child td { border-bottom: none; }
  .comm-table td.name-col { color: var(--ink); font-weight: 500; min-width: 140px; position: sticky; left: 0; background: var(--bg-card); z-index: 1; }
  .comm-table td.r { text-align: right; }
  .comm-table td.amt { color: var(--ink); }
  .comm-table td.empty { color: var(--ink-muted); opacity: 0.4; }
  .comm-table td.total-col { font-weight: 700; color: var(--ink); background: rgba(212,175,55,0.07); }
  .comm-table th.total-col { background: rgba(212,175,55,0.15); color: #D4AF37; }
  .comm-table tr.totals-row td { background: var(--bg-dark); color: #fff; font-weight: 700; position: sticky; bottom: 0; }
  .comm-table tr.totals-row td.name-col { background: var(--bg-dark); color: #D4AF37; }
  .comm-table tr.totals-row td.total-col { background: #1a1a1a; color: #D4AF37; }
  .comm-table tbody tr:hover td { background: rgba(212,175,55,0.04); }
  .comm-table tbody tr:hover td.name-col { background: rgba(212,175,55,0.04); }
  .comm-table tbody tr.totals-row:hover td { background: var(--bg-dark); }


/* =========================================================
   PRESENTATIONS MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .pres-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
  .pres-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .pres-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }

  .pres-add-btn { background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:13px; font-weight:700; letter-spacing:0.3px; cursor:pointer; transition:opacity 0.15s; }
  .pres-add-btn:hover { opacity:0.9; }
  .pres-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; }
  .pres-panel-head { padding:13px 18px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; font-size:12.5px; font-weight:600; color:var(--ink); }
  .pres-search { font-size:12px; padding:6px 12px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--ink); font-family:var(--font-body); width:180px; outline:none; }
  .pres-search:focus { border-color:var(--gold); }

  .pres-log-wrap { display:grid; grid-template-columns:repeat(2, minmax(280px, 1fr)); gap:14px; padding:12px; }
  .pres-pagination { display:flex; align-items:center; justify-content:center; gap:14px; padding:12px 18px; border-top:1px solid var(--line); grid-column:1 / -1; }
  .pres-page-btn { background:none; border:1px solid var(--line); border-radius:7px; padding:6px 14px; font-size:12px; font-weight:600; color:var(--ink); cursor:pointer; font-family:var(--font-body); transition:all 0.15s ease; }
  .pres-page-btn:hover:not(:disabled) { background:#FEF9EC; border-color:#D4AF37; }
  .pres-page-btn:disabled { opacity:0.4; cursor:not-allowed; }
  .pres-page-info { font-size:11.5px; color:var(--ink-muted); }
  .pres-entry { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:15px 17px; }
  .pres-entry-top { display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin-bottom:5px; }
  .pres-entry-name { font-size:13px; font-weight:600; color:var(--ink); }
  .pres-entry-date { font-size:11px; color:var(--ink-muted); white-space:nowrap; }
  .pres-entry-disposition { font-size:12px; color:#8a6d10; font-weight:600; margin-bottom:8px; }
  .pres-entry-meta { font-size:12.5px; color:var(--ink-soft); font-weight:500; margin-bottom:8px; }
  .pres-entry-notes { font-size:12px; color:var(--ink-soft); line-height:1.5; margin-top:6px; padding-top:8px; border-top:1px solid var(--line); }
  .pres-note-line { padding-left:12px; position:relative; margin-bottom:5px; }
  .pres-note-line:last-child { margin-bottom:0; }
  .pres-note-line::before { content:'\2013'; position:absolute; left:0; color:var(--ink-muted); }
  .pres-notes-clamp { max-height:120px; overflow:hidden; }
  .pres-notes-clamp.expanded { max-height:none; }
  .pres-see-more-btn { display:block; margin-top:4px; font-size:11px; font-weight:600; color:var(--gold); cursor:pointer; background:none; border:none; padding:0; }
  .pres-see-more-btn:hover { text-decoration:underline; }
  .pres-entry-archived { opacity:0.55; background:rgba(0,0,0,0.015); }
  .pres-archived-badge { font-size:9px; font-weight:700; letter-spacing:0.6px; text-transform:uppercase; color:#8A8680; background:var(--line); padding:2px 7px; border-radius:10px; margin-left:6px; }
  .pres-entry-actions { display:flex; gap:12px; margin-top:6px; }
  .pres-action-link { background:none; border:none; padding:0; font-size:11px; font-weight:600; color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); }
  .pres-action-link:hover { color:#8a6d10; text-decoration:underline; }
  .pres-action-danger:hover { color:#C0392B; }

  .pres-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .pres-input, .pres-textarea { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; transition:border-color 0.15s; }
  .pres-input:focus, .pres-textarea:focus { border-color:var(--gold); }
  .pres-textarea { min-height:70px; resize:vertical; font-family:var(--font-body); }
  .pres-save-btn { width:100%; background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:11px; font-family:var(--font-body); font-size:13px; font-weight:700; letter-spacing:0.5px; cursor:pointer; margin-top:2px; transition:opacity 0.15s; }
  .pres-save-btn:disabled { opacity:0.5; cursor:not-allowed; }
  .pres-form-msg { font-size:12px; font-weight:600; text-align:center; padding:4px 0; }
  .pres-form-msg.ok { color:#1B7F4B; }
  .pres-form-msg.err { color:#C0392B; }
  .pres-empty { padding:32px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:13px; }

  .pres-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:9000; padding:20px; }
  .pres-modal { background:var(--bg-card); border-radius:14px; max-width:480px; width:100%; box-shadow:0 24px 60px rgba(0,0,0,0.3); }
  .pres-modal-head { padding:18px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
  .pres-modal-title { font-family:var(--font-display); font-size:19px; color:var(--ink); }
  .pres-modal-close { background:none; border:none; font-size:20px; color:var(--ink-muted); cursor:pointer; line-height:1; }
  .pres-modal-body { padding:20px 22px; display:flex; flex-direction:column; gap:10px; }
  .pres-modal-footer { padding:16px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; align-items:center; }
  .pres-btn-secondary { background:none; border:1px solid var(--line); border-radius:8px; padding:9px 18px; font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; }

/* =========================================================
   SHARED CONFIRM MODAL — used by Presentations and other
   modules' delete confirmations
   ========================================================= */
.confirm-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:9999; padding:20px; }
.confirm-modal { background:var(--bg-card); border-radius:var(--radius-lg); max-width:380px; width:100%; box-shadow:0 24px 60px rgba(0,0,0,0.3); padding:24px 24px 20px; }
.confirm-modal-body { font-family:var(--font-body); font-size:14px; color:var(--ink); line-height:1.5; margin-bottom:20px; }
.confirm-modal-footer { display:flex; justify-content:flex-end; gap:10px; }
.confirm-modal-btn-secondary { background:none; border:1px solid var(--line); border-radius:var(--radius-sm); padding:9px 18px; font-family:var(--font-body); font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
.confirm-modal-btn-secondary:hover { background:var(--bg-page); }
.confirm-modal-btn-danger { background:#C0392B; border:none; border-radius:var(--radius-sm); padding:9px 18px; font-family:var(--font-body); font-size:13px; font-weight:700; color:#fff; cursor:pointer; }
.confirm-modal-btn-danger:hover { background:#A5301F; }
.confirm-modal-btn-primary { background:var(--gold); border:none; border-radius:var(--radius-sm); padding:9px 18px; font-family:var(--font-body); font-size:13px; font-weight:700; color:var(--bg-dark); cursor:pointer; }
.confirm-modal-btn-primary:hover { opacity:0.9; }


/* =========================================================
   NEW AGENTS LIST MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .na-header { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; gap:12px; }
  .na-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .na-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .na-sub { font-size:13px; color:var(--ink-muted); margin-top:4px; max-width:480px; }
  .na-add-btn { background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:13px; font-weight:700; cursor:pointer; }

  .na-filter-row { display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap; }
  .na-filter-pill { background:var(--bg-card); border:1px solid var(--line); border-radius:20px; padding:6px 13px; font-size:11.5px; font-weight:600; color:var(--ink-muted); cursor:pointer; white-space:nowrap; }
  .na-search { width:100%; max-width:340px; padding:8px 14px; border:1px solid var(--line); border-radius:8px; font-size:12.5px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); outline:none; }
  .na-search:focus { border-color:#D4AF37; }
  .na-sort-select { padding:8px 12px; border:1px solid var(--line); border-radius:8px; font-size:12px; font-family:var(--font-body); color:var(--ink-soft); background:var(--bg-card); margin-left:auto; }
  .na-pipeline-strip { display:flex; gap:0; background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-lg); margin-bottom:16px; overflow-x:auto; }
  .na-pipeline-item { flex:1; min-width:90px; padding:12px 10px; text-align:center; border-right:1px solid var(--line); }
  .na-pipeline-item:last-child { border-right:none; }
  .na-pipeline-count { display:block; font-family:var(--font-display); font-size:22px; color:var(--ink); line-height:1; }
  .na-pipeline-label { display:block; font-size:9px; font-weight:700; letter-spacing:0.4px; text-transform:uppercase; color:var(--ink-muted); margin-top:4px; line-height:1.3; }
  .na-card-stale { border-color:#F4B8B0; }
  .na-stale-badge { font-size:9px; font-weight:700; letter-spacing:0.6px; text-transform:uppercase; color:#C0392B; background:#FDF1EF; padding:2px 7px; border-radius:10px; margin-left:4px; }
  .na-filter-pill.active { background:#111; color:#D4AF37; border-color:#111; }

  .na-grid { display:grid; grid-template-columns:repeat(2, minmax(320px, 1fr)); gap:10px; }
  .na-card { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:14px 16px; cursor:pointer; transition:border-color .15s; }
  .na-card:hover { border-color:#D4AF37; }
  .na-card-archived { opacity:0.55; background:rgba(0,0,0,0.015); }
  .na-archived-badge { font-size:9px; font-weight:700; letter-spacing:0.6px; text-transform:uppercase; color:#8A8680; background:var(--line); padding:2px 7px; border-radius:10px; margin-left:4px; }
  .na-top { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:8px; gap:10px; }
  .na-name { font-size:14px; font-weight:700; color:var(--ink); }
  .na-date { font-size:10.5px; color:var(--ink-muted); margin-top:2px; }
  .na-status-pill { font-size:10px; font-weight:700; padding:3px 10px; border-radius:20px; white-space:nowrap; flex-shrink:0; }
  .na-status-pill.early { background:#FEF9EC; color:#8a6d10; }
  .na-status-pill.interview { background:#EBF4FC; color:#2B6CB0; }
  .na-status-pill.active { background:#EEF8F1; color:#1B7F4B; }
  .na-status-pill.dead { background:#FDF1EF; color:#C0392B; }
  .na-carriers { font-size:11.5px; color:var(--ink-soft); margin-bottom:8px; line-height:1.5; }
  .na-carriers b { color:var(--ink); font-weight:600; }
  .na-notes { font-size:11.5px; color:var(--ink-muted); font-style:italic; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-bottom:9px; }
  .na-empty { padding:40px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:13px; }

  .na-milestone-track { display:flex; gap:4px; align-items:center; }
  .na-milestone-dot { width:8px; height:8px; border-radius:50%; background:var(--line); flex-shrink:0; }
  .na-milestone-dot.hit { background:#D4AF37; }

  .na-drawer-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.4); display:none; align-items:flex-start; justify-content:flex-end; z-index:6000; }
  .na-drawer-overlay.open { display:flex; }
  .na-drawer { background:var(--bg-card); width:420px; max-width:94vw; height:100%; box-shadow:-8px 0 30px rgba(0,0,0,0.15); overflow-y:auto; }
  .na-drawer-head { padding:20px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; background:var(--bg-card); }
  .na-drawer-title { font-family:var(--font-display); font-size:22px; color:var(--ink); }
  .na-drawer-close { background:none; border:none; font-size:18px; color:var(--ink-muted); cursor:pointer; }
  .na-drawer-section { padding:16px 22px; border-bottom:1px solid var(--line); }
  .na-drawer-section h4 { font-size:10.5px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:10px; }
  .na-drawer-kv { display:flex; justify-content:space-between; align-items:center; font-size:13px; margin-bottom:9px; gap:10px; }
  .na-drawer-kv .l { color:var(--ink-muted); flex-shrink:0; }
  .na-drawer-kv .v { font-weight:600; text-align:right; }
  .na-reveal-btn { background:none; border:1px solid var(--line); border-radius:6px; padding:3px 9px; font-size:10.5px; font-weight:600; color:var(--ink-soft); cursor:pointer; }
  .na-edit-btn { background:#D4AF37; border:none; border-radius:7px; padding:7px 16px; font-size:12px; font-weight:700; color:#0f0f0f; cursor:pointer; }
  .na-delete-link { background:none; border:none; font-size:11px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .na-delete-link:hover { color:#C0392B; text-decoration:underline; }

  .na-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:7000; padding:20px; }
  .na-modal { background:var(--bg-card); border-radius:14px; max-width:520px; width:100%; max-height:88vh; overflow-y:auto; box-shadow:0 24px 60px rgba(0,0,0,0.3); }
  .na-modal-head { padding:18px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
  .na-modal-title { font-family:var(--font-display); font-size:19px; color:var(--ink); }
  .na-modal-close { background:none; border:none; font-size:20px; color:var(--ink-muted); cursor:pointer; }
  .na-modal-body { padding:20px 22px; }
  .na-field { margin-bottom:12px; }
  .na-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .na-field label .req { color:#C0392B; }
  .na-input { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; }
  .na-input:focus { border-color:var(--gold); }
  .na-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .na-milestone-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .na-modal-footer { padding:16px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; align-items:center; }
  .na-form-msg { font-size:12px; font-weight:600; flex:1; }
  .na-form-msg.err { color:#C0392B; }
  .na-btn-secondary { background:none; border:1px solid var(--line); border-radius:8px; padding:9px 18px; font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .na-btn-primary { background:#D4AF37; border:none; border-radius:8px; padding:9px 20px; font-size:13px; font-weight:700; color:#0f0f0f; cursor:pointer; }
  .na-btn-primary:disabled { opacity:0.5; cursor:not-allowed; }


/* =========================================================
   RECRUITMENT MODULE — faithful port of the live portal's CSS
   (contains some intentional duplicate rules within the original
   file itself — harmless, CSS cascade just uses the last one)
   ========================================================= */
  .rec-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
  .rec-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .rec-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .rec-filters { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
  .rec-pill { font-size:11.5px; font-weight:600; padding:6px 16px; border-radius:20px; border:1px solid var(--line); background:var(--bg-card); color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); transition:all 0.15s ease; }
  .rec-pill.active { background:#D4AF37; color:#0f0f0f; border-color:#D4AF37; }
  .rec-month-select { font-size:12px; padding:6px 10px; border:1px solid var(--line); border-radius:20px; background:var(--bg-card); color:var(--ink); font-family:var(--font-body); cursor:pointer; }

  /* KPI rows */
  .rec-kpis { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:10px; }
  .rec-kpi { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:14px 16px; }
  .rec-kpi.gold { background:#111; border-color:#111; }
  .rec-kpi .kl { font-size:9px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:6px; }
  .rec-kpi.gold .kl { color:#8a6d10; }
  .rec-kpi .kv { font-family:var(--font-display); font-size:28px; color:var(--ink); line-height:1; }
  .rec-kpi.gold .kv { color:#D4AF37; }

  .rec-rates { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:18px; }
  .rec-rate { background:#FEF9EC; border:1px solid #F4E5B2; border-radius:var(--radius-md); padding:12px 16px; display:flex; align-items:center; justify-content:space-between; }
  .rec-rate-label { font-size:9px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:#8a6d10; margin-bottom:3px; }
  .rec-rate-sub { font-size:11px; color:#8a6d10; }
  .rec-rate-val { font-family:var(--font-display); font-size:30px; color:#B8941E; line-height:1; }

  /* Two col */
  .rec-two-col { display:grid; grid-template-columns:1.6fr 1fr; gap:14px; }
  .rec-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; }
  .rec-panel-head { padding:13px 18px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
  .rec-panel-title { font-size:12.5px; font-weight:600; color:var(--ink); }
  .rec-legend { display:flex; align-items:center; gap:14px; }
  .rec-legend-item { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--ink-muted); }
  .rec-legend-dot { width:10px; height:10px; border-radius:2px; }

  /* Form */
  .rec-form { padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
  .rec-form-sub { font-size:11px; color:var(--ink-muted); }
  .rec-field-group { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .rec-computed-preview { display:flex; gap:10px; background:#FEF9EC; border:1px solid #F4E5B2; border-radius:8px; padding:10px 14px; margin:10px 0; }
  .rec-computed-item { flex:1; text-align:center; }
  .rec-computed-item span { display:block; font-size:9.5px; font-weight:700; letter-spacing:0.8px; text-transform:uppercase; color:#8a6d10; margin-bottom:3px; }
  .rec-computed-item b { font-size:17px; color:#8a6d10; font-family:var(--font-display); }
  .rec-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .rec-input { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; transition:border-color 0.15s; }
  .rec-input:focus { border-color:var(--gold); }
  .rec-save-btn { width:100%; background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:11px; font-family:var(--font-body); font-size:13px; font-weight:700; letter-spacing:0.5px; cursor:pointer; margin-top:2px; transition:opacity 0.15s; }
  .rec-save-btn:disabled { opacity:0.5; cursor:not-allowed; }
  .rec-form-msg { font-size:12px; font-weight:600; text-align:center; padding:4px 0; }
  .rec-form-msg.ok { color:#1B7F4B; }
  .rec-form-msg.err { color:#C0392B; }

  .rec-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:9000; padding:20px; }
  .rec-modal { background:var(--bg-card); border-radius:14px; max-width:440px; width:100%; box-shadow:0 24px 60px rgba(0,0,0,0.3); }
  .rec-modal-head { padding:18px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
  .rec-modal-title { font-family:var(--font-display); font-size:19px; color:var(--ink); }
  .rec-modal-close { background:none; border:none; font-size:20px; color:var(--ink-muted); cursor:pointer; line-height:1; }
  .rec-modal-body { padding:20px 22px; }
  .rec-modal-footer { padding:16px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; align-items:center; }
  .rec-btn-secondary { background:none; border:1px solid var(--line); border-radius:8px; padding:9px 18px; font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .prod-toggle { display:flex; gap:2px; background:var(--bg-card); border:1px solid var(--line); border-radius:10px; padding:3px; width:fit-content; }
  .prod-toggle button { background:none; border:none; padding:7px 16px; font-family:var(--font-body); font-size:12.5px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .prod-toggle button.active { background:#111; color:#D4AF37; }
  .rec-appt-header { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; gap:12px; }
  .rec-appt-add-btn { background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:13px; font-weight:700; cursor:pointer; }
  .rec-appt-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--bg-card); }
  .rec-appt-table { width:100%; border-collapse:collapse; font-size:12.5px; }
  .rec-appt-table thead tr { background:var(--bg-dark); }
  .rec-appt-table th { padding:10px 14px; color:rgba(255,255,255,0.75); font-size:10.5px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase; text-align:left; white-space:nowrap; }
  .rec-appt-table td { padding:9px 14px; border-bottom:1px solid var(--line); white-space:nowrap; }
  .rec-appt-table tr:hover td { background:rgba(212,175,55,0.04); cursor:pointer; }
  .rec-appt-table tr:last-child td { border-bottom:none; }
  .rec-appt-empty { padding:40px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:13px; }
  .rec-appt-delete-btn { background:none; border:none; padding:0; font-size:11px; font-weight:600; color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); }
  .rec-appt-delete-btn:hover { color:#C0392B; text-decoration:underline; }
  .rec-field { margin-bottom:12px; }
  .rec-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .rec-field label .req { color:#C0392B; }
  .rec-input { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; }
  .rec-input:focus { border-color:var(--gold); }
  .rec-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .rec-btn-primary { background:#D4AF37; border:none; border-radius:8px; padding:9px 20px; font-size:13px; font-weight:700; color:#0f0f0f; cursor:pointer; }
  .rec-btn-primary:disabled { opacity:0.5; cursor:not-allowed; }
  .rec-form-msg { font-size:12px; font-weight:600; flex:1; }
  .rec-form-msg.err { color:#C0392B; }


/* =========================================================
   RECRUITMENT MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .rec-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
  .rec-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .rec-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .rec-filters { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
  .rec-pill { font-size:11.5px; font-weight:600; padding:6px 16px; border-radius:20px; border:1px solid var(--line); background:var(--bg-card); color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); transition:all 0.15s ease; }
  .rec-pill.active { background:#D4AF37; color:#0f0f0f; border-color:#D4AF37; }
  .rec-month-select { font-size:12px; padding:6px 10px; border:1px solid var(--line); border-radius:20px; background:var(--bg-card); color:var(--ink); font-family:var(--font-body); cursor:pointer; }

  /* KPI rows */
  .rec-kpis { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:10px; }
  .rec-kpi { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:14px 16px; }
  .rec-kpi.gold { background:#111; border-color:#111; }
  .rec-kpi .kl { font-size:9px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:6px; }
  .rec-kpi.gold .kl { color:#8a6d10; }
  .rec-kpi .kv { font-family:var(--font-display); font-size:28px; color:var(--ink); line-height:1; }
  .rec-kpi.gold .kv { color:#D4AF37; }

  .rec-rates { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:18px; }
  .rec-rate { background:#FEF9EC; border:1px solid #F4E5B2; border-radius:var(--radius-md); padding:12px 16px; display:flex; align-items:center; justify-content:space-between; }
  .rec-rate-label { font-size:9px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:#8a6d10; margin-bottom:3px; }
  .rec-rate-sub { font-size:11px; color:#8a6d10; }
  .rec-rate-val { font-family:var(--font-display); font-size:30px; color:#B8941E; line-height:1; }

  /* Two col */
  .rec-two-col { display:grid; grid-template-columns:1.6fr 1fr; gap:14px; }
  .rec-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; }
  .rec-panel-head { padding:13px 18px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
  .rec-panel-title { font-size:12.5px; font-weight:600; color:var(--ink); }
  .rec-legend { display:flex; align-items:center; gap:14px; }
  .rec-legend-item { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--ink-muted); }
  .rec-legend-dot { width:10px; height:10px; border-radius:2px; }

  /* Form */
  .rec-form { padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
  .rec-form-sub { font-size:11px; color:var(--ink-muted); }
  .rec-field-group { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .rec-computed-preview { display:flex; gap:10px; background:#FEF9EC; border:1px solid #F4E5B2; border-radius:8px; padding:10px 14px; margin:10px 0; }
  .rec-computed-item { flex:1; text-align:center; }
  .rec-computed-item span { display:block; font-size:9.5px; font-weight:700; letter-spacing:0.8px; text-transform:uppercase; color:#8a6d10; margin-bottom:3px; }
  .rec-computed-item b { font-size:17px; color:#8a6d10; font-family:var(--font-display); }
  .rec-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .rec-input { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; transition:border-color 0.15s; }
  .rec-input:focus { border-color:var(--gold); }
  .rec-save-btn { width:100%; background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:11px; font-family:var(--font-body); font-size:13px; font-weight:700; letter-spacing:0.5px; cursor:pointer; margin-top:2px; transition:opacity 0.15s; }
  .rec-save-btn:disabled { opacity:0.5; cursor:not-allowed; }
  .rec-form-msg { font-size:12px; font-weight:600; text-align:center; padding:4px 0; }
  .rec-form-msg.ok { color:#1B7F4B; }
  .rec-form-msg.err { color:#C0392B; }

  .rec-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:9000; padding:20px; }
  .rec-modal { background:var(--bg-card); border-radius:14px; max-width:440px; width:100%; box-shadow:0 24px 60px rgba(0,0,0,0.3); }
  .rec-modal-head { padding:18px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
  .rec-modal-title { font-family:var(--font-display); font-size:19px; color:var(--ink); }
  .rec-modal-close { background:none; border:none; font-size:20px; color:var(--ink-muted); cursor:pointer; line-height:1; }
  .rec-modal-body { padding:20px 22px; }
  .rec-modal-footer { padding:16px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; align-items:center; }
  .rec-btn-secondary { background:none; border:1px solid var(--line); border-radius:8px; padding:9px 18px; font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .prod-toggle { display:flex; gap:2px; background:var(--bg-card); border:1px solid var(--line); border-radius:10px; padding:3px; width:fit-content; }
  .prod-toggle button { background:none; border:none; padding:7px 16px; font-family:var(--font-body); font-size:12.5px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .prod-toggle button.active { background:#111; color:#D4AF37; }
  .rec-appt-header { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; gap:12px; }
  .rec-appt-add-btn { background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:13px; font-weight:700; cursor:pointer; }
  .rec-appt-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--bg-card); }
  .rec-appt-table { width:100%; border-collapse:collapse; font-size:12.5px; }
  .rec-appt-table thead tr { background:var(--bg-dark); }
  .rec-appt-table th { padding:10px 14px; color:rgba(255,255,255,0.75); font-size:10.5px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase; text-align:left; white-space:nowrap; }
  .rec-appt-table td { padding:9px 14px; border-bottom:1px solid var(--line); white-space:nowrap; }
  .rec-appt-table tr:hover td { background:rgba(212,175,55,0.04); cursor:pointer; }
  .rec-appt-table tr:last-child td { border-bottom:none; }
  .rec-appt-empty { padding:40px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:13px; }
  .rec-appt-delete-btn { background:none; border:none; padding:0; font-size:11px; font-weight:600; color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); }
  .rec-appt-delete-btn:hover { color:#C0392B; text-decoration:underline; }
  .rec-field { margin-bottom:12px; }
  .rec-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .rec-field label .req { color:#C0392B; }
  .rec-input { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; }
  .rec-input:focus { border-color:var(--gold); }
  .rec-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .rec-btn-primary { background:#D4AF37; border:none; border-radius:8px; padding:9px 20px; font-size:13px; font-weight:700; color:#0f0f0f; cursor:pointer; }
  .rec-btn-primary:disabled { opacity:0.5; cursor:not-allowed; }
  .rec-form-msg { font-size:12px; font-weight:600; flex:1; }
  .rec-form-msg.err { color:#C0392B; }


/* =========================================================
   PURCHASE HISTORY MODULE — faithful port of the live portal's CSS
   (covers Purchase History, Leads ROI, and Business Expenses)
   ========================================================= */
  .ph-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
  .ph-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .ph-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .ph-add-btn { background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:13px; font-weight:700; letter-spacing:0.3px; cursor:pointer; transition:opacity 0.15s; }
  .ph-add-btn:hover { opacity:0.9; }

  .ph-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px; }
  .ph-kpi { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:14px 16px; }
  .ph-kpi .kl { font-size:9px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:6px; }
  .ph-kpi .kv { font-family:var(--font-display); font-size:24px; color:var(--ink); line-height:1; }

  .ph-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--bg-card); }
  .ph-table { width:100%; border-collapse:collapse; font-size:12.5px; }
  .ph-table thead tr { background:var(--bg-dark); }
  .ph-table th { padding:10px 14px; color:rgba(255,255,255,0.75); font-size:10.5px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase; text-align:left; white-space:nowrap; }
  .ph-table th.r { text-align:right; }
  .ph-table td { padding:9px 14px; border-bottom:1px solid var(--line); white-space:nowrap; }
  .ph-table td.r { text-align:right; font-variant-numeric:tabular-nums; }
  .ph-table tr:hover td { background:rgba(212,175,55,0.04); cursor:pointer; }
  .ph-table tr:last-child td { border-bottom:none; }
  .ph-empty { padding:40px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:13px; }

  .rl-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px; }
  .rl-card { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:14px 16px; display:flex; gap:12px; align-items:flex-start; }
  .rl-card-icon { font-size:22px; line-height:1; flex-shrink:0; }
  .rl-card-body { flex:1; min-width:0; }
  .rl-card-title { font-size:13px; font-weight:700; color:var(--ink); margin-bottom:2px; word-break:break-word; }
  .rl-shared-badge { display:inline-block; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:0.3px; color:var(--gold); border:1px solid var(--gold); border-radius:8px; padding:1px 6px; margin-left:6px; vertical-align:middle; }
  .rl-tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:14px; flex-wrap:wrap; }
  .rl-tab { background:none; border:none; padding:10px 4px; margin-right:22px; font-size:13.5px; font-weight:700; color:var(--ink-muted); cursor:pointer; border-bottom:2px solid transparent; }
  .rl-tab.active { color:var(--ink); border-bottom-color:var(--gold); }
  .rl-card-cat { font-size:10.5px; font-weight:600; color:var(--gold); text-transform:uppercase; letter-spacing:0.3px; margin-bottom:4px; }
  .rl-card-desc { font-size:12px; color:var(--ink-soft); margin-bottom:6px; }
  .rl-card-meta { font-size:10.5px; color:var(--ink-muted); }
  .rl-card-actions { display:flex; flex-direction:column; gap:4px; flex-shrink:0; }

  .rl-view-toggle { display:flex; border:1px solid var(--line); border-radius:7px; overflow:hidden; }
  .rl-view-toggle button { background:var(--bg-card); border:none; padding:6px 9px; font-size:13px; color:var(--ink-muted); cursor:pointer; line-height:1; }
  .rl-view-toggle button + button { border-left:1px solid var(--line); }
  .rl-view-toggle button.active { background:var(--gold); color:var(--bg-dark); }

  .rl-list { display:flex; flex-direction:column; border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; background:var(--bg-card); }
  .rl-list-row { display:flex; align-items:center; gap:12px; padding:10px 14px; border-bottom:1px solid var(--line); }
  .rl-list-row:last-child { border-bottom:none; }
  .rl-list-row:hover { background:rgba(212,175,55,0.04); }
  .rl-list-icon { font-size:17px; line-height:1; flex-shrink:0; width:20px; text-align:center; }
  .rl-list-main { flex:1; min-width:0; }
  .rl-list-title { font-size:12.5px; font-weight:700; color:var(--ink); }
  .rl-list-meta { font-size:10.5px; color:var(--ink-muted); margin-top:1px; }

  .rl-action-menu { position:absolute; z-index:9500; background:var(--bg-card); border:1px solid var(--line); border-radius:8px; box-shadow:0 6px 20px rgba(0,0,0,0.15); padding:4px; min-width:150px; display:flex; flex-direction:column; }
  .rl-action-menu button { background:none; border:none; text-align:left; padding:8px 10px; font-size:12.5px; color:var(--ink); cursor:pointer; border-radius:5px; white-space:nowrap; }
  .rl-action-menu button:hover { background:rgba(212,175,55,0.1); }
  .rl-action-menu button.danger { color:#C0392B; }
  .rl-action-menu button.danger:hover { background:rgba(192,57,43,0.08); }

  .ph-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; margin-bottom:14px; }
  .ph-panel-head { padding:13px 18px; border-bottom:1px solid var(--line); font-size:12.5px; font-weight:600; color:var(--ink); }
  .ph-vendor-roi-note { background:var(--bg-subtle, #F0EBDD); border-radius:8px; padding:10px 14px; font-size:11px; color:var(--ink-soft); margin-bottom:14px; }
  .ph-roi-pos { color:#1B7F4B; font-weight:600; }
  .ph-roi-neg { color:#C0392B; font-weight:600; }

  .ph-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:9000; padding:20px; }
  .ph-modal { background:var(--bg-card); border-radius:14px; max-width:520px; width:100%; max-height:88vh; overflow-y:auto; box-shadow:0 24px 60px rgba(0,0,0,0.3); }
  .ph-modal-head { padding:18px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
  .ph-modal-title { font-family:var(--font-display); font-size:19px; color:var(--ink); }
  .ph-modal-close { background:none; border:none; font-size:20px; color:var(--ink-muted); cursor:pointer; line-height:1; }
  .ph-modal-body { padding:20px 22px; }
  .ph-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .ph-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .ph-field label .req { color:#C0392B; }
  .ph-input { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; transition:border-color 0.15s; }
  .ph-input:focus { border-color:var(--gold); }
  .ph-modal-footer { padding:16px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; align-items:center; }
  .ph-form-msg { font-size:12px; font-weight:600; flex:1; }
  .ph-form-msg.ok { color:#1B7F4B; }
  .ph-form-msg.err { color:#C0392B; }
  .ph-btn-secondary { background:none; border:1px solid var(--line); border-radius:8px; padding:9px 18px; font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .ph-btn-primary { background:#D4AF37; border:none; border-radius:8px; padding:9px 20px; font-size:13px; font-weight:700; color:#0f0f0f; cursor:pointer; }
  .ph-btn-primary:disabled { opacity:0.5; cursor:not-allowed; }
  .prod-toggle { display:flex; gap:2px; background:var(--bg-card); border:1px solid var(--line); border-radius:10px; padding:3px; width:fit-content; }
  .prod-toggle button { background:none; border:none; padding:7px 16px; font-family:var(--font-body); font-size:12.5px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .prod-toggle button.active { background:#111; color:#D4AF37; }
  .be-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--bg-card); }
  .be-table { width:100%; border-collapse:collapse; font-size:12.5px; table-layout:fixed; }
  .be-table thead tr { background:var(--bg-dark); }
  .be-table th { padding:10px 14px; color:rgba(255,255,255,0.75); font-size:10.5px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase; text-align:left; white-space:nowrap; }
  .be-table th.r { text-align:right; }
  .be-table td { padding:9px 14px; border-bottom:1px solid var(--line); white-space:nowrap; }
  .be-table td.r { text-align:right; font-variant-numeric:tabular-nums; }
  .be-table tr:hover td { background:rgba(212,175,55,0.04); cursor:pointer; }
  .be-table tr:last-child td { border-bottom:none; }


/* =========================================================
   CLIENT TRACKER MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .ct-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
  .ct-filter-bar { display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; align-items:center; }
  .ct-filter-bar select.ct-select { width: auto; flex: 0 0 auto; min-width: 130px; }
  .ct-filter-label { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--ink-muted); font-weight:600; white-space:nowrap; }
  .ct-search { flex:1; min-width:220px; padding:8px 14px; border:1px solid var(--line); border-radius:8px; font-size:12.5px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); outline:none; }
  .ct-search:focus { border-color:var(--gold); }
  .ct-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .ct-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .ct-add-btn { background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:13px; font-weight:700; letter-spacing:0.3px; cursor:pointer; transition:opacity 0.15s; }
  .ct-add-btn:hover { opacity:0.9; }

  .ct-missing-banner { background:#FEF3C7; border:1px solid #F4D88A; border-radius:var(--radius-md); padding:10px 16px; margin-bottom:14px; font-size:12.5px; color:#92400E; cursor:pointer; display:flex; align-items:center; gap:8px; }
  .ct-missing-banner:hover { background:#FCE9AE; }
  .ct-missing-banner.active { background:#92400E; color:#fff; border-color:#92400E; }

  .ct-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--bg-card); }
  .ct-table { width:100%; border-collapse:collapse; font-size:12.5px; }
  .ct-table thead tr { background:var(--bg-dark); }
  .ct-table th { padding:10px 14px; color:rgba(255,255,255,0.75); font-size:10.5px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase; text-align:left; white-space:nowrap; }
  .ct-table th.r { text-align:right; }
  .ct-table td { padding:14px 16px; border-bottom:1px solid var(--line); white-space:nowrap; }
  .ct-table td.r { text-align:right; font-variant-numeric:tabular-nums; }
  .ct-table tr:hover td { background:rgba(212,175,55,0.04); cursor:pointer; }
  .ct-table tr:last-child td { border-bottom:none; }
  .ct-no-date { color:#C0392B; font-style:italic; font-size:11.5px; }
  .ct-status-pill { font-size:10.5px; font-weight:600; padding:4px 10px; border-radius:100px; white-space:nowrap; }
  .ct-status-pill.paid { background:#D1FAE5; color:#065F46; }
  .ct-status-pill.approved { background:#DBEAFE; color:#1E40AF; }
  .ct-status-pill.pending { background:#FEF3C7; color:#92400E; }
  .ct-status-pill.declined { background:#FEE2E2; color:#991B1B; }
  .ct-status-pill.other { background:var(--line); color:var(--ink-muted); }
  .be-cat-pill { font-size:10.5px; font-weight:600; padding:4px 10px; border-radius:100px; white-space:nowrap; display:inline-block; }
  .be-cat-pill.debt { background:#FEE2E2; color:#991B1B; }
  .be-cat-pill.systems { background:#DBEAFE; color:#1E40AF; }
  .be-cat-pill.salary { background:#EDE9FE; color:#5B21B6; }
  .be-cat-pill.licensing { background:#CCFBF1; color:#115E59; }
  .be-cat-pill.marketing { background:#FCE7F3; color:#9D174D; }
  .be-cat-pill.office { background:#FEF3C7; color:#92400E; }
  .be-cat-pill.professional { background:#E0E7FF; color:#3730A3; }
  .be-cat-pill.travel { background:#D1FAE5; color:#065F46; }
  .be-cat-pill.other { background:var(--line); color:var(--ink-muted); }
  .be-cat-pill.uncat { background:none; border:1px dashed var(--line); color:var(--ink-muted); }

  .ct-empty { padding:40px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:13px; }

  /* Modal (Add / Edit) */
  .ct-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:9000; padding:20px; }
  .ct-modal { background:var(--bg-card); border-radius:14px; max-width:640px; width:100%; max-height:88vh; overflow-y:auto; box-shadow:0 24px 60px rgba(0,0,0,0.3); }
  .ct-modal-head { padding:18px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
  .ct-modal-title { font-family:var(--font-display); font-size:19px; color:var(--ink); }
  .ct-modal-close { background:none; border:none; font-size:20px; color:var(--ink-muted); cursor:pointer; line-height:1; }
  .ct-modal-body { padding:20px 22px; }
  .ct-section-label { font-size:10px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:#8a6d10; margin:16px 0 10px; }
  .ct-section-label:first-child { margin-top:0; }
  .ct-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .ct-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .ct-field label .req { color:#C0392B; }
  .ct-input, .ct-select, .ct-textarea { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; transition:border-color 0.15s; }
  .ct-input:focus, .ct-select:focus, .ct-textarea:focus { border-color:var(--gold); }
  .ct-textarea { min-height:60px; resize:vertical; grid-column:1 / -1; }
  .ct-field.full { grid-column:1 / -1; }
  .ct-modal-footer { padding:16px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; align-items:center; }
  .ct-form-msg { font-size:12px; font-weight:600; flex:1; }
  .ct-form-msg.ok { color:#1B7F4B; }
  .ct-form-msg.err { color:#C0392B; }
  .ct-btn-secondary { background:none; border:1px solid var(--line); border-radius:8px; padding:9px 18px; font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .ct-btn-primary { background:#D4AF37; border:none; border-radius:8px; padding:9px 20px; font-size:13px; font-weight:700; color:#0f0f0f; cursor:pointer; }
  .ct-btn-primary:disabled { opacity:0.5; cursor:not-allowed; }


/* =========================================================
   COMMISSION PROJECTOR MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .proj-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
  .proj-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .proj-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .proj-sub { font-size:12px; color:var(--ink-muted); margin-top:2px; }

  .proj-row { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:18px 20px; margin-bottom:12px; position:relative; }
  .proj-row-num { position:absolute; top:14px; right:16px; font-size:10px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:var(--ink-muted); }
  .proj-fields { display:grid; grid-template-columns:1.3fr 1.3fr 1fr 1fr; gap:10px; margin-bottom:14px; }
  .proj-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:6px; }
  .proj-select, .proj-input { width:100%; padding:9px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; transition:border-color 0.15s; }
  .proj-select:focus, .proj-input:focus { border-color:var(--gold); }

  .proj-result { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; padding-top:14px; border-top:1px solid var(--line); }
  .proj-result-item { text-align:center; }
  .proj-result-label { font-size:9px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:4px; }
  .proj-result-value { font-family:var(--font-display); font-size:20px; color:var(--ink); }
  .proj-result-value.gold { color:#B8941E; }
  .proj-result-value.muted { color:var(--ink-muted); font-size:14px; font-family:var(--font-body); font-style:italic; }

  .proj-remove-btn { position:absolute; top:14px; right:16px; background:none; border:none; color:var(--ink-muted); cursor:pointer; font-size:11px; font-weight:600; }
  .proj-remove-btn:hover { color:#C0392B; }

  .proj-add-btn { font-size:12.5px; font-weight:600; padding:9px 18px; border-radius:8px; border:1px dashed var(--line); background:var(--bg-card); color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); transition:all 0.15s ease; margin-bottom:16px; }
  .proj-add-btn:hover { border-color:#D4AF37; color:var(--ink); border-style:solid; }

  .proj-total-bar { background:#111; border-radius:var(--radius-md); padding:18px 22px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
  .proj-total-label { font-size:11px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:rgba(255,255,255,0.5); }
  .proj-total-value { font-family:var(--font-display); font-size:30px; color:#D4AF37; }
  .proj-josh-level { font-size:11px; color:rgba(255,255,255,0.4); }

  .proj-empty { padding:40px; text-align:center; color:var(--ink-muted); font-style:italic; font-size:13px; }

  /* ---- Month Estimator ---- */
  .proj-est-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
  .proj-est-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:18px 20px; }
  .proj-est-field { margin-bottom:16px; }
  .proj-est-field:last-child { margin-bottom:0; }
  .proj-est-field-head { display:flex; justify-content:space-between; margin-bottom:5px; }
  .proj-est-field-head label { font-size:12.5px; font-weight:600; color:var(--ink-soft); }
  .proj-est-field-head span { font-size:12.5px; font-weight:700; color:var(--ink); }
  .proj-est-subline { font-size:11px; color:var(--ink-muted); margin-top:4px; }

  .proj-est-panel input[type="range"], .cmp-shared-panel input[type="range"], .cmp-card input[type="range"] {
    width:100%; height:4px; border-radius:2px; background:var(--line);
    -webkit-appearance:none; appearance:none; outline:none; cursor:pointer;
  }
  .proj-est-panel input[type="range"]::-webkit-slider-thumb, .cmp-shared-panel input[type="range"]::-webkit-slider-thumb, .cmp-card input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance:none; width:16px; height:16px; border-radius:50%;
    background:#D4AF37; border:2px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,0.25); cursor:pointer;
  }
  .proj-est-panel input[type="range"]::-moz-range-thumb, .cmp-shared-panel input[type="range"]::-moz-range-thumb, .cmp-card input[type="range"]::-moz-range-thumb {
    width:16px; height:16px; border-radius:50%; background:#D4AF37;
    border:2px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,0.25); cursor:pointer;
  }

  .proj-est-results-panel { background:#111; border-radius:var(--radius-md); padding:18px 20px; }
  .proj-est-results-eyebrow { font-size:10px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:#D4AF37; margin-bottom:12px; }
  .proj-est-stats { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px; }
  .proj-est-stat { background:rgba(255,255,255,0.05); border-radius:8px; padding:10px 12px; }
  .proj-est-stat-label { font-size:10.5px; color:rgba(255,255,255,0.5); margin-bottom:2px; }
  .proj-est-stat-value { font-size:16px; font-weight:700; color:#fff; }
  .proj-est-net-row { border-top:1px solid rgba(255,255,255,0.1); padding-top:12px; display:flex; justify-content:space-between; align-items:baseline; }
  .proj-est-net-row span:first-child { font-size:12px; color:rgba(255,255,255,0.6); }
  .proj-est-net-value { font-family:var(--font-display); font-size:26px; color:#D4AF37; }
  .proj-est-net-sub { font-size:10.5px; color:rgba(255,255,255,0.4); margin-top:3px; }

  /* persistency (optional, checkbox-gated) */
  .persist-toggle-row { display:flex; align-items:center; gap:8px; margin-bottom:10px; cursor:pointer; user-select:none; }
  .persist-toggle-row input { width:16px; height:16px; accent-color:#D4AF37; cursor:pointer; }
  .persist-toggle-row label { font-size:12.5px; font-weight:600; color:var(--ink-soft); cursor:pointer; }
  .persist-slider-wrap { transition: opacity 0.15s ease; }
  .persist-slider-wrap.disabled { opacity:0.35; pointer-events:none; }
  .proj-est-net-row.persist-row { border-top-style:dashed; margin-top:2px; padding-top:10px; }
  .proj-est-net-row.persist-row span:first-child { color:rgba(255,255,255,0.55); }
  .proj-est-net-row.persist-row .proj-est-net-value { font-size:19px; color:#fff; }

  /* Month Estimator — Compare Lead Sources mode */
  .cmp-shared-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:16px 20px; margin-bottom:16px; }
  .cmp-shared-label { font-size:10px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:12px; }
  .cmp-shared-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
  .cmp-shared-grid .proj-est-field-head { justify-content:flex-start; gap:8px; }
  .cmp-cols { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:14px; }
  .cmp-card { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:16px 18px; position:relative; }
  .cmp-card-name { font-family:var(--font-body); font-size:13px; font-weight:700; color:var(--ink); border:none; border-bottom:1.5px dashed var(--line); background:transparent; padding:2px 0 6px; margin-bottom:12px; width:100%; outline:none; box-sizing:border-box; }
  .cmp-card-name:focus { border-color:var(--gold); }
  .cmp-remove { position:absolute; top:14px; right:14px; background:none; border:none; color:var(--ink-muted); font-size:11px; font-weight:600; cursor:pointer; }
  .cmp-remove:hover { color:#C0392B; }
  .cmp-mini-stats { display:grid; grid-template-columns:1fr 1fr; gap:8px; background:#111; border-radius:8px; padding:12px 14px; margin-top:12px; }
  .cmp-mini-stat-label { font-size:9.5px; color:rgba(255,255,255,0.5); margin-bottom:2px; }
  .cmp-mini-stat-value { font-size:14px; font-weight:700; color:#fff; }
  .cmp-mini-net { grid-column:span 2; border-top:1px solid rgba(255,255,255,0.12); margin-top:4px; padding-top:8px; display:flex; justify-content:space-between; align-items:baseline; }
  .cmp-mini-net span:first-child { font-size:11px; color:rgba(255,255,255,0.6); }
  .cmp-mini-net span:last-child { font-family:var(--font-display); font-size:18px; color:#D4AF37; }

  @media (max-width:860px) {
    .proj-est-grid { grid-template-columns:1fr; }
    .cmp-shared-grid { grid-template-columns:1fr 1fr; }
    .cmp-cols { grid-template-columns:1fr; }
  }


/* =========================================================
   SALES DASHBOARD MODULE — faithful port of the live portal's CSS
   (covers Sales Dashboard, Commission Overrides, Net Profit)
   ========================================================= */
  .sd-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
  .sd-title-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: #8a6d10; margin-bottom: 5px; }
  .sd-title { font-family: var(--font-display); font-size: 28px; color: var(--ink); letter-spacing: -0.5px; }
  .sd-title-sub { font-size: 13px; color: var(--ink-muted); margin-top: 4px; max-width: 460px; }
  .sd-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .sd-select { font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg-card); color: var(--ink); font-family: var(--font-body); min-width: 150px; cursor: pointer; }
  .sd-btn { font-size: 11.5px; font-weight: 600; padding: 7px 14px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink-soft); font-family: var(--font-body); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.15s ease; }
  .sd-btn:hover { background: var(--bg-card); color: var(--ink); }
  .sd-kpis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; margin-bottom: 20px; }
  @media (max-width: 1200px) { .sd-kpis { grid-template-columns: repeat(4, 1fr); } }
  @media (max-width: 900px) { .sd-kpis { grid-template-columns: repeat(3, 1fr); } }
  .sd-kpi { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 14px; }
  .sd-kpi .kc-label { font-size: 9.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
  .sd-kpi .kc-value { font-family: var(--font-display); font-size: 26px; line-height: 1; color: var(--ink); letter-spacing: -0.5px; }
  .sd-kpi .kc-value.amber { color: #B8941E; }
  .sd-kpi .kc-value.green { color: #1B7F4B; }
  .sd-kpi .kc-value.red { color: #C0392B; }
  .sd-kpi .kc-sub { font-size: 10px; color: var(--ink-muted); margin-top: 5px; }
  .sd-panels { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
  @media (max-width: 1000px) { .sd-panels { grid-template-columns: 1fr; } }
  .sd-panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
  .sd-panel-head { padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
  .sd-panel-title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
  .sd-toggle-group { display: flex; gap: 5px; }
  .sd-toggle { font-size: 11px; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; font-family: var(--font-body); transition: all 0.15s ease; }
  .sd-toggle.active { background: #D4AF37; color: #0f0f0f; border-color: #D4AF37; font-weight: 600; }
  .sd-table-wrap { padding: 0 16px; }
  .sd-bars-wrap { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }
  .sd-bar-row .sd-bar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
  .sd-bar-name { font-size: 12.5px; font-weight: 700; color: var(--ink); }
  .sd-bar-count { font-size: 11px; font-weight: 500; color: var(--ink-muted); margin-left: 6px; }
  .sd-bar-amt { font-size: 13px; font-weight: 700; }
  .sd-bar-track { height: 10px; background: var(--bg-page); border-radius: 6px; overflow: hidden; }
  .sd-bar-fill { height: 100%; border-radius: 6px; }
  .sd-table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
  .sd-table th { text-align: left; padding: 10px 0 8px; color: var(--ink-soft); font-weight: 600; font-size: 11px; letter-spacing: 0.3px; border-bottom: 1px solid var(--line); }
  .sd-table th.r { text-align: right; }
  .sd-table td { padding: 9px 0; color: var(--ink); border-bottom: 1px solid var(--line); font-size: 12.5px; }
  .sd-table td.r { text-align: right; }
  .sd-table td.muted { color: var(--ink-soft); }
  .sd-table td.amber { color: #B8941E; font-weight: 600; }
  .sd-table td.green { color: #1B7F4B; font-weight: 600; }
  .sd-table tr:last-child td { border-bottom: none; }
  .sd-pill { display: inline-block; font-size: 10.5px; padding: 2px 9px; border-radius: 20px; font-weight: 600; }
  .sd-pill.warn  { background: #FEF3C7; color: #92400E; }
  .sd-pill.info  { background: #DBEAFE; color: #1E40AF; }
  .sd-pill.good  { background: #D1FAE5; color: #065F46; }
  .sd-pill.bad   { background: #FEE2E2; color: #991B1B; }
  .sd-pill.muted { background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line); }
  .sd-empty { padding: 18px 16px; font-size: 12.5px; font-style: italic; color: var(--ink-muted); }
  .sd-loading { padding: 40px 0; text-align: center; font-size: 13px; color: var(--ink-soft); }
  .np-pill { font-size:11.5px; font-weight:600; padding:5px 14px; border-radius:20px; border:1px solid var(--line); background:var(--bg-card); color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); transition:all 0.15s ease; }
  .np-pill.active { background:#D4AF37; color:#0f0f0f; border-color:#D4AF37; }
  .np-grid { display:flex; flex-direction:column; gap:8px; max-width:380px; }
  .np-line { display:flex; justify-content:space-between; font-size:13px; color:var(--ink-soft); padding:4px 0; }
  .np-line span:last-child { font-weight:600; font-variant-numeric:tabular-nums; }
  .np-total { border-top:1px solid var(--line); margin-top:4px; padding-top:10px; font-size:15px; font-weight:700; color:var(--ink); }
  .np-total span:first-child { color:var(--ink); }
  .np-pos { color:#1B7F4B; }
  .np-neg { color:#C0392B; }

  .prod-toggle { display:flex; gap:2px; background:var(--bg-card); border:1px solid var(--line); border-radius:10px; padding:3px; width:fit-content; }
  .prod-toggle button { background:none; border:none; padding:7px 16px; font-family:var(--font-body); font-size:12.5px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .prod-toggle button.active { background:#111; color:#D4AF37; }

/* =========================================================
   MY SALES MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .ms-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
  .ms-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .ms-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .ms-month-select { font-size:12px; padding:7px 12px; border:1px solid var(--line); border-radius:8px; background:var(--bg-card); color:var(--ink); font-family:var(--font-body); cursor:pointer; }

  .ms-kpis { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:16px; }
  .ms-kpi { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:14px 16px; }
  .ms-kpi .kl { font-size:9px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:6px; }
  .ms-kpi .kv { font-family:var(--font-display); font-size:24px; color:var(--ink); line-height:1; }
  .ms-kpi .kv.red { color:#C0392B; }
  .ms-kpi .kv.green { color:#1B7F4B; }

  .ms-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; margin-bottom:14px; }
  .ms-panel-head { padding:13px 18px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; font-size:12.5px; font-weight:600; color:var(--ink); }

  .ms-table-wrap { overflow-x:auto; }
  .ms-bars-wrap { padding: 16px 18px; display: flex; flex-direction: column; gap: 16px; }
  .ms-bar-row .ms-bar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
  .ms-bar-name { font-size: 12.5px; font-weight: 700; color: var(--ink); }
  .ms-bar-count { font-size: 11px; font-weight: 500; color: var(--ink-muted); margin-left: 6px; }
  .ms-bar-amt { font-size: 13px; font-weight: 700; }
  .ms-bar-track { height: 10px; background: var(--bg-page); border-radius: 6px; overflow: hidden; }
  .ms-bar-fill { height: 100%; border-radius: 6px; }
  .ms-toggle-group { display: flex; gap: 2px; background: var(--bg-page); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
  .ms-toggle-group button { background: none; border: none; padding: 5px 12px; font-family: var(--font-body); font-size: 11px; font-weight: 700; color: var(--ink-muted); border-radius: 6px; cursor: pointer; }
  .ms-toggle-group button.active { background: #111; color: var(--gold); }
  .ms-table { width:100%; border-collapse:collapse; font-size:12.5px; }
  .ms-table th { background:var(--bg-dark); color:rgba(255,255,255,0.75); padding:9px 14px; font-size:10.5px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase; text-align:right; white-space:nowrap; }
  .ms-table th:first-child { text-align:left; }
  .ms-table td { padding:9px 14px; border-bottom:1px solid var(--line); text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
  .ms-table td:first-child { text-align:left; color:var(--ink); font-weight:500; }
  .ms-table tr:last-child td { border-bottom:none; }
  .ms-table tr:hover td { background:rgba(212,175,55,0.04); }
  .ms-empty { padding:32px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:13px; }

  .np-pill { font-size:11.5px; font-weight:600; padding:5px 14px; border-radius:20px; border:1px solid var(--line); background:var(--bg-card); color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); transition:all 0.15s ease; }
  .np-pill.active { background:#D4AF37; color:#0f0f0f; border-color:#D4AF37; }
  .np-grid { display:flex; flex-direction:column; gap:8px; max-width:380px; }
  .np-line { display:flex; justify-content:space-between; font-size:13px; color:var(--ink-soft); padding:4px 0; }
  .np-line span:last-child { font-weight:600; font-variant-numeric:tabular-nums; }
  .np-total { border-top:1px solid var(--line); margin-top:4px; padding-top:10px; font-size:15px; font-weight:700; color:var(--ink); }
  .np-total span:first-child { color:var(--ink); }
  .np-pos { color:#1B7F4B; }
  .np-neg { color:#C0392B; }


/* =========================================================
   ACTIVITY MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .act-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
  .act-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .act-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .act-sub { font-size:13px; color:var(--ink-muted); margin-top:4px; max-width:420px; }
  .act-filters { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
  .act-pill { font-size:11.5px; font-weight:600; padding:6px 16px; border-radius:20px; border:1px solid var(--line); background:var(--bg-card); color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); transition:all 0.15s ease; }
  .act-pill.active { background:#D4AF37; color:#0f0f0f; border-color:#D4AF37; }

  .act-funnel-section { margin-bottom: var(--sp-4); }
  .act-funnel { display:flex; align-items:stretch; background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-lg); overflow:hidden; }
  .act-funnel-stage { flex:1; padding:var(--sp-5) var(--sp-4); text-align:center; position:relative; }
  .act-funnel-stage:not(:last-child)::after { content:''; position:absolute; right:0; top:var(--sp-4); bottom:var(--sp-4); width:1px; background:var(--line); }
  .act-funnel-label { font-size:10px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:var(--sp-2); }
  .act-funnel-value { font-family:var(--font-display); font-size:36px; line-height:1; color:var(--ink); }
  .act-funnel-stage.act-stage-highlight { background:#FAF6E8; }
  .act-funnel-stage.act-stage-highlight .act-funnel-label { color:#8a6d10; }
  .act-funnel-stage.act-stage-highlight .act-funnel-value { color:#8a6d10; }
  .act-funnel-rate { display:flex; flex-direction:column; align-items:center; justify-content:center; width:90px; flex-shrink:0; gap:4px; }
  .act-funnel-rate-pill { background:var(--bg-page); border:1px solid var(--line); border-radius:20px; padding:5px 12px; font-size:13px; font-weight:700; color:var(--ink); white-space:nowrap; }
  .act-funnel-rate-label { font-size:8.5px; font-weight:700; letter-spacing:0.5px; text-transform:uppercase; color:var(--ink-muted); text-align:center; line-height:1.2; }

  .act-stat-row { display:flex; gap:var(--sp-3); margin-bottom:var(--sp-5); }
  .act-stat-chip { flex:1; background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:var(--sp-4); }
  .act-stat-chip .lbl { font-size:9.5px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:var(--sp-1); }
  .act-stat-chip .val { font-family:var(--font-display); font-size:22px; color:var(--ink); }

  .act-two-col { display:grid; grid-template-columns:1.4fr 1fr; gap:14px; }
  .act-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; }
  .act-panel-head { padding:13px 18px; border-bottom:1px solid var(--line); font-size:12.5px; font-weight:600; color:var(--ink); }

  .act-table-wrap { overflow-x:auto; }
  .act-table { width:100%; border-collapse:collapse; font-size:12.5px; }
  .act-table th { background:var(--bg-dark); color:rgba(255,255,255,0.75); padding:9px 14px; font-size:10.5px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase; text-align:right; white-space:nowrap; }
  .act-table th:first-child { text-align:left; }
  .act-table td { padding:13px 14px; border-bottom:1px solid var(--line); text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
  .act-table td:first-child { text-align:left; color:var(--ink); font-weight:500; }
  .act-table td.gold { color:#B8941E; font-weight:600; }
  .act-table tr:hover td { background:rgba(212,175,55,0.04); }
  .act-delete-btn { background:none; border:none; padding:0; font-size:11px; font-weight:600; color:var(--ink-muted); cursor:pointer; font-family:var(--font-body); }
  .act-delete-btn:hover { color:#C0392B; text-decoration:underline; }

  .act-form { padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
  .act-form-sub { font-size:11px; color:var(--ink-muted); }
  .act-field-group { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .act-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .act-input { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; transition:border-color 0.15s; }
  .act-input:focus { border-color:var(--gold); }
  .act-save-btn { width:100%; background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:11px; font-family:var(--font-body); font-size:13px; font-weight:700; letter-spacing:0.5px; cursor:pointer; margin-top:2px; transition:opacity 0.15s; }
  .act-save-btn:disabled { opacity:0.5; cursor:not-allowed; }
  .act-form-msg { font-size:12px; font-weight:600; text-align:center; padding:4px 0; }
  .act-form-msg.ok { color:#1B7F4B; }
  .act-form-msg.err { color:#C0392B; }
  .act-empty { padding:32px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:13px; }

  .act-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:9000; padding:20px; }
  .act-modal { background:var(--bg-card); border-radius:14px; max-width:440px; width:100%; box-shadow:0 24px 60px rgba(0,0,0,0.3); }
  .act-modal-head { padding:18px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
  .act-modal-title { font-family:var(--font-display); font-size:19px; color:var(--ink); }
  .act-modal-close { background:none; border:none; font-size:20px; color:var(--ink-muted); cursor:pointer; line-height:1; }
  .act-modal-body { padding:20px 22px; }
  .act-modal-footer { padding:16px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; align-items:center; }
  .act-btn-secondary { background:none; border:1px solid var(--line); border-radius:8px; padding:9px 18px; font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; }

/* =========================================================
   DEPOSITS MODULE — faithful port of the live portal's CSS
   ========================================================= */
  .dep-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
  .dep-eyebrow { font-size:9px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .dep-title { font-family:var(--font-display); font-size:26px; color:var(--ink); letter-spacing:-0.3px; }
  .dep-add-btn { background:#D4AF37; color:#0f0f0f; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:13px; font-weight:700; letter-spacing:0.3px; cursor:pointer; transition:opacity 0.15s; }
  .dep-add-btn:hover { opacity:0.9; }

  .dep-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px; }
  .dep-kpi { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); padding:14px 16px; }
  .dep-kpi .kl { font-size:9px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:6px; }
  .dep-kpi .kv { font-family:var(--font-display); font-size:22px; color:var(--ink); line-height:1.15; word-break:break-word; }

  .dep-day-cards { display:grid; grid-template-columns:repeat(2, minmax(260px, 1fr)); gap:8px; }
  .dep-filter-row { display:flex; align-items:center; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
  .dep-pills { display:flex; gap:2px; background:var(--bg-card); border:1px solid var(--line); border-radius:10px; padding:3px; }
  .dep-pill { background:none; border:none; padding:7px 14px; font-family:var(--font-body); font-size:12px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; }
  .dep-pill.active { background:#111; color:var(--gold); }
  .dep-select { padding:8px 12px; border:1px solid var(--line); border-radius:8px; font-size:12.5px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); }
  .dep-panel { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-lg); margin-bottom:16px; overflow:hidden; }
  .dep-panel-head { padding:13px 18px; border-bottom:1px solid var(--line); font-size:12.5px; font-weight:700; color:var(--ink); }
  .dep-bars-wrap { padding:16px 18px; display:flex; flex-direction:column; gap:14px; }
  .dep-bar-row .dep-bar-top { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:6px; }
  .dep-bar-name { font-size:12.5px; font-weight:700; color:var(--ink); }
  .dep-bar-amt { font-size:13px; font-weight:700; color:#1B7F4B; }
  .dep-bar-track { height:10px; background:var(--bg-page); border-radius:6px; overflow:hidden; }
  .dep-bar-fill { height:100%; background:#1B7F4B; border-radius:6px; }
  .dep-day-card { background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; }
  .dep-day-head { display:flex; align-items:center; justify-content:space-between; padding:11px 16px; cursor:pointer; }
  .dep-day-head:hover { background:rgba(212,175,55,0.04); }
  .dep-day-left { display:flex; align-items:center; gap:10px; }
  .dep-day-date { font-size:13px; font-weight:600; color:var(--ink); }
  .dep-day-count { font-size:11px; color:var(--ink-muted); }
  .dep-day-total { font-family:var(--font-display); font-size:17px; color:#1B7F4B; }
  .dep-day-body { padding:0 16px 12px; border-top:1px solid var(--line); display:none; }
  .dep-day-body.open { display:block; padding-top:10px; }
  .dep-carrier-chip { font-size:12px; color:var(--ink-soft); display:inline-block; margin:0 10px 6px 0; }
  .dep-carrier-chip span { color:var(--ink); font-weight:600; }
  .dep-empty { padding:32px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:13px; }

  .dep-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:9000; padding:20px; }
  .dep-modal { background:var(--bg-card); border-radius:14px; max-width:440px; width:100%; box-shadow:0 24px 60px rgba(0,0,0,0.3); }
  .dep-modal-head { padding:18px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
  .dep-modal-title { font-family:var(--font-display); font-size:19px; color:var(--ink); }
  .dep-modal-close { background:none; border:none; font-size:20px; color:var(--ink-muted); cursor:pointer; line-height:1; }
  .dep-modal-body { padding:20px 22px; display:flex; flex-direction:column; gap:10px; }
  .dep-field label { display:block; font-size:9.5px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:5px; }
  .dep-field label .req { color:#C0392B; }
  .dep-input { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:7px; font-size:13px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); box-sizing:border-box; outline:none; transition:border-color 0.15s; }
  .dep-input:focus { border-color:var(--gold); }
  .dep-modal-footer { padding:16px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; align-items:center; }
  .dep-form-msg { font-size:12px; font-weight:600; flex:1; }
  .dep-form-msg.ok { color:#1B7F4B; }
  .dep-form-msg.err { color:#C0392B; }
  .dep-btn-secondary { background:none; border:1px solid var(--line); border-radius:8px; padding:9px 18px; font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .dep-btn-primary { background:#D4AF37; border:none; border-radius:8px; padding:9px 20px; font-size:13px; font-weight:700; color:#0f0f0f; cursor:pointer; }
  .dep-btn-primary:disabled { opacity:0.5; cursor:not-allowed; }


/* =========================================================
   SETTINGS MODULE — Agents / Carriers & Rates / Comp Levels
   ========================================================= */
.set-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; gap: 16px; }
.set-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.set-title { font-family: var(--font-display); font-size: 26px; color: var(--ink); line-height: 1.1; }
.set-sub { font-size: 12.5px; color: var(--ink-muted); margin-top: 4px; max-width: 480px; }

.set-add-btn { background: var(--gold); color: #0f0f0f; border: none; border-radius: var(--radius-sm); padding: 10px 18px; font-family: var(--font-body); font-size: 12.5px; font-weight: 700; letter-spacing: 0.3px; cursor: pointer; white-space: nowrap; }
.set-add-btn:hover { opacity: 0.9; }

.set-table-wrap { background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--line); overflow: hidden; }
.set-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.set-table th { text-align: left; padding: 10px 16px; background: var(--bg-page); font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-muted); border-bottom: 1px solid var(--line); }
.set-table th.r { text-align: right; }
.set-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.set-table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.set-table td.muted { color: var(--ink-muted); }
.set-table tr:last-child td { border-bottom: none; }

.set-role-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px; background: var(--gold-glow); color: #8a6d10; }
.set-role-pill.muted { background: var(--bg-page); color: var(--ink-muted); }

.set-actions { display: flex; gap: 12px; justify-content: flex-end; }
.set-link { background: none; border: none; color: var(--ink-soft); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; font-family: var(--font-body); }
.set-link:hover { color: var(--ink); text-decoration: underline; }
.set-link-danger { color: #C0392B; }
.set-link-danger:hover { color: #A5301F; }

.set-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.set-modal { background: var(--bg-card); border-radius: var(--radius-lg); max-width: 440px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.3); }
.set-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.set-modal-title { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.set-modal-close { background: none; border: none; font-size: 16px; color: var(--ink-muted); cursor: pointer; padding: 4px; }
.set-modal-body { padding: 18px 24px; }
.set-modal-footer { display: flex; align-items: center; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }

.set-field { margin-bottom: 14px; }
.set-field label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.set-field .req { color: #C0392B; }
.set-field .set-hint-inline { text-transform: none; font-weight: 400; letter-spacing: 0; }
.set-hint { font-size: 11px; color: var(--ink-muted); margin-top: 5px; font-style: italic; }
.set-input { width: 100%; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; font-family: var(--font-body); box-sizing: border-box; }
.set-input:focus { outline: none; border-color: var(--gold); }
.set-input:disabled { background: var(--bg-page); color: var(--ink-muted); }

.set-btn-primary { background: var(--gold); color: #0f0f0f; border: none; border-radius: var(--radius-sm); padding: 10px 20px; font-family: var(--font-body); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.set-btn-secondary { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 16px; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--ink-muted); cursor: pointer; }
.set-btn-secondary:hover { background: var(--bg-page); }

.set-form-msg { font-size: 12px; flex: 1; }
.set-form-msg.err { color: #C0392B; font-weight: 600; }

.login-access-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-muted); line-height: 1.6; text-align: left; }
.login-access-note a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.login-access-note a:hover { text-decoration: underline; }

.confirm-modal-type-hint { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
.confirm-modal-type-input { width: 100%; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; font-family: var(--font-body); box-sizing: border-box; margin-bottom: 16px; }
.confirm-modal-type-input:focus { outline: none; border-color: var(--gold); }
.confirm-modal-btn-danger:disabled { opacity: 0.4; cursor: default; }

.dep-chip-archived { opacity: 0.5; text-decoration: line-through; }
.dep-chip-archive-btn { background: none; border: none; cursor: pointer; font-size: 11px; color: var(--ink-muted); margin-left: 4px; padding: 0 2px; }
.dep-chip-archive-btn:hover { color: #C0392B; }

/* Presentation disposition pills + follow-up */
.pres-disp-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; margin-right: 6px; }
.pres-disp-pill.neutral { background: var(--warning-bg); color: var(--ink-soft); }
.pres-disp-pill.info { background: var(--info-bg); color: var(--info); }
.pres-disp-pill.success { background: var(--success-bg); color: var(--success); }
.pres-disp-pill.danger { background: var(--danger-bg); color: var(--danger); }
.pres-disp-pill.legacy { background: var(--bg-page); color: var(--ink-muted); font-weight: 500; }

.pres-followup-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: var(--gold-glow); color: #8a6d10; }

.pres-filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pres-filter-pill { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg-card); font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: var(--font-body); color: var(--ink-soft); }
.pres-filter-pill.active.neutral { background: var(--warning-bg); border-color: var(--ink-soft); color: var(--ink-soft); }
.pres-filter-pill.active.info { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.pres-filter-pill.active.success { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.pres-filter-pill.active.danger { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.pres-filter-pill.active.followup { background: var(--gold-glow); border-color: var(--gold); color: #8a6d10; }

/* =========================================================
   ACTIVITY — live counter fields + Power Hours timer
   ========================================================= */
.act-counter-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 12px 0; }
.act-counter-field label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.act-counter-row { display: flex; align-items: center; gap: 6px; }
.act-counter-btn { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg-card); color: var(--ink); font-size: 15px; font-weight: 700; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; }
.act-counter-btn:hover { border-color: var(--gold); color: var(--gold); }
.act-counter-btn-add { background: var(--gold); color: #0f0f0f; border-color: var(--gold); }
.act-counter-btn-add:hover { opacity: 0.85; color: #0f0f0f; }
.act-counter-input { width: 100%; text-align: center; padding: 6px 4px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.act-counter-input:focus { outline: none; border-color: var(--gold); }

.act-timer-box { background: var(--bg-page); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.act-timer-display { font-family: var(--font-display); font-size: 28px; color: var(--ink); text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 1px; margin-bottom: 10px; }
.act-timer-controls { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.act-timer-btn { padding: 8px 18px; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12.5px; font-weight: 700; cursor: pointer; border: none; }
.act-timer-btn-start { background: var(--success); color: #fff; }
.act-timer-btn-start:hover { opacity: 0.88; }
.act-timer-btn-pause { background: var(--warning-ink); color: #fff; }
.act-timer-btn-pause:hover { opacity: 0.88; }
.act-timer-btn-reset { background: none; border: 1px solid var(--line) !important; color: var(--ink-muted); }
.act-timer-btn-reset:hover { border-color: var(--danger) !important; color: var(--danger); }
.act-timer-manual { border-top: 1px dashed var(--line); padding-top: 10px; text-align: center; }
.act-timer-manual label { display: block; font-size: 11px; color: var(--ink-muted); margin-bottom: 5px; font-style: italic; }
.act-timer-manual input { width: 100px; text-align: center; padding: 6px; border: 1.5px solid var(--line); border-radius: 7px; font-size: 13px; }

/* =========================================================
   HELP BUTTON + PANEL (Onboarding Phase 1)
   ========================================================= */
.help-fab { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: #0f0f0f; border: none; font-family: var(--font-display); font-size: 20px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.25); z-index: 500; }
.tour-fab { position: fixed; bottom: 24px; right: 82px; width: 48px; height: 48px; border-radius: 50%; background: #111; color: var(--gold); border: none; font-size: 19px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.25); z-index: 500; display:flex; align-items:center; justify-content:center; }
.tour-fab:hover { opacity: 0.9; transform: scale(1.05); }
.help-fab:hover { opacity: 0.9; transform: scale(1.05); }
.help-panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: flex-end; justify-content: flex-end; z-index: 9998; padding: 24px; }
.help-panel { background: var(--bg-card); border-radius: var(--radius-lg); width: 380px; max-width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.3); }
.help-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.help-panel-title { font-family: var(--font-display); font-size: 18px; color: var(--ink); }
.help-panel-close { background: none; border: none; font-size: 15px; color: var(--ink-muted); cursor: pointer; }
.help-panel-body { padding: 16px 20px 20px; }
.help-current-section { background: var(--gold-glow); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; }
.help-current-label { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: #8a6d10; margin-bottom: 4px; }
.help-current-desc { font-size: 13px; color: var(--ink); line-height: 1.5; }
.help-all-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.help-item { padding: 9px 0; border-bottom: 1px solid var(--line); }
.help-item:last-child { border-bottom: none; }
.help-item-name { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.help-item-desc { font-size: 12px; color: var(--ink-muted); line-height: 1.4; }

/* =========================================================
   ACTIVITY KPI CARDS
   ========================================================= */
.act-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 16px; }
.act-kpi-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 12px; text-align: center; }
.act-kpi-card.act-kpi-gold { background: var(--bg-dark); border-color: var(--bg-dark); }
.act-kpi-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.act-kpi-card.act-kpi-gold .act-kpi-label { color: rgba(255,255,255,0.5); }
.act-kpi-value { font-family: var(--font-display); font-size: 26px; color: var(--ink); line-height: 1; }
.act-kpi-card.act-kpi-gold .act-kpi-value { color: var(--gold); }

/* =========================================================
   PROJECTOR — combined personal + downline display
   ========================================================= */
.proj-section-label { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-muted); margin: 14px 0 6px; }
.proj-row-total { text-align: right; font-size: 13px; color: var(--ink); margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.proj-row-total strong { color: var(--gold); font-family: var(--font-display); font-size: 16px; }
.proj-total-combined { background: var(--bg-dark); }
.proj-total-combined .proj-total-label { color: rgba(255,255,255,0.6); }
.proj-total-combined .proj-total-value { color: var(--gold); }

/* =========================================================
   INLINE HELP ICONS
   ========================================================= */
.help-icon { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--bg-page); border: 1px solid var(--line); color: var(--ink-muted); font-size: 10px; font-weight: 700; cursor: pointer; vertical-align: middle; margin-left: 5px; line-height: 1; }
.help-icon:hover { background: var(--gold-glow); border-color: var(--gold); color: #8a6d10; }
.help-tip-bubble { position: absolute; z-index: 9997; max-width: 240px; background: var(--bg-dark); color: #fff; font-size: 12px; line-height: 1.5; padding: 9px 12px; border-radius: var(--radius-sm); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }

/* =========================================================
   ACTIVITY TRACKER REDESIGN — icon-badge KPI/counter cards,
   conversion rates panel, Power Hours card, Sales card w/ toggle
   ========================================================= */
.act-icon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.act-icon-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; display: flex; align-items: center; gap: 12px; }
.act-icon-badge { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.act-icon-value { font-family: var(--font-display); font-size: 21px; color: var(--ink); line-height: 1; }
.act-icon-label { font-size: 11px; color: var(--ink-muted); margin-top: 3px; }

.act-badge-dials { background: #EEF1F5; color: #5b7594; }
.act-badge-contacts { background: #E8F2FA; color: #3f7db3; }
.act-badge-initialDiscovery { background: #F3EEF9; color: #8e6bc4; }
.act-badge-presentations { background: #FBEFE4; color: #d68a3e; }
.act-badge-appointments { background: #FBF1E4; color: #c98a2e; }
.act-badge-sales { background: #EAF6EE; color: #4a9d5f; }
.act-badge-powerHours { background: #F0EEE6; color: #6a6a60; }

.act-rates-panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 14px; }
.act-rates-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 14px; }
.act-rates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.act-rate-item { text-align: center; }
.act-rate-value { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.act-rate-label { font-size: 11.5px; color: var(--ink); margin-top: 4px; }
.act-rate-sub { font-size: 10.5px; color: var(--ink-muted); margin-top: 2px; }

.act-counter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.act-counter-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; text-align: center; }
.act-counter-card-label { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; margin: 8px 0; }
.act-counter-card-controls { display: flex; align-items: center; justify-content: center; gap: 12px; }
.act-round-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-card); font-size: 13px; color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.act-round-btn:hover { border-color: var(--gold); color: var(--gold); }
.act-counter-card-val { font-family: var(--font-display); font-size: 19px; color: var(--ink); min-width: 22px; }

.act-power-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.act-power-head { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-soft); font-size: 11.5px; font-weight: 600; margin-bottom: 10px; }
.act-power-body { display: flex; align-items: center; justify-content: center; }
.act-power-display { font-family: var(--font-display); font-size: 24px; color: var(--ink); }
.act-power-controls { display: flex; gap: 6px; justify-content: center; }
.act-power-controls .act-timer-btn { font-size: 11px; padding: 6px 10px; }
.act-power-manual { font-size: 10.5px; color: var(--ink-muted); margin-top: 10px; text-align: left; }
.act-power-manual input { width: 100%; margin-top: 6px; box-sizing: border-box; }

.act-sales-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.act-log-sale-btn { width: 100%; background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; margin-top: 4px; }
.act-log-presentation-btn { width: 100%; background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 8px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer; margin-top: 10px; }
.act-manual-toggle-link { font-size: 11px; color: var(--ink-muted); cursor: pointer; border-bottom: 1px solid var(--line); display: inline-block; margin-top: 10px; }
.act-manual-toggle-link:hover { color: var(--gold); border-color: var(--gold); }
.act-manual-entry { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); text-align: left; }

#act-saved-note { font-size: 12px; color: #4a9d5f; font-weight: 600; opacity: 0; transition: opacity 0.3s ease; display: flex; align-items: center; gap: 4px; }

/* Team Activity Leaderboard — frozen header while scrolling */
.act-lb-table-wrap { max-height: 520px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.act-lb-table thead tr { position: sticky; top: 0; z-index: 2; }
.act-lb-table thead th { background: var(--bg-dark) !important; }

/* Plain KPI cards — no icons, matching the previous layout Josh
   preferred, with an optional rate pill beside the raw number */
.act-plain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.act-plain-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.act-plain-label { font-size: 11px; letter-spacing: 0.3px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.act-plain-value { font-family: var(--font-display); font-size: 24px; color: var(--ink); line-height: 1; }
.act-plain-rate { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.act-plain-rate-label { font-size: 10.5px; color: var(--ink-muted); }
.act-plain-rate-pill { font-size: 11px; font-weight: 700; color: var(--gold); background: var(--gold-glow); padding: 2px 8px; border-radius: 100px; }

/* Activity Tracker — funnel-style KPI section, matching the
   reference mockup: connected funnel cards with arrows, a separate
   side group for non-funnel metrics, and a summary bar underneath. */
.act-funnel-wrap { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.act-funnel-main { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.act-funnel-side { display: flex; flex-direction: row; gap: 10px; width: 100%; flex-wrap: wrap; }
.act-funnel-side > * { flex: 1; min-width: 140px; }
.act-funnel-arrow { display: flex; align-items: center; color: var(--ink-muted); font-size: 20px; flex-shrink: 0; }
.act-funnel-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; text-align: center; flex: 1; min-width: 120px; }
.act-funnel-card-gold { border-color: var(--gold); background: var(--gold-glow); }
.act-funnel-label { font-size: 10.5px; letter-spacing: 0.4px; text-transform: uppercase; font-weight: 700; color: var(--ink-muted); margin-bottom: 8px; }
.act-funnel-card-gold .act-funnel-label { color: var(--gold); }
.act-funnel-value { font-family: var(--font-display); font-size: 30px; color: var(--ink); line-height: 1; }
.act-funnel-divider { height: 1px; background: var(--line); margin: 10px auto; width: 60%; }
.act-funnel-sub-value { font-size: 15px; font-weight: 700; color: var(--gold); }
.act-funnel-sub-label { font-size: 10.5px; color: var(--ink-muted); margin-top: 2px; }
.act-funnel-summary { background: var(--gold-glow); border-radius: var(--radius-md); padding: 12px 18px; display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; margin-bottom: 14px; }
.act-funnel-summary strong { color: var(--ink); }
.act-funnel-summary strong.gold { color: var(--gold); }
.act-funnel-summary-divider { color: var(--line); }
@media (max-width: 900px) {
  .act-funnel-main { flex-direction: column; }
  .act-funnel-arrow { transform: rotate(90deg); align-self: center; }
  .act-funnel-side { width: 100%; flex-direction: row; }
}

/* =========================================================
   POLICY CONSERVATION
   ========================================================= */
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; gap: 16px; }
.pc-title { font-family: var(--font-display); font-size: 30px; color: var(--ink); margin-bottom: 4px; }
.pc-sub { font-size: 13px; color: var(--ink-soft); }
.pc-add-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-md); padding: 11px 20px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pc-add-btn:hover { opacity: 0.9; }

.pc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.pc-tab { background: none; border: none; padding: 10px 4px; margin-right: 22px; font-size: 13.5px; font-weight: 700; color: var(--ink-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.pc-tab.active { color: var(--ink); border-bottom-color: var(--gold); }

.pc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }

.pc-filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.pc-search { flex: 1 1 220px; min-width: 200px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; }
.pc-filter-field { display: flex; flex-direction: column; gap: 4px; }
.pc-filter-field label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-muted); }
.pc-select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12.5px; background: var(--bg-card); }
.pc-reset-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-muted); cursor: pointer; }
.pc-reset-btn:hover { border-color: var(--ink-muted); color: var(--ink); }

.pc-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); }
.pc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pc-table thead { position: sticky; top: 0; background: var(--bg-dark); z-index: 2; }
.pc-table th { text-align: left; padding: 11px 14px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.pc-table th.pc-sortable { cursor: pointer; user-select: none; }
.pc-table th.pc-sortable:hover { color: var(--gold-soft); }
.pc-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.pc-row { cursor: pointer; }
.pc-row:hover { background: var(--goldGlow, rgba(212, 175, 55, 0.08)); }
.pc-empty { text-align: center; color: var(--ink-muted); padding: 30px; }
.pc-days { font-weight: 700; }

.pc-status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pc-status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pc-status-badge.pc-s-lapse { color: #C0392B; } .pc-status-badge.pc-s-lapse .pc-status-dot { background: #C0392B; }
.pc-status-badge.pc-s-chargeback { color: #B8860B; } .pc-status-badge.pc-s-chargeback .pc-status-dot { background: #B8860B; }
.pc-status-badge.pc-s-req { color: #2B6CB0; } .pc-status-badge.pc-s-req .pc-status-dot { background: #2B6CB0; }
.pc-status-badge.pc-s-dnc { color: #6b6b6b; } .pc-status-badge.pc-s-dnc .pc-status-dot { background: #6b6b6b; }
.pc-status-badge.pc-s-paid { color: #1B7F4B; } .pc-status-badge.pc-s-paid .pc-status-dot { background: #1B7F4B; }
.pc-status-badge.pc-s-other { color: var(--ink-muted); } .pc-status-badge.pc-s-other .pc-status-dot { background: var(--ink-muted); }

.pc-priority-pill { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.pc-priority-pill.pc-p-high { background: #FDF1EF; color: #C0392B; }
.pc-priority-pill.pc-p-medium { background: #FEF9EC; color: #8a6d10; }
.pc-priority-pill.pc-p-low { background: #EEF8F1; color: #1B7F4B; }

.pc-assignee-chip { background: var(--goldGlow, rgba(212, 175, 55, 0.15)); color: var(--gold); font-weight: 700; font-size: 11.5px; padding: 4px 10px; border-radius: 20px; }

.pc-icon-btn { background: none; border: 1px solid var(--line); border-radius: 6px; width: 28px; height: 28px; margin-left: 4px; cursor: pointer; font-size: 13px; color: var(--ink-muted); }
.pc-icon-btn:hover { color: var(--ink); border-color: var(--ink-muted); }

.pc-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--ink-muted); flex-wrap: wrap; gap: 10px; }
.pc-pagesize select { margin-left: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.pc-pagenav { display: flex; align-items: center; gap: 12px; }
.pc-page-btn { background: none; border: 1px solid var(--line); border-radius: 6px; width: 30px; height: 30px; cursor: pointer; font-size: 15px; color: var(--ink); }
.pc-page-btn:disabled { opacity: 0.35; cursor: default; }
.pc-page-info { white-space: nowrap; }

/* Drawer — same structural pattern as the New Agents / Book of
   Business drawer, own pc- prefix so it can coexist. */
.pc-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; align-items: flex-start; justify-content: flex-end; z-index: 6000; }
.pc-drawer-overlay.open { display: flex; }
.pc-drawer { background: var(--bg-card); width: 440px; max-width: 94vw; height: 100%; box-shadow: -8px 0 30px rgba(0,0,0,0.15); overflow-y: auto; }
.pc-drawer-head { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: center; }
.pc-drawer-badges { display: flex; align-items: center; gap: 10px; }
.pc-days-badge { background: var(--bg-dark); color: var(--gold); font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.pc-drawer-close { background: none; border: none; font-size: 18px; color: var(--ink-muted); cursor: pointer; }
.pc-drawer-titlewrap { padding: 12px 22px 18px; border-bottom: 1px solid var(--line); }
.pc-drawer-title { font-family: var(--font-display); font-size: 24px; color: var(--ink); }
.pc-drawer-policynum { font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.pc-drawer-kpis { display: flex; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.pc-drawer-mini { flex: 1; background: var(--goldGlow, rgba(212, 175, 55, 0.1)); border-radius: var(--radius-sm); padding: 12px; }
.pc-drawer-mini .l { font-size: 9.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.pc-drawer-mini .v { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.pc-drawer-section { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.pc-drawer-section h4 { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.pc-drawer-kv { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 10px; gap: 10px; }
.pc-drawer-kv .l { color: var(--ink-muted); flex-shrink: 0; }
.pc-drawer-kv .v { font-weight: 600; text-align: right; }
.pc-drawer-kv .v select.pc-select { min-width: 150px; }
.pc-copy-btn { background: none; border: none; color: var(--gold); font-size: 11px; cursor: pointer; text-decoration: underline; }
.pc-drawer-footer { display: flex; gap: 10px; justify-content: flex-end; }
.pc-edit-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.pc-archive-btn { background: none; border: 1px solid #C0392B; color: #C0392B; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* Activity Timeline */
.pc-timeline { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; max-height: 300px; overflow-y: auto; }
.pc-timeline-item { display: flex; gap: 10px; }
.pc-timeline-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.pc-timeline-body-col { flex: 1; }
.pc-timeline-meta { font-size: 11px; color: var(--ink-muted); margin-bottom: 2px; }
.pc-system-tag { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.pc-timeline-text { font-size: 13px; color: var(--ink); line-height: 1.5; }
.pc-timeline-actions { display: flex; gap: 10px; margin-top: 3px; }
.pc-timeline-actions button { background: none; border: none; padding: 0; font-size: 11px; font-weight: 600; color: var(--ink-muted); cursor: pointer; font-family: var(--font-body); }
.pc-timeline-actions button:hover { color: var(--gold); text-decoration: underline; }
.pc-timeline-item:hover .pc-timeline-actions button:last-child:hover { color: #C0392B; }
.pc-note-edit-textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; resize: vertical; margin-bottom: 4px; }
.pc-note-input { display: flex; gap: 8px; align-items: flex-end; }
.pc-note-input textarea { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12.5px; resize: vertical; }
.pc-note-save { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; }

/* Add/Edit modal — own pc- prefix, same structural pattern as
   the New Agents modal. */
.pc-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 7000; padding: 20px; }
.pc-modal { background: var(--bg-card); border-radius: 14px; max-width: 520px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.3); }
.pc-modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.pc-modal-title { font-family: var(--font-display); font-size: 19px; color: var(--ink); }
.pc-modal-close { background: none; border: none; font-size: 20px; color: var(--ink-muted); cursor: pointer; }
.pc-modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.pc-modal-body label { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-muted); margin-top: 10px; }
.pc-modal-body input, .pc-modal-body select { padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; }
.pc-modal-footer { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.pc-cancel-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; color: var(--ink-muted); }
.pc-save-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* =========================================================
   TASK MANAGER
   ========================================================= */
.tk-layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.tk-main { grid-column: 1; }
.tk-side { grid-column: 2; }

.tk-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; gap: 16px; }
.tk-title { font-family: var(--font-display); font-size: 30px; color: var(--ink); margin-bottom: 4px; }
.tk-sub { font-size: 13px; color: var(--ink-soft); }
.tk-add-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-md); padding: 11px 20px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }

.tk-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tk-tab { background: none; border: none; padding: 10px 4px; margin-right: 22px; font-size: 13.5px; font-weight: 700; color: var(--ink-muted); cursor: pointer; border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 7px; }
.tk-tab.active { color: var(--ink); border-bottom-color: var(--gold); }
.tk-tab-count { background: var(--bg-dark); color: var(--gold); font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }

.tk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }

.tk-filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.tk-search { flex: 1 1 200px; min-width: 180px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; }
.tk-filter-field { display: flex; flex-direction: column; gap: 4px; }
.tk-filter-field label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-muted); }
.tk-select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12.5px; background: var(--bg-card); }
.tk-reset-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-muted); cursor: pointer; }

.tk-date-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--gold-glow); color: #8a6d10; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 20px; margin-bottom: 12px; }
.tk-date-chip button { background: none; border: none; color: inherit; cursor: pointer; font-size: 12px; }

.tk-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); }
.tk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tk-table thead { background: var(--bg-dark); }
.tk-table th { text-align: left; padding: 11px 14px; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.tk-table th.tk-sortable { cursor: pointer; user-select: none; }
.tk-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tk-row { cursor: pointer; }
.tk-row:hover { background: var(--gold-glow); }
.tk-row.done .tk-task-title, .tk-row.done .tk-task-desc { text-decoration: line-through; color: var(--ink-muted); }
.tk-followup-row { cursor: pointer; font-style: italic; }
.tk-followup-row:hover { background: var(--gold-glow); }
.tk-followup-chip { background: rgba(43,108,176,0.1); color: #2B6CB0; }
.tk-empty { text-align: center; color: var(--ink-muted); padding: 30px; }

.tk-checkbox { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 800; font-size: 12px; }
.tk-checkbox.checked { background: var(--gold); border-color: var(--gold); color: var(--bg-dark); }
.tk-task-title { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.tk-task-desc { font-size: 11.5px; color: var(--ink-muted); }
.tk-cat-chip { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--gold-glow); color: #8a6d10; white-space: nowrap; }
.tk-due { font-weight: 700; font-size: 12.5px; }
.tk-due.overdue { color: #C0392B; }
.tk-due-time { font-size: 10.5px; color: var(--ink-muted); font-weight: 500; }
.tk-priority { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.tk-priority.tk-p-high { background: #FDF1EF; color: #C0392B; }
.tk-priority.tk-p-medium { background: #FEF9EC; color: #8a6d10; }
.tk-priority.tk-p-low { background: #EEF8F1; color: #1B7F4B; }
.tk-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tk-status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.tk-status.tk-s-todo { color: #C0392B; } .tk-status.tk-s-todo .tk-status-dot { background: #C0392B; }
.tk-status.tk-s-progress { color: #2B6CB0; } .tk-status.tk-s-progress .tk-status-dot { background: #2B6CB0; }
.tk-status.tk-s-completed { color: #1B7F4B; } .tk-status.tk-s-completed .tk-status-dot { background: #1B7F4B; }
.tk-created { font-size: 11.5px; color: var(--ink-muted); }
.tk-assignee-chip { font-weight: 700; font-size: 11.5px; padding: 4px 10px; border-radius: 20px; }
.tk-icon-btn { background: none; border: 1px solid var(--line); border-radius: 6px; width: 28px; height: 28px; margin-left: 4px; cursor: pointer; font-size: 13px; color: var(--ink-muted); }
.tk-icon-btn:hover { color: var(--ink); border-color: var(--ink-muted); }

.tk-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--ink-muted); flex-wrap: wrap; gap: 10px; }
.tk-pagesize select { margin-left: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.tk-pagenav { display: flex; align-items: center; gap: 12px; }
.tk-page-btn { background: none; border: 1px solid var(--line); border-radius: 6px; width: 30px; height: 30px; cursor: pointer; font-size: 15px; color: var(--ink); }
.tk-page-btn:disabled { opacity: 0.35; cursor: default; }
.tk-page-info { white-space: nowrap; }

/* Drawer + modal — same structural pattern as Policy Conservation's,
   own tk- prefix so both can coexist without collisions. */
.tk-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; align-items: flex-start; justify-content: flex-end; z-index: 6000; }
.tk-drawer-overlay.open { display: flex; }
.tk-drawer { background: var(--bg-card); width: 440px; max-width: 94vw; height: 100%; box-shadow: -8px 0 30px rgba(0,0,0,0.15); overflow-y: auto; }
.tk-drawer-head { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: center; }
.tk-drawer-badges { display: flex; align-items: center; gap: 10px; }
.tk-drawer-close { background: none; border: none; font-size: 18px; color: var(--ink-muted); cursor: pointer; }
.tk-drawer-titlewrap { padding: 12px 22px 18px; border-bottom: 1px solid var(--line); }
.tk-drawer-title { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.tk-drawer-desc { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.tk-drawer-section { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.tk-drawer-section h4 { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.tk-drawer-kv { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 10px; gap: 10px; }
.tk-drawer-kv .l { color: var(--ink-muted); flex-shrink: 0; }
.tk-drawer-kv .v { font-weight: 600; text-align: right; }
.tk-drawer-kv .v select.tk-select { min-width: 150px; }
.tk-drawer-footer { display: flex; gap: 10px; justify-content: flex-end; }
.tk-edit-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.tk-archive-btn { background: none; border: 1px solid #C0392B; color: #C0392B; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }

.tk-timeline { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; max-height: 300px; overflow-y: auto; }
.tk-timeline-item { display: flex; gap: 10px; }
.tk-timeline-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.tk-timeline-body-col { flex: 1; }
.tk-timeline-meta { font-size: 11px; color: var(--ink-muted); margin-bottom: 2px; }
.tk-system-tag { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.tk-timeline-text { font-size: 13px; color: var(--ink); line-height: 1.5; }
.tk-note-input { display: flex; gap: 8px; align-items: flex-end; }
.tk-note-input textarea { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12.5px; resize: vertical; }
.tk-note-save { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; }

.tk-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 7000; padding: 20px; }
.tk-modal { background: var(--bg-card); border-radius: 14px; max-width: 520px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.3); }
.tk-modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.tk-modal-title { font-family: var(--font-display); font-size: 19px; color: var(--ink); }
.tk-modal-close { background: none; border: none; font-size: 20px; color: var(--ink-muted); cursor: pointer; }
.tk-modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.tk-modal-body label { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-muted); margin-top: 10px; }
.tk-modal-body input, .tk-modal-body select, .tk-modal-body textarea { padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; }
.tk-modal-body textarea { resize: vertical; }
.tk-modal-footer { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.tk-cancel-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; color: var(--ink-muted); }
.tk-save-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* Rail — calendar, donut, upcoming, quick add. Shared with the
   mockup's own styling; kept here so the module is self-contained
   in the real stylesheet too. */
.rail-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; }
.rail-title { font-size: 10.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 12px; }
.rail-upcoming-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.rail-upcoming-item:last-child { border-bottom: none; }
.rail-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.rail-upcoming-title { flex: 1; }
.rail-upcoming-date { color: var(--ink-muted); font-size: 11px; white-space: nowrap; }
.rail-quickadd { display: flex; gap: 8px; }
.rail-quickadd input { flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12.5px; }
.rail-quickadd button { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 14px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.rail-hint { font-size: 10.5px; color: var(--ink-muted); margin-top: 8px; }

.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-month { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.cal-nav { background: none; border: 1px solid var(--line); border-radius: 6px; width: 24px; height: 24px; cursor: pointer; color: var(--ink-muted); font-size: 13px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-size: 9.5px; font-weight: 700; color: var(--ink-muted); padding-bottom: 6px; letter-spacing: 0.3px; }
.cal-day { position: relative; font-size: 12px; padding: 7px 0 9px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.cal-day.muted { color: var(--line); cursor: default; }
.cal-day.today { background: var(--gold); color: var(--bg-dark); font-weight: 800; }
.cal-day.selected { background: var(--gold-glow); font-weight: 700; }
.cal-day .dot { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--ink-muted); }
.cal-day.today .dot { background: var(--bg-dark); }

.donut-row { display: flex; align-items: center; gap: 18px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.donut-legend-item { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.donut-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-label { flex: 1; color: var(--ink-soft); }
.donut-legend-value { font-weight: 700; }
.donut-total-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }

/* =========================================================
   ROLLED DEBT
   ========================================================= */
.rd-admin-tag { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); margin: 4px 0 14px; }
.rd-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 16px; }
.rd-sub { font-size: 13px; color: var(--ink-muted); }
.rd-add-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-md); padding: 11px 20px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }

.rd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }

.rd-filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.rd-search { flex: 1 1 200px; min-width: 180px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; }
.rd-filter-field { display: flex; flex-direction: column; gap: 4px; }
.rd-filter-field label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-muted); }
.rd-select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12.5px; background: var(--bg-card); }

.rd-filtered-total { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; background: var(--goldGlow, rgba(212,175,55,0.1)); border: 1px solid var(--gold); border-radius: var(--radius-md); padding: 10px 16px; margin-bottom: 16px; }
.rd-filtered-total-label { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--gold); }
.rd-filtered-total-amount { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.rd-filtered-total-meta { font-size: 11.5px; color: var(--ink-muted); }

.rd-table-wrap { overflow: visible; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); }
.rd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rd-table thead { background: var(--bg-dark); }
.rd-table th { text-align: left; padding: 11px 14px; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.rd-table th.rd-sortable { cursor: pointer; user-select: none; }
.rd-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.rd-table tr:hover td { background: var(--gold-glow); }
.rd-empty { text-align: center; color: var(--ink-muted); padding: 30px; }
.rd-carrier-chip { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.rd-amt { font-weight: 700; }
.rd-amt-wrap { position: relative; display: inline-block; cursor: help; }
.rd-hover-hint { display: block; font-size: 9.5px; color: var(--ink-muted); font-weight: 500; margin-top: 1px; }
.rd-icon-btn { background: none; border: 1px solid var(--line); border-radius: 6px; width: 28px; height: 28px; margin-left: 4px; cursor: pointer; font-size: 13px; color: var(--ink-muted); }
.rd-icon-btn:hover { color: var(--ink); border-color: var(--ink-muted); }

.rd-history-pop { position: absolute; top: 100%; left: 0; margin-top: 8px; width: 250px; background: var(--bg-dark); color: #fff; border-radius: var(--radius-sm); padding: 14px; font-size: 11.5px; box-shadow: 0 12px 30px rgba(0,0,0,0.25); z-index: 50; }
.rd-history-pop::before { content: ''; position: absolute; top: -6px; left: 20px; width: 12px; height: 12px; background: var(--bg-dark); transform: rotate(45deg); }
.rd-hist-title { font-size: 9.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.rd-hist-loading { color: rgba(255,255,255,0.6); }
.rd-hist-item { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.rd-hist-item:last-child { border-bottom: none; }
.rd-hist-amt { font-weight: 700; }
.rd-hist-meta { color: rgba(255,255,255,0.55); font-size: 10px; text-align: right; }

.rd-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 7000; padding: 20px; }
.rd-modal { background: var(--bg-card); border-radius: 14px; max-width: 460px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.3); }
.rd-modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.rd-modal-title { font-family: var(--font-display); font-size: 19px; color: var(--ink); }
.rd-modal-close { background: none; border: none; font-size: 20px; color: var(--ink-muted); cursor: pointer; }
.rd-modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.rd-modal-body label { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-muted); margin-top: 10px; }
.rd-modal-body input, .rd-modal-body select { padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; }
.rd-modal-footer { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.rd-cancel-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; color: var(--ink-muted); }
.rd-save-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* =========================================================
   CLIENT TRACKER REDESIGN
   ========================================================= */
.ct-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.ct-tab { background: none; border: none; padding: 10px 4px; margin-right: 22px; font-size: 13.5px; font-weight: 700; color: var(--ink-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.ct-tab.active { color: var(--ink); border-bottom-color: var(--gold); }

.ct-top-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; margin-bottom: 16px; }
.ct-kpi-hero { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.ct-kpi-hero-top { display: flex; align-items: center; justify-content: space-between; text-align: left; margin-bottom: 8px; gap: 8px; }
.ct-kpi-hero-top .l { margin-bottom: 0; }
.ct-kpi-month-select { font-size: 10.5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg-card); color: var(--ink); font-family: var(--font-body); cursor: pointer; }
.ct-kpi-hero .l { font-size: 11.5px; font-weight: 700; color: var(--ink-muted); margin-bottom: 8px; }
.ct-kpi-hero .v { font-family: var(--font-display); font-size: 34px; color: var(--gold); line-height: 1; margin-bottom: 6px; }
.ct-kpi-hero .s { font-size: 10.5px; color: var(--ink-muted); }

.ct-pending-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; }
.ct-pending-head h3 { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
.ct-pc-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ct-pc-row .name { width: 130px; font-size: 12px; font-weight: 700; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-pc-row .cnt { width: 55px; font-size: 10px; color: var(--ink-muted); flex-shrink: 0; }
.ct-pc-row .bar-wrap { flex: 1; height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.ct-pc-row .bar { height: 100%; background: var(--gold); border-radius: 6px; }
.ct-pc-row .amt { width: 65px; text-align: right; font-size: 12px; font-weight: 700; flex-shrink: 0; }

.ct-reset-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 12px; font-weight: 700; color: var(--ink-muted); cursor: pointer; }
.ct-date-cell { font-size: 11.5px; color: var(--ink-soft); }
.ct-amt-neg { color: #C0392B; font-weight: 700; }
.ct-icon-btn { background: none; border: 1px solid var(--line); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 13px; color: var(--ink-muted); }
.ct-icon-btn:hover { color: var(--ink); border-color: var(--ink-muted); }

.ct-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--ink-muted); flex-wrap: wrap; gap: 10px; }
.ct-pagesize select { margin-left: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.ct-pagenav { display: flex; align-items: center; gap: 12px; }
.ct-page-btn { background: none; border: 1px solid var(--line); border-radius: 6px; width: 30px; height: 30px; cursor: pointer; font-size: 15px; color: var(--ink); }
.ct-page-btn:disabled { opacity: 0.35; cursor: default; }

/* Side drawer */
.ct-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; align-items: flex-start; justify-content: flex-end; z-index: 6000; }
.ct-drawer-overlay.open { display: flex; }
.ct-drawer { background: var(--bg-card); width: 440px; max-width: 94vw; height: 100%; box-shadow: -8px 0 30px rgba(0,0,0,0.15); overflow-y: auto; }
.ct-drawer-head { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: center; }
.ct-drawer-close { background: none; border: none; font-size: 18px; color: var(--ink-muted); cursor: pointer; }
.ct-drawer-titlewrap { padding: 12px 22px 18px; border-bottom: 1px solid var(--line); }
.ct-drawer-title { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.ct-drawer-sub { font-size: 12.5px; color: var(--ink-muted); margin-top: 4px; }
.ct-drawer-kpis { display: flex; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.ct-drawer-mini { flex: 1; background: var(--gold-glow); border-radius: var(--radius-sm); padding: 12px; }
.ct-drawer-mini .l { font-size: 9.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.ct-drawer-mini .v { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.ct-drawer-section { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.ct-drawer-section h4 { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.ct-drawer-kv { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 10px; gap: 10px; }
.ct-drawer-kv .l { color: var(--ink-muted); flex-shrink: 0; }
.ct-drawer-kv .v { font-weight: 600; text-align: right; }
.ct-drawer-footer { display: flex; gap: 10px; justify-content: flex-end; }
.ct-edit-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.ct-archive-btn { background: none; border: 1px solid #C0392B; color: #C0392B; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.ct-delete-btn { background: #C0392B; border: 1px solid #C0392B; color: #fff; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* =========================================================
   COMMISSION OVERRIDES REDESIGN
   ========================================================= */
.sov-detail-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 16px; margin-bottom: 10px; }
.sov-dtab { background: none; border: none; padding: 10px 4px; margin-right: 20px; font-size: 12.5px; font-weight: 700; color: var(--ink-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.sov-dtab.active { color: var(--ink); border-bottom-color: var(--gold); }
.sov-date-basis { margin: 0 16px 12px; font-size: 10.5px; color: var(--ink-muted); background: var(--gold-glow); display: inline-block; padding: 4px 10px; border-radius: 20px; }

.sov-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 16px 14px; }
.sov-search { flex: 1; min-width: 200px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12px; }
.sov-select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12px; background: var(--bg-card); }
.sov-clear-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 12px; font-weight: 700; color: var(--ink-muted); cursor: pointer; }

.sov-table th, .sov-table td { padding-left: 14px; padding-right: 14px; }
.sov-table .sov-row { cursor: pointer; }
.sov-carrier-plan .c { font-weight: 700; font-size: 13px; }
.sov-carrier-plan .p { font-size: 11px; color: var(--ink-muted); }
.sov-amt-pos { font-weight: 700; color: #1B7F4B; }
.sov-amt-neg { font-weight: 700; color: #C0392B; }

.sov-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; align-items: flex-start; justify-content: flex-end; z-index: 6000; }
.sov-drawer-overlay.open { display: flex; }
.sov-drawer { background: var(--bg-card); width: 440px; max-width: 94vw; height: 100%; box-shadow: -8px 0 30px rgba(0,0,0,0.15); overflow-y: auto; }
.sov-drawer-head { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: center; }
.sov-drawer-close { background: none; border: none; font-size: 18px; color: var(--ink-muted); cursor: pointer; }
.sov-drawer-titlewrap { padding: 12px 22px 18px; border-bottom: 1px solid var(--line); }
.sov-drawer-title { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.sov-drawer-sub { font-size: 12.5px; color: var(--ink-muted); margin-top: 4px; }
.sov-drawer-kpis { display: flex; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.sov-drawer-mini { flex: 1; background: var(--gold-glow); border-radius: var(--radius-sm); padding: 12px; }
.sov-drawer-mini .l { font-size: 9.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.sov-drawer-mini .v { font-family: var(--font-display); font-size: 20px; }
.sov-drawer-section { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.sov-drawer-section h4 { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.sov-drawer-kv { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 10px; gap: 10px; }
.sov-drawer-kv .l { color: var(--ink-muted); flex-shrink: 0; }
.sov-drawer-kv .v { font-weight: 600; text-align: right; }
.sov-drawer-note { padding: 16px 22px; font-size: 12px; color: var(--ink-muted); background: var(--bg-page); }

/* =========================================================
   LICENSING — shared fee schedule
   ========================================================= */
.lic-fee-wrap { position: relative; display: inline-block; cursor: help; }
.lic-fee-hint { display: block; font-size: 9px; color: var(--ink-muted); font-weight: 500; text-decoration: underline dotted; }
.lic-fee-pop { position: absolute; top: 100%; right: 0; margin-top: 6px; width: 200px; background: var(--bg-dark); color: #fff; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 11.5px; line-height: 1.5; box-shadow: 0 10px 24px rgba(0,0,0,0.25); z-index: 50; text-align: left; white-space: normal; }

.lic-fee-preview-box { background: var(--bg-page); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.lic-fee-preview-title { font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.lic-fee-preview-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.lic-fee-preview-notes { margin-top: 8px; font-size: 12px; color: var(--ink-soft); background: var(--gold-glow); padding: 8px 10px; border-radius: 6px; }
.lic-fee-preview-empty { font-size: 12.5px; color: var(--ink-muted); margin-bottom: 10px; }
.lic-row-empty td { color: var(--ink-muted); }
.lic-row-empty td:first-child { color: var(--ink); font-weight: 600; }

/* =========================================================
   ROLLED DEBT — status badge, drawer, activity timeline
   ========================================================= */
.rd-status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.rd-status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.rd-status-badge.rd-s-outstanding { color: #C0392B; } .rd-status-badge.rd-s-outstanding .rd-status-dot { background: #C0392B; }
.rd-status-badge.rd-s-resolved { color: #1B7F4B; } .rd-status-badge.rd-s-resolved .rd-status-dot { background: #1B7F4B; }

.rd-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; align-items: flex-start; justify-content: flex-end; z-index: 6000; }
.rd-drawer-overlay.open { display: flex; }
.rd-drawer { background: var(--bg-card); width: 420px; max-width: 94vw; height: 100%; box-shadow: -8px 0 30px rgba(0,0,0,0.15); overflow-y: auto; }
.rd-drawer-head { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: center; }
.rd-drawer-close { background: none; border: none; font-size: 18px; color: var(--ink-muted); cursor: pointer; }
.rd-drawer-titlewrap { padding: 12px 22px 18px; border-bottom: 1px solid var(--line); }
.rd-drawer-title { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.rd-drawer-sub { margin-top: 6px; }
.rd-drawer-kpis { display: flex; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.rd-drawer-mini { flex: 1; background: var(--gold-glow); border-radius: var(--radius-sm); padding: 12px; }
.rd-drawer-mini .l { font-size: 9.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.rd-drawer-mini .v { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.rd-drawer-section { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.rd-drawer-section h4 { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.rd-drawer-kv { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 10px; gap: 10px; }
.rd-drawer-kv .l { color: var(--ink-muted); flex-shrink: 0; }
.rd-drawer-kv .v { font-weight: 600; text-align: right; }
.rd-drawer-footer { display: flex; gap: 10px; justify-content: flex-end; }
.rd-edit-btn { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.rd-archive-btn { background: none; border: 1px solid #C0392B; color: #C0392B; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 12.5px; cursor: pointer; }

.rd-timeline { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; max-height: 300px; overflow-y: auto; }
.rd-timeline-item { display: flex; gap: 10px; }
.rd-timeline-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.rd-timeline-body-col { flex: 1; }
.rd-timeline-meta { font-size: 11px; color: var(--ink-muted); margin-bottom: 2px; }
.rd-system-tag { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.rd-timeline-text { font-size: 13px; color: var(--ink); line-height: 1.5; }
.rd-note-input { display: flex; gap: 8px; align-items: flex-end; }
.rd-note-input textarea { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12.5px; resize: vertical; }
.rd-note-save { background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; }

/* =========================================================
   ONBOARDING TOUR — chunk picker, spotlight overlay, and the
   one-time announcement banner for existing agents.
   ========================================================= */

/* ---- chunk picker ---- */
.tour-picker-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9990; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.picker-wrap { max-width: 680px; width: 100%; background: var(--bg-page); border-radius: var(--radius-lg); padding: 36px 32px; box-shadow: 0 24px 60px rgba(0,0,0,0.35); }
.picker-head { margin-bottom: 22px; }
.picker-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #8a6d10; margin-bottom: 4px; }
.picker-title { font-family: var(--font-display); font-size: 28px; color: var(--ink); letter-spacing: -0.3px; margin-bottom: 6px; }
.picker-sub { font-size: 13px; color: var(--ink-muted); }
.picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.picker-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; cursor: pointer; transition: border-color 0.15s ease; }
.picker-card:hover { border-color: var(--gold); }
.picker-card-done { border-color: var(--gold); background: var(--gold-glow); }
.picker-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.picker-card-name { font-family: var(--font-display); font-size: 19px; color: var(--ink); }
.picker-card-check { width: 20px; height: 20px; border-radius: 50%; background: #D4AF37; color: #0f0f0f; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.picker-card-count { font-size: 11px; color: var(--ink-muted); margin-bottom: 10px; }
.picker-card-items { font-size: 11.5px; color: var(--ink-soft); line-height: 1.6; }
.picker-skip-row { text-align: center; }
.picker-skip-row a { font-size: 12.5px; color: var(--ink-muted); text-decoration: underline; cursor: pointer; }

@media (max-width: 640px) {
  .picker-grid { grid-template-columns: 1fr; }
  .picker-wrap { padding: 26px 20px; }
}

/* ---- spotlight overlay ---- */
.tour-dim { position: fixed; inset: 0; z-index: 9991; pointer-events: none; }
.tour-dim.tour-dim-full { background: rgba(10,10,10,0.72); pointer-events: auto; }
.tour-cutout { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(10,10,10,0.72); transition: all 0.2s ease; pointer-events: none; }
.tour-card { position: fixed; width: 270px; background: #fff; border-radius: var(--radius-md); box-shadow: 0 16px 40px rgba(0,0,0,0.35); padding: 16px 18px; z-index: 9992; pointer-events: auto; }
.tour-progress { font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.tour-title { font-family: var(--font-display); font-size: 19px; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.2px; }
.tour-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 14px; }
.tour-dots { display: flex; gap: 5px; margin-bottom: 14px; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-dot.active { background: #D4AF37; width: 16px; border-radius: 3px; }
.tour-footer { display: flex; justify-content: space-between; align-items: center; }
.tour-skip { font-size: 11.5px; color: var(--ink-muted); background: none; border: none; cursor: pointer; text-decoration: underline; }
.tour-btns { display: flex; gap: 8px; }
.tour-btn-back { font-size: 12px; font-weight: 600; color: var(--ink-soft); background: none; border: 1px solid var(--line); border-radius: 7px; padding: 7px 13px; cursor: pointer; }
.tour-btn-next { font-size: 12px; font-weight: 700; color: #0f0f0f; background: #D4AF37; border: none; border-radius: 7px; padding: 7px 15px; cursor: pointer; }

/* ---- one-time announcement banner (existing agents) ---- */
.ann-banner { display: flex; align-items: center; gap: 14px; background: var(--bg-card); border: 1px solid var(--gold); border-left: 3px solid var(--gold); border-radius: var(--radius-md); padding: 14px 16px; margin: 0 0 18px; }
.ann-banner-icon { width: 34px; height: 34px; border-radius: 50%; background: #111; color: #D4AF37; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.ann-banner-text { flex: 1; }
.ann-banner-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.ann-banner-sub { font-size: 11.5px; color: var(--ink-muted); }
.ann-banner-btns { display: flex; gap: 8px; flex-shrink: 0; }
.ann-banner-take { font-size: 12px; font-weight: 700; color: #0f0f0f; background: #D4AF37; border: none; border-radius: 7px; padding: 8px 14px; cursor: pointer; }
.ann-banner-dismiss { font-size: 12px; font-weight: 600; color: var(--ink-muted); background: none; border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; cursor: pointer; }

@media (max-width: 640px) {
  .ann-banner { flex-wrap: wrap; }
  .ann-banner-btns { width: 100%; }
  .ann-banner-btns button { flex: 1; }
}
