@font-face { font-family: "CM Inter"; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-400-latin.woff2) format("woff2"); }
@font-face { font-family: "CM Inter"; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-600-latin.woff2) format("woff2"); }
@font-face { font-family: "CM Inter"; font-weight: 700; font-display: swap; src: url(/assets/fonts/inter-700-latin.woff2) format("woff2"); }
@font-face { font-family: "CM Poppins"; font-weight: 700; font-display: swap; src: url(/assets/fonts/poppins-700-latin.woff2) format("woff2"); }
@font-face { font-family: "CM Poppins"; font-weight: 800; font-display: swap; src: url(/assets/fonts/poppins-800-latin.woff2) format("woff2"); }
:root {
  --ink: #1A0F33; --text: #1C1340; --muted: #6F6690; --line: #E9E4F5; --bg: #F7F5FD; --card: #fff; --purple: #7B3FD4; --soft: #F1EAFD;
  --yellow: #F6CE1B; --ok: #157F3B; --ok-soft: #E4F4EA; --warn: #9A6200; --warn-soft: #FDF3DC; --bad: #B42318; --bad-soft: #FDE8E6;
  --disp: "CM Poppins", Poppins, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 "CM Inter", Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--disp); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 16px; font-weight: 700; }
button, input { font: inherit; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px;
  padding: 7px 14px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-family: var(--disp); font-weight: 700; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }

/* sign-in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% -10%, #3B1A86 0%, transparent 60%), linear-gradient(160deg, #1A0F33, #0F0A22); }
.login form { width: 100%; max-width: 380px; background: #fff; border-radius: 20px; padding: 28px 26px; display: grid; gap: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.login img { height: 26px; justify-self: start; }
.login label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.login input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.login input:focus { outline: 2px solid rgba(123,63,212,.35); border-color: var(--purple); }
.login .btn.primary { justify-content: center; padding: 12px; font-size: 15px; }
.login p { margin: 0; font-size: 12.5px; color: var(--muted); }

/* shell */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #EDE6FF; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side img { height: 22px; margin: 2px 8px 6px; align-self: flex-start; }
.side .tag { margin: 0 8px 14px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.side a { color: #D8CCF7; padding: 9px 12px; border-radius: 10px; font-weight: 600; }
.side a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.side a.on { background: rgba(246,206,27,.14); color: #fff; box-shadow: inset 3px 0 0 var(--yellow); }
.side .grow { flex: 1; }
.side .me { font-size: 12px; color: #A99BD3; padding: 0 12px; overflow-wrap: anywhere; }
.side .btn { margin: 8px 8px 0; background: transparent; color: #EDE6FF; border-color: rgba(255,255,255,.2); justify-content: center; }
.main { padding: 22px 26px 40px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-width: 0;
  box-shadow: 0 1px 2px rgba(60,30,120,.05), 0 10px 28px rgba(60,30,120,.06); }
.card > h2 { margin-bottom: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stat > span { display: block; font-size: 12.5px; color: var(--muted); }
.stat b { display: block; font-family: var(--disp); font-size: 24px; font-weight: 800; color: #5B2BB5; margin-top: 2px; }
.stat small { color: var(--muted); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.link { cursor: pointer; }
tr.link:hover td { background: #FBFAFF; }
.num { text-align: right; white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 7px; background: var(--soft); color: var(--purple); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.notice { border-radius: 12px; padding: 10px 14px; background: var(--soft); font-size: 13px; }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.search { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; min-width: 220px; background: #fff; }
.menu { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 10; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .menu { display: inline-flex; justify-self: start; }
  .main { padding: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 120px minmax(0, 1fr); }
  .search { min-width: 0; width: 100%; }
}
/* sales dashboard */
.side .grp { margin: 12px 12px 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8C7FBF; }
.side { overflow-y: auto; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { margin: 0 0 4px; font-size: 13px; }
.stat > span { display: flex; align-items: center; gap: 6px; }
.stat > span i { width: 8px; height: 8px; border-radius: 2px; background: var(--m); flex: none; }
.stat small .up { color: var(--ok); font-weight: 700; }
.stat small .down { color: var(--bad); font-weight: 700; }
.ch { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ch h2 { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { font-size: 11px; fill: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mix { display: grid; gap: 10px; }
.mix > div { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 10px; font-size: 13px; }
.mix .mbar { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.mix .mbar i { display: block; height: 100%; border-radius: 999px; }
.mix b { text-align: right; font-family: var(--disp); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--text); }
.pill b { margin-left: 4px; color: var(--purple); }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.on b { color: var(--yellow); }
.btn.sm { padding: 4px 10px; font-size: 12px; }

/* Sign-ups (moved from the sellers' dashboard, 2026-11-20) */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: inherit; text-decoration: none; font-size: 13px; }
.tabs a.on { border-color: var(--purple); color: var(--purple); font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.note { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; min-width: 140px; }
td select { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: #fff; }
.card ul.small { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.card code { font-size: 12px; overflow-wrap: anywhere; }

/* Sarah, live AI workers, brand accounts (owner, 2026-11-20) */
.sarah { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.sarah-card { display: grid; gap: 10px; }
.sarah-face { border-radius: 16px; overflow: hidden; background: #EEE8FA; }
.sarah-svg { display: block; width: 100%; height: auto; }
.sarah-eyes { transform-origin: 180px 176px; animation: blink 5s infinite; }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .sarah-eyes { animation: none; } }
.sarah-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sarah-chat { display: grid; gap: 10px; min-height: 520px; grid-template-rows: 1fr auto auto; }
.sarah-log { overflow-y: auto; max-height: 56vh; display: flex; flex-direction: column; gap: 12px; padding: 4px; }
.chat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 86%; }
.chat-msg.me { align-self: flex-end; }
.chat-msg .bubble { padding: 10px 14px; border-radius: 16px; line-height: 1.5; font-size: 14.5px; overflow-wrap: anywhere; }
.chat-msg.sarah .bubble { background: #F4F0FC; border: 1px solid #E4DEF5; border-top-left-radius: 4px; }
.chat-msg.me .bubble { background: var(--purple); color: #fff; border-top-right-radius: 4px; }
.sarah-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.chip { font-size: 12.5px; padding: 5px 10px; }
.sarah-form { display: grid; gap: 8px; }
.sarah-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; resize: vertical; }
.sarah-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.live-row { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: minmax(0, 2.2fr) auto 72px minmax(64px, 1fr); gap: 10px; align-items: center;
  padding: 7px 8px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.live-row:hover, .live-row:focus-visible { background: #F4F0FC; outline: none; }
.live-row[disabled] { cursor: default; opacity: .7; }
.live-row.on { background: #ECFDF3; }
.live-row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spark { width: 72px; height: 20px; display: block; }
.live-detail { margin-top: 14px; }
.live-log { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; max-height: 360px; overflow-y: auto; }
.live-log .warning { color: #9A6700; } .live-log .error { color: #B42318; }
.grp-h { margin: 18px 0 8px; font-size: 15px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.brand-card { display: grid; gap: 8px; align-content: start; }
.brand-card p { margin: 0; }
.bio { background: #F8F6FD; border-radius: 10px; padding: 8px 10px; display: grid; gap: 4px; }
.brand-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.brand-form select, .brand-form input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 0; font: inherit; font-size: 13px; }
@media (max-width: 900px) { .sarah { grid-template-columns: 1fr; } .sarah-card { grid-template-columns: 120px 1fr; } .sarah-card .sarah-face { grid-row: span 3; } }
@media (max-width: 520px) { .live-grid, .brand-grid { grid-template-columns: 1fr; } .live-row { grid-template-columns: minmax(0, 1fr) auto; } .live-row .spark, .live-row > .small { display: none; } .sarah-card { grid-template-columns: 1fr; } }
