:root {
  --bg-dark:       #003C60;
  --bg-dark-soft:  #00507F;
  --gold:          #00799C;
  --gold-soft:     #DDF1F8;
  --gold-glow:     rgba(0, 121, 156, 0.12);
  --gold-deep:     #00607C; /* darker end of gold gradients; derived per agency in applyAgencyBranding */
  --ink:           #1E3442;
  --ink-soft:      #3D5566;
  --ink-muted:     #52687A;
  --line:          #DCE5EB;
  --bg-card:       #FFFFFF;
  --bg-page:       #F4F7F9;
  --font-display:  'Figtree', system-ui, sans-serif;
  --font-body:     'Figtree', system-ui, sans-serif;
  --radius-lg:     14px;
  --radius-md:     12px;
  --radius-sm:     8px;
  --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:            #F4F7F9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-page);
  font-size: 15px;
  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: 130px; height: auto; max-width: 100%; border-radius: 0; border: 0; box-shadow: none; object-fit: contain; }

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

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

.login-card label {
  display: block;
  text-align: left;
  font-size: 12px;
  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: 15px;
  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: 15px;
  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: 14px;
  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: 14px;
  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: 14px;
}

.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: 16px;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-sub {
  font-size: 11px;
  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: 11px;
  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: 11px;
  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-badge {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #003C60;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.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:#fff;
  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: 14px;
  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, var(--gold) 0%, var(--gold-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color:#fff;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

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

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

.sf-role {
  color: var(--gold);
  font-size: 11px;
  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: 12px;
  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: 12px;
  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: 13px;
  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: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

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

.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: 14px;
  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: 14px;
  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: 14px;
}

.simple-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-page);
  font-size: 12px;
  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: 12px;
  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: 14px; 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: 12px; 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: 14px; 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:#fff; }
.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: 14px; 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: 12px; 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: 40px; line-height: 1; letter-spacing: -1px; }
.prod-card .pc-sub { margin-top: 8px; font-size: 13px; 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: 15px; }
.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: 12px; color: var(--ink-muted); font-weight: 600; }
.prod-notice { background: color-mix(in srgb, var(--gold) 10%, transparent); border: 1px solid var(--gold); border-radius: var(--radius-sm); padding: 10px 16px; font-size: 14px; 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: 14px; 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:var(--bg-dark); 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:14px; 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:13px; 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:var(--gold); border-radius:5px; opacity:0.75; transition:width 0.3s ease; }
.snap-bar-fill.top { background:linear-gradient(90deg,var(--gold),var(--gold-deep)); opacity:1; }
.snap-bar-amt { font-size:12px; 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:12px; font-weight:600; color:var(--ink); margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.snap-agent-total { font-size:15px; font-weight:700; color:var(--ink); line-height:1.2; }
.snap-agent-count { font-size:11px; 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:11px; 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:12px; 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:14px; 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:var(--gold); font-weight:700; }
.p25-bar-label { font-size:12px; 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:var(--gold); border-radius:4px; opacity:0.75; }
.p25-bar-fill.self { background:linear-gradient(90deg,var(--gold),var(--gold-deep)); opacity:1; }
.p25-bar-amt { font-size:12px; 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,var(--bg-dark) 0%,var(--bg-dark-soft) 100%); border-radius:12px; padding:14px 18px; border-left:3px solid var(--gold); 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:14px; 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:12px; 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:14px; 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:12px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-muted); }
  .debt-select { font-size:14px; 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:12px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-muted); margin-bottom:4px; }
  .debt-carrier-date { font-size:12px; 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:14px; color:var(--ink); }
  .debt-agent-amt { font-size:14px; font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; }
  .debt-flag { display:inline-block; font-size:11px; 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,var(--gold),var(--gold-deep)); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-size:16px; color:#fff; 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:12px; 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:13px; 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:13px; 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:13px; 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:12px; font-weight:600; color:#8a6d10; cursor:pointer; user-select:none; transition:background 0.15s ease; }
  .hist-weeks-toggle:hover { background:color-mix(in srgb, var(--gold) 5%, transparent); }
  .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:13px; }
  .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:12px; }
  .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:14px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .hist-gran-toggle button.active { background:var(--bg-dark); color:var(--gold); }
  .hist-weekly-note { font-size:12px; 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:14px; font-weight:600; color:var(--ink); }
  .hist-latest-badge { font-size:11px; 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:12px; 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:15px; 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:13px; 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:14px; 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:14px; }
  .hist-carrier-table th { background:var(--bg-dark); color:#fff; text-align:right; padding:9px 12px; font-size:12px; 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:color-mix(in srgb, var(--gold) 4%, transparent); }
  .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: 12px; 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: 14px; color: var(--ink-soft); }
  .home-greeting .hg-refresh { font-size: 12px; 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: 11px; 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: 11px; 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: 12px; }
  .kpi-card.kpi-mini .kpi-pill { padding: 2px 7px; font-size: 11px; }
  .kpi-card .kc-sub { font-size: 12px; 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: 13px; 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: 12px; 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: 12px; 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: 11px; 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: 12px; 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: 12px; font-weight: 700; flex-shrink: 0; }
  .leader-rank.lr-1 { background: var(--gold); color:#fff; }
  .leader-rank.lr-2 { background: #c5c2b9; color: var(--ink); }
  .leader-rank.lr-3 { background: #cd7f32; color: #fff; }
  .leader-name { flex: 1; font-size: 14px; color: var(--ink); font-weight: 600; }
  .leader-count { font-size: 12px; color: var(--ink-muted); font-weight: 400; }
  .leader-amount { font-family: var(--font-display); font-size: 16px; 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: 12px; color: var(--ink-soft); font-weight: 600; text-align: center; }
  .rw-row .rw-name { flex: 1; font-size: 14px; color: var(--ink-soft); }
  .rw-row .rw-val { font-size: 12px; 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: 14px; color: var(--ink); font-weight: 700; }
  .rank-window .rw-row.rw-self .rw-name { font-size: 14px; color: var(--ink); font-weight: 700; }
  .rank-window .rw-row.rw-self .rw-val { font-family: var(--font-display); font-size: 15px; color: var(--ink); }
  .rank-window .rw-empty { padding: 16px; font-style: italic; color: var(--ink-muted); font-size: 14px; 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: 12px; 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: 14px; color: var(--ink); }
  .ha-text strong { font-weight: 700; }
  .ha-link { font-size: 12px; 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: 14px; }


  .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,var(--bg-dark) 0%,var(--bg-dark-soft) 100%); border-radius:var(--radius-md); border-left:3px solid var(--gold); padding:14px 16px; display:flex; align-items:center; gap:12px; }
  .ann-icon { font-size:28px; flex-shrink:0; width:42px; height:42px; display:flex; align-items:center; justify-content:center; background:color-mix(in srgb, var(--gold) 12%, transparent); border-radius:10px; }
  .ann-text { min-width:0; }
  .ann-title { font-size:14px; font-weight:700; color:#fff; line-height:1.3; margin-bottom:2px; }
  .ann-msg { font-size:12px; 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 var(--gold); 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 color-mix(in srgb, var(--gold) 50%, transparent); color:var(--gold); border-radius:var(--radius-md); padding:14px 18px; font-size:14px; font-weight:700; cursor:pointer; white-space:nowrap; }
  .ann-manage-btn:hover { background:color-mix(in srgb, var(--gold) 8%, transparent); }


/* =========================================================
   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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .sh-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .sh-refresh-btn { background:var(--gold); color:#fff; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:14px; 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:11px; 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:28px; 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:14px; font-weight:600; color:var(--ink); flex:1; }
  .sh-row-meta { font-size:12px; color:var(--ink-muted); }
  .sh-row-error { font-size:12px; 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:14px; font-style:italic; }


/* Refresh button (shared by Production, Leaderboard, Book of Businessâ€¦).
   Kept from the retired Race to 100 page's styles because other pages rely on it. */

  .prod-refresh { font-size:13px; 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); }


/* =========================================================
   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: 14px; 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: 14px; 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: 14px; 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: 13px; 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: 13px; font-weight: 600; color: var(--ink); cursor: pointer; font-family: var(--font-body); }
  .bob-page-btn:hover:not(:disabled) { background: #FEF9EC; border-color: var(--gold); }
  .bob-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
  .bob-page-info { font-size: 12px; color: var(--ink-muted); }
  .stpill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; 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: 14px; }
  .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: 12px; 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: color-mix(in srgb, var(--gold) 5%, transparent); }
  .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: 13px; 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: 12px; font-weight: 700; padding: 4px 10px; border-radius: 5px; border: none; background: var(--gold); color:#fff; cursor: pointer; font-family: var(--font-body); letter-spacing: 0.3px; transition: all 0.15s ease; white-space: nowrap; box-shadow: 0 1px 3px color-mix(in srgb, var(--gold) 40%, transparent); }
  .bob-edit-btn:hover { background: var(--gold-deep); transform: scale(1.04); color:#fff; }
  .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: 14px; color: #8a6d10; line-height: 1.5; }
  .bob-tip-dismiss { background: none; border: none; color: #8a6d10; font-size: 14px; 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: 13px; 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: 12px; 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: 36px; line-height: 1; letter-spacing: -1px; }
  .comm-card .cc-sub { margin-top: 8px; font-size: 13px; 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: 14px; 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: 12px; 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; background: color-mix(in srgb, var(--gold) 7%, transparent); }
  .comm-table th.total-col { background: var(--gold-glow); color: var(--gold); }
  .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: var(--gold); }
  .comm-table tr.totals-row td.total-col { background: #1a1a1a; color: var(--gold); }
  .comm-table tbody tr:hover td { background: color-mix(in srgb, var(--gold) 4%, transparent); }
  .comm-table tbody tr:hover td.name-col { background: color-mix(in srgb, var(--gold) 4%, transparent); }
  .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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .pres-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }

  .pres-add-btn { background:var(--gold); color:#fff; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:14px; 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:14px; font-weight:600; color:var(--ink); }
  .pres-search { font-size:13px; 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:13px; 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:var(--gold); }
  .pres-page-btn:disabled { opacity:0.4; cursor:not-allowed; }
  .pres-page-info { font-size:12px; 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:14px; font-weight:600; color:var(--ink); }
  .pres-entry-date { font-size:12px; color:var(--ink-muted); white-space:nowrap; }
  .pres-entry-disposition { font-size:13px; color:#8a6d10; font-weight:600; margin-bottom:8px; }
  .pres-entry-meta { font-size:14px; color:var(--ink-soft); font-weight:500; margin-bottom:8px; }
  .pres-entry-notes { font-size:13px; 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:12px; 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:11px; 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:12px; 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:11px; 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:14px; 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:var(--gold); color:#fff; border:none; border-radius:8px; padding:11px; font-family:var(--font-body); font-size:14px; 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:13px; 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:14px; }

  .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:20px; 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:14px; 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:15px; 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:14px; 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:14px; 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:14px; font-weight:700; color:#fff; 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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .na-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .na-sub { font-size:14px; color:var(--ink-muted); margin-top:4px; max-width:480px; }
  .na-add-btn { background:var(--gold); color:#fff; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:14px; 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:12px; 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:14px; font-family:var(--font-body); color:var(--ink); background:var(--bg-card); outline:none; }
  .na-search:focus { border-color:var(--gold); }
  .na-sort-select { padding:8px 12px; border:1px solid var(--line); border-radius:8px; font-size:13px; 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:11px; 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:11px; 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:var(--bg-dark); color:var(--gold); 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:var(--gold); }
  .na-card-archived { opacity:0.55; background:rgba(0,0,0,0.015); }
  .na-archived-badge { font-size:11px; 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:15px; font-weight:700; color:var(--ink); }
  .na-date { font-size:12px; color:var(--ink-muted); margin-top:2px; }
  .na-status-pill { font-size:12px; 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:12px; color:var(--ink-soft); margin-bottom:8px; line-height:1.5; }
  .na-carriers b { color:var(--ink); font-weight:600; }
  .na-notes { font-size:12px; 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:14px; }

  .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:var(--gold); }

  .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:12px; 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:14px; 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:12px; font-weight:600; color:var(--ink-soft); cursor:pointer; }
  .na-edit-btn { background:var(--gold); border:none; border-radius:7px; padding:7px 16px; font-size:13px; font-weight:700; color:#fff; cursor:pointer; }
  .na-delete-link { background:none; border:none; font-size:12px; 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:20px; 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:11px; 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:14px; 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:13px; 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:14px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .na-btn-primary { background:var(--gold); border:none; border-radius:8px; padding:9px 20px; font-size:14px; font-weight:700; color:#fff; 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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .rec-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .rec-filters { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
  .rec-pill { font-size:12px; 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:var(--gold); color:#fff; border-color:var(--gold); }
  .rec-month-select { font-size:13px; 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:var(--bg-dark); border-color:#111; }
  .rec-kpi .kl { font-size:11px; 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:var(--gold); }

  .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:11px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:#8a6d10; margin-bottom:3px; }
  .rec-rate-sub { font-size:12px; color:#8a6d10; }
  .rec-rate-val { font-family:var(--font-display); font-size:32px; color:var(--gold-deep); 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:14px; 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:12px; 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:12px; 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:11px; font-weight:700; letter-spacing:0.8px; text-transform:uppercase; color:#8a6d10; margin-bottom:3px; }
  .rec-computed-item b { font-size:18px; color:#8a6d10; font-family:var(--font-display); }
  .rec-field label { display:block; font-size:11px; 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:14px; 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:var(--gold); color:#fff; border:none; border-radius:8px; padding:11px; font-family:var(--font-body); font-size:14px; 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:13px; 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:20px; 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:14px; 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:14px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .prod-toggle button.active { background:var(--bg-dark); color:var(--gold); }
  .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:var(--gold); color:#fff; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:14px; 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:14px; }
  .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:12px; 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:color-mix(in srgb, var(--gold) 4%, transparent); 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:14px; }
  .rec-appt-delete-btn { background:none; border:none; padding:0; font-size:12px; 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:11px; 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:14px; 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:var(--gold); border:none; border-radius:8px; padding:9px 20px; font-size:14px; font-weight:700; color:#fff; cursor:pointer; }
  .rec-btn-primary:disabled { opacity:0.5; cursor:not-allowed; }
  .rec-form-msg { font-size:13px; 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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .rec-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .rec-filters { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
  .rec-pill { font-size:12px; 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:var(--gold); color:#fff; border-color:var(--gold); }
  .rec-month-select { font-size:13px; 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:var(--bg-dark); border-color:#111; }
  .rec-kpi .kl { font-size:11px; 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:var(--gold); }

  .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:11px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:#8a6d10; margin-bottom:3px; }
  .rec-rate-sub { font-size:12px; color:#8a6d10; }
  .rec-rate-val { font-family:var(--font-display); font-size:32px; color:var(--gold-deep); 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:14px; 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:12px; 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:12px; 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:11px; font-weight:700; letter-spacing:0.8px; text-transform:uppercase; color:#8a6d10; margin-bottom:3px; }
  .rec-computed-item b { font-size:18px; color:#8a6d10; font-family:var(--font-display); }
  .rec-field label { display:block; font-size:11px; 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:14px; 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:var(--gold); color:#fff; border:none; border-radius:8px; padding:11px; font-family:var(--font-body); font-size:14px; 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:13px; 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:20px; 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:14px; 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:14px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .prod-toggle button.active { background:var(--bg-dark); color:var(--gold); }
  .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:var(--gold); color:#fff; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:14px; 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:14px; }
  .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:12px; 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:color-mix(in srgb, var(--gold) 4%, transparent); 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:14px; }
  .rec-appt-delete-btn { background:none; border:none; padding:0; font-size:12px; 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:11px; 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:14px; 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:var(--gold); border:none; border-radius:8px; padding:9px 20px; font-size:14px; font-weight:700; color:#fff; cursor:pointer; }
  .rec-btn-primary:disabled { opacity:0.5; cursor:not-allowed; }
  .rec-form-msg { font-size:13px; 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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .ph-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .ph-add-btn { background:var(--gold); color:#fff; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:14px; 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:11px; 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:14px; }
  .ph-table thead tr { background:var(--bg-dark); }
  .ph-table th { padding:10px 14px; color:rgba(255,255,255,0.75); font-size:12px; 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:color-mix(in srgb, var(--gold) 4%, transparent); 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:14px; }

  .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:14px; font-weight:700; color:var(--ink); margin-bottom:2px; word-break:break-word; }
  .rl-shared-badge { display:inline-block; font-size:11px; 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:14px; 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:12px; font-weight:600; color:var(--gold); text-transform:uppercase; letter-spacing:0.3px; margin-bottom:4px; }
  .rl-card-desc { font-size:13px; color:var(--ink-soft); margin-bottom:6px; }
  .rl-card-meta { font-size:12px; 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:14px; 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:#fff; }

  .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:color-mix(in srgb, var(--gold) 4%, transparent); }
  .rl-list-icon { font-size:18px; line-height:1; flex-shrink:0; width:20px; text-align:center; }
  .rl-list-main { flex:1; min-width:0; }
  .rl-list-title { font-size:14px; font-weight:700; color:var(--ink); }
  .rl-list-meta { font-size:12px; 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:14px; color:var(--ink); cursor:pointer; border-radius:5px; white-space:nowrap; }
  .rl-action-menu button:hover { background:color-mix(in srgb, var(--gold) 10%, transparent); }
  .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:14px; font-weight:600; color:var(--ink); }
  .ph-vendor-roi-note { background:var(--bg-subtle, #F0EBDD); border-radius:8px; padding:10px 14px; font-size:12px; 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:20px; 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:11px; 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:14px; 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:13px; 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:14px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .ph-btn-primary { background:var(--gold); border:none; border-radius:8px; padding:9px 20px; font-size:14px; font-weight:700; color:#fff; 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:14px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .prod-toggle button.active { background:var(--bg-dark); color:var(--gold); }
  .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:14px; 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:12px; 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:color-mix(in srgb, var(--gold) 4%, transparent); 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:12px; 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:14px; 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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .ct-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .ct-add-btn { background:var(--gold); color:#fff; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:14px; 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:14px; 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:14px; }
  .ct-table thead tr { background:var(--bg-dark); }
  .ct-table th { padding:10px 14px; color:rgba(255,255,255,0.75); font-size:12px; 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:color-mix(in srgb, var(--gold) 4%, transparent); cursor:pointer; }
  .ct-table tr:last-child td { border-bottom:none; }
  .ct-no-date { color:#C0392B; font-style:italic; font-size:12px; }
  .ct-status-pill { font-size:12px; 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:12px; 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:14px; }

  /* 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:20px; 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:12px; 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:11px; 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:14px; 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:13px; 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:14px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .ct-btn-primary { background:var(--gold); border:none; border-radius:8px; padding:9px 20px; font-size:14px; font-weight:700; color:#fff; 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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .proj-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .proj-sub { font-size:13px; 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:12px; 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:11px; 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:14px; 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:11px; 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:var(--gold-deep); }
  .proj-result-value.muted { color:var(--ink-muted); font-size:15px; 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:12px; font-weight:600; }
  .proj-remove-btn:hover { color:#C0392B; }

  .proj-add-btn { font-size:14px; 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:var(--gold); color:var(--ink); border-style:solid; }

  .proj-total-bar { background:var(--bg-dark); 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:12px; 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:32px; color:var(--gold); }
  .proj-josh-level { font-size:12px; color:rgba(255,255,255,0.4); }

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

  /* ---- 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:14px; font-weight:600; color:var(--ink-soft); }
  .proj-est-field-head span { font-size:14px; font-weight:700; color:var(--ink); }
  .proj-est-subline { font-size:12px; 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:var(--gold); 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:var(--gold);
    border:2px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,0.25); cursor:pointer;
  }

  .proj-est-results-panel { background:var(--bg-dark); border-radius:var(--radius-md); padding:18px 20px; }
  .proj-est-results-eyebrow { font-size:12px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:var(--gold); 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:12px; 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:13px; color:rgba(255,255,255,0.6); }
  .proj-est-net-value { font-family:var(--font-display); font-size:28px; color:var(--gold); }
  .proj-est-net-sub { font-size:12px; 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:var(--gold); cursor:pointer; }
  .persist-toggle-row label { font-size:14px; 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:20px; 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:12px; 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:14px; 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:12px; font-weight:600; cursor:pointer; }
  .cmp-remove:hover { color:#C0392B; }
  .cmp-mini-stats { display:grid; grid-template-columns:1fr 1fr; gap:8px; background:var(--bg-dark); border-radius:8px; padding:12px 14px; margin-top:12px; }
  .cmp-mini-stat-label { font-size:11px; color:rgba(255,255,255,0.5); margin-bottom:2px; }
  .cmp-mini-stat-value { font-size:15px; 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:12px; color:rgba(255,255,255,0.6); }
  .cmp-mini-net span:last-child { font-family:var(--font-display); font-size:18px; color:var(--gold); }

  @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: 12px; 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: 14px; 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: 14px; 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: 12px; 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: 11px; 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: 28px; line-height: 1; color: var(--ink); letter-spacing: -0.5px; }
  .sd-kpi .kc-value.amber { color: var(--gold-deep); }
  .sd-kpi .kc-value.green { color: #1B7F4B; }
  .sd-kpi .kc-value.red { color: #C0392B; }
  .sd-kpi .kc-sub { font-size: 12px; 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: 14px; font-weight: 600; color: var(--ink); }
  .sd-toggle-group { display: flex; gap: 5px; }
  .sd-toggle { font-size: 12px; 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: var(--gold); color:#fff; border-color: var(--gold); 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: 14px; font-weight: 700; color: var(--ink); }
  .sd-bar-count { font-size: 12px; font-weight: 500; color: var(--ink-muted); margin-left: 6px; }
  .sd-bar-amt { font-size: 14px; 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: 14px; border-collapse: collapse; }
  .sd-table th { text-align: left; padding: 10px 0 8px; color: var(--ink-soft); font-weight: 600; font-size: 12px; 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: 14px; }
  .sd-table td.r { text-align: right; }
  .sd-table td.muted { color: var(--ink-soft); }
  .sd-table td.amber { color: var(--gold-deep); 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: 12px; 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: 14px; font-style: italic; color: var(--ink-muted); }
  .sd-loading { padding: 40px 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
  .np-pill { font-size:12px; 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:var(--gold); color:#fff; border-color:var(--gold); }
  .np-grid { display:flex; flex-direction:column; gap:8px; max-width:380px; }
  .np-line { display:flex; justify-content:space-between; font-size:14px; 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:16px; 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:14px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; transition:all 0.15s ease; }
  .prod-toggle button.active { background:var(--bg-dark); color:var(--gold); }

/* =========================================================
   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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .ms-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .ms-month-select { font-size:13px; 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:11px; 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:14px; 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: 14px; font-weight: 700; color: var(--ink); }
  .ms-bar-count { font-size: 12px; font-weight: 500; color: var(--ink-muted); margin-left: 6px; }
  .ms-bar-amt { font-size: 14px; 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: 12px; font-weight: 700; color: var(--ink-muted); border-radius: 6px; cursor: pointer; }
  .ms-toggle-group button.active { background: var(--bg-dark); color: var(--gold); }
  .ms-table { width:100%; border-collapse:collapse; font-size:14px; }
  .ms-table th { background:var(--bg-dark); color:rgba(255,255,255,0.75); padding:9px 14px; font-size:12px; 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:color-mix(in srgb, var(--gold) 4%, transparent); }
  .ms-empty { padding:32px; text-align:center; font-style:italic; color:var(--ink-muted); font-size:14px; }

  .np-pill { font-size:12px; 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:var(--gold); color:#fff; border-color:var(--gold); }
  .np-grid { display:flex; flex-direction:column; gap:8px; max-width:380px; }
  .np-line { display:flex; justify-content:space-between; font-size:14px; 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:16px; 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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .act-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .act-sub { font-size:14px; 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:12px; 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:var(--gold); color:#fff; border-color:var(--gold); }

  .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:12px; 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:14px; font-weight:700; color:var(--ink); white-space:nowrap; }
  .act-funnel-rate-label { font-size:11px; 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:11px; 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:14px; font-weight:600; color:var(--ink); }

  .act-table-wrap { overflow-x:auto; }
  .act-table { width:100%; border-collapse:collapse; font-size:14px; }
  .act-table th { background:var(--bg-dark); color:rgba(255,255,255,0.75); padding:9px 14px; font-size:12px; 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:var(--gold-deep); font-weight:600; }
  .act-table tr:hover td { background:color-mix(in srgb, var(--gold) 4%, transparent); }
  .act-delete-btn { background:none; border:none; padding:0; font-size:12px; 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:12px; color:var(--ink-muted); }
  .act-field-group { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .act-field label { display:block; font-size:11px; 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:14px; 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:var(--gold); color:#fff; border:none; border-radius:8px; padding:11px; font-family:var(--font-body); font-size:14px; 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:13px; 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:14px; }

  .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:20px; 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:14px; 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:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:#8a6d10; margin-bottom:4px; }
  .dep-title { font-family:var(--font-display); font-size:28px; color:var(--ink); letter-spacing:-0.3px; }
  .dep-add-btn { background:var(--gold); color:#fff; border:none; border-radius:8px; padding:10px 20px; font-family:var(--font-body); font-size:14px; 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:11px; 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:13px; font-weight:600; color:var(--ink-muted); border-radius:7px; cursor:pointer; }
  .dep-pill.active { background:var(--bg-dark); color:var(--gold); }
  .dep-select { padding:8px 12px; border:1px solid var(--line); border-radius:8px; font-size:14px; 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:14px; 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:14px; font-weight:700; color:var(--ink); }
  .dep-bar-amt { font-size:14px; 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:color-mix(in srgb, var(--gold) 4%, transparent); }
  .dep-day-left { display:flex; align-items:center; gap:10px; }
  .dep-day-date { font-size:14px; font-weight:600; color:var(--ink); }
  .dep-day-count { font-size:12px; color:var(--ink-muted); }
  .dep-day-total { font-family:var(--font-display); font-size:18px; 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:13px; 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:14px; }

  .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:20px; 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:11px; 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:14px; 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:13px; 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:14px; font-weight:600; color:var(--ink-muted); cursor:pointer; }
  .dep-btn-primary { background:var(--gold); border:none; border-radius:8px; padding:9px 20px; font-size:14px; font-weight:700; color:#fff; 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: 12px; 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: 28px; color: var(--ink); line-height: 1.1; }
.set-sub { font-size: 14px; color: var(--ink-muted); margin-top: 4px; max-width: 480px; }

.set-add-btn { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 10px 18px; font-family: var(--font-body); font-size: 14px; 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: 14px; }
.set-table th { text-align: left; padding: 10px 16px; background: var(--bg-page); font-size: 12px; 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: 12px; 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: 13px; 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: 12px; 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: 12px; 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: 14px; 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:#fff; border: none; border-radius: var(--radius-sm); padding: 10px 20px; font-family: var(--font-body); font-size: 14px; 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: 14px; font-weight: 600; color: var(--ink-muted); cursor: pointer; }
.set-btn-secondary:hover { background: var(--bg-page); }

.set-form-msg { font-size: 13px; 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: 12px; 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: 14px; 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: 14px; 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: 12px; 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: 12px; 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: 12px; 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: 12px; 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: 12px; 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: 16px; 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:#fff; 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: 15px; 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: 14px; 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: 12px; 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: 14px; }

/* =========================================================
   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:#fff; 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: var(--bg-dark); color: var(--gold); border: none; font-size: 20px; 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: 16px; 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: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: #8a6d10; margin-bottom: 4px; }
.help-current-desc { font-size: 14px; color: var(--ink); line-height: 1.5; }
.help-all-label { font-size: 12px; 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: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.help-item-desc { font-size: 13px; 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: 11px; 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: 28px; 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: 12px; 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: 14px; 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: 12px; 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: 13px; 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: 22px; color: var(--ink); line-height: 1; }
.act-icon-label { font-size: 12px; 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: 12px; 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: 12px; color: var(--ink); margin-top: 4px; }
.act-rate-sub { font-size: 12px; 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: 12px; 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: 14px; 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: 20px; 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: 12px; 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: 12px; padding: 6px 10px; }
.act-power-manual { font-size: 12px; 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:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 14px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 4px; }
.act-log-presentation-btn { width: 100%; background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12px; font-weight: 700; cursor: pointer; margin-top: 10px; }
.act-manual-toggle-link { font-size: 12px; 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: 13px; 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: 12px; 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: 12px; color: var(--ink-muted); }
.act-plain-rate-pill { font-size: 12px; 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: 12px; 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: 32px; 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: 16px; font-weight: 700; color: var(--gold); }
.act-funnel-sub-label { font-size: 12px; 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: 14px; 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: 32px; color: var(--ink); margin-bottom: 4px; }
.pc-sub { font-size: 14px; color: var(--ink-soft); }
.pc-add-btn { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-md); padding: 11px 20px; font-weight: 700; font-size: 14px; 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: 14px; 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: 14px; }
.pc-filter-field { display: flex; flex-direction: column; gap: 4px; }
.pc-filter-field label { font-size: 11px; 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: 14px; background: var(--bg-card); }
.pc-reset-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 16px; font-size: 14px; 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: 14px; }
.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: 12px; 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, color-mix(in srgb, var(--gold) 8%, transparent)); }
.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: 13px; 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: 12px; 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, var(--gold-glow)); color: var(--gold); font-weight: 700; font-size: 12px; 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: 14px; 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: 14px; 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: 13px; }
.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: 16px; 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: 12px; 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: 14px; 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, color-mix(in srgb, var(--gold) 10%, transparent)); border-radius: var(--radius-sm); padding: 12px; }
.pc-drawer-mini .l { font-size: 11px; 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: 12px; 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: 14px; 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: 12px; cursor: pointer; text-decoration: underline; }
.pc-drawer-footer { display: flex; gap: 10px; justify-content: flex-end; }
.pc-edit-btn { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 14px; 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: 14px; 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: 12px; color: var(--ink-muted); margin-bottom: 2px; }
.pc-system-tag { font-size: 11px; 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: 14px; 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: 12px; 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: 14px; 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: 14px; resize: vertical; }
.pc-note-save { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 700; font-size: 14px; 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: 20px; 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: 12px; 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: 14px; }
.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: 14px; cursor: pointer; color: var(--ink-muted); }
.pc-save-btn { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 14px; 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: 32px; color: var(--ink); margin-bottom: 4px; }
.tk-sub { font-size: 14px; color: var(--ink-soft); }
.tk-add-btn { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-md); padding: 11px 20px; font-weight: 700; font-size: 14px; 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: 14px; 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: 12px; 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: 14px; }
.tk-filter-field { display: flex; flex-direction: column; gap: 4px; }
.tk-filter-field label { font-size: 11px; 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: 14px; background: var(--bg-card); }
.tk-reset-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 16px; font-size: 14px; 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: 13px; 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: 13px; }

.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: 14px; }
.tk-table thead { background: var(--bg-dark); }
.tk-table th { text-align: left; padding: 11px 14px; font-size: 12px; 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: 13px; }
.tk-checkbox.checked { background: var(--gold); border-color: var(--gold); color:#fff; }
.tk-task-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.tk-task-desc { font-size: 12px; color: var(--ink-muted); }
.tk-cat-chip { font-size: 12px; 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: 14px; }
.tk-due.overdue { color: #C0392B; }
.tk-due-time { font-size: 12px; color: var(--ink-muted); font-weight: 500; }
.tk-priority { font-size: 12px; 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: 13px; 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: 12px; color: var(--ink-muted); }
.tk-assignee-chip { font-weight: 700; font-size: 12px; 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: 14px; 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: 14px; 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: 13px; }
.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: 16px; 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: 14px; 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: 12px; 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: 14px; 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:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 14px; 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: 14px; 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: 12px; color: var(--ink-muted); margin-bottom: 2px; }
.tk-system-tag { font-size: 11px; 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: 14px; 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: 14px; resize: vertical; }
.tk-note-save { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 700; font-size: 14px; 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: 20px; 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: 12px; 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: 14px; }
.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: 14px; cursor: pointer; color: var(--ink-muted); }
.tk-save-btn { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 14px; 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: 12px; 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: 14px; }
.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: 12px; 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: 14px; }
.rail-quickadd button { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.rail-hint { font-size: 12px; 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: 18px; 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: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-size: 11px; font-weight: 700; color: var(--ink-muted); padding-bottom: 6px; letter-spacing: 0.3px; }
.cal-day { position: relative; font-size: 13px; 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:#fff; 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: 13px; }
.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: 13px; font-weight: 700; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }

/* =========================================================
   ROLLED DEBT
   ========================================================= */
.rd-admin-tag { font-size: 12px; 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: 14px; color: var(--ink-muted); }
.rd-add-btn { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-md); padding: 11px 20px; font-weight: 700; font-size: 14px; 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: 14px; }
.rd-filter-field { display: flex; flex-direction: column; gap: 4px; }
.rd-filter-field label { font-size: 11px; 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: 14px; background: var(--bg-card); }

