
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* EAP brand kit - LIGHT theme. Cool grey canvas + white cards, soft periwinkle
     accent, minimal & flat. Everything reads off these vars = the theme switch. */
  --bg: #f2f3f7;          /* cool grey canvas */
  --surface: #ffffff;
  --card: #ffffff;        /* white cards */
  --ink: #23252e;         /* cool near-black text */
  --ink-soft: #565a68;
  --muted: #767c8e;       /* cool grey, readable labels on white */
  --line: #e4e6ee;        /* light cool border */
  --field-bg: #ffffff;
  --field-border: #d4d7e2;
  --row-bg: #f7f8fb;      /* very light cool row */
  --row-hover: #eef0f6;
  --brand: #7d8cca;       /* soft periwinkle - fills, active states, borders */
  --brand-dark: #5866b5;  /* deeper periwinkle - hovers + accent text on white */
  --on-brand: #ffffff;    /* white text on periwinkle surfaces */
  --ok: #2fae5f;          /* green */
  --warn: #d99400;        /* amber */
  --bad: #e2495a;         /* red */
  --info: #6b7cff;        /* indigo accent */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 8px rgba(30,32,45,0.06), 0 1px 2px rgba(30,32,45,0.05);
  --shadow-lg: 0 14px 36px rgba(30,32,45,0.14);
  --font-head: 'Cormorant', 'Cormorant Garamond', 'Playfair Display', Georgia, serif; /* "The Seasons" */
  --font-sub: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased; }
/* Headline face ("The Seasons"/Cormorant) - used sparingly for headings + wordmark */
.nav-logo, .login-box h1, .page-header h1, .modal-head h2 { font-family: var(--font-head); }
/* Montserrat for small structural labels/subheads, per the brand kit */
.metric-label, .group-cap, .stage-label, .login-tag, .deal-meta { font-family: var(--font-sub); }
/* Serif headings need more size/weight to hold presence vs the old sans */
.login-box h1 { font-size: 31px; font-weight: 700; }
.section-head h2 { font-family: var(--font-sub); font-size: 12px; font-weight: 700; letter-spacing: 0.7px; color: var(--ink-soft); }
.modal-head h2 { font-size: 24px; font-weight: 700; }
.view { display: none; }
.view.active { display: block; }

