/* Zarah Flow — design tokens and components, from the Figma "Read me for developers" frame. */
@font-face { font-family: "DM Sans"; src: url(../fonts/dm-sans-latin-opsz-normal.woff2) format("woff2"); font-weight: 100 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; src: url(../fonts/dm-sans-latin-ext-opsz-normal.woff2) format("woff2"); font-weight: 100 1000; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #1c1b19; --muted: #6b6a65; --subtle: #9a9893; --border: #e6e5e1; --border-2: #d9d8d3;
  --soft: #fafaf8; --canvas: #f1f1ee; --panel: #f5f5f2; --white: #fff;
  --accent: #b85c38; --green: #2e7d4f; --amber: #a2650e; --red: #b83a32; --blue: #2f5fb8; --purple: #6b4fb8; --highlight: #e9bc2c;
  --bg-accent: #f8e9e2; --bg-green: #e6f2ea; --bg-amber: #fbf0dc; --bg-red: #fbe7e5; --bg-blue: #e7eefb; --bg-purple: #efeafb; --bg-neutral: #ecebe7; --tx-neutral: #57554f;
  --r-card: 14px; --r-btn: 9px; --shadow-btn: 0 1px 1px rgba(0,0,0,.05);
  --shadow-panel: 0 0 0 .7px rgba(0,0,0,.08), 0 0 14px rgba(0,0,0,.04), 0 16px 20px rgba(0,0,0,.01), 0 7px 14px rgba(0,0,0,.02), 0 2px 8px rgba(0,0,0,.03);
  --shadow-pop: 0 0 0 1px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  --side: 280px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14px/20px "DM Sans", system-ui, sans-serif; font-optical-sizing: auto; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
.ic { flex-shrink: 0; stroke-width: 1.75; }
.muted { color: var(--muted); } .subtle { color: var(--subtle); } .red { color: var(--red); } .green { color: var(--green); } .accent { color: var(--accent); }
.spacer { flex: 1; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; width: var(--side); flex-shrink: 0; display: flex; flex-direction: column; padding: 32px 20px 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 26px; font-weight: 600; font-size: 20px; letter-spacing: -.08px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav-label { padding: 18px 12px 8px; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .88px; color: var(--subtle); }
.nav-item { white-space: nowrap; display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 12px; border-radius: 9px; border: 1px solid transparent; color: #3b3a36; font-weight: 500; }
.nav-item .l { display: flex; align-items: center; gap: 10px; }
.nav-item .ic { color: var(--muted); }
.nav-item:hover { background: rgba(0,0,0,.035); }
.nav-item.on { background: #fff; border-color: var(--border); box-shadow: var(--shadow-btn); color: var(--ink); font-weight: 600; }
.nav-item.on .ic { color: var(--ink); }
.count { font-size: 11px; line-height: 16px; font-weight: 600; padding: 0 7px; border-radius: 999px; background: var(--bg-neutral); color: var(--tx-neutral); }
.count.dark { background: var(--ink); color: #fff; }
.count.addon { font-weight: 500; background: var(--bg-neutral); }
.nav-spacer { flex: 1; min-height: 24px; }
.account { display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; margin-top: 12px; border-top: 1px solid var(--border); text-align: left; width: 100%; }
.account .who { flex: 1; display: flex; flex-direction: column; } .account b { font-weight: 600; font-size: 14px; } .account small { color: var(--muted); font-size: 12px; line-height: 16px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 28px 0 32px; position: sticky; top: 0; z-index: 30; background: var(--canvas); }
.crumb { color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb a:hover { color: var(--ink); }
.search { position: relative; display: flex; align-items: center; gap: 8px; width: 420px; height: 38px; padding: 0 8px 0 12px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 13px; min-width: 0; }
.search input::placeholder { color: var(--subtle); }
.search .ic { color: var(--muted); }
kbd { font: 500 11px/16px "DM Sans"; padding: 2px 6px; border-radius: 6px; background: var(--canvas); color: var(--muted); }
.persona { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--bg-accent); color: var(--accent); font-size: 12px; font-weight: 500; white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 1px solid var(--border); position: relative; flex-shrink: 0; }
.icon-btn:hover { background: var(--soft); }
.bell .unread { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 1.5px solid #fff; }
.menu-btn { display: none; }
.panel { flex: 1; background: var(--panel); border-radius: 10px 0 0 0; box-shadow: var(--shadow-panel); padding: 28px 32px 48px; min-width: 0; }

/* ---------- type ---------- */
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-h h1 { font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -.2px; }
.page-h p { color: var(--muted); margin-top: 4px; }
.page-h .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.card-t { font-size: 16px; line-height: 22px; font-weight: 600; }
.card-s { font-size: 13px; line-height: 18px; color: var(--muted); }
.caps { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .88px; color: var(--subtle); text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--r-btn); background: #fff; border: 1px solid var(--border-2); box-shadow: var(--shadow-btn); font-weight: 500; white-space: nowrap; line-height: 20px; transition: background .12s, transform .06s; }
.btn:hover { background: var(--soft); } .btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; } .btn-dark:hover { background: #33312d; }
.btn-ghost { border-color: transparent; box-shadow: none; background: none; } .btn-ghost:hover { background: rgba(0,0,0,.04); }
.btn-sm { padding: 5px 12px; font-size: 13px; line-height: 18px; border-radius: 8px; }
.btn-xs { padding: 4px 10px; font-size: 13px; line-height: 18px; border-radius: 8px; }
.btn-danger { color: var(--red); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link { color: var(--accent); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-neutral); }
.seg a, .seg button { padding: 5px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg .on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- badges & avatars ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-neutral { background: var(--bg-neutral); color: var(--tx-neutral); } .badge-green { background: var(--bg-green); color: var(--green); }
.badge-amber { background: var(--bg-amber); color: var(--amber); } .badge-red { background: var(--bg-red); color: var(--red); }
.badge-blue { background: var(--bg-blue); color: var(--blue); } .badge-purple { background: var(--bg-purple); color: var(--purple); }
.badge-accent { background: var(--bg-accent); color: var(--accent); } .badge-dark { background: var(--ink); color: #fff; }
.av { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 600; flex-shrink: 0; letter-spacing: .2px; }
.av-xs { width: 20px; height: 20px; font-size: 8px; } .av-sm { width: 24px; height: 24px; font-size: 9px; } .av-md { width: 32px; height: 32px; font-size: 11px; } .av-lg { width: 46px; height: 46px; font-size: 16px; } .av-xl { width: 56px; height: 56px; font-size: 18px; }
.av.sq { border-radius: 12px; }
.av-neutral { background: var(--bg-neutral); color: var(--tx-neutral); } .av-blue { background: var(--bg-blue); color: var(--blue); } .av-red { background: var(--bg-red); color: var(--red); }
.av-amber { background: var(--bg-amber); color: var(--amber); } .av-green { background: var(--bg-green); color: var(--green); } .av-purple { background: var(--bg-purple); color: var(--purple); } .av-accent { background: var(--bg-accent); color: var(--accent); }
.av-stack { display: flex; } .av-stack .av { border: 2px solid var(--panel); margin-left: -6px; } .av-stack .av:first-child { margin-left: 0; }
.ib { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.ib-sm { width: 26px; height: 26px; }
.ib-neutral { background: var(--canvas); color: var(--muted); } .ib-accent { background: var(--bg-accent); color: var(--accent); } .ib-green { background: var(--bg-green); color: var(--green); }
.ib-amber { background: var(--bg-amber); color: var(--amber); } .ib-red { background: var(--bg-red); color: var(--red); } .ib-blue { background: var(--bg-blue); color: var(--blue); } .ib-purple { background: var(--bg-purple); color: var(--purple); }

/* ---------- cards ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); }
.card-pad { padding: 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 16px; }
.card-h .t { display: flex; flex-direction: column; gap: 4px; }
.card-h .t > div { display: flex; align-items: center; gap: 8px; }
.card-f { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.split-r { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.three { display: grid; grid-template-columns: 300px minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.stat { display: flex; flex-direction: column; gap: 10px; padding: 20px; transition: border-color .12s; }
a.stat:hover { border-color: var(--border-2); }
.stat .top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 500; }
.stat .num { font-size: 30px; line-height: 36px; font-weight: 600; }
.stat .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.kpi { padding: 14px 16px; } .kpi small { color: var(--muted); font-size: 12px; } .kpi .v { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; } .kpi .v b { font-size: 20px; line-height: 26px; font-weight: 600; } .kpi .v span { font-size: 12px; color: var(--muted); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 16px; background: var(--soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table select.badge { width: auto; padding-right: 8px; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 13px; }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child, .table th:first-child { padding-left: 16px; }
.table tbody tr.click { cursor: pointer; } .table tbody tr.click:hover td { background: var(--soft); }
.table tr.hot td { background: #fdf6f2; } .table tr.hot td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.cell-2 { display: flex; flex-direction: column; gap: 2px; } .cell-2 b { font-weight: 600; font-size: 14px; white-space: nowrap; } .cell-2 b.sm { font-size: 13px; font-weight: 500; } .cell-2 small { font-size: 12px; color: var(--muted); line-height: 16px; }
.cell-row { display: flex; align-items: center; gap: 8px; }
.table-wrap { overflow-x: auto; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { display: flex; align-items: center; gap: 8px; padding: 10px 2px 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs .on { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.tabs .n { font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 999px; background: var(--bg-neutral); color: var(--tx-neutral); font-weight: 600; }
.tabs .on .n { background: var(--ink); color: #fff; }
.tabs-sm { gap: 16px; margin: 0 20px 4px; } .tabs-sm button { padding: 8px 0 10px; font-size: 13px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: #3b3a36; display: flex; justify-content: space-between; }
.field input, .field select, .field textarea, .input { width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-2); background: #fff; outline: 0; font-size: 14px; transition: border-color .12s, box-shadow .12s; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 20px; }
.field select, select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b6a65' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28,27,25,.08); }
.field.err input { border-color: var(--red); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; user-select: none; }
.check input { appearance: none; width: 16px; height: 16px; border: 1.5px solid var(--border-2); border-radius: 4px; display: grid; place-items: center; background: #fff; margin: 0; cursor: pointer; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.rc input { display: none; } .rc i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-2); flex-shrink: 0; }
.rc b { display: block; font-weight: 500; } .rc small { color: var(--muted); font-size: 12px; }
.rc:has(input:checked) { border: 1.5px solid var(--ink); } .rc:has(input:checked) i { border: 5px solid var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 13px; cursor: pointer; }
.chip input { display: none; } .chip:has(input:checked), .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.dashed { border-style: dashed; color: var(--muted); }

/* ---------- notes ---------- */
.note { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: 13px; }
.note-green { background: var(--bg-green); color: #1f5c39; } .note-blue { background: var(--bg-blue); color: #23468a; } .note-amber { background: var(--bg-amber); color: #7c4c08; } .note-purple { background: var(--bg-purple); color: #4d3790; } .note-red { background: var(--bg-red); color: #8e2a24; }

/* ---------- pop / drawer / modal / toast ---------- */
.pop { position: fixed; z-index: 60; background: #fff; border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; min-width: 220px; display: none; }
.pop.open { display: block; animation: pop .14s ease-out; }
.pop a, .pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 13px; text-align: left; }
.pop a:hover, .pop button:hover { background: var(--canvas); }
.pop .pop-h { padding: 8px 10px 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.pop-persona button span { flex: 1; display: flex; flex-direction: column; } .pop-persona b { font-weight: 500; } .pop-persona small { font-size: 12px; color: var(--muted); }
.pop-persona button.on { background: var(--soft); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

.drawer, .modal { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer.open, .modal.open { display: flex; }
.drawer { background: rgba(28,27,25,.18); justify-content: flex-end; padding: 12px; }
.drawer-card { width: 440px; max-width: 100%; background: #fff; border-radius: 16px; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; overflow: hidden; animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-h { display: flex; align-items: center; gap: 12px; padding: 20px 20px 12px; } .drawer-h > div { flex: 1; } .drawer-h h3 { font-size: 18px; font-weight: 600; } .drawer-h small { color: var(--muted); font-size: 12px; }
.notif-list { overflow-y: auto; padding: 4px 8px 12px; }
.notif button { display: flex; gap: 12px; padding: 12px; width: 100%; text-align: left; border-radius: 10px; align-items: flex-start; }
.notif button:hover { background: var(--soft); }
.notif .t { flex: 1; display: flex; flex-direction: column; gap: 2px; } .notif b { font-weight: 500; font-size: 13px; } .notif small { color: var(--muted); font-size: 12px; line-height: 16px; } .notif .when { font-size: 12px; color: var(--subtle); white-space: nowrap; }
.notif.unread b::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.empty-sm { padding: 32px 20px; text-align: center; color: var(--muted); font-size: 13px; }

.modal { background: rgba(28,27,25,.42); align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.modal-card { width: 760px; max-width: 100%; max-height: calc(100vh - 48px); background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.25); display: flex; flex-direction: column; animation: rise .18s ease-out; }
.modal-card.sm { width: 560px; } .modal-card.md { width: 640px; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.modal-h { display: flex; justify-content: space-between; gap: 16px; padding: 24px 24px 16px; } .modal-h h3 { font-size: 20px; line-height: 26px; font-weight: 600; } .modal-h p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.modal-b { padding: 0 24px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.modal-f { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--soft); border-radius: 0 0 18px 18px; flex-wrap: wrap; }
.quick3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--soft); text-align: left; cursor: pointer; }
.quick:hover { border-color: var(--border-2); } .quick b { display: block; font-size: 13px; font-weight: 500; } .quick small { font-size: 11px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 500; font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.2); transition: .22s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { color: #8fd3a8; }

/* ---------- dashboard ---------- */
.bandwidth { display: flex; flex-direction: column; gap: 14px; padding: 4px 20px 20px; }
.bw-row { display: grid; grid-template-columns: 24px 140px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; }
.bar { height: 6px; border-radius: 99px; background: var(--canvas); overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.bar i.amber { background: #d08a1e; } .bar i.red { background: var(--red); }
.bw-row .n { text-align: right; color: var(--muted); font-size: 12px; }
.attn { display: flex; align-items: center; gap: 12px; padding: 10px 20px; } .attn:hover { background: var(--soft); }
.attn .t { flex: 1; } .attn b { font-weight: 500; font-size: 13px; display: block; } .attn small { font-size: 12px; color: var(--muted); }
.sources { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 0 20px 20px; }
.src { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.src .h { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); } .src .n { font-size: 20px; font-weight: 600; } .src small { font-size: 11px; color: var(--muted); }

/* ---------- lead file ---------- */
.lead-h { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.lead-h .t { flex: 1; min-width: 240px; } .lead-h h1 { font-size: 24px; line-height: 32px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-h p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.lead-h .follow { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; color: var(--subtle); }
.step i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-2); display: grid; place-items: center; }
.step.done { color: var(--ink); } .step.done i { background: var(--green); border-color: var(--green); color: #fff; }
.step.cur { color: var(--ink); font-weight: 600; } .step.cur i { border: 2px solid var(--ink); } .step.cur i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.step-line { flex: 1; min-width: 24px; height: 1.5px; background: var(--border-2); } .step-line.done { background: var(--green); }
.kv { display: flex; flex-direction: column; padding: 0 16px 6px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; } .kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-weight: 500; }
.composer { padding: 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.act-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-in { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--soft); }
.compose-in input { flex: 1; border: 0; background: none; outline: 0; font-size: 13px; height: 32px; }
.send { width: 28px; height: 28px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.feed { padding: 4px 16px 8px; }
.ev { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); } .ev:last-child { border-bottom: 0; }
.ev .c { flex: 1; min-width: 0; } .ev .top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; } .ev .top time { font-size: 12px; color: var(--subtle); white-space: nowrap; }
.ev .top b { font-weight: 600; } .ev p { font-size: 13px; margin-top: 4px; color: #3b3a36; line-height: 19px; } .ev .tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ev .ib { border-radius: 50%; }
.task { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; } .task .spacer + small { font-size: 12px; color: var(--muted); }
.task.done span { text-decoration: line-through; color: var(--subtle); }
.person { display: flex; align-items: center; gap: 10px; padding: 7px 0; } .person .t { flex: 1; } .person b { font-weight: 500; font-size: 13px; display: block; } .person small { font-size: 12px; color: var(--muted); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.ref { width: 30px; height: 22px; border-radius: 5px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.thumb { width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0 2px, transparent 2px 6px), var(--sw, #8a5a3c); }
.prod-h { display: flex; gap: 14px; padding: 16px; align-items: flex-start; } .prod-h .t { flex: 1; } .prod-h h3 { font-size: 16px; font-weight: 600; } .prod-h p { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.prod-h .price { text-align: right; } .prod-h .price small { font-size: 12px; color: var(--muted); } .prod-h .price b { display: block; font-size: 20px; font-weight: 600; }
.attach { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); font-size: 12px; background: #fff; }
.file-chip.dashed { border-style: dashed; color: var(--muted); cursor: pointer; }
.qrow { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 10px; } .qrow .t { flex: 1; font-size: 12px; color: var(--muted); } .qrow b { color: var(--ink); font-size: 13px; }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: #ecebe6; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.col.drop { outline: 2px dashed var(--ink); outline-offset: -2px; }
.col-h { padding: 4px 4px 2px; } .col-h .r { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; } .col-h .r .n { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 12px; } .col-h small { font-size: 12px; color: var(--muted); }
.col-h .d { width: 7px; height: 7px; border-radius: 50%; }
.bcard { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: grab; }
.bcard:hover { border-color: var(--border-2); } .bcard.dragging { opacity: .4; }
.bcard b { font-weight: 600; font-size: 13px; } .bcard small { font-size: 12px; color: var(--muted); }
.bcard .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .bcard .v { font-weight: 600; font-size: 13px; }
.bcard .nx { border-top: 1px solid var(--border); padding-top: 8px; display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }

/* ---------- filters ---------- */
.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filters .search-in { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--border); background: #fff; border-radius: 10px; width: 300px; }
.filters .search-in input { border: 0; outline: 0; flex: 1; font-size: 13px; background: none; min-width: 0; }
.filters select { height: 38px; border: 1px solid var(--border); background-color: #fff; border-radius: 10px; padding: 0 32px 0 12px; font-size: 13px; font-weight: 500; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%231c1b19' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }

/* ---------- my day ---------- */
.newlead { border: 1px solid #ecc9b9; box-shadow: 0 0 0 4px #fbefe9; border-radius: var(--r-card); background: #fff; display: grid; grid-template-columns: 1fr 260px 200px; gap: 24px; padding: 22px; position: relative; overflow: hidden; }
.newlead::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.newlead h2 { font-size: 24px; line-height: 32px; font-weight: 600; margin: 6px 0 4px; }
.newlead .mid { border-left: 1px solid var(--border); padding-left: 20px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.fu { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--border); }
.fu .tm b { display: block; font-weight: 600; } .fu .tm small { font-size: 11px; color: var(--muted); }
.fu .t b { font-weight: 600; font-size: 14px; } .fu .t p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fu .acts { display: flex; gap: 6px; } .fu .acts .icon-btn { width: 30px; height: 30px; border-radius: 8px; }
.pipebar { display: flex; gap: 3px; height: 8px; margin: 12px 0 16px; } .pipebar i { border-radius: 2px; }
.legend > div { display: grid; grid-template-columns: 1fr 40px 60px; padding: 5px 0; font-size: 13px; } .legend .d { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; } .legend .r { text-align: right; color: var(--muted); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; padding: 24px; background: var(--canvas); }
.auth-l { display: flex; flex-direction: column; padding: 16px 48px 8px; max-width: 640px; width: 100%; justify-self: center; }
.auth-l .help { text-align: right; font-size: 12px; color: var(--muted); }
.auth-form { margin: auto 0; display: flex; flex-direction: column; gap: 16px; max-width: 400px; width: 100%; padding: 48px 0; }
.auth-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 40px; } .auth-brand b { font-size: 20px; font-weight: 600; display: block; line-height: 22px; } .auth-brand small { font-size: 11px; color: var(--muted); }
.auth h1 { font-size: 34px; line-height: 40px; font-weight: 600; letter-spacing: -.6px; } .auth .lede { color: var(--muted); margin: -4px 0 12px; }
.pw { position: relative; } .pw input { padding-left: 36px !important; padding-right: 72px !important; } .pw .ic-l { position: absolute; left: 12px; top: 13px; color: var(--muted); } .pw .show { position: absolute; right: 10px; top: 10px; font-size: 12px; color: var(--accent); display: flex; gap: 4px; align-items: center; font-weight: 500; }
.with-ic { position: relative; } .with-ic input { padding-left: 36px !important; } .with-ic .ic { position: absolute; left: 12px; top: 13px; color: var(--muted); }
.or { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--subtle); } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border-2); }
.auth-foot { font-size: 11px; color: var(--subtle); display: flex; gap: 16px; }
.auth-r { position: relative; border-radius: 22px; overflow: hidden; background: #3a332c; min-height: 600px; }
.auth-r img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: opacity 1.2s ease; }
.auth-r img.off { opacity: 0; }
.err-box { padding: 10px 12px; border-radius: 10px; background: var(--bg-red); color: var(--red); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.signing { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.signing .spin { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; margin: 24px auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ib { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 6px; }
.empty h2 { font-size: 20px; font-weight: 600; } .empty p { color: var(--muted); max-width: 440px; }
.diff s { color: var(--red); background: var(--bg-red); padding: 2px 6px; border-radius: 6px; font-size: 12px; } .diff ins { text-decoration: none; color: var(--green); background: var(--bg-green); padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.check-li { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; } .check-li .ok { width: 16px; height: 16px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; } .check-li .no { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-2); }
.big-ok { width: 72px; height: 72px; border-radius: 50%; background: var(--bg-green); display: grid; place-items: center; flex-shrink: 0; } .big-ok span { width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.num-li { display: flex; gap: 10px; font-size: 13px; padding: 6px 0; } .num-li i { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-style: normal; font-size: 11px; font-weight: 600; display: grid; place-items: center; flex-shrink: 0; }
.tabbar { display: none; }
.scrim { display: none; }
.mobile-only { display: none; }
.hide-sm { }

/* ---------- responsive ---------- */
@media (max-width: 1440px) { .three { grid-template-columns: 280px minmax(0, 1fr) 270px; } .sources { grid-template-columns: repeat(3, minmax(0, 1fr)); } .search { width: 320px; } }
@media (max-width: 1280px) {
  .split, .split-r { grid-template-columns: 1fr; }
  .three { grid-template-columns: 1fr 1fr; } .three > :nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newlead { grid-template-columns: 1fr 220px; } .newlead .mid { display: none; }
  .persona { display: none; }
}
@media (max-width: 1024px) {
  :root { --side: 280px; }
  .sidebar { position: fixed; z-index: 70; left: 0; background: var(--canvas); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-pop); }
  body.side-open .sidebar { transform: none; } body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 65; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 16px; } .search { width: auto; flex: 1; max-width: 360px; } .crumb { display: none; } .topbar .spacer { display: none; }
  .panel { border-radius: 0; padding: 20px 16px 40px; }
  .auth { grid-template-columns: 1fr; } .auth-r { display: none; }
}
@media (max-width: 760px) {
  body.app { padding-bottom: 84px; }
  .topbar { height: 60px; gap: 8px; } .search kbd, .new-lead span { display: none; } .new-lead { padding: 8px 10px; }
  .search { max-width: none; }
  .g4, .g3, .g2, .three { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; gap: 6px; } .stat .num { font-size: 24px; line-height: 30px; } .stat .meta { font-size: 11px; } .stat .meta .badge { display: none; }
  .g3.keep3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lead-h > .av { display: none; }
  .lead-h h1 { font-size: 20px; line-height: 28px; }
  .three > :nth-child(2) { grid-row: auto; }
  .page-h h1 { font-size: 22px; line-height: 28px; }
  .page-h .actions .btn:not(.keep) { display: none; }
  .grid2, .radio-cards, .quick3 { grid-template-columns: 1fr; }
  .modal { padding: 0; align-items: flex-end; } .modal-card { border-radius: 20px 20px 0 0; max-height: 92vh; }
  .table.stackable thead { display: none; }
  .table.stackable tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .table.stackable td { padding: 0; border: 0; } .table.stackable td.hide-sm { display: none; }
  .table.stackable td:first-child { grid-column: 1 / -1; }
  .filters .search-in { width: 100%; }
  .sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bw-row { grid-template-columns: 24px 1fr 80px 40px; }
  .newlead { grid-template-columns: 1fr; padding: 18px; } .newlead h2 { font-size: 20px; }
  .fu { grid-template-columns: 50px 1fr; } .fu .acts { grid-column: 2; }
  .lead-h .follow { display: none; } .lead-h .btns { width: 100%; } .lead-h .btns .btn { flex: 1; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: 84px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); align-items: start; }
  .tabbar a, .tabbar > button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--subtle); padding-top: 6px; }
  .tabbar .on { color: var(--ink); font-weight: 600; }
  .tabbar .fab { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; justify-self: center; margin-top: 2px; box-shadow: 0 6px 16px rgba(0,0,0,.2); padding: 0; }
  .toast { bottom: 100px; width: max-content; max-width: calc(100% - 32px); }
  .mobile-only { display: block; } .hide-sm { display: none !important; }
  .board { grid-auto-columns: 82%; scroll-snap-type: x mandatory; } .col { scroll-snap-align: start; }
}