.rd-filtered-total { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; background: var(--goldGlow, color-mix(in srgb, var(--gold) 10%, transparent)); border: 1px solid var(--gold); border-radius: var(--radius-md); padding: 10px 16px; margin-bottom: 16px; }
.rd-filtered-total-label { font-size: 12px; 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: 12px; 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: 14px; }
.rd-table thead { background: var(--bg-dark); }
.rd-table th { text-align: left; padding: 11px 14px; font-size: 12px; 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: 12px; 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: 11px; 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: 14px; 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: 12px; 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: 11px; 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: 12px; 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: 20px; 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: 12px; 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: 14px; }
.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: 14px; cursor: pointer; color: var(--ink-muted); }
.rd-save-btn { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 14px; 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: 14px; 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: 12px; 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: 12px; font-weight: 700; color: var(--ink-muted); margin-bottom: 8px; }
.ct-kpi-hero .v { font-family: var(--font-display); font-size: 36px; color: var(--gold); line-height: 1; margin-bottom: 6px; }
.ct-kpi-hero .s { font-size: 12px; 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: 14px; 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: 13px; font-weight: 700; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-pc-row .cnt { width: 55px; font-size: 12px; 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: 13px; 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: 13px; font-weight: 700; color: var(--ink-muted); cursor: pointer; }
.ct-date-cell { font-size: 12px; 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: 14px; 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: 14px; 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: 13px; }
.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: 16px; 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: 14px; 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: 11px; 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: 12px; 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: 14px; 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:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 14px; 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: 14px; 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: 14px; 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: 14px; 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: 12px; 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: 13px; }
.sov-select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; background: var(--bg-card); }
.sov-clear-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px; 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: 14px; }
.sov-carrier-plan .p { font-size: 12px; 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: 14px; 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: 11px; 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: 12px; 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: 14px; 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: 13px; 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: 11px; 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: 12px; 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: 12px; 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: 14px; padding: 4px 0; }
.lic-fee-preview-notes { margin-top: 8px; font-size: 13px; color: var(--ink-soft); background: var(--gold-glow); padding: 8px 10px; border-radius: 6px; }
.lic-fee-preview-empty { font-size: 14px; 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: 13px; 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: 11px; 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: 12px; 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: 14px; 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:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 14px; 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: 14px; 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: 12px; color: var(--ink-muted); margin-bottom: 2px; }
.rd-system-tag { font-size: 11px; 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: 14px; 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: 14px; resize: vertical; }
.rd-note-save { background: var(--gold); color:#fff; border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 700; font-size: 14px; 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: 11px; 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: 14px; 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: 20px; color: var(--ink); }
.picker-card-check { width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color:#fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.picker-card-count { font-size: 12px; color: var(--ink-muted); margin-bottom: 10px; }
.picker-card-items { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.picker-skip-row { text-align: center; }
.picker-skip-row a { font-size: 14px; 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: 11px; 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: 20px; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.2px; }
.tour-desc { font-size: 14px; 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: var(--gold); width: 16px; border-radius: 3px; }
.tour-footer { display: flex; justify-content: space-between; align-items: center; }
.tour-skip { font-size: 12px; color: var(--ink-muted); background: none; border: none; cursor: pointer; text-decoration: underline; }
.tour-btns { display: flex; gap: 8px; }
.tour-btn-back { font-size: 13px; 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: 13px; font-weight: 700; color:#fff; background: var(--gold); 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: var(--bg-dark); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.ann-banner-text { flex: 1; }
.ann-banner-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.ann-banner-sub { font-size: 12px; color: var(--ink-muted); }
.ann-banner-btns { display: flex; gap: 8px; flex-shrink: 0; }
.ann-banner-take { font-size: 13px; font-weight: 700; color:#fff; background: var(--gold); border: none; border-radius: 7px; padding: 8px 14px; cursor: pointer; }
.ann-banner-dismiss { font-size: 13px; 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; }
}

/* ---- Access: uplines / team access ---- */
.set-upline-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; margin-bottom: 14px; border: 1px solid var(--gold); background: var(--gold-glow); border-radius: var(--radius-md); font-size: 14px; color: var(--ink); line-height: 1.5; }
.set-upline-banner .set-btn-primary { flex-shrink: 0; }
.set-team-pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.3px; background: var(--bg-page); color: var(--ink-muted); border: 1px solid var(--line); white-space: nowrap; }
.set-mig-label { margin: 16px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-muted); }
.set-mig-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }
.set-mig-list .muted { color: var(--ink-muted); }
@media (max-width: 640px) { .set-upline-banner { flex-direction: column; align-items: stretch; } }