.nav { background: var(--surface); color: var(--ink); padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.nav-logo { display: flex; flex-direction: column; line-height: 1; }
.nav-logo-mark { font-family: var(--font-head); font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: 4px; }
.nav-logo-sub { font-family: var(--font-sub); font-size: 7px; font-weight: 600; letter-spacing: 3.2px; text-transform: uppercase; color: var(--brand); margin-top: 3px; }
.nav-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.nav-right strong { color: var(--ink); }
.btn-link { background: none; border: 1px solid var(--line); color: var(--ink-soft); padding: 6px 13px; border-radius: 8px; cursor: pointer; font-size: 12px; font-family: inherit; transition: border-color .12s, color .12s; }
.btn-link:hover { border-color: var(--brand); color: var(--brand); }

#viewLogin.active { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: #eef0f6; padding: 20px; }
.login-box { background: var(--card); border-radius: var(--radius); padding: 40px 36px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.login-tag { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo-mark { font-family: var(--font-head); font-size: 54px; font-weight: 700; color: var(--ink); letter-spacing: 7px; line-height: 1; padding-left: 7px; }
.login-logo-sub { font-family: var(--font-sub); font-size: 11px; font-weight: 600; letter-spacing: 5px; text-transform: uppercase; color: var(--brand); margin-top: 10px; padding-left: 5px; }
.login-box h1 { text-align: center; }
.login-box .login-sub { text-align: center; }
.login-box h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.login-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.4; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--field-border); border-radius: 8px; font-size: 14px; font-family: inherit; background: var(--field-bg); color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 60px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-primary { padding: 13px 24px; background: var(--brand); color: var(--on-brand); border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: 0 4px 12px rgba(125,140,202,0.30); transition: transform .12s, box-shadow .12s, filter .12s; }
.btn-primary.wide { width: 100%; }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(125,140,202,0.38); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { padding: 10px 16px; background: transparent; color: var(--brand-dark); border: 1.5px solid var(--brand); border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-ghost:hover { background: var(--brand); color: var(--on-brand); }
.btn-danger { padding: 8px 14px; background: transparent; color: var(--bad); border: 1px solid var(--bad); border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-danger:hover { background: var(--bad); color: #fff; }
.msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-top: 12px; display: none; }
.msg.show { display: block; }
.msg-ok { background: #edfaf1; color: #1a7a3c; }
.msg-err { background: #fff0f2; color: #a01828; }
.msg-info { background: #e8f4fd; color: #155382; }

.page-wrap { max-width: 920px; margin: 0 auto; padding: 28px 20px 60px; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 44px; font-weight: 700; letter-spacing: 0.3px; line-height: 1.05; }
.page-header p { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.align-banner { background: rgba(125,140,202,0.10); border: 1px solid rgba(125,140,202,0.42); padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; color: var(--ink-soft); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.align-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.align-banner a { text-decoration: none; }

/* Agent primary tabs (Home / Pipeline / Training / Homework) */
.agent-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.agent-tab { background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); padding: 10px 24px; border-radius: 999px; font-weight: 600; cursor: pointer; font-family: var(--font-sub); font-size: 14px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s, color .12s, background .12s; }
.agent-tab:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.agent-tab.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); box-shadow: 0 6px 16px rgba(125,140,202,0.34); }
.atab-panel { display: none; }
.atab-panel.active { display: block; }

/* Reusable progress bar + encouragement - delight, reused across activities,
   onboarding, homework, program progress. Bars fill from 0 with a playful
   overshoot on (re)render via paintBars(). */
.prog-wrap { margin: 2px 0 16px; }
.progress { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--brand); transition: width .6s cubic-bezier(.34,1.56,.64,1); }
.progress.done > i { background: var(--ok); }
.prog-msg { margin-top: 8px; font-size: 13px; font-weight: 700; font-family: var(--font-sub); color: var(--ink-soft); letter-spacing: .2px; }
.prog-msg.done { color: var(--ok); }
.checkin-cta { text-align: center; padding: 8px 0 4px; }
.checkin-cta-msg { font-size: 14px; color: var(--ink-soft); margin-bottom: 14px; }

/* Celebration confetti - fires via celebrate() when a tracker hits 100% */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti > i { position: absolute; top: -14px; width: 9px; height: 15px; border-radius: 2px; opacity: 0.95; will-change: transform; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(105vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* Monday 9am weekly-check-in nudge (renderMondayReminder) */
.monday-reminder { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; padding: 16px 20px; border-radius: 14px; background: linear-gradient(135deg, rgba(125,140,202,0.14), rgba(125,140,202,0.06)); border: 1px solid var(--brand); }
.monday-reminder-txt { color: var(--ink); font-size: 14px; line-height: 1.45; }
.monday-reminder-txt span { color: var(--muted); }
.monday-reminder-actions { display: flex; align-items: center; gap: 10px; }
.monday-reminder-actions .btn-primary { padding: 10px 18px; font-size: 14px; }
.monday-reminder-x { background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.monday-reminder-x:hover { background: rgba(0,0,0,0.05); color: var(--ink); }

/* Weekly check-in recap strip (renderCkRecap) - the numbers the agent attests to */
.ck-recap { background: linear-gradient(135deg, rgba(125,140,202,0.10), rgba(125,140,202,0.03)); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.ck-recap-loading, .ck-recap-err { color: var(--muted); font-size: 13px; padding: 6px 0; }
.ck-recap-head { font-weight: 800; font-size: 15px; color: var(--ink); }
.ck-recap-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 12px; }
.ck-recap-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ck-recap-seg { display: inline-flex; background: rgba(125,140,202,0.12); border-radius: 999px; padding: 3px; gap: 2px; }
.ck-seg { border: none; background: transparent; color: var(--muted); font-family: var(--font-sub); font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.ck-seg.is-active { background: var(--card); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.ck-recap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ck-stat { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; text-align: center; }
.ck-stat-val { font-size: 22px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ck-stat-lbl { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.ck-recap-actlabel { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 14px 0 8px; }
.ck-reflect-head { font-weight: 800; font-size: 15px; color: var(--ink); margin: 6px 0 10px; }

/* Daily / Weekly toggle on the activities section header */
.act-head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.act-seg-group { display: inline-flex; background: rgba(125,140,202,0.12); border-radius: 999px; padding: 3px; gap: 2px; }
.act-seg { border: none; background: transparent; color: var(--muted); font-family: var(--font-sub); font-size: 12.5px; font-weight: 700; padding: 5px 13px; border-radius: 999px; cursor: pointer; }
.act-seg.is-active { background: var(--card); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

/* Searchable FAQ (agent FAQ tab, live from the Google Doc) */
.faq-search { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid var(--field-border); border-radius: 10px; background: var(--field-bg); color: var(--ink); font-family: inherit; font-size: 14px; margin-bottom: 18px; }
.faq-search:focus { outline: none; border-color: var(--brand); }
.faq-section { margin-bottom: 22px; }
.faq-section-title { font-family: var(--font-sub); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--brand); margin-bottom: 8px; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--card); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 13px 16px; font-weight: 700; font-size: 14.5px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--muted); font-size: 20px; font-weight: 400; flex: 0 0 auto; }
.faq-item[open] summary::after { content: '-'; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-answer { padding: 13px 16px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

/* Projected-income callout on the pipeline board */
.proj-income { display: flex; align-items: center; gap: 8px; background: rgba(125,140,202,0.12); border: 1px solid rgba(125,140,202,0.42); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 14px; font-size: 14px; color: var(--ink-soft); }
.proj-income b { font-size: 20px; color: var(--ink); font-weight: 800; }
.stage-pct { color: var(--sc, var(--brand)); font-weight: 700; margin-left: auto; }
.stage-count { background: var(--sc, var(--brand)); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 9px; font-family: var(--font-sub); }

/* Weekly conversion funnel (dials → contacts → appts) */
.conv-row { display: flex; align-items: stretch; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.conv-step { flex: 1 1 0; min-width: 72px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--line)); border-radius: var(--radius-sm); padding: 10px 8px; text-align: center; }
.conv-val { font-size: 20px; font-weight: 800; color: var(--c, var(--ink)); line-height: 1; }
.conv-bar { height: 5px; background: var(--line); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.conv-bar i { display: block; height: 100%; background: var(--c, var(--brand)); border-radius: 3px; transition: width 0.5s ease; }
.conv-lbl { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-top: 5px; font-family: var(--font-sub); }
.conv-step.clickable { cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.conv-step.clickable:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.conv-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; padding: 0 2px; }
.conv-pct { font-size: 11px; font-weight: 700; color: var(--brand); margin-top: 2px; }
/* Conversion (close/pull-through) rate = closed / (closed + fall-out). */
.conv-rate { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); font-family: var(--font-sub); }
.conv-rate .cr-pct { font-size: 18px; font-weight: 800; color: var(--ok); margin-right: 4px; }

/* Date-range segmented control (This Week / This Month / All Time) */
.range-tabs { display: flex; gap: 6px; }
.range-tab { background: var(--field-bg); border: 1px solid var(--line); color: var(--ink-soft); padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 700; font-family: var(--font-sub); cursor: pointer; transition: color .12s, background .12s, border-color .12s; }
.range-tab:hover { border-color: var(--brand); color: var(--brand); }
.range-tab.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* Program-progress donut (closings toward graduation) */
.program-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: center; padding: 8px 0; }
.donut { position: relative; width: 140px; height: 140px; flex: 0 0 auto; }
.donut svg { transform: rotate(-90deg); }
.donut circle[data-off] { transition: stroke-dashoffset .9s cubic-bezier(.34,1.2,.64,1); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-num { font-size: 36px; font-weight: 800; font-family: var(--font-sub); color: var(--ink); line-height: 1; }
.donut-goal { font-size: 11px; color: var(--muted); font-family: var(--font-sub); font-weight: 700; letter-spacing: .8px; margin-top: 3px; }
.program-msg { font-size: 15px; color: var(--ink-soft); max-width: 340px; line-height: 1.5; }
.program-msg b { color: var(--ink); }
.program-msg.done { color: var(--ok); }
.program-msg.done b { color: var(--ok); }
.grad-vis { flex: 0 0 auto; }
.grad-vis svg { max-width: 100%; height: auto; }
@keyframes grad-pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes grad-bounce { 0% { transform: translateY(-6px); opacity: 0; } 60% { transform: translateY(2px); } 100% { transform: none; opacity: 1; } }
.grad-vis .grad-step.filled { transform-box: fill-box; transform-origin: bottom; animation: grad-pop .5s ease both; }
.grad-vis .grad-step.filled rect { filter: drop-shadow(0 2px 5px rgba(0,0,0,0.18)); }
.grad-vis .grad-cap.grad { transform-box: fill-box; animation: grad-bounce .7s ease both; }
@media (prefers-reduced-motion: reduce) { .grad-vis .grad-step.filled, .grad-vis .grad-cap.grad { animation: none; } }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.metrics.metrics-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; margin-bottom: 0; }
.metrics.metrics-2 .metric { height: 100%; } /* fill the equalized grid row so all four cards match height */
.metrics-wrap { display: flex; align-items: stretch; gap: 20px; margin-bottom: 24px; }
.metric-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.metric-col.leading { flex: 5 1 0; }
.metric-col.lagging { flex: 4 1 0; }
.group-cap { font-size: 11px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--muted); }
.metric-group { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); align-content: start; }
/* Leading cluster: fixed 3 columns so the 2-card top row and 3-card bottom row line up */
.metric-group.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-col.leading { gap: 12px; }
.metric-divider { flex: 0 0 1px; background: var(--line); align-self: stretch; }
@media (max-width: 640px) {
  .metrics-wrap { flex-direction: column; gap: 16px; }
  .metric-divider { flex: 0 0 1px; width: 100%; }
}
.metric { background: var(--card); border-radius: var(--radius-sm); padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.metric.clickable { cursor: pointer; transition: border-color 0.14s, transform 0.14s, box-shadow 0.14s; }
.metric.clickable:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
/* Per-stage accent (--c): colored top bar + value number. */
.metric.metric-accent { border-top: 3px solid var(--c); }
.metric.metric-accent .metric-value { color: var(--c); }
.metric-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1px; color: var(--muted); margin-bottom: 6px; white-space: nowrap; }
.metric-value { font-size: 22px; font-weight: 800; line-height: 1; color: var(--ink); }
.metric-sub { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-family: var(--font-sub); font-size: 18px; font-weight: 700; letter-spacing: 0; color: var(--ink); }
.section-head .section-action { font-size: 13px; color: var(--brand); cursor: pointer; font-weight: 600; background: none; border: none; font-family: inherit; }
.section-head .section-action:hover { text-decoration: underline; }
/* Drill-view "Back to pipeline" button lives outside .section-head, so give it a real style. */
.drill-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.drill-head .section-action { background: var(--field-bg); border: 1px solid var(--line); color: var(--brand); padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 700; font-family: var(--font-sub); cursor: pointer; transition: background .12s, border-color .12s, transform .12s; }
.drill-head .section-action:hover { border-color: var(--brand); background: var(--brand-wash, #f7f2e7); transform: translateX(-2px); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.two-col > .section { margin-bottom: 0; }
.two-col.solo { grid-template-columns: 1fr; }
/* Graduation progress line under the Closed metric card (folded in from the old
   standalone "Road to Graduation" panel). */
.metric-grad { margin-top: 6px; font-family: var(--font-sub); font-size: 12px; font-weight: 700; color: #178a48; }
.metric-grad.done { color: var(--ok); }
/* Current Stages - split Buyers / Listings rows of stage-count chips. */
.stage-side { margin-bottom: 14px; }
.stage-side:last-of-type { margin-bottom: 0; }
.stage-side-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--brand); font-weight: 700; margin-bottom: 8px; }
.stage-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.stage-chip { text-align: center; padding: 12px 8px; border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 10px; background: var(--card); cursor: pointer; font-family: inherit; transition: transform .1s ease, box-shadow .1s ease; }
.stage-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.06)); }
.stage-chip-val { display: block; font-size: 22px; font-weight: 700; color: var(--ink); }
.stage-chip-lbl { display: block; font-size: 11px; font-family: var(--font-sub); color: var(--muted); margin-top: 3px; }
.stage-chip.active { background: color-mix(in srgb, var(--c) 12%, var(--card)); border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; }
.stage-chip.active .stage-chip-val { color: var(--c); }
.pl-open-count { font-size: 12px; font-weight: 700; color: var(--muted); font-family: var(--font-sub); letter-spacing: .02em; }
/* Funnel side sub-labels (Buyers / Listings). */
.conv-side-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--brand); font-weight: 700; margin: 14px 0 6px; }
.de-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 12px; cursor: pointer; }
.de-side-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--brand); font-weight: 700; margin: 14px 0 6px; }
.de-hint { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.deal-forecast { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 4px 0 12px; padding: 12px 16px; background: var(--brand-wash, #f7f2e7); border-radius: 12px; }
.deal-forecast .fc-left { display: flex; flex-direction: column; gap: 3px; }
.deal-forecast .fc-cap { font-weight: 700; color: var(--ink-soft); font-size: 14px; }
.deal-forecast .fc-val { font-size: 13px; color: var(--muted); font-weight: 600; }
.deal-forecast .fc-ring { flex: 0 0 auto; line-height: 0; }
.deal-forecast .ring-prog { transition: stroke-dashoffset 0.55s ease, stroke 0.4s ease; }
.deal-forecast .ring-txt { font-family: var(--font-sub); font-weight: 800; font-size: 19px; }
.deal-forecast.done .fc-ring { animation: ringpulse 1.5s ease-in-out infinite; }
@keyframes ringpulse { 0%,100% { filter: drop-shadow(0 0 0 rgba(47,174,95,0)); } 50% { filter: drop-shadow(0 0 7px rgba(47,174,95,0.65)); } }
@media (prefers-reduced-motion: reduce) { .deal-forecast.done .fc-ring { animation: none; } }
.dl-section { margin: 8px 0 14px; padding-top: 10px; border-top: 1px dashed var(--line, #e6ddc9); }
.dl-section-head { font-size: 13px; letter-spacing: 0.2px; color: var(--brand); font-weight: 700; margin-bottom: 8px; }
.dl-section-head .dl-opt { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.qna-prior { white-space: pre-wrap; font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); background: var(--field-bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 0; max-height: 160px; overflow-y: auto; }
.qna-section-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--brand); margin: 14px 0 4px; padding-top: 8px; border-top: 1px solid var(--line); }
/* Make the native date picker's calendar icon visible on the dark theme. */
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.7; }
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.empty-state { padding: 20px 0; text-align: center; color: var(--muted); font-size: 13px; font-style: italic; }
/* Today's Activities */
.act-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.act-row:first-child { border-top: none; }
.act-check { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--field-border); background: var(--field-bg); cursor: pointer; display: flex; align-items: center; justify-content: center; color: transparent; font-size: 15px; font-weight: 800; transition: background 0.12s, border-color 0.12s, color 0.12s; }
.act-check:hover { border-color: var(--brand); }
.act-check.done { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
/* Interactive daily checkboxes go green when done (onboarding's readonly checks stay gold). */
.act-check:not(.readonly).done, .act-check:not(.readonly).done:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.act-check.readonly { cursor: default; }
.act-check.readonly:hover { border-color: var(--field-border); }
.act-check.readonly.done, .act-check.readonly.done:hover { border-color: var(--brand); }
.act-body { flex: 1 1 auto; min-width: 0; }
.act-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.act-name.done { color: var(--muted); text-decoration: line-through; }
.act-sub { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: var(--font-sub); }
/* Per-activity progress bar - fills red <50% / amber >=50% / green when the target's met. */
.act-bar { flex: 0 0 84px; height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; }
.act-bar i { display: block; height: 100%; border-radius: 4px; background: var(--muted); transition: width 0.4s ease, background 0.3s ease; }
.act-bar.met i { background: var(--ok); }
.act-bar.warn i { background: var(--warn); }
.act-bar.under i { background: var(--bad); }
.act-over { font-size: 11px; color: var(--ok); font-weight: 700; margin-top: 3px; }
.act-cadence { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-left: 8px; vertical-align: middle; }
.act-num { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.act-step { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--field-border); background: var(--field-bg); color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1; font-family: inherit; }
.act-step:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.act-step:disabled { opacity: 0.4; cursor: not-allowed; }
.act-count { font-size: 15px; font-weight: 800; min-width: 56px; text-align: center; color: var(--ink); }
.act-count.met { color: var(--ok); }
.act-count.warn { color: var(--warn); }
.act-count.under { color: var(--bad); }
/* Row-level target signal: red <50%, amber once halfway, green when the target's met. */
.act-row.met { border-left: 3px solid var(--ok); padding-left: 10px; margin-left: -13px; }
.act-row.warn { border-left: 3px solid var(--warn); padding-left: 10px; margin-left: -13px; }
.act-row.under { border-left: 3px solid var(--bad); padding-left: 10px; margin-left: -13px; }
.act-remove { flex: 0 0 auto; margin-left: 8px; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--field-bg); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.act-remove:hover { border-color: var(--bad); color: var(--bad); }
.act-add-btn { margin-top: 14px; background: none; border: 1.5px dashed var(--field-border); color: var(--brand); font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: 9px; cursor: pointer; font-family: inherit; }
.act-add-btn:hover { border-color: var(--brand); background: rgba(125,140,202,0.08); }
.act-add-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.act-add-form input[type=text] { flex: 1 1 200px; }
.act-add-form input, .act-add-form select { padding: 8px 10px; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--field-bg); color: var(--ink); font-size: 13px; font-family: inherit; }
.act-add-form input[type=number] { width: 80px; }
.act-count .act-target { color: var(--muted); font-weight: 600; font-size: 13px; }
/* RE·ALIGN-style Today's Activities rows: icon · title/sub · stepper · target · bar · % */
.actx-row { display: flex; align-items: center; gap: 14px; padding: 13px 2px; border-top: 1px solid var(--line); }
.actx-row:first-child { border-top: none; }
.actx-row.met { border-left: 3px solid var(--ok); padding-left: 10px; margin-left: -12px; }
.actx-row.warn { border-left: 3px solid var(--warn); padding-left: 10px; margin-left: -12px; }
.actx-row.under { border-left: 3px solid var(--bad); padding-left: 10px; margin-left: -12px; }
.actx-ico { flex: 0 0 auto; width: 26px; height: 26px; }
.actx-ico svg { width: 100%; height: 100%; display: block; }
.actx-main { flex: 1 1 auto; min-width: 0; }
.actx-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.actx-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 1px; }
.actx-auto { font-size: 13px; color: var(--warn); vertical-align: middle; }
.actx-stepper { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.actx-step { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--field-border); background: var(--field-bg); color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; font-family: inherit; }
.actx-step:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.actx-step:disabled { opacity: 0.35; cursor: not-allowed; }
.actx-count { font-size: 15px; font-weight: 800; min-width: 20px; text-align: center; color: var(--ink); font-family: var(--font-sub); }
.actx-count.met { color: var(--ok); } .actx-count.warn { color: var(--warn); } .actx-count.under { color: var(--bad); }
.actx-target { flex: 0 0 auto; width: 64px; text-align: right; font-size: 13px; font-weight: 700; color: var(--muted); font-family: var(--font-sub); }
.actx-bar { flex: 0 0 90px; height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; }
.actx-bar i { display: block; height: 100%; border-radius: 4px; background: var(--muted); transition: width .4s ease, background .3s ease; }
.actx-bar.met i { background: var(--ok); } .actx-bar.warn i { background: var(--warn); } .actx-bar.under i { background: var(--bad); }
.actx-pct { flex: 0 0 40px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--muted); font-family: var(--font-sub); }
.actx-pct.met { color: var(--ok); }
.actx-checkbtn { flex: 0 0 auto; border: 1.5px solid var(--field-border); background: var(--field-bg); color: var(--ink); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.actx-checkbtn.on { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); }
.actx-remove { flex: 0 0 auto; margin-left: 4px; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--field-bg); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.actx-remove:hover { border-color: var(--bad); color: var(--bad); }
@media (max-width: 620px) {
  .actx-target { display: none; }
  .actx-bar { flex-basis: 54px; }
}
/* Admin: activity editor */
.act-edit-head, .act-edit { display: grid; grid-template-columns: 2fr 1.1fr 1.2fr 68px 78px auto auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.act-edit-head { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 700; border-top: none; }
.act-edit input[type=text], .act-edit input[type=number], .act-edit select { padding: 7px 9px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-size: 13px; font-family: inherit; width: 100%; }
.act-edit .ae-active { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-soft); }
.act-add { margin-top: 14px; }
.onb-pick-head, .onb-pick { display: grid; grid-template-columns: 50px 1.3fr 1.3fr; gap: 10px; align-items: center; padding: 7px 8px; border-top: 1px solid var(--line); border-radius: 6px; }
.onb-pick-head { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 700; border-top: none; }
.onb-pick.on { background: rgba(125,140,202,0.09); }
.op-mapwrap { display: flex; justify-content: center; }
.op-name { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onb-pick .op-label { padding: 7px 9px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-size: 13px; font-family: inherit; width: 100%; }
.onb-pick .op-label:disabled { opacity: 0.45; }
/* Homework & Files */
.hw-actions { display: flex; gap: 8px; flex-wrap: nowrap; margin-bottom: 8px; }
.hw-btn { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 10px; border: 1.5px solid var(--field-border); border-radius: 9px; background: var(--field-bg); color: var(--ink); font-size: 13px; font-weight: 700; font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.hw-btn:hover { border-color: var(--brand); color: var(--brand); }
.hw-btn.primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.hw-btn.primary:hover { background: var(--brand-dark); color: var(--on-brand); }
.hw-btn.disabled { opacity: 0.45; cursor: not-allowed; }
.hw-btn.disabled:hover { border-color: var(--field-border); color: var(--ink); }
.hw-file { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hw-file:first-child { border-top: none; }
.hw-file a { color: var(--ink); text-decoration: none; font-weight: 600; }
.hw-file a:hover { color: var(--brand); }
.hw-ic { flex: 0 0 auto; width: 20px; text-align: center; }
.hw-file-meta { font-size: 11px; color: var(--muted); margin-left: auto; font-family: var(--font-sub); }
.hw-sub-label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); margin: 18px 0 4px; }
.hw-sub-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.hw-sub-row:first-child { border-top: none; }
.hw-sub-row a { color: var(--brand); text-decoration: none; font-weight: 600; }
.hw-note { font-size: 12px; color: var(--muted); font-style: italic; padding: 6px 0; }
.onb-sign-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--on-brand); background: var(--brand); border-radius: 8px; padding: 6px 12px; text-decoration: none; }
.onb-sign-link:hover { background: var(--brand-dark); }
.drill-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }

