/* FraserOS Sales playground. Throwaway, made-up data. Colours copied from web/src/styles.css. */

@font-face { font-family: "General Sans"; src: url("/fonts/GeneralSans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("/fonts/GeneralSans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fafafa; --surface: #ffffff; --sunken: #f5f7f7; --hover: rgba(19, 35, 43, 0.05);
  --line: #ebebeb; --line-strong: #d2dbdb; --field-edge: #82939a;
  --ink: #13232b; --ink-2: #4a5c62; --ink-3: #5f7075; --on-ink: #fff1de;
  --copper: #b0532a; --copper-hover: #9d4823; --on-copper: #ffffff; --copper-text: #a94f25;
  --focus: #2f5a62; --ok: #276d4a; --ok-soft: #e6f1eb; --warn: #8f580a; --warn-soft: #fcefe2;
  --bad: #b03c28; --bad-soft: #f9ecea; --info: #2f5a62; --info-soft: #e9f0f1; --idle-soft: #eff1f1;
  --toast: #13232b; --on-toast: #e9eeec; --scrim: rgba(19, 35, 43, 0.26);
  --sh-button: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(19, 35, 43, 0.3);
  --sh-raise: 0 1px 1px rgba(19, 35, 43, 0.05);
  --sh-lift: 0 10px 28px rgba(19, 35, 43, 0.18), 0 1px 3px rgba(19, 35, 43, 0.1);
  --sh-overlay: 0 12px 32px rgba(19, 35, 43, 0.14), 0 1px 3px rgba(19, 35, 43, 0.08);
  --ease-press: cubic-bezier(0.22, 1, 0.36, 1); --ease-calm: cubic-bezier(0.4, 0, 0.2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c181e; --surface: #13232b; --sunken: #0f1e25; --hover: rgba(233, 238, 236, 0.06);
    --line: #1f333c; --line-strong: #2c444e; --field-edge: #5d737a;
    --ink: #e9eeec; --ink-2: #a8b8bb; --ink-3: #7f9398; --on-ink: #13232b;
    --copper: #d8703a; --copper-hover: #e47f49; --on-copper: #13232b; --copper-text: #e08a5a;
    --focus: #83a9af; --ok: #5fc28e; --ok-soft: #1c3637; --warn: #f0a85e; --warn-soft: #32332f;
    --bad: #ee7d66; --bad-soft: #2d2e32; --info: #93b9bf; --info-soft: #23363d; --idle-soft: #1c2e36;
    --toast: #e9eeec; --on-toast: #13232b; --scrim: rgba(4, 9, 12, 0.55);
    --sh-button: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(0, 0, 0, 0.4);
    --sh-raise: 0 1px 2px rgba(0, 0, 0, 0.3);
    --sh-lift: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px #2c444e;
    --sh-overlay: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px #2c444e;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "General Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
b, strong { font-weight: 500; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
svg.lucide { width: 16px; height: 16px; stroke-width: 1.75; flex-shrink: 0; }
.press { transition: transform 200ms var(--ease-press), background-color 150ms var(--ease-calm), color 150ms, border-color 150ms; }
.press:active:not(:disabled) { transform: scale(0.97) translateY(0.5px); }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }

/* Layout */
#app { display: flex; height: 100%; }
.sidebar { width: 248px; flex-shrink: 0; height: 100%; background: var(--sunken); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.main { flex: 1; min-width: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; }

/* Sidebar */
.sb-top { padding: 12px 12px 8px; }
.brand { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.brand img { width: 20px; height: 20px; }
.brand .mist { display: none; }
@media (prefers-color-scheme: dark) { .brand .harbour { display: none; } .brand .mist { display: block; } }
.jump { margin-top: 8px; display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink-3); font-size: 13px; box-shadow: var(--sh-raise); }
.jump svg.lucide { width: 14px; height: 14px; }
.sb-mid { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 12px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 8px; border-radius: 6px; font-size: 13.5px; color: var(--ink-2); text-align: left; }
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item.active { background: var(--hover); color: var(--ink); font-weight: 500; }
.nav-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item.soon .label { color: var(--ink-3); }
.soon-pill { border-radius: 99px; background: var(--hover); padding: 0 6px; font-size: 10.5px; font-weight: 500; color: var(--ink-3); }
.new-pill { border-radius: 99px; background: var(--ok-soft); color: var(--ok); padding: 0 6px; font-size: 10.5px; font-weight: 500; }
.sb-rule { height: 1px; background: var(--line); margin: 12px 8px; }
.sb-group { padding: 8px 8px 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.you { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.you .who { font-size: 13px; font-weight: 500; line-height: 16px; }
.you .role { font-size: 12px; color: var(--ink-3); line-height: 16px; }

.avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 6px; background: var(--idle-soft); color: var(--ink-2); font-weight: 500; box-shadow: 0 0 0 1px var(--line); user-select: none; }
.avatar.dc { background: var(--info-soft); color: var(--info); }

/* Playground strip */
.strip { display: flex; align-items: center; gap: 8px; padding: 6px 20px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.strip svg.lucide { width: 14px; height: 14px; }
.strip .grow { flex: 1; min-width: 0; }
.strip button { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; color: var(--warn); }

/* Page header */
.page-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px 10px; flex-shrink: 0; flex-wrap: wrap; }
.icon-btn.menu-btn { display: none; }
a { color: inherit; text-decoration: none; }
.title { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.glance { display: flex; align-items: baseline; gap: 6px; padding: 2px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; }
.glance b { color: var(--ink); font-size: 13px; }
.grow { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.btn.primary { background: var(--copper); color: var(--on-copper); box-shadow: var(--sh-button); }
.btn.primary:hover { background: var(--copper-hover); }
.btn.secondary { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: var(--sh-raise); }
.btn.secondary:hover { background: var(--sunken); }
.btn.ghost { color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { border: 1px solid var(--line-strong); background: var(--surface); color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ok { background: var(--ok); color: #fff; box-shadow: var(--sh-button); }
.btn:disabled { opacity: 0.45; cursor: default; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; color: var(--ink-2); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }

.toolbar { display: flex; align-items: center; gap: 8px; padding: 0 20px 12px; flex-shrink: 0; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--hover); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; font-size: 13px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--sh-raise); }
.seg svg.lucide { width: 14px; height: 14px; }
.search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; width: 220px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink-3); }
.search:focus-within { border-color: var(--focus); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--ink); font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 12.5px; color: var(--ink-2); }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip svg.lucide { width: 13px; height: 13px; }

/* Board */
.board-wrap { flex: 1; min-height: 0; overflow-x: auto; overflow-y: hidden; padding: 0 20px 20px; }
.board { display: flex; gap: 12px; height: 100%; min-width: min-content; }
.col { width: 272px; flex-shrink: 0; display: flex; flex-direction: column; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); transition: background-color 120ms, border-color 120ms; }
.col.drop-on { background: var(--info-soft); border-color: var(--focus); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; font-size: 13px; font-weight: 500; }
.col-head .count { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.col-head .add { margin-left: auto; width: 26px; height: 26px; }
.dot { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }
.col-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; }
.col-empty { padding: 18px 10px; text-align: center; color: var(--ink-3); font-size: 12.5px; border: 1px dashed var(--line-strong); border-radius: 8px; }

.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; box-shadow: var(--sh-raise); cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; text-align: left; width: 100%; display: block; }
.card:hover { border-color: var(--line-strong); }
.card.dragging { opacity: 0.35; }
.card.ghost { position: fixed; z-index: 60; pointer-events: none; box-shadow: var(--sh-lift); transform: rotate(1.5deg); cursor: grabbing; opacity: 0.97; }
.card .co { font-size: 13.5px; font-weight: 500; line-height: 18px; padding-right: 28px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .money { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); }
.card .step { margin-top: 8px; display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; line-height: 17px; color: var(--ink-2); }
.card .step svg.lucide { width: 13px; height: 13px; margin-top: 2px; }
.card .step .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .foot { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.card .owner { position: absolute; top: 9px; right: 9px; }
.when { white-space: nowrap; font-size: 12px; }
.when.late { color: var(--bad); font-weight: 500; }
.when.today { color: var(--warn); font-weight: 500; }
.nostep { color: var(--warn); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--hover); color: var(--ink-2); font-size: 11.5px; white-space: nowrap; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }

/* Lost column, folded to a strip until opened */
.col.closed { display: none; }
.col.lost-folded { width: 52px; cursor: pointer; align-items: center; padding-top: 12px; gap: 10px; }
.col.lost-folded:hover { border-color: var(--line-strong); }
.col.lost-folded .vert { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.died-group { font-size: 11.5px; font-weight: 500; color: var(--ink-3); padding: 6px 4px 0; }
.card.lost .co { color: var(--ink-2); }
.card .reason { margin-top: 6px; font-size: 12.5px; line-height: 17px; color: var(--ink-3); }

/* Phone board: stage tabs and one column */
.tabs { display: none; gap: 6px; padding: 0 16px 10px; overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; white-space: nowrap; color: var(--ink-2); transition: background-color 120ms; }
.tab.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tab.drop-on { background: var(--info-soft); border-color: var(--focus); color: var(--ink); }
.tab .n { font-size: 12px; opacity: 0.7; }

/* List */
.list-wrap { flex: 1; min-height: 0; overflow: auto; padding: 0 20px 20px; }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 13px; }
.list th { text-align: left; font-weight: 500; font-size: 12px; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--sunken); white-space: nowrap; user-select: none; }
.list th.sortable { cursor: pointer; }
.list th.sortable:hover { color: var(--ink); }
.list th .arrow { font-size: 10px; margin-left: 3px; }
.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; }
.list tbody tr:hover td { background: var(--hover); }
.list .co { font-weight: 500; }
.list td:first-child { min-width: 200px; }
.list td.owner-cell { white-space: nowrap; }
.list .sub { font-size: 12px; color: var(--ink-3); }
.list .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list .stepcell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.stage-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--hover); font-size: 12px; white-space: nowrap; color: var(--ink-2); }
.empty-note { padding: 48px 20px; text-align: center; color: var(--ink-3); }

