/* TradeHub design system.
   Calm, professional SaaS in the vein of Xero / Salesforce Lightning: light by default, white surfaces,
   a light sidebar, one brand blue for every action, semantic colours only for status, no gradients,
   glows or decorative motion. The trade colour appears only on the logo mark.
   Loaded after styles.css and fully replaces its tokens. */

:root, :root[data-theme="light"] {
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg: #f5f6f8; --panel: #ffffff; --panel-2: #f9fafb; --raise: #f0f2f5; --line: #e4e7ec; --line-2: #d0d5dd;
  --ink: #101828; --ink-2: #344054; --muted: #667085; --faint: #98a2b3;
  --blue: #1462d2; --blue-ink: #0f52b3; --blue-wash: #eef4fd; --blue-line: #b9d1f5;
  --good: #067647; --good-wash: #ecfdf3; --warn: #b54708; --warn-wash: #fffaeb; --bad: #b42318; --bad-wash: #fef3f2;
  --radius: 8px; --radius-sm: 6px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06);
  --side-w: 240px; --top-h: 60px;
  --trade: #1462d2; --on-primary: #ffffff; --mark: #3550d8;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1117; --panel: #151b23; --panel-2: #1a212b; --raise: #212934; --line: #29313d; --line-2: #3a4452;
  --ink: #e6edf3; --ink-2: #c5ced8; --muted: #8b96a5; --faint: #6b7686;
  --blue: #4b8df8; --blue-ink: #7fb0ff; --blue-wash: rgba(75, 141, 248, .13); --blue-line: rgba(75, 141, 248, .4);
  --good: #47cd89; --good-wash: rgba(71, 205, 137, .12); --warn: #fdb022; --warn-wash: rgba(253, 176, 34, .12); --bad: #f97066; --bad-wash: rgba(249, 112, 102, .12);
  --shadow-xs: none; --shadow: 0 16px 40px -8px rgba(0, 0, 0, .6); --mark: #6b7fff;
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────── */
html, body { background: var(--bg); }
body { font: 14px/1.5 var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -.011em; }
.mono, .num { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
a { color: var(--blue-ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ── App shell ────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; z-index: 40; }
.brand { padding: 16px 16px 12px; border-bottom: 0; }
.brand .mark { color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; }
.brand .mark i { display: none; }
.brand .sub { color: var(--muted); font-size: 12px; margin: 2px 0 0 38px; text-transform: none; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .th-mark { width: 28px; height: 28px; flex: none; }
.brand .sub:has(.hub-btn) { overflow: visible; position: relative; margin-left: 30px; }
.hub-btn { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 8px; margin: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.hub-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-btn svg { flex: none; }
.hub-btn:hover, .hub-btn[aria-expanded="true"] { border-color: var(--line); color: var(--ink); background: var(--bg); }
.hub-menu { position: absolute; top: calc(100% + 4px); left: -30px; z-index: 60; width: calc(var(--side-w) - 32px); padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 40, .14); }
.hub-h { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hub-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.hub-item:hover, .hub-item:focus-visible { background: var(--bg); outline: none; }
.hub-item.on { background: var(--raise); }
.hub-item.on .hub-name::after { content: ' ✓'; color: var(--blue); }
.hub-name { font-size: 13px; font-weight: 600; }
.hub-meta { font-size: 12px; color: var(--muted); }
.hub-make { border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; margin-top: 4px; }
.th-word { font-weight: 500; letter-spacing: -.015em; }
.th-word b { font-weight: 750; }
.gate-logo { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; color: var(--ink); text-decoration: none; margin-bottom: 4px; }
.gate-logo .th-mark { width: 26px; height: 26px; }
.side-close { margin-left: auto; width: 30px; padding: 0 !important; justify-content: center; color: var(--muted); }
.trial-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 12px 6px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--blue-wash); color: var(--ink-2); font-size: 12px; font-weight: 500; border: 1px solid var(--blue-line); text-decoration: none !important; }
.trial-chip b { color: var(--blue-ink); font-weight: 600; }
.trial-chip.warn { background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.nav { padding: 4px 10px 16px; flex: 1; }
.nav h6 { color: var(--faint); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin: 16px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; border-radius: var(--radius-sm); padding: 6px 10px; margin: 1px 0; background: none; box-shadow: none; transform: none !important; transition: background .12s, color .12s; }
.nav a:hover { background: var(--raise); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--blue-wash); color: var(--blue-ink); font-weight: 600; box-shadow: none; }
.nav a.on .nav-icon { color: var(--blue); opacity: 1; }
.nav-icon { width: 18px; height: 18px; flex: none; color: var(--muted); }
.nav a .badge-slot { margin-left: auto; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.me .who { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.me .who b { color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .btn.ghost { color: var(--muted); width: 30px; padding: 0; justify-content: center; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--raise); color: var(--ink-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.main { overflow-y: auto; min-width: 0; background: var(--bg); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; min-height: var(--top-h); background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 28px; backdrop-filter: none; }
.topbar > div:nth-child(2) { min-width: 0; }
.topbar h1 { font-size: 18px; font-weight: 600; margin: 0; line-height: 1.3; }
.topbar p { color: var(--muted); font-size: 12.5px; margin: 1px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn.menu-btn, .btn.side-close { display: none; }
.menu-btn { width: 34px; padding: 0 !important; justify-content: center; }
.menu-btn svg { width: 20px; height: 20px; }
#page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.content { padding: 24px 28px 64px; max-width: 1480px; }
.side-scrim { display: none; }

/* Search (⌘K) */
.experience-tools { display: flex; align-items: center; gap: 8px; }
.command-trigger { display: flex; align-items: center; gap: 28px; height: 34px; padding: 0 8px 0 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; cursor: pointer; }
.command-trigger:hover { border-color: var(--line-2); }
kbd { font: 500 11px var(--sans); padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); background: var(--panel); }
.focus-trigger, .eyebrow, .command-heading .eyebrow { display: none !important; }
.command-dialog { padding: 0; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; width: min(620px, calc(100vw - 28px)); max-height: 76vh; margin: 12vh auto auto; box-shadow: var(--shadow); overflow: hidden; }
.command-dialog::backdrop { background: rgba(16, 24, 40, .4); }
.command-heading { display: flex; justify-content: flex-end; padding: 8px 10px 0; }
.command-input { width: 100%; border: 0; background: transparent; color: var(--ink); padding: 6px 18px 14px; font-size: 17px; outline: none; }
.command-results { padding: 6px; border-top: 1px solid var(--line); max-height: 46vh; overflow: auto; }
.command-result { width: 100%; display: flex; align-items: center; text-align: left; gap: 12px; padding: 9px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; color: var(--ink); }
.command-result.selected, .command-result:hover { background: var(--blue-wash); }
.command-result b { display: block; font-weight: 600; font-size: 13.5px; }
.command-result small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.command-enter { margin-left: auto; color: var(--muted); }
.command-footer { padding: 9px 18px; border-top: 1px solid var(--line); display: flex; gap: 18px; color: var(--muted); font-size: 11.5px; background: var(--panel-2); }
.command-empty { padding: 24px; color: var(--muted); }

/* Loading */
.workspace-loading { padding: 64px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.workspace-loading > span { display: none; }
.workspace-loading::before { content: ''; display: block; width: 22px; height: 22px; margin: 0 auto 12px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: th-spin .8s linear infinite; }
@keyframes th-spin { to { transform: rotate(360deg); } }

/* Neutralise legacy decoration */
.thinking-light { display: none !important; }
body { background-image: none !important; }
.card.kpi::before { display: none !important; }

/* ── Surfaces ─────────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); padding: 18px 20px; }
.card h3 { font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card + .card, .grid-2 + .card, .card + .grid-2, .stats + .card, .stats + .grid-2, .grid-2 + .grid-2 { margin-top: 16px; }
.stats > .card, .grid-2 > .card, .bas > .card, .grid > .card { margin-top: 0; }
.card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-h h3 { margin: 0; }
.card-h > a.small, .card-h > .small, .card-h > h3 + .btn, .card-h > h3 + a.btn { margin-left: auto; }
.card-h.pad { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card.kpi { padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .value { font: 600 26px/1.2 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.kpi .foot { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* Stat tiles — the headline numbers on every report */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card.stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.stat-l { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-v { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat-s { color: var(--muted); font-size: 12px; }
.card.stat.warn { box-shadow: inset 3px 0 0 var(--warn), var(--shadow-xs); }
.card.stat.bad { box-shadow: inset 3px 0 0 var(--bad), var(--shadow-xs); }
.card.stat.bad .stat-v { color: var(--bad); }

/* Notices */
.notice { border-radius: var(--radius); padding: 11px 14px; font-size: 13px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--panel); }
.notice > div + div { margin-top: 4px; }
.notice.warn { background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--ink); }
.notice.info { background: var(--blue-wash); border-color: var(--blue-line); }
.notice.bad { background: var(--bad-wash); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }

/* Sub-navigation tabs */
.subnav { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -4px 0 20px; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { padding: 9px 12px; color: var(--muted); font-weight: 500; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--blue-ink); border-bottom-color: var(--blue); font-weight: 600; }

/* ── Controls ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; background: var(--panel); border: 1px solid var(--line-2); color: var(--ink-2); box-shadow: var(--shadow-xs); cursor: pointer; text-decoration: none !important; transition: background .12s, border-color .12s; white-space: nowrap; transform: none !important; }
.btn:hover { background: var(--panel-2); color: var(--ink); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-primary); box-shadow: var(--shadow-xs); }
.btn.primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); color: var(--on-primary); filter: none; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn.ghost:hover { background: var(--raise); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.input, select.input, textarea.input { width: 100%; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 10px; color: var(--ink); box-shadow: var(--shadow-xs); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.input.sm { padding: 5px 8px; font-size: 13px; }
.f { display: flex; flex-direction: column; gap: 5px; }
.f > span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.f.check { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.form-grid { margin-bottom: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); box-shadow: var(--shadow-xs); }
.seg button { background: transparent; border: 0; padding: 0 12px; height: 30px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--raise); color: var(--ink); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; font-weight: 600; font-size: 11.5px; padding: 2px 8px; background: var(--raise); color: var(--ink-2); white-space: nowrap; }
.badge.blue { background: var(--blue-wash); color: var(--blue-ink); }
.badge.good { background: var(--good-wash); color: var(--good); }
.badge.warn { background: var(--warn-wash); color: var(--warn); }
.badge.bad { background: var(--bad-wash); color: var(--bad); }
.pill-count { background: var(--bad); color: #fff !important; min-width: 18px; justify-content: center; padding: 1px 6px; }
.bar { background: var(--raise); border-radius: 99px; overflow: hidden; }
.bar > i, .bar i { background: var(--blue); animation: none; }
.chip, .filter-chip { border-radius: var(--radius-sm); }
.icon { width: 16px; height: 16px; vertical-align: -3px; }
.bad-t { color: var(--bad); }
.pos { color: var(--good); } .neg { color: var(--ink-2); }

/* ── Tables ───────────────────────────────────────────── */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
.table-wrap.plain { border: 0; border-radius: 0; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th { background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.t th:first-child, table.t td:first-child { padding-left: 18px; }
table.t th:last-child, table.t td:last-child { padding-right: 18px; }
table.t tbody tr:hover td { background: var(--panel-2); }
table.t .right, .right { text-align: right; }
table.t.compact td { padding: 8px 10px; }
table.t.compact td:first-child { padding-left: 0; } table.t.compact td:last-child { padding-right: 0; }
table.t.compact tbody tr:hover td { background: transparent; }
table.t.compact th { background: transparent; padding-left: 10px; }
table.t.compact th:first-child { padding-left: 0; } table.t.compact th:last-child { padding-right: 0; }
table.t tr.sum td { border-top: 1px solid var(--line-2); font-weight: 600; background: var(--panel-2); }
table.t tr.total td { border-top: 2px solid var(--ink-2); font-size: 14px; }
table.t tr.strong td { font-weight: 600; }
table.t tr.detail td { background: var(--panel-2); padding-top: 4px; }
table.t.cf tbody tr.click td:first-child::before { content: '›'; display: inline-block; width: 12px; color: var(--muted); }
ul.items { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; font-size: 12.5px; }
ul.items li { display: flex; gap: 8px; padding: 3px 0; break-inside: avoid; }
ul.items li b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
ul.items li > span { width: 10px; font-weight: 700; }
ul.items li > span.in { color: var(--good); } ul.items li > span.out { color: var(--bad); }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 6px; }

/* ── Charts (js/charts.js) ────────────────────────────── */
.chart-box { position: relative; }
.chart-box svg { display: block; overflow: visible; }
.chart-box .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart-box .axis { fill: var(--muted); font: 500 11px var(--sans); font-variant-numeric: tabular-nums; }
.chart-box .zero { stroke: var(--line-2); stroke-width: 1; }
.chart-box .threshold { stroke: var(--bad); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-box .xhair { stroke: var(--line-2); stroke-width: 1; }
.chart-box .hit { cursor: default; }
.chart-tip { position: absolute; display: none; pointer-events: none; z-index: 5; min-width: 150px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; color: var(--ink); }
.chart-tip b { display: block; margin-bottom: 4px; font-weight: 600; }
.chart-tip div { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.chart-tip div span { margin-left: auto; padding-left: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-tip i, .chart-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i.ln { height: 2px; border-radius: 1px; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb-row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; align-items: center; gap: 12px; font-size: 12.5px; }
.hb-label { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 10px; background: var(--raise); border-radius: 0 4px 4px 0; overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hb-val { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; min-width: 84px; }
.hb-val small { font-weight: 400; color: var(--muted); }
.bas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.bas .card + .card { margin-top: 0; }

/* ── Dialogs & feedback ───────────────────────────────── */
.modal { border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--panel); }
.modal header { border-bottom: 1px solid var(--line); }
.modal header h2 { font-size: 16px; font-weight: 600; }
.modal footer { display: flex; gap: 8px; align-items: center; justify-content: flex-end; background: var(--panel-2); border-top: 1px solid var(--line); }
.scrim { background: rgba(16, 24, 40, .45); backdrop-filter: none; }
.toast { border-radius: var(--radius); box-shadow: var(--shadow); background: #101828; color: #fff; font-size: 13px; }
.toast.err { background: var(--bad); }
.drawer { animation: none; }
.drawer-head { background: var(--panel); backdrop-filter: none; }

/* ── Sign-in ──────────────────────────────────────────── */
.gate { background: var(--bg); min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.gate .card { width: min(400px, 100%); padding: 28px; box-shadow: var(--shadow); }
.gate h1 { font-size: 22px; font-weight: 700; margin: 0; }
.gate h1 i { display: none; }
.gate .gate-links { display: flex; justify-content: space-between; font-size: 12.5px; }
.gate .code-input { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

/* ── Feature views ────────────────────────────────────── */
.section-h { font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
.section-title { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.visit { border-left: 3px solid var(--blue) !important; }
.visit.done { border-left-color: var(--good) !important; }
.sched-job { background: var(--blue-wash) !important; color: var(--blue-ink) !important; border: 1px solid var(--blue-line); border-left: 3px solid var(--blue); box-shadow: none !important; }
.sched-day { background: var(--panel) !important; }
.msg.user { background: var(--blue) !important; color: #fff !important; }
.msg.assistant { background: var(--panel) !important; }
.mate-av { background: var(--blue-wash) !important; color: var(--blue); border-radius: 12px !important; }
.mate-av svg { width: 28px; height: 28px; }
.spark i { background: var(--blue) !important; }
.int-card .logo { border-radius: var(--radius-sm) !important; }
.ask-input .inner { border: 1px solid var(--line-2); background: var(--panel); border-radius: 10px; padding: 8px; box-shadow: var(--shadow-xs); }
.ask-input .inner:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.thinking { font-style: normal; color: var(--muted); }
.ask { height: calc(100dvh - var(--top-h) - 1px); }
.settings-list .card + .card { margin-top: 16px; }
.kv-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13px; }
.kv-list dt { color: var(--muted); } .kv-list dd { margin: 0; }
.secret { font: 600 15px ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; word-break: break-all; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: 1fr; }
  .command-trigger span { display: none; }
  .command-trigger { gap: 0; padding: 0 8px; }
}
/* Phones have no keyboard shortcut to show: label the button "Search" instead. */
@media (max-width: 640px) {
  .command-trigger kbd { display: none; }
  .command-trigger span { display: inline; }
  .gd-prompt { flex-wrap: wrap; }
  .gd-prompt b { flex: 1 1 100%; }
}
/* Below 1024px the sidebar becomes an off-canvas drawer with a scrim — it never overlaps content. */
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .side.open { transform: none; box-shadow: var(--shadow); }
  .btn.side-close { display: inline-flex; }
  .side-scrim { display: block; position: fixed; inset: 0; background: rgba(16, 24, 40, .4); z-index: 39; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .side.open ~ .side-scrim { opacity: 1; pointer-events: auto; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 10px 20px; }
  .content { padding: 20px 20px 56px; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .topbar > div:nth-child(2) { flex: 1; }
  .topbar p { display: none; }
  .topbar > .spacer { display: none; }
  #page-actions { width: 100%; justify-content: flex-start; }
  #page-actions:empty { display: none; }
  .content { padding: 16px 14px 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-v { font-size: 19px; }
  .card { padding: 14px 16px; }
  .hb-row { grid-template-columns: 1fr auto; }
  .hb-row .hb-track { grid-column: 1 / -1; grid-row: 2; }
  ul.items { columns: 1; }
  .visit .vact .btn { flex: 1; justify-content: center; }
  .ask { height: calc(100dvh - 58px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .side, .topbar, .subnav, .btn, .side-scrim { display: none !important; }
  .shell { display: block; height: auto; } .main { overflow: visible; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* Dashboard */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.dash-head h2 { font-size: 22px; font-weight: 600; margin: 0; }
.dash-head p { margin: 2px 0 0; font-size: 13px; }
a.card.stat:hover { border-color: var(--line-2); }
.att { display: flex; flex-direction: column; }
.att-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none !important; font-size: 13px; }
.att-row:first-child { border-top: 0; padding-top: 0; }
.att-row .badge { justify-content: center; }
.att-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-row:hover .att-t { color: var(--blue-ink); }
.att-m { color: var(--muted); font-size: 12px; white-space: nowrap; }
.feed { display: flex; flex-direction: column; }
.feed-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.feed-row:first-child { border-top: 0; padding-top: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
@media (max-width: 760px) { .att-row { grid-template-columns: 1fr; gap: 3px; } .att-row .badge { justify-self: start; } }

/* Account & security */
.qr { width: 168px; height: 168px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); margin-top: 16px; }
button.card.stat { text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.card.stat:hover { border-color: var(--line-2); }
button.card.stat.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }

/* Job panel */
.drawer.job-panel { width: min(980px, 100vw); left: auto; background: var(--bg); border-left: 1px solid var(--line); }
.jp-head { position: sticky; top: 0; z-index: 3; display: flex; gap: 12px; align-items: flex-start; padding: 18px 24px 12px; background: var(--panel); }
.jp-title { flex: 1; min-width: 0; }
.jp-title h2 { font-size: 20px; font-weight: 600; margin: 2px 0; }
.jp-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 14px; background: var(--panel); }
.jp-steps { list-style: none; margin: 0; padding: 0 24px 14px; display: flex; gap: 4px; background: var(--panel); overflow-x: auto; }
.jp-steps li { flex: 1; min-width: 92px; }
.jp-steps button { width: 100%; border: 0; border-top: 3px solid var(--line); background: none; padding: 7px 2px 0; font: 500 12px var(--sans); color: var(--muted); text-align: left; cursor: pointer; white-space: nowrap; }
.jp-steps button.done { border-top-color: var(--blue-line); color: var(--ink-2); }
.jp-steps button.cur { border-top-color: var(--blue); color: var(--blue-ink); font-weight: 600; }
.jp-steps button:hover { color: var(--ink); }
.jp-tabs { margin: 0; padding: 0 24px; background: var(--panel); }
.jp-tabs .count { font-size: 11px; color: var(--muted); font-weight: 600; background: var(--raise); border-radius: 99px; padding: 0 6px; }
.jp-body { padding: 20px 24px 48px; }
.jp-stats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.jp-note { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.jp-note:first-child { border-top: 0; }
.jp-task { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.jp-task:first-child { border-top: 0; }
.jp-task span:nth-child(2) { flex: 1; }
.jp-task.done span:nth-child(2) { text-decoration: line-through; color: var(--muted); }
.pre { white-space: pre-wrap; }
.bar.mini { display: inline-block; width: 60px; height: 5px; vertical-align: middle; }
.bar.mini i { display: block; height: 100%; }
@media (max-width: 760px) { .jp-head, .jp-actions, .jp-steps, .jp-tabs { padding-left: 14px; padding-right: 14px; } .jp-body { padding: 14px 14px 40px; } }

/* Live tracker */
.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tk-map { height: 380px; background: var(--raise); position: relative; z-index: 0; } /* keeps Leaflet's panes under modals */
.tk-map-card { position: relative; }
.tk-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--ink-2); }
.tk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tk-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tk-legend i.sq { border-radius: 2px; background: #101828; }
.th-pin span { display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; color: #fff; font: 700 10.5px var(--sans); box-shadow: 0 1px 4px rgba(16,24,40,.35); }
.tk-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tk-col { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 140px; }
.tk-col h4 { margin: 2px 4px 10px; font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.tk-col .count { font-size: 11px; color: var(--muted); background: var(--raise); border-radius: 99px; padding: 0 7px; }
.tk-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow-xs); }
.tk-card:hover { border-color: var(--line-2); }
.tk-card.late { box-shadow: inset 3px 0 0 var(--bad), var(--shadow-xs); }
.tk-card.overrunning { box-shadow: inset 3px 0 0 var(--warn), var(--shadow-xs); }
.tk-title { font-weight: 600; font-size: 13.5px; margin: 4px 0 2px; }
.tk-empty { margin: 6px 4px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; display: inline-grid; vertical-align: middle; margin-right: 6px; }
.bar.thin { height: 4px; margin-top: 8px; } .bar.thin i { display: block; height: 100%; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 6px; box-shadow: 0 0 0 3px var(--good-wash); }
@media (min-width: 1800px) { .tk-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .tk-map { height: 100%; min-height: 520px; } }
@media (max-width: 900px) { .tk-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tk-board { grid-template-columns: 1fr; } }
.shift-card { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.shift-card.on { box-shadow: inset 3px 0 0 var(--good), var(--shadow-xs); }
.loc-chip { margin: 4px 12px 6px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--good-wash); color: var(--good); font-size: 12px; font-weight: 600; display: flex; align-items: center; }
.tk-who { display: flex; align-items: center; gap: 2px; margin-top: 8px; white-space: nowrap; }
.tk-who > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.tk-who .muted { font-size: 11.5px; }
.tk-no { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #101828; color: #fff; font-size: 10px; font-weight: 700; margin-right: 6px; }

/* Lead finder */
.lg-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.lg-grid > .card { margin-top: 0; }
.seg-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.seg-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--panel); }
.seg-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
.seg-opt input { margin-top: 3px; }
.seg-opt b { display: block; font-size: 13px; font-weight: 600; }
.seg-opt small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; margin-top: 2px; }
.lg-map { height: 320px; border-bottom: 1px solid var(--line); background: var(--raise); }
.muted-row td { opacity: .55; }
.lg-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lg-list { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none !important; margin-top: 0 !important; }
.lg-list:hover { border-color: var(--line-2); }
.lg-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 4px; }
.lg-kpis span { font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; }
.lg-kpis b { font-size: 18px; color: var(--ink); font-weight: 600; }
@media (max-width: 1100px) { .lg-grid { grid-template-columns: 1fr; } }
.lg-st { width: 150px; }
.subnav .spacer { flex: 1; }

/* Quotes */
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.q-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.q-main > .card + .card, .q-main > .card { margin-top: 0; margin-bottom: 14px; }
.q-side { position: sticky; top: 76px; }
/* Invoice line inputs fill their columns instead of pushing the table wider than the card. */
.t.inv-lines { table-layout: fixed; }
.t.inv-lines th, .t.inv-lines td { padding-left: 6px; padding-right: 6px; }
.t.inv-lines .input.sm { padding-left: 8px; padding-right: 6px; }
.t.inv-lines input { width: 100%; min-width: 0; box-sizing: border-box; }
/* Label on the left, value on the right (totals panels, settings, job details). */
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; }
.q-totals .kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.q-totals .kv.grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; font-size: 16px; }
.q-profit { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.q-profit h4 { margin: 0 0 4px; font-size: 13px; }
.q-sec-title { font-weight: 600; max-width: 480px; }
.q-lines td { vertical-align: top; padding: 8px 6px; }
.q-lines .input.sm { width: 100%; }
.q-detail { margin-top: 4px; font-size: 12px !important; color: var(--muted); }
.q-opt-off td { background: var(--panel-2); }
.q-opt-off .input { color: var(--muted); }
.q-add { padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pi-list { max-height: 52vh; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pi-cat { position: sticky; top: 0; background: var(--panel-2); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 12px; border-bottom: 1px solid var(--line); }
.pi-row { display: grid; grid-template-columns: 20px 1fr 50px 90px 80px; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.pi-row b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1180px) { .q-layout { grid-template-columns: 1fr; } .q-side { position: static; } }
.q-lines { table-layout: fixed; }
.q-sub { display: flex; gap: 6px; margin-top: 4px; }
.q-sub .q-detail { margin-top: 0; flex: 1; }
.q-kind { width: 104px !important; flex: none; font-size: 12px !important; }
.kpis > .card, .g2 > .card, .g3 > .card, .g4 > .card, .g5 > .card, .row > .card, .stack > .card, .lg-grid > .card { margin-top: 0; }
.stack > .card + .card { margin-top: 12px; }

/* Cards laid out by any grid never take the stacked-card top margin. */
[class*="grid"] > .card, [class*="grid"] > a.card, .bas > .card { margin-top: 0; }
#page-actions .input, #page-actions select.input { width: auto; max-width: 240px; }
/* Quote lines stack into cards whenever the editor column is too narrow for the table (not just on
   phones): beside the totals panel on a laptop, the fixed columns left the item description ~90px. */
.q-lines-wrap { container-type: inline-size; }
@container (max-width: 860px) {
  .q-lines { table-layout: auto; }
  .q-lines thead { display: none; }
  .q-lines, .q-lines tbody { display: block; }
  .q-lines tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; }
  .q-lines td { display: block; padding: 0 !important; border: 0 !important; width: auto !important; text-align: left; }
  .q-lines td:first-child { grid-column: 1 / -1; padding-right: 34px !important; }
  .q-lines td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
  .q-lines td.q-amt { text-align: right; }
  .q-lines td.q-rm { position: absolute; top: 10px; right: 8px; }
  .q-sub { flex-wrap: wrap; }
  .q-sub .q-detail { min-width: 100%; }
}

/* Outside the line table, so still by screen width. */
@media (max-width: 760px) { .q-sec-title { max-width: none; } .q-head { gap: 6px; } }

/* ── Trade plans editor ───────────────────────────── */
.content.pl-host { max-width: none; padding: 0; }
.pl { display: grid; grid-template-columns: 236px minmax(0, 1fr) 292px; height: calc(100vh - var(--top-h, 64px) - 2px); min-height: 520px; }
.pl-pal, .pl-insp { overflow-y: auto; background: var(--panel); padding: 12px; }
.pl-pal { border-right: 1px solid var(--line); }
.pl-insp { border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.pl-pal > .input { width: 100%; margin-bottom: 8px; }
.pl-grp { border-bottom: 1px solid var(--line); padding: 6px 0; }
.pl-grp > summary { cursor: pointer; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 2px; list-style: none; }
.pl-grp > summary::-webkit-details-marker { display: none; }
.pl-syms { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding-top: 4px; }
.pl-sym { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 6px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; color: var(--ink); font-size: 11px; line-height: 1.2; text-align: center; }
.pl-sym:hover { background: var(--panel-2); border-color: var(--line); }
.pl-sym.on { background: var(--blue-wash); border-color: var(--blue); color: var(--blue-ink); }
.pl-sym svg { height: 26px; }
.pl-stage { display: flex; flex-direction: column; min-width: 0; background: var(--panel-2); }
.pl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pl-tools .seg button { display: inline-flex; align-items: center; gap: 5px; height: 30px; }
.pl-tools .seg button span { font-size: 12px; }
.pl-tools .input.sm { width: auto; max-width: 180px; }
.pl-gap { flex: 1; }
.pl-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); margin: 3px 10px 3px 0; }
.pl-canvas { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fbfaf7; touch-action: none; }
.pl-canvas svg { display: block; width: 100%; height: 100%; user-select: none; }
.pl-canvas .g1 { stroke: #ece9e2; stroke-width: calc(var(--px, 10) * 1px); }
.pl-canvas .g2 { stroke: #dcd8cf; stroke-width: calc(var(--px, 10) * 1.2px); }
.pl-canvas[data-tool="select"] svg [data-id] { cursor: move; }
.pl-canvas[data-tool="pan"] svg { cursor: grab; }
.pl-canvas[data-tool="wall"] svg, .pl-canvas[data-tool="run"] svg, .pl-canvas[data-tool="dim"] svg, .pl-canvas[data-tool="place"] svg, .pl-canvas[data-tool="calib"] svg { cursor: crosshair; }
.pl-canvas[data-tool="text"] svg, .pl-canvas[data-tool="room"] svg { cursor: text; }
.pl-hint { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 160px); padding: 5px 9px; border-radius: 7px; background: rgba(23, 24, 26, .78); color: #fff; font-size: 12px; pointer-events: none; }
.pl-hint:empty { display: none; }
.pl-coord { position: absolute; right: 10px; bottom: 10px; font-size: 11px; color: #6b6c70; background: rgba(255, 255, 255, .85); padding: 3px 7px; border-radius: 6px; pointer-events: none; }
.pl-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.pl-box > summary { cursor: pointer; list-style: none; }
.pl-box > summary::-webkit-details-marker { display: none; }
.pl-box h4 { display: inline; margin: 0; font-size: 13px; }
.pl-box > h4 { display: block; margin: 0 0 8px; }
.pl-box[open] > summary { margin-bottom: 8px; }
.pl-box .f { margin-bottom: 8px; }
.pl-box .input { width: 100%; }
.pl-box .grid2 { gap: 0 8px; }
.pl-box .t.tight td { padding: 4px 6px; font-size: 12.5px; }
.pl-box .t.tight td:first-child { width: 22px; }
.pl-cct { display: grid; grid-template-columns: 54px 1fr 1fr 28px; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: center; }
.pl-cct > :nth-child(1) { grid-area: 1 / 1; } .pl-cct > :nth-child(2) { grid-area: 1 / 2 / 2 / 4; } .pl-cct > :nth-child(6) { grid-area: 1 / 4; }
.pl-cct > :nth-child(3) { grid-area: 2 / 1 / 3 / 3; } .pl-cct > :nth-child(4) { grid-area: 2 / 3; } .pl-cct > :nth-child(5) { grid-area: 2 / 4; text-align: right; font-size: 11px; }
.danger-text { color: var(--bad) !important; }
.pl-empty { text-align: center; padding: 48px 24px; }
.pl-empty p { max-width: 560px; margin: 8px auto 18px; }
@media (max-width: 1100px) { .pl { grid-template-columns: 200px minmax(0, 1fr) 250px; } .pl-tools .seg button span { display: none; } }
@media (max-width: 820px) {
  .pl { grid-template-columns: 1fr; grid-template-rows: auto 62vh auto; height: auto; }
  .pl-pal { border-right: 0; border-bottom: 1px solid var(--line); max-height: 190px; }
  .pl-syms { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .pl-insp { border-left: 0; border-top: 1px solid var(--line); }
}

/* ── Getting paid ─────────────────────────────────── */
.gp { display: grid; gap: 16px; max-width: 980px; }
.gp-card { padding: 20px 22px; }
.gp-card h3 { margin: 0 0 4px; font-size: 16px; }
.gp-card h4 { margin: 18px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.gp-card p.muted { margin: 0 0 12px; max-width: 640px; }
.gp-h { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.gp-row { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.gp-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.gp-steps .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; font-size: 12.5px; border: 1px solid var(--line-2); border-radius: 99px; cursor: pointer; }
.gp-steps .chip.on { border-color: var(--blue); background: var(--blue-wash); color: var(--blue-ink); }
.gp-steps .chip input { margin: 0; }

/* ── SWMS & pre-starts ────────────────────────────── */
.sw-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.sw-main { display: grid; gap: 14px; }
.sw-sec { padding: 16px 18px; }
.sw-sec h3 { margin: 0 0 8px; font-size: 15px; }
.sw-sec .input { width: 100%; }
.sw-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 14px; }
.sw-task { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.sw-task-h { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.sw-task-h .input { flex: 1; font-weight: 600; }
.sw-task-b { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0 10px; }
.sw-task-r { grid-column: 1 / 3; display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 0 10px; }
.sw-ps { display: grid; grid-template-columns: 1fr auto 220px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.sw-sign { padding: 16px 18px; position: sticky; top: calc(var(--top-h) + 12px); }
.sw-sign h3 { margin: 0 0 4px; font-size: 15px; }
.sw-signs { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.sw-signs li { display: flex; gap: 10px; align-items: center; }
.sw-signs img { width: 84px; height: 34px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.sw.locked .sw-main { opacity: .85; }
@media (max-width: 980px) { .sw-cols { grid-template-columns: 1fr; } .sw-sign { position: static; } .sw-task-b, .sw-task-r { grid-template-columns: 1fr; } .sw-task-r { grid-column: auto; } .sw-ps { grid-template-columns: 1fr; } }

/* ── Stock & orders ───────────────────────────────── */
.warn-text { color: var(--warn); } .bad-text { color: var(--bad); } .good-text { color: var(--good); }
.van-list { display: grid; gap: 8px; }
.van-row { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.van-row > div { flex: 1; min-width: 0; }
.tr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2px 14px; max-height: 52vh; overflow-y: auto; }
.po-lines .input.sm { width: 100%; }
.po-lines td { vertical-align: middle; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
.ts td, .ts th { white-space: nowrap; }

/* ── Fleet ────────────────────────────────────────── */
.fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.fl-card { padding: 14px 16px; cursor: pointer; }
.fl-card:hover { border-color: var(--line-2); }
.fl-h { display: flex; justify-content: space-between; gap: 12px; }
.fl-due { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; min-height: 22px; }
.fl-f { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.today-notes { padding: 8px 14px; margin-bottom: 12px; }
.today-notes .tn { display: block; padding: 6px 0; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.today-notes .tn:first-child { border-top: 0; }
body.is-offline .topbar { box-shadow: inset 0 -3px 0 var(--warn); }

/* ── Get set up ───────────────────────────────────── */
.setup-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.setup-h h3 { margin: 0; }
.setup-bar { flex: 1; min-width: 140px; height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.setup-bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.setup-card ol { margin: 10px 0 6px; padding-left: 20px; }
.setup-full { padding: 18px 20px; max-width: 860px; }
.setup-list { list-style: none; margin: 14px 0 0; padding: 0; }
.setup-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.setup-list li > div { flex: 1; }
.setup-list .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: #fff; flex: none; }
.setup-list li.done .tick { background: var(--good); border-color: var(--good); }
.setup-list li.done a b { color: var(--muted); }
.refer-stats { display: flex; gap: 22px; margin: 14px 0 6px; }
.refer-stats div { display: flex; flex-direction: column; } .refer-stats b { font-size: 22px; } .refer-stats span { font-size: 12px; color: var(--muted); }

/* ── Phone tab bar ────────────────────────────────── */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--panel); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font: 600 11px/1.2 var(--sans); color: var(--muted); text-decoration: none; background: none; border: 0; border-radius: 10px; cursor: pointer; }
  .tabbar a.on { color: var(--blue-ink); background: var(--blue-wash); }
  .tabbar svg { width: 20px; height: 20px; }
  .main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* Star rating (feedback card) */
.rate { display: inline-flex; gap: 4px; }
.rate button { background: none; border: 0; padding: 2px; font-size: 26px; line-height: 1; color: var(--line-2); cursor: pointer; }
.rate button.on { color: #e9a400; }
.rate button:focus-visible { outline: 2px solid var(--blue); border-radius: 4px; }

/* Shop drawings — services, lighting & the specification library */
.sd-light { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 2px; }
.sd-items td { vertical-align: middle; } .sd-items .input.sm { height: 28px; font-size: 12.5px; }
.sd-items tr.muted-row td { color: var(--muted); }
.sd-checks { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.sd-checks ul { margin: 6px 0 0; padding-left: 18px; } .sd-checks li.error b { color: var(--bad); } .sd-checks li.warn b { color: var(--warn); }
.lib-list { display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.lib-item { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--panel); }
.lib-item ul { margin: 4px 0; padding-left: 18px; color: var(--ink-2); }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.spec header { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; } .spec header b { flex: 1; font-size: 14px; }
.spec-d { color: #fff; font: 700 10.5px/1 var(--sans); padding: 4px 6px; border-radius: 4px; letter-spacing: .04em; }
.spec dl { display: grid; grid-template-columns: 110px 1fr; gap: 3px 10px; margin: 6px 0; } .spec dt { color: var(--muted); } .spec dd { margin: 0; }
.spec ul { margin: 4px 0; padding-left: 18px; color: var(--ink-2); }
.sd-items { font-size: 12.5px; } .sd-items td.nowrap, .sd-items .mono { white-space: nowrap; } .sd-items .sd-note { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Finance — WIP bars, balance sheet */
.mini-bar { display: inline-block; width: 60px; height: 6px; background: var(--raise); border-radius: 3px; vertical-align: middle; overflow: hidden; } .mini-bar i { display: block; height: 100%; background: var(--blue); }
.bs tr.sum td { font-weight: 600; border-top: 1px solid var(--line-2); } .bs tr.total td { font-weight: 700; }
.scen .f span { font-size: 11.5px; }

/* Assistant (agent) — live steps and action cards */
.msg.assistant .steps { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.msg.assistant .step { font-size: 12.5px; color: var(--muted); padding-left: 16px; position: relative; }
.msg.assistant .step::before { content: ''; position: absolute; left: 3px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.msg.assistant .steps:not(.done) .step:last-child::before { animation: th-pulse 1s infinite; }
.msg.assistant .steps.done .step::before { background: var(--good); }
.msg.assistant .answer:empty::after { content: 'Thinking…'; color: var(--muted); }
.msg.assistant .answer table { border-collapse: collapse; margin: 6px 0; font-size: 13px; } .msg.assistant .answer th, .msg.assistant .answer td { border-bottom: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.msg .act { margin-top: 10px; }
@keyframes th-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .msg.assistant .steps .step::before { animation: none !important; } }

/* Help — 24/7 support */
.help-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 600 13px var(--sans); box-shadow: var(--shadow); cursor: pointer; }
.help-fab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.help-fab:hover { border-color: var(--blue); color: var(--blue); }
.help-panel { position: fixed; right: 20px; bottom: 70px; z-index: 41; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 110px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.help-panel header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); } .help-panel header a { margin-left: auto; font-size: 12.5px; } .help-panel header button { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.help-panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.help-chat { display: flex; flex-direction: column; height: 100%; min-height: 420px; } .help-chat.compact { min-height: 0; }
.help-log { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.help-log .msg { max-width: 92%; } .help-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; } .help-form textarea { flex: 1; resize: none; }
.help-page { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.help-live { padding: 0; overflow: hidden; } .help-live .card-h { padding: 14px 16px 0; } .help-live .help-chat { height: 62vh; }
.help-arts { margin-top: 8px; max-height: 50vh; overflow: auto; } .help-arts details { border-bottom: 1px solid var(--line); padding: 8px 0; } .help-arts summary { cursor: pointer; font-weight: 600; font-size: 13.5px; } .help-arts p { font-size: 13px; color: var(--ink-2); }
.tix { display: flex; flex-direction: column; } .tix-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; } .tix-row .small { grid-column: 1 / -1; }
.tix-thread { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; max-height: 50vh; overflow: auto; }
@media (max-width: 760px) { .help-page { grid-template-columns: 1fr; } .help-fab { bottom: 76px; right: 12px; } .help-fab span { display: none; } .help-fab { width: 40px; padding: 0; justify-content: center; } .help-panel { right: 12px; bottom: 124px; height: min(560px, calc(100vh - 150px)); } }

/* Membership tiers */
.tier-tag { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; color: var(--blue-ink); background: var(--blue-wash); border-radius: 4px; padding: 1px 5px; }
.nav a .tier-tag + .badge-slot { margin-left: 4px; }
.upsell { max-width: 620px; } .upsell h2 { margin: 10px 0 6px; } .upsell ul { margin: 12px 0 18px; padding-left: 20px; line-height: 1.8; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; position: relative; }
.plan-card.popular { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); } .plan-card.current { background: var(--blue-wash); }
.plan-card .pop { position: absolute; top: -10px; left: 16px; background: var(--blue); color: var(--on-primary); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.plan-card h3 { margin: 0; } .plan-card .price { font-size: 28px; font-weight: 700; } .plan-card .price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-card ul { margin: 4px 0 10px; padding-left: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.7; flex: 1; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

.wh-row { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding: 8px 0; } .wh-row > div { flex: 1; min-width: 0; } .wh-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tour-card { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 16px; align-items: center; margin-bottom: 16px; } .tour-card video { width: 100%; border-radius: 8px; background: #000; } @media (max-width: 760px) { .tour-card { grid-template-columns: 1fr; } }

.sample-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-top: 16px; } .sample-card h3 { margin: 0 0 4px; } .sample-card p { margin: 0; max-width: 620px; }
body[data-workspace="help"] .help-fab, body[data-workspace="help"] .help-panel { display: none; }

.bl-jobs { display: flex; flex-direction: column; gap: 12px; } .bl-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; } .bl-imgs figure { margin: 0; } .bl-imgs img { width: 100%; border-radius: 6px; display: block; } .bl-imgs figcaption { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Platform console */
@media (min-width: 1200px) { .pf-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* Support view banner (TradeHub team viewing a customer account, read-only) */
.support-view-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 16px; background: #b54708; color: #fff; font-size: 13px; }
.support-view-bar .btn { background: #fff; color: #7a2e0e; border-color: transparent; }

/* Estimates & BOQs */
.es-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.es-side .es-sticky { position: sticky; top: 12px; }
.es-sec .card-h { gap: 8px; }
.es-title { max-width: 360px; font-weight: 600; }
.es-grid { min-width: 940px; table-layout: fixed; }
table.t.es-grid td, table.t.es-grid th { padding: 3px 4px; vertical-align: top; }
.es-grid th:nth-child(2) { width: auto; min-width: 240px; }
.es-sec .table-wrap { overflow-x: auto; }
.es-grid .input.sm { padding: 4px 6px; min-width: 0; width: 100%; }
.es-grid input.right, .input.right { text-align: right; }
table.t.compact td, table.t.compact th { padding: 5px 8px; }
td.low { background: var(--good-wash); color: var(--good); font-weight: 600; }
@media (max-width: 1500px) { .es-wrap { grid-template-columns: 1fr; } .es-side .es-sticky { position: static; } .es-side .card { max-width: 560px; } }

/* Takeoffs & markups */
.to-app { display: grid; grid-template-columns: 150px minmax(0, 1fr) 290px; height: calc(100vh - var(--top-h, 56px)); min-height: 520px; border-top: 1px solid var(--line); }
.to-pages { overflow-y: auto; border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 8px; background: var(--panel-2); }
.to-thumb { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 4px; cursor: pointer; text-align: left; font: 500 11px var(--sans); color: var(--ink-2); }
.to-thumb img { width: 100%; display: block; border-radius: 3px; background: #fff; aspect-ratio: 1.41; object-fit: contain; }
.to-thumb span { display: block; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.to-thumb.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-wash); }
.to-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.to-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.to-tool { width: 32px; height: 30px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; }
.to-tool:hover { background: var(--panel-2); } .to-tool.on { background: var(--blue-wash); border-color: var(--blue-line); color: var(--blue-ink); }
.to-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.to-sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); cursor: pointer; display: inline-block; padding: 0; }
.to-sw.on { box-shadow: 0 0 0 2px var(--ink); }
.to-canvas { flex: 1; min-height: 0; background: #e9ebee; overflow: hidden; position: relative; cursor: crosshair; touch-action: none; }
.to-canvas[data-tool="select"] { cursor: default; } .to-canvas[data-tool="pan"] { cursor: grab; }
.to-canvas svg { width: 100%; height: 100%; display: block; user-select: none; }
.to-canvas .mk.sel, .to-canvas .mk[data-sel] { filter: drop-shadow(0 0 3px #0090ff) drop-shadow(0 0 1px #0090ff); }
.to-status { padding: 5px 10px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: var(--panel); }
.to-side { overflow-y: auto; border-left: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }
.to-card { border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); padding: 10px; }
.to-card h4 { margin: 0 0 6px; font-size: 13px; }
.to-conds { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.to-cond { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; }
.to-cond:hover { background: var(--panel-2); } .to-cond.on { border-color: var(--blue-line); background: var(--blue-wash); }
.to-cond .dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.to-cond .nm { flex: 1; min-width: 0; } .to-cond .nm b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .to-cond .nm small { color: var(--muted); font-size: 11px; }
.to-cond .tot { font-size: 12px; white-space: nowrap; }
@media (max-width: 900px) { .to-app { grid-template-columns: 1fr; height: auto; } .to-pages { flex-direction: row; overflow-x: auto; } .to-thumb { min-width: 100px; } .to-canvas { height: 60vh; } }

/* Site signs */
.ss-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 16px; align-items: start; }
.ss-preview { position: sticky; top: 12px; }
.ss-frame { background: #e9ebee; padding: 12px; height: 640px; overflow: hidden; }
.ss-frame iframe { width: 1123px; height: 1588px; border: 0; background: #fff; transform: scale(.36); transform-origin: 0 0; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.ss-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.hz-chip { display: inline-block; font: 800 10px var(--sans); padding: 1px 6px; border-radius: 4px; margin-right: 4px; }
.hz-chip.danger { background: #d71920; color: #fff; } .hz-chip.warning { background: #ffcd00; color: #111; } .hz-chip.prohibit { border: 1.5px solid #d71920; color: #d71920; }
.ss-ppe { display: flex; flex-wrap: wrap; gap: 8px; }
.ss-ppe label { width: 86px; text-align: center; font-size: 11px; padding: 6px; border: 2px solid transparent; border-radius: 8px; cursor: pointer; opacity: .45; }
.ss-ppe label.on { opacity: 1; border-color: #005eb8; } .ss-ppe label span { display: block; margin-top: 3px; }
tr.done td { text-decoration: line-through; color: var(--muted); }
@media (max-width: 1100px) { .ss-wrap { grid-template-columns: 1fr; } .ss-preview { position: static; } }

/* Tender response pack */
.tp-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; min-height: 420px; }
.tp-nav { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: 10px; }
.tp-nav button { text-align: left; background: none; border: 0; padding: 7px 9px; border-radius: 6px; font: 500 13px var(--sans); color: var(--ink-2); cursor: pointer; }
.tp-nav button.on { background: var(--blue-wash); color: var(--blue-ink); }
.tp-exp { max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 760px) { .tp-wrap { grid-template-columns: 1fr; } .tp-nav { flex-direction: row; flex-wrap: wrap; border: 0; } }

/* Site pages: photos, defects drawing, BOQ import */
.fk-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.fk-photos figure { margin: 0; position: relative; }
.fk-photos img { width: 104px; height: 78px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.fk-photos figure .btn { position: absolute; top: 2px; right: 2px; padding: 0 6px; background: var(--panel); }
.df-draw { overflow: auto; max-height: calc(100vh - 230px); background: #e9ebee; border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); }
.df-draw svg { display: block; cursor: crosshair; background: #fff; }
.df-pin { cursor: pointer; } .df-pin:hover circle { filter: brightness(1.15); }
th.im-mapped { background: var(--blue-wash) !important; color: var(--blue-ink) !important; }
tr.im-head td { font-weight: 700; background: var(--panel-2); }
.ss-logos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ss-logo-box { height: 86px; border: 1.5px dashed var(--line-2, #c8cdd3); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 8px; }
.ss-logo-box img { max-height: 70px; max-width: 100%; object-fit: contain; }
.ss-logo-box span { font: 700 13px var(--sans); color: var(--muted); letter-spacing: .05em; }
.es-type { width: 62px !important; flex: none; padding-left: 2px !important; padding-right: 0 !important; font-size: 11px; }

/* Sidebar groups fold to their heading (app.js wireNavGroups) */
.nav-tools { display: flex; justify-content: flex-end; padding: 2px 4px 0; }
.nav-all { background: none; border: 0; color: var(--faint); font: inherit; font-size: 11.5px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.nav-all:hover { color: var(--ink); background: var(--raise); }
/* Essentials / Everything switch at the foot of the menu (lib/menu.js). */
.nav-mode-row { padding: 10px 8px 4px; margin-top: 8px; border-top: 1px solid var(--line); }
.nav-mode { width: 100%; text-align: left; background: none; border: 0; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.nav-mode:hover { color: var(--ink); background: var(--raise); }
.nav-head { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; cursor: pointer; font: inherit;
  color: var(--ink-2); font-size: 13px; font-weight: 600; letter-spacing: .01em; padding: 8px 10px; margin: 2px 0; border-radius: var(--radius-sm); text-align: left; min-height: 36px; }
.nav-head:hover { background: var(--raise); color: var(--ink); }
.nav-chev { color: var(--faint); transition: transform .15s; flex: none; }
.nav-group.open > .nav-head .nav-chev { transform: rotate(90deg); }
.nav-group > .nav-items { display: none; padding: 0 0 6px 6px; }
.nav-group.open > .nav-items { display: block; }
.nav-upgrade { display: block; margin: 14px 10px 0; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px dashed var(--blue-line); color: var(--blue-ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.nav-upgrade:hover { background: var(--blue-wash); text-decoration: none; }

/* Bill inbox: review beside the original */
.bill-inbox { margin-bottom: 14px; }
.bill-review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bill-src iframe { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 860px) { .bill-review { grid-template-columns: 1fr; } .bill-src iframe { height: 40vh; } }

/* Job budget */
.jp-budget .t th:first-child, .jp-budget .t td:first-child { padding-left: 18px; }
.jp-budget .t th:last-child, .jp-budget .t td:last-child { padding-right: 18px; }
.bar i.bad { background: var(--bad); }

/* Job programme (Gantt) */
.prog-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.gantt { display: grid; grid-template-columns: 260px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.g-left { border-right: 1px solid var(--line); background: var(--panel); }
.g-name { height: var(--row); display: flex; align-items: center; gap: 8px; padding: 0 10px; border-top: 1px solid var(--line); cursor: pointer; }
.g-name:hover { background: var(--panel-2, rgba(127,127,127,.06)); }
.g-name.crit .g-txt { font-weight: 600; }
.g-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.g-who { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.g-right { overflow-x: auto; position: relative; }
.g-canvas { position: relative; }
.g-head { position: absolute; inset: 0 0 auto 0; height: 46px; border-bottom: 1px solid var(--line); }
.g-col { position: absolute; top: 0; width: var(--day); height: 46px; text-align: center; font-size: 11px; color: var(--muted); }
.g-col .g-d { position: absolute; bottom: 6px; left: 0; right: 0; }
.g-col .g-wk { position: absolute; top: 6px; left: 3px; white-space: nowrap; font-weight: 600; color: var(--ink); }
.g-col.we { color: color-mix(in srgb, var(--muted) 60%, transparent); }
.g-col.now .g-d { color: var(--blue); font-weight: 700; }
.g-we { position: absolute; bottom: 0; width: var(--day); background: color-mix(in srgb, var(--muted) 8%, transparent); }
.g-today { position: absolute; bottom: 0; width: 2px; background: var(--blue); opacity: .6; }
.g-links { position: absolute; inset: 0; pointer-events: none; }
.g-links path { fill: none; stroke: var(--muted); stroke-width: 1.2; opacity: .7; }
.g-links marker path { fill: var(--muted); stroke: none; }
.g-bar { position: absolute; height: calc(var(--row) - 12px); border-radius: 6px; cursor: grab; overflow: hidden; display: flex; align-items: center; touch-action: none; user-select: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.g-bar:active { cursor: grabbing; }
.g-bar span { position: relative; font-size: 11.5px; font-weight: 600; color: #fff; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-bar i { position: absolute; inset: 0 auto 0 0; background: rgba(0,0,0,.18); }
.g-bar.crit { box-shadow: 0 0 0 2px var(--bad); }
.g-lbl { position: absolute; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; pointer-events: none; padding-left: 6px; line-height: calc(var(--row) - 12px); }
.g-grip { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.g-ms { position: absolute; width: 14px; height: 14px; transform: rotate(45deg); background: var(--ink); border-radius: 2px; cursor: pointer; }
.g-ms.crit { background: var(--bad); }
.k-crew { background: #3457D5; } .k-sub { background: #8A5CD1; } .k-delivery { background: #A7774A; } .k-inspection { background: #2E8B6E; } .k-milestone { background: var(--ink); }
.prog-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.prog-legend span { display: inline-flex; align-items: center; gap: 6px; }
.prog-legend .crit-key::before { content: ''; width: 14px; height: 8px; border-radius: 3px; box-shadow: 0 0 0 2px var(--bad); display: inline-block; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
@media (max-width: 700px) { .gantt { grid-template-columns: 150px minmax(0, 1fr); } .g-who, .g-days { display: none; } }

/* Automations */
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.recipe { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 6px; align-content: start; justify-items: start; }
.au-step { border-left: 3px solid var(--line-2); padding: 4px 0 4px 12px; display: grid; gap: 6px; }
.au-step > b { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.au-action { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 8px; }
.au-preview { border: 1px dashed var(--line-2); border-radius: 8px; padding: 10px; margin: 6px 0; display: grid; gap: 4px; }
.chip.sm { font: inherit; font-size: 11.5px; padding: 2px 8px; margin: 2px; background: var(--panel); color: var(--ink-2); }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; transition: background .15s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::before { transform: translateX(16px); }

.au-ed .row .input { width: auto; max-width: 100%; }
.au-ed .row > .input[data-k=address] { flex: 1; min-width: 220px; }
/* Long dialogs: keep the buttons in view while the body scrolls. */
.modal > footer { position: sticky; bottom: 0; z-index: 1; }

.scen .f.check { display: inline-flex; align-items: center; gap: 6px; }
.scen .f.check span { margin: 0; }

/* Client updates */
.cu-item { border-top: 1px solid var(--line); padding: 10px 0; }
.cu-item .btn { float: right; margin-top: -4px; }
.cu-ph { display: flex; gap: 6px; flex-wrap: wrap; }
.cu-ph img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }

/* Checkbox labels sit beside their box; padded blocks inside flush cards. */
label.f.check { display: flex; }
.card.flush > .pad { padding: 14px 18px; }
/* Site sign-in: a location badge that jumps to the pin on the map */
button.loc-chip { border: 0; cursor: pointer; font-family: inherit; }
button.loc-chip:hover { filter: brightness(.96); text-decoration: underline; }

/* Drawing approvals (RFIs & drawings → Approvals) */
.ap-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .ap-grid { grid-template-columns: 1fr; } }
.ap-sheet { max-height: 62vh; overflow: auto; background: var(--bg-2, #eef0f3); border: 1px solid var(--line, #e4e7ec); border-radius: 8px; }
.ap-paper { position: relative; }
.ap-paper img { display: block; width: 100%; height: auto; }
.ap-pin { position: absolute; transform: translate(-50%, -50%); min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; box-sizing: border-box; background: #d9480f; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); font: 700 11px/18px system-ui, sans-serif; text-align: center; }
.ap-pin.done { background: #12b76a; }
.ap-list { max-height: 34vh; overflow: auto; }

/* ── Calm pass (platform-wide) ─────────────────────────────────────────── */
:root { --radius: 10px; }
/* Header buttons all read the same: one solid main action, the rest quiet outlines */
#page-actions { gap: 8px; flex-wrap: nowrap; }
#page-actions > .btn.ghost, #page-actions > a.btn.ghost { border-color: var(--line-2); background: var(--panel); box-shadow: var(--shadow-xs); }
/* Folded help text (app.js foldHelp) */
p.folded { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fold-more { background: none; border: 0; padding: 0; margin: -4px 0 8px; color: var(--blue-ink, var(--blue)); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
/* More breathing room in cards and between them */
.card { padding: 20px 22px; }
.card h3 { font-size: 14.5px; margin-bottom: 14px; }
/* Empty states read as a next step, not an error */
.empty { padding: 48px 24px; }
.empty b { font-size: 16px; margin-bottom: 8px; }
/* Focus you can see when moving with the keyboard */
.btn:focus-visible, .input:focus-visible, .nav a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.int-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 24px 0 10px; }
.int-soon { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.int-soon > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.int-soon ul { list-style: none; margin: 0; padding: 0 18px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 24px; }
.int-soon li { display: grid; grid-template-columns: 28px 1fr; gap: 0 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.int-soon li .logo { grid-row: span 2; width: 28px; height: 28px; font-size: 11px; }
.int-soon li .small { grid-column: 2; }
.int-soon li .logo { border-radius: var(--radius-sm); display: grid; place-items: center; font-weight: 800; color: #fff; }
.spec-more { margin-top: 8px; }
.spec-more > summary { cursor: pointer; color: var(--blue-ink, var(--blue)); font-weight: 600; list-style: none; }
.spec-more > summary::-webkit-details-marker { display: none; }
.spec-more[open] > summary { margin-bottom: 4px; }

/* ── Start here + guide panel (js/guide.js) ─────────────────────────────── */
.gd { max-width: 1080px; }
.gd-hero { padding: 8px 0 20px; }
.gd-hero h2 { font-size: 26px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.02em; }
.gd-hero p { margin: 0 0 16px; font-size: 14.5px; }
.gd-search { height: 46px; font-size: 15px; padding: 0 16px; max-width: 640px; }
.gd-resume { display: flex; align-items: center; gap: 16px; border-color: var(--blue-line, var(--blue)); margin-bottom: 8px; }
.gd-resume > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gd-group { margin-top: 22px; }
.gd-group h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.gd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.gd-task { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; box-shadow: var(--shadow-xs); transition: border-color .12s, transform .12s; }
.gd-task:hover, .gd-task:focus-visible { border-color: var(--blue); outline: none; }
.gd-task b { font-size: 14.5px; font-weight: 600; }
.gd-task span { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.gd-task em { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 4px; }
.gd-prompt { display: flex; align-items: center; gap: 12px; text-decoration: none !important; color: var(--ink); margin-bottom: 16px; }
.gd-prompt b { font-size: 14.5px; }
.gd-prompt .muted { flex: 1; min-width: 12em; }
.gd-panel { position: fixed; right: 20px; bottom: 72px; z-index: 45; width: 340px; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.gd-panel[hidden] { display: none; }
.gd-panel header, .gd-panel footer { display: flex; align-items: center; gap: 6px; }
.gd-panel .spacer { flex: 1; }
.gd-x { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; }
.gd-x:hover { background: var(--panel-2); color: var(--ink); }
.gd-title { font-size: 15px; font-weight: 600; }
.gd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: gd; }
.gd-steps li { counter-increment: gd; }
.gd-steps button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 3px 0; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.gd-steps button::before { content: counter(gd); flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--panel-2); color: var(--muted); }
.gd-steps li.done button::before { content: '✓'; background: var(--good); color: #fff; }
.gd-steps li.now button { color: var(--ink); font-weight: 600; }
.gd-steps li.now button::before { background: var(--blue); color: #fff; }
.gd-now { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.gd-now b { font-size: 13.5px; }
.gd-now p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.gd-pill { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--ink); font: 600 13px var(--sans); cursor: pointer; padding: 0; }
.gd-panel:has(.gd-pill) { width: auto; padding: 10px 14px; border-radius: 22px; }
.gd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.gd-spot { position: relative; z-index: 2; outline: 3px solid var(--blue) !important; outline-offset: 3px; animation: gdpulse 1.2s ease-in-out 5; }
@keyframes gdpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(53, 80, 216, .45); } 50% { box-shadow: 0 0 0 10px rgba(53, 80, 216, 0); } }
@media (max-width: 760px) { .gd-panel { right: 12px; left: 12px; width: auto; bottom: 76px; } }

/* Job flow */
.fl-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 3px; overflow-x: auto; }
.fl-steps li { flex: 1; min-width: 74px; border-top: 4px solid var(--line); padding-top: 6px; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-steps li span { display: block; overflow: hidden; text-overflow: ellipsis; }
.fl-steps li.done { border-top-color: var(--good); color: var(--ink-2); }
.fl-steps li.skip { border-top-style: dashed; color: var(--faint); }
.fl-steps li.cur { border-top-color: var(--blue); color: var(--blue-ink); font-weight: 600; }
.fl-steps li.cur.stuck { border-top-color: var(--bad); color: var(--bad); }
.fl-steps.sm li { min-width: 58px; font-size: 11px; }
.fl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.fl-job { padding: 14px 16px; margin-bottom: 10px; }
.fl-job:hover { border-color: var(--line-2); }
.fl-job-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fl-next { margin: 8px 0 0; color: var(--ink-2); }
.fl-log { padding: 14px 16px; position: sticky; top: 12px; }
.fl-log-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.fl-log-row:first-of-type { border-top: 0; }
.fl-log-row > .muted { white-space: nowrap; }
button.stat { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.fl-po { display: flex; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); }
.fl-po:first-of-type { border-top: 0; }
.fl-po .grow { flex: 1; min-width: 0; }
.fl-po-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 150px; }
.fl-lines { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.fl-master { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.fl-rules { padding: 6px 18px 16px; }
.fl-when { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.fl-when:first-child { border-top: 0; }
.fl-num { width: 24px; height: 24px; border-radius: 99px; background: var(--blue-wash); color: var(--blue-ink); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.fl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.fl-row > span:first-child { min-width: 200px; color: var(--ink-2); }
.fl-rule { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; cursor: pointer; }
.fl-rule input { margin-top: 3px; }
.fl-rule > span { display: flex; flex-direction: column; font-size: 13px; }
.fl-card { padding: 14px 16px; }
.fl-card .card-h { margin-bottom: 0; }
.fl-orders { margin-top: 10px; border-top: 1px solid var(--line); }
.fl-order { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.fl-did { margin-top: 10px; }
.fl-did > div { padding: 3px 0; }
.sig-pad { width: 100%; height: 150px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: #fff; touch-action: none; display: block; }
.po-approved { display: flex; align-items: center; gap: 12px; }
.po-approved img { height: 36px; background: #fff; border-radius: 4px; padding: 2px 6px; }
@media (max-width: 960px) { .fl-grid { grid-template-columns: minmax(0, 1fr); } .fl-log { position: static; } }
@media (max-width: 600px) { .fl-po { flex-direction: column; } .fl-po-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; } .fl-row > span:first-child { min-width: 0; flex-basis: 100%; } }
/* Purchase order: the supplier's photos and messages */
.po-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0; }
.po-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); display: block; }
.po-msgs { display: flex; flex-direction: column; gap: 6px; }
.po-msg { background: var(--panel-2); border-radius: var(--radius-sm); padding: 8px 10px; max-width: 80%; white-space: pre-wrap; font-size: 14px; }
.po-msg.mine { background: var(--blue-wash); align-self: flex-end; }
.po-msg small { display: block; color: var(--muted); font-size: 12px; }
.po-steps { display: flex; gap: 4px; margin-top: 12px; }
.po-steps div { flex: 1; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-steps div i { display: block; height: 6px; border-radius: 3px; background: var(--panel-2); margin-bottom: 5px; }
.po-steps div.done i { background: var(--blue-line); }
.po-steps div.cur { color: var(--ink); font-weight: 600; }
.po-steps div.cur i { background: var(--blue); }

/* "Confirm your email" banner for new owners (lib/email-verify.js). */
.confirm-email { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 24px 12px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--panel-2); font-size: 13.5px; }
.confirm-email span { flex: 1 1 260px; }
@media (max-width: 640px) { .confirm-email { margin: 0 16px 12px; } }
/* AI allowance bar on Plan & billing. */
.ai-meter { height: 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; margin: 4px 0 8px; }
.ai-meter span { display: block; height: 100%; background: var(--trade, var(--blue)); }
