/* ============================================================
   LAYOUT — the same for every agent (Tovah, 2026-09-20: "all of the
   spacing/layout the same for Morgan; fonts/colors are a preset").
   Light ground, cards with big corners and no borders, a floating nav, pill
   buttons and chips, sentence case, one dark hero card. Every color here is a
   token from themes.css; never write a hex in this file. The geometry tokens
   below override tokens.css on purpose — they are the layout.
   ============================================================ */
:root {
  --r-sm: 12px; --r: 16px; --r-lg: 24px; --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.03);
  --shadow:    0 6px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.18);
  --nav-w: 252px;
}
html, body { background: var(--cream); color: var(--text); }
.shell { background: var(--cream); }

/* ---- floating black nav ---- */
@media (min-width: 861px) {
  .nav { top: 14px; bottom: 14px; left: 14px; height: auto; width: calc(var(--nav-w) - 14px); border-radius: 28px; }
  .shell { grid-template-columns: var(--nav-w) 1fr; }
}
.nav { background: var(--nav-bg); color: var(--nav-fg); border-right: 0; padding: 28px 18px 22px; box-shadow: var(--nav-shadow, none); }
.nav .brand, .nav .brand * { color: var(--nav-fg) !important; }
.brand-name { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-style: var(--display-style); text-transform: none; font-size: 24px; }
.brand-sub { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--nav-muted) !important; opacity: .8; font-family: var(--font-ui); }
.nav-link { color: var(--nav-muted); border-radius: 999px; padding: 11px 14px; font-size: 14px; font-weight: 500; }
.nav-link svg { stroke: var(--nav-muted); }
.nav-link:hover { background: var(--nav-hover); color: var(--nav-fg); }
.nav-link.active { background: var(--nav-active-bg); color: var(--nav-active-fg); }
.nav-link.active svg { stroke: var(--nav-active-fg); }
.nav-badge { background: var(--nav-active-fg); color: var(--nav-active-bg); }
.nav-foot { border-top: 1px solid var(--nav-line); }
.nav-foot *, .nav-logout { color: var(--nav-muted) !important; }
.nav .av { background: var(--nav-active-bg); color: var(--nav-active-fg); }

/* ---- top bar ---- */
.topbar { background: transparent; border-bottom: 0; padding-top: 26px; padding-bottom: 12px; }
.welcome-sm { color: var(--text-faint); font-size: 12.5px; }
.welcome-lg { font-family: var(--font-display); font-weight: var(--display-weight); font-style: var(--display-style); letter-spacing: var(--display-tracking); font-size: 24px; }
.welcome-lg .heart-mark { display: none; }
.searchbox input { background: var(--card); border: 0; border-radius: 999px; padding: 12px 18px 12px 44px; box-shadow: var(--shadow-sm); }
.searchbox svg { left: 16px; top: 13px; }
.btn { border-radius: 999px; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink-deep); transform: none; }
.btn-mauve { background: var(--ink); color: var(--on-ink); }
.btn-mauve:hover { background: var(--ink-deep); transform: none; }
.btn-ghost { background: var(--card); border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--ink); background: var(--card); color: var(--ink); }
.checklist-fab { background: var(--card); color: var(--text); border-radius: 999px; box-shadow: var(--shadow-sm); }
.checklist-fab:hover { background: var(--card); }
.bell-btn { background: var(--card); border-radius: 999px; box-shadow: var(--shadow-sm); }
.bell-n, .bell-btn .n { background: var(--ink); color: var(--on-ink); }
.quick-add { background: var(--ink); color: var(--on-ink); }