/* Homework assignment cards + progress (agent Homework tab) */
.hw-progress-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin: 14px 0 8px; }
.hw-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.hw-progress-head h3 { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-soft); margin: 0; font-family: var(--font-sub); }
.hw-progress-count { font-size: 22px; font-weight: 800; color: var(--brand); font-family: var(--font-sub); white-space: nowrap; }
.hw-progress-count small { font-size: 12px; color: var(--muted); font-weight: 600; }
.hw-week-head { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; font-family: var(--font-sub); }
.hw-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--field-border); border-radius: var(--radius-sm); padding: 15px 17px; margin-bottom: 11px; transition: border-color .15s ease, box-shadow .15s ease; }
.hw-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.hw-card.submitted { border-left-color: var(--ok); background: linear-gradient(to right, rgba(47,174,95,0.06), var(--card) 55%); }
.hw-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.hw-pill { font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 999px; white-space: nowrap; font-family: var(--font-sub); }
.hw-pill.todo { background: rgba(212,160,23,0.14); color: #a9791a; border: 1px solid rgba(212,160,23,0.3); }
.hw-pill.done { background: rgba(47,174,95,0.15); color: var(--ok); }
.hw-pill.graded { background: rgba(125,140,202,0.18); color: var(--brand-dark); }
.hw-link.done-toggle { color: var(--ok); border-color: rgba(47,174,95,0.5); }
.hw-link.done-toggle:hover { border-color: var(--ok); color: var(--ok); }
.hw-link.done-toggle.on { background: rgba(47,174,95,0.12); border-color: var(--ok); }
.hw-meta { font-size: 12px; color: var(--muted); font-family: var(--font-sub); }
.hw-card-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 13px; }
/* Accordion: header toggles the card; collapsed cards hide their body so the
   status pills read at a glance. */
.hw-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; cursor: pointer; }
.hw-card-headmain { flex: 1 1 auto; min-width: 0; }
.hw-card-collapsed .hw-card-title { margin-bottom: 0; }
.hw-card-chev { flex: 0 0 auto; color: var(--muted); font-size: 13px; line-height: 1; margin-top: 4px; transition: transform .15s ease; }
.hw-card-collapsed .hw-card-chev { transform: rotate(-90deg); }
.hw-card-collapsed .hw-card-body { display: none; }
.hw-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hw-link { font-size: 13px; font-weight: 700; text-decoration: none; color: var(--brand); display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--field-bg); cursor: pointer; font-family: inherit; }
.hw-link:hover { border-color: var(--brand); color: var(--brand); }
.hw-link.primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.hw-link.primary:hover { background: var(--brand-dark); color: var(--on-brand); }
.hw-sub-when { font-size: 11px; color: var(--muted); margin-left: auto; font-family: var(--font-sub); font-style: italic; }
.hw-card-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 13px; white-space: pre-wrap; }
.hw-inline label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin: 10px 0 5px; }
.hw-inline textarea, .hw-inline input[type=url], .hw-inline input[type=file] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--field-bg); color: var(--ink); font-size: 14px; font-family: inherit; }
.hw-inline textarea:focus, .hw-inline input:focus { outline: none; border-color: var(--brand); }
.hw-inline textarea { min-height: 84px; resize: vertical; }
.hw-inline .hw-card-actions { margin-top: 12px; }
.hwc-msg { margin-top: 8px; }
.hw-submitted-note { font-size: 12px; color: var(--muted); font-style: italic; margin: 6px 0 2px; }
.hw-card.hw-flash { animation: hwflash 1.4s ease; }
@keyframes hwflash { 0%,100% { box-shadow: 0 0 0 0 rgba(125,140,202,0); } 30% { box-shadow: 0 0 0 3px rgba(125,140,202,0.5); } }

/* Training tab */
.section-sub { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.ses-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 13px 16px; margin-bottom: 10px; }
.ses-info { flex: 1; min-width: 0; }
.ses-when { font-size: 12px; font-weight: 700; color: var(--brand); font-family: var(--font-sub); letter-spacing: .2px; }
.ses-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ses-type { font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-soft); background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 999px; padding: 2px 8px; font-family: var(--font-sub); }
.twk-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; }
.twk-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-soft); font-family: var(--font-sub); }
.twk-count { color: var(--brand); }
.twk-track { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 9px 0 12px; }
.twk-track i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .6s cubic-bezier(.34,1.56,.64,1); }
.twk-items { display: flex; flex-direction: column; gap: 6px; }
.twk-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 8px; padding: 9px 12px; font-family: inherit; font-size: 13px; color: var(--ink); cursor: pointer; transition: border-color .12s; }
.twk-item:hover { border-color: var(--brand); }
.twk-item.done { background: rgba(47,174,95,0.06); }
.twk-item.done .twk-name { color: var(--ink-soft); text-decoration: line-through; }
.twk-ic { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--field-border); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.twk-ic.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.twk-name { flex: 1; font-weight: 600; }
.twk-min { font-size: 11px; color: var(--muted); font-family: var(--font-sub); white-space: nowrap; }

/* Agent curriculum tree (Area → Section → Topic → Resource) */
.ac-overall { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 14px; }
.ac-overall-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ac-overall-label { font-size: 13px; font-weight: 800; color: var(--ink); font-family: var(--font-sub); text-transform: uppercase; letter-spacing: .6px; }
.ac-overall-num { font-size: 12.5px; color: var(--muted); font-family: var(--font-sub); font-variant-numeric: tabular-nums; }
.ac-bar { height: 8px; border-radius: 999px; background: var(--field-bg); overflow: hidden; }
.ac-bar-fill { height: 100%; background: var(--ok); border-radius: 999px; transition: width .3s; }
.ac-area { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.ac-area-head { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 15px 17px; font-family: inherit; }
.ac-area-info { flex: 1; min-width: 0; }
.ac-area-name { font-size: 15px; font-weight: 800; color: var(--ink); display: block; }
.ac-area-sub { font-size: 12px; color: var(--muted); font-family: var(--font-sub); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ac-area-bar { flex: 0 0 130px; }
.ac-caret { flex: 0 0 auto; color: var(--muted); font-size: 12px; transition: transform .15s; }
.ac-area.collapsed .ac-caret { transform: rotate(-90deg); }
.ac-area.collapsed .ac-area-body { display: none; }
.ac-area-body { padding: 4px 16px 14px; }
.ac-sec { margin-top: 12px; }
.ac-sec-name { font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--brand); margin: 6px 0 8px; font-family: var(--font-sub); }
.ac-top { margin: 0 0 12px; padding-left: 10px; border-left: 2px solid var(--line); }
.ac-top-name { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.ac-res { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field-bg); margin-bottom: 6px; }
.ac-res.done { background: rgba(52,190,120,0.07); }
.ac-pillar { border-color: rgba(224,177,42,0.55); border-left: 4px solid #e0b12a; background: rgba(224,177,42,0.10); }
.ac-res-icon { flex: 0 0 auto; font-size: 15px; }
.ac-res-main { flex: 1; min-width: 0; }
.ac-res-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ac-core { display: inline-block; margin: 0 0 4px; font-size: 10px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: #c8791d; background: rgba(240,144,42,0.16); padding: 3px 8px; border-radius: 999px; }
.ac-res-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 3px; font-size: 11.5px; color: var(--muted); font-family: var(--font-sub); }
.ac-pct { color: var(--brand); font-weight: 700; }
.ac-graded { color: #7b57cf; font-weight: 700; }
.ac-submitted { color: var(--ok); font-weight: 700; }
.ac-sublink, .ac-subdate { color: var(--muted); }
.ac-sublink { color: var(--brand); text-decoration: none; }
.ac-play { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--brand); color: var(--on-brand); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ac-play.dim { background: var(--field-border); color: var(--muted); cursor: default; }
.ac-open { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--brand); text-decoration: none; padding: 6px 12px; border: 1.5px solid var(--brand); border-radius: 8px; }
.ac-open.dim { color: var(--muted); border-color: var(--field-border); }
.ac-done { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; font-family: var(--font-sub); color: var(--muted); background: var(--field-bg); border: 1.5px solid var(--field-border); border-radius: 8px; padding: 6px 11px; cursor: pointer; }
.ac-done.done { color: var(--ok); border-color: var(--ok); background: rgba(52,190,120,0.1); }
.ac-dot { font-size: 12px; }
.ac-submit-toggle { flex: 0 0 auto; font-size: 12px; font-weight: 700; font-family: var(--font-sub); color: var(--brand); background: transparent; border: 1.5px solid var(--brand); border-radius: 8px; padding: 6px 11px; cursor: pointer; }
.ac-player { margin-top: 10px; }
.ac-asn { flex-wrap: wrap; }
.ac-asn .ac-res-row { display: flex; align-items: center; gap: 11px; width: 100%; }
.ac-subpanel { flex-basis: 100%; margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; background: var(--card); }
.ac-subpanel textarea { width: 100%; min-height: 60px; padding: 8px 9px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-family: inherit; font-size: 13px; resize: vertical; }
.ac-sub-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ac-sub-row input[type=url] { flex: 1; min-width: 160px; padding: 8px 9px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-family: inherit; font-size: 13px; }
.ac-sub-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ac-sub-send { font-size: 12.5px; font-weight: 700; font-family: var(--font-sub); color: var(--on-brand); background: var(--brand); border: none; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.ac-sub-send:disabled { opacity: .6; cursor: default; }
.ac-sub-msg { font-size: 12px; font-family: var(--font-sub); }
.ac-sub-msg.ok { color: var(--ok); } .ac-sub-msg.err { color: var(--danger, #c23a52); }

/* Training Library (agent Training tab) */
.tl-mod { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.tl-mod-head { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 15px 17px; font-family: inherit; }
.tl-check { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--field-border); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--muted); background: var(--field-bg); }
.tl-check.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-mod-info { flex: 1; min-width: 0; }
.tl-mod-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.tl-mod-sub { font-size: 12px; color: var(--muted); font-family: var(--font-sub); margin-top: 2px; }
.tl-caret { flex: 0 0 auto; color: var(--muted); font-size: 12px; transition: transform .15s; }
.tl-mod.collapsed .tl-caret { transform: rotate(-90deg); }
.tl-mod.collapsed .tl-mod-body { display: none; }
.tl-mod-body { padding: 0 17px 8px; }
.tl-lesson { display: flex; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); }
.tl-play { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 9px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; text-decoration: none; border: none; cursor: pointer; font-family: inherit; }
.tl-play:hover { background: var(--brand-dark); }
.tl-pct { font-size: 11px; font-weight: 700; color: #b7791f; background: rgba(217,138,43,0.16); border-radius: 999px; padding: 3px 10px; font-family: var(--font-sub); }
.tl-player { margin-top: 12px; }
.tl-player-loading { color: var(--muted); font-size: 13px; padding: 10px 0; }
/* Vimeo's responsive embed injects a padding-top wrapper; cap the width so it sits neatly in the lesson. */
.tl-player > div { max-width: 640px; }
.tl-player iframe { border-radius: 10px; }
.tl-lesson-main { flex: 1; min-width: 0; }
.tl-lesson-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.tl-lesson-desc { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.tl-lesson-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.tl-min { font-size: 11px; font-weight: 700; color: var(--brand-dark); background: rgba(125,140,202,0.14); border-radius: 999px; padding: 3px 10px; font-family: var(--font-sub); }
.tl-txt-btn { font-size: 12px; color: var(--ink-soft); background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 8px; padding: 3px 10px; cursor: pointer; font-family: inherit; }
.tl-txt-btn:hover { border-color: var(--brand); color: var(--brand); }
.tl-transcript { display: none; margin-top: 10px; padding: 12px 14px; background: var(--row-bg); border-radius: 8px; border: 1px solid var(--line); font-size: 13px; line-height: 1.7; color: var(--ink-soft); white-space: pre-wrap; }
.tl-transcript.open { display: block; }
.tl-done { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; cursor: pointer; font-family: var(--font-sub); font-size: 10px; font-weight: 700; color: var(--muted); }
.tl-done .tl-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--field-border); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.tl-done.done .tl-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-done.done { color: var(--ok); }
.tl-hw-label { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-family: var(--font-sub); }
.tl-hw-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: none; padding: 7px 2px; font-family: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.tl-hw-star { flex: 0 0 auto; width: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.tl-hw-item.done .tl-hw-star { color: var(--brand); }
.tl-hw-name { flex: 0 1 auto; font-weight: 600; color: var(--brand-dark); text-decoration: underline; text-underline-offset: 2px; }
.tl-hw-item:hover .tl-hw-name { color: var(--brand); }
.tl-hw-item.done .tl-hw-name { color: var(--ink-soft); text-decoration: line-through; }
.tl-hw-min { font-size: 11px; color: var(--muted); font-family: var(--font-sub); white-space: nowrap; }
.tl-hw-graded { font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--brand-dark); background: rgba(125,140,202,0.18); border-radius: 999px; padding: 2px 9px; font-family: var(--font-sub); }

/* Admin View-as */
/* Fixed to the top so "Exit View As" is always reachable, even after scrolling a
   long (team) dashboard. body.viewing-as offsets the page + tucks the sticky nav
   beneath it so they don't overlap. */
/* Distinct amber (not periwinkle) so the impersonation banner reads as a separate
   system bar instead of blending into the periwinkle sidebar/hero. */
.imp-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 60; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 16px; background: #b5751c; color: #fff; font-size: 13px; font-weight: 600; font-family: var(--font-sub); }
.imp-banner .imp-exit { background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.5); color: #fff; }
.imp-banner .imp-exit:hover { background: rgba(255,255,255,0.3); }
body.viewing-as { padding-top: 38px; }
body.viewing-as .nav { top: 38px; }
.imp-exit { background: var(--on-brand); color: var(--brand); border: none; border-radius: 6px; padding: 5px 12px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 12px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-tab { background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); padding: 8px 18px; border-radius: 8px; font-weight: 600; cursor: pointer; font-family: var(--font-sub); font-size: 13px; }
.admin-tab.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* Admin left-menu shell: sections on the left, sub-tabs on top. */
.page-wrap-admin { max-width: 1200px; }
.admin-layout { display: flex; gap: 24px; align-items: flex-start; }
.admin-side { display: flex; flex-direction: column; gap: 5px; flex: 0 0 176px; position: sticky; top: 16px; }
.admin-side .admin-tab { width: 100%; text-align: left; padding: 10px 14px; }
.admin-main { flex: 1; min-width: 0; }
.admin-subtitle { margin: 0 0 14px; color: var(--muted); }
@media (max-width: 820px) {
  .admin-layout { flex-direction: column; gap: 14px; }
  .admin-side { flex-direction: row; flex-wrap: wrap; position: static; flex-basis: auto; width: 100%; }
  .admin-side .admin-tab { width: auto; }
}
.admin-search { width: 100%; padding: 11px 13px; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--field-bg); color: var(--ink); font-family: inherit; font-size: 14px; margin-bottom: 16px; }
.admin-search::placeholder { color: var(--muted); }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--row-bg); margin-bottom: 6px; }
.admin-row:hover { background: var(--row-hover); }
.admin-row-name { font-size: 14px; font-weight: 600; }
.admin-row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; font-family: var(--font-sub); }
.admin-login-link { display: block; text-align: center; margin-top: 18px; font-size: 12px; color: var(--muted); cursor: pointer; font-family: var(--font-sub); letter-spacing: 0.5px; }
.admin-login-link:hover { color: var(--brand); }

