/* Who You For brand: vintage club colours from whoyoufor.com.
   Cream ground, denim-blue structure, red reserved for the brand itself.
   Headings: Fraunces (retro soft serif, Georgia fallback). */
:root {
  --cream:#F4EFE1; --card:#FDFBF4; --ink:#22303E; --muted:#5F6B76;
  --line:#E2DBC9; --blue:#2E547A; --blue-deep:#24435F; --blue-ink:#F4EFE1;
  --red:#C22D30; --red-soft:#F7E5E1;
  --good:#2E7D4F; --good-bg:#E8F1E7; --warn:#9A6D14; --warn-bg:#F3EAD3;
  --bad:#B3403A; --bad-bg:#F7E5E1;
  --bubble-in:#FDFBF4; --bubble-out:#DFE8EF;
  --serif:"Fraunces", Georgia, "Times New Roman", serif;
  --sans:"Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--cream); color:var(--ink);
  font:15px/1.5 var(--sans); }

/* top bar: denim blue, red wordmark on a cream chip feel */
.top { display:flex; align-items:center; gap:26px; padding:0 22px;
  background:var(--blue); color:var(--blue-ink); height:58px; }
.brand { font-family:var(--serif); font-weight:800; font-size:1.35rem;
  color:var(--cream); text-decoration:none; letter-spacing:.01em;
  display:flex; align-items:center; }
.brand-img { height:26px; width:auto; display:block; }
.top nav { display:flex; gap:4px; }
.top nav a { color:var(--blue-ink); text-decoration:none; font-weight:600;
  font-size:.92rem; padding:8px 14px; border-radius:999px; opacity:.85; }
.top nav a:hover { opacity:1; }
.top nav a.on { background:var(--cream); color:var(--blue-deep); opacity:1; }
.mode { margin-left:auto; font-size:.78rem; color:var(--cream);
  border:1px solid rgba(244,239,225,.5); padding:3px 10px;
  border-radius:999px; }

.wrap { max-width:1080px; margin:0 auto; padding:26px 20px 70px; }
h1 { font-family:var(--serif); font-weight:800; font-size:1.7rem;
  margin:6px 0 18px; }
h1 .count { color:var(--muted); font-size:1.1rem; font-family:var(--sans);
  font-weight:600; }
h2 { font-family:var(--serif); font-weight:600; font-size:1.08rem;
  margin:0 0 12px; }
h2.gap { margin-top:20px; }
.crumb a { color:var(--blue); text-decoration:none; font-size:.9rem; }

/* stat tiles */
.tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:12px; margin-bottom:22px; }
.tile { background:var(--card); border:1px solid var(--line); border-radius:12px;
  padding:14px 16px; display:flex; flex-direction:column; gap:2px; }
.tile .big { font-family:var(--serif); font-weight:800; font-size:1.5rem;
  font-variant-numeric:tabular-nums; }
.tile .label { color:var(--muted); font-size:.8rem; }
.tile.accent { border-color:var(--good); }
.tile.accent .big { color:var(--good); }
.tile.warn .big { color:var(--warn); }

.cols { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:860px) { .cols { grid-template-columns:1fr; } }
.panel { background:var(--card); border:1px solid var(--line);
  border-radius:14px; padding:18px; }

/* attention rows */
.attn { display:flex; gap:10px; align-items:center; padding:10px 8px;
  border-radius:8px; text-decoration:none; color:var(--ink);
  border-bottom:1px solid var(--line); }
.attn:last-of-type { border-bottom:none; }
.attn:hover { background:var(--cream); }
.attn-name { font-weight:700; }
.attn-sub { color:var(--muted); font-size:.85rem; margin-left:auto;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:45%; }
.attn-sub.money { font-variant-numeric:tabular-nums; }