/* ---- cards ---- */
.card { background: var(--card); border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card.empty { border: 1.5px dashed var(--line); background: transparent; box-shadow: none; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: var(--heading-tracking); font-weight: var(--heading-weight); font-style: normal; }
.card h2, .card h3, .mini h3 { font-size: 15px !important; }
.eyebrow, .kv-k, .tbl th, .kcol-head .kname, .pipe-label { font-family: var(--font-ui); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: var(--text-faint); }
/* the card eyebrow: a dot, small caps, wide tracking (the photo-booth reference, 2026-09-20) */
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; font-weight: 600; color: var(--text-muted); }
.eyebrow::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; }
.stat-tall .eyebrow { color: var(--on-ink-muted); }
.tbl th { font-size: 12px; }
.stat-n, .stat-tall .stat-n { font-family: var(--font-display); font-weight: var(--display-weight); font-style: normal; letter-spacing: var(--display-tracking); }
/* the YTD hero is the one black card, like the reference's dark panel */
.stat-tall { background: var(--ink); color: var(--on-ink); --mauve: var(--on-ink); --mauve-deep: var(--on-ink); } /* the sparkline reads these */
.stat-tall .eyebrow, .stat-tall .stat-delta, .stat-tall .spark-axis { color: var(--on-ink-muted); }
.stat-tall .stat-n { color: var(--on-ink); }
.stat-orb { background: var(--cream); border: 0; }
.stat-orb svg { stroke: var(--ink); }
.stat-sub, .stat-delta { color: var(--text-muted); }
.pipe-seg { background: var(--ramp-1); color: var(--text); }
.pipe-seg .pipe-label { color: var(--text-muted); font-weight: 500; }
.pipe-seg .pipe-n { color: var(--text); }
.pipe-seg:nth-child(2) { background: var(--ramp-2); } .pipe-seg:nth-child(3) { background: var(--ramp-3); }
.pipe-seg:nth-child(4) { background: var(--ramp-4); }
.pipe-seg:nth-child(5) { background: var(--ramp-5); }
.pipe-seg:nth-child(5) .pipe-label { color: var(--on-ink-muted); }
.pipe-seg:nth-child(5) .pipe-n { color: var(--on-ink); }
.pipe-seg:last-child { background: var(--ink); }
.pipe-seg:last-child .pipe-label { color: var(--on-ink-muted); }
.pipe-seg:last-child .pipe-n { color: var(--on-ink); }