/* Admin: Curriculum builder */
.cb-intro { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.cb-mod { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.cb-mod.unassigned { border-style: dashed; }
.cb-mod-head { display: grid; grid-template-columns: 26px 1.6fr 1fr 60px 1.1fr auto; gap: 7px; align-items: center; padding: 10px 12px; background: var(--row-bg); }
.cb-mod-head input, .cb-mod-head select { padding: 7px 8px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-size: 13px; font-family: inherit; width: 100%; }
.cb-mname { font-weight: 700; }
.cb-collapse { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--muted); padding: 0; }
.cb-mod-actions { display: flex; gap: 4px; align-items: center; }
.cb-icon-btn { background: var(--field-bg); border: 1.5px solid var(--field-border); border-radius: 7px; cursor: pointer; font-size: 12px; color: var(--ink-soft); padding: 6px 9px; font-family: inherit; }
.cb-icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.cb-icon-btn.danger:hover { border-color: var(--bad, #d1435b); color: var(--bad, #d1435b); }
.cb-mod-body { padding: 8px 12px 14px; }
.cb-sub-label { font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; font-family: var(--font-sub); }
.cb-item { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--field-bg); }
.cb-item-row { display: flex; align-items: center; gap: 9px; padding: 9px 11px; }
.cb-item-mark { flex: 0 0 auto; font-size: 13px; }
.cb-item-title { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-item-title.empty { color: var(--muted); font-style: italic; font-weight: 500; }
.cb-badge { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 999px; font-family: var(--font-sub); white-space: nowrap; background: var(--field-bg); border: 1px solid var(--field-border); color: var(--ink-soft); }
.cb-badge.on { background: rgba(47,174,95,0.15); color: var(--ok); border-color: transparent; }
.cb-badge.off { background: var(--row-hover); color: var(--muted); }
.cb-item-editor { border-top: 1px dashed var(--line); padding: 12px 12px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cb-item-editor .cb-f { display: flex; flex-direction: column; gap: 4px; }
.cb-item-editor .cb-f.full { grid-column: 1 / -1; }
.cb-item-editor label { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.cb-item-editor input, .cb-item-editor select, .cb-item-editor textarea { padding: 8px 9px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-size: 13px; font-family: inherit; width: 100%; }
.cb-item-editor textarea { min-height: 70px; resize: vertical; }
.cb-editor-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.cb-add-btn { background: none; border: 1.5px dashed var(--field-border); color: var(--ink-soft); border-radius: 8px; padding: 8px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.cb-add-btn:hover { border-color: var(--brand); color: var(--brand); }
.cb-add-mod { display: block; width: 100%; margin-top: 6px; padding: 12px; }

/* Admin: Curriculum Builder v2 (Areas → Modules → Resources) */
.c2-cockpit { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 12px 14px; background: var(--row-bg); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; }
.c2-totals { display: flex; gap: 14px; flex-wrap: wrap; }
.c2-tot { font-size: 12px; color: var(--muted); font-family: var(--font-sub); }
.c2-tot b { font-size: 16px; color: var(--ink); font-weight: 800; margin-right: 3px; }
.c2-tot.pub b { color: var(--ok); }
.c2-statchips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.c2-stat { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: var(--field-bg); border: 1px solid var(--field-border); color: var(--ink-soft); }
.c2-stat b { color: var(--ink); }
.c2-filters { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 12px; }
.c2-filters select, .c2-fq { padding: 7px 9px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-size: 12.5px; font-family: inherit; }
.c2-fq { flex: 1; min-width: 180px; }
.c2-needs { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-soft); }
.c2-area { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.c2-area-head { display: flex; align-items: center; gap: 9px; padding: 11px 13px; background: var(--row-bg); }
.c2-area-name { font-weight: 800; font-size: 15px; color: var(--ink); flex: 1; }
.c2-count { font-size: 11px; color: var(--muted); font-family: var(--font-sub); }
.c2-area-actions, .c2-mod-actions { display: flex; gap: 4px; align-items: center; }
.c2-area-body { padding: 6px 12px 12px; }
.c2-area.collapsed .c2-area-body, .c2-area.collapsed .c2-area-editor,
.c2-sec.collapsed .c2-sec-body, .c2-sec.collapsed .c2-sec-editor,
.c2-top.collapsed .c2-top-body, .c2-top.collapsed .c2-top-editor { display: none !important; }
.c2-empty { font-size: 12px; color: var(--muted); font-style: italic; padding: 8px 2px; }
/* Section = mid-level bucket */
.c2-sec { border: 1px solid var(--line); border-radius: 9px; margin: 8px 0; background: var(--row-bg); }
.c2-sec-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; }
.c2-sec-name { font-weight: 800; font-size: 13px; color: var(--ink); text-transform: uppercase; letter-spacing: .4px; }
.c2-sec-body { padding: 4px 12px 10px; }
.c2-sec-actions, .c2-top-actions { display: flex; gap: 4px; align-items: center; }
.c2-sec-head .c2-count, .c2-top-head .c2-count { margin-left: auto; }
/* Topic = holds resources */
.c2-top { border: 1px solid var(--line); border-radius: 9px; margin: 6px 0; margin-left: 14px; background: var(--field-bg); border-left: 3px solid var(--line); }
.c2-top-head { display: flex; align-items: center; gap: 8px; padding: 9px 11px; }
.c2-top-name { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.c2-top-body { padding: 4px 11px 10px; }
.c2-flash { outline: 2px solid var(--brand); outline-offset: 2px; transition: outline-color 1.2s; }
.c2-mod { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 7px; background: var(--field-bg); }
.c2-mod .c2-mod { margin-left: 16px; border-left: 3px solid var(--line); }
.c2-mod-head { display: flex; align-items: center; gap: 8px; padding: 9px 11px; }
.c2-mod-name { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.c2-tier { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 2px 7px; border-radius: 999px; background: rgba(107,124,255,0.15); color: #5b6be0; }
.c2-persona { font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--row-hover); color: var(--muted); }
.c2-mod-head .c2-count { margin-left: auto; }
.c2-mod-body { padding: 4px 11px 10px; }
.c2-res { border: 1px solid var(--line); border-radius: 7px; margin-bottom: 5px; background: var(--card); }
.c2-res-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.c2-res-icon { flex: 0 0 auto; font-size: 13px; }
.c2-res-title { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c2-res-title.empty { color: var(--muted); font-style: italic; font-weight: 500; }
.c2-gate { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(240,144,42,0.16); color: #c8791d; white-space: nowrap; }
.c2-pill { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 999px; font-family: var(--font-sub); white-space: nowrap; border: 1px solid transparent; }
.c2-pill.linked { background: rgba(56,132,222,0.15); color: #3172c9; }
.c2-pill.verify { background: rgba(224,177,42,0.18); color: #a9820f; }
.c2-pill.build { background: rgba(240,144,42,0.16); color: #c8791d; }
.c2-pill.record { background: rgba(209,67,91,0.15); color: #c23a52; }
.c2-pill.decision { background: rgba(214,71,148,0.15); color: #bd3f83; }
.c2-pill.review { background: rgba(139,107,222,0.16); color: #7b57cf; }
.c2-pill.na { background: var(--row-hover); color: var(--muted); }
.c2-pill.draft { background: rgba(42,196,214,0.15); color: #1f97a6; }
.c2-pri { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 2px 6px; border-radius: 5px; }
.c2-pri.p-critical { background: rgba(209,67,91,0.16); color: #c23a52; }
.c2-pri.p-high { background: rgba(240,144,42,0.16); color: #c8791d; }
.c2-pri.p-medium { background: rgba(224,177,42,0.16); color: #a9820f; }
.c2-pri.p-low, .c2-pri.p-deferred { background: var(--row-hover); color: var(--muted); }
.c2-link { text-decoration: none; color: var(--brand); font-weight: 800; font-size: 14px; padding: 0 3px; }
.c2-pubtog { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--ink-soft); font-weight: 700; white-space: nowrap; }
.c2-area-editor, .c2-sec-editor, .c2-top-editor, .c2-res-editor { border-top: 1px dashed var(--line); padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c2-area-editor .cb-f, .c2-sec-editor .cb-f, .c2-top-editor .cb-f, .c2-res-editor .cb-f { display: flex; flex-direction: column; gap: 4px; }
.c2-area-editor .cb-f.full, .c2-sec-editor .cb-f.full, .c2-top-editor .cb-f.full, .c2-res-editor .cb-f.full { grid-column: 1 / -1; }
.c2-area-editor label, .c2-sec-editor label, .c2-top-editor label, .c2-res-editor label { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.c2-area-editor input, .c2-area-editor select, .c2-area-editor textarea,
.c2-sec-editor input, .c2-sec-editor select, .c2-sec-editor textarea,
.c2-top-editor input, .c2-top-editor select, .c2-top-editor textarea,
.c2-res-editor input, .c2-res-editor select, .c2-res-editor textarea { padding: 8px 9px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-size: 13px; font-family: inherit; width: 100%; }
.c2-area-editor textarea, .c2-sec-editor textarea, .c2-top-editor textarea, .c2-res-editor textarea { min-height: 60px; resize: vertical; }
.c2-personas { display: flex; gap: 12px; flex-wrap: wrap; }
.c2-personas label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.c2-flags { grid-column: 1 / -1; display: flex; gap: 18px; }
.c2-flags label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.c2-filter-spacer { margin-left: auto; }
/* Resource editor: production/publish bar pinned to the top of the editor grid */
.c2-edbar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 10px 12px; background: var(--row-bg); border: 1px solid var(--line); border-radius: 8px; }
.c2-edbar .cb-f { flex: 1 1 150px; min-width: 130px; margin: 0; }
.c2-edbar-pub { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink); padding: 6px 10px; border-radius: 8px; background: var(--field-bg); border: 1.5px solid var(--field-border); cursor: pointer; }
.c2-edbar-pub input { width: auto !important; }
.c2-edbar-pub.on { background: rgba(52,190,120,0.14); border-color: rgba(52,190,120,0.55); color: var(--ok); }
/* Core Assignment checkbox + reveal */
.c2-gaterow { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.c2-gate-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.c2-gate-chk input { width: auto !important; }
.c2-gate-which { flex: 1 1 200px; min-width: 160px; }
/* Personas as toggle chips */
.c2-chips { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.c2-chip { font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--field-border); background: var(--field-bg); color: var(--muted); cursor: pointer; user-select: none; }
.c2-chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.c2-chip-empty { font-size: 11.5px; color: var(--muted); font-style: italic; }
/* Manage Personas panel */
.c2-persona-mgr { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 14px; margin-bottom: 12px; }
.c2-pm-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--brand); margin-bottom: 4px; }
.c2-pm-note { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.c2-pm-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.c2-pm-row { display: flex; align-items: center; gap: 8px; }
.c2-pm-row input { flex: 1; max-width: 260px; padding: 6px 9px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-size: 13px; font-family: inherit; }
.c2-pm-add { display: flex; align-items: center; gap: 8px; }
.c2-pm-add input { max-width: 260px; padding: 7px 9px; border: 1.5px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font-size: 13px; font-family: inherit; }

/* Pipeline board */
.stage-group { border-top: 1px solid var(--line); }
.stage-group:first-child { border-top: none; }
.stage-header { display: flex; align-items: flex-start; gap: 8px; padding: 13px 2px; cursor: pointer; user-select: none; }
.stage-caret, .stage-label, .stage-count { margin-top: 1px; }
.stage-header:hover .stage-label { color: var(--ink); }
.stage-group { border-left: 3px solid var(--sc, var(--line)); border-radius: 8px; padding-left: 8px; margin-bottom: 3px; }
.stage-caret { color: var(--sc, var(--muted)); font-size: 10px; transition: transform 0.15s; }
.stage-group.open .stage-caret { transform: rotate(90deg); }
.stage-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
/* Section-level guidance, right-aligned in the stage header: one chance-to-close
   number on top, the "very next step" (keyed to stage) below it. Once per section. */
/* Fixed width (not content-width) so every section's block shares the same left
   edge - otherwise margin-left:auto lands each ragged by its own text length. */
.stage-sub { margin-left: auto; width: 360px; max-width: 60%; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.stage-chance { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--font-sub); }
.stage-chance .sc-pct { font-size: 16px; font-weight: 800; color: var(--sc, var(--brand)); }
.stage-chance .sc-cap { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.stage-next { font-size: 12.5px; color: var(--ink-soft); font-family: var(--font-sub); line-height: 1.4; }
.stage-next-lbl { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--sc, var(--brand)); margin-right: 6px; }
/* Pipeline List/Board view toggle */
.pv-toggle { display: inline-flex; background: var(--row-bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.pv-btn { border: none; background: transparent; color: var(--muted); font-family: var(--font-sub); font-weight: 700; font-size: 12px; padding: 5px 12px; border-radius: 6px; cursor: pointer; }
.pv-btn.active { background: var(--brand); color: var(--on-brand); }
/* Kanban forecast board */
.kb-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.kb-fchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px; border: 1.5px solid var(--c); color: var(--c); background: transparent; font-family: var(--font-sub); font-size: 12px; font-weight: 700; cursor: pointer; user-select: none; }
.kb-fchip.off { opacity: 0.38; border-color: var(--line); color: var(--muted); }
.kb-fchip .kb-fdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.kb-fchip.off .kb-fdot { background: var(--muted); }
.kb-bfilters { margin-top: -6px; align-items: center; }
.kb-bchip .kb-fdot { border-radius: 3px; }
.kb-flabel { font-family: var(--font-sub); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-right: 2px; }
.kb-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
/* The four time columns share the visible width so they fit on one screen; the
   Unscheduled column is fixed-width and sits past the fold (scroll to reach it). */
.kb-col { flex: 0 0 calc((100% - 36px) / 4); min-width: 150px; min-height: calc(100vh - 230px); background: var(--row-bg); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; }
.kb-col.kb-col-unsched { flex: 0 0 240px; min-width: 240px; }
.kb-col-head { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.kb-col-title { font-family: var(--font-sub); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink); }
.kb-col-count { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 800; color: var(--muted); }
.kb-col-sub { font-size: 11px; color: var(--muted); font-family: var(--font-sub); margin-top: 3px; font-variant-numeric: tabular-nums; }
.kb-col-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; min-height: 40px; }
.kb-col-empty { color: var(--muted); font-size: 12px; font-family: var(--font-sub); text-align: center; padding: 10px 0; }
.kb-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--sc, var(--brand)); border-radius: 8px; padding: 9px 11px; cursor: pointer; transition: transform .1s, box-shadow .1s; }
.kb-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.kb-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kb-stage { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--sc, var(--brand)); font-family: var(--font-sub); }
.kb-chance { font-size: 12px; font-weight: 800; color: var(--kc, var(--brand)); font-family: var(--font-sub); }
.kb-card-name { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.kb-card-meta { font-size: 11.5px; color: var(--muted); font-family: var(--font-sub); margin-top: 2px; }
.kb-card-val { font-size: 12px; font-weight: 700; color: var(--ink-soft); font-family: var(--font-sub); margin-top: 4px; font-variant-numeric: tabular-nums; }
.stage-body { display: none; padding: 0 0 10px; }
.stage-group.open .stage-body { display: block; }
.deal-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--row-bg); margin-bottom: 6px; transition: transform 0.12s, box-shadow 0.12s; }
.deal-row:hover { transform: translateX(2px); box-shadow: var(--shadow); }
.deal-row:hover { background: var(--row-hover); }
.deal-main { flex: 1 1 auto; min-width: 0; }
.deal-address { font-size: 14px; font-weight: 600; }
.deal-subaddr { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.deal-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.deal-detail { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 6px; font-size: 12px; color: var(--ink-soft); font-family: var(--font-sub); }
.dd-item { white-space: nowrap; }
.dd-label { color: var(--muted); }
.dd-fub { color: var(--brand); text-decoration: none; font-weight: 600; }
.dd-fub:hover { text-decoration: underline; }
/* Note / open-task indicators on a deal row (notes surfaced on the pipeline). */
.deal-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(125,140,202,0.14); color: var(--brand-dark); font-size: 11px; font-weight: 700; font-family: var(--font-sub); vertical-align: middle; }
.deal-badge-task { background: rgba(47,174,95,0.14); color: var(--ok); }

/* Weekly check-in history */
.ci-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 8px; background: var(--row-bg); margin-bottom: 6px; cursor: pointer; }
.ci-row:hover { background: var(--row-hover); }
.ci-date { font-size: 14px; font-weight: 600; font-family: var(--font-sub); }
.ci-sub { font-size: 12px; color: var(--muted); margin-top: 2px; font-family: var(--font-sub); }
.ci-view { color: var(--brand); font-weight: 600; font-size: 13px; flex-shrink: 0; }
.ci-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 8px; }
.ci-stat { background: var(--field-bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ci-stat-label { font-size: 11px; color: var(--muted); font-family: var(--font-sub); letter-spacing: 0.3px; }
.ci-stat-val { font-size: 18px; font-weight: 700; margin-top: 3px; }
.ci-text { margin-top: 14px; }
.ci-text-label { font-size: 11px; color: var(--muted); font-family: var(--font-sub); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.ci-text-val { font-size: 14px; color: var(--ink-soft); line-height: 1.5; white-space: pre-wrap; }
/* Team Settings toggle (Ops → Team Settings) */
.team-setting { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 4px 0; }
.team-setting input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--brand-dark); cursor: pointer; }
.team-setting-txt { font-size: 14px; color: var(--ink); line-height: 1.5; }
.team-setting-sub { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 3px; font-family: var(--font-sub); }
.team-setting-note { font-size: 13px; font-family: var(--font-sub); margin-top: 8px; min-height: 18px; }
.team-setting-note.ok { color: var(--ok); }
.team-setting-note.err { color: var(--bad); }
/* Team reporting - per-agent roster + detail */
.rep-card { background: var(--row-bg); border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; margin-bottom: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.rep-card:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.rep-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rep-name { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink); }
.rep-pill { font-size: 11px; padding: 2px 10px; border-radius: 20px; font-weight: 600; font-family: var(--font-sub); background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.rep-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.rep-flag { font-size: 11px; padding: 2px 9px; border-radius: 6px; font-weight: 600; font-family: var(--font-sub); }
.rep-flag.red { background: rgba(255,90,106,0.16); color: var(--bad); }
.rep-flag.amber { background: rgba(217,148,0,0.15); color: var(--warn); }
.rep-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-top: 13px; }
/* Colorful productivity cards - per-metric accent (--c) on a top bar + the value. */
.prod-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 12px; margin-top: 13px; }
.prod-stat { position: relative; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); transition: transform 0.13s, box-shadow 0.13s; }
.prod-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.prod-stat-label { font-size: 11px; color: var(--muted); font-family: var(--font-sub); letter-spacing: 0.3px; font-weight: 600; }
.prod-stat-val { font-size: 24px; font-weight: 800; margin-top: 3px; color: var(--c); line-height: 1; }
.prod-stat.clickable { cursor: pointer; }
.prod-stat.active-drill { box-shadow: 0 0 0 2px var(--c) inset; }
.rep-stat { background: var(--field-bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.rep-stat-label { font-size: 11px; color: var(--muted); font-family: var(--font-sub); letter-spacing: 0.3px; }
.rep-stat-val { font-size: 17px; font-weight: 700; margin-top: 2px; color: var(--ink); }
.rep-stat-val small { font-size: 11px; font-weight: 500; color: var(--muted); }
.rep-bar { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 5px; }
.rep-bar > i { display: block; height: 100%; }
.rep-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rep-soon { opacity: 0.55; }
.rep-soon .rep-stat-val { font-size: 12px; font-weight: 500; color: var(--muted); }
/* Team reporting v2 - distinctive sections, one-line count boxes, accordion roster */
.rep-section { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--ink); margin: 22px 0 12px; }
.rep-section:first-child { margin-top: 4px; }
.rep-row { display: flex; flex-wrap: nowrap; gap: 8px; margin-bottom: 8px; }
.rep-box { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; background: var(--field-bg); border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 8px; padding: 10px 12px; transition: border-color .12s, box-shadow .12s; }
.rep-box .rep-stat-label { flex: 1 0 auto; } /* grow so values bottom-align even when labels wrap to 2 lines */
.rep-box.clickable { cursor: pointer; }
.rep-box.clickable:hover { box-shadow: var(--shadow-lg); }
.rep-box.active-filter { box-shadow: 0 0 0 2px var(--brand) inset; }
.rep-toggle { display: flex; gap: 8px; margin: 4px 0 16px; }
.rep-filter-banner { display: flex; align-items: center; gap: 10px; background: rgba(125,140,202,0.12); border: 1px solid var(--brand); border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-size: 13px; color: var(--ink-soft); }
.rep-roster-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.rep-roster-head > span { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--ink); }
.rep-group { border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.rep-group-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; user-select: none; font-family: var(--font-sub); font-weight: 700; font-size: 14px; color: var(--ink); background: var(--row-bg); }
.rep-group-head:hover { background: var(--row-hover); }
.rep-count { color: var(--muted); font-weight: 600; }
.rep-group-body { padding: 4px 10px 8px; }
.rep-agent { border-top: 1px solid var(--line); }
.rep-agent:first-child { border-top: none; }
.rep-agent-head { display: block; padding: 10px 6px; cursor: pointer; user-select: none; }
.rep-agent-head:hover .rep-name { color: var(--brand); }
.rep-agent-head .rep-name { font-size: 16px; }
.rep-agent-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rep-agent-metrics { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px; }
.rep-mchip { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rep-mchip b { color: var(--ink); font-weight: 700; margin-left: 3px; }
.rep-agent-body { padding: 2px 6px 12px; }
.rep-caret { color: var(--muted); font-size: 11px; width: 10px; display: inline-block; }
.rep-stat.clickable { cursor: pointer; transition: box-shadow .12s; }
.rep-stat.clickable:hover { box-shadow: var(--shadow-lg); }
.rep-stat.active-drill { box-shadow: 0 0 0 2px var(--brand) inset; }
.rep-deal-list { border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; margin: 8px 0 14px; }
.rep-deal { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 9px 2px; font-size: 13px; }
.rep-deal:first-child { border-top: none; }
.rep-deal-addr { font-weight: 600; color: var(--ink); }
.rep-deal-meta { color: var(--muted); font-size: 12px; }
.rep-fub { color: var(--brand); font-size: 12px; font-weight: 600; margin-left: auto; text-decoration: none; }
.rep-deal { align-items: center; }
.rep-deal-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; }
.rep-deal-stage { font-family: var(--font-sub); font-size: 12px; font-weight: 700; }
.rep-deal-ring { flex: 0 0 auto; line-height: 0; margin-left: 8px; }
/* Roster table (Agent · Daily Log · Conversations · Training · Homework · Status) */
.rep-week-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.rep-wpill { display: flex; align-items: baseline; gap: 6px; background: var(--field-bg); border: 1px solid var(--line); border-radius: 20px; padding: 5px 13px; font-family: var(--font-sub); font-size: 12px; font-weight: 700; color: var(--muted); }
.rep-wpill b { font-size: 15px; }
.rep-tabs { display: flex; gap: 8px; margin: 4px 0 14px; flex-wrap: wrap; }
.rep-tab { padding: 7px 15px; border: 1px solid var(--line); background: var(--field-bg); border-radius: 8px; font-family: var(--font-sub); font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.rep-tab:hover { border-color: var(--brand); }
.rep-tab.active { background: var(--ink); color: var(--card); border-color: var(--ink); }
.rep-table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.rep-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.rep-table thead th { text-align: left; font-family: var(--font-sub); font-size: 11px; font-weight: 700; letter-spacing: .4px; color: var(--brand); background: var(--row-bg); padding: 12px 16px; border-bottom: 1px solid var(--line); text-transform: uppercase; }
.rep-table tbody tr { border-top: 1px solid var(--line); cursor: pointer; transition: background .1s; }
.rep-table tbody tr:first-child { border-top: none; }
.rep-table tbody tr:hover { background: var(--row-hover); }
.rep-table td { padding: 13px 16px; vertical-align: middle; }
.rep-agent-cell { display: flex; align-items: center; gap: 12px; }
.rep-avatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); display: flex; align-items: center; justify-content: center; font-family: var(--font-sub); font-weight: 800; font-size: 13px; }
.rep-agent-name { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink); }
.rep-agent-flags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.rep-td-bar { display: flex; align-items: center; gap: 9px; min-width: 130px; }
.rep-td-bar .rep-bar { flex: 1 1 auto; margin-top: 0; }
.rep-td-num { font-family: var(--font-sub); font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.rep-td-blank { color: var(--muted); font-size: 14px; }
.rep-wstatus { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-sub); font-size: 13px; font-weight: 700; white-space: nowrap; }
.rep-td-action { text-align: right; white-space: nowrap; }
/* Roster: filter chips + card rows (no horizontal scroll) */
.rep-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 16px; }
.rep-fchip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border: 1px solid var(--line); background: var(--field-bg); border-radius: 999px; font-family: var(--font-sub); font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; transition: border-color .12s, background .12s, color .12s; }
.rep-fchip:hover { border-color: var(--brand); }
.rep-fchip b { font-weight: 800; }
.rep-fchip.active { background: var(--ink); color: var(--card) !important; border-color: var(--ink) !important; }
.rep-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.rep-arow { display: flex; align-items: center; gap: 20px; padding: 12px 18px; border-top: 1px solid var(--line); cursor: pointer; transition: background .1s; }
.rep-arow:first-child { border-top: none; }
.rep-arow:hover { background: var(--row-hover); }
.rep-arow-main { flex: 1 1 auto; min-width: 0; }
.rep-arow-id { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.rep-arow-side { flex: 0 0 240px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.rep-arow-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 22px; margin-top: 10px; }
.rep-m-label { font-family: var(--font-sub); font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.rep-m-bar { display: flex; align-items: center; gap: 9px; }
.rep-m-bar .rep-bar { flex: 1 1 auto; margin-top: 0; }
.rep-viewas { padding: 7px 15px; border: 1.5px solid var(--brand); background: transparent; color: var(--brand-dark); border-radius: 8px; font-family: var(--font-sub); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.rep-viewas:hover { background: var(--brand); color: var(--on-brand); }
@media (max-width: 620px) {
  .rep-arow { flex-direction: column; align-items: stretch; gap: 12px; }
  .rep-arow-side { flex: none; align-self: stretch; justify-content: space-between; }
  .rep-arow-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Compact agent card (modal) - big tiles + actions */
.ac-status { font-family: var(--font-sub); font-size: 14px; font-weight: 700; margin: 2px 0 4px; }
.ac-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 16px 0; }
.ac-tile { background: var(--field-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.ac-tile.muted { opacity: .6; }
.ac-tile-label { font-family: var(--font-sub); font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--brand); text-transform: uppercase; }
.ac-tile-val { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; margin-top: 4px; }
.ac-tile-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ac-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ac-actions .btn-primary, .ac-actions .btn-ghost { flex: 1 1 auto; }
.deal-actions { display: flex; gap: 6px; flex-shrink: 0; }
.deal-chance { flex: 0 0 auto; line-height: 0; margin-left: 8px; }
.ring-prog { transition: stroke-dashoffset 0.55s ease, stroke 0.4s ease; }
.chance-ring.done .ring-prog { filter: drop-shadow(0 0 3px rgba(47,174,95,0.55)); }
.chip-btn { padding: 6px 12px; background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink); font-family: inherit; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(15, 15, 26, 0.6); display: none; align-items: flex-start; justify-content: center; padding: 40px 20px 20px; z-index: 100; overflow-y: auto; }
.modal-scrim.show { display: flex; }
.modal { background: var(--card); border-radius: var(--radius); width: 100%; max-width: 520px; padding: 26px 28px; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal-head h2 { font-size: 19px; font-weight: 800; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; padding: 0 6px; }
.modal-sub { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.modal-wide { max-width: 860px; }
/* Funnel drill-in modal: deals behind a Performance box */
#drillTitle .drill-range { color: var(--muted); font-weight: 600; font-size: 15px; }
.drill-scroll { overflow-x: auto; margin-top: 6px; }
.drill-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.drill-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; font-family: var(--font-sub); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.drill-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.drill-row { cursor: pointer; }
.drill-row:hover td { background: var(--field-bg); }
.drill-c-name { font-weight: 700; min-width: 140px; }
.drill-c-addr { color: var(--ink-soft); min-width: 160px; }
.drill-stage { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.drill-c-act { white-space: nowrap; text-align: right; }
.drill-btn { border: 1px solid var(--field-border); background: var(--field-bg); color: var(--ink); font-weight: 700; font-size: 12.5px; padding: 5px 12px; border-radius: 7px; cursor: pointer; font-family: inherit; margin-left: 6px; }
.drill-btn:hover { border-color: var(--brand); color: var(--brand); }
.drill-dead:hover { border-color: var(--bad); color: var(--bad); }
@media (max-width: 560px) {
  .drill-c-addr { display: none; }
  .drill-table th:nth-child(2) { display: none; }
}
/* Per-transaction detail modal */
.deal-main { cursor: pointer; }
.ddx-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.ddx-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.ddx-title { font-size: 18px; font-weight: 800; color: var(--ink); }
.ddx-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ddx-stage { font-family: var(--font-sub); font-size: 12px; font-weight: 700; margin-top: 4px; }
.ddx-sec { margin-top: 16px; }
.ddx-sec-head { font-family: var(--font-sub); font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.ddx-row { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: 13px; }
.ddx-label { color: var(--muted); }
.ddx-val { color: var(--ink); font-weight: 600; text-align: right; }
.ddx-val a { color: var(--brand); text-decoration: none; }
/* Admin deal edit (#5B): Edit button + inline edit form */
.ddx-editbar { display: flex; justify-content: flex-end; margin: -4px 0 8px; }
.ddx-edit .ddx-sec { margin-bottom: 12px; }
.ddx-erow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 5px 0; }
.ddx-elabel { font-size: 13px; color: var(--ink-soft); flex: 0 0 auto; }
.ddx-einp { flex: 1 1 auto; max-width: 240px; padding: 6px 9px; border: 1px solid var(--field-border); border-radius: 7px; background: var(--field-bg); color: var(--ink); font: inherit; font-size: 13px; }
.ddx-einp:focus { outline: none; border-color: var(--brand); }
.ddx-note { margin-top: 10px; }
.ddx-note-lbl { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 3px; }
.ddx-note-body { font-size: 13px; color: var(--ink-soft); line-height: 1.55; white-space: pre-wrap; border-left: 3px solid var(--brand); padding-left: 11px; }
/* "Open Contact" button in the detail header (left of the chance ring). */
.ddx-fub-btn { flex: 0 0 auto; align-self: flex-start; font-family: var(--font-sub); font-size: 12px; font-weight: 700; color: var(--brand-dark); text-decoration: none; border: 1.5px solid var(--field-border); border-radius: 8px; padding: 6px 11px; white-space: nowrap; }
.ddx-fub-btn:hover { border-color: var(--brand); }
/* Two-column detail body: facts on the left, editable agent notes on the right. */
.ddx-cols { display: flex; gap: 20px; align-items: flex-start; }
.ddx-main { flex: 1 1 auto; min-width: 0; }
.ddx-side { flex: 0 0 320px; }
.ddx-notes-editor { position: sticky; top: 0; }
.ddx-notes-log { max-height: 220px; overflow-y: auto; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); background: var(--field-bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; }
.ddx-notes-log.empty { color: var(--muted); font-style: italic; }
.ddx-note-entry { padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); }
.ddx-note-entry + .ddx-note-entry { margin-top: 8px; }
.ddx-note-entry.pinned { border-color: var(--brand); background: rgba(125,140,202,0.08); }
.ddx-note-hd { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.ddx-note-ts { color: var(--brand-dark); font-style: italic; font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.ddx-note-by { color: var(--muted); font-weight: 700; font-size: 11px; white-space: nowrap; flex: 1 1 auto; }
.ddx-note-acts { display: inline-flex; gap: 1px; flex: 0 0 auto; margin-left: auto; }
.ddx-note-btn { border: none; background: transparent; cursor: pointer; font-size: 12px; line-height: 1; padding: 3px 5px; border-radius: 5px; color: var(--muted); }
.ddx-note-btn:hover { background: var(--row-hover); color: var(--ink); }
.ddx-note-btn.pin { opacity: .3; filter: grayscale(1); }
.ddx-note-btn.pin.on { opacity: 1; filter: none; }
.ddx-note-btn.priv { opacity: .3; filter: grayscale(1); }
.ddx-note-btn.priv.on { opacity: 1; filter: none; }
.ddx-note-entry.private { border-color: #d98a2b; background: rgba(217,138,43,0.07); }
.ddx-note-priv { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #b7791f; background: rgba(217,138,43,0.16); padding: 1px 6px; border-radius: 10px; white-space: nowrap; }
.ddx-priv-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ink-soft); font-family: var(--font-sub); cursor: pointer; white-space: nowrap; }
.ddx-priv-hint { color: var(--muted); font-weight: 600; }
.ddx-note-text { white-space: pre-wrap; font-size: 12.5px; color: var(--ink); margin-top: 4px; }
.ddx-note-edit { width: 100%; box-sizing: border-box; min-height: 54px; resize: vertical; border: 1.5px solid var(--brand); border-radius: 6px; padding: 6px 8px; font-family: inherit; font-size: 12.5px; background: var(--field-bg); color: var(--ink); }
.ddx-note-editfoot { display: flex; gap: 6px; margin-top: 6px; }
.ddx-notes-area { width: 100%; box-sizing: border-box; min-height: 72px; resize: vertical; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--field-bg); color: var(--ink); font-family: inherit; font-size: 13px; line-height: 1.5; padding: 10px 11px; }
.ddx-notes-area:focus { outline: none; border-color: var(--brand); }
.ddx-notes-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
/* Keep the Add Note button its natural size - don't let the footer squeeze it
   into a tall two-line block when the Private label shares the row (View-As). */
.ddx-notes-foot .btn-primary { flex: 0 0 auto; white-space: nowrap; padding: 10px 16px; font-size: 14px; border-radius: 8px; box-shadow: none; }
.ddx-note-status { font-size: 12px; font-family: var(--font-sub); color: var(--muted); }
.ddx-note-status.ok { color: var(--ok); }
.ddx-note-status.err { color: var(--bad); }
@media (max-width: 680px) { .ddx-cols { flex-direction: column; } .ddx-side { flex: 1 1 auto; width: 100%; } .ddx-notes-editor { position: static; } }

.currency { font-variant-numeric: tabular-nums; }

@media (max-width: 540px) {
  .nav { padding: 0 16px; }
  .page-wrap { padding: 20px 14px 80px; }
  .metric-value { font-size: 19px; }
  .field-row { grid-template-columns: 1fr; }
  .modal { padding: 22px 20px; }
  .deal-row { flex-direction: column; align-items: stretch; }
  .deal-actions { justify-content: flex-end; }
}


/* --- merged from index.html inline <style> --- */

/* Admin → All Teams Pipeline */
.ap-filters { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin:8px 0 16px; }
.ap-f { font-size:13px; color:var(--muted); display:flex; align-items:center; gap:6px; }
.ap-f select { font-size:13px; padding:6px 8px; border:1px solid var(--field-border); border-radius:8px; background:#fff; }
.ap-chk { font-size:13px; color:var(--muted); display:flex; align-items:center; gap:5px; cursor:pointer; }
.ap-count { margin-left:auto; font-size:13px; color:var(--muted); font-weight:600; }
.ap-board { margin-top:4px; }
/* Agent·team label prepended to each real .deal-row card (cross-agent context). */
.ap-agent { font-size:12px; font-weight:700; color:var(--brand-dark, #33488c); margin-bottom:3px; }
.ap-team { color:var(--muted); font-weight:500; }
/* Admin pipeline: per-stage summary boxes + expand/collapse toolbar. */
.ap-stage-boxes { display:grid; grid-template-columns:repeat(auto-fit,minmax(112px,1fr)); gap:8px; margin-bottom:12px; }
.ap-stage-box { text-align:left; background:var(--card); border:1px solid var(--line); border-top:3px solid var(--sc,var(--brand)); border-radius:11px; padding:9px 12px; cursor:pointer; font-family:inherit; box-shadow:var(--shadow); display:flex; flex-direction:column; gap:2px; min-width:0; transition:transform .1s, box-shadow .1s; }
.ap-stage-box:hover { transform:translateY(-2px); box-shadow:var(--shadow-lg); }
.ap-sb-n { font-family:var(--font-sub); font-size:23px; font-weight:700; line-height:1; color:var(--ink); }
.ap-sb-l { font-size:10.5px; font-weight:700; font-family:var(--font-sub); color:var(--ink-soft); text-transform:uppercase; letter-spacing:.3px; line-height:1.25; overflow-wrap:break-word; }
.ap-sb-v { font-size:11px; font-weight:600; color:var(--muted); font-family:var(--font-sub); }
.ap-exp-bar { display:flex; gap:8px; margin-bottom:8px; }
.ap-exp-btn { font-size:12px; font-weight:700; font-family:var(--font-sub); color:var(--brand-dark); background:var(--field-bg); border:1px solid var(--field-border); border-radius:8px; padding:5px 12px; cursor:pointer; }
.ap-exp-btn:hover { border-color:var(--brand); }
/* Admin Financials view + Jamie approval console. */
.fin-boxes { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin:6px 0 20px; }
.fin-box { background:var(--card); border:1px solid var(--line); border-top:3px solid var(--brand); border-radius:12px; padding:12px 14px; box-shadow:var(--shadow); display:flex; flex-direction:column; gap:3px; min-width:0; }
.fin-box-n { font-family:var(--font-sub); font-size:22px; font-weight:700; color:var(--ink); line-height:1; white-space:nowrap; }
@media (max-width:900px){ .fin-boxes { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); } }
.fin-box-l { font-size:10.5px; font-weight:700; font-family:var(--font-sub); color:var(--ink-soft); text-transform:uppercase; letter-spacing:.3px; }
.fin-b-pending { border-top-color:var(--warn); } .fin-b-closed { border-top-color:var(--ok); }
.fin-b-eap { border-top-color:var(--brand-dark); } .fin-b-active { border-top-color:var(--muted); }
.fin-sec { margin:22px 0; }
.fin-h { font-family:var(--font-sub); font-size:14px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; color:var(--ink); margin-bottom:4px; }
.fin-note { font-size:12px; color:var(--muted); margin-bottom:10px; }
.fin-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
.fin-table { width:100%; border-collapse:collapse; font-size:13px; }
.fin-table th, .fin-table td { padding:8px 11px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; }
.fin-table th { background:var(--row-bg); font-family:var(--font-sub); font-size:10.5px; text-transform:uppercase; letter-spacing:.3px; color:var(--ink-soft); }
.fin-table .fin-r { text-align:right; font-variant-numeric:tabular-nums; }
.fin-table .fin-eap { font-weight:700; color:var(--brand-dark); background:rgba(88,102,181,.05); }
.fin-row { cursor:pointer; } .fin-row:hover td { background:var(--row-hover); }
.fin-sub { display:block; font-size:11px; color:var(--muted); font-weight:400; }
.fin-tot td { font-weight:800; background:var(--row-bg); border-top:2px solid var(--line); }
/* console */
.fin-drybanner, .fin-livebanner { border-radius:10px; padding:10px 14px; font-size:13px; margin-bottom:16px; }
.fin-drybanner { background:rgba(217,148,0,.1); border:1px solid rgba(217,148,0,.3); color:#7a5600; }
.fin-livebanner { background:rgba(47,174,95,.1); border:1px solid rgba(47,174,95,.3); color:#1c6b3c; }
.fin-drybanner code { background:rgba(0,0,0,.06); padding:1px 5px; border-radius:4px; font-size:12px; }
.fin-cards { display:flex; flex-direction:column; gap:14px; }
.fin-card { background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); padding:15px 17px; }
.fin-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:8px; }
.fin-card-head b { font-size:15px; color:var(--ink); }
.fin-status { font-size:11px; font-weight:700; font-family:var(--font-sub); background:rgba(217,148,0,.14); color:#7a5600; border-radius:999px; padding:3px 10px; white-space:nowrap; }
.fin-warn { font-size:12px; color:var(--warn); background:rgba(217,148,0,.08); border-radius:8px; padding:6px 10px; margin-bottom:10px; }
.fin-card-body { display:grid; grid-template-columns:1.4fr 1fr; gap:16px; }
.fin-inputs { display:grid; grid-template-columns:1fr 1fr; gap:9px; align-content:start; }
.fin-in { display:flex; flex-direction:column; gap:3px; font-size:11px; font-weight:700; font-family:var(--font-sub); color:var(--ink-soft); text-transform:uppercase; letter-spacing:.3px; }
.fin-in input { padding:7px 9px; border:1.5px solid var(--field-border); border-radius:8px; background:var(--field-bg); color:var(--ink); font-family:var(--font-body); font-size:13.5px; font-weight:400; text-transform:none; letter-spacing:0; }
.fin-in-cb { flex-direction:row; align-items:center; gap:6px; text-transform:none; font-size:12.5px; }
.fin-save { grid-column:1 / -1; margin-top:4px; }
.fin-splits { background:var(--row-bg); border:1px solid var(--line); border-radius:10px; padding:11px 13px; align-self:start; }
.fin-kv { display:flex; justify-content:space-between; gap:10px; font-size:13px; padding:3px 0; color:var(--ink-soft); }
.fin-kv b { color:var(--ink); font-variant-numeric:tabular-nums; }
.fin-kv-gci { border-bottom:1px solid var(--line); margin-bottom:3px; padding-bottom:6px; font-weight:700; }
.fin-kv-eap { border-top:2px solid var(--line); margin-top:4px; padding-top:6px; font-weight:800; color:var(--brand-dark); }
.fin-kv-eap b { color:var(--brand-dark); }
.fin-approvals { display:flex; flex-wrap:wrap; gap:14px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.fin-appcb { font-size:13px; font-weight:600; color:var(--ink-soft); display:flex; align-items:center; gap:6px; cursor:pointer; }
.fin-flash { animation:finflash .5s ease; }
@keyframes finflash { 0% { background:rgba(217,148,0,.18); } 100% { background:transparent; } }
@media (max-width:640px) { .fin-card-body { grid-template-columns:1fr; } .fin-inputs { grid-template-columns:1fr 1fr; } }
.kb-card-agent { font-size:11px; font-weight:700; color:var(--brand-dark, #33488c); margin-top:3px; }
/* Command Center launcher tiles. */
.cc-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin:6px 0 22px; }
.cc-tile { text-align:left; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:20px 18px; cursor:pointer; font-family:inherit; box-shadow:var(--shadow); display:flex; flex-direction:column; gap:6px; transition:transform .12s, box-shadow .12s; }
.cc-tile:hover { transform:translateY(-3px); box-shadow:var(--shadow-lg); }
.cc-ico { font-size:26px; line-height:1; }
.cc-tile-t { font-family:var(--font-sub); font-size:22px; font-weight:700; color:var(--ink); }
.cc-tile-s { font-size:12.5px; color:var(--muted); font-family:var(--font-sub); }

/* ── Conversion Opportunities (Pipeline) ──────────────────────────────────── */
.co-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.co-tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.co-tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.co-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.co-tab.empty { opacity: .5; }
.co-tab.active.empty { opacity: 1; }
.co-tab.parked { color: var(--muted); }
.co-tab.parked.active { background: var(--muted); border-color: var(--muted); color: #fff; }
.co-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: color-mix(in srgb, currentColor 16%, transparent); font-size: 12px; font-weight: 800; }
.co-tab.active .co-n { background: rgba(255,255,255,.28); }
.co-tbl { width: 100%; border-collapse: collapse; }
.co-tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  font-weight: 800; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.co-tbl td { padding: 10px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.co-tbl tr:last-child td { border-bottom: none; }
.co-lnk { color: var(--brand-dark); font-weight: 700; cursor: pointer; }
.co-lnk:hover { text-decoration: underline; }
.co-days { display: inline-grid; place-items: center; min-width: 30px; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 14%, var(--card)); color: var(--ink-soft); font-weight: 800; font-size: 13px; }
.co-days.hot { background: color-mix(in srgb, var(--bad) 15%, var(--card)); color: var(--bad); }
.co-empty { padding: 18px 4px; color: var(--muted); font-size: 14px; }
.co-parked-list { display: grid; gap: 8px; }
.co-parked-row { display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; cursor: pointer; transition: border-color .12s; }
.co-parked-row:hover { border-color: var(--brand); }
.co-parked-name { font-weight: 700; color: var(--ink); }
.co-parked-addr { color: var(--muted); font-size: 13px; }
.co-parked-stage { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }
@media (max-width: 560px) {
  .co-tbl th:nth-child(2), .co-tbl td:nth-child(2) { display: none; }
  .co-parked-stage { display: none; }
}

/* ── Database Health (Pipeline hygiene queue) ─────────────────────────────── */
.dbh-progress { font-size: 12px; font-weight: 700; color: var(--ok); font-family: var(--font-sub); }
#dbhList { display: grid; gap: 10px; }
.dbh-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 10px; background: var(--card); }
.dbh-row.dbh-missing-date { border-left-color: var(--bad); }
.dbh-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.dbh-meta { margin-top: 3px; }
.dbh-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--muted);
  background: color-mix(in srgb, var(--muted) 12%, var(--card)); padding: 2px 8px; border-radius: 999px; }
.dbh-acts { display: flex; gap: 8px; align-items: center; }
.dbh-skip { color: var(--muted); }
.dbh-fixrow { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.dbh-fixrow .dbh-input { flex: 1 1 220px; padding: 9px 11px; border: 1.5px solid var(--field-border); border-radius: 8px; font: inherit; font-size: 13px; background: var(--field-bg); color: var(--ink); }
.dbh-fixrow .dbh-date { padding: 9px 10px; border: 1.5px solid var(--field-border); border-radius: 8px; font: inherit; font-size: 13px; background: var(--field-bg); color: var(--ink); }
.dbh-empty { padding: 16px 4px; color: var(--muted); font-size: 14px; font-weight: 600; }
/* Grouped Quick-Fix card: all of a deal's fixes listed left, active one inline. */
.dbh-row.dbh-grouped { grid-template-columns: 1fr auto auto; align-items: center; }
.dbh-grouped .dbh-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.dbh-tag.active { color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 15%, var(--card)); }
.dbh-fixzone { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.dbh-fixzone .dbh-input { flex: 1 1 200px; padding: 9px 11px; border: 1.5px solid var(--field-border); border-radius: 8px; font: inherit; font-size: 13px; background: var(--field-bg); color: var(--ink); }
.dbh-fixzone .dbh-date { padding: 9px 10px; border: 1.5px solid var(--field-border); border-radius: 8px; font: inherit; font-size: 13px; background: var(--field-bg); color: var(--ink); }
.dbh-fixzone .btn-primary { padding: 8px 14px; font-size: 13px; white-space: nowrap; }
.dbh-grouped .dbh-skip { align-self: center; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.dbh-grouped .dbh-skip:hover { color: var(--ink); border-color: var(--muted); }
@media (max-width: 640px) { .dbh-row.dbh-grouped { grid-template-columns: 1fr; } .dbh-fixzone { justify-content: flex-start; } }
@media (max-width: 560px) {
  .dbh-row { grid-template-columns: 1fr; }
  .dbh-acts { justify-content: flex-start; }
}

/* ── Today: Homework card ─────────────────────────────────────────────────── */
.hw-today { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hw-today-status { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.hw-today-n { font-family: var(--font-sub); font-size: 22px; font-weight: 800; color: var(--brand-dark); margin-right: 2px; }
.hw-today-sub { color: var(--muted); font-weight: 600; }
.hw-today-caught { color: var(--ok); font-weight: 700; }

/* ── Homework tab: prominent top submit band ──────────────────────────────── */
.hw-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--card)), var(--card));
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line)); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 16px; }
.hw-top-txt h2 { font-family: var(--font-head); font-size: 24px; font-weight: 700; color: var(--ink); margin: 0; }
.hw-top-txt p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.hw-top-btn { font-size: 15px; padding: 12px 24px; }
@media (max-width: 560px) { .hw-top-btn { width: 100%; } }

/* Database Health Fix / Skip buttons (they sit in .dbh-acts, not a section-head). */
.dbh-acts button { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: border-color .12s, background .12s, color .12s; }
.dbh-acts [data-dbh-fix] { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); color: var(--brand-dark); }
.dbh-acts [data-dbh-fix]:hover { background: color-mix(in srgb, var(--brand) 10%, var(--card)); border-color: var(--brand); }
.dbh-acts .dbh-skip { color: var(--muted); font-weight: 600; }
.dbh-acts .dbh-skip:hover { color: var(--ink); border-color: var(--muted); }

/* Database Health sub-section headers (Conversion Opportunities + Quick Fixes). */
.dbh-subhead { font-family: var(--font-sub); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-dark); margin: 18px 0 8px; }
#convOppsBlock + #dbhBlock .dbh-subhead:first-child { margin-top: 20px; }

/* ── Pipeline Strength: RE·ALIGN role-box grid ────────────────────────────── */
.pl-strength { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 920px) { .pl-strength { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .pl-strength { grid-template-columns: repeat(2, 1fr); } }
.pl-sbox { display: flex; flex-direction: column; gap: 3px; justify-content: center; min-height: 94px; text-align: center;
  padding: 14px 8px; border: 1px solid color-mix(in srgb, var(--c) 22%, var(--line)); border-radius: 12px;
  background: color-mix(in srgb, var(--c) 9%, var(--card)); cursor: pointer; font: inherit; transition: transform .1s, box-shadow .12s; }
.pl-sbox:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.pl-sbox.active { box-shadow: 0 0 0 2px var(--c) inset; }
.pl-sbox-n { font-family: var(--font-sub); font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1; }
.pl-sbox-l { font-size: 12px; font-weight: 700; color: var(--ink-soft); line-height: 1.2; }
.pl-sbox-r { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.pl-ar { margin-top: 12px; }
.pl-ar-chip { border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .12s, color .12s; }
.pl-ar-chip:hover, .pl-ar-chip.active { border-color: var(--brand); color: var(--brand-dark); }

/* Auto-tracked activity rows (pipeline-sourced, goal-targeted). */
.act-row.act-auto { background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.act-auto-tag { font-size: 10px; font-weight: 800; color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 14%, var(--card)); border-radius: 999px; padding: 1px 7px; margin-left: 7px; vertical-align: middle; letter-spacing: .02em; }
.act-divider { font-family: var(--font-sub); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }

/* ── Admin Homework completion (by-homework cards + by-agent rows) ───────────── */
.hwa-wrap { display: flex; flex-direction: column; gap: 12px; }
.hwa-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.hwa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hwa-title { font-family: var(--font-sub); font-size: 15px; font-weight: 700; color: var(--ink); }
.hwa-sub { font-size: 12px; color: var(--muted); font-family: var(--font-sub); margin-top: 2px; }
.hwa-pct { font-family: var(--font-sub); font-size: 20px; font-weight: 800; color: var(--brand-dark); }
.hwa-bar { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 10px 0 12px; }
.hwa-bar i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.hwa-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hwa-coln { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 7px; font-family: var(--font-sub); }
.hwa-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.hwa-chip { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line); text-decoration: none; }
.hwa-chip.done { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.hwa-chip.todo { color: var(--ink-soft); background: var(--field-bg); }
.hwa-none { font-size: 12px; color: var(--muted); }
.hwa-agent { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.hwa-asum { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; list-style: none; }
.hwa-asum::-webkit-details-marker { display: none; }
.hwa-aname { font-weight: 700; color: var(--ink); flex: 1 1 auto; }
.hwa-ameta { font-family: var(--font-sub); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.hwa-folder { font-size: 12.5px; font-weight: 700; color: var(--brand); text-decoration: none; border: 1px solid var(--field-border); border-radius: 8px; padding: 4px 10px; }
.hwa-folder:hover { border-color: var(--brand); }
.hwa-folder.disabled { color: var(--muted); border-style: dashed; cursor: default; }
.hwa-acells { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 13px; }
.hwa-acell { font-size: 12px; font-weight: 600; border-radius: 7px; padding: 3px 9px; border: 1px solid var(--line); text-decoration: none; }
.hwa-acell.done { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.hwa-acell.todo { color: var(--ink-soft); background: var(--field-bg); }
/* Admin backfill: todo cells + not-done chip "+" are clickable buttons that open the log-homework modal */
button.hwa-acell { font-family: inherit; cursor: pointer; line-height: 1.4; }
button.hwa-acell.todo:hover { border-color: var(--brand); color: var(--brand); }
button.hwa-chip-go { font: inherit; border: 0; background: none; cursor: pointer; color: var(--brand); padding: 0 2px; font-weight: 700; }
.hb-waive { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.hb-waive input { width: auto; }
@media (max-width: 640px) { .hwa-cols { grid-template-columns: 1fr; } }

/* Collapsible homework cards + expand-all toolbar + two-action agent chips */
.hwa-toolbar { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 2px; }
.hwa-xpand, .hwa-profile-btn { font-family: var(--font-sub); font-size: 12px; font-weight: 700; color: var(--brand); background: var(--card); border: 1px solid var(--field-border); border-radius: 8px; padding: 5px 11px; cursor: pointer; }
.hwa-xpand:hover, .hwa-profile-btn:hover { border-color: var(--brand); }
details.hwa-card > summary.hwa-chead { list-style: none; cursor: pointer; }
details.hwa-card > summary.hwa-chead::-webkit-details-marker { display: none; }
details.hwa-card > summary.hwa-chead .hwa-bar { margin: 10px 0 0; }
details.hwa-card[open] > summary.hwa-chead .hwa-bar { margin-bottom: 12px; }
details.hwa-card > summary.hwa-chead .hwa-title::before { content: '\25B8\00A0'; color: var(--muted); font-size: 12px; }
details.hwa-card[open] > summary.hwa-chead .hwa-title::before { content: '\25BE\00A0'; }
.hwa-chip { display: inline-flex; align-items: center; gap: 4px; }
.hwa-chip-name { font: inherit; color: inherit; background: none; border: none; padding: 0; margin: 0; cursor: pointer; font-weight: 600; }
.hwa-chip-name:hover { text-decoration: underline; }
.hwa-chip-go { text-decoration: none; font-weight: 700; color: inherit; opacity: .85; }
.hwa-chip-go:hover { opacity: 1; }

/* Activities: divider label separating auto-tracked rows from manual ones */
.actx-group-label { font-family: var(--font-sub); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 2px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* Admin View-As: condensed one-line agent rows + offboarded group */
.admin-row-1l { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-radius: 8px; background: var(--row-bg); margin-bottom: 5px; }
.admin-row-1l:hover { background: var(--row-hover); }
.admin-row-main { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.admin-row-main .admin-row-name { font-size: 14px; font-weight: 600; white-space: nowrap; }
/* Agent name opens the full admin report (impersonation stays on the View-as button) */
button.admin-row-name { font-family: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
button.admin-row-name:hover { color: var(--brand); text-decoration: underline; }
.admin-row-status { font-family: var(--font-sub); font-size: 11px; font-weight: 700; color: var(--muted); }
.admin-row-right { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
.admin-row-team { font-family: var(--font-sub); font-size: 12px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.admin-row-email { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.admin-off { margin-top: 10px; border-top: 1px solid var(--line); }
.admin-off-sum { list-style: none; cursor: pointer; font-family: var(--font-sub); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 2px 8px; }
.admin-off-sum::-webkit-details-marker { display: none; }
.admin-off-sum::before { content: '\25B8\00A0'; }
.admin-off[open] .admin-off-sum::before { content: '\25BE\00A0'; }
.admin-off-list { margin-top: 4px; }
@media (max-width: 640px) { .admin-row-1l { flex-wrap: wrap; } .admin-row-email, .admin-row-team { max-width: 100%; } }

/* Financials: per-table "Expand financials breakdown" toggle + hidden split columns */
.fin-table-head { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.fin-bd-toggle { font-family: var(--font-sub); font-size: 12px; font-weight: 700; color: var(--brand); background: var(--card); border: 1px solid var(--field-border); border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.fin-bd-toggle:hover { border-color: var(--brand); }
.fin-table.collapsed .fin-bd { display: none; }

/* Agent homework: small expand/collapse bar above the list + compact collapsed rows */
.hw-xpand-bar { display: flex; gap: 8px; justify-content: flex-end; margin: 0 2px 8px; }
.hw-xpand-sm { font-family: var(--font-sub); font-size: 12px; font-weight: 700; color: var(--brand); background: var(--card); border: 1px solid var(--field-border); border-radius: 8px; padding: 4px 11px; cursor: pointer; }
.hw-xpand-sm:hover { border-color: var(--brand); }
.hw-card-collapsed { padding: 9px 14px; margin-bottom: 7px; }
.hw-card-collapsed .hw-card-head { align-items: center; }
.hw-card-head .hw-card-title { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.hw-card-collapsed .hw-card-head .hw-card-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-card-head .hw-pill { flex: 0 0 auto; }
.hw-card-week { flex: 0 0 auto; font-family: var(--font-sub); font-size: 12px; color: var(--muted); white-space: nowrap; }
.hw-card:not(.hw-card-collapsed) .hw-card-head { align-items: flex-start; margin-bottom: 11px; }