/* pills */
.pill { font-size:.72rem; font-weight:700; padding:2px 9px; border-radius:999px;
  text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.pill.good, .pill.draft_ok { background:var(--good-bg); color:var(--good); }
.pill.warn, .pill.needs_info { background:var(--warn-bg); color:var(--warn); }
.pill.bad, .pill.escalate { background:var(--bad-bg); color:var(--bad); }
.pill.brand { background:var(--blue); color:var(--blue-ink); }
.pill.neutral, .pill.muted { background:var(--line); color:var(--muted); }

/* clients table */
.page-head { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.filters { margin-left:auto; }
.filters input[type=search] { font:inherit; padding:8px 14px; min-width:260px;
  border:1px solid var(--line); border-radius:999px; background:var(--card);
  color:var(--ink); }
.filters input[type=search]:focus-visible { outline:3px solid var(--blue);
  outline-offset:1px; }
.chips { display:flex; gap:8px; margin:6px 0 14px; flex-wrap:wrap; }
.chip-link { font-size:.85rem; font-weight:600; color:var(--ink);
  text-decoration:none; padding:5px 13px; border-radius:999px;
  border:1px solid var(--line); background:var(--card); }
.chip-link.on { background:var(--blue); border-color:var(--blue);
  color:var(--blue-ink); }
.table-scroll { overflow-x:auto; background:var(--card);
  border:1px solid var(--line); border-radius:14px; }
table { border-collapse:collapse; width:100%; font-size:.92rem; }
th, td { text-align:left; padding:10px 14px; border-bottom:1px solid var(--line); }
thead th { color:var(--muted); font-size:.76rem; text-transform:uppercase;
  letter-spacing:.05em; position:sticky; top:0; background:var(--card); }
tbody tr:last-child td { border-bottom:none; }
.clients tbody tr { cursor:pointer; }
.clients tbody tr:hover { background:var(--cream); }
.clients tbody tr:focus-visible { outline:3px solid var(--blue);
  outline-offset:-3px; }
td.name { font-weight:700; }
td.handle { color:var(--muted); }
.clients th, .clients td { white-space:nowrap; }
th.num, td.num { text-align:right; font-variant-numeric:tabular-nums; }

/* client detail */
.client-head { display:flex; align-items:baseline; gap:16px; flex-wrap:wrap; }
.client-head h1 { margin-bottom:8px; }
.client-head .meta { display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  margin-bottom:14px; }
.handle-link { color:var(--blue); font-weight:600; text-decoration:none; }
.tags { display:flex; gap:6px; flex-wrap:wrap; margin:0; }
.tag { background:var(--cream); border:1px solid var(--line);
  border-radius:999px; padding:3px 11px; font-size:.83rem; }
.warn-text { color:var(--warn); }

/* inbox + thread */
.conv-list { display:flex; flex-direction:column; gap:8px; }
.conv { display:flex; gap:12px; padding:12px 14px; background:var(--card);
  border:1px solid var(--line); border-radius:12px; text-decoration:none;
  color:var(--ink); }
.conv:hover { border-color:var(--blue); }
.avatar { width:42px; height:42px; border-radius:50%; background:var(--blue);
  color:var(--blue-ink); display:flex; align-items:center;
  justify-content:center; font-weight:700; flex:none;
  font-family:var(--serif); }
.conv-main { min-width:0; }
.conv-top { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.name { font-weight:700; }
.preview { color:var(--muted); font-size:.87rem; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; }
.chip { font-size:.72rem; font-weight:700; padding:2px 9px;
  border-radius:999px; background:var(--good-bg); color:var(--good);
  text-transform:uppercase; letter-spacing:.04em; }
.layout { display:grid; grid-template-columns:1fr 360px; gap:16px; }
@media (max-width:820px) { .layout { grid-template-columns:1fr; } }
.messages { display:flex; flex-direction:column; gap:8px; }
.messages.compact { max-height:340px; overflow-y:auto; padding-right:4px; }
.bubble { max-width:82%; padding:9px 13px; border-radius:14px;
  border:1px solid var(--line); }
.bubble p { margin:0; white-space:pre-wrap; }
.bubble.in { background:var(--bubble-in); align-self:flex-start;
  border-bottom-left-radius:4px; }
.bubble.out { background:var(--bubble-out); align-self:flex-end;
  border-bottom-right-radius:4px; }
.drafts { background:var(--card); border:1px solid var(--line);
  border-radius:14px; padding:14px; align-self:start; }
.draft { border:1px solid var(--line); border-radius:10px; padding:12px;
  margin-bottom:10px; background:var(--card); }
.draft.approved { border-color:var(--good); }
.draft.dismissed { opacity:.5; }
.draft.internal { background:var(--warn-bg); }
.draft-head { display:flex; justify-content:space-between; align-items:center;
  margin-bottom:6px; }
.state { font-size:.75rem; color:var(--muted); }
.draft-text { white-space:pre-wrap; margin:0 0 8px; }
details { margin:8px 0; }
summary { cursor:pointer; color:var(--blue); font-size:.85rem; }
.fine { font-size:.78rem; color:var(--muted); }
.fine a { color:var(--blue); }
.fine.gate { margin-top:6px; }
form { display:flex; gap:8px; margin-top:4px; }
.filters { display:block; margin-top:0; }
button { font:inherit; font-weight:600; border-radius:8px; padding:8px 16px;
  cursor:pointer; border:1px solid var(--line); background:var(--card);
  color:var(--ink); }
button.approve { background:var(--blue); color:var(--blue-ink);
  border-color:var(--blue); }
button.approve:hover { background:var(--blue-deep); }
button:focus-visible { outline:3px solid var(--red); outline-offset:2px; }
.empty { color:var(--muted); }

/* follow-ups + notes */
.followup { gap:12px; }
.followup.done { opacity:.5; }
.due-date { font-size:.8rem; font-weight:700; color:var(--blue);
  font-variant-numeric:tabular-nums; white-space:nowrap; }
.tick-btn { padding:4px 12px; font-size:.8rem; }
.note-row { background:var(--cream); border:1px solid var(--line);
  border-radius:8px; padding:8px 12px; margin:0 0 6px; font-size:.9rem; }
form.stack { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
form.stack input { font:inherit; padding:8px 12px; border:1px solid var(--line);
  border-radius:8px; background:var(--card); color:var(--ink); flex:1;
  min-width:130px; }
form.stack input:focus-visible { outline:3px solid var(--blue); outline-offset:1px; }

/* chart */
.chart { margin:0; }
.chart svg { width:100%; height:auto; display:block; }
.bar-label { font:700 13px var(--sans); fill:var(--ink); }
.axis-label { font:11px var(--sans); fill:var(--muted); }
.bar-g path:hover { fill:var(--blue-deep); }

/* orders board */
.board-note { margin:-6px 0 16px; max-width:70ch; }
.board { display:grid; grid-template-columns:repeat(5, minmax(170px, 1fr));
  gap:12px; overflow-x:auto; }
@media (max-width:900px) { .board { grid-template-columns:repeat(5, 190px); } }
.lane { background:var(--card); border:1px solid var(--line);
  border-radius:14px; padding:12px; min-height:180px; }
.lane h2 { font-size:.92rem; display:flex; justify-content:space-between;
  align-items:baseline; }
.lane h2 .count { color:var(--muted); font-family:var(--sans);
  font-size:.8rem; font-weight:600; }
.card-order { background:var(--cream); border:1px solid var(--line);
  border-radius:10px; padding:10px 12px; margin-bottom:8px; }
.order-title { font-weight:700; margin:0 0 2px; font-size:.9rem; }
.order-detail { color:var(--muted); font-size:.82rem; margin:0 0 6px; }
.order-actions form { margin:0; gap:6px; }
.order-actions button { padding:3px 10px; font-size:.85rem; }
.lane-empty { font-size:.82rem; }

/* outreach */
.outreach-list { display:flex; flex-direction:column; gap:10px; }
.outreach-card { background:var(--card); border:1px solid var(--line);
  border-radius:14px; padding:14px 16px; }
.outreach-head { display:flex; gap:10px; align-items:baseline; flex-wrap:wrap; }
.outreach-head .attn-name { text-decoration:none; color:var(--ink);
  font-size:1rem; }
.outreach-head .attn-sub { margin-left:auto; }
.outreach-msg { background:var(--cream); border:1px solid var(--line);
  border-radius:10px; padding:10px 14px; margin:10px 0 8px; font-size:.93rem; }
button.copy { font-size:.85rem; }