/* Deal page */
.deal-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.deal { max-width: 1040px; margin: 0 auto; padding: 8px 20px 48px; }
.back { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px 0 4px; margin-left: -4px; border-radius: 6px; color: var(--ink-2); font-size: 13px; }
.back:hover { background: var(--hover); color: var(--ink); }
.deal-head { display: flex; align-items: flex-start; gap: 16px; margin: 10px 0 18px; flex-wrap: wrap; }
.deal-head h1 { font-size: 26px; line-height: 32px; font-weight: 500; letter-spacing: -0.015em; margin: 0; }
.deal-head .meta { margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--ink-3); font-size: 13px; }
.deal-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.stages-bar { display: flex; gap: 4px; margin-bottom: 20px; }
.stages-bar button { flex: 1; height: 34px; border-radius: 7px; background: var(--hover); color: var(--ink-3); font-size: 12.5px; font-weight: 500; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stages-bar button:hover { color: var(--ink); }
.stages-bar button.past { background: var(--info-soft); color: var(--info); }
.stages-bar button.now { background: var(--ink); color: var(--on-ink); }
.stages-bar button.won.now { background: var(--ok); color: #fff; }
.stages-bar button.died { background: var(--bad-soft); color: var(--bad); }
.deal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-raise); }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; font-size: 13px; font-weight: 500; }
.panel-head .grow { flex: 1; }
.panel-body { padding: 10px 14px 14px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 13px; line-height: 19px; }
.banner.won { background: var(--ok-soft); color: var(--ok); }
.banner.lost { background: var(--bad-soft); color: var(--bad); }
.banner svg.lucide { margin-top: 2px; }
.banner .b-sub { color: var(--ink-2); }