/* ---- tables / pills / tabs ---- */
.tbl tbody tr:hover { background: var(--hover); }
.av { background: var(--ink); color: var(--on-ink); font-family: var(--font-display); font-style: normal; font-weight: 600; }
.pill { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 999px; font-size: 12px; font-weight: 500; padding: 5px 11px; }
.pill-green { background: var(--green-pale); border-color: transparent; color: var(--green); }
.pill-amber { background: var(--amber-pale); border-color: transparent; color: var(--amber); }
.pill-ink { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.stage-pick { background: var(--ink); color: var(--on-ink); border-radius: 999px; }
.chip { border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
/* tabs = one white segmented pill; counts are quiet text, not bubbles */
.tabs { display: inline-flex; max-width: 100%; overflow-x: auto; background: var(--card); border-radius: 999px; padding: 4px; gap: 2px; border-bottom: 0; box-shadow: var(--shadow-sm); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border-radius: 999px; border-bottom: 0; margin-bottom: 0; padding: 8px 14px; background: transparent; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--ink); color: var(--on-ink); border-bottom-color: transparent; }
.tab-n { background: transparent; color: inherit; opacity: .55; padding: 0 0 0 4px; font-weight: 600; }
.tab.on .tab-n { background: transparent; color: var(--on-ink); opacity: .8; }
.list-filters .fld { background: var(--card); border: 0; box-shadow: var(--shadow-sm); border-radius: 999px; }

/* ---- forms ---- */
.fld, select.fld { background-color: var(--field); border: 1px solid transparent; border-radius: 14px; }
.fld:focus { border-color: var(--ink); box-shadow: none; background-color: var(--card); }
/* the base sheet paints the select arrow as a background-image; restate every
   longhand here so a shorthand can never blow the arrow up to field size again */
select.fld { appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555555' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 11px 7px; padding-right: 34px; }
.stage-pick { padding-right: 26px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 12px; }
.pick { border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.pick.on, .pick.must { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pick.nice { border-color: var(--ink); color: var(--ink); }
.check-inline input, .doc-tbl input[type="checkbox"] { accent-color: var(--ink); }
.cbox.on { background: var(--ink); border-color: var(--ink); }
.agent-note, .doc-line.due { background: var(--field); border-left: 0; border-radius: 14px; }
.prof-private { background: var(--field); border-color: transparent; }

/* ---- pipeline board ---- */
.kcol { background: var(--card); border: 0; border-top: 0; border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.kcol + .kcol::before { display: none; }
.kstep { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.kcard { background: var(--soft); border: 0; border-radius: 18px; box-shadow: none; padding: 14px; }
.kcard-name { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; }
.kmove { border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text-muted); }
.kmove.next { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.kcol-empty { border-color: var(--line); border-radius: 18px; }

/* ---- contact header / misc ---- */
.contact-head h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-style: normal; letter-spacing: var(--display-tracking); font-size: 28px !important; }
.modal { border-radius: 28px; }
.scrim { background: var(--scrim); }
.modal-greet { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); }
.modal-sub { color: var(--text-faint); letter-spacing: .04em; }
/* calendar: the black circle sits on the NUMBER, not the cell; every number
   lives in the same 30px box so today does not shift the grid */
.cal-cell { border-radius: 14px; }
.cal-cell:not(.empty):hover { background: var(--hover); }
.cal-n { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 13.5px; }
.cal-cell.today { background: transparent; color: var(--text); font-weight: 600; }
.cal-cell.today .cal-n { background: var(--ink); color: var(--on-ink); }
.cal-cell.sel { outline: 0; background: var(--hover); }
.cal-cell.sel .cal-n { box-shadow: 0 0 0 1.5px var(--ink) inset; }
.cal-cell.sel.today .cal-n { box-shadow: none; }
.cal-dots { height: 6px; gap: 3px; }
.cal-dot, i.cal-dot { width: 5px; height: 5px; background: var(--dot-task); }   /* task */
.cal-dot.timed  { background: var(--ink); }                                  /* appointment */
.cal-dot.late   { background: var(--dot-late); }                                  /* overdue */
.cal-dot.google { background: var(--dot-busy); }
.cal-dow { font-weight: 500; letter-spacing: .04em; font-size: 11px; }
.cal-legend { border-top-color: var(--line-soft); }
.cal-arrow { border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.cal-arrow:hover { border-color: var(--ink); color: var(--ink); }
.post, .team-card { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.post-kind.k-have { background: var(--green-pale); color: var(--green); }
.post-kind.k-need { background: var(--amber-pale); color: var(--amber); }
.post-kind.k-talk { background: var(--soft); color: var(--text); }
.reply.mine { background: var(--field); border-radius: 14px; }
.app-tile, .photo-tile { box-shadow: var(--shadow-sm); }
.toast, #toast > div { background: var(--ink); color: var(--on-ink); border-radius: 999px; }
.muted { color: var(--text-muted); } .faint { color: var(--text-faint); }

/* ---- phones: the client header stacks and centers ---- */
@media (max-width: 640px) {
  .contact-head-row { flex-direction: column; align-items: center; text-align: center; }
  .contact-id { width: 100%; flex: none; }
  .contact-id .row { justify-content: center; }
  .contact-meta { align-items: center; }
  .contact-actions { justify-content: center; }
  .contact-actions .btn { flex: 0 1 auto; }
}

/* ---- the branded dropdown behind every pill select ---- */
.pick-menu { position: absolute; z-index: 80; background: var(--card); border-radius: 18px; padding: 6px; max-height: 320px; overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.04); animation: pop .16s var(--ease); }
.pick-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; font: inherit; font-size: 14px; padding: 9px 14px; border-radius: 12px; color: var(--text); cursor: pointer; white-space: nowrap; }
.pick-item:hover { background: var(--hover); }
.pick-item.on { background: var(--ink); color: var(--on-ink); }
.pick-item[disabled] { color: var(--text-faint); cursor: default; }
.post-save.on { background: var(--ink); border-color: var(--ink); }