/* ---- Access: no-login team members, filters, find-from-reports ---- */
.set-access-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.set-filter-btn { height: 34px; padding: 0 12px; border: 1px solid var(--line); background: var(--bg-card); color: var(--ink); border-radius: 8px; font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; }
.set-filter-btn span { color: var(--ink-muted); font-weight: 500; margin-left: 4px; }
.set-filter-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.set-filter-btn.active span { color: rgba(255,255,255,0.75); }
.set-filter-check { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-left: 8px; cursor: pointer; }
.set-nologin-pill { background: var(--bg-page); color: var(--ink-soft); border: 1px dashed #C9C4BA; }
.set-row-inactive td { color: var(--ink-muted); }
.set-inactive-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg-page); color: var(--ink-muted); }
.set-nologin-note { padding: 10px 12px; margin-bottom: 14px; border-radius: var(--radius-sm); background: var(--bg-page); font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.set-roster-flag td { background: var(--warning-bg); }
.set-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.set-inline-check { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; color: var(--ink-soft); cursor: pointer; text-transform: none; font-weight: 400; letter-spacing: 0; }
.set-inline-check input { width: auto; margin: 0; }

/* Save buttons: busy while saving (clicks ignored until done) */
button[data-saving="1"] { opacity: 0.6; cursor: progress; }

/* ---- Notices (replace the browser's gray pop-ups) ---- */
.notice-stack { position: fixed; right: 20px; bottom: 88px; z-index: 10050; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 32px); pointer-events: none; }
.notice { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; font-family: var(--font-body); font-size: 15px; line-height: 1.45; box-shadow: 0 10px 28px rgba(0,0,0,0.16); animation: notice-in 0.18s ease-out; }
.notice-success { background: var(--bg-dark); color: #fff; align-items: center; }
.notice-success .notice-title { font-weight: 600; }
.notice-check { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color:#fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.notice-error, .notice-warn, .notice-info { background: var(--bg-card); color: var(--ink); border: 1px solid var(--line); }
.notice-error { border-left: 4px solid var(--danger); }
.notice-warn { border-left: 4px solid var(--gold); }
.notice-info { border-left: 4px solid var(--ink); }
.notice-text { flex-grow: 1; min-width: 0; }
.notice-title { font-weight: 700; }
.notice-body { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.notice-close { width: 28px; height: 28px; flex-shrink: 0; border: none; background: none; color: var(--ink-muted); font-size: 15px; cursor: pointer; border-radius: 6px; }
.notice-close:hover { background: var(--bg-page); color: var(--ink); }
.notice-leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }
@keyframes notice-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .notice-stack { top: 12px; bottom: auto; left: 16px; right: 16px; width: auto; max-width: none; }
}

/* ---- A page didn't load ---- */
.load-error { max-width: 440px; margin: 48px auto; padding: 32px 28px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.load-error-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--warning-bg); color: var(--warning-ink); display: flex; align-items: center; justify-content: center; }
.load-error-title { font-family: var(--font-display); font-size: 28px; color: var(--ink); }
.load-error-body { font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.load-error-btn { height: 40px; padding: 0 22px; border: none; border-radius: var(--radius-sm); background: var(--bg-dark); color: var(--gold); font-family: var(--font-body); font-size: 15px; font-weight: 700; cursor: pointer; }
.load-error-btn:hover { opacity: 0.9; }
.load-error-foot { font-size: 13px; color: var(--ink-muted); }
.load-error-details { margin-top: 8px; text-align: left; }
.load-error-details summary { cursor: pointer; text-decoration: underline; display: inline; }
.load-error-details code { display: block; margin-top: 8px; padding: 8px 10px; background: var(--bg-page); border-radius: 8px; font-size: 12px; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }

/* ---- Loading placeholders ----
   Full-page "Loadingâ€¦" messages show the outline of cards and rows while
   data arrives, so pages feel faster. The text stays for screen readers
   and as a small caption. Small loaders inside windows are unchanged. */
#content > .loading {
  position: relative;
  padding: 0 0 8px;
  text-align: left;
  font-size: 14px;
  color: var(--ink-muted);
  min-height: 420px;
}
#content > .loading::before {
  content: "";
  display: block;
  height: 96px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.65) 50%, rgba(255,255,255,0) 100%) -400px 0 / 400px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 0 0 / calc(25% - 12px) 100% no-repeat,
    linear-gradient(var(--line), var(--line)) calc(33.33%) 0 / calc(25% - 12px) 100% no-repeat,
    linear-gradient(var(--line), var(--line)) calc(66.66%) 0 / calc(25% - 12px) 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 100% 0 / calc(25% - 12px) 100% no-repeat;
  opacity: 0.7;
  animation: skeleton-shimmer 1.3s ease-in-out infinite;
}
#content > .loading::after {
  content: "";
  display: block;
  height: 280px;
  margin-top: 14px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.65) 50%, rgba(255,255,255,0) 100%) -400px 0 / 400px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--line) 0 18px, transparent 18px 46px) 0 14px / 100% 100% no-repeat;
  opacity: 0.55;
  animation: skeleton-shimmer 1.3s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  from { background-position-x: -400px, 0, 33.33%, 66.66%, 100%; }
  to { background-position-x: calc(100% + 400px), 0, 33.33%, 66.66%, 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #content > .loading::before, #content > .loading::after { animation: none; }
}
@media (max-width: 640px) {
  #content > .loading::before { height: 64px; }
}

