/* AURA look: soft lavender background, deep plum text, violet gradient buttons, pink→purple brand mark. */
:root {
  --bg: #f9f4fb; --bg2: #f3e9f8; --panel: #ffffff; --ink: #3a2a4c; --muted: #8a7c99; --line: #ece2f2;
  --brand1: #ec6fb6; --brand2: #9b7cf4; --violet: #8f7cf5; --violet2: #b59cf5; --violet-ink: #5b3fc4;
  --accent: #3a2a4c; --accent-ink: #ffffff; --quote: #f6f0fa; --title: #6d4fc9;
  --red: #c2416b; --red-bg: #fde8ef; --yellow: #a0620b; --yellow-bg: #fdf1dc; --green: #2f8f5b; --green-bg: #e3f5ea;
  --radius: 16px; --shadow: 0 1px 2px rgba(58,42,76,.04), 0 6px 20px rgba(120,80,170,.06);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171221; --bg2: #1f1730; --panel: #211a2e; --ink: #f1eaf8; --muted: #a596b8; --line: #33284a;
    --accent: #f1eaf8; --accent-ink: #171221; --quote: #2a2139; --title: #c3b0ff; --violet-ink: #c3b0ff;
    --red: #ff8fb0; --red-bg: #3b1d2a; --yellow: #f0c46c; --yellow-bg: #362a14; --green: #7fdba4; --green-bg: #183126;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); }
body { font: 15px/1.55 var(--font); background: var(--bg);
  background-image: radial-gradient(1200px 600px at 85% -10%, rgba(236,111,182,.10), transparent 60%),
                    radial-gradient(900px 500px at 10% 110%, rgba(155,124,244,.12), transparent 60%);
  background-attachment: fixed; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1, h2 { margin: 0; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: 30px; } h2 { font-size: 24px; }

.btn { font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--violet2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(143,124,245,.35); }
.btn.good { background: linear-gradient(135deg, var(--violet), var(--brand1)); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(200,110,200,.30); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn.wide { width: 100%; padding: 12px; }
.link { font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; text-decoration: underline; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 12px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .tcard:focus-visible { outline: 2px solid var(--violet2); outline-offset: 1px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 360px; text-align: center; display: grid; gap: 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 24px; padding: 32px 26px; box-shadow: var(--shadow); }
.login-box form { display: grid; gap: 10px; }
.login-box input { text-align: center; font-size: 22px; letter-spacing: .3em; padding: 12px; }
.msg { min-height: 1.5em; color: var(--muted); margin: 0; }
.logo { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: 0 3px 12px rgba(200,110,200,.35); }
.logo.big { width: 60px; height: 60px; font-size: 28px; margin: 0 auto; }

/* shell */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 14px; display: flex; flex-direction: column; gap: 3px;
  background: linear-gradient(180deg, rgba(255,255,255,.75) 0%, rgba(243,233,248,.9) 55%, rgba(222,204,247,.95) 100%);
  border-right: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .side { background: linear-gradient(180deg, #1c1529 0%, #261b3b 100%); } }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; padding: 0 8px 20px; letter-spacing: -.01em; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 999px;
  text-decoration: none; color: var(--muted); font-weight: 600; }
.nav:hover { background: rgba(155,124,244,.10); color: var(--ink); }
.nav.active { background: var(--panel); color: var(--violet-ink); box-shadow: var(--shadow); }
.badge { font-size: 12px; background: linear-gradient(135deg, var(--brand1), var(--brand2)); color: #fff; border-radius: 99px; padding: 0 8px; }
.badge:empty { display: none; }
.side-foot { margin-top: auto; display: grid; gap: 6px; padding: 0 12px; }
main { min-width: 0; }
.view { max-width: 900px; margin: 0 auto; padding: 26px 30px 60px; }
#view-tasks { max-width: none; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.bar-right { display: flex; align-items: center; gap: 10px; }

/* tabs */
.tabs, .seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tab, .seg button { font: inherit; font-size: 14px; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 6px 16px;
  border-radius: 999px; cursor: pointer; }
.tab.active, .seg button.active { background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; }
.tab.active .count { color: rgba(255,255,255,.85); }
.count { font-size: 12px; color: var(--muted); }

/* digest */
.digest-head { margin: 0 0 18px; color: var(--muted); }
.digest-head p { margin: 4px 0; }
.digest-head .overview { color: var(--ink); font-weight: 500; }
.cards { display: grid; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card.done { opacity: .55; }
.card-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-head .n { color: var(--muted); font-weight: 700; }
.card-head .who { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.card-head .ctx { color: var(--muted); font-size: 13px; }
.label { margin: 14px 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--violet-ink); }
.pill { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 10px; display: inline-block; }
.pill.urgent { background: var(--red-bg); color: var(--red); }
.pill.today { background: var(--yellow-bg); color: var(--yellow); }
.pill.sent { background: var(--green-bg); color: var(--green); }
.pill.plain { background: var(--bg2); color: var(--muted); font-weight: 600; }
.points { margin: 0; padding-left: 18px; }
.points li { margin: 2px 0; }
.draft { background: var(--quote); border-left: 3px solid var(--violet2); border-radius: 10px; padding: 11px 14px; white-space: pre-wrap; }
.next { font-size: 14px; }
.task-line { font-size: 14px; }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.editor { display: grid; gap: 8px; margin-top: 12px; }
.editor textarea { width: 100%; min-height: 110px; resize: vertical; }
.editor .row, .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.editor .row input { flex: 1; min-width: 220px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.section-title { margin: 30px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.fyi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 20px; }
.fyi p { margin: 6px 0; }

/* tasks: day plan + brain dumps (above the board) */
.dayplan { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-bottom: 8px; align-items: start; }
.plan-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.plan-head h3 { margin: 2px 0 8px; font-size: 18px; }
.plan-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--violet-ink); }
.plan-progress { height: 6px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.plan-progress div { height: 100%; background: linear-gradient(90deg, var(--violet), var(--brand1)); border-radius: 99px; transition: width .3s; }
.plan-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 22px; }
.pgroup { padding: 4px 0 6px; }
.pgroup-title { font-weight: 700; color: var(--title); margin: 6px 0 4px; font-size: 14px; }
.pitem { display: flex; gap: 9px; align-items: flex-start; padding: 4px 0; cursor: pointer; line-height: 1.4; }
.pitem.d1 { padding-left: 22px; } .pitem.d2 { padding-left: 44px; }
.plan-progress div { width: 0; }
.pitem input { width: 17px; height: 17px; margin: 2px 0 0; flex: none; accent-color: var(--violet); cursor: pointer; }
.pitem.done span { text-decoration: line-through; color: var(--muted); }
.pitem.star span { font-weight: 600; }
.pitem.note { color: var(--muted); cursor: default; }
.add-here { font-size: 12px; margin: 2px 0 0 26px; text-decoration: none; }
.add-here:hover { color: var(--violet-ink); }
.plan-add { display: flex; gap: 8px; margin: 6px 0 4px; }
.plan-add input { flex: 1; min-width: 0; }
.plan-empty { padding: 6px 0 2px; display: grid; gap: 8px; }
.seg.small button { padding: 4px 12px; font-size: 13px; }
.dumps .dump-list { display: grid; gap: 8px; margin-top: 8px; max-height: 420px; overflow-y: auto; }
.dump { background: var(--quote); border-radius: 10px; padding: 8px 12px; }
.dump.leaving { opacity: .3; }
.dump-text { line-height: 1.4; }
.dump .row { gap: 12px; margin-top: 4px; }
.dump .link { text-decoration: none; font-weight: 600; color: var(--violet-ink); font-size: 13px; }
.small { font-size: 13px; }
@media (max-width: 960px) { .dayplan { grid-template-columns: 1fr; } }

/* tasks: Notion-style board */
.add-task { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; max-width: 900px; }
.add-task #new-title { flex: 1; min-width: 220px; }
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.col { flex: 0 0 290px; display: flex; flex-direction: column; gap: 10px; }
.col-head { font-weight: 700; color: var(--violet-ink); padding: 2px 4px; }
.col-head span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.col-head.overdue { color: var(--red); }
.col-body { display: flex; flex-direction: column; gap: 10px; }
.col-empty { color: var(--muted); font-size: 13px; padding: 8px 4px; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow);
  cursor: pointer; display: grid; gap: 8px; transition: transform .1s, border-color .1s; }
.tcard:hover { border-color: var(--violet2); transform: translateY(-1px); }
.tcard.leaving { opacity: .3; }
.tcard-top { display: flex; gap: 10px; align-items: flex-start; }
.tcard-title { color: var(--title); font-weight: 600; line-height: 1.35; }
.check { width: 18px; height: 18px; margin-top: 2px; flex: none; border-radius: 50%; border: 2px solid var(--violet2); background: none; cursor: pointer; padding: 0; }
.check:hover { background: var(--green-bg); border-color: var(--green); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; background: var(--bg2); color: var(--muted); border-radius: 6px; padding: 1px 8px; font-weight: 600; }
.tag.status::before { content: "● "; color: var(--red); }
.tmeta { font-size: 13px; color: var(--muted); }

/* task drawer */
.drawer { position: fixed; inset: 0; background: rgba(40,25,60,.25); display: flex; justify-content: flex-end; z-index: 8; }
.drawer-box { width: min(460px, 100%); height: 100%; overflow-y: auto; background: var(--panel); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: -10px 0 40px rgba(60,30,90,.18); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-title { font: inherit; font-size: 20px; font-weight: 800; letter-spacing: -.01em; border: 1px solid transparent; resize: vertical; }
.drawer-title:hover { border-color: var(--line); }
.drawer label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--violet-ink); margin-top: 8px; }
.drawer .row input[type=text] { flex: 1; min-width: 180px; }
.comments { font-size: 14px; display: grid; gap: 8px; }
.note { background: var(--quote); border-radius: 10px; padding: 8px 12px; }

/* activity */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 99px; padding: 4px 12px; cursor: pointer; }
.chip.active { background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; border-color: transparent; }
.day { margin: 20px 0 8px; font-size: 13px; font-weight: 700; color: var(--violet-ink); }
.act { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; padding: 10px 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; cursor: pointer; }
.act .t { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.act.fail .s { color: var(--red); }
.act .k { font-size: 12px; color: var(--muted); }
.act pre { grid-column: 2 / -1; margin: 6px 0 0; white-space: pre-wrap; font: inherit; font-size: 13px; color: var(--muted); }

/* chat */
.chat-view { display: flex; flex-direction: column; height: 100vh; padding-bottom: 18px; }
/* today strip above the chats (30 Nov; compact one-row version) */
.tstrip { flex: none; display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); padding: 8px 8px 8px 14px; margin: -6px 0 10px; }
.tstrip-head { flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.tstrip-head b { color: var(--title); font-size: 14px; }
.tstrip-ctl { flex: none; display: flex; gap: 0; }
.tstrip-ctl .btn { padding: 4px 8px; font-size: 13px; }
.tstrip-row { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity;
  overscroll-behavior-x: contain; scrollbar-width: none; }
.tstrip-row::-webkit-scrollbar { display: none; }
.tsc { flex: 0 0 clamp(260px, 32%, 340px); height: 54px; scroll-snap-align: start; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px 6px 10px; background: var(--bg); cursor: pointer; transition: opacity .2s, transform .2s; }
.tsc:hover { border-color: var(--violet2); }
.tsc.late { box-shadow: inset 3px 0 0 var(--red); }
.tsc.leaving { opacity: .3; transform: scale(.96); }
.tsc-n { flex: none; font-size: 12px; font-weight: 800; color: var(--title); }
.tsc-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.25; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tsc .check { margin: 0; }
.tsc-go { flex: none; padding: 3px 11px; font-size: 12px; }
.tsc-empty { padding: 6px 2px; }
@media (max-width: 760px) { .tsc { flex-basis: 78%; } .tstrip { padding-left: 10px; } }
.chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 12px; }
.bubble { max-width: 80%; padding: 11px 15px; border-radius: 18px; }
.bubble.user { align-self: flex-end; background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; white-space: pre-wrap; }
.bubble.assistant { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin: 0; }
.bubble ul, .bubble ol { margin: 4px 0 8px; padding-left: 20px; }
.bubble blockquote, .md blockquote { margin: 6px 0; padding: 8px 12px; background: var(--quote); border-left: 3px solid var(--violet2);
  border-radius: 8px; white-space: pre-wrap; }
.bubble.user a { color: inherit; }
.thinking { color: var(--muted); font-style: italic; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.chat-form .attach { cursor: pointer; padding: 10px 12px; font-size: 18px; }
.chips { flex-basis: 100%; order: -1; display: flex; flex-wrap: wrap; gap: 6px; }
.chips.hidden { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px;
  background: var(--card, #f1eefc); font-size: 13px; }
.chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.chip button { border: 0; background: none; cursor: pointer; font-size: 14px; }
.bubble .att { display: block; font-size: 12px; opacity: .8; margin-top: 4px; }
.chat-form textarea { flex: 1; resize: none; max-height: 200px; border-radius: 16px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--quote); padding: 1px 4px; border-radius: 4px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(60,30,90,.25); z-index: 9; max-width: 90vw; }
.toast.bad { background: var(--red); color: #fff; }

.side-talk { margin: 14px 4px 0; }
.fab { display: none; }
.steps { margin: 4px 0 6px; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.copy { cursor: pointer; word-break: break-all; }

/* phone: tabs at the bottom, a big talk button, room for the iPhone home bar */
@media (max-width: 760px) {
  body { padding-top: env(safe-area-inset-top); }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; left: 0; right: 0; top: auto; z-index: 6; height: auto; flex-direction: row;
    justify-content: space-around; align-items: center; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
  .brand, .side-foot, .side-talk { display: none; }
  .nav { flex-direction: column; gap: 0; padding: 6px 10px; font-size: 13px; border-radius: 12px; }
  .nav .badge { position: absolute; transform: translate(18px, -8px); font-size: 11px; }
  .view { padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  .bar { gap: 8px; }
  .bar-right { flex-wrap: wrap; }
  #siri-setup { padding: 6px 10px; font-size: 13px; }
  .chat-view { height: calc(100dvh - 70px - env(safe-area-inset-bottom) - env(safe-area-inset-top)); padding-bottom: 8px; }
  .bubble { max-width: 92%; }
  .col { flex-basis: 82vw; }
  .card { padding: 15px 16px; }
  .actions .btn { flex: 1; text-align: center; }
  .drawer-box { width: 100%; }
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 7; width: 60px; height: 60px; border-radius: 50%; border: 0; font-size: 26px; cursor: pointer;
    background: linear-gradient(135deg, var(--brand1), var(--brand2)); color: #fff; box-shadow: 0 8px 24px rgba(155,124,244,.45); }
  #view-chat ~ .fab, body:has(#view-chat:not(.hidden)) .fab { display: none; }
  .orb { width: 200px; height: 200px; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) and (prefers-color-scheme: dark) { .side { background: rgba(23,18,33,.92); } }

/* voice mode */
.voice { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 600px at 50% 30%, rgba(236,111,182,.25), transparent 60%),
              radial-gradient(900px 700px at 50% 90%, rgba(155,124,244,.35), transparent 60%), var(--bg); }
.voice-box { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.orb { width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%),
  linear-gradient(135deg, var(--brand1), var(--brand2)); box-shadow: 0 20px 60px rgba(155,124,244,.45);
  transition: transform .3s; animation: breathe 3s ease-in-out infinite; }
.orb.speaking { animation: talk .5s ease-in-out infinite alternate; }
.orb.off { filter: grayscale(.7); opacity: .6; animation: none; }
@keyframes breathe { 50% { transform: scale(1.05); } }
@keyframes talk { from { transform: scale(1); } to { transform: scale(1.12); } }
.voice-status { font-size: 20px; font-weight: 700; color: var(--violet-ink); }
.voice-lines { width: 100%; max-height: 34vh; overflow-y: auto; display: grid; gap: 8px; text-align: left; }
.voice-lines div { padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.voice-lines .me { background: transparent; color: var(--muted); }
.row.center { justify-content: center; }
.bar > div h2 + span { display: block; }

.fixer { display: grid; gap: 8px; margin-top: 8px; }
.fixer .row input { flex: 1; min-width: 220px; }
.btn.small { font-size: 13px; padding: 5px 12px; }

/* notifications + approvals + Claude-style chat */
.nav-btn { font: inherit; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; margin-top: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand1); margin-left: 4px; vertical-align: middle; }
.banner { background: linear-gradient(135deg, rgba(155,124,244,.12), rgba(236,111,182,.12)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner .btn { margin-left: auto; }
.approval { margin-bottom: 12px; border-left: 3px solid var(--brand1); }
.appr-items { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 6px; }
.appr-items li.bad { color: var(--muted); }
.kinds { display: grid; gap: 8px; margin: 4px 0 10px; }
.kind { display: flex; gap: 10px; align-items: center; text-transform: none !important; letter-spacing: 0 !important;
  font-size: 15px !important; font-weight: 500 !important; color: var(--ink) !important; margin: 0 !important; }
.kind input { width: 18px; height: 18px; accent-color: var(--violet); }
.bubble h4, .md h4 { margin: 12px 0 6px; font-size: 15px; color: var(--violet-ink); }
.bubble h4:first-child { margin-top: 0; }
.bubble hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.bubble b { color: var(--title); }
.bubble.assistant { line-height: 1.6; }
.bubble li { margin: 3px 0; }
.msgbox { margin: 10px 0; background: var(--panel); border: 1px solid var(--violet2); border-radius: 16px 16px 16px 4px;
  padding: 10px 14px; box-shadow: var(--shadow); white-space: normal; }
.msgbox-to { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--violet-ink); margin-bottom: 4px; }
.taskbox { display: grid; gap: 8px; background: var(--quote); border-radius: 12px; padding: 10px 12px; }
.taskbox .task-title { width: 100%; font-weight: 600; color: var(--title); }
.taskbox .row { gap: 8px; }
.appr-pick { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; }
.appr-pick input { width: 17px; height: 17px; margin-top: 3px; flex: none; accent-color: var(--violet); }
.appr-items { list-style: none; padding-left: 0; }
.approval .fixer { margin-top: 10px; }

.chat-cards { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.chat-cards .card { margin: 0; }

/* ---------- Ads Manager ---------- */
.ads-bar select { font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); max-width: 240px; }
.ads-check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.ads-tabs { margin: 4px 0 14px; }
.ads-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.ads-table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); }
.ads-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ads-table th { position: sticky; top: 0; background: var(--bg2); text-align: right; font-size: 12px; color: var(--muted);
  font-weight: 700; padding: 10px 12px; white-space: nowrap; cursor: pointer; user-select: none; }
.ads-table th.l, .ads-table td.l { text-align: left; }
.ads-table th.sorted { color: var(--title); }
.ads-table td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ads-table td.name { max-width: 340px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ads-table td.name small { display: block; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.ads-table tr:hover td { background: var(--quote); }
.ads-table tfoot td { font-weight: 700; background: var(--bg2); }
.ads-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--bg2); color: var(--muted); }
.ads-status.on { background: var(--green-bg); color: var(--green); }
.ads-status.bad { background: var(--red-bg); color: var(--red); }
.switch { position: relative; width: 36px; height: 20px; border-radius: 99px; border: 0; cursor: pointer; padding: 0;
  background: var(--line); transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: linear-gradient(135deg, var(--brand1), var(--brand2)); }
.switch.on::after { transform: translateX(16px); }
.switch:disabled { opacity: .5; cursor: wait; }
.budget-btn { font: inherit; background: none; border: 1px dashed transparent; color: var(--ink); padding: 2px 6px;
  border-radius: 8px; cursor: pointer; font-variant-numeric: tabular-nums; }
.budget-btn:hover { border-color: var(--violet2); }
.budget-edit { width: 90px; font: inherit; padding: 3px 6px; border-radius: 8px; border: 1px solid var(--violet); text-align: right; }
.cpl-good { color: var(--green); font-weight: 700; } .cpl-bad { color: var(--red); font-weight: 700; }
.ads-foot { margin-top: 10px; }
.toast .undo { margin-left: 10px; font: inherit; font-weight: 700; background: none; border: 0; color: inherit;
  text-decoration: underline; cursor: pointer; }
@media (max-width: 760px) {
  .ads-bar .bar-right { width: 100%; }
  .ads-bar select { flex: 1; min-width: 0; }
  #ads-account { flex-basis: 100%; max-width: none; }
  .nav-long { display: none; }
  .side .nav { padding: 6px 6px; font-size: 12.5px; }
  .ads-kpis { grid-template-columns: repeat(2, 1fr); }
  .ads-table td.name { max-width: 180px; }
}
.builder .drawer-box { width: min(560px, 100%); }
.builder input[type=text], .builder input[type=number], .builder input[type=url], .builder select, .builder textarea {
  font: inherit; font-size: 14px; width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); }
.builder textarea { min-height: 90px; resize: vertical; }
.builder fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; display: grid; gap: 6px; margin: 0; }
.builder legend { font-weight: 800; padding: 0 6px; color: var(--title); }
.builder .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.builder .hint { font-size: 12px; color: var(--muted); }
.builder .warn { font-size: 13px; background: var(--yellow-bg); color: var(--yellow); border-radius: 10px; padding: 8px 10px; }
.builder .chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.builder .chosen span { background: var(--bg2); border-radius: 99px; padding: 2px 10px; font-size: 13px; }
.builder .upl { font-size: 13px; }
.builder .result { background: var(--green-bg); color: var(--green); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
@media (max-width: 760px) { .builder .two { grid-template-columns: 1fr; } }
.ads-table td:last-child { white-space: normal; }
.ads-table td:last-child .btn { margin: 2px 0; }

.ad-open { font: inherit; font-weight: 600; background: none; border: 0; padding: 0; color: var(--title); cursor: pointer;
  text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ad-open:hover { text-decoration: underline; }
.ad-video { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; }

/* drag & drop + hold-to-talk */
.drop-zone { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; pointer-events: none;
  background: rgba(155,124,244,.18); backdrop-filter: blur(2px); }
.drop-zone div { font-size: 22px; font-weight: 800; color: var(--title); background: var(--panel); border: 2px dashed var(--violet);
  border-radius: 20px; padding: 28px 40px; box-shadow: var(--shadow); }
.btn.mic { font-size: 18px; padding: 0 14px; touch-action: none; user-select: none; -webkit-user-select: none; }
.btn.mic.rec { background: var(--red); color: #fff; border-color: transparent; animation: micpulse 1s ease-in-out infinite; }
@keyframes micpulse { 50% { box-shadow: 0 0 0 8px rgba(194,65,107,.18); } }
@media (prefers-reduced-motion: reduce) { .btn.mic.rec { animation: none; } }

/* sidebar groups */
.nav-group { margin: 14px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); opacity: .75; }
.brand + .nav-group { margin-top: 6px; }
a.nav-head { display: block; text-decoration: none; cursor: pointer; border-radius: 8px; padding: 4px 0; }
a.nav-head:hover, a.nav-head.active { color: #7c5cff; opacity: 1; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 6px 2px 24px; }
.hub-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); text-decoration: none; color: inherit; border: 1px solid rgba(124,92,255,.14); }
.hub-card:hover { border-color: rgba(124,92,255,.45); transform: translateY(-1px); }
.hub-emoji { font-size: 28px; }
.hub-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.hub-txt .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .nav-group { display: none; } }

/* creators: funnel */
#view-funnel { max-width: 1100px; }
.fn-chips { margin: 2px 0 16px; }
.chip.ghost { background: transparent; border-style: dashed; }
.fn-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.fn-step { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.fn-step span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.fn-step b { font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.fn-step i { font-style: normal; font-size: 13px; color: var(--violet-ink); font-weight: 600; }
.fn-step small { font-size: 12px; }
.fn-d { font-style: normal; font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.fn-d.up { color: var(--green); } .fn-d.down { color: var(--red); }
.fn-money { margin-top: 12px; grid-template-columns: repeat(2, minmax(150px, 220px)); }
.fn-more { margin: 4px 0 10px; }
.fn-more summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; padding: 6px 0; }
.fn-more summary:hover { color: var(--ink); }
.fn-more .ads-kpis { margin-top: 6px; }
.fn-table tbody tr { cursor: pointer; }
.fn-table tr.sel td { background: var(--quote); font-weight: 700; }
.fn-notes ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; display: grid; gap: 6px; }
@media (max-width: 760px) {
  .fn-steps { grid-template-columns: repeat(2, 1fr); }
  .fn-money { grid-template-columns: repeat(2, 1fr); }
  #fn-period { flex: 1; min-width: 0; }
}

.thinking .stop-btn { margin-left: 10px; font: inherit; font-size: 13px; font-style: normal; padding: 4px 12px;
  border-radius: 999px; border: 1px solid #e3c6d6; background: #fff; color: #b23a6f; cursor: pointer; }
.thinking .stop-btn:hover { background: #fbeef4; }
.thinking .stop-btn:disabled { opacity: .6; cursor: default; }

/* phone: bottom bar = Inbox Tasks Activity Leon · Chats (hub with the agents) · Funnel Ads */
@media (max-width: 760px) {
  a.nav-head { display: none; }
  a.nav-head[data-view="chats"] { display: flex; flex-direction: column; padding: 6px 10px; margin: 0; font-size: 13px;
    font-weight: 600; letter-spacing: 0; text-transform: none; opacity: 1; color: inherit; border-radius: 12px; }
  #nav-agents { display: none; }
}

/* an agent wrote to him: the whole chat button lights up (bright purple), so it begs to be clicked */
.nav.agent-link.unread { background: linear-gradient(135deg, #8b5cf6, #5b21b6); color: #fff; font-weight: 700;
  box-shadow: 0 4px 14px rgba(124, 58, 237, .45); animation: agent-pulse 2.2s ease-in-out infinite; }
.nav.agent-link.unread .badge { background: #fff; color: #5b21b6; font-weight: 800; margin-left: 8px; }
.nav.agent-link .badge { margin-left: 8px; }
a.nav-head.unread { color: #7c3aed; opacity: 1; }
@keyframes agent-pulse { 0%, 100% { box-shadow: 0 4px 14px rgba(124, 58, 237, .35); } 50% { box-shadow: 0 4px 22px rgba(124, 58, 237, .75); } }
@media (prefers-reduced-motion: reduce) { .nav.agent-link.unread { animation: none; } }

/* phone: 4 even tabs with icons (Inbox · Tasks · Chats · More); the rest lives in the More page */
.phone-only { display: none; }
@media (max-width: 760px) {
  .phone-only { display: flex; }
  .side > a[data-view="activity"], .side > a[data-view="chat"], #nav-funnel, #nav-ads, #notif-btn { display: none !important; }
  .side > .nav, .side > a.nav-head[data-view="chats"] { flex: 1; align-items: center; gap: 2px; min-width: 0; position: relative; }
  .side > a[data-view]::before { font-size: 20px; line-height: 1.1; }
  .side > a[data-view="inbox"]::before { content: "📥"; }
  .side > a[data-view="tasks"]::before { content: "✅"; }
  .side > a[data-view="chats"]::before { content: "💬"; }
  .side > a[data-view="more"]::before { content: "☰"; }
  .side > a.nav-head[data-view="chats"] { font-weight: inherit; }
  .side > a.nav-head[data-view="chats"].unread { color: #7c3aed; font-weight: 700; }
  .side > a.nav-head[data-view="chats"] .badge { position: absolute; top: 0; left: 50%; transform: translateX(6px); font-size: 11px; }
}

.nav-role { font-size: .82em; font-weight: 500; opacity: .6; }
.nav.unread .nav-role, .nav.active .nav-role { opacity: .8; }
.nav-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* team members: only their chats (Giannis's own pages, buttons and Leon are never shown) */
body.member .owner-only { display: none !important; }
.bubble .who { display: block; font-size: 11.5px; font-weight: 700; opacity: .85; margin-bottom: 2px; letter-spacing: .01em; }
.team-add { display: grid; gap: 12px; margin-bottom: 16px; }
.team-add input { font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
.team-access { display: flex; flex-wrap: wrap; gap: 8px; }
.team-access label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 14px; cursor: pointer; background: var(--panel); }
.team-access label.on { border-color: var(--violet2); background: var(--quote); }
.team-access label.act { border-style: dashed; }
.team-list { display: grid; gap: 12px; }
.team-member .row { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.team-member h3 { margin: 0; font-size: 17px; }
.team-member .team-access { margin: 10px 0; }
.team-linkbox { margin-bottom: 16px; padding: 14px 16px; border-radius: 14px; background: var(--quote); border: 1px solid var(--violet2); }
.team-linkbox code { display: block; word-break: break-all; margin: 6px 0 10px; font-size: 13px; }
@media (max-width: 760px) { #nav-settings { display: none !important; } }
body:has(#login:not(.hidden)) .fab { display: none !important; }
.set-section { margin: 0 0 26px; max-width: 900px; }
.set-section h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.set-section > p { margin: 0 0 12px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.set-logins { margin: 6px 0 12px; display: grid; gap: 3px; }
#view-settings .team-list { margin-top: 12px; }
body.member:not(.admin) .admin-only { display: none !important; }
#team-role, .team-role { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
.team-add .set-row input { flex: 1; min-width: 180px; }
.role-pill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--quote); color: var(--title); margin-left: 8px; }
.team-member.locked { opacity: .9; border-style: dashed; }
.login-stack { display: grid; gap: 10px; margin: 8px 0; }
.status-pill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-left: 8px; }
.status-pill.invited { background: var(--yellow-bg); color: var(--yellow); }
.status-pill.active { background: var(--green-bg); color: var(--green); }
.team-member .email { font-size: 13px; }
.login-box .login-stack input { text-align: left; font-size: 16px; letter-spacing: normal; padding: 12px 14px; }

/* Send cards in the chat (lead / Instagram / WhatsApp) */
.send-card .draft-text { margin: 8px 0 10px; padding: 10px 12px; border-left: 3px solid var(--accent, #7c5cff);
  background: rgba(124, 92, 255, .06); border-radius: 8px; white-space: normal; line-height: 1.45; }
.send-card .card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.send-card.done { color: var(--muted); }

/* ===== 23 Nov design pass: one icon family, agent monograms, calmer sidebar footer, nicer Settings ===== */
.ico { width: 18px; height: 18px; flex: none; }
.nav-l { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.nav-l .ico { opacity: .75; }
.nav:hover .nav-l .ico, .nav.active .nav-l .ico { opacity: 1; }
.nav-name { display: inline-flex; align-items: center; gap: 0; }

/* agent monograms: same shape, each agent its own colour */
.av { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; flex: none; margin-right: 10px;
  font-size: 11.5px; font-weight: 800; color: #fff; letter-spacing: 0; line-height: 1;
  background: linear-gradient(135deg, #a78bfa, #7c3aed); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.av-leon { background: linear-gradient(135deg, #b794f6, #6d28d9); }
.av-sebastian { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.av-ian { background: linear-gradient(135deg, #fbbf24, #d97706); }
.av-marilyn { background: linear-gradient(135deg, #f472b6, #be185d); }
.av-robert { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.av-me { background: linear-gradient(135deg, var(--brand1), var(--brand2)); border-radius: 50%; margin: 0; width: 32px; height: 32px; font-size: 13px; }
.av-big { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; margin: 0; }
.nav.agent-link.unread .av, .nav.active .av { box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.nav-role { margin-left: 6px; font-size: .8em; font-weight: 500; opacity: .55; }
#chat-title { display: inline-flex; align-items: center; }
#chat-title .title-role { margin-left: 8px; font-size: .55em; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* sidebar footer: Talk to Leon is the one big button; you, Notifications and Settings sit quietly under it */
.side-foot { padding: 12px 4px 0; gap: 10px; }
.side-talk { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 0; }
.side-talk .ico { width: 17px; height: 17px; }
.me-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 14px;
  background: rgba(255,255,255,.55); border: 1px solid var(--line); }
.me-txt { min-width: 0; flex: 1; line-height: 1.25; }
.me-txt b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt .small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; flex: none; }
.icon-btn:hover { background: rgba(155,124,244,.14); color: var(--ink); }
.icon-btn.active { background: var(--panel); color: var(--violet-ink); box-shadow: var(--shadow); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #ec4899; }
.icon-btn .dot.hidden { display: none; }
.foot-links { display: flex; gap: 14px; justify-content: center; }
@media (prefers-color-scheme: dark) { .me-row { background: rgba(255,255,255,.04); } }

/* hub cards (phone Chats / More): icon tiles instead of emojis */
.hub-emoji { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--quote); color: var(--violet-ink); font-size: 0; }
.hub-emoji .ico { width: 20px; height: 20px; }
.hub-emoji:has(.av) { background: none; }

/* Settings */
.set-h { display: flex; align-items: center; gap: 10px; }
.set-h .ico { width: 20px; height: 20px; padding: 7px; box-sizing: content-box; border-radius: 10px; background: var(--quote); color: var(--violet-ink); }
.set-section .card { border-radius: 18px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chipx { position: relative; display: inline-flex; align-items: center; gap: 0; padding: 6px 12px 6px 7px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s, box-shadow .15s; }
.chipx input { position: absolute; opacity: 0; pointer-events: none; }
.chipx .av { width: 24px; height: 24px; margin-right: 8px; }
.chipx .chip-ico { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; margin-right: 8px;
  background: var(--quote); color: var(--violet-ink); }
.chipx .chip-ico .ico { width: 15px; height: 15px; }
.chipx .chip-sub { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.chipx .tick { display: grid; place-items: center; width: 18px; height: 18px; margin-left: 8px; border-radius: 50%;
  border: 1.5px solid var(--line); color: transparent; }
.chipx .tick .ico { width: 12px; height: 12px; stroke-width: 3; }
.chipx:hover { border-color: var(--violet2); }
.chipx.on { border-color: var(--violet); background: var(--quote); box-shadow: 0 0 0 3px rgba(143,124,245,.12); }
.chipx.on .tick { background: linear-gradient(135deg, var(--brand1), var(--brand2)); border-color: transparent; color: #fff; }
.chipx:focus-within { outline: 2px solid var(--violet2); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; cursor: pointer; font-size: 14px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row .sw { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line); flex: none; transition: background .15s; }
.switch-row .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch-row input:checked + .sw { background: linear-gradient(135deg, var(--brand1), var(--brand2)); }
.switch-row input:checked + .sw::after { transform: translateX(16px); }
.switch-row input:disabled + .sw { opacity: .5; }
.switch-row input:focus-visible + .sw { outline: 2px solid var(--violet2); outline-offset: 2px; }

/* phone bottom bar: the same line icons instead of emoji pseudo-elements */
@media (max-width: 760px) {
  .side > a[data-view]::before { content: none !important; }
  .side > .nav .nav-l, .side > a.nav-head .nav-l { flex-direction: column; gap: 3px; }
  .side > .nav .nav-l .ico, .side > a.nav-head .nav-l .ico { width: 22px; height: 22px; opacity: .85; }
  .fab .ico { width: 26px; height: 26px; }
}
@media (min-width: 761px) { .nav-head .nav-l .ico { display: none; } .nav-head .nav-l { gap: 0; } }
.team-access label.chipx { padding: 5px 10px 5px 5px; border-radius: 12px; }
.team-access label.switch-row { border: 0; padding: 0; background: none; border-radius: 0; }

.icon-lbl { display: inline-flex; align-items: center; gap: 7px; }
.icon-lbl .ico { width: 16px; height: 16px; }
.btn.attach, .btn.mic { display: inline-grid; place-items: center; }
.btn.attach .ico, .btn.mic .ico { width: 19px; height: 19px; }
.drop-zone [data-icon] { display: inline-flex; align-items: center; gap: 8px; }

/* chat turns: the bubble + a small Copy under it (shows on hover on a computer, always on a phone) */
.turn { display: flex; flex-direction: column; max-width: 80%; }
.turn.user { align-self: flex-end; align-items: flex-end; }
.turn.assistant { align-self: flex-start; align-items: flex-start; }
.turn > .bubble { max-width: 100%; }
.turn-tools { display: flex; gap: 4px; margin-top: 3px; opacity: 0; transition: opacity .15s; }
.turn:hover .turn-tools, .turn:focus-within .turn-tools { opacity: 1; }
.copy-btn { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted);
  background: none; border: 0; padding: 3px 8px; border-radius: 8px; cursor: pointer; }
.copy-btn:hover { background: rgba(155,124,244,.12); color: var(--ink); }
.copy-btn .ico { width: 14px; height: 14px; }
.copy-btn.done { color: var(--violet-ink); }
@media (hover: none) { .turn-tools { opacity: .85; } .copy-btn span { display: none; } }
@media (max-width: 760px) { .turn { max-width: 92%; } }

/* sidebar footer: stay inside the sidebar (the button's padding made it spill over the edge) */
.side-foot { padding: 12px 0 0; }
.side-foot > *, .side-talk, .me-row { box-sizing: border-box; max-width: 100%; min-width: 0; }
.side-talk { margin: 0 !important; }
.me-row { padding: 8px 8px 8px 8px; gap: 8px; }
.me-row .icon-btn { width: 30px; height: 30px; }
.me-txt .small { white-space: normal; overflow: visible; }

/* hub cards (phone Chats / More): soft pink-lavender instead of plain white, readable in light AND dark mode */
.hub-card { background: linear-gradient(135deg, #fff4fa 0%, #f6efff 100%); border-color: rgba(236,111,182,.22); color: var(--ink); }
.hub-card b { color: var(--ink); }
.hub-card .muted { color: #7a6a8c; }
.hub-card:hover { border-color: rgba(236,111,182,.5); }
@media (prefers-color-scheme: dark) {
  .hub-card { background: linear-gradient(135deg, #34203f 0%, #2a2142 100%); border-color: rgba(236,111,182,.28); box-shadow: none; }
  .hub-card b { color: #f6eefc; }
  .hub-card .muted { color: #cbb8de; }
  .hub-emoji { background: rgba(195,176,255,.14); color: #e2d6ff; }
}

/* theme switch (Settings → Appearance) */
.theme-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg2); }
.theme-seg button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; border: 0;
  background: none; color: var(--muted); padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.theme-seg button .ico { width: 15px; height: 15px; }
.theme-seg button.on { background: var(--panel); color: var(--violet-ink); box-shadow: var(--shadow); }
.me-row { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 4px 10px; }
.me-icons { grid-column: 1 / -1; display: flex; justify-content: space-between; padding-top: 6px; margin-top: 2px;
  border-top: 1px solid var(--line); }
.me-icons .icon-btn { flex: 1 1 0; width: auto; min-width: 0; }
.me-txt b, .me-txt .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-color-scheme: dark) {
  .thinking .stop-btn { background: transparent; border-color: rgba(255,143,176,.4); color: #ff8fb0; }
  .thinking .stop-btn:hover { background: rgba(255,143,176,.1); }
}

/* 23 Nov: the OPEN chat / page glows purple; an unread chat only shows its number (the glow on unread was confusing) */
.nav.agent-link.unread { background: none; color: var(--ink); font-weight: 700; box-shadow: none; animation: none; }
.nav.agent-link.unread .badge { background: linear-gradient(135deg, var(--brand1), var(--brand2)); color: #fff; }
@media (min-width: 761px) {
  .side .nav.active, .side .nav.agent-link.active { background: linear-gradient(135deg, #8b5cf6, #5b21b6); color: #fff;
    font-weight: 700; box-shadow: 0 4px 18px rgba(124, 58, 237, .45); }
  .side .nav.active .nav-role, .side .nav.active .nav-l .ico { color: #fff; opacity: .85; }
  .side .nav.active .badge { background: #fff; color: #5b21b6; }
  .side .nav.active .av { box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
}

/* 25 Nov: visual answers in the chat (tables, ```stats tiles, ```callout boxes, ```chart SVG). Colours = theme vars, so dark mode is free. */
:root { --ch1: #8f7cf5; --ch2: #ec6fb6; --ch3: #2f9bb0; --grid: #ece2f2; }
@media (prefers-color-scheme: dark) { :root { --ch1: #a996ff; --ch2: #ff8fc8; --ch3: #5fd0e0; --grid: #33284a; } }
.bubble.assistant.md { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.turn.assistant:has(.tbl-wrap, .stats, .chart, .callout) { width: 80%; }
.turn.assistant:has(.tbl-wrap, .stats, .chart, .callout) > .bubble { width: 100%; }
.tbl-wrap { margin: 8px 0 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tbl { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 7px 12px 7px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: normal; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl th { font-weight: 700; color: var(--ink); border-bottom: 1.5px solid var(--ink); white-space: nowrap; font-size: 13.5px; }
.tbl td { white-space: nowrap; }
.tbl td:first-child { white-space: normal; min-width: 8em; }
.tbl .a-right { text-align: right; } .tbl .a-center { text-align: center; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.total td { font-weight: 700; border-top: 1.5px solid var(--ink); }
.bubble .tbl b { color: inherit; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin: 8px 0 10px; }
.stat { background: var(--bg2); border-radius: 12px; padding: 9px 12px; min-width: 0; }
.stat-l { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-v { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.bubble .stat-v b { color: inherit; }
.stat-d { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 1px; }
.stat-d.good { color: var(--green); } .stat-d.bad { color: var(--red); }
.callout { margin: 10px 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--violet2); background: var(--quote); }
.callout-h { font-weight: 800; margin-bottom: 3px; }
.callout-b > :last-child { margin-bottom: 0; }
.callout-b ul, .callout-b ol { margin: 2px 0 4px; }
.callout.warn { background: var(--yellow-bg); border-left-color: var(--yellow); } .callout.warn .callout-h { color: var(--yellow); }
.callout.good { background: var(--green-bg); border-left-color: var(--green); } .callout.good .callout-h { color: var(--green); }
.callout.bad { background: var(--red-bg); border-left-color: var(--red); } .callout.bad .callout-h { color: var(--red); }
.callout.info .callout-h, .callout.tip .callout-h { color: var(--violet-ink); }
.callout code, .bubble code { font-size: .92em; background: rgba(143,124,245,.12); padding: 1px 5px; border-radius: 5px; }
.chart { margin: 8px 0 10px; }
.chart figcaption { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.chart svg { display: block; width: 100%; height: auto; max-height: 260px; }
.chart .ch-axis { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.chart .ch-grid { stroke: var(--grid); stroke-width: 1; stroke-dasharray: 3 4; }
.chart text { fill: var(--muted); font: 600 12px var(--font); }
.chart .ch-v { fill: var(--ink); font-size: 11.5px; }
.chart .ch-s0 { fill: var(--ch1); } .chart .ch-s1 { fill: var(--ch2); } .chart .ch-s2 { fill: var(--ch3); }
.chart .ch-l0 { stroke: var(--ch1); } .chart .ch-l1 { stroke: var(--ch2); } .chart .ch-l2 { stroke: var(--ch3); }
.chart path { stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.ch-legend i.ch-s0 { background: var(--ch1); } .ch-legend i.ch-s1 { background: var(--ch2); } .ch-legend i.ch-s2 { background: var(--ch3); }
pre.code { margin: 8px 0; padding: 10px 12px; background: var(--quote); border-radius: 10px; overflow-x: auto; font-size: 13px; white-space: pre; }
@media (max-width: 760px) {
  .turn.assistant:has(.tbl-wrap, .stats, .chart, .callout) { width: 100%; max-width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-v { font-size: 19px; }
  .tbl { font-size: 13.5px; }
  .tbl td:first-child { min-width: 6.5em; }
  .chart text { font-size: 21px; } .chart .ch-v { font-size: 20px; }
  .chart path { stroke-width: 4; }
}

/* =====================================================================================================
   1 Dec skin (Giannis: "like Claude: minimal, purple but faded"). Calm near-white, hairlines instead of shadows,
   one soft violet accent, the assistant's answers as plain serif text, a Claude-style composer.
   ===================================================================================================== */
:root {
  --bg: #fbfafc; --bg2: #f4f1f8; --panel: #ffffff; --ink: #29232f; --muted: #7b7388; --line: #ece8f1;
  --violet: #8a6ff0; --violet2: #a891f6; --violet-ink: #6b52d6; --title: #6b52d6; --quote: #f6f3fb;
  --brand1: #a891f6; --brand2: #8a6ff0; --accent: #29232f; --accent-ink: #fff;
  --soft: rgba(138,111,240,.08); --soft2: rgba(138,111,240,.14);
  --radius: 14px; --shadow: 0 1px 2px rgba(41,35,47,.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1820; --bg2: #221e29; --panel: #26222d; --ink: #ece8f2; --muted: #9d95aa; --line: #34303c;
    --violet: #a48ff7; --violet2: #b9a8fa; --violet-ink: #c2b4ff; --title: #c2b4ff; --quote: #2b2633;
    --soft: rgba(164,143,247,.10); --soft2: rgba(164,143,247,.18); --shadow: none;
  }
}
body { font-size: 15px; background: var(--bg);
  background-image: radial-gradient(1100px 420px at 50% -180px, rgba(138,111,240,.10), transparent 70%); }
h1, h2 { font-weight: 650; letter-spacing: -.015em; }
h2 { font-size: 22px; }

/* sidebar: flat, quiet */
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 16px 10px; }
@media (prefers-color-scheme: dark) { .side { background: #1f1c25; } }
.brand { font-weight: 650; font-size: 16px; padding: 0 8px 16px; }
.nav { border-radius: 10px; padding: 8px 10px; font-weight: 500; color: var(--muted); }
.nav:hover { background: var(--soft); color: var(--ink); }
.nav.active { background: var(--soft2); color: var(--ink); box-shadow: none; }
.badge { background: var(--soft2); color: var(--violet-ink); font-weight: 600; }
.card { box-shadow: none; border-radius: var(--radius); }
.btn { border-radius: 10px; font-weight: 550; box-shadow: none; }
.btn.primary { background: var(--violet); background-image: none; border-color: transparent; color: #fff; box-shadow: none; }
.btn.primary:hover { background: var(--violet-ink); }
.tab.active, .seg button.active { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tabs, .seg { background: var(--bg2); }

/* chat: a centred reading column like Claude */
.chat-view { max-width: 820px; }
.chat { gap: 18px; padding: 8px 2px 18px; }
.turn { display: flex; flex-direction: column; }
.turn.user { align-items: flex-end; }
.bubble { max-width: 100%; }
.bubble.user { background: var(--bg2); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 10px 16px;
  max-width: 78%; background-image: none; }
@media (prefers-color-scheme: dark) { .bubble.user { background: #2e2936; } }
.bubble.user .who { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.bubble.user a { color: var(--violet-ink); }
.bubble.assistant { background: none; border: 0; box-shadow: none; padding: 2px 0; font-family: var(--serif);
  font-size: 16.5px; line-height: 1.62; max-width: 100%; }
.bubble.assistant b, .bubble.assistant strong { font-weight: 650; }
.bubble.assistant h3, .bubble.assistant h4 { font-family: var(--font); }
.turn-tools { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; margin-top: 2px; }
.turn:hover .turn-tools, .turn:focus-within .turn-tools { opacity: 1; }
@media (hover: none) { .turn-tools { opacity: .7; } }
.copy-btn, .del-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted);
  font: inherit; font-size: 12.5px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.copy-btn:hover, .del-btn:hover { background: var(--soft); color: var(--ink); }
.del-btn:hover { color: var(--red); }
.copy-btn .ico, .del-btn .ico { width: 14px; height: 14px; }
.turn.leaving { opacity: 0; transform: translateY(-4px); transition: all .2s; }
.msg-atts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-bottom: 6px; max-width: 78%; }
.att-img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.att-file { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel); font-size: 13px; }
.att-file small, .chip small { display: block; color: var(--muted); font-size: 11px; }
.att-file .ico { width: 20px; height: 20px; color: var(--violet-ink); }

/* thinking: the real steps + a progress bar */
.thinking-card { align-self: flex-start; width: min(460px, 100%); border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); padding: 12px 14px; }
.th-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.th-head .tx { flex: 1; color: var(--ink); font-weight: 500; }
.th-time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.th-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); animation: thpulse 1.2s ease-in-out infinite; }
@keyframes thpulse { 50% { opacity: .3; transform: scale(.7); } }
.th-bar { height: 3px; background: var(--soft2); border-radius: 3px; margin: 10px 0 4px; overflow: hidden; }
.th-bar span { display: block; height: 100%; width: 2%; background: linear-gradient(90deg, var(--violet2), var(--violet));
  border-radius: 3px; transition: width 1s ease; }
.th-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.th-steps:empty { display: none; }
.th-steps li { display: flex; align-items: center; gap: 8px; }
.th-steps li.now { color: var(--ink); }
.st-ico { width: 14px; height: 14px; display: inline-grid; place-items: center; }
.st-ico .ico { width: 13px; height: 13px; color: var(--violet); }
.spin { width: 12px; height: 12px; border: 2px solid var(--soft2); border-top-color: var(--violet); border-radius: 50%;
  display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .th-dot, .spin { animation: none; } }

/* composer: one rounded box, attachments on top, + on the left, mic and a small send on the right */
.composer { border: 1px solid var(--line); background: var(--panel); border-radius: 22px; padding: 10px 10px 8px 14px;
  box-shadow: 0 2px 10px rgba(41,35,47,.05); display: flex; flex-direction: column; gap: 6px; }
.composer:focus-within { border-color: var(--violet2); box-shadow: 0 0 0 3px var(--soft); }
.composer textarea { border: 0; outline: 0; background: none; resize: none; padding: 4px 2px; font: inherit; font-size: 15.5px;
  min-height: 26px; max-height: 260px; box-shadow: none; width: 100%; color: var(--ink); }
.composer textarea:focus { box-shadow: none; }
.composer-bar { display: flex; align-items: center; gap: 4px; }
.composer-bar .grow { flex: 1; }
.cbtn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: inline-grid;
  place-items: center; cursor: pointer; padding: 0; }
.cbtn:hover { background: var(--soft); color: var(--ink); }
.cbtn .ico { width: 19px; height: 19px; }
.cbtn.mic.rec { background: #e5484d; color: #fff; animation: micpulse 1.2s ease-in-out infinite; }
.cbtn.mic.busy { cursor: default; }
.rec-time { font-size: 13px; color: #e5484d; font-variant-numeric: tabular-nums; padding: 0 4px; }
.send-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--violet); color: #fff; display: inline-grid;
  place-items: center; cursor: pointer; padding: 0; margin-left: 2px; }
.send-btn:hover { background: var(--violet-ink); }
.send-btn .ico { width: 17px; height: 17px; stroke-width: 2.2; }
.send-btn.stop { background: var(--ink); }
.send-btn:disabled { opacity: .5; }
.composer .chips { order: 0; gap: 8px; }
.chip { padding: 0; background: none; border-radius: 12px; position: relative; }
.chip.img img { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; display: block; }
.chip.doc { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 8px 30px 8px 10px;
  background: var(--bg2); font-size: 13px; max-width: 220px; }
.chip.doc > .ico { width: 20px; height: 20px; color: var(--violet-ink); flex: none; }
.chip-name { overflow: hidden; } .chip-name b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.chip button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink);
  color: var(--panel); display: grid; place-items: center; padding: 0; border: 2px solid var(--panel); }
.chip button .ico { width: 11px; height: 11px; stroke-width: 2.5; }

/* today strip: quieter */
.tstrip { box-shadow: none; border-radius: 14px; background: var(--panel); }
.tsc { background: var(--bg); border-radius: 10px; }

/* settings like Claude: a section list on the left, rows with hairlines on the right */
.set-layout { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.set-nav { position: sticky; top: 20px; display: grid; gap: 2px; }
.set-nav button { font: inherit; text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  color: var(--ink); display: flex; align-items: center; gap: 10px; }
.set-nav button .ico { width: 17px; height: 17px; color: var(--muted); }
.set-nav button:hover { background: var(--soft); }
.set-nav button.active { background: var(--soft2); font-weight: 550; }
.set-layout .set-section { display: none; }
.set-layout .set-section.on { display: block; }
.set-layout .set-h { font-size: 18px; font-weight: 600; margin: 4px 0 14px; }
.set-layout .set-h .ico { display: none; }
.set-layout .set-section > .card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 0; background: none; }
@media (max-width: 760px) { .set-layout { grid-template-columns: 1fr; } .set-nav { position: static; display: flex; overflow-x: auto; } }

/* Settings → Agents & bots */
.board { display: grid; border-top: 1px solid var(--line); }
.board-h { margin: 22px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.board-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.board-main { display: flex; gap: 12px; align-items: flex-start; }
.board-side { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tool-list { max-width: 360px; margin-top: 6px; }
.bot-card { display: grid; gap: 8px; margin-top: 10px; }
.bot-card textarea { width: 100%; }
.set-label { font-size: 13px; font-weight: 550; margin-top: 4px; }
.av-bot { background: linear-gradient(135deg, #a891f6, #8a6ff0); }
.btn.small { font-size: 13px; padding: 5px 10px; }
/* skin fixes: calm active item in the sidebar; the user bubble sizes to its text (the turn caps the width) */
.side .nav.active, .side .nav.agent-link.active { background: var(--soft2); color: var(--ink); box-shadow: none; }
.side .nav.active .nav-role, .side .nav.active .nav-l .ico { color: var(--muted); opacity: 1; }
.side .nav.active .badge { background: var(--panel); color: var(--violet-ink); }
.side .nav.active .av, .nav.active .av { box-shadow: none; }
.nav.agent-link.unread { background: var(--soft2); color: var(--ink); font-weight: 650; animation: none; }
.nav.agent-link.unread .badge { background: var(--violet); color: #fff; }
.turn { max-width: 82%; }
.turn.assistant { max-width: 100%; width: 100%; }
.bubble.user { max-width: 100%; }
.msg-atts { max-width: 100%; }
.logo-img { width: 30px; height: 30px; border-radius: 8px; display: block; flex: none; }
.logo-img.big { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto; }

.qr svg { width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 6px; margin: 8px 0; }
.sec-steps { margin: 10px 0 4px; padding-left: 18px; }
.get-app { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none;
  font-size: 13.5px; font-weight: 500; border: 1px solid var(--line); background: var(--panel); margin-bottom: 6px; }
.get-app:hover { color: var(--ink); background: var(--soft); }
.get-app .ico { width: 16px; height: 16px; }

/* 1 Dec: a fixed app frame like Claude: the window never scrolls; only the chat (or a page's own content) does,
   whatever the window size. */
@media (min-width: 761px) {
  html, body { height: 100%; overflow: hidden; }
  .shell { height: 100vh; height: 100dvh; min-height: 0; }
  .side { height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  main { height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  .chat-view:not(.hidden) { height: 100%; overflow: hidden; padding-top: 18px; padding-bottom: 16px; }
  .chat-view .bar { margin-bottom: 10px; flex: none; }
  .chat-view .tstrip, .chat-view .composer { flex: none; }
  .chat { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
}
/* inside the Mac app: room for the window buttons above the sidebar */
body.in-mac .side { padding-top: 38px; }
body.in-mac .chat-view:not(.hidden) { padding-top: 30px; }

/* 1 Dec: edit mode + pasted text cards + a taller box (like Claude) */
.composer textarea { max-height: 40vh; }
.edit-bar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--violet-ink); padding: 2px 2px 4px; }
.edit-bar .ico { width: 14px; height: 14px; }
.edit-bar .link { margin-left: auto; }
.turn.editing .bubble.user { outline: 2px solid var(--violet2); }
.edit-btn { display: inline-flex; align-items: center; border: 0; background: none; color: var(--muted); padding: 4px 6px;
  border-radius: 8px; cursor: pointer; }
.edit-btn:hover { background: var(--soft); color: var(--ink); }
.edit-btn .ico { width: 14px; height: 14px; }
.chip.pasted { width: 150px; height: 64px; align-items: flex-start; padding: 8px 26px 8px 10px; }
.chip.pasted b { white-space: normal; font-weight: 400; font-size: 11px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); }
.chip.pasted small { font-weight: 700; color: var(--ink); letter-spacing: .04em; }
/* 1 Dec: unread chats look like any other row (just the number bubble); only the chat you're in is highlighted */
.nav.agent-link.unread { background: none; color: var(--ink); font-weight: 600; box-shadow: none; }
.nav.agent-link.unread:hover { background: var(--soft); }
.nav.agent-link.unread.active { background: var(--soft2); }

/* copy button on draft boxes */
.msgbox-to { display: flex; align-items: center; gap: 8px; }
.msgbox-to .box-copy { margin-left: auto; }
.box-copy { font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted);
  border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 3px 8px; display: inline-flex; align-items: center;
  gap: 4px; cursor: pointer; }
.box-copy:hover { color: var(--ink); background: var(--soft); }
.box-copy.done { color: var(--green); }
.box-copy .ico { width: 13px; height: 13px; }
blockquote.has-copy { position: relative; padding-right: 76px; }
blockquote.has-copy .box-copy { position: absolute; top: 6px; right: 6px; }

/* 1 Dec: "AuraClaw night" = the dark theme, taken from the intro: violet-black, a still aurora glow behind everything,
   glassy panels, white→lilac accents. Calmer than the intro (no motion, no grain) so it reads well all day. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0714; --bg2: #120c1f; --panel: #161026; --ink: #f1ecfb; --muted: #a59bbd; --line: rgba(255,255,255,.085);
    --violet: #9b7bff; --violet2: #c3b0ff; --violet-ink: #cdbdff; --title: #d7caff; --quote: rgba(255,255,255,.04);
    --soft: rgba(185,161,255,.09); --soft2: rgba(185,161,255,.16); --accent: #f1ecfb; --accent-ink: #120a20;
  }
  html, body { background-color: #0b0714; }
  body { background-image:
      radial-gradient(900px 620px at 12% 8%, rgba(124,82,255,.20), transparent 62%),
      radial-gradient(800px 560px at 96% 100%, rgba(196,120,255,.14), transparent 60%),
      radial-gradient(600px 420px at 55% 55%, rgba(90,120,255,.07), transparent 60%);
    background-attachment: fixed; }
  .side { background: rgba(10,6,20,.55); border-right-color: rgba(255,255,255,.06);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .side .nav.active, .side .nav.agent-link.active, .nav.active { background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
    color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 0 22px rgba(160,120,255,.18); }
  .nav.agent-link.unread.active { background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05)); }
  .badge, .nav.agent-link.unread .badge { background: linear-gradient(135deg, #efe8ff, #b9a1ff); color: #1a1030; }
  .card, .tcard, .hub-card, .login-box, .msgbox { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
    border-color: rgba(255,255,255,.09); }
  .composer { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.10);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .composer:focus-within { border-color: rgba(195,176,255,.45); box-shadow: 0 0 0 3px rgba(160,120,255,.14), 0 0 40px rgba(160,120,255,.12); }
  .bubble.user { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.08); }
  .btn.primary, .btn.good { background: linear-gradient(180deg, #ffffff, #e2d6ff); color: #140a24; border-color: transparent;
    box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 6px 24px rgba(160,120,255,.35); }
  .btn.primary:hover, .btn.good:hover { background: linear-gradient(180deg, #ffffff, #d4c3ff); }
  input, select, textarea { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.10); }
  .tab.active, .seg button.active, .theme-seg button.on { background: rgba(255,255,255,.10); color: #fff; box-shadow: none; }
  .tabs, .seg, .theme-seg { background: rgba(255,255,255,.04); }
  .send-btn { background: linear-gradient(180deg, #ffffff, #d9cbff); color: #140a24; box-shadow: 0 0 16px rgba(160,120,255,.35); }
  .send-btn:hover { background: linear-gradient(180deg, #ffffff, #c9b6ff); }
  ::selection { background: rgba(160,120,255,.40); }
}

/* 1 Dec: "Get AuraClaw for Mac" after setting up on the web */
.getapp { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px;
  background: rgba(8,5,16,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.getapp-box { width: 100%; max-width: 400px; text-align: center; display: grid; gap: 14px; justify-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 32px 26px; }
.getapp-box img { width: 72px; height: 72px; border-radius: 18px; }
.getapp-box h2 { font-size: 22px; }
.getapp-box p { margin: 0; }
#have-invite { margin-top: -4px; }

/* 1 Dec: queued messages (sent while the agent is still answering) */
.turn.queued .bubble.user { opacity: .55; border-style: dashed; }
.queued-tag { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; align-items: center; }

/* 2 Dec: live dictation draft */
.composer textarea.dictating { color: var(--muted); }

.voice-lines .me.live { font-style: italic; opacity: .7; border-style: dashed; }
