/* SignAcctPro — soft raised UI in the brand colors (purple #7F3F98, navy #262262) */

:root {
  --bg1: #F4F5F9; --bg2: #E7E9F0;
  --surface: linear-gradient(180deg, #FBFBFD, #EEEFF5);
  --surface-flat: #F1F2F7;
  --ink: #262262; --text: #22223A; --muted: #5E5F78; --line: #DADCE6;
  --brand: #7F3F98; --brand-2: #5E2A78; --brand-soft: #F0E6F5; --brand-ink: #6A2F82;
  --grad: linear-gradient(145deg, #9A55B5, #6C2F86);
  --ok: #0F7A4B; --ok-bg: #DDF4E8; --warn: #8A4B08; --warn-bg: #FFF0D6; --err: #A61B1B; --err-bg: #FDE2E2; --info-bg: #E6E3F5;
  --raise: 9px 9px 22px rgba(150,152,180,.38), -8px -8px 20px rgba(255,255,255,.96);
  --raise-sm: 5px 5px 12px rgba(150,152,180,.38), -4px -4px 10px rgba(255,255,255,.96);
  --inset: inset 4px 4px 9px rgba(150,152,180,.42), inset -4px -4px 9px rgba(255,255,255,.95);
  --glow: 0 9px 20px rgba(127,63,152,.38), inset 0 1px 0 rgba(255,255,255,.4);
  --edge: 1px solid rgba(255,255,255,.85);
  --r: 22px; --r-sm: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg2); min-height: 100%; }
body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif; color: var(--text); background: linear-gradient(160deg, var(--bg1), var(--bg2)); background-attachment: fixed; min-height: 100vh; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-ink); }
a:hover { color: var(--ink); }
h1, h2, h3 { color: var(--ink); margin: 0; }
h1 { font-size: 28px; letter-spacing: -.5px; }
h2 { font-size: 17px; font-weight: 600; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid rgba(127,63,152,.45); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { display: flex; gap: 26px; padding: 24px; min-height: 100vh; align-items: flex-start; }
.side { position: sticky; top: 24px; flex: 0 0 252px; border-radius: 26px; background: var(--surface); box-shadow: var(--raise); border: var(--edge); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 48px); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 16px; text-decoration: none; }
.brand img { height: 46px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 10px; border-radius: 14px; text-decoration: none; color: var(--text); font-weight: 500; font-size: 14px; }
.nav a .txt { white-space: nowrap; }
.nav a .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); color: var(--muted); flex: none; }
.nav a:hover .ico { color: var(--brand); }
.nav a.on { color: var(--ink); font-weight: 600; }
.nav a.on .ico { background: var(--grad); color: #fff; box-shadow: var(--glow); border-color: transparent; }
.nav .soon { margin-left: auto; font-size: 9px; font-weight: 600; letter-spacing: .5px; color: var(--muted); background: var(--surface-flat); padding: 2px 7px; border-radius: 999px; }
.nav-grp { margin-top: 6px; }
.nav-head { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); text-align: start; border-radius: 10px; }
.nav-head:hover { color: var(--ink); }
.nav-head .dot { width: 8px; height: 8px; border-radius: 4px; flex: none; }
.nav-head .lbl { flex: 1; }
.nav-head .chev { transform: rotate(90deg); transition: transform .15s; }
.nav-grp.shut .nav-head .chev { transform: none; }
.nav-grp.shut .nav-items { display: none; }
.nav-items a { min-height: 42px; }
.nav-items a .ico { width: 32px; height: 32px; border-radius: 10px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; color: var(--muted); padding: 14px 10px 6px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.side-foot .who { min-width: 0; flex: 1; font-size: 13px; }
.side-foot .who b { display: block; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.topbar { display: none; }

/* ---------- surfaces ---------- */
.card { border-radius: var(--r); background: var(--surface); box-shadow: var(--raise); border: var(--edge); padding: 22px; }
.card > h2 + * { margin-top: 14px; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.grid { display: grid; gap: 20px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.cols { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.cols > .wide { flex: 999 1 520px; min-width: 0; }
.cols > .narrow { flex: 1 1 300px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 1.6px; color: var(--brand); }

.kpi { display: flex; flex-direction: column; gap: 8px; }
.kpi .top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .chip { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-flat); box-shadow: var(--inset); color: var(--brand); }
.kpi .chip.hot { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.kpi .num { font-size: 28px; font-weight: 700; letter-spacing: -.6px; color: var(--ink); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 15px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--brand); }
.btn:active { box-shadow: var(--inset); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.06); color: #fff; }
.btn.danger { color: var(--err); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea, .input { font: inherit; font-size: 15px; color: var(--text); background: var(--surface-flat); border: 1px solid transparent; border-radius: 13px; padding: 0 14px; min-height: 46px; box-shadow: var(--inset); width: 100%; }
.field textarea { padding: 12px 14px; min-height: 110px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: rgba(127,63,152,.55); box-shadow: var(--inset), 0 0 0 3px rgba(127,63,152,.16); }
.field .hint { font-weight: 400; font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); min-height: 32px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.search { display: flex; align-items: center; gap: 10px; min-height: 46px; min-width: 260px; padding: 0 16px; border-radius: 15px; background: var(--surface-flat); box-shadow: var(--inset); }
.search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14px; outline: none; color: var(--text); }
.section-title { font-size: 15px; font-weight: 600; color: var(--ink); margin: 6px 0 2px; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

/* ---------- alerts & pills ---------- */
.alert { border-radius: 14px; padding: 12px 16px; font-size: 14px; font-weight: 500; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--err-bg); color: var(--err); }
.alert.info { background: var(--info-bg); color: var(--ink); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-flat); color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.err { background: var(--err-bg); color: var(--err); }
.pill.brand { background: var(--brand-soft); color: var(--brand-ink); }
.copybox { display: flex; gap: 8px; align-items: center; }
.copybox input { flex: 1; }

/* ---------- lists & tables ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: grid; gap: 12px; align-items: center; min-height: 54px; padding: 8px 14px; border-radius: 14px; background: linear-gradient(180deg, #FCFCFE, #F2F3F8); box-shadow: 4px 4px 10px rgba(150,152,180,.25), -3px -3px 8px rgba(255,255,255,.9); }
.list-head { display: grid; gap: 12px; padding: 0 14px 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.scroll-x { overflow-x: auto; padding: 4px 6px 10px; margin: -4px -6px -10px; }
.matrix { border-collapse: separate; border-spacing: 0 6px; width: 100%; min-width: 760px; }
.matrix th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 6px; text-align: center; vertical-align: bottom; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix td { padding: 4px 6px; text-align: center; font-size: 14px; }
.matrix tr td:first-child { padding-left: 12px; }
.tick { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; }
.tick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.tick span { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-flat); box-shadow: var(--inset); display: grid; place-items: center; color: transparent; }
.tick input:checked + span { background: var(--grad); box-shadow: var(--glow); color: #fff; }
.tick input:focus-visible + span { outline: 3px solid rgba(127,63,152,.45); outline-offset: 2px; }
.tick.locked span, .tick.locked input:checked + span { background: #E4E2EE; box-shadow: none; color: var(--muted); }

/* pipeline */
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px; }
.stage { border-radius: 18px; padding: 12px 14px; min-height: 74px; background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); display: flex; flex-direction: column; gap: 2px; }
.stage b { font-size: 24px; color: var(--ink); }
.stage span { font-size: 12px; font-weight: 600; color: var(--muted); }

/* checklist */
.todo { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 12px; border-radius: 14px; text-decoration: none; color: var(--text); }
.todo:hover { background: rgba(255,255,255,.6); }
.todo .dot { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-flat); box-shadow: var(--inset); flex: none; color: transparent; }
.todo.done .dot { background: var(--grad); box-shadow: var(--glow); color: #fff; }
.todo.done .t { color: var(--muted); text-decoration: line-through; }
.meter { height: 10px; border-radius: 6px; background: #E2E3EC; box-shadow: inset 2px 2px 4px rgba(150,152,180,.5), inset -2px -2px 4px rgba(255,255,255,.9); }
.meter > i { display: block; height: 10px; border-radius: 6px; background: var(--grad); box-shadow: 0 0 10px rgba(127,63,152,.45); }

.hero-band { border-radius: var(--r); padding: 24px; color: #fff; background: linear-gradient(140deg, #8E4BAA 0%, #6A2F82 55%, #262262 100%); box-shadow: 0 16px 32px rgba(38,34,98,.28), inset 0 1px 0 rgba(255,255,255,.3); }
.hero-band h2 { color: #fff; }
.logo-box { width: 160px; height: 96px; border-radius: 16px; background: #fff; box-shadow: var(--inset); display: grid; place-items: center; overflow: hidden; }
.logo-box img { max-width: 92%; max-height: 84%; }
.empty { text-align: center; padding: 40px 20px; }
.empty .big { width: 70px; height: 70px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; background: var(--grad); box-shadow: var(--glow); }

/* ---------- auth pages ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 440px; border-radius: 28px; background: var(--surface); box-shadow: var(--raise); border: var(--edge); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.auth-card.wide { max-width: 520px; }
.auth-logo { height: 56px; align-self: center; margin-bottom: 6px; }
.auth-card h1 { font-size: 24px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-top: -8px; }
.auth-foot { text-align: center; font-size: 14px; color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .side { flex-basis: 84px; padding: 16px 10px; align-items: center; }
  .brand img { height: 30px; content: url('../img/logo-mark.svg'); }
  .nav a { justify-content: center; padding: 0; }
  .nav a .txt, .nav .soon, .nav-label, .side-foot .who { display: none; }
  .nav-head { justify-content: center; min-height: 14px; padding: 0; cursor: default; }
  .nav-head .lbl, .nav-head .chev { display: none; }
  .nav-grp.shut .nav-items { display: block; }
  .side-foot { flex-direction: column; }
}
@media (max-width: 720px) {
  .shell { flex-direction: column; padding: 14px 16px 24px; gap: 16px; align-items: stretch; }
  .main { width: 100%; }
  .side { display: none; position: fixed; inset: 0; z-index: 50; max-height: none; border-radius: 0; flex-basis: auto; align-items: stretch; }
  .side.open { display: flex; }
  .side .brand img { content: url('../img/logo.svg'); height: 34px; }
  .nav a { justify-content: flex-start; padding: 0 10px; }
  .nav a .txt, .nav .soon, .nav-label, .side-foot .who { display: initial; }
  .side-foot { flex-direction: row; }
  .topbar { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .topbar img { height: 32px; }
  .search { min-width: 0; width: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .kpi .num { font-size: 22px; }
  .kpi .small { font-size: 12px; }
  .card { padding: 18px; }
  h1 { font-size: 24px; }
  .auth-card { padding: 24px 20px; }
}
.side-close { display: none; }
@media (max-width: 720px) { .side-close { display: inline-flex; align-self: flex-end; } }

/* ---------- stage 2: lists, tabs, builder ---------- */
a.rowlink { text-decoration: none; color: var(--text); }
a.rowlink:hover { box-shadow: 4px 4px 10px rgba(150,152,180,.25), -3px -3px 8px rgba(255,255,255,.9), inset 0 0 0 2px rgba(127,63,152,.22); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); }
.tabs a span { font-size: 12px; color: var(--muted); }
.tabs a.on { background: var(--grad); color: #fff; box-shadow: var(--glow); border-color: transparent; }
.tabs a.on span { color: #F0E6F5; }
.title-input { display: block; width: 100%; font: inherit; font-size: 26px; font-weight: 700; letter-spacing: -.4px; color: var(--ink); border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 4px 8px; margin: 6px 0 2px -8px; }
.title-input:hover:not(:disabled) { background: rgba(255,255,255,.6); }
.title-input:focus { outline: none; background: var(--surface-flat); box-shadow: var(--inset); }
.inline-date { font: inherit; font-size: 13px; color: var(--text); border: 0; background: var(--surface-flat); box-shadow: var(--inset); border-radius: 8px; padding: 3px 8px; }
.source-band { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; background: linear-gradient(180deg, #FBF7FD, #F1E9F6); }
.adder { position: relative; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.results { position: absolute; z-index: 20; top: 52px; left: 0; right: 0; max-width: 680px; margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: #fff; box-shadow: 0 18px 40px rgba(38,34,98,.18); max-height: 360px; overflow-y: auto; }
.results li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.results li.act, .results li[data-pick]:hover { background: var(--brand-soft); }
.results li.none { cursor: default; }
.mat-table { min-width: 900px; }
.mat-table td:first-child { min-width: 260px; }
.mat-table td { vertical-align: middle; }
.mat-table .input { min-height: 40px; font-size: 14px; }
.input.num { text-align: right; }
.narrow-in { width: 96px; }
.unit-in { width: 76px; }
.input.changed { border-color: rgba(166,107,13,.6); background: #FFF6E5; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strong-cell { font-weight: 600; color: var(--ink); }
.group-box { border-radius: 16px; padding: 14px 16px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 10px; }
.group-head { display: flex; justify-content: space-between; gap: 8px; color: var(--ink); }
.group-head .gt { font-weight: 700; font-variant-numeric: tabular-nums; }
.formula { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--muted); }
.markups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mk { min-height: 44px; border-radius: 12px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.mk.on { background: var(--grad); color: #fff; box-shadow: var(--glow); border-color: transparent; }
.mk:disabled { opacity: .55; cursor: not-allowed; }
.sum { display: flex; flex-direction: column; gap: 8px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.sum div { display: flex; justify-content: space-between; gap: 10px; }
.sum span { color: var(--muted); }
.sum b { font-weight: 500; font-variant-numeric: tabular-nums; }
.sum .strong b, .sum .strong span { font-weight: 700; color: var(--ink); }
.sum .good b { color: var(--ok); font-weight: 600; }
.grand { display: flex; justify-content: space-between; align-items: baseline; border-radius: 14px; padding: 14px 16px; color: #fff; background: linear-gradient(140deg, #8E4BAA, #6A2F82 55%, #262262); box-shadow: 0 12px 24px rgba(38,34,98,.25); }
.grand b { font-size: 24px; font-variant-numeric: tabular-nums; }
.sticky-col { position: sticky; top: 24px; }
.item-row { display: grid; grid-template-columns: 2.4fr 1fr 1.1fr .8fr 1fr auto; gap: 8px; align-items: center; padding: 4px 0; }
.item-row .input { min-height: 40px; font-size: 14px; }
.items-table tr.ro td { padding: 10px 6px; text-align: left; }
@media (max-width: 1100px) { .sticky-col { position: static; } }
@media (max-width: 720px) { .title-input { font-size: 21px; } .item-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Stage 3: invoices, payments, ledger, reports ---------- */
.inv-line { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; }
.inv-line .input { min-height: 44px; }
.totals-box { margin-left: auto; width: 320px; max-width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 16px; background: var(--surface-flat); box-shadow: var(--inset); }
.totals-box > div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.totals-box .grand { margin: 4px -6px; padding: 10px 14px; font-size: 15px; color: #fff; }
.totals-box .grand b { font-size: 20px; color: #fff; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.book { width: 100%; border-collapse: collapse; font-size: 14px; }
table.book th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
table.book td { padding: 9px 8px; border-bottom: 1px solid var(--line, rgba(0,0,0,.05)); vertical-align: top; }
table.book tr.sub td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--line, rgba(0,0,0,.12)); }
table.book tr.head td { font-weight: 700; color: var(--brand-ink); padding-top: 18px; }
table.book .ind { padding-left: 22px; }
table.book a { color: inherit; }
.jl-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr auto; gap: 8px; align-items: center; }
.jl-row .input, .jl-row select { min-height: 44px; }
.balanced { font-weight: 700; }
.balanced.ok { color: var(--ok); } .balanced.no { color: var(--err); }
@media (max-width: 700px) {
  .inv-line { grid-template-columns: 1fr 110px auto; }
  .jl-row { grid-template-columns: 1fr 1fr; }
  .jl-row select { grid-column: 1 / -1; }
}

/* ---------- Stage 4: jobs board, job page, proofs ---------- */
.jobs-bar { justify-content: space-between; gap: 12px; }
.board { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 14px; align-items: flex-start; scroll-snap-type: x proximity; }
.bcol { flex: 0 0 272px; scroll-snap-align: start; border-radius: 20px; background: var(--surface-flat); box-shadow: var(--inset); padding: 12px; min-height: 160px; display: flex; flex-direction: column; gap: 10px; transition: background .15s; }
.bcol.over { background: var(--brand-soft); }
.bcol header { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); padding: 2px 4px; }
.bcol header .dot, .stagepill::before { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); flex: none; }
.bdrop { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.jcard { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); text-decoration: none; color: var(--text); cursor: grab; }
.jcard:hover { color: var(--text); box-shadow: var(--raise); }
.jcard.dragging { opacity: .45; }
.jthumb { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; background: #fff; }
.jtop { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.jtitle { color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.jpills { display: flex; flex-wrap: wrap; gap: 4px; }
.jpills .pill, .pill.tag { font-size: 11px; padding: 2px 8px; }
.pill.tag { background: #E8EAF2; color: var(--muted); }
.jfoot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.jfoot .meter { flex: 1; }
.meter.thin, .meter.thin > i { height: 6px; }
.avatar.xs { width: 26px; height: 26px; border-radius: 9px; font-size: 11px; }
.stagepill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fff; color: var(--ink); box-shadow: var(--raise-sm); white-space: nowrap; }
.stagepill::before { content: ""; }
.steps { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.steps form { flex: 1 0 auto; }
.step { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--surface-flat); box-shadow: var(--inset); color: var(--muted); }
.step.past { color: var(--text); } .step.past .n { background: var(--sc); color: #fff; box-shadow: none; }
.step.now { color: #fff; background: var(--sc); box-shadow: 0 8px 18px rgba(38,34,98,.22); cursor: default; } .step.now .n { background: rgba(255,255,255,.25); color: #fff; box-shadow: none; }
.step:not(.now):hover { color: var(--ink); }
.proof-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; align-items: end; }
.proof-row { display: flex; gap: 14px; padding: 12px; border-radius: 16px; background: var(--surface-flat); box-shadow: var(--inset); }
.proof-row.faded { opacity: .6; }
.pthumb { flex: 0 0 110px; height: 90px; border-radius: 10px; overflow: hidden; background: #fff; display: grid; place-items: center; font-weight: 700; color: var(--brand); text-decoration: none; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
img.sig { display: block; max-width: 240px; width: 100%; background: #fff; border-radius: 8px; margin: 8px 0; border-bottom: 1px solid var(--line); }
.quote-box { background: #fff; border-radius: 10px; padding: 8px 12px; margin-top: 4px; white-space: normal; font-size: 14px; }
.tasks { gap: 4px; }
.task { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; }
.task:hover { background: rgba(255,255,255,.6); }
.task .t { flex: 1; min-width: 0; }
.task .tick { width: 30px; height: 30px; flex: none; border-radius: 10px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); color: transparent; display: grid; place-items: center; cursor: pointer; }
.task.done .tick { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.task.done .t { color: var(--muted); text-decoration: line-through; }
.task .x { border: 0; background: none; color: var(--muted); cursor: pointer; opacity: 0; width: 30px; height: 30px; }
.task:hover .x, .task .x:focus { opacity: 1; }
.task-add { display: grid; grid-template-columns: 1fr 150px 150px auto; gap: 8px; margin-top: 12px; }
.task-add .input { min-height: 44px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.gallery figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--raise-sm); }
.gallery img { display: block; width: 100%; height: 120px; object-fit: cover; }
.gallery figcaption { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 6px 8px; color: var(--muted); }
.btn.xs { min-height: 28px; padding: 0 8px; font-size: 12px; border-radius: 9px; }
.kv > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.05); font-variant-numeric: tabular-nums; }
.kv > div span { color: var(--muted); }
.kv > div.big { font-size: 16px; border-bottom: 0; padding-top: 10px; }
.timeline { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-height: 560px; overflow-y: auto; }
.timeline li { display: flex; gap: 10px; align-items: flex-start; }
.timeline li > div { min-width: 0; flex: 1; }
.timeline .ev-proof_approved .avatar { background: var(--ok-bg); color: var(--ok); }
.timeline .ev-proof_changes .avatar { background: var(--err-bg); color: var(--err); }
form.busy { opacity: .6; pointer-events: none; }
@media (max-width: 700px) {
  .bcol { flex-basis: 84vw; }
  .task-add { grid-template-columns: 1fr 1fr; }
  .task-add .input:first-child { grid-column: 1 / -1; }
  .proof-row { flex-direction: column; }
  .pthumb { flex-basis: auto; width: 100%; height: 160px; }
  .task .x { opacity: 1; }
}

/* ---------- Stage 5: sign calculator ---------- */
.sc-dialog { width: min(1080px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: var(--edge); border-radius: 24px; padding: 22px; background: linear-gradient(160deg, var(--bg1), var(--bg2)); box-shadow: 0 30px 80px rgba(38,34,98,.35); color: var(--text); }
.sc-dialog::backdrop { background: rgba(38,34,98,.35); backdrop-filter: blur(2px); }
.sc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sc-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.sc-type { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); font: inherit; cursor: pointer; color: var(--text); min-height: 64px; }
.sc-type b { color: var(--ink); font-size: 14px; } .sc-type span { font-size: 12px; color: var(--muted); }
.sc-type.on { background: var(--grad); box-shadow: var(--glow); border-color: transparent; } .sc-type.on b, .sc-type.on span { color: #fff; }
.sc-table { min-width: 760px; } .sc-table select { max-width: 380px; width: 100%; min-height: 38px; }
.sc-table tr.off td { opacity: .45; }
.sc-labor { margin-top: 12px; }
.sc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; position: sticky; bottom: -22px; padding: 12px 0 0; background: inherit; }
.sc-foot b { font-size: 18px; color: var(--ink); }

.quick { position: relative; margin: 0 4px 10px; }
.quick summary { list-style: none; width: 100%; } .quick summary::-webkit-details-marker { display: none; }
.quick-menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); display: flex; flex-direction: column; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 16px 40px rgba(38,34,98,.22); }
.quick-menu a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 500; font-size: 14px; }
.quick-menu a:hover, .quick-menu a:focus { background: var(--brand-soft); color: var(--ink); }

/* ---------- v0.5: product lines on quotations ---------- */
.prod-add { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 14px; }
.prod-chip { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; min-height: 58px; border-radius: 16px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); font: inherit; color: var(--text); cursor: pointer; }
.prod-chip:hover { box-shadow: var(--raise); }
.prod-chip .ic, .prod-head .ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 18px; font-weight: 700; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.prod-chip b { display: block; color: var(--ink); font-size: 13.5px; } .prod-chip small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.prod { border-radius: 18px; background: var(--surface-flat); box-shadow: var(--inset); padding: 12px 14px; }
.prod.open { background: var(--surface); box-shadow: var(--raise); border: var(--edge); }
.prod-head { display: flex; align-items: center; gap: 12px; }
.prod-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prod-title b { color: var(--ink); font-size: 15px; }
.prod-title .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-price { text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.prod-price b { font-size: 17px; color: var(--ink); }
.prod-body { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.prod-main, .prod-opts, .prod-labor, .prod-text { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.prod-opts { padding: 12px; border-radius: 14px; background: var(--brand-soft); }
.prod-sec { display: flex; flex-direction: column; gap: 8px; }
.parts { min-width: 760px; } .parts tr.off td { opacity: .45; } .parts select { width: 100%; max-width: 420px; min-height: 38px; }
.stepper { display: flex; align-items: stretch; gap: 6px; } .stepper .input { text-align: center; min-width: 0; flex: 1; }
.stepper button { width: 44px; border-radius: 12px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); font-size: 20px; color: var(--ink); cursor: pointer; }
.cx { display: flex; align-items: center; gap: 8px; min-height: 46px; font-size: 12px; color: var(--muted); } .cx input { flex: 1; accent-color: var(--brand); }
.breakdown summary { cursor: pointer; font-weight: 600; color: var(--ink); min-height: 32px; display: flex; align-items: center; }
.breakdown .kv { margin-top: 8px; }
.linkbtn { border: 0; background: none; color: var(--brand-ink); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.p-results { position: static; max-height: 260px; overflow: auto; }
.compare:not(:empty) { padding: 10px; border-radius: 12px; background: #fff; }
@media (max-width: 700px) { .prod-head { flex-wrap: wrap; } .prod-price { text-align: left; } .prod-add { grid-template-columns: 1fr 1fr; } }

.stage-select { min-height: 36px; padding: 0 30px 0 26px; border-radius: 999px; border: var(--edge); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
  background: #fff radial-gradient(circle at 13px 50%, var(--sc) 5px, transparent 6px) no-repeat; box-shadow: var(--raise-sm); appearance: auto; }
.stage-select.saved { outline: 2px solid var(--ok); }

/* ---------- v0.6: expenses & monthly summary ---------- */
.spend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.spend-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; min-height: 96px; border-radius: 18px; text-decoration: none; color: var(--text); background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); }
.spend-tile .ic { font-size: 24px; line-height: 1; }
.spend-tile b { color: var(--ink); font-size: 14px; line-height: 1.25; }
.spend-tile small { color: var(--muted); font-size: 12px; margin-top: auto; }
.spend-tile:hover { box-shadow: var(--raise); color: var(--text); }
.spend-tile.on { background: var(--grad); box-shadow: var(--glow); } .spend-tile.on b, .spend-tile.on small { color: #fff; }
.spend-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-flat); box-shadow: var(--inset); }
.paid-with { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pw { position: relative; } .pw input { position: absolute; opacity: 0; }
.pw span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); font-weight: 600; font-size: 14px; cursor: pointer; }
.pw input:checked + span { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.pw input:focus-visible + span { outline: 3px solid rgba(127,63,152,.45); }
.due-card { border: 2px solid #F3D49B; }
.due-row { grid-template-columns: auto 1fr auto; align-items: center; cursor: pointer; }
.pay-row { display: grid; grid-template-columns: 1fr 160px; gap: 8px; } .pay-row .input { min-height: 44px; }
.story p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink); }
.delta { font-size: 12.5px; font-weight: 600; color: var(--muted); } .delta.up { color: var(--ok); } .delta.down { color: var(--err); }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hbar .track { height: 12px; border-radius: 6px; background: #E9EAF1; } .hbar .track i { display: block; height: 12px; border-radius: 0 4px 4px 0; background: #7F3F98; }
.hbar:hover .track i { background: #5E2A78; } .hbar .v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.legend { display: inline-flex; gap: 14px; font-size: 13px; color: var(--text); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
svg.trend { width: 100%; height: auto; display: block; margin-top: 8px; }
svg.trend .ax { font-size: 13px; fill: #5E5F78; } svg.trend .pv { font-size: 12px; font-weight: 600; fill: #0F7A4B; } svg.trend .pv.neg { fill: #A61B1B; }
svg.trend .tb:hover rect:first-child { fill: rgba(127,63,152,.06); } svg.trend .tb.now .ax { font-weight: 700; fill: #262262; }
@media (max-width: 700px) { .hbar { grid-template-columns: 1fr auto; } .hbar .track { grid-column: 1 / -1; grid-row: 2; } .pay-row { grid-template-columns: 1fr 120px; } }
@media print { .side, .topbar, .noprint, .page-head .row, .quick { display: none !important; } .shell { display: block; padding: 0; } .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; } body { background: #fff; } }

.month-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 16px 22px; }
.month-strip > div { display: flex; flex-direction: column; } .month-strip b { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.month-strip .btn { margin-left: auto; }

/* ---------- v0.7: staff & payroll ---------- */
.who-paid { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pay-card.off { opacity: .45; } .pay-card.neg { outline: 2px solid var(--err); }
.pay-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.pay-head .pn { font-size: 17px; color: var(--ink); }
.pay-net { text-align: right; display: flex; flex-direction: column; } .pay-net b { font-size: 22px; color: var(--ok); font-variant-numeric: tabular-nums; }
.pay-card.neg .pay-net b { color: var(--err); }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 18px; align-items: start; }
.pay-col { display: flex; flex-direction: column; gap: 10px; }
.pay-h { font-weight: 600; color: var(--ink); font-size: 14px; }
.pay-col .input { min-height: 42px; }
.pay-sum { padding: 12px 14px; border-radius: 14px; background: var(--surface-flat); box-shadow: var(--inset); gap: 6px; }
.pay-sum > div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; font-size: 14px; }
.pay-sum .strong { font-weight: 700; color: var(--ink); } .pay-sum .big { font-size: 17px; border-top: 1px solid var(--line); padding-top: 6px; }
.pay-total { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; position: sticky; bottom: 10px; z-index: 5; }
.pay-total > div:not(.row) { display: flex; flex-direction: column; } .pay-total b { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- v0.8: Design Studio ---------- */
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); min-height: 38px; padding: 0 12px; border-radius: 12px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); cursor: pointer; }
.chip-btn.on { background: var(--grad); color: #fff; box-shadow: var(--glow); } .chip-btn.on .muted { color: #F0E6F5; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.design-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); text-decoration: none; color: var(--text); }
.design-card:hover { box-shadow: var(--raise); color: var(--text); } .design-card b { color: var(--ink); }
.dthumb { height: 150px; border-radius: 12px; background: repeating-conic-gradient(#f0f1f5 0% 25%, #fff 0% 50%) 50% / 18px 18px; display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.dthumb img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }
.studio-body { overflow: hidden; }
.st-app { display: grid; grid-template-columns: 76px 1fr 300px; grid-template-rows: auto 1fr; height: 100vh; }
.st-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff; box-shadow: 0 2px 12px rgba(38,34,98,.08); z-index: 3; flex-wrap: wrap; }
.st-logo img { display: block; }
.st-title { font: inherit; font-weight: 700; font-size: 16px; color: var(--ink); border: 1px solid transparent; border-radius: 10px; padding: 6px 10px; min-width: 120px; max-width: 280px; background: transparent; }
.st-title:hover, .st-title:focus { border-color: var(--line); background: #fff; }
.st-group { display: flex; gap: 6px; align-items: center; } .st-right { margin-left: auto; }
.st-top .btn.on { background: var(--grad); color: #fff; }
.st-tools { display: flex; flex-direction: column; gap: 8px; padding: 12px 8px; background: #F6F6FA; border-right: 1px solid var(--line); overflow-y: auto; }
.st-tools button, .st-upload { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); font: inherit; font-size: 11px; color: var(--text); cursor: pointer; }
.st-tools b, .st-upload b { font-size: 20px; color: var(--ink); line-height: 1.1; }
.st-tools button:hover, .st-upload:hover { box-shadow: var(--raise); }
.st-stage { position: relative; background: #E4E5EC; overflow: hidden; min-width: 0; }
.st-stage.drop { outline: 3px dashed var(--brand); outline-offset: -8px; }
.st-hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: #5E5F78; background: rgba(255,255,255,.8); padding: 4px 10px; border-radius: 8px; pointer-events: none; }
.st-props { overflow-y: auto; background: #F6F6FA; border-left: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.st-panel { background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 1px 4px rgba(38,34,98,.06); display: flex; flex-direction: column; gap: 8px; }
.st-panel h3 { font-size: 14px; margin: 0; }
.st-panel textarea, .st-panel select, .st-panel input[type=number] { font: inherit; font-size: 13px; width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; min-height: 34px; background: #fff; color: var(--text); }
.st-row { display: flex; gap: 8px; flex-wrap: wrap; } .st-row > label { flex: 1 1 100px; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.st-lab { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.st-toggles .btn.on { background: var(--grad); color: #fff; }
.swatches { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.sw { aspect-ratio: 1; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.sw.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); } .sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; max-height: 200px; overflow-y: auto; }
.layers button { width: 100%; text-align: left; font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 8px; border: 0; background: #F3F3F8; cursor: pointer; color: var(--text); }
.layers li.on button { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.colors-used { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.colors-used .dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.2); margin-right: 8px; vertical-align: -2px; }
.st-dialog { width: min(560px, calc(100vw - 24px)); border: 0; border-radius: 20px; padding: 22px; box-shadow: 0 30px 80px rgba(38,34,98,.35); color: var(--text); }
.st-dialog.wide { width: min(1100px, calc(100vw - 24px)); }
.st-dialog::backdrop { background: rgba(38,34,98,.4); }
.dp-prev { width: 100%; border-radius: 10px; border: 1px solid var(--line); margin: 8px 0; }
.mock-stage { position: relative; background: #2a2a35; border-radius: 12px; overflow: hidden; }
.mock-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #ddd !important; pointer-events: none; text-align: center; padding: 20px; }
.mock-ph { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; width: 74px; height: 54px; cursor: pointer; background: #eee; }
.mock-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-flash { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 10; }
@media (max-width: 900px) {
  .st-app { grid-template-columns: 60px 1fr; grid-template-rows: auto 1fr auto; height: auto; min-height: 100vh; }
  .studio-body { overflow: auto; }
  .st-stage { height: 62vh; }
  .st-props { grid-column: 1 / -1; border-left: 0; }
  .st-right { margin-left: 0; }
}
[hidden] { display: none !important; }
.st-top { gap: 8px; } .st-top .btn.sm { padding: 0 11px; min-height: 36px; } .st-title { max-width: 230px; }
.st-group { gap: 4px; }

/* ---------- public website (home, pricing, legal) ---------- */
.pub-in { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.pub-top { position: sticky; top: 0; z-index: 20; background: rgba(244,245,249,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pub-top .pub-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.pub-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pub-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.pub-nav a[aria-current="page"]:not(.btn) { color: var(--brand); }
.pub-main { display: grid; gap: 72px; padding: 48px 0 72px; }
.pub-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; }
.pub-hero h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -1.2px; margin: 10px 0 16px; text-wrap: balance; }
.pub-main .lead { font-size: 18px; color: var(--muted); max-width: 62ch; margin: 0 0 22px; line-height: 1.55; }
.pub-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pub-shot { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--raise); border: var(--edge); }
.pub-shot img, .pub-shots img { display: block; width: 100%; height: auto; }
.pub-features h2, .pub-band h2, .pub-incl h2, .pub-faq h2 { font-size: 28px; letter-spacing: -.5px; margin-bottom: 22px; text-wrap: balance; }
.pub-feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.pub-feat-grid article { padding: 22px; border-radius: var(--r); background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); }
.pub-feat-grid h3 { font-size: 17px; margin-bottom: 8px; }
.pub-feat-grid p { margin: 0; color: var(--muted); line-height: 1.55; }
.pub-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pub-shots figure { margin: 0; display: grid; gap: 10px; }
.pub-shots img { border-radius: 14px; box-shadow: var(--raise-sm); border: var(--edge); }
.pub-shots figcaption { font-weight: 600; color: var(--ink); font-size: 14px; }
.pub-band { text-align: center; display: grid; justify-items: center; gap: 6px; padding-top: 40px; padding-bottom: 40px; border-radius: 26px; background: var(--grad); color: #fff; max-width: 1120px; }
.pub-band h2 { color: #fff; margin: 0; } .pub-band p { margin: 0 0 14px; opacity: .92; }
.pub-band .btn.primary { background: #fff; color: var(--brand-ink); }
.pub-page { display: grid; gap: 18px; max-width: 1160px; }
.pub-page h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -1px; line-height: 1.1; text-wrap: balance; }
.legal { max-width: 820px; } .legal h2 { font-size: 19px; margin-top: 14px; } .legal p, .legal li { line-height: 1.65; max-width: 72ch; } .legal ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.pub-foot { border-top: 1px solid var(--line); padding: 36px 0 28px; display: grid; gap: 14px; }
.pub-foot-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pub-foot-grid p { margin: 6px 0 0; }
.pub-foot-links { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 28px; align-content: start; }
.pub-foot-links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; }
.pub-foot-links a:hover, .pub-nav a:not(.btn):hover { color: var(--brand); }
.pub-toggle { display: inline-flex; padding: 5px; border-radius: 14px; box-shadow: var(--inset); background: var(--surface-flat); gap: 4px; justify-self: start; }
.pub-toggle button { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.pub-toggle button.on { background: var(--surface); color: var(--brand-ink); box-shadow: var(--raise-sm); }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 8px 0; }
.price-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--r); background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); }
.price-card.best { box-shadow: 0 0 0 2px var(--brand), var(--raise-sm); }
.price-card .pill { justify-self: start; background: var(--brand-soft); color: var(--brand-ink); }
.price-card p { margin: 0; }
.price-card .price { font-size: 36px; font-weight: 800; color: var(--ink); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.price-card .price small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.price-card > .btn, .price-card > form { margin-top: auto; } .price-card .pill { align-self: flex-start; }
.price-grid.in-app { margin: 18px 0 14px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px 24px; }
.checks li { padding-left: 28px; position: relative; } .checks li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.pub-incl, .pub-faq { margin-top: 26px; }
.pub-faq details { padding: 14px 0; border-bottom: 1px solid var(--line); max-width: 820px; }
.pub-faq summary { font-weight: 600; color: var(--ink); cursor: pointer; } .pub-faq details p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.contact-box { display: grid; gap: 4px; padding: 20px; border-radius: var(--r); background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); overflow-wrap: anywhere; }
.bill-now { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.bill-plan { font-size: 24px; font-weight: 800; color: var(--ink); margin: 4px 0; display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) { .pub-hero { grid-template-columns: 1fr; } .pub-shots { grid-template-columns: 1fr; } .pub-main { gap: 52px; padding-top: 28px; } }
@media (max-width: 560px) { .pub-nav { gap: 12px; } .pub-nav a:not(.btn) { font-size: 13px; } .pub-foot-links { grid-template-columns: 1fr 1fr; } }

/* ---------- stage 9: approvals & supplier orders ---------- */
.share-box { margin-bottom: 18px; border: 2px solid rgba(127,63,152,.25); }
.order-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.order-lines .input { min-height: 40px; padding: 0 10px; }
.order-groups { display: grid; gap: 14px; }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: rgba(127,63,152,.05); }

/* ---------- inventory (v0.11.0) ---------- */
.inv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.inv-num { font-size: 26px; font-weight: 800; letter-spacing: -.4px; color: var(--ink); }
.inv-num .small { font-size: 14px; font-weight: 600; color: var(--muted); }
a.inv-lowcard { text-decoration: none; color: inherit; }
.inv-lowcard.is-low .inv-num, .inv-stock.is-low .inv-num { color: var(--warn); }
.inv-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.inv-filter input[type=search] { flex: 1 1 260px; min-width: 0; }
.inv-filter select { flex: 0 1 220px; width: auto; }
.inv-filter .input[type=search] { width: auto; }
.inv-sw { display: inline-block; width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); vertical-align: middle; }
.inv-sw.big { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.inv-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.inv-stock { display: flex; gap: 16px; align-items: center; }
.inv-h2 { margin: 0 0 12px; font-size: 17px; }
.inv-tabs { margin-bottom: 12px; }
.inv-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 10px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.inv-colorpick { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.inv-colorpick input[type=color] { width: 46px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid var(--line, #ddd); background: none; }
.inv-move [hidden] { display: none !important; }
@media (max-width: 860px) { .inv-top { grid-template-columns: 1fr; } }

/* ---------- assets & company worth (v0.12.0) ---------- */
.worth-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: center; }
.worth-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.worth-parts div { display: grid; gap: 2px; }
.worth-parts b { font-size: 17px; }
.inv-num.neg { color: var(--bad, #b42318); }
.asset-due { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.asset-fund { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.asset-fund legend { font-weight: 600; margin-bottom: 6px; }
details.card summary { cursor: pointer; }
@media (max-width: 860px) { .worth-card { grid-template-columns: 1fr; } .worth-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Staff record (v0.13.0) */
.hr-rec{margin-top:18px}
.hr-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:12px 0}
.hr-kpis>div{display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid var(--line);border-radius:10px;align-items:flex-start}
.hr-kpis b{font-size:1.35rem;line-height:1.2}
.hr-stars{font-size:.9rem;color:#e0a100;letter-spacing:1px;font-weight:400}
.hr-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}
.hr-actions details{flex:1 1 100%}
.hr-actions details:not([open]){flex:0 0 auto}
.hr-actions summary{list-style:none;display:inline-flex}
.hr-actions summary::-webkit-details-marker{display:none}
.hr-form{display:flex;flex-direction:column;gap:10px;margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:10px}
.hr-scores{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}
.hr-score{border:0;margin:0;padding:0;display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.hr-score legend{font-size:.85rem;margin-bottom:4px;padding:0}
.hr-score label{position:relative}
.hr-score input{position:absolute;opacity:0;inset:0;pointer-events:none}
.hr-score span{display:inline-grid;place-items:center;width:34px;height:34px;border:1px solid var(--line);border-radius:8px;cursor:pointer;font-weight:600}
.hr-score input:checked+span{background:var(--brand);color:#fff;border-color:var(--brand)}
.hr-score input:focus-visible+span{outline:2px solid var(--brand);outline-offset:2px}
.hr-h3{font-size:1rem;margin:18px 0 8px}
.hr-notes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.hr-notes li{padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.hr-notes li div{margin-top:4px}

/* ===== v0.14 Design Studio: mockup to scale, day/night, drawing sheet, "Describe the sign" ===== */
.st-dialog.xwide { width: min(1320px, calc(100vw - 16px)); max-height: calc(100vh - 16px); padding: 16px 18px; }
.mk-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mk-head h2 { margin: 0; font-size: 19px; }
.mk-photos { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.mock-ph.on { border-color: var(--brand); }
.mk-main { display: grid; grid-template-columns: 1fr 280px; gap: 14px; min-height: 0; }
.mk-stage { position: relative; background: #24242f; border-radius: 12px; overflow: hidden; display: grid; place-items: center; min-height: 340px; max-height: calc(100vh - 230px); }
.mk-stage canvas { max-width: 100%; max-height: calc(100vh - 230px); width: auto; height: auto; display: block; touch-action: none; }
.mk-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #ddd; text-align: center; padding: 20px; margin: 0; pointer-events: none; }
.mk-tip { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 10px; pointer-events: none; }
.mk-tip:empty, .mk-tip[hidden] { display: none; }
.mk-side { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: calc(100vh - 230px); }
.mk-panel { background: #F6F6FA; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.mk-panel h3 { margin: 0; font-size: 13.5px; }
.mk-panel select, .mk-panel input[type=number] { font: inherit; font-size: 13px; width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; min-height: 34px; background: #fff; color: var(--text); }
.mk-cal { background: #FDECF5; }
.mk-seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.mk-seg button { font: inherit; font-size: 12.5px; font-weight: 600; border: 0; background: transparent; color: var(--text); padding: 6px 10px; border-radius: 8px; cursor: pointer; min-height: 32px; }
.mk-seg button.on { background: var(--grad); color: #fff; }
.mk-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; } .mk-sp { flex: 1; }
.swatches .sw.on { outline: 2px solid var(--brand); outline-offset: 1px; }
.sheet-fit { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.sheet-fit.ok { background: #E8F6EE; color: #14532D; } .sheet-fit.bad { background: #FFF4E5; color: #7A4300; }
.sp-ex { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 10px; } .sp-ex .chip-btn { min-height: 30px; font-size: 12px; font-weight: 500; }
#sp-text { width: 100%; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; unicode-bidi: plaintext; }
.sp-miss { background: #FFF4E5; color: #7A4300; border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; font-size: 13px; }
.sp-ok { background: #E8F6EE; color: #14532D; border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; font-size: 13px; }
.sp-desc { background: #F6F2F9; border-left: 4px solid var(--brand); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.sp-desc p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink); }
.sp-grid { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.sp-row { display: grid; grid-template-columns: 120px 1fr 170px; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 10px; }
.sp-row.need { background: #FFF4E5; box-shadow: inset 3px 0 0 #E08A00; }
.sp-l { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sp-s { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-c select, .sp-c input { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 9px; padding: 5px 8px; min-height: 32px; background: #fff; color: var(--text); }
.sp-num { width: 86px; } .sp-txt { width: min(100%, 340px); unicode-bidi: plaintext; }
.sp-pics { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-pic { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 84px; padding: 5px 4px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 10.5px; line-height: 1.15; color: var(--text); cursor: pointer; text-align: center; }
.sp-pic.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(127,63,152,.35); background: #F6F2F9; font-weight: 700; }
.spic { width: 56px; height: 38px; border-radius: 6px; color: var(--ink); }
.sp-cols { display: flex; gap: 10px; flex-wrap: wrap; } .sp-cols label { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.sp-cols .dot, .sp-c .dot { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.2); display: inline-block; }
.sp-notes { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.sp-unk { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .sp-unk .chip-btn { min-height: 28px; font-size: 12px; }
.sp-teachbox { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; background: #F6F6FA; border-radius: 12px; padding: 10px; margin-top: 8px; }
.sp-actions { justify-content: flex-end; gap: 8px; margin-top: 12px; }
.sp-panel { border: 1px dashed rgba(127,63,152,.35); }
@media (max-width: 900px) {
  .mk-main { grid-template-columns: 1fr; } .mk-side { max-height: none; } .mk-stage, .mk-stage canvas { max-height: 60vh; }
  .sp-row { grid-template-columns: 1fr; gap: 4px; } .sp-s { text-align: left; }
}
.mk-guess:empty { display: none; } .mk-guess { margin: 0; background: #fff; border-radius: 8px; padding: 6px 8px; }
.mk-presets { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; } .mk-presets .chip-btn { min-height: 28px; font-size: 11.5px; padding: 0 8px; }
.mk-extras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mk-extras li { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: #fff; border-radius: 8px; padding: 4px 6px 4px 10px; font-size: 13px; }
.mk-panel .check { display: flex; gap: 6px; align-items: flex-start; }

/* ---------- dashboard: today + group cards (v0.16) ---------- */
.today .card-head { margin-bottom: 4px; }
.today-list { display: flex; flex-direction: column; }
.today-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.today-row:first-child { border-top: 0; }
.today-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: #E5EEFC; color: #1F4FA8; }
.today-ico.err { background: #FDE7E4; color: #A3271A; }
.today-ico.warn { background: #FCEBDB; color: #8A3F00; }
.today-txt { flex: 1 1 240px; min-width: 0; }
.today-val { color: var(--ink); margin-inline-end: 4px; }
.sec-title { font-size: 18px; margin: 4px 4px 12px; }
.grp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(290px, calc((100% - 36px) / 3))), 1fr)); gap: 18px; }
.grp-card { display: flex; flex-direction: column; gap: 14px; }
.grp-top { display: flex; align-items: center; gap: 12px; }
.grp-top h3 { margin: 0; font-size: 16px; color: var(--ink); }
.grp-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--gc); background: color-mix(in srgb, var(--gc) 13%, #fff); }
.grp-fig { background: var(--surface-flat); border-radius: 13px; padding: 10px 14px; }
.grp-fig b { font-size: 21px; color: var(--gc); font-variant-numeric: tabular-nums; }
.grp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grp-tiles a { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 12px; border-radius: 12px; border: var(--edge); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.grp-tiles a svg { color: var(--gc); flex: none; }
.grp-tiles a span { min-width: 0; line-height: 1.2; }
.grp-tiles a:hover { box-shadow: var(--raise-sm); }
html[dir="rtl"] .nav-grp.shut .nav-head .chev { transform: rotate(180deg); }

/* ---------- slim menu, crumbs and group tabs (v0.17) ---------- */
.nav a.nav-g .ico { color: var(--gc); }
.nav a.nav-g.on .ico { background: var(--gc); color: #fff; box-shadow: none; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); font-weight: 600; text-decoration: none; min-height: 32px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: var(--edge); }
.crumbs a:hover { box-shadow: var(--raise-sm); }
.crumbs .sep { opacity: .6; }
.gtabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; margin: 0 0 18px; background: var(--surface); border: var(--edge); border-radius: 14px; box-shadow: var(--raise-sm); scrollbar-width: thin; }
.gtabs a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; min-height: 40px; padding: 0 14px; border-radius: 11px; color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; }
.gtabs a svg { color: var(--gc); }
.gtabs a:hover { background: var(--surface-flat); }
.gtabs a.on { background: var(--gc); color: #fff; }
.gtabs a.on svg { color: #fff; }
.grp-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 16px; }
.grp-hub-item { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); min-height: 92px; }
.grp-hub-item b { display: block; font-size: 17px; margin-bottom: 3px; }
.grp-hub-item .small { display: block; }
.grp-hub-item:hover { box-shadow: var(--raise); }
.grp-hub-item .grp-ico { width: 52px; height: 52px; border-radius: 16px; }

/* ADA room sign dialog (Design Studio) */
.ada-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .ada-grid { grid-template-columns: 1fr; } }
.ada-form { display: flex; flex-direction: column; gap: 10px; }
.ada-form textarea { width: 100%; font-weight: 700; text-transform: uppercase; }
.ada-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ada-sw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ada-sw button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(0,0,0,.18); background: var(--c); cursor: pointer; padding: 0; }
.ada-sw button[aria-checked="true"] { outline: 3px solid var(--brand, #7F3F98); outline-offset: 2px; }
.ada-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ada-prev { background: #F3F1F7; border-radius: 14px; padding: 8px; }
.ada-prev svg { display: block; width: 100%; height: auto; max-height: 52vh; }
.ada-brl { display: flex; flex-direction: column; gap: 4px; font-size: 22px; line-height: 1.3; }
.ada-brl div { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ada-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.ada-checks li { position: relative; padding-left: 24px; line-height: 1.4; }
.ada-checks li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.ada-checks li.ok::before { content: "✓"; color: #11793F; }
.ada-checks li.warn::before { content: "!"; color: #B54708; width: 16px; text-align: center; }
.ada-checks li.warn { color: #8A3A06; }
.ada-batch summary { cursor: pointer; font-weight: 700; }

/* ADA Sign page: the room-sign tool shown in the page instead of a dialog */
.ada-page dialog.ada-inline { position: static; display: block; inset: auto; width: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: inherit; overflow: visible; }
.ada-page dialog.ada-inline:not([open]) { display: none; }
.ada-page .ada-prev svg { max-height: 60vh; }
.br-out { min-height: 64px; padding: 14px 16px; border-radius: 14px; background: #F3F1F7; font-size: 30px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; letter-spacing: .04em; }
.ada-page #ada-root > p:first-child { display: none; }

/* v0.20 CRM: leads & deals, timeline, follow-ups (logical properties only, so the same rules work right-to-left) */
[hidden] { display: none !important; }
.dcard .dval { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.bnote { margin: -4px 4px 8px; }
.act-form { padding: 14px; border-radius: var(--r-sm); background: var(--surface-flat); box-shadow: var(--inset); gap: 10px; }
.act-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.act-kind { position: relative; }
.act-kind input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.act-kind span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); box-shadow: var(--raise-sm); border: var(--edge); }
.act-kind input:checked + span { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.act-kind input:focus-visible + span { outline: 3px solid rgba(127,63,152,.45); outline-offset: 2px; }
.act-form textarea { min-height: 64px; }
.act-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.act-row .field { flex: 1 1 170px; margin: 0; }
.act-row .btn { min-height: 44px; }
.tl { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; }
.tl li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.tl li:first-child { border-top: 0; }
.tl-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand-ink); }
.tl-ok .tl-ico { background: var(--ok-bg); color: var(--ok); }
.tl-err .tl-ico { background: var(--err-bg); color: var(--err); }
.tl-warn .tl-ico { background: var(--warn-bg); color: var(--warn); }
.tl-muted .tl-ico { background: var(--surface-flat); color: var(--muted); }
.tl-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tl-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tl-done .tl-text { text-decoration: line-through; color: var(--muted); }
.tl-acts { display: flex; gap: 6px; align-items: center; flex: none; }
.fu-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.card-head + .fu-row { border-top: 0; }
.fu-tick { width: 34px; height: 34px; flex: none; border-radius: 10px; border: var(--edge); background: var(--surface); box-shadow: var(--raise-sm); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.fu-tick:hover { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.fu-txt { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.fu-when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.fu-row.late .fu-txt b { color: var(--err); }
.fu-group { margin-bottom: 16px; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "▾"; margin-inline-start: 8px; color: var(--muted); }
details.card[open] > summary::after { content: "▴"; }
@media (min-width: 701px) { #dealboard .bcol { flex: 1 1 0; min-width: 190px; } }