/* =========================================================
   INSTANT PAGES â€” "Showing numbers from 10:42 AM Â· Updatingâ€¦" tag
   in the page header (Production, Leaderboard, Book of Business, Debt)
   ========================================================= */
.fresh-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.3;
  background: var(--bg-card, #fff); border: 1px solid var(--line, #EAE6DF);
  color: var(--ink-muted, #8A8680); white-space: nowrap;
}
.fresh-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  animation: fresh-pulse 1.2s ease-in-out infinite;
}
@keyframes fresh-pulse { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1); } }
.fresh-done { color: #2E7D4F; border-color: #CFE7D8; background: #F2FAF5; }
.fresh-ready { color: var(--ink); border-color: var(--gold); }
.fresh-failed { color: #9A3B2E; border-color: #F1C8C2; background: #FDF5F3; }
.fresh-btn {
  border: none; background: var(--ink, var(--bg-dark)); color: var(--gold);
  font: inherit; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; cursor: pointer;
}
.fresh-btn:hover { opacity: 0.88; }
@media (prefers-reduced-motion: reduce) { .fresh-dot { animation: none; } }
@media (max-width: 860px) {
  /* On phones the tag gets its own line under the page title. */
  .topbar { flex-wrap: wrap; }
  .topbar-meta:not(:empty) { order: 3; flex-basis: 100%; margin-left: 0; }
  .topbar-meta:empty { display: none; }
  .fresh-tag { font-size: 12px; padding: 4px 9px; }
}

/* =========================================================
   PHONE POLISH (Sep 30) â€” agent pages at phone width.
   Everything here is inside the phone breakpoint; computers are
   unchanged.
   ========================================================= */
@media (max-width: 860px) {
  /* Room at the bottom so the tour/help buttons never cover the last card */
  .content { padding-bottom: 96px !important; }

  /* iPhone zooms the page when you tap a box with small text. 16px stops that. */
  #content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  #content select, #content textarea,
  .ct-modal input:not([type="checkbox"]):not([type="radio"]), .ct-modal select, .ct-modal textarea,
  .pc-modal input:not([type="checkbox"]):not([type="radio"]), .pc-modal select, .pc-modal textarea,
  .ph-modal input:not([type="checkbox"]):not([type="radio"]), .ph-modal select, .ph-modal textarea,
  .dep-modal input:not([type="checkbox"]):not([type="radio"]), .dep-modal select, .dep-modal textarea,
  .rec-modal input:not([type="checkbox"]):not([type="radio"]), .rec-modal select, .rec-modal textarea {
    font-size: 16px !important;
  }

  /* Bigger tap targets */
  #content .prod-toggle button { min-height: 34px; padding-left: 12px !important; padding-right: 12px !important; }
  #content .kpi-card a, #content .sd-panel a { display: inline-block; padding: 6px 0; }
  .act-round-btn { width: 38px !important; height: 38px !important; font-size: 18px !important; }
  .ct-icon-btn { min-width: 36px; min-height: 36px; }
  .cal-nav, .tk-page-btn, .ct-page-btn { min-width: 36px; min-height: 36px; }
  .act-pill, .pres-filter-pill, .dep-pill, .np-pill { min-height: 34px; }

  /* Tabs that wrapped onto two lines now scroll sideways in one line */
  .ct-tabs, .tk-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ct-tabs::-webkit-scrollbar, .tk-tabs::-webkit-scrollbar { display: none; }
  .ct-tabs > *, .tk-tabs > * { flex-shrink: 0; }

  /* Client Tracker: "Still to Earn" and "Pending Commission" stacked, not crushed side by side */
  .ct-top-row { grid-template-columns: minmax(0, 1fr); }

  /* Activity: Add Entry first and full width, then the Daily Log */
  .act-two-col { grid-template-columns: minmax(0, 1fr); }
  .act-two-col > .act-panel:last-child { order: -1; }

  /* Task Manager: fit the screen (was wider than the phone); calendar below */
  .tk-layout { grid-template-columns: minmax(0, 1fr); }
  .tk-main, .tk-side { grid-column: 1; min-width: 0; }

  /* Deposits: 4 numbers as a 2 x 2 grid */
  .dep-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Presentation and deposit cards were laid out two across at a fixed
     minimum width, so on phones the second card (and "nothing here yet"
     messages) was cut off. One card per row. */
  .pres-log-wrap, .dep-day-cards { grid-template-columns: minmax(0, 1fr); }
  .pres-empty, .dep-empty { grid-column: 1 / -1; }

  /* Page headers with buttons (Licensing, Settingsâ€¦): title on its own line */
  .set-header { flex-wrap: wrap; }
  .set-header > :first-child { flex: 1 1 100%; }
}

@media (max-width: 480px) {
  /* Home and task number cards two per row instead of one, so Home is half as long */
  .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .home-kpis .kpi-card { min-width: 0; }
}

/* Client Tracker on phones: each sale is a card (client + status on
   top, then the numbers two per row) instead of a table you have to
   swipe sideways to see Status and Advance. Tap the card to open it,
   âœŽ to edit, same as before. */
@media (max-width: 860px) {
  .ct-table-wrap:has(.ct-cards) { overflow-x: visible; border: none; background: none; box-shadow: none; }
  .ct-cards, .ct-cards tbody { display: block; width: 100%; min-width: 0 !important; }
  .ct-cards thead { display: none; }
  .ct-cards tr {
    position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px; padding: 14px 16px; margin-bottom: 10px;
    background: var(--bg-card, #fff); border: 1px solid var(--line, #EAE6DF); border-radius: 14px;
  }
  .ct-cards td { display: block; padding: 0 !important; border: none !important; text-align: left !important; min-width: 0; white-space: normal; font-size: 15px; }
  .ct-cards td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted, #8A8680);
  }
  .ct-cards td.ctc-client { grid-column: 1 / -1; font-size: 16px; font-weight: 700; padding-right: 44px !important; }
  .ct-cards td.ctc-client::before { display: none; }
  .ct-cards td.ctc-client { order: -2; }
  .ct-cards td.ctc-status { grid-column: 1 / -1; order: -1; margin-top: -4px; }
  .ct-cards td.ctc-status::before { display: none; }
  .ct-cards td.ctc-adv { font-weight: 700; }
  .ct-cards td.ctc-edit { position: absolute; top: 8px; right: 8px; }
}

/* Home follow-ups: "today" / "tomorrow" / "in 6 days" tag after the date */
.ha-due { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #F3F1EC; color: var(--ink-muted, #8A8680); white-space: nowrap; }
.ha-due-today { background: var(--gold-soft, #F4E5B2); color: #6B5410; }

/* =========================================================
   PHONE POLISH, ADMIN PAGES (Oct 2) â€” phones only.
   ========================================================= */
@media (max-width: 860px) {
  /* Tab rows with many tabs (Access: Agents / Carriers & Rates / Comp Levelsâ€¦)
     ran off the right edge. They now scroll sideways. */
  #content .prod-toggle { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  #content .prod-toggle::-webkit-scrollbar { display: none; }
  #content .prod-toggle > button { flex-shrink: 0; white-space: nowrap; }

  /* Access / Settings tables were cut off with no way to reach the
     right-hand columns (Rate, Reset password, Removeâ€¦). Swipe sideways now. */
  .set-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Sales Dashboard and Commission Overrides number cards: two per row */
  .sd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sd-kpi { min-width: 0; }

  /* Side-by-side panels (Pending / Earned commission) stacked */
  .ms-row { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 480px) {
  /* Policy Conservation, Rolled Debt and Leads number cards: two per row instead of one */
  .pc-kpis, .rd-kpis, .ph-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .pc-kpis > *, .rd-kpis > *, .ph-kpis > * { min-width: 0; }
}

/* =========================================================
   NEW AGENTS LIST â€” upgrade (Oct 5): licensed / state / upline /
   comp level tags, carrier checklist, follow-ups, view-only.
   ========================================================= */
.na-filter-row .na-search { flex: 1 1 240px; max-width: none; }
.na-filter-row .na-sort-select { margin-left: 0; }
.na-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.na-tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: #F3F1EC; color: #3A3733; white-space: nowrap; }
.na-tag-good { background: #EEF8F1; color: #17693D; font-weight: 700; }
.na-tag-bad { background: #FDF1EF; color: #A0271C; font-weight: 700; }
.na-carrier-block { margin-bottom: 9px; }
.na-carrier-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; }
.na-carrier-head b { color: var(--ink); font-weight: 700; }
.na-carrier-bar { height: 6px; border-radius: 3px; background: #F0EDE7; overflow: hidden; margin-bottom: 7px; }
.na-carrier-bar > div { height: 100%; border-radius: 3px; background: #1B7F4B; }
.na-carrier-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.na-carrier-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.na-carrier-chip.done { background: #EEF8F1; color: #17693D; }
.na-carrier-chip.wait { background: #FEF9EC; color: #7A5F0C; }
.na-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #F0EDE7; font-size: 12px; color: var(--ink-soft); }
.na-follow b { color: var(--ink); font-weight: 700; }
.na-due-overdue { background: #FDF1EF; color: #A0271C; }
.na-viewonly { display: inline-block; margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; border: 1px solid #C9C4BA; color: #3A3733; white-space: nowrap; }
.na-drawer .na-viewonly { margin-left: 0; }
.ha-kind { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 5px; font-size: 12px; font-weight: 700; background: #F3F1EC; color: #5A5650; vertical-align: 1px; }
.na-legacy-box { margin-top: 10px; padding: 9px 11px; border-radius: 8px; background: #F3F1EC; font-size: 12px; color: #3A3733; line-height: 1.5; }
.na-legacy-box b { font-weight: 700; }

/* form */
.na-modal.na-modal-wide { max-width: 720px; }
.na-hint { font-size: 12px; color: var(--ink-muted); margin-top: 4px; line-height: 1.4; }
.na-seg { display: flex; gap: 3px; padding: 3px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--bg-card); }
.na-seg-btn { flex: 1 1 0; min-height: 34px; padding: 4px 8px; border: none; border-radius: 6px; background: none; color: #5A5650; font-family: var(--font-body); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.na-seg-btn:hover { background: #F3F1EC; }
.na-seg-btn.on { background: var(--bg-dark); color: var(--gold); }
.na-seg-btn.on-neutral { background: #E9E6E0; color: #111111; }
.na-seg-btn.on-wait { background: var(--gold); color:#fff; }
.na-seg-btn.on-done { background: #17693D; color: #FFFFFF; }
.na-seg-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.na-carrier-form-head { display: flex; justify-content: space-between; align-items: center; }
.na-link-btn { background: none; border: none; padding: 4px 0; font-family: var(--font-body); font-size: 13px; font-weight: 700; color: #7A5F0C; cursor: pointer; text-decoration: underline; }
.na-crow { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) minmax(0, 1.2fr); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #F0EDE7; }
.na-crow:last-child { border-bottom: none; }
.na-crow-name { font-size: 14px; font-weight: 700; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.na-crow-wn { min-width: 0; }
.na-guess { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: #FEF9EC; color: #7A5F0C; margin-left: 4px; white-space: nowrap; }
.na-manage-box { margin-top: 10px; padding: 12px; border: 1px dashed var(--gold); border-radius: 10px; background: #FFFDF6; }
.na-manage-title { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #7A5F0C; margin-bottom: 8px; }
.na-manage-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.na-manage-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 3px 4px 3px 10px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); }
.na-manage-chip button { width: 24px; height: 24px; border: none; border-radius: 50%; background: none; color: #8A8680; font-size: 13px; cursor: pointer; }
.na-manage-chip button:hover { background: #FDF1EF; color: #A0271C; }
.na-manage-add { display: flex; gap: 8px; }
.na-manage-hint { font-size: 12px; color: var(--ink-muted); margin-top: 8px; }
.na-dup-warn { margin-top: 12px; padding: 14px 16px; border: 1px solid #E5C76B; border-radius: 10px; background: #FFFDF6; }
.na-dup-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.na-dup-body { font-size: 14px; color: #3A3733; line-height: 1.5; margin-bottom: 10px; }
.na-dup-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 860px) {
  /* Recruit cards were two across at a fixed width, so the second one was cut off on phones. */
  .na-grid { grid-template-columns: minmax(0, 1fr); }
  .na-filter-row .na-sort-select { flex: 1 1 46%; min-width: 0; }
  .na-field-grid { grid-template-columns: minmax(0, 1fr); }
  .na-crow { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0; }
  .na-seg-btn { min-height: 40px; }
  .na-header { flex-wrap: wrap; gap: 12px; }
  .na-viewonly { margin-left: 0; }
}

/* ============================================================
   NEW AGENTS LIST â€” tidier layout (Oct 5): Active Pipeline / All
   tabs and clickable status cards.
   ============================================================ */
.na-pipe-tabs { margin-bottom: 14px; }
.na-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.na-kpi { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 10px 8px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); cursor: pointer; font-family: inherit; color: var(--ink); text-align: center; }
.na-kpi:hover { border-color: var(--gold); }
.na-kpi:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.na-kpi.on { border: 2px solid var(--gold); background: #FFFBEB; padding: 9px 7px; }
.na-kpi-count { font-family: var(--font-display); font-size: 24px; line-height: 1; }
.na-kpi-label { font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-soft, #5A5650); line-height: 1.3; }
@media (max-width: 640px) {
  .na-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .na-kpi { min-height: 64px; }
  .na-pipe-tabs { display: flex; }
  .na-pipe-tabs button { flex: 1; }
}

/* ============================================================
   REFRESH BANNER, RECRUIT HISTORY, "IN ACCESS" TAG (Oct 5)
   ============================================================ */
.refresh-banner { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 9000;
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 10px 10px 10px 18px; background: var(--bg-dark); color: #FFFFFF; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: 0 8px 28px rgba(0,0,0,0.28); }
.refresh-banner button { flex-shrink: 0; min-height: 40px; padding: 0 16px; border: none; border-radius: 8px;
  background: var(--gold); color:#fff; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.refresh-banner button:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
@media (max-width: 640px) {
  .refresh-banner { left: 12px; right: 12px; bottom: 88px; transform: none; max-width: none; justify-content: space-between; }
}
.na-tag-access { background: #E7F0FF; color: #1D4ED8; }
.na-change-item .na-change-text { color: var(--ink-soft, #4A4A4A); font-size: 14px; line-height: 1.5; }

/* ============================================================
   RESOURCES + LICENSING â€” redesigned layout (Oct 7)
   Same colors and fonts as the rest of the portal.
   ============================================================ */
/* carrier mark: logo if an admin added one, initials otherwise */
.cmark { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 18px; line-height: 1; overflow: hidden; }
.cmark-lg { width: 56px; height: 56px; font-size: 22px; }
.cmark-logo { background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; }
.cmark-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; display: block; }

.rl2-link { background: none; border: none; padding: 6px 2px; min-height: 32px; font-family: inherit; font-size: 14px; font-weight: 700; color: #7A5F0C; text-decoration: underline; cursor: pointer; }
.rl2-link:hover { color: var(--ink); }
.rl2-search { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; margin-bottom: 18px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink-muted); }
.rl2-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.rl2-search input { flex: 1; min-width: 0; height: 44px; border: none; background: none; outline: none; font-family: inherit; font-size: 16px; color: var(--ink); }
.rl2-label { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }

.rl2-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 22px; }
.rl2-start-card { background: var(--ink); color: #FFFFFF; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.rl2-start-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #BDB8AE; }
.rl2-start-top span:first-child { color: var(--gold); }
.rl2-start-title { font-family: var(--font-display); font-size: 22px; line-height: 1.15; }
.rl2-start-desc { font-size: 14px; line-height: 1.45; color: #D9D5CC; }
.rl2-start-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.rl2-start-foot button { min-height: 40px; padding: 0 18px; border: none; border-radius: 8px; background: var(--gold); color:#fff; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.rl2-start-foot button.rl2-start-edit { background: none; color: #FFFFFF; border: 1px solid #5A5650; }

.rl2-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.rl2-carriers { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.rl2-tile { min-height: 68px; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; text-align: left; font-family: inherit; color: var(--ink); cursor: pointer; }
.rl2-tile b { font-size: 14px; font-weight: 800; }
.rl2-tile span { font-size: 12px; color: var(--ink-muted); }
.rl2-tile:hover { border-color: var(--gold); }
.rl2-tile:focus-visible, .rl2-chip:focus-visible, .rl2-open:focus-visible, .lic2-tile:focus-visible, .lic2-card:focus-visible, .lic2-feechip:focus-visible, .lic2-copy:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rl2-tile.on { border: 2px solid var(--gold); background: #FFFBEB; padding: 9px 13px; }
.rl2-ctile { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 76px; }
.rl2-tile .rl2-ctile-text, .rl2-tile .rl2-ctile-text b { color: var(--ink); }
.rl2-tile .rl2-ctile-text span { color: var(--ink-muted); }
.rl2-ctile .cmark { color: var(--gold); font-size: 16px; }
.rl2-ctile-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.rl2-carrier-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rl2-carrier-name { display: flex; align-items: center; gap: 12px; }
.rl2-carrier-name h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.rl2-logo-actions { display: flex; gap: 14px; align-items: center; position: relative; }
.rl2-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.rl2-chip { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-card); color: var(--ink-soft); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.rl2-chip.on { background: var(--ink); border-color: var(--ink); color: var(--gold); }

.rl2-group { margin-bottom: 22px; }
.rl2-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.rl2-group-head h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.2; }
.rl2-group-head h3 span { font-family: var(--font-body, inherit); font-size: 13px; font-weight: 700; color: var(--ink-muted); margin-left: 4px; }
.rl2-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rl2-badge { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; background: #EFEDE8; color: #3A3733; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
.rl2-badge.pdf { background: #FDECEC; color: #991B1B; }
.rl2-badge.doc { background: #E7F0FF; color: #1D4ED8; }
.rl2-badge.img { background: #E8F5EC; color: #14532D; }
.rl2-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rl2-row-title { font-size: 15px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.rl2-row-desc { font-size: 14px; color: var(--ink-muted); line-height: 1.4; overflow-wrap: anywhere; }
.rl2-row-where { font-weight: 600; }
.rl2-new { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--gold); color:#fff; font-size: 12px; font-weight: 800; vertical-align: 1px; }
.rl2-row-meta { flex-shrink: 0; width: 130px; text-align: right; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
.rl2-open { flex-shrink: 0; min-height: 40px; padding: 0 18px; border: none; border-radius: 8px; background: var(--ink); color: var(--gold); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.rl2-open:hover { background: #2A2A2A; }

/* ---- Licensing ---- */
.lic2-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; overflow-wrap: anywhere; }
.lic2-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.lic2-stat { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.lic2-stat b { font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1; color: var(--ink); }
.lic2-stat span { font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.lic2-stat.warn b { color: #7A5F0C; }
.lic2-stat.bad b { color: #991B1B; }

.lic2-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 24px; align-items: start; margin-bottom: 24px; }
.lic2-map { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; max-width: 700px; }
.lic2-tile { aspect-ratio: 1 / 1; min-width: 0; padding: 0; border-radius: 8px; font-family: inherit; font-size: clamp(9px, 1.05vw, 13px); font-weight: 800; cursor: pointer;
  background: #EFEDE8; color: #5F5A52; border: 2px solid #EFEDE8; }
.lic2-tile:hover { border-color: var(--gold); }
.lic2-tile.on { outline: 3px solid #7A5F0C; outline-offset: 2px; }
/* standing: shared by map tiles, state badges and legend swatches */
.k-active { background: var(--ink); color: var(--gold); border: 2px solid var(--ink); }
.k-soon { background: var(--gold); color:#fff; border: 2px solid var(--ink); }
.k-expired { background: #FFFFFF; color: #991B1B; border: 2px solid #991B1B; }
.k-pending, .k-inactive { background: #FFFFFF; color: var(--ink); border: 2px dashed var(--ink); }
.k-none { background: #EFEDE8; color: #5F5A52; border: 2px solid #EFEDE8; }
.lic2-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--ink-soft); }
.lic2-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lic2-legend i { width: 16px; height: 16px; box-sizing: border-box; border-radius: 5px; display: inline-block; }
.lic2-hint { margin-top: 8px; font-size: 13px; color: var(--ink-muted); }

.lic2-panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lic2-panel-head { background: var(--ink); color: #FFFFFF; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lic2-panel-head span:first-child { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.lic2-panel-head h3 { margin: 2px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.lic2-panel-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.lic2-kv { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 14px; }
.lic2-kv > span:first-child { color: var(--ink-muted); }
.lic2-kv-v { font-weight: 700; text-align: right; display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.lic2-copy { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-card); font-family: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; }
.lic2-copy:hover { border-color: var(--gold); }
.lic2-fees { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; display: flex; flex-direction: column; gap: 8px; }
.lic2-fees-title { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.lic2-note { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.lic2-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }

.lic2-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; border: none; }
.lic2-pill.k-active { background: #E8F5EC; color: #14532D; }
.lic2-pill.k-soon { background: var(--gold); color:#fff; }
.lic2-pill.k-expired { background: #FDECEC; color: #991B1B; }
.lic2-pill.k-pending, .lic2-pill.k-inactive, .lic2-pill.k-none { background: #EFEDE8; color: #3A3733; }
.lic2-pill.on-dark.k-active { background: #1F3D2A; color: #B7E4C7; }
.lic2-pill.on-dark.k-expired { background: #FDECEC; color: #991B1B; }
.lic2-pill.on-dark.k-pending, .lic2-pill.on-dark.k-inactive, .lic2-pill.on-dark.k-none { background: #3A3733; color: #EFEDE8; }

.lic2-section { margin-bottom: 24px; }
.lic2-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 6px; margin-bottom: 12px; border-bottom: 2px solid var(--ink); }
.lic2-section-head h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.2; }
.lic2-section-head h3 span { font-family: var(--font-body, inherit); font-size: 13px; font-weight: 700; color: var(--ink-muted); margin-left: 4px; }
.lic2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lic2-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; text-align: left; font-family: inherit; color: var(--ink); cursor: pointer; }
.lic2-card:hover { border-color: var(--gold); }
.lic2-card-top { display: flex; align-items: center; gap: 12px; }
.lic2-abbr { flex-shrink: 0; width: 42px; height: 42px; box-sizing: border-box; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.lic2-card-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lic2-card-name b { font-size: 15px; font-weight: 800; }
.lic2-card-name span { font-size: 12px; color: var(--ink-muted); }
.lic2-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.lic2-feechips { display: flex; flex-wrap: wrap; gap: 8px; }
.lic2-feechip { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-card); display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.lic2-feechip:hover { border-color: var(--gold); }
.lic2-feechip span { color: var(--ink-muted); }

.lic2-wn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lic2-wn { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 14px; }
.lic2-wn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lic2-wn-carrier { font-size: 14px; font-weight: 700; color: var(--ink-muted); }
.lic2-wn-num { font-size: 16px; color: var(--ink); }
.lic2-wn-links { display: flex; gap: 12px; }

@media (max-width: 900px) {
  .lic2-top { grid-template-columns: minmax(0, 1fr); }
  .lic2-map { max-width: none; }
  .lic2-tile { font-size: clamp(9px, 2.4vw, 13px); border-radius: 6px; }
}
@media (max-width: 640px) {
  .rl2-row { flex-wrap: wrap; gap: 10px 12px; }
  .rl2-row-main { flex-basis: calc(100% - 56px); }
  .rl2-row-meta { width: auto; text-align: left; flex: 1; padding-left: 56px; }
  .rl2-row-meta br { display: none; }
  .rl2-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rl2-carriers { grid-template-columns: minmax(0, 1fr); }
  .rl2-group-head h3, .lic2-section-head h3 { font-size: 20px; }
  .lic2-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lic2-map { gap: 3px; }
  .lic2-tile { border-width: 1.5px; }
  .lic2-cards, .lic2-wn-grid { grid-template-columns: minmax(0, 1fr); }
  .lic2-section-head { flex-wrap: wrap; }
}

/* ============================================================
   AGENT ENTRIES â€” every agent's policies (Oct 12)
   ============================================================ */
.co-toolbar { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.co-toolbar .filter-select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; min-height: 42px; }
.co-toolbar > * { min-width: 0; }
.co-search { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; color: var(--ink-muted); }
.co-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.co-search input { flex: 1; min-width: 0; height: 40px; border: none; background: none; outline: none; font-family: inherit; font-size: 15px; color: var(--ink); }
.co-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; color: var(--ink-soft); }
.co-summary b { color: var(--ink); }
.co-checks { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.co-checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-muted); cursor: pointer; }
.co-agent { font-weight: 700; }
.co-sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.co-inactive { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #EFEDE8; color: #5F5A52; font-size: 12px; font-weight: 700; }
.co-table tr.co-archived { opacity: 0.5; }
.co-more { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; font-size: 14px; color: var(--ink-muted); }
@media (max-width: 900px) {
  .co-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-search { grid-column: 1 / -1; }
}

/* ============================================================
   ANNOUNCEMENTS â€” easier to read, keeps the line breaks you type (Oct 14)
   ============================================================ */
.ann-title { font-size: 15px; line-height: 1.35; margin-bottom: 4px; }
.ann-msg { font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, 0.88); white-space: pre-line; overflow-wrap: anywhere; }
.ann-banner-text { padding: 16px 18px 18px; }
.ann-card-banner .ann-title { margin-bottom: 6px; }
#ann-f-message { min-height: 140px; line-height: 1.5; resize: vertical; }

/* ===== Home announcements, redesigned (Oct 2026) ===== */
.annx { margin: 0 0 22px; display: flex; flex-direction: column; gap: 12px; }
.annx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.annx-head-left { display: flex; align-items: baseline; gap: 10px; }
.annx-h { margin: 0; font-family: var(--font-body); font-size: 18px; font-weight: 800; color: var(--ink); }
.annx-count { font-size: 14px; font-weight: 600; color: #6B675F; }
.annx-head-right { display: flex; align-items: center; gap: 8px; }
.annx-manage { height: 38px; padding: 0 14px; border: 1.5px dashed rgba(184,148,40,0.7); border-radius: 8px; background: none; color: #8A6D10; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.annx-manage:hover { background: color-mix(in srgb, var(--gold) 8%, transparent); }
.annx-range { font-size: 14px; font-weight: 600; color: #6B675F; padding: 0 4px; white-space: nowrap; }
.annx-arrow { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #111; background: var(--bg-dark); color: var(--gold); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.annx-arrow svg { width: 16px; height: 16px; }
.annx-arrow:disabled { background: #fff; border-color: var(--line); color: #C4BFB6; cursor: default; }
.annx-empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius-md); padding: 18px; font-size: 14px; color: var(--ink-soft); }

/* Cards layout */
.annx-row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 2px 0 4px; }
.annx-row::-webkit-scrollbar { display: none; }
.annx-card { flex: 0 0 calc((100% - 48px) / 4); min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; text-align: left; padding: 0; margin: 0; border: 1px solid #262626; border-radius: var(--radius-md); background: #141414; color: #fff; overflow: hidden; cursor: pointer; font-family: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.annx-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.18); }
.annx-card:focus-visible, .annx-feature:focus-visible, .annx-li:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.annx-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; background: #0B0B0B; overflow: hidden; flex-shrink: 0; }
.annx-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.annx-media-text { flex-direction: column; gap: 8px; background: #1C1808; color: var(--gold); }
.annx-mega svg { width: 40px; height: 40px; display: block; }
.annx-media-label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; }
.annx-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 12px; height: 196px; box-sizing: border-box; }
.annx-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: #A8A39A; }
.annx-eyebrow.is-new { color: var(--gold); }
.annx-title { font-size: 16px; font-weight: 700; line-height: 1.35; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.annx-msg { font-size: 14px; line-height: 1.55; color: rgba(255,255,255,0.75); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.annx-msg-muted { color: rgba(255,255,255,0.55); }
.annx-cta { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--gold); padding: 4px 0; }
.annx-dots { display: flex; justify-content: center; gap: 6px; }
.annx-dots span { width: 6px; height: 6px; border-radius: 3px; background: #D6D1C7; transition: width .2s ease; }
.annx-dots span.on { width: 22px; background: var(--bg-dark); }

/* Featured layout (a post is pinned) */
.annx-featured { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.annx-featured.solo { grid-template-columns: minmax(0, 1fr); }
.annx-feature { display: flex; min-height: 360px; padding: 0; margin: 0; border: none; border-radius: var(--radius-md); background: #141414; color: #fff; overflow: hidden; text-align: left; cursor: pointer; font-family: inherit; }
.annx-feature-media { flex: 0 0 46%; display: flex; align-items: center; justify-content: center; background: #0B0B0B; padding: 12px; box-sizing: border-box; }
.annx-feature-media img { max-width: 100%; max-height: 380px; object-fit: contain; display: block; }
.annx-feature-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 26px 28px 24px; }
.annx-feature-title { font-family: var(--font-display); font-size: 32px; line-height: 1.12; color: #fff; }
.annx-feature-msg { font-size: 14px; line-height: 1.65; color: rgba(255,255,255,0.82); white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.annx-feature-cta { margin-top: auto; align-self: flex-start; background: var(--gold); color:#fff; font-size: 14px; font-weight: 700; border-radius: 8px; padding: 11px 16px; }
.annx-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: auto; max-height: 420px; display: flex; flex-direction: column; }
.annx-list-h { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: #6B675F; padding: 14px 18px 8px; }
.annx-li { display: flex; align-items: center; gap: 14px; padding: 11px 18px; border: none; border-top: 1px solid #F1EDE6; background: none; text-align: left; cursor: pointer; font-family: inherit; color: var(--ink); width: 100%; }
.annx-li:hover { background: #FBF8F1; }
.annx-li-thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: 8px; background: #0B0B0B; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.annx-li-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.annx-li-thumb-text { background: #1C1808; color: var(--gold); }
.annx-li-thumb-text svg { width: 24px; height: 24px; }
.annx-li-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.annx-li-title { font-size: 15px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.annx-li-meta { font-size: 13px; color: #6B675F; }
.annx-li-meta b { color: #8A6D10; }

/* Reader */
body.annx-noscroll { overflow: hidden; }
.annx-reader-overlay { position: fixed; inset: 0; z-index: 9500; background: rgba(17,17,17,0.62); display: flex; align-items: center; justify-content: center; padding: 24px; }
.annx-reader { width: 100%; max-width: 1080px; height: min(660px, calc(100vh - 48px)); background: #fff; border-radius: 20px; overflow: hidden; display: flex; box-shadow: 0 24px 60px rgba(0,0,0,0.35); }
.annx-reader.no-image { max-width: 680px; height: auto; max-height: calc(100vh - 48px); }
.annx-reader-media { flex: 0 0 54%; background: #0B0B0B; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; box-sizing: border-box; min-width: 0; }
.annx-reader-media img { max-width: 100%; max-height: calc(100% - 56px); object-fit: contain; display: block; }
.annx-reader-full { color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; border: 1px solid rgba(255,255,255,0.28); border-radius: 8px; padding: 10px 16px; }
.annx-reader-full:hover { background: rgba(255,255,255,0.08); }
.annx-reader-side { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 26px 32px 22px; }
.annx-reader-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.annx-reader-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: #8A6D10; }
.annx-reader-close { width: 40px; height: 40px; border: none; border-radius: 50%; background: #F3F0EA; color: #111; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0; }
.annx-reader-close svg { width: 16px; height: 16px; }
.annx-reader-scroll { flex: 1; overflow-y: auto; padding: 10px 4px 16px 0; min-height: 0; }
.annx-reader-title { margin: 0 0 14px; font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1.1; color: var(--ink); }
.annx-reader-msg { font-size: 15px; line-height: 1.7; color: #2A2A2A; white-space: pre-line; overflow-wrap: anywhere; }
.annx-reader-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.annx-reader-nav button { height: 44px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.annx-reader-prev { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.annx-reader-next { border: none; background: var(--bg-dark); color: var(--gold); }
.annx-reader-nav button:disabled { opacity: 0.4; cursor: default; }
.annx-reader-pos { font-size: 14px; font-weight: 600; color: #6B675F; }

/* Manage form: pin option */
.annx-pin-field { display: flex; gap: 10px; align-items: flex-start; background: #FBF8F1; border: 1px solid var(--warning-line); border-radius: 10px; padding: 12px 14px; margin: 4px 0 14px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); cursor: pointer; }
.annx-pin-field input { margin-top: 3px; width: 18px; height: 18px; accent-color: #B8942A; flex-shrink: 0; }
.annx-pin-field b { color: var(--ink); }
.annx-pin-badge { border-color: #B8942A !important; color: #8A6D10 !important; }

@media (max-width: 1200px) { .annx-card { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 900px) {
  .annx-card { flex-basis: calc((100% - 16px) / 2); }
  .annx-featured { grid-template-columns: minmax(0, 1fr); }
  .annx-feature { flex-direction: column; min-height: 0; }
  .annx-feature-media { flex: 0 0 auto; height: min(60vw, 340px); padding: 8px; }
  .annx-feature-media img { max-height: 100%; }
  .annx-feature-title { font-size: 28px; }
  .annx-list { max-height: none; }
}
@media (max-width: 600px) {
  .annx-row { gap: 12px; margin-right: -16px; padding-right: 16px; }
  .annx-card { flex-basis: 84%; }
  .annx-arrow { display: none !important; }
  .annx-feature-body { padding: 18px 18px 18px; }
  .annx-feature-msg { -webkit-line-clamp: 4; }
}
@media (max-width: 700px) {
  .annx-reader-overlay { padding: 0; }
  .annx-reader, .annx-reader.no-image { max-width: none; width: 100%; height: 100%; max-height: none; border-radius: 0; flex-direction: column; }
  .annx-reader-media { flex: 0 0 auto; height: 42vh; padding: 12px; }
  .annx-reader-media img { max-height: calc(42vh - 70px); }
  .annx-reader-side { padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); min-height: 0; }
  .annx-reader-title { font-size: 28px; }
  .annx-reader-msg { font-size: 16px; }
  .annx-reader-nav button { flex: 1; height: 48px; }
}

/* ===== My To-Do (Oct 2026) ===== */
.todo-page { display: flex; flex-direction: column; gap: 18px; }
.todo-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.todo-head-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.todo-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: #8A6D10; }
.todo-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1.05; color: var(--ink); }
.todo-quote { font-family: var(--font-display); font-style: italic; font-size: 18px; color: #6B675F; }
.todo-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.todo-seg { display: flex; border: 1px solid var(--line); border-radius: 10px; padding: 4px; gap: 4px; background: #fff; }
.todo-seg button { height: 38px; padding: 0 16px; border: none; border-radius: 7px; background: none; color: #5A5650; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.todo-seg button.on { background: var(--bg-dark); color: var(--gold); }
.todo-btn { height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; }
.todo-btn:hover { background: #FBF8F1; }
.todo-btn-gold { background: var(--gold); border-color: var(--gold); color:#fff; }
.todo-btn-gold:hover { background: #C9A42E; }
.todo-btn-dark { background: var(--bg-dark); border-color: #111; color: var(--gold); height: 38px; }
.todo-btn-dark:hover { background: #222; }
.todo-btn-danger { color: var(--danger); border-color: #F0CFC9; }
.todo-round { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; color: var(--ink); }
.todo-round:disabled { color: #C4BFB6; cursor: default; }
.todo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.todo-stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.todo-stat-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: #6B675F; }
.todo-stat-value { font-family: var(--font-display); font-size: 32px; line-height: 1.1; color: var(--ink); }
.todo-stat-sub { font-size: 13px; color: #6B675F; }
.todo-stat.dark { background: var(--bg-dark); border-color: #111; }
.todo-stat.dark .todo-stat-label { color: var(--gold); }
.todo-stat.dark .todo-stat-value { color: #fff; }
.todo-stat.dark .todo-stat-sub { color: rgba(255,255,255,0.72); }
.todo-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.todo-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.todo-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.todo-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.todo-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 10px; }
.todo-card-head h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: #5A5650; }
.todo-card-meta { font-size: 13px; font-weight: 700; color: #6B675F; text-align: right; }
.todo-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px 0 14px; border-top: 1px solid #F1EDE6; }
.todo-check { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 44px; cursor: pointer; }
.todo-check input, .todo-carrier input { width: 18px; height: 18px; margin: 0; accent-color: #111; flex-shrink: 0; cursor: pointer; }
.todo-row-text, .todo-row-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px; }
.todo-row-sub { font-size: 13px; font-weight: 500; color: #6B675F; }
.todo-row.is-done .todo-row-text, .todo-carrier.is-done span { color: #9A958C; text-decoration: line-through; }
.todo-tag { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #F1EDE6; color: #5A5650; }
.todo-more { flex-shrink: 0; width: 36px; height: 36px; border: none; background: none; border-radius: 8px; font-size: 18px; color: #6B675F; cursor: pointer; }
.todo-more:hover { background: #F3F0EA; color: #111; }
.todo-link { align-self: flex-start; height: 44px; border: none; border-top: 1px solid #F1EDE6; width: 100%; background: none; text-align: left; padding: 0 14px; font-size: 14px; font-weight: 700; color: #8A6D10; cursor: pointer; font-family: inherit; }
.todo-link:hover { background: #FBF8F1; }
.todo-empty { padding: 12px 14px 14px; font-size: 14px; color: #6B675F; border-top: 1px solid #F1EDE6; }
.todo-carrier-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #F1EDE6; }
.todo-carrier { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 14px; border-bottom: 1px solid #F1EDE6; font-size: 14px; font-weight: 600; cursor: pointer; min-width: 0; }
.todo-carrier:nth-child(odd) { border-right: 1px solid #F1EDE6; }
.todo-carrier span { overflow-wrap: anywhere; }
.todo-add { display: flex; gap: 8px; padding: 0 14px 12px; }
.todo-input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; font-size: 15px; background: #FAF9F6; font-family: inherit; color: var(--ink); box-sizing: border-box; }
.todo-input:focus, .todo-note:focus { outline: 2px solid var(--gold); outline-offset: 1px; background: #fff; }
.todo-wait-row { align-items: center; padding-top: 6px; padding-bottom: 6px; }
.todo-wait-row .todo-check { flex: 0 0 auto; }
.todo-wait-who { flex-shrink: 0; width: 70px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: #1F5A94; background: #EBF4FC; border-radius: 6px; padding: 4px 0; text-align: center; }
.todo-wait-text { flex: 1; min-width: 0; border: none; background: none; text-align: left; padding: 6px 0; cursor: pointer; font-family: inherit; }
.todo-wait-age { flex-shrink: 0; font-size: 13px; font-weight: 600; color: #6B675F; padding-right: 6px; }
.todo-note-wrap { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.todo-note { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.55; background: #FAF9F6; resize: vertical; font-family: inherit; color: var(--ink); min-height: 140px; }
.todo-note-status { font-size: 12px; color: #8A8680; }
.todo-rem-row .todo-check { gap: 10px; }
.todo-rem-day { flex-shrink: 0; width: 56px; font-size: 12px; font-weight: 800; color: #5A5650; }
.todo-rem-day.now { color: #8A6D10; }
.todo-rem-day.late { color: var(--danger); }
.todo-rem-row > .todo-rem-day { margin-left: 30px; }
.todo-rem-add { display: flex; gap: 6px; padding: 10px 14px 14px; border-top: 1px solid #F1EDE6; flex-wrap: wrap; }
.todo-rem-add .todo-input { flex: 1 1 100%; }
.todo-rem-add .todo-date { flex: 1 1 140px; }
.todo-wait-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.todo-pill { position: relative; cursor: pointer; }
.todo-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.todo-pill span { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-soft); background: #fff; }
.todo-pill input:checked + span { background: var(--bg-dark); border-color: #111; color: var(--gold); }
.todo-pill input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.todo-modal { max-width: 560px; }
.todo-modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.todo-modal-help { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.todo-modal-meta { font-size: 13px; color: #6B675F; margin-top: -4px; }
.todo-modal-h { margin: 16px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: #5A5650; }
.todo-edit-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin-bottom: 12px; }
.todo-edit-row { display: flex; gap: 6px; align-items: center; }
.todo-edit-row .ct-input { flex: 1; min-width: 0; margin: 0; }
.todo-icon-btn { width: 40px; height: 40px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 15px; color: var(--ink); }
.todo-icon-btn:disabled { color: #C4BFB6; cursor: default; }
.todo-modal .todo-add { padding: 0; }
/* Week */
.todo-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.todo-day { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 4px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.todo-day.is-today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.todo-day.future { background: #FBFAF7; }
.todo-day-head { display: flex; justify-content: space-between; align-items: baseline; }
.todo-day-head h3 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 0.06em; }
.todo-day-head span { font-size: 13px; font-weight: 700; color: #6B675F; }
.todo-day-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.todo-pill-s { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #F1EDE6; color: #5A5650; }
.todo-pill-s.ok { background: var(--success-bg); color: var(--success); }
.todo-day-list { list-style: none; margin: 0; padding: 0; }
.todo-day-list li { display: flex; gap: 8px; font-size: 14px; line-height: 1.45; padding: 6px 0; border-top: 1px solid #F1EDE6; overflow-wrap: anywhere; }
.todo-day-list li span:first-child { color: var(--success); font-weight: 800; }
.todo-day-empty { font-size: 14px; color: #8A8680; }
.todo-day .todo-link { border-top: none; padding: 0; margin-top: auto; }
.todo-day-note { white-space: pre-line; font-size: 14px; line-height: 1.55; background: #FAF9F6; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.todo-open-row { gap: 12px; padding-right: 14px; }
.todo-open-row .todo-row-title { flex: 1; min-width: 0; }
.todo-open-tag { flex-shrink: 0; width: 78px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-align: center; border-radius: 6px; padding: 4px 0; }
.todo-open-tag.you { background: #FBF3D9; color: #7A5F0C; }
.todo-open-tag.wait { background: #EBF4FC; color: #1F5A94; }
/* Home card */
.todo-home { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px 10px 16px; margin: 0 0 18px; flex-wrap: wrap; }
.todo-home-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: #8A6D10; }
.todo-home-bits { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-soft); }
.todo-home-bits b { color: var(--ink); }
.todo-home-dot { margin: 0 8px; color: #C4BFB6; }
.todo-home-bit { white-space: nowrap; }

@media (max-width: 1100px) {
  .todo-grid { grid-template-columns: minmax(0, 1fr); }
  .todo-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .todo-title { font-size: 32px; }
  .todo-head-actions { width: 100%; }
  .todo-seg { flex: 1; }
  .todo-seg button { flex: 1; }
  .todo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo-stat-value { font-size: 24px; }
  .todo-pair { grid-template-columns: minmax(0, 1fr); }
  .todo-week { grid-template-columns: minmax(0, 1fr); }
  .todo-col-right { order: -1; }
  .todo-input { height: 48px; font-size: 16px; }
  .todo-wait-who { width: 62px; }
  .todo-home-bits { flex-basis: 100%; order: 3; }
  .todo-card-hint { display: none; }
}
.todo-repeat { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0 10px 4px; border-bottom: 1px solid #F1EDE6; margin-bottom: 4px; }
.todo-repeat-label { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: #6B675F; text-transform: uppercase; }
.todo-select { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 14px; background: #fff; font-family: inherit; color: var(--ink); }
.todo-repeat-days { display: flex; gap: 4px; flex-wrap: wrap; }
.todo-day-chip { position: relative; cursor: pointer; }
.todo-day-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.todo-day-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--ink-soft); background: #fff; box-sizing: border-box; }
.todo-day-chip input:checked + span { background: var(--bg-dark); border-color: #111; color: var(--gold); }
.todo-day-chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ===== My To-Do: checklists layout (Oct 20) ===== */
.todo-progress { display: flex; flex-direction: column; gap: 5px; width: 200px; margin-right: 6px; font-size: 13px; font-weight: 700; color: #5A5650; }
.todo-bar { display: flex; align-items: center; gap: 8px; }
.todo-bar-pct { font-size: 12px; font-weight: 700; color: #6B675F; width: 32px; flex-shrink: 0; }
.todo-bar-track { flex: 1; height: 6px; border-radius: 3px; background: #E2DCD1; display: block; overflow: hidden; }
.todo-bar-fill { display: block; height: 6px; border-radius: 3px; background: var(--gold); transition: width .25s ease; }
.todo-bar-fill.full { background: var(--success); }
.todo-rems { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.todo-rems-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: #6B675F; margin-right: 2px; }
.todo-rem-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 6px 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 600; max-width: 100%; }
.todo-rem-pill b { font-size: 12px; color: #5A5650; white-space: nowrap; }
.todo-rem-pill.due { background: #FBF3D9; border-color: #F4E5B2; padding-left: 10px; }
.todo-rem-pill.due b { color: #7A5F0C; }
.todo-rem-pill.late b { color: var(--danger); }
.todo-rem-pill.is-done button { text-decoration: line-through; color: #9A958C; }
.todo-rem-pill input { width: 16px; height: 16px; margin: 0; accent-color: #111; cursor: pointer; }
.todo-rem-pill button { border: none; background: none; padding: 6px 6px; font: inherit; color: var(--ink); cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.todo-rems-more { font-size: 13px; font-weight: 700; color: #6B675F; }
.todo-rem-add-btn { min-height: 36px; padding: 0 12px; border: 1px dashed #C9C2B5; border-radius: 999px; background: none; font-size: 14px; font-weight: 700; color: #5A5650; cursor: pointer; font-family: inherit; }
.todo-board { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.todo-board-left, .todo-board-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.todo-side, .todo-cl { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.todo-side-head, .todo-cl-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.todo-fold { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: none; background: none; padding: 4px 0; text-align: left; cursor: pointer; font-family: inherit; color: var(--ink); }
.todo-fold-title { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.todo-side .todo-fold-title { font-size: 15px; }
.todo-fold-count { margin-left: auto; font-size: 13px; font-weight: 700; color: #6B675F; white-space: nowrap; }
.todo-fold-caret { font-size: 12px; color: #8A8680; width: 12px; text-align: center; }
.todo-cl-icon { color: #8A6D10; display: flex; flex-shrink: 0; }
.todo-more.boxed { border: 1px solid var(--line); width: 34px; height: 34px; }
.todo-btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.todo-btn-soft { align-self: flex-start; height: 38px; padding: 0 14px; border: none; border-radius: 8px; background: #F1EDE6; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; font-family: inherit; }
.todo-btn-soft:hover { background: #E8E2D7; }
.todo-cl-tasks, .todo-side-list { display: flex; flex-direction: column; }
.todo-task { display: flex; align-items: flex-start; gap: 12px; padding: 7px 4px 7px 6px; border-radius: 8px; }
.todo-task:hover { background: #FBF8F1; }
.todo-task > input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #111; flex-shrink: 0; cursor: pointer; }
.todo-task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.todo-task-text { font-size: 15px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; cursor: pointer; }
.todo-task.is-done .todo-task-text { color: #9A958C; text-decoration: line-through; }
.todo-task-note { font-size: 14px; color: #5A5650; }
.todo-task-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.todo-task .todo-more { opacity: 0.55; margin-top: -4px; }
.todo-task:hover .todo-more, .todo-task .todo-more:focus-visible { opacity: 1; }
.todo-tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #F1EDE6; color: #5A5650; white-space: nowrap; }
.todo-tag.wait { background: #EBF4FC; color: #1F5A94; }
.todo-cl-empty { font-size: 14px; color: #8A8680; padding: 2px 6px; }
.todo-cl-empty.all-done { color: var(--success); font-weight: 600; }
.todo-cl-add { display: flex; flex-direction: column; gap: 8px; }
.todo-add-area { height: auto; padding: 10px 12px; line-height: 1.45; resize: vertical; min-height: 64px; }
.todo-cl-add-btns { display: flex; gap: 8px; }
.todo-side-row { display: flex; align-items: flex-start; gap: 12px; padding: 7px 4px 7px 6px; border-radius: 8px; cursor: pointer; }
.todo-side-row:hover { background: #FBF8F1; }
.todo-side-row input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #111; flex-shrink: 0; cursor: pointer; }
.todo-side-text { font-size: 15px; line-height: 1.45; display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.todo-side-row.is-done .todo-side-text { color: #9A958C; text-decoration: line-through; }
.todo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.todo-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; background: #fff; }
.todo-chip input { width: 15px; height: 15px; margin: 0; accent-color: #111; cursor: pointer; }
.todo-chip.is-done { background: #F1EDE6; color: #9A958C; text-decoration: line-through; }
.todo-link-sm { align-self: flex-start; border: none; background: none; padding: 4px 0; font-size: 14px; font-weight: 700; color: #8A6D10; cursor: pointer; font-family: inherit; }
.todo-side .todo-note { min-height: 110px; }
.todo-right-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.todo-right-h { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: #5A5650; }
.todo-newlist { display: flex; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.todo-start { background: #fff; border: 1px dashed #C9C2B5; border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.todo-start b { color: var(--ink); }
.todo-modal-row { display: flex; gap: 8px; margin-bottom: 4px; }
.todo-modal-stack { display: flex; flex-direction: column; gap: 10px; }
.todo-modal-stack .todo-btn { text-align: left; }
.todo-edit-area { height: auto; min-height: 84px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.todo-side.folded, .todo-cl.folded { gap: 0; }
@media (max-width: 1100px) {
  .todo-board { grid-template-columns: minmax(0, 1fr); }
  .todo-board-right { order: -1; }
}
@media (max-width: 700px) {
  .todo-progress { width: 100%; margin: 0; order: -1; }
  .todo-rems { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .todo-rems::-webkit-scrollbar { display: none; }
  .todo-rem-pill, .todo-rem-add-btn { flex-shrink: 0; }
  .todo-rem-pill button { max-width: 200px; }
  .todo-side, .todo-cl { padding: 12px 14px; }
  .todo-hide-btn { display: none; }
  .todo-task .todo-more { opacity: 1; }
  .todo-cl-head .todo-more.boxed { width: 40px; height: 40px; }
  .todo-newlist { flex-wrap: wrap; }
  .todo-newlist .todo-input { flex-basis: 100%; }
}
.todo-start p { margin: 0; }

/* Activity: Reset all + backdated-entry note (Oct 21) */
.act-panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.act-reset-all { padding: 6px 12px; font-size: 13px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.act-backdate-note { margin-top: 6px; font-size: 13px; color: #7A5F0C; background: #FBF3D9; border: 1px solid #F4E5B2; border-radius: 8px; padding: 6px 10px; }
.act-backdate-note button { border: none; background: none; padding: 0; margin-left: 4px; font: inherit; font-weight: 700; color: #8A6D10; text-decoration: underline; cursor: pointer; }

/* Activity: typed numbers, goals, auto-save status (Oct 21) */
.act-head-btns { display: flex; gap: 6px; }
input.act-val-input { width: 4.2ch; min-width: 56px; max-width: 110px; text-align: center; border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 2px 4px; font-family: inherit; color: inherit; -moz-appearance: textfield; appearance: textfield; }
input.act-val-input::-webkit-outer-spin-button, input.act-val-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.act-val-input:hover { border-color: var(--line); background: #fff; }
input.act-val-input:focus { outline: 2px solid var(--gold); outline-offset: 1px; background: #fff; }
.act-goal { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 8px; width: 100%; }
.act-goal-track { display: block; width: 80%; height: 5px; border-radius: 3px; background: #E2DCD1; overflow: hidden; }
.act-goal-fill { display: block; height: 5px; border-radius: 3px; background: var(--gold); }
.act-goal-fill.done { background: var(--success); }
.act-goal-text { font-size: 12px; font-weight: 700; color: #6B675F; }
.act-save-status { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 700; background: var(--success-bg); color: var(--success); }
.act-save-status .act-save-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.act-save-status.saving, .act-save-status.pending { background: #FBF3D9; color: #7A5F0C; }
.act-save-status.error { background: var(--danger-bg); color: var(--danger); }
.act-save-status button { border: 1px solid currentColor; background: #fff; color: inherit; border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
/* My To-Do: shared checklist (Oct 22) */
.todo-cl-shared { border-color: #BFD4EE; background: #FBFCFE; }
.todo-cl-shared .todo-cl-icon { color: #2B6CB0; }
.todo-cl-sub { font-size: 14px; color: #5A5650; }
.todo-cl-hint { font-size: 13px; color: #8A8680; }
.todo-tag.share { background: #EEF2F8; color: #34507A; }
.todo-modal .todo-cl-hint { margin: 8px 0 4px; line-height: 1.45; }
.todo-modal .todo-repeat-days { margin-top: 2px; }
.todo-modal .todo-modal-meta { margin-top: 6px; }
.todo-pill span { text-transform: none; letter-spacing: normal; }
/* My To-Do: task notes + EOD Summary (Oct 22) */
.todo-notes-toggle, .todo-note-addlink { align-self: flex-start; border: none; background: none; padding: 2px 0; font-size: 14px; font-weight: 700; color: #8A6D10; cursor: pointer; font-family: inherit; }
.todo-note-item { display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: left; border: none; border-radius: 8px; background: #F7F5F0; padding: 6px 10px; font-family: inherit; font-size: 14px; line-height: 1.45; color: #2A2A2A; cursor: pointer; }
.todo-note-item:hover { background: #F0ECE3; }
.todo-note-item b { white-space: nowrap; color: #5A5650; font-size: 13px; }
.todo-note-item span { overflow-wrap: anywhere; }
.todo-note-add { display: flex; gap: 6px; }
.todo-note-add .todo-input { height: 38px; font-size: 14px; }
.todo-modal.todo-modal-wide { max-width: 760px; width: 100%; }
.todo-eod-text { width: 100%; box-sizing: border-box; min-height: 380px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-family: inherit; font-size: 14px; line-height: 1.55; background: #FAF9F6; color: var(--ink); resize: vertical; }
.todo-eod-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
/* New Agents List: admin notes card (Oct 22) */
.na-board { background: #FFFBEF; border: 1px solid #F4E5B2; border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.na-board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.na-board-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--ink); }
.na-board-title svg { color: #8A6D10; }
.na-board-badge { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #7A5F0C; background: #FBF3D9; border-radius: 999px; padding: 3px 8px; }
.na-board-add { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; color: var(--ink); }
.na-board-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid #F1EDE6; border-radius: 10px; padding: 8px 10px 8px 12px; }
.na-board-text { flex: 1 1 260px; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.na-board-meta { font-size: 13px; color: #6B675F; white-space: nowrap; }
.na-board-btn { border: none; background: none; padding: 6px 8px; border-radius: 6px; font-size: 14px; font-weight: 700; color: #8A6D10; cursor: pointer; font-family: inherit; }
.na-board-btn:hover { background: #FBF3D9; }
.na-board-empty { font-size: 14px; color: #6B675F; }
.na-board-form { display: flex; flex-direction: column; gap: 8px; }
.na-board-input { width: 100%; box-sizing: border-box; border: 1px solid var(--gold); border-radius: 8px; padding: 10px 12px; font-family: inherit; font-size: 15px; line-height: 1.45; resize: vertical; }
.na-board-form-btns { display: flex; gap: 8px; align-items: center; }

/* Keyboard users: these sliders hid their focus outline with nothing in its
   place, so tabbing onto one gave no visible sign. Show a gold ring instead.
   (Mouse clicks don't trigger :focus-visible on sliders, so nothing changes
   for mouse users.) */
.cmp-card input[type="range"]:focus-visible,
.cmp-shared-panel input[type="range"]:focus-visible,
.proj-est-panel input[type="range"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}


/* ==== RMG light design ==== */
:focus-visible { outline: 3px solid #00A8D8; outline-offset: 2px; }
#login-screen, #changepw-screen, #invite-screen { background: #003C60; }
#invite-screen { align-items: center; justify-content: center; height: 100vh; overflow: auto; }
.login-logo-img { width: 130px; height: auto; max-width: 100%; border-radius: 0; border: 0; box-shadow: none; object-fit: contain; }
.login-title { font-weight: 800; color: #003C60; font-size: 22px; }
.login-card button { background: #003C60; color: #fff; min-height: 44px; }
.sidebar { background: #003C60; }
.sidebar::before, .sidebar::after { display: none; }
.sidebar-header { background: #fff; margin: 12px; padding: 10px; border-radius: 10px; border: 0; justify-content: center; flex-direction: column; gap: 4px; }
.sidebar-logo-img { width: auto; height: 64px; border: 0; border-radius: 0; object-fit: contain; }
.sidebar-brand { text-align: center; }
.sidebar-brand-name { color: #003C60; font-family: var(--font-body); font-size: 13px; font-weight: 700; line-height: 1.25; white-space: normal; }
.sidebar-brand-sub { display: none; }
.nav-group-label { color: #B9D3E2; font-weight: 700; }
.nav-label { color: #fff; }
.nav-item { min-height: 40px; color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, 0.16); color: #fff; }
.nav-item.active .nav-label, .nav-item.active .nav-icon { color: #fff; font-weight: 700; }
.sf-role { color: #B9D3E2; }
.ct-section-label, .ct-eyebrow { color: #00688A; }
.ha-link { color: #00688A; }
.ct-status-pill.pending { background: #DDF1F8; color: #00506B; }
.ct-status-pill.paid, .ct-status-pill.approved { background: #E6F2CC; color: #3F5410; }
.ct-status-pill.awaiting { background: #FCEBD3; color: #7A4300; }

.rmg-page { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.rmg-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.rmg-hello { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; color: #003C60; }
.rmg-head p { margin: 4px 0 0; }
.rmg-muted { color: #52687A; font-size: 14px; }
.rmg-btn { min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px; background: #003C60; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.rmg-btn.alt { background: #fff; color: #003C60; border: 1.5px solid #B7C6D0; }
.rmg-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.rmg-sort { border: 0; background: none; padding: 4px 0; min-height: 32px; font: inherit; font-weight: 700; color: #52687A; cursor: pointer; white-space: nowrap; }
.rmg-sort:hover { color: #003C60; }
.rmg-sort.on-dark, .rmg-sort.on-dark:hover { color: #fff; text-transform: inherit; letter-spacing: inherit; font-size: inherit; }
.rmg-tag { font-size: 13px; font-weight: 700; color: #00506B; background: #DDF1F8; border-radius: 999px; padding: 6px 12px; }
.rmg-tag.warn { background: #FCEBD3; color: #7A4300; padding: 2px 8px; }
.rmg-sale { background: #EFF6DF; border: 1px solid #CFE09A; border-radius: 12px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.rmg-sale strong { color: #003C60; }
.rmg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.rmg-stat, .rmg-card { background: #fff; border: 1px solid #DCE5EB; border-radius: 12px; padding: 16px 18px; }
.rmg-stat-label { font-size: 14px; font-weight: 600; color: #52687A; }
.rmg-stat-value { font-size: 28px; line-height: 1.25; font-weight: 800; color: #003C60; font-variant-numeric: tabular-nums; }
.rmg-stat-note { font-size: 14px; color: #52687A; }
.rmg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.rmg-card h2 { margin: 0 0 8px; font-size: 19px; font-weight: 700; color: #003C60; }
.rmg-table-card { padding: 16px 0 6px; }
.rmg-table-card h2 { padding: 0 18px; }
.rmg-table-scroll { overflow-x: auto; }
.rmg-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.rmg-table th { text-align: left; color: #52687A; font-size: 14px; font-weight: 700; padding: 10px 18px; white-space: nowrap; }
.rmg-table td { border-top: 1px solid #DCE5EB; padding: 11px 18px; }
.rmg-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rmg-rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #DCE5EB; }
.rmg-rank { width: 28px; height: 28px; flex: none; border-radius: 50%; background: #E3ECF1; color: #003C60; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.rmg-grow { flex: 1; font-weight: 600; }
.rmg-num { font-variant-numeric: tabular-nums; }
.rmg-label { display: block; font-size: 14px; font-weight: 600; color: #52687A; margin-bottom: 4px; }
.rmg-select { min-height: 44px; border: 1px solid #B7C6D0; border-radius: 8px; padding: 0 10px; font: inherit; background: #fff; color: #1E3442; }
.rmg-toggle { display: flex; gap: 4px; background: #E3ECF1; border-radius: 10px; padding: 4px; }
.rmg-toggle button { min-height: 44px; border: 0; border-radius: 8px; padding: 0 18px; font: inherit; font-weight: 700; cursor: pointer; background: transparent; color: #003C60; }
.rmg-toggle button.on { background: #003C60; color: #fff; }
.rmg-sale-big { background: #003C60; color: #fff; border-radius: 14px; padding: 22px 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.rmg-sale-tag { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #C7E37A; }
.rmg-sale-name { font-size: 26px; font-weight: 800; line-height: 1.2; }
.rmg-sale-amt { text-align: right; font-size: 30px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rmg-sale-amt span { display: block; font-size: 14px; font-weight: 400; color: #D4E4EE; }
.rmg-podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: end; }
.rmg-podium-card { background: #fff; border: 1px solid #DCE5EB; border-top: 6px solid #003C60; border-radius: 12px; padding: 20px; text-align: center; }
.rmg-podium-card.p1 { border-top-color: #90B430; }
.rmg-podium-card.p2 { border-top-color: #00A8D8; }
.rmg-podium-name { font-size: 21px; font-weight: 800; color: #003C60; }
.rmg-podium-amt { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .sidebar:not(.open) { box-shadow: none; } }
@media (max-width: 640px) { .rmg-hello { font-size: 24px; } .rmg-table th, .rmg-table td { padding-left: 12px; padding-right: 12px; } }
