/* Exodus Hub — design tokens */
:root {
  --brand: #0b7285;
  --brand-2: #1098ad;
  --brand-ink: #063f4a;
  --brand-soft: #e3f4f6;
  --bg: #f3f6f7;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --line: #e1e7ea;
  --ink: #17262d;
  --ink-2: #4b5d66;
  --ink-3: #7c8c94;
  --ok: #2b8a3e;
  --ok-soft: #e6f4ea;
  --warn: #e67700;
  --warn-soft: #fff4e0;
  --bad: #d9480f;
  --bad-soft: #fdecea;
  --violet: #5f3dc4;
  --on-brand: #ffffff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 42, 51, .06), 0 4px 14px rgba(16, 42, 51, .05);
  --shadow-lg: 0 10px 40px rgba(16, 42, 51, .18);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #3bc9db; --brand-2: #66d9e8; --brand-ink: #c5f6fa; --brand-soft: #0f2f36;
    --bg: #0d1417; --surface: #141d21; --surface-2: #19242a; --line: #26343b;
    --ink: #e6eef1; --ink-2: #a9bac2; --ink-3: #7b8f98;
    --ok: #51cf66; --ok-soft: #13291a; --warn: #ffa94d; --warn-soft: #2e2112; --bad: #ff8a65; --bad-soft: #321a14;
    --violet: #9775fa; --on-brand: #062a31;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #3bc9db; --brand-2: #66d9e8; --brand-ink: #c5f6fa; --brand-soft: #0f2f36;
  --bg: #0d1417; --surface: #141d21; --surface-2: #19242a; --line: #26343b;
  --ink: #e6eef1; --ink-2: #a9bac2; --ink-3: #7b8f98;
  --ok: #51cf66; --ok-soft: #13291a; --warn: #ffa94d; --warn-soft: #2e2112; --bad: #ff8a65; --bad-soft: #321a14;
  --violet: #9775fa; --on-brand: #062a31;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px rgba(0,0,0,.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; flex: none; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0 0 .6em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; height: 100dvh; }
.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(150deg, var(--brand-2), var(--brand)); display: grid; place-items: center; color: #fff; flex: none; }
.brand-name { font-weight: 800; letter-spacing: -.02em; font-size: 16px; line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--ink-3); }
.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 560; text-decoration: none; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { background: var(--brand-soft); color: var(--brand-ink); }
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; padding: 14px 12px 4px; }
.nav-secondary a { padding: 7px 12px; font-size: 14px; }
.nav-secondary a svg { width: 18px; height: 18px; }
.steps { padding-left: 1.2em; line-height: 1.7; }
.steps li { margin-bottom: 6px; }
.privacy-tag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.privacy-tag.private { background: #fff4e0; color: #9a5b00; }
.privacy-tag.shared { background: var(--brand-soft); color: var(--brand-ink); }
.chat-list a.mine { font-weight: 700; color: var(--ink); }
.upload-drop { border: 2px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--ink-3); cursor: pointer; }
.upload-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.side-foot { border-top: 1px solid var(--line); padding: 10px; display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--surface); min-height: 62px; }
.topbar h1 { font-size: 19px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page { flex: 1; overflow-y: auto; padding: 24px 28px 40px; }
.page.flush { padding: 0; overflow: hidden; display: flex; }
.wrap { max-width: 1120px; margin: 0 auto; }

.bottomnav { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 12px 16px; min-height: 56px; }
  .page { padding: 16px 16px 96px; }
  .page.flush { padding-bottom: 0; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 4px 0; position: relative; text-decoration: none; font-weight: 600; }
  .bottomnav a.on { color: var(--brand); }
  .bottomnav svg { width: 22px; height: 22px; }
  .bottomnav .badge { position: absolute; top: 0; left: calc(50% + 6px); }
  .main { height: 100dvh; }
}

/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 9px 15px; border-radius: 10px; font-weight: 620; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 40px; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.iconbtn { border: 0; background: transparent; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); position: relative; }
.iconbtn:hover { background: var(--surface-2); }
.iconbtn svg { width: 21px; height: 21px; }
.iconbtn .badge { position: absolute; top: 3px; right: 2px; }