.next { display: flex; gap: 10px; align-items: flex-start; }
.next .ring { width: 18px; height: 18px; border-radius: 99px; border: 1.5px solid var(--field-edge); margin-top: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: transparent; }
.next .ring:hover { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.next .ring svg.lucide { width: 12px; height: 12px; stroke-width: 2.5; }
.next .fields { flex: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.field { height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 13px; min-width: 0; }
.field:focus { border-color: var(--focus); }
.field.text { flex: 1 1 220px; }
.field.date { width: 150px; }
textarea.field { height: auto; min-height: 64px; padding: 8px 10px; line-height: 19px; resize: vertical; width: 100%; display: block; }
.hint { margin-top: 8px; font-size: 12px; color: var(--ink-3); }

.composer { display: flex; flex-direction: column; gap: 8px; }
.composer .row { display: flex; justify-content: flex-end; gap: 8px; }
.timeline { margin-top: 14px; display: flex; flex-direction: column; }
.ev { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; }
.ev .ic { width: 26px; height: 26px; border-radius: 99px; background: var(--hover); color: var(--ink-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ev .ic svg.lucide { width: 13px; height: 13px; }
.ev.note .ic { background: var(--info-soft); color: var(--info); }
.ev .body { flex: 1; min-width: 0; }
.ev .line1 { font-size: 12px; color: var(--ink-3); }
.ev .line1 b { color: var(--ink-2); }
.ev .txt { margin-top: 2px; font-size: 13.5px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ev.system .txt { color: var(--ink-2); font-size: 13px; }

.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 10px; align-items: center; font-size: 13px; }
.kv label { color: var(--ink-3); font-size: 12.5px; }
.kv .field { width: 100%; height: 30px; }
.money-in { position: relative; }
.money-in span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 13px; pointer-events: none; }
.money-in .field { padding-left: 20px; }
.money-in.mo .field { padding-right: 36px; }
.money-in.mo span.after { left: auto; right: 10px; }
.contact { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.contact:first-child { border-top: 0; padding-top: 0; }
.contact .nm { font-weight: 500; font-size: 13px; }
.contact .rl { font-size: 12px; color: var(--ink-3); }
.contact a { color: var(--ink-2); font-size: 12.5px; text-decoration: none; display: block; }
.contact a:hover { color: var(--copper-text); }
.future { font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.future li { margin: 4px 0; }
.future ul { margin: 6px 0 0; padding-left: 18px; }

/* Modal */
.modal-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade 150ms var(--ease-calm); }
.modal { width: 100%; max-width: 440px; max-height: calc(100% - 32px); overflow-y: auto; background: var(--surface); border-radius: 12px; box-shadow: var(--sh-overlay); padding: 18px; animation: pop 200ms var(--ease-press); }
.modal h2 { margin: 0 0 4px; font-size: 16px; line-height: 22px; font-weight: 500; }
.modal .sub { color: var(--ink-3); font-size: 13px; margin-bottom: 14px; }
.modal .frm { display: flex; flex-direction: column; gap: 12px; }
.modal .frm label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.modal .frm .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal .frm .field { width: 100%; }
.modal .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; max-width: min(520px, calc(100% - 32px)); background: var(--toast); color: var(--on-toast); border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 19px; box-shadow: var(--sh-overlay); animation: rise 220ms var(--ease-press); display: flex; gap: 10px; align-items: flex-start; }
.toast svg.lucide { margin-top: 2px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }

.glance-phone { display: none; font-size: 12.5px; color: var(--ink-3); }

/* Narrow screens: sidebar becomes a drawer, board becomes one stage at a time */
@media (max-width: 960px) {
  .deal-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform 240ms var(--ease-press); box-shadow: var(--sh-overlay); }
  #app.drawer .sidebar { transform: none; }
  .icon-btn.menu-btn { display: inline-flex; margin-left: -6px; }
  .page-head { padding: 10px 16px 8px; padding-top: max(10px, env(safe-area-inset-top)); gap: 8px; }
  .strip { padding: 6px 16px; }
  .toolbar { padding: 0 16px 10px; gap: 6px; }
  .seg button { padding: 0 9px; }
  .seg svg.lucide { display: none; }
  .strip .long { display: none; }
  .search { width: auto; flex: 1 1 140px; }
  .tabs { display: flex; }
  .board-wrap { padding: 0 16px 16px; overflow: hidden; }
  .board .col { display: none; width: 100%; }
  .board .col.phone-on, .board .col.closed.phone-on { display: flex; }
  .board .col.lost-folded { display: none; }
  .list-wrap { padding: 0 16px 16px; }
  .list thead { display: none; }
  .list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .list tr:last-child { border-bottom: 0; }
  .list td { padding: 0; border: 0; }
  .list td:first-child { min-width: 0; }
  .list td.hide-phone { display: none; }
  .list td.num { text-align: left; display: inline; width: auto; color: var(--ink-2); font-size: 12.5px; }
  .list td.num + td.num::before { content: " · "; }
  .list td.stepcell { max-width: none; margin-top: 4px; font-size: 12.5px; }
  .list td.stage-cell { margin: 4px 0; }
  .deal { padding: 4px 16px 40px; }
  .deal-head h1 { font-size: 22px; line-height: 28px; }
  .deal-head .actions { margin-left: 0; width: 100%; }
  .deal-head .actions .btn { flex: 1; }
  .stages-bar { overflow-x: auto; }
  .stages-bar button { flex: 0 0 auto; padding: 0 12px; }
  .modal-scrim { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 14px 14px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .glance { display: none; }
  .glance-phone { display: inline; }
}
