/* Mattering Sales redesign mock. Soft system (chosen 2026-09-05) applied to the CRM shell.
   Throwaway: lives in the session scratchpad only. */
:root {
  --accent: #00BFFF; --accent-hover: #0099CC;
  --accent-ink: color-mix(in srgb, var(--accent) 55%, #0f172a);
  --accent-deep: color-mix(in srgb, var(--accent) 35%, #0f172a);
  --tint-6: color-mix(in srgb, var(--accent) 6%, transparent);
  --tint-8: color-mix(in srgb, var(--accent) 8%, transparent);
  --tint-12: color-mix(in srgb, var(--accent) 12%, transparent);
  --tint-16: color-mix(in srgb, var(--accent) 16%, transparent);
  --ink: #0f172a; --ink-2: #475569; --muted: #94a3b8; --faint: #CBD5E1;
  --page: #f7f8fa; --surface: #fff; --surface-2: #F6F8FB; --chip: #EEF2F6;
  --border: rgba(15,23,42,.10); --border-soft: rgba(15,23,42,.06);
  --green: #10B981; --amber: #F59E0B; --red: #EF4444; --violet: #7c3aed;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --sh-card: 0 2px 12px rgba(15,23,42,.06); --sh-pop: 0 24px 60px rgba(15,23,42,.14), 0 2px 6px rgba(15,23,42,.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; }
a { color: var(--accent-ink); text-decoration: none; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; } *:hover > ::-webkit-scrollbar-thumb, .scroll:hover::-webkit-scrollbar-thumb { background: rgba(15,23,42,.14); }

/* ── Shell ─────────────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 280px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border-soft); box-shadow: 2px 0 8px rgba(0,0,0,.04); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sb-logo { display: flex; align-items: center; gap: 10px; padding: 18px 20px 12px; font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.sb-logo .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; color: #fff; font-size: 15px; }
.sb-logo .collapse { margin-left: auto; color: var(--faint); font-size: 12px; }
.sb-switch { margin: 4px 14px 10px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.sb-switch .ws { width: 22px; height: 22px; border-radius: 6px; background: var(--tint-12); color: var(--accent-ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.sb-switch .chev { margin-left: auto; color: var(--muted); font-size: 11px; }
.sb-section { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 28px 6px; }
.sb-nav { padding: 0 14px; display: flex; flex-direction: column; gap: 2px; }
.sb-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #4b5563; position: relative; letter-spacing: -.01em; }
.sb-nav a i { width: 18px; text-align: center; font-size: 15px; color: inherit; }
.sb-nav a .n { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 500; }
.sb-nav a:hover { color: #1a1a1a; background: var(--surface-2); }
.sb-nav a.active { color: var(--accent-ink); background: var(--tint-8); font-weight: 600; }
.sb-nav a.active::before { content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; background: var(--accent); border-radius: 0 2px 2px 0; }
.sb-nav .sub { padding-left: 44px; font-size: 13px; }
.sb-foot { margin-top: auto; border-top: 1px solid var(--border-soft); }
.sb-user { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.sb-user .av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #0099CC); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.sb-user .nm { font-size: 13px; font-weight: 600; } .sb-user .em { font-size: 11px; color: var(--muted); }
.sb-user .out { margin-left: auto; color: var(--muted); }
.sb-back { display: flex; align-items: center; gap: 10px; padding: 12px 20px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--border-soft); }
.main { flex: 1 1 auto; min-width: 0; padding: 24px 28px 96px; }

/* Page header */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.crumb i { font-size: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .12s; }
.btn:hover { background: var(--surface-2); }
.btn i { font-size: 12px; color: var(--ink-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(0,191,255,.28); }
.btn-primary i { color: #fff; } .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); } .btn-ghost:hover { background: rgba(15,23,42,.04); color: var(--ink); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn-icon { width: 32px; padding: 0; }
.btn-danger { color: var(--red); } .btn-danger i { color: var(--red); } .btn-danger:hover { background: color-mix(in srgb, var(--red) 8%, transparent); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.kbd { font-size: 10.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; margin-left: 4px; background: #fff; }

/* Cards */
.card { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--sh-card); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); font-size: 13px; font-weight: 600; }
.card-h .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--tint-12); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; }
.card-h .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-b { padding: 16px 18px; }
.sec-label { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--sh-card); flex-wrap: wrap; }
.toolbar + .table-wrap { border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.tb-search { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 10px; padding: 0 12px; height: 34px; min-width: 260px; color: var(--muted); font-size: 13px; }
.tb-search input { border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); width: 100%; }
.tb-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.tb-btn i { font-size: 12px; color: var(--muted); }
.tb-btn:hover { background: var(--surface-2); color: var(--ink); }
.tb-btn.active { background: var(--tint-12); color: var(--accent-ink); border-color: transparent; } .tb-btn.active i { color: var(--accent-ink); }
.tb-btn .cnt { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.tb-sep { width: 1px; height: 22px; background: var(--border-soft); margin: 0 2px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-sync { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tb-sync .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.view-seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.view-seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.view-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.view-seg button i { font-size: 11px; }
.views-tabs { display: flex; gap: 4px; align-items: center; margin-bottom: 10px; }
.views-tabs a { padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.views-tabs a.on { background: #fff; color: var(--ink); box-shadow: var(--sh-card); font-weight: 600; }
.views-tabs a .n { color: var(--muted); font-weight: 400; margin-left: 4px; }
.views-tabs .add { color: var(--muted); font-size: 12px; padding: 7px 10px; }
.filter-chips { display: flex; gap: 6px; align-items: center; padding: 8px 12px; background: #fff; border: 1px solid var(--border-soft); border-top: 0; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; border-radius: 999px; background: var(--tint-12); color: var(--accent-deep); font-size: 12px; font-weight: 500; }
.fchip b { font-weight: 600; } .fchip i { font-size: 10px; opacity: .7; }
.fchip-clear { font-size: 12px; color: var(--muted); margin-left: 4px; }

/* Table */
.table-wrap { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--sh-card); overflow: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 12px 12px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; background: #fff; position: sticky; top: 0; }
.tbl th.sort { color: var(--ink-2); } .tbl th.sort i { font-size: 9px; margin-left: 4px; color: var(--accent); }
.tbl td { padding: 0 12px; height: 52px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; font-size: 13.5px; white-space: nowrap; }
.compact .tbl td { height: 40px; font-size: 13px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--tint-6); }
.tbl td.editable { cursor: cell; border-radius: 0; } .tbl td.editable:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.tbl .chk { width: 36px; } .tbl .chk input { width: 16px; height: 16px; accent-color: var(--accent); }
.tbl .row-actions { opacity: 0; display: inline-flex; gap: 2px; transition: opacity .12s; }
.tbl tr:hover .row-actions { opacity: 1; }
.tbl-foot { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border-soft); }
.tbl-foot .pg { margin-left: auto; display: inline-flex; gap: 4px; }
.tbl-foot .pg button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border-soft); background: #fff; color: var(--ink-2); cursor: pointer; }
.tbl-foot .pg button.on { background: var(--tint-12); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.name-cell { display: flex; align-items: center; gap: 10px; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.av-sq { border-radius: 9px; }
.av-a { background: var(--tint-16); color: var(--accent-deep); } .av-g { background: #ECFDF5; color: #047857; } .av-v { background: #F5F3FF; color: #6D28D9; } .av-o { background: #FFF7ED; color: #C2410C; } .av-n { background: var(--chip); color: var(--ink-2); }
.name-cell .t { font-weight: 600; color: var(--ink); } .name-cell .s { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); } .dash { color: var(--faint); }
.mail { color: var(--accent-ink); font-weight: 500; }
.owner { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; } .owner .av { width: 22px; height: 22px; font-size: 9px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; }
.chip .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip-n { background: var(--chip); color: var(--ink-2); }
.chip-a { background: var(--tint-12); color: var(--accent-deep); }
.chip-g { background: #ECFDF5; color: #047857; }
.chip-am { background: #FFFBEB; color: #B45309; }
.chip-r { background: #FEF2F2; color: #B91C1C; }
.chip-v { background: #F5F3FF; color: #6D28D9; }
.chip-ghost { background: transparent; color: var(--muted); border: 1px dashed var(--faint); font-weight: 500; }
.chips { display: inline-flex; gap: 4px; }

/* Detail pages */
.detail-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.detail-head .av { width: 52px; height: 52px; font-size: 18px; border-radius: 14px; }
.detail-head h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; line-height: 1.2; }
.detail-head .meta { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: 13px; margin-top: 4px; flex-wrap: wrap; }
.detail-head .meta .sep { color: var(--faint); }
.detail-head .actions { margin-left: auto; display: flex; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.fact { background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 14px; box-shadow: var(--sh-card); }
.fact .l { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fact .v { font-size: 15px; font-weight: 600; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.fact .v .chip { font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 18px; align-items: start; }
.detail-grid-3 { display: grid; grid-template-columns: 320px minmax(0,1fr) 360px; gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fields { display: flex; flex-direction: column; }
.field { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px; align-items: center; min-height: 34px; padding: 3px 0; }
.field .k { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.field .k i { width: 14px; font-size: 10px; color: var(--muted); text-align: center; }
.field .v { min-height: 30px; display: flex; align-items: center; padding: 3px 8px; margin-left: -8px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.field .v:hover { background: var(--tint-6); }
.field .v.empty { color: var(--muted); }
.field .v.empty::after { content: ""; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-soft); padding: 0 8px; }
.tabs a { padding: 12px 12px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 7px; align-items: center; }
.tabs a i { font-size: 12px; color: var(--muted); }
.tabs a.on { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 600; } .tabs a.on i { color: var(--accent-ink); }
.tabs a .n { font-size: 11px; background: var(--chip); color: var(--ink-2); padding: 0 6px; border-radius: 999px; }
.composer { display: flex; gap: 10px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.composer .box { flex: 1; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-height: 44px; color: var(--muted); font-size: 13.5px; display: flex; flex-direction: column; gap: 10px; }
.composer .box .row { display: flex; gap: 6px; align-items: center; }
.composer .box .row .spacer { flex: 1; }
.tl { padding: 8px 18px 18px; display: flex; flex-direction: column; }
.tl-day { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 0 6px 34px; }
.tl-item { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 10px; padding: 8px 0; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 11px; top: 32px; bottom: -8px; width: 1px; background: var(--border-soft); }
.tl-item:last-child::before { display: none; }
.tl-ico { width: 24px; height: 24px; border-radius: 8px; background: var(--tint-12); color: var(--accent-ink); display: grid; place-items: center; font-size: 10px; }
.tl-ico.g { background: #ECFDF5; color: #047857; } .tl-ico.n { background: var(--chip); color: var(--ink-2); } .tl-ico.am { background: #FFFBEB; color: #B45309; }
.tl-body .t { font-size: 13.5px; font-weight: 500; } .tl-body .t b { font-weight: 600; }
.tl-body .m { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; }
.tl-body .note { margin-top: 8px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--ink-2); }
.related { display: flex; flex-direction: column; }
.rel-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.rel-row:last-child { border-bottom: 0; }
.rel-row .t { font-size: 13.5px; font-weight: 500; } .rel-row .s { font-size: 12px; color: var(--muted); }
.rel-row .amt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 13px; }
.empty i { font-size: 22px; color: var(--faint); display: block; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink-2); margin-bottom: 2px; }
.empty-page { text-align: center; padding: 72px 20px; }
.empty-page .ico { width: 64px; height: 64px; border-radius: 18px; background: var(--tint-12); color: var(--accent-ink); display: grid; place-items: center; font-size: 24px; margin: 0 auto 16px; }
.empty-page h3 { margin: 0 0 6px; font-size: 17px; } .empty-page p { color: var(--muted); margin: 0 0 18px; }
.empty-page .row { display: flex; gap: 8px; justify-content: center; }

/* Kanban */
.board { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 24px; align-items: flex-start; }
.kcol { width: 300px; flex-shrink: 0; background: var(--surface-2); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.kcol-h { padding: 12px 14px 8px; display: flex; align-items: center; gap: 8px; position: sticky; top: 0; }
.kcol-h .d { width: 8px; height: 8px; border-radius: 50%; }
.kcol-h .t { font-size: 13.5px; font-weight: 600; } .kcol-h .n { font-size: 11px; color: var(--muted); background: #fff; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.kcol-h .more { margin-left: auto; color: var(--muted); font-size: 12px; }
.kcol-sum { padding: 0 14px 10px; font-size: 12px; color: var(--ink-2); display: flex; gap: 10px; } .kcol-sum b { font-variant-numeric: tabular-nums; color: var(--ink); }
.kcol-b { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.kcard { background: #fff; border-radius: 12px; padding: 12px 12px 10px; box-shadow: 0 1px 2px rgba(15,23,42,.06); border: 1px solid transparent; cursor: grab; transition: transform .12s, box-shadow .12s, border-color .12s; position: relative; }
.kcard:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.10); border-color: var(--tint-16); }
.kcard .biz { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kcard .biz .av { width: 18px; height: 18px; font-size: 8px; border-radius: 5px; }
.kcard .ttl { font-size: 13.5px; font-weight: 600; margin: 4px 0 8px; line-height: 1.3; }
.kcard .amt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kcard .amt small { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.kcard .cf { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.kcard .cf .chip { font-size: 11px; padding: 2px 8px; }
.kcard .ft { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-soft); font-size: 11.5px; color: var(--muted); }
.kcard .ft .av { width: 20px; height: 20px; font-size: 8px; }
.kcard .ft .age { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; }
.kcard .ft .age.warn { color: #B45309; } .kcard .ft .age.danger { color: #B91C1C; }
.kcard .stale { position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; }
.kcard .stale.warn { background: var(--amber); } .kcard .stale.danger { background: var(--red); }
.kadd { border: 1px dashed var(--faint); border-radius: 10px; padding: 8px; text-align: center; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.kadd:hover { color: var(--accent-ink); border-color: var(--accent); background: #fff; }
.kcol.won .kcol-h .d { background: var(--green); } .kcol.lost .kcol-h .d { background: var(--red); }
.kcol.collapsed { width: 48px; } .kcol.collapsed .kcol-h { flex-direction: column; padding: 12px 8px; gap: 10px; } .kcol.collapsed .kcol-h .t { writing-mode: vertical-rl; font-size: 12px; } .kcol.collapsed .kcol-b, .kcol.collapsed .kcol-sum, .kcol.collapsed .kcol-h .more { display: none; }
.board-summary { display: flex; gap: 10px; margin-bottom: 14px; }
.board-summary .fact { flex: 1; padding: 10px 14px; } .board-summary .fact .v { font-size: 17px; }
.stage-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--chip); margin-top: 8px; }
.stage-bar span { display: block; height: 100%; }

/* Slideout */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.32); z-index: 1050; }
.slide { position: fixed; top: 0; right: 0; bottom: 0; width: 560px; background: #fff; box-shadow: -8px 0 40px rgba(15,23,42,.14); z-index: 1051; display: flex; flex-direction: column; border-radius: 16px 0 0 16px; }
.slide-h { padding: 18px 22px 14px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; gap: 12px; }
.slide-h h2 { margin: 0; font-size: 17px; font-weight: 600; } .slide-h .sub { font-size: 12.5px; color: var(--muted); }
.slide-h .x { margin-left: auto; width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.slide-b { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 18px; }
.fs { display: flex; flex-direction: column; gap: 12px; }
.fs .fs-h { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lbl { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; } .lbl .req { color: var(--red); }
.inp { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid transparent; font-size: 14px; color: var(--ink); }
.inp.ph { color: var(--muted); } .inp i { color: var(--muted); font-size: 12px; }
.inp.focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint-16); }
.inp.ta { height: auto; min-height: 84px; align-items: flex-start; padding-top: 10px; }
.inp .chev { margin-left: auto; font-size: 10px; }
.help { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.slide-f { padding: 14px 22px; border-top: 1px solid var(--border-soft); display: flex; align-items: center; gap: 8px; background: #fff; }
.slide-f .grow { flex: 1; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; }
.toggle .tr { width: 40px; height: 22px; border-radius: 999px; background: #d1d5db; position: relative; } .toggle .tr::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle.on .tr { background: var(--accent); } .toggle.on .tr::after { left: 20px; }

/* Settings hub */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.tile { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: 18px; display: flex; gap: 14px; align-items: flex-start; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.tile:hover { box-shadow: 0 8px 24px rgba(15,23,42,.10); transform: translateY(-2px); }
.tile .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--tint-12); color: var(--accent-ink); display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
.tile .t { font-size: 14.5px; font-weight: 600; } .tile .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.tile .k { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { padding: 8px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; display: flex; gap: 10px; align-items: center; }
.side-nav a i { width: 16px; font-size: 12px; color: var(--muted); text-align: center; }
.side-nav a.on { background: var(--tint-8); color: var(--accent-ink); font-weight: 600; } .side-nav a.on i { color: var(--accent-ink); }
.side-nav .h { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 4px; }
.vocab-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.vocab-row:last-child { border-bottom: 0; }
.vocab-row .sw { width: 14px; height: 14px; border-radius: 50%; }
.vocab-row .t { font-weight: 500; font-size: 13.5px; } .vocab-row .n { font-size: 12px; color: var(--muted); }
.vocab-row .grip { color: var(--faint); font-size: 11px; cursor: grab; }
.vocab-row .acts { margin-left: auto; opacity: 0; display: flex; gap: 2px; } .vocab-row:hover .acts { opacity: 1; }
.add-line { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-top: 6px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 13px; }

/* Persona / campaign cards */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.pcard { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: 18px; }
.pcard .top { display: flex; gap: 12px; align-items: center; }
.pcard .top .av { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
.pcard .t { font-size: 15px; font-weight: 600; } .pcard .s { font-size: 12.5px; color: var(--muted); }
.pcard p { font-size: 13px; color: var(--ink-2); margin: 12px 0; line-height: 1.5; }
.pcard .stats { display: flex; gap: 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border-soft); padding-top: 12px; }
.pcard .stats b { color: var(--ink); font-weight: 600; display: block; font-size: 15px; }
.bar { height: 6px; background: var(--chip); border-radius: 999px; overflow: hidden; } .bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* Steps (import) */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 16px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--chip); color: var(--ink-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.step.on { color: var(--ink); } .step.on .n { background: var(--accent); color: #fff; }
.step.done .n { background: #ECFDF5; color: #047857; }
.step-sep { width: 40px; height: 1px; background: var(--border); margin: 0 12px; }
.drop { border: 1.5px dashed var(--faint); border-radius: 14px; padding: 36px 20px; text-align: center; background: var(--surface-2); }
.drop .ico { width: 48px; height: 48px; border-radius: 14px; background: #fff; color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto 12px; font-size: 18px; box-shadow: var(--sh-card); }
.drop b { display: block; font-size: 14px; } .drop span { font-size: 12.5px; color: var(--muted); }
.map-row { display: grid; grid-template-columns: 1fr 24px 1fr 90px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.map-row .arrow { color: var(--faint); text-align: center; font-size: 11px; }
.map-row .sample { font-size: 11.5px; color: var(--muted); }

/* Popover demo */
.pop { position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--sh-pop); padding: 6px; min-width: 220px; z-index: 20; }
.pop .h { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 8px; display: flex; gap: 6px; align-items: center; }
.pop .o { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; cursor: pointer; }
.pop .o:hover { background: var(--surface-2); } .pop .o.on { background: var(--tint-12); color: var(--accent-deep); font-weight: 500; }
.pop .o .d { width: 8px; height: 8px; border-radius: 50%; }
.pop .o .ck { margin-left: auto; font-size: 10px; color: var(--accent-ink); }

/* Deck chrome */
.deck-note { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 12.5px; z-index: 2000; box-shadow: 0 8px 24px rgba(0,0,0,.2); display: flex; gap: 12px; align-items: center; }
.deck-note a { color: #7dd3fc; }
.deck-note .sw button { border: 0; background: rgba(255,255,255,.12); color: #fff; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; cursor: pointer; margin-left: 4px; }
.deck-note .sw button.on { background: var(--accent); }
.dock { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); }
.soft-fab { position: fixed; right: 24px; bottom: 24px; height: 44px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 6px 20px rgba(0,191,255,.35); }

/* ══ Mobile (≤768px) ═══════════════════════════════════════════════════ */
.m-only { display: none; }
@media (max-width: 768px) {
  .d-only { display: none !important; }
  .m-only { display: block; }
  body { padding-top: 56px; padding-bottom: 72px; }
  .sidebar { display: none; }
  .main { padding: 12px 14px 24px; }
  .m-top { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; gap: 10px; padding: 0 12px; z-index: 900; }
  .m-top .ws { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
  .m-top .ws .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; }
  .m-top .ws .chev { color: var(--muted); font-size: 11px; }
  .m-top .sp { flex: 1; }
  .m-top .ib { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); font-size: 16px; display: grid; place-items: center; }
  .m-top .av { width: 32px; height: 32px; font-size: 11px; }
  .m-tabs { position: fixed; left: 0; right: 0; bottom: 0; height: 64px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--border-soft); display: flex; z-index: 900; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .m-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--ink-2); border-radius: 12px; }
  .m-tabs a i { font-size: 17px; }
  .m-tabs a.active { color: var(--accent-ink); } .m-tabs a.active i { color: var(--accent); }
  .m-tabs a.cta { position: relative; top: -14px; flex: 0 0 64px; }
  .m-tabs a.cta span.b { width: 50px; height: 50px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 18px; box-shadow: 0 8px 20px rgba(0,191,255,.35); }
  .soft-fab { display: none; }
  .deck-note { bottom: 76px; font-size: 11px; padding: 6px 10px; max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center; }
  .deck-note .sw, .deck-note .ttl { display: none; }
  .deck-note { left: auto; right: 10px; transform: none; gap: 8px; border-radius: 999px; }
  .page-head { flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
  .page-head h1 { font-size: 20px; }
  .page-head .sub { display: none; }
  .page-head .actions { margin-left: auto; }
  .page-head .actions .btn:not(.btn-primary):not(.btn-icon) { display: none; }
  .page-head .actions .btn-primary .kbd { display: none; }
  .views-tabs { overflow-x: auto; scrollbar-width: none; margin: 0 -14px 8px; padding: 0 14px; flex-wrap: nowrap; }
  .views-tabs::-webkit-scrollbar { display: none; }
  .views-tabs a { white-space: nowrap; flex-shrink: 0; }
  .toolbar { border-radius: 14px; padding: 8px; gap: 6px; flex-wrap: nowrap; }
  .tb-search { min-width: 0 !important; flex: 1; }
  .toolbar .tb-btn:not(.active) { display: none; }
  .toolbar .tb-btn.active { display: inline-flex; padding: 0 10px; white-space: nowrap; flex-shrink: 0; }
  .tb-sep, .tb-right .tb-sync, .view-seg, .tb-right .chip { display: none; }
  .tb-right { margin-left: 0; }
  .filter-chips { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; border: 0; padding: 8px 2px; background: transparent; }
  .filter-chips > * { white-space: nowrap; flex-shrink: 0; }
  /* Lists keep the table on phones: it scrolls sideways, the name column stays pinned (decision 2026-09-21). */
  .table-wrap { border-radius: 14px; -webkit-overflow-scrolling: touch; }
  .tbl .chk { display: none; }
  .tbl th:first-child:not(.chk), .tbl td:first-child:not(.chk), .tbl th.chk + th, .tbl td.chk + td { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--border-soft); }
  .tbl tbody tr:hover td:first-child:not(.chk), .tbl tbody tr:hover td.chk + td { background: #fff; }
  .tbl th { padding: 10px 12px; } .tbl td { height: 56px; }
  .tbl-foot { padding: 10px 14px; gap: 8px; }
  .tbl-foot > span:not(.pg):not(:first-child) { display: none; }
  .tbl-foot > span:first-child { white-space: nowrap; }
  .tbl-foot .pg button:not(.on):not(:first-child):not(:last-child) { display: none; }
  .crumb { margin-bottom: 4px; }
  .detail-head { flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
  .detail-head .av { width: 44px; height: 44px; font-size: 16px; border-radius: 12px; }
  .detail-head h1 { font-size: 19px; }
  .detail-head .meta { font-size: 12.5px; gap: 6px; }
  .detail-head .actions { width: 100%; margin-left: 0; display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; }
  .detail-head .actions .btn { padding: 0 10px; font-size: 13px; justify-content: center; }
  .detail-head .actions .btn-primary { grid-row: 1; grid-column: 1 / 3; }
  .detail-head .actions .btn-icon { grid-row: 1; grid-column: 3; width: 44px; }
  .detail-head .actions .btn-icon { width: 44px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .fact { padding: 10px 12px; } .fact .v { font-size: 14px; }
  .detail-grid, .detail-grid-3 { grid-template-columns: 1fr; gap: 12px; }
  .detail-grid > .col:first-child { order: 2; }
  .tabs { overflow-x: auto; scrollbar-width: none; padding: 0 4px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; flex-shrink: 0; padding: 12px 10px; }
  .composer { padding: 12px; }
  .composer .box .row { flex-wrap: wrap; }
  .tl { padding: 4px 12px 14px; }
  .field { grid-template-columns: 104px minmax(0,1fr); }
  .card-h { padding: 12px 14px; } .card-b { padding: 12px 14px; }
  .related-2 { grid-template-columns: 1fr !important; }
  .board-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .board-summary .fact:nth-child(n+5) { display: none; }
  .stage-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 10px; padding: 0 14px; }
  .stage-scroll::-webkit-scrollbar { display: none; }
  .stage-scroll a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--border-soft); font-size: 13px; font-weight: 500; color: var(--ink-2); box-shadow: var(--sh-card); }
  .stage-scroll a .d { width: 8px; height: 8px; border-radius: 50%; }
  .stage-scroll a .n { font-size: 11px; color: var(--muted); }
  .stage-scroll a.on { background: var(--accent); border-color: var(--accent); color: #fff; } .stage-scroll a.on .n { color: rgba(255,255,255,.8); }
  .board { display: flex; gap: 12px; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 4px 14px 16px; }
  .kcol { width: calc(100vw - 28px); scroll-snap-align: center; max-height: none; }
  .kcol.collapsed { width: 44px; }
  .kcol.collapsed .kcol-h .t { font-size: 11px; }
  .kcard .ttl { font-size: 14.5px; }
  .board .pop { display: none; }
  .slide { width: 100%; border-radius: 0; top: 0; }
  .slide-h { padding: 14px 16px 12px; } .slide-b { padding: 14px 16px; gap: 14px; }
  .grid2 { grid-template-columns: 1fr; }
  .slide-f { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 6px; }
  .slide-f .grow { display: none; }
  .slide-f .btn { flex: 1; }
  .slide-f .btn-ghost { flex: 0 0 auto; }
  .slide-f .btn:not(.btn-primary):not(.btn-ghost) { display: none; }
  .card-h { flex-wrap: wrap; row-gap: 8px; }
  .card-h .right { flex-wrap: wrap; }
  .card-h .view-seg { display: inline-flex; }
  .settings-grid { grid-template-columns: 1fr !important; }
  .settings-grid > .card:first-child { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; flex-direction: column; gap: 10px; }
  .cards3 { grid-template-columns: 1fr; gap: 10px; }
  .steps { overflow-x: auto; scrollbar-width: none; margin: 0 -14px 12px; padding: 0 14px; }
  .steps::-webkit-scrollbar { display: none; }
  .step { white-space: nowrap; flex-shrink: 0; } .step-sep { width: 20px; margin: 0 8px; flex-shrink: 0; }
  .import-grid { grid-template-columns: 1fr !important; }
  .map-row { grid-template-columns: 1fr; gap: 6px; padding: 10px 0; }
  .map-row .arrow, .map-row .sample { display: none; }
  .map-row > span:first-child { font-size: 12px; color: var(--muted); }
  .empty-grid { grid-template-columns: 1fr !important; }
  .sheet { grid-template-columns: 1fr !important; }
}