.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 750; background: var(--bad); color: #fff; }
.badge.soft { background: var(--brand-soft); color: var(--brand-ink); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.brand { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--ink-3); flex: none; }
.dot.up { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.down { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.dot.working { background: var(--warn); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { flex: 1; }
.card-body { padding: 14px 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: 1fr 1fr; } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap-ok { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { flex: 1; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; min-height: 42px; }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.hint { font-size: 12.5px; color: var(--ink-3); }
.error-text { color: var(--bad); font-size: 13.5px; font-weight: 600; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list > li.clickable { cursor: pointer; }
.list > li.clickable:hover { background: var(--surface-2); }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 620; overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 26px 18px; text-align: center; color: var(--ink-3); }
.empty svg { width: 34px; height: 34px; opacity: .5; display: block; margin: 0 auto 8px; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 13px; flex: none; }
.avatar.agent { border-radius: 10px; }
.avatar svg { width: 19px; height: 19px; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.sm svg { width: 15px; height: 15px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; border-radius: 14px; }
.avatar.lg svg { width: 28px; height: 28px; }

/* ---------- today ---------- */
.hello { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hello h1 { font-size: 28px; }
.hello p { color: var(--ink-2); margin: 4px 0 0; font-size: 16px; }
.ask { display: flex; gap: 10px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 20px; }
.ask textarea { flex: 1; border: 0; background: transparent; resize: none; padding: 9px 10px; min-height: 46px; max-height: 200px; outline: none; font-size: 16px; }
.ask .btn { align-self: flex-end; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: -8px 0 22px; }
@media (max-width: 640px) { .chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; } .chip { white-space: nowrap; } }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 99px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--brand-2); color: var(--brand); }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
a.stat:hover { text-decoration: none; border-color: var(--brand-2); }
.stat .label { font-size: 13px; color: var(--ink-3); font-weight: 650; display: flex; align-items: center; gap: 8px; }
.stat .label svg { width: 17px; height: 17px; }
.stat .value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .note { font-size: 13px; color: var(--ink-2); }
.stat.alert { border-color: var(--bad); }
.stat.alert .value { color: var(--bad); }
.feed li { align-items: flex-start; }
.feed .when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.working-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.working-strip .pill { padding: 5px 11px; }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-columns: 260px 1fr; flex: 1; min-height: 0; width: 100%; }
.chat-list { border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding: 12px 8px; }
.chat-list h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 12px 10px 6px; display: flex; align-items: center; }
.chat-list h4 button { margin-left: auto; }
.chat-list a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 550; }
.chat-list a:hover { background: var(--surface-2); }
.chat-list a.on { background: var(--brand-soft); color: var(--brand-ink); }
.chat-list a.unread { color: var(--ink); font-weight: 750; }
.chat-list a .hash { width: 18px; text-align: center; color: var(--ink-3); font-weight: 700; }
.chat-list a .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.convo-head { padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 12px; min-height: 60px; }
.convo-head .t { font-weight: 750; font-size: 16px; }
.convo-head .s { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgs { flex: 1; overflow-y: auto; padding: 18px 22px 8px; }
.msg { display: flex; gap: 12px; padding: 6px 0; }
.msg + .msg.cont { padding-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg .bubble { min-width: 0; flex: 1; }
.msg .who { font-weight: 720; font-size: 14px; display: flex; align-items: baseline; gap: 8px; }
.msg .who .tag { font-size: 10.5px; font-weight: 750; color: var(--brand-ink); background: var(--brand-soft); padding: 1px 6px; border-radius: 5px; letter-spacing: .03em; }
.msg .who time { font-weight: 500; font-size: 12px; color: var(--ink-3); }
.msg.cont .who { display: none; }
.md { overflow-wrap: anywhere; }
.md p { margin: 0 0 .45em; }
.md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: .25em 0 .5em; padding-left: 1.3em; }
.md code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
.md h1, .md h2, .md h3, .md h4 { margin: .8em 0 .35em; font-size: 16px; }
.md h1 { font-size: 20px; }
.md table { border-collapse: collapse; margin: .5em 0; font-size: 14px; }
.md td, .md th { border: 1px solid var(--line); padding: 5px 10px; text-align: left; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.md em { color: var(--ink-2); }
.mention { color: var(--brand); font-weight: 650; background: var(--brand-soft); border-radius: 5px; padding: 0 3px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.act { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-weight: 600; }
.act:hover { text-decoration: none; border-color: var(--brand-2); }
.act.fail { color: var(--bad); }
.act svg { width: 14px; height: 14px; }
.daysep { text-align: center; margin: 14px 0 8px; font-size: 12px; color: var(--ink-3); font-weight: 650; display: flex; align-items: center; gap: 12px; }
.daysep::before, .daysep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.typing { font-size: 13px; color: var(--ink-3); padding: 0 22px 6px; min-height: 22px; }
.composer { padding: 10px 22px 18px; position: relative; }
.composer-box { display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.composer-box:focus-within { border-color: var(--brand-2); }
.composer textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; min-height: 40px; max-height: 220px; padding: 8px; font-size: 15px; }
.mention-pop { position: absolute; bottom: calc(100% - 4px); left: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 260px; max-width: 340px; overflow: hidden; z-index: 20; }
.mention-pop div { display: flex; gap: 10px; align-items: center; padding: 8px 12px; cursor: pointer; }
.mention-pop div.on, .mention-pop div:hover { background: var(--brand-soft); }
.mention-pop .sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-btn { display: none; }
@media (max-width: 860px) {
  .chat { grid-template-columns: 1fr; }
  .chat.has-convo .chat-list { display: none; }
  .chat:not(.has-convo) .convo { display: none; }
  .back-btn { display: grid; }
  .msgs { padding: 14px 14px 6px; }
  .composer { padding: 8px 10px calc(76px + env(safe-area-inset-bottom)); }
  .convo-head { padding: 10px 12px; }
  .typing { padding: 0 14px 4px; }
}

/* ---------- tasks ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 120px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 750; font-size: 14px; }
.col-head .n { color: var(--ink-3); font-weight: 650; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow); }
.tcard:hover { border-color: var(--brand-2); }
.tcard .tt { font-weight: 620; font-size: 14px; margin-bottom: 7px; overflow-wrap: anywhere; }
.tcard .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.tcard.urgent { border-left: 4px solid var(--bad); }
.tcard.high { border-left: 4px solid var(--warn); }
.due.late { color: var(--bad); font-weight: 700; }
.tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; cursor: pointer; font-weight: 620; color: var(--ink-2); font-size: 14px; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 860px) { .board { grid-template-columns: 1fr; } }

/* ---------- drawer & modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8, 24, 30, .42); z-index: 50; display: flex; justify-content: flex-end; animation: fade .15s; }
.scrim.center { justify-content: center; align-items: center; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: min(560px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } }
.modal { width: min(540px, 100%); max-height: 92vh; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop .16s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: .5; } }
.dhead { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dhead h2 { flex: 1; }
.dbody { flex: 1; overflow-y: auto; padding: 18px 20px; }
.dfoot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; align-items: center; margin-bottom: 18px; font-size: 14px; }
.kv > span:nth-child(odd) { color: var(--ink-3); font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 14px 16px; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand-2); }
.timeline .when { font-size: 12px; color: var(--ink-3); }
.result-box { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.result-box h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); margin-bottom: 6px; }

/* ---------- approvals ---------- */
.ap { margin-bottom: 16px; }
.ap .preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0 2px; }
.ap .preview .hdr { font-size: 13px; color: var(--ink-2); border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 10px; }
.ap .acts-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 18px 16px; }

/* ---------- agents ---------- */
.agent-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-decoration: none; color: inherit; }
.agent-card:hover { border-color: var(--brand-2); text-decoration: none; }
.agent-card .job { font-size: 13.5px; color: var(--ink-2); flex: 1; }
.desk-hero { display: flex; gap: 16px; align-items: center; padding: 20px; flex-wrap: wrap; }
.desk-hero .info { flex: 1; min-width: 220px; }
.screen { background: #0e1a1f; color: #c9f2f7; font-family: var(--mono); font-size: 12.5px; border-radius: 12px; padding: 14px 16px; min-height: 120px; max-height: 360px; overflow-y: auto; line-height: 1.55; }
.screen .ln { white-space: pre-wrap; overflow-wrap: anywhere; }
.screen .ts { color: #5e8b94; }
.screen .k-error { color: #ff8a65; }
.screen .k-proactive { color: #ffd43b; }
.screen .k-task { color: #8ce99a; }

/* ---------- website ---------- */
.spark { display: flex; gap: 2px; align-items: flex-end; height: 34px; }
.spark i { flex: 1; background: var(--ok); border-radius: 2px; min-width: 3px; opacity: .8; }
.spark i.bad { background: var(--bad); opacity: 1; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(1000px 500px at 10% 0%, #15aabf55, transparent), linear-gradient(160deg, #0b7285, #063f4a); color: #e3fafc; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h1 { font-size: 40px; line-height: 1.1; max-width: 460px; color: #fff; }
.auth-art p { font-size: 17px; max-width: 440px; opacity: .9; }
.auth-art ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.auth-art li { display: flex; gap: 10px; align-items: center; font-size: 15.5px; }
.auth-art li svg { width: 20px; height: 20px; flex: none; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.auth-form form { width: min(380px, 100%); }
.auth-form h2 { font-size: 24px; margin-bottom: 6px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { padding: 28px 22px; } .auth-art h1 { font-size: 28px; } .auth-art ul { display: none; } }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 18px; top: 74px; z-index: 80; pointer-events: none; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { pointer-events: auto; background: var(--ink); color: var(--surface); padding: 11px 15px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 360px; cursor: pointer; animation: pop .2s; }
.toast.bad { background: var(--bad); color: #fff; }
@media (max-width: 860px) { .toasts { left: 12px; right: 12px; top: auto; bottom: 84px; align-items: stretch; } .toast { max-width: none; } }

.notif-pop { position: absolute; top: 56px; right: 18px; width: min(380px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 40; max-height: 70vh; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 18px; border-bottom: 1px solid var(--line); font-weight: 700; }
.table td { padding: 10px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.file-view img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.callout { border-radius: 12px; padding: 12px 14px; background: var(--warn-soft); color: var(--ink); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.callout.info { background: var(--brand-soft); }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--warn); }
.callout.info svg { color: var(--brand); }
.code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- v2: projects, docs, editors, inbox, team, search ---------- */
.project-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.project-card:hover { border-color: var(--brand-2); text-decoration: none; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--brand)); border-radius: 99px; transition: width .3s; }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-ic { color: #fff; }
.doc-ic.k-doc { background: #1971c2; }
.doc-ic.k-sheet { background: #2b8a3e; }
.doc-ic.k-deck { background: #e8590c; }
.doc-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; min-width: 0; }
.doc-card:hover { border-color: var(--brand-2); text-decoration: none; }
.new-doc { display: flex; gap: 14px; align-items: center; padding: 16px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.new-doc:hover { border-color: var(--brand-2); }
.kind-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kind-pick label { border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; text-align: center; }
.kind-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kind-pick svg { width: 26px; height: 26px; color: var(--brand); }

.editor { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; background: var(--bg); }
.editor-bar { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.title-input { border: 1px solid transparent !important; background: transparent !important; font-size: 18px; font-weight: 750; min-width: 0; flex: 1; }
.title-input:hover, .title-input:focus { border-color: var(--line) !important; background: var(--surface) !important; }
.editor-actions { gap: 6px; }
.presence { display: flex; align-items: center; gap: 4px; }
.presence .avatar { border: 2px solid var(--surface); margin-left: -6px; }
.editor-area { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.editor-foot { display: flex; justify-content: space-between; gap: 10px; padding: 6px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.doc-modes { padding: 10px 18px 0; }
.small-tabs button { font-size: 13px; padding: 4px 10px; }
.doc-wrap { flex: 1; display: grid; grid-template-columns: 1fr; gap: 16px; padding: 12px 18px 18px; min-height: 0; }
.doc-wrap[data-mode="split"] { grid-template-columns: 1fr 1fr; }
.doc-wrap[data-mode="preview"] .doc-text, .doc-wrap[data-mode="write"] .doc-preview { display: none; }
.doc-text { width: 100%; min-height: 60vh; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; background: var(--surface); font: 15px/1.7 var(--mono); color: var(--ink); box-shadow: var(--shadow); }
.doc-text:focus { outline: none; border-color: var(--brand-2); }
.doc-preview { border: 1px solid var(--line); border-radius: 14px; padding: 22px 30px; background: var(--surface); box-shadow: var(--shadow); overflow: auto; font-size: 15.5px; line-height: 1.65; }
.doc-preview h1 { font-size: 24px; color: var(--brand-ink); }
.sheet-bar { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cell-ref { font: 600 13px var(--mono); min-width: 52px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 6px; }
.formula-bar { flex: 1; min-width: 180px; font-family: var(--mono); font-size: 14px; }
.sheet-scroll { overflow: auto; flex: 1; padding: 0; background: var(--surface); }
.sheet { border-collapse: separate; border-spacing: 0; font-size: 14px; user-select: none; }
.sheet th { position: sticky; top: 0; background: var(--surface-2); color: var(--ink-3); font-weight: 650; font-size: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 8px; z-index: 1; }
.sheet tbody th { position: sticky; left: 0; text-align: right; min-width: 42px; z-index: 1; }
.sheet .corner { left: 0; z-index: 2; }
.sheet td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 110px; max-width: 280px; height: 30px; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: cell; }
.sheet td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet td.fx { color: var(--brand-ink); }
.sheet td.err { color: var(--bad); font-weight: 650; }
.sheet td.sel { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--brand-soft); }
.sheet td:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
.sheet tbody tr:first-child td { font-weight: 700; background: var(--brand-soft); }
.sheet-help { padding: 8px 18px; }
.deck { display: grid; grid-template-columns: 200px 1fr; flex: 1; min-height: 0; }
.slide-list { border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.slide-thumb { border: 2px solid transparent; border-radius: 10px; padding: 0; background: none; cursor: pointer; position: relative; }
.slide-thumb.on { border-color: var(--brand); }
.slide-thumb .n { position: absolute; top: 4px; left: 6px; font-size: 11px; color: var(--ink-3); z-index: 1; }
.slide-thumb .slide { font-size: 4.2px; pointer-events: none; }
.deck-main { overflow-y: auto; padding: 18px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 18px; align-content: start; }
.slide { aspect-ratio: 16 / 9; background: #fff; color: #1f2933; border-radius: 8px; box-shadow: var(--shadow); position: relative; overflow: hidden; padding: 6% 7%; font-size: 10px; }
.slide.big { font-size: clamp(8px, 1.15vw, 15px); border: 1px solid var(--line); }
.slide .s-bar { position: absolute; top: 0; left: 0; right: 0; height: 1.5%; background: #0b7285; }
.slide .s-title { font-size: 2.6em; font-weight: 800; color: #0b4f5c; margin-bottom: .6em; line-height: 1.15; }
.slide ul { margin: 0; padding-left: 1.3em; font-size: 1.6em; line-height: 1.45; }
.slide.title-slide { background: #0b4f5c; color: #fff; display: flex; flex-direction: column; justify-content: center; }
.slide.title-slide .s-title { color: #fff; font-size: 3.4em; }
.slide.title-slide .s-sub { color: #c5f6fa; font-size: 1.6em; border-top: .2em solid #3bc9db; padding-top: .6em; width: fit-content; }
.comment { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.comment .tag { font-size: 10px; font-weight: 750; color: var(--brand-ink); }
.suggest-strip { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.suggest { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-color: var(--brand-2); background: var(--brand-soft); }
.suggest svg { color: var(--brand); }
.embeds { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.embed { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px; max-width: 420px; color: inherit; text-decoration: none; }
.embed img, .embed-ph { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.load { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 6px; overflow: hidden; max-width: 260px; }
.load i { display: block; height: 100%; background: var(--brand-2); }
.team-nums { display: flex; gap: 12px; font-size: 11px; color: var(--ink-3); text-align: center; }
.team-nums span { display: flex; flex-direction: column; min-width: 34px; }
.team-nums b { font-size: 17px; color: var(--ink); }
.team-nums .late b { color: var(--bad); }
.search-results { margin-top: 12px; max-height: 60vh; overflow-y: auto; }
.search-results li.sel { background: var(--brand-soft); }
.pool-card { cursor: default; }
.pool-card .tt { cursor: pointer; }
.radar li { align-items: flex-start; }
.onboard { margin-bottom: 18px; border-color: var(--brand-2); }
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.check svg { width: 14px; height: 14px; }
.canva-grid .card { overflow: hidden; }
.canva-grid img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-2); display: block; }
.radar .dot { margin-top: 7px; }
@media (max-width: 860px) {
  .doc-wrap[data-mode="split"] { grid-template-columns: 1fr; }
  .doc-wrap { padding: 10px; }
  .doc-text { padding: 14px; min-height: 50vh; }
  .editor-bar { padding: 8px 10px; }
  .editor-actions .small.muted { display: none; }
  .deck { grid-template-columns: 1fr; }
  .slide-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .slide-thumb { width: 110px; flex: none; }
  .deck-main { grid-template-columns: 1fr; padding: 12px; }
  .team-nums { gap: 6px; }
  .kind-pick { grid-template-columns: 1fr; }
  .editor-foot { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
