/* =====================================================================================
   TogetherCRM shell (Richer style, 8 colors, dark + light)
   -------------------------------------------------------------------------------------
   Section A is the reference artifact's stylesheet, copied VERBATIM ("TogetherCRM · Fresh",
   version 1793983483-faf0). The only edit: rules that applied only to the Tesla and Google
   skins were removed. The artifact itself turns those skins off at runtime. Removing them
   was pixel-verified: full-page screenshots at 1440, 820 and 390 px, dark and light, are
   byte-identical before and after.
   Do not edit Section A by hand. Restyle through the tokens in :root, or override in Section B.

   Theme:  html[data-theme="dark"|"light"]  (absent = follow the OS), localStorage "ss-theme"
   Color:  html[data-accent="brass"|"aged"|"sage"|"clay"|"taupe"|"sand"|"charcoal"]
           (absent = baby blue), localStorage "ss-accent"
   Both are applied before first paint by the inline script in _Layout / _AuthLayout <head>.

   Section B (end of file) holds what the server-rendered shell adds: <a> versions of the
   artifact's buttons, #layer overlays, the htmx progress bar, the auth screen, placeholders.
   ===================================================================================== */

/* ===================================================================== */
/* Section 0 · host baseline                                              */
/* The artifact runs inside Claude's artifact page, which adds this small  */
/* reset (copied from that page's <style>). Section A relies on it: no     */
/* body margin, and the safe-area padding on :root for notched phones.     */
/* ===================================================================== */
:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}

/* ===================================================================== */
/* Section A · reference artifact (verbatim)                              */
/* ===================================================================== */
/* TogetherCRM · Sales rep view. One shell (side rail on desktop/iPad, floating dock on phone), one skin at a time — Richer (default), Tesla, Google — each in dark and light. Everything below runs on sample data kept on this device. */
/* ---------- Skin: Richer (default) · dark ---------- */
:root {
  color-scheme: dark;
  --bg: #1a1c21; --bg-2: #1a1c21; --surface: #23262c; --surface-2: #2b2f36; --surface-3: #343943;
  --ink: #f3f4f6; --ink-soft: #9ba1ab; --ink-faint: #666c76; --line: rgba(255,255,255,.07);
  --accent: #3e8bff; --on-accent: #ffffff; --accent-soft: rgba(62,139,255,.15); --tint: rgba(62,139,255,.12); --on-tint: #cfe0ff;
  --ok: #3ecf8e; --ok-soft: rgba(62,207,142,.14); --warn: #ff8a4c; --warn-soft: rgba(255,138,76,.15); --bad: #ff5d6c;
  --sketch: #c9d6ea; --shadow: rgba(0,0,0,.35);
  --font-display: "Montserrat", "Avenir Next", system-ui, sans-serif;
  --font-body: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --r-card: 18px; --r-ctl: 12px; --r-chip: 999px;
  --num-weight: 200; --title-weight: 300;
  --card-bg: var(--surface); --card-shadow: inset 0 1px 0 var(--line), 0 10px 30px -18px var(--shadow);
  --rail-w: 78px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #eceef2; --bg-2: #eceef2; --surface: #ffffff; --surface-2: #f4f5f7; --surface-3: #e8eaee;
    --ink: #16181d; --ink-soft: #5d636d; --ink-faint: #9aa0a9; --line: rgba(0,0,0,.07);
    --accent: #1f6fff; --accent-soft: rgba(31,111,255,.10); --tint: rgba(31,111,255,.08); --on-tint: #0f3a8f;
    --ok: #12a66a; --ok-soft: rgba(18,166,106,.12); --warn: #e2672a; --warn-soft: rgba(226,103,42,.12); --bad: #d93a4a;
    --sketch: #3a4658; --shadow: rgba(20,30,50,.08);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eceef2; --bg-2: #eceef2; --surface: #ffffff; --surface-2: #f4f5f7; --surface-3: #e8eaee;
  --ink: #16181d; --ink-soft: #5d636d; --ink-faint: #9aa0a9; --line: rgba(0,0,0,.07);
  --accent: #1f6fff; --accent-soft: rgba(31,111,255,.10); --tint: rgba(31,111,255,.08); --on-tint: #0f3a8f;
  --ok: #12a66a; --ok-soft: rgba(18,166,106,.12); --warn: #e2672a; --warn-soft: rgba(226,103,42,.12); --bad: #d93a4a;
  --sketch: #3a4658; --shadow: rgba(20,30,50,.08);
}
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- Skin: Tesla · dark ---------- */

/* ---------- Skin: Google · dark ---------- */

/* ---------- Base ---------- */
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; overflow: hidden; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }

button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
.card { background: var(--card-bg); border-radius: var(--r-card); box-shadow: var(--card-shadow); min-width: 0; }
.pad { padding: 18px 20px; }
.muted { color: var(--ink-soft); } .faint { color: var(--ink-faint); }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; flex: none; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink); font: 500 13px var(--font-body); white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.btn.tonal { background: var(--accent-soft); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; gap: 5px; } .btn.sm .ico { width: 15px; height: 15px; }
.btn.icon { width: 38px; padding: 0; } .btn.icon.sm { width: 30px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn:focus-visible, .seg button:focus-visible, .nav:focus-visible, .chip:focus-visible, .row-btn:focus-visible, .iconbtn:focus-visible, .check:focus-visible, .tog:focus-visible, .pop-btn:focus-visible, .switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chip { all: unset; box-sizing: border-box; cursor: pointer; font: 500 13px var(--font-body); padding: 7px 14px; border-radius: var(--r-chip); background: var(--surface); color: var(--ink-soft); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip .n { font-size: 11px; color: var(--ink-faint); }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); }
.chip[aria-pressed="true"] .n { color: var(--ink-soft); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-ctl); background: var(--surface-2); flex-wrap: wrap; }
.seg button { all: unset; box-sizing: border-box; cursor: pointer; padding: 6px 11px; border-radius: calc(var(--r-ctl) - 3px); font: 500 12px var(--font-body); color: var(--ink-soft); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--card-bg); color: var(--ink); box-shadow: 0 2px 6px -2px var(--shadow); }

.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--font-body); padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.acc { background: var(--accent-soft); color: var(--ink); } .pill.bad { background: var(--warn-soft); color: var(--bad); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2 { font: 600 14px var(--font-body); display: flex; align-items: center; gap: 8px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-h h1 { font: var(--title-weight) clamp(26px, 3vw, 34px) var(--font-display); letter-spacing: -.02em; }
.page-h p { margin-top: 4px; color: var(--ink-soft); font-size: 14px; }

.list { display: grid; }
.li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .t { font: 500 13.5px var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .r { font-size: 12px; color: var(--ink-soft); text-align: right; white-space: nowrap; display: flex; gap: 4px; align-items: center; }
.li.click { cursor: pointer; } .li.click:hover .t { color: var(--accent); }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--on-tint); font: 600 12px var(--font-body); flex: none; }
.av.sq { border-radius: 10px; } .av.sm { width: 26px; height: 26px; font-size: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.empty { text-align: center; padding: 28px 16px; color: var(--ink-faint); font-size: 13px; display: grid; gap: 8px; justify-items: center; }
.empty .ico { width: 28px; height: 28px; opacity: .6; }
.field { display: grid; gap: 6px; min-width: 0; } .field label { font: 500 12px var(--font-body); color: var(--ink-soft); }
.field.inline { grid-template-columns: auto 1fr; align-items: center; }
.input { all: unset; box-sizing: border-box; height: 38px; padding: 0 12px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink); font: 500 13.5px var(--font-body); width: 100%; min-width: 0; }
.input::placeholder { color: var(--ink-faint); font-weight: 400; }
textarea.input { height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; -webkit-appearance: none; display: block; line-height: 38px; padding-right: 28px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%), linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%); background-position: right 14px center, right 10px center; background-size: 4px 4px; background-repeat: no-repeat; }
select.input option { background: var(--surface-2); color: var(--ink); }
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.input.sm { height: 32px; font-size: 13px; }
select.input.sm { line-height: 32px; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.tag-sample { font: 500 10.5px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
kbd { font: 500 11px var(--font-body); padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--ink-soft); }
.check { all: unset; box-sizing: border-box; cursor: pointer; width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--ink-faint); display: grid; place-items: center; color: transparent; flex: none; transition: background .15s; }
.check[aria-checked="true"] { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.check .ico { width: 13px; height: 13px; }
.check.round { border-radius: 50%; }
.tog { all: unset; box-sizing: border-box; cursor: pointer; width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; transition: background .2s; }
.tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.tog[aria-checked="true"] { background: var(--accent); } .tog[aria-checked="true"]::after { transform: translateX(18px); }
.prog { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .3s; }
.prog i.ok { background: var(--ok); }
.ring { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--font-body); background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring span { width: 44px; height: 44px; border-radius: 50%; background: var(--card-bg); display: grid; place-items: center; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font: 500 11.5px var(--font-body); color: var(--ink-faint); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.r, .table th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: var(--surface-2); }
.scroll-x { overflow-x: auto; scrollbar-width: thin; }
.note { font-size: 12.5px; color: var(--ink-faint); line-height: 1.5; }
.note b { color: var(--ink-soft); }
.callout { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); line-height: 1.45; }
.callout b { color: var(--ink); }
.callout.warn { background: var(--warn-soft); } .callout.ok { background: var(--ok-soft); }
.callout .ico { margin-top: 1px; }
.link { all: unset; cursor: pointer; color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; }
.sig { font: 500 26px "Caveat", cursive; color: var(--ink); }
.micro { font: 600 10.5px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- Shell ---------- */
.app { height: 100%; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr);
  padding-left: max(0px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 14px; overflow-y: auto; scrollbar-width: none; }
.mark { font: 600 13px var(--font-display); letter-spacing: .12em; margin-bottom: 16px; flex: none; cursor: pointer; }
.mark span { color: var(--accent); }
.nav { all: unset; box-sizing: border-box; position: relative; flex: none; width: 48px; height: 46px; border-radius: var(--r-ctl); display: grid; place-items: center; color: var(--ink-faint); cursor: pointer; transition: color .2s, background .2s; }
.nav .ico { width: 21px; height: 21px; }
.nav:hover { color: var(--ink); }
.nav[aria-current="page"] { color: var(--ink); background: var(--surface); }
.nav[aria-current="page"]::before { content: ""; position: absolute; left: -15px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav .tip { position: fixed; left: calc(var(--rail-w) - 4px); transform: translateY(-50%); white-space: nowrap; font: 500 12px var(--font-body); padding: 6px 10px; border-radius: 8px; color: var(--ink); background: var(--surface-3); box-shadow: 0 6px 16px -6px var(--shadow); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 30; }
.nav .cnt { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font: 600 10px var(--font-body); display: grid; place-items: center; }
.rail .spacer { flex: 1; min-height: 12px; }

.main { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.top { display: flex; align-items: center; gap: 10px; padding: 16px 8px 12px 4px; }
.crumb { font: 500 13px var(--font-body); color: var(--ink-soft); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.crumb b { color: var(--ink); font-weight: 600; }

.search { all: unset; box-sizing: border-box; flex: 1; max-width: 380px; margin-left: auto; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--ink-faint); cursor: text; font: 400 14px var(--font-body); }
.search span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.pop { position: relative; }
.pop-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 13px; border-radius: 999px; background: var(--surface); color: var(--ink-soft); cursor: pointer; font: 500 13px var(--font-body); white-space: nowrap; }
.pop-btn b { color: var(--ink); font-weight: 600; }
.iconbtn { all: unset; box-sizing: border-box; position: relative; width: 40px; height: 40px; border-radius: 999px; background: var(--surface); color: var(--ink-soft); cursor: pointer; display: grid; place-items: center; flex: none; }
.iconbtn:hover { color: var(--ink); }
.iconbtn .badge { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--surface); }

.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 240px; max-height: 70vh; overflow: auto; padding: 6px; border-radius: 14px; background: var(--surface-2); box-shadow: 0 18px 40px -12px var(--shadow), inset 0 0 0 1px var(--line); }
.menu.left { right: auto; left: 0; }
.menu.wide { min-width: 340px; }
.menu button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--ink); font: 500 13.5px var(--font-body); }
.menu button:hover, .menu button:focus-visible { background: var(--surface); }
.menu button[disabled] { cursor: default; color: var(--ink-faint); } .menu button[disabled]:hover { background: none; }
.menu small { display: block; font: 400 12px var(--font-body); color: var(--ink-soft); margin-top: 1px; }
.menu .radio { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink-faint); }
.menu [aria-checked="true"] .radio { box-shadow: inset 0 0 0 4px var(--accent); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu .hd { font: 600 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 10px 4px; display: flex; justify-content: space-between; align-items: center; }
.menu .hd button.link { all: unset; cursor: pointer; color: var(--accent); font: 500 11px var(--font-body); width: auto; display: inline; }
.menu button.notif { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: start; padding: 10px; border-radius: 10px; font-size: 13px; }
.notif:hover { background: var(--surface); }
.notif i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.notif.read i { background: var(--surface-3); } .notif.read { color: var(--ink-soft); }
.notif small { display: block; color: var(--ink-faint); font-size: 11.5px; margin-top: 2px; }
.notif .when { font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
.switch { all: unset; box-sizing: border-box; display: inline-flex; gap: 2px; padding: 4px; height: 40px; border-radius: 999px; background: var(--surface); cursor: pointer; flex: none; }
.switch span { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; color: var(--ink-faint); }
.switch .ico { width: 16px; height: 16px; }
.switch[aria-checked="false"] .sun, .switch[aria-checked="true"] .moon { background: var(--surface-2); color: var(--ink); box-shadow: 0 2px 6px -2px var(--shadow); }

.stage { min-height: 0; overflow: auto; padding: 4px 8px 28px 4px; scrollbar-width: thin; }
.view { display: grid; gap: 16px; align-content: start; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Overlays: toast, modal, palette, sheet, meeting ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); z-index: 90; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--surface-3); color: var(--ink); font: 500 13px var(--font-body); box-shadow: 0 14px 30px -10px var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .btn { height: 30px; }
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(8,10,14,.5); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.scrim.bottom { align-items: end; padding: 0; }
.modal { width: min(560px, 100%); max-height: min(86vh, 100%); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5), inset 0 0 0 1px var(--line); display: grid; grid-template-rows: auto 1fr auto; }
.modal.wide { width: min(820px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; }
.modal-h h3 { font: 600 16px var(--font-body); }
.modal-b { padding: 6px 18px 16px; display: grid; gap: 12px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 18px 16px; }
.modal-f .left { margin-right: auto; }
.sheet { width: 100%; background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; max-height: 80vh; overflow: auto; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--surface-3); justify-self: center; margin-bottom: 4px; }
.sheet h3 { font: 600 15px var(--font-body); padding: 0 4px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sheet-grid button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--surface-2); font: 500 12px var(--font-body); text-align: center; }
.sheet-grid button .ico { width: 22px; height: 22px; }
.palette { width: min(620px, 100%); align-self: start; margin-top: min(12vh, 90px); background: var(--surface); border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5), inset 0 0 0 1px var(--line); overflow: hidden; }
.palette .in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.palette input { all: unset; flex: 1; min-width: 0; font: 500 16px var(--font-body); }
.palette .res { max-height: 56vh; overflow: auto; padding: 6px; }
.palette .grp { font: 600 10.5px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); padding: 10px 10px 4px; }
.palette .it { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; font: 500 13.5px var(--font-body); }
.palette .it small { display: block; font-weight: 400; color: var(--ink-faint); font-size: 12px; }
.palette .it[aria-selected="true"], .palette .it:hover { background: var(--accent-soft); }
.palette .it .k { font-size: 11px; color: var(--ink-faint); }
.palette .foot { display: flex; gap: 14px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-faint); }
.meet { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: grid; grid-template-rows: auto 1fr auto; padding: max(18px, env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px)); animation: fade .2s; }
.meet-h { display: flex; align-items: center; gap: 14px; }
.meet-h h2 { font: var(--title-weight) clamp(22px, 3vw, 34px) var(--font-display); letter-spacing: -.02em; }
.meet-h .tm { margin-left: auto; font: 300 28px var(--font-display); font-variant-numeric: tabular-nums; }
.meet-b { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; min-height: 0; padding: 18px 0; }
.meet .agenda { display: grid; gap: 4px; align-content: start; }
.meet .agenda button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; font: 500 14px var(--font-body); color: var(--ink-soft); }
.meet .agenda button .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; }
.meet .agenda button[aria-current="true"] { background: var(--surface); color: var(--ink); } .meet .agenda button[aria-current="true"] .n { background: var(--accent); color: var(--on-accent); }
.meet .agenda button.done { color: var(--ink-faint); } .meet .agenda button.done .n { background: var(--ok-soft); color: var(--ok); }
.meet .pane { overflow: auto; display: grid; gap: 14px; align-content: start; }
.meet .pane h3 { font: var(--title-weight) clamp(22px, 2.6vw, 30px) var(--font-display); }
.meet .pts { display: grid; gap: 8px; } .meet .pts div { padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 15px; }
.meet-f { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.meet-f .btn { height: 46px; padding: 0 20px; font-size: 14px; }
/* ---------- Inline panels (no popups, no page changes) ---------- */
.inline-form { grid-column: 1 / -1; box-sizing: border-box; width: 100%; margin: 10px 0; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); display: grid; gap: 12px; animation: drop .18s ease; min-width: 0; }
.view > .inline-form { background: var(--card-bg); box-shadow: var(--card-shadow), inset 3px 0 0 var(--accent); margin: 0; }
.doc .inline-form { margin: 10px 18px; width: auto; }

@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.inline-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inline-h h3 { font: 600 14.5px var(--font-body); }
.inline-b { display: grid; gap: 10px; }
.inline-f { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.inline-f .left { margin-right: auto; }
.inline-form.srch { padding: 0; overflow: hidden; }
.palette.inline { width: 100%; max-width: none; margin: 0; box-shadow: none; border-radius: 0; }
.palette.inline .res { max-height: 52vh; }
.sheet-grid.big { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.sheet-grid.big button { padding: 18px 8px; font-size: 12.5px; background: var(--card-bg); } .sheet-grid.big button .ico { width: 24px; height: 24px; }
.view > .inline-form .sheet-grid.big button { background: var(--surface-2); }
.dock { display: none; }
.print-doc { display: none; }

/* ---------- Home ---------- */
.hello { position: relative; overflow: hidden; padding: clamp(20px, 2.6vw, 30px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 18px; align-items: end; }
.hello::before { content: ""; position: absolute; right: -8%; bottom: -60%; width: 60%; height: 160%; background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }
.hello .when { font: 500 13px var(--font-body); color: var(--ink-soft); display: flex; gap: 8px; align-items: center; }
.hello h1 { font: var(--title-weight) clamp(28px, 3.4vw, 42px) var(--font-display); letter-spacing: -.02em; margin-top: 6px; }
.hello h1 b { font-weight: 500; }
.hello p { margin-top: 8px; color: var(--ink-soft); }
.hello p b { color: var(--ink); font-weight: 600; }
.qa { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; position: relative; }

.home-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { padding: 14px 16px; border-radius: calc(var(--r-card) - 6px); background: var(--surface-2); display: grid; gap: 8px; cursor: pointer; transition: background .15s; }
.metric:hover { background: var(--surface-3); }

.metric .k { font: 500 12px var(--font-body); color: var(--ink-soft); display: flex; justify-content: space-between; gap: 6px; }
.metric .v { font: var(--num-weight) 34px var(--font-display); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric .d { font-size: 11.5px; color: var(--ok); } .metric .d.dn { color: var(--warn); } .metric .d.nt { color: var(--ink-faint); }
.insight { margin-top: 12px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.insight b { color: var(--ink); }
.ann { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ann:last-child { border-bottom: 0; }
.ann .t { font: 600 13.5px var(--font-body); display: flex; gap: 8px; align-items: center; }
.ann .t .x { margin-left: auto; }
.ann p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.li.done .t { text-decoration: line-through; color: var(--ink-faint); }
.ev { display: grid; grid-template-columns: 62px 3px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.ev:last-child { border-bottom: 0; }
.ev:hover .t { color: var(--accent); }
.ev .tm { font: 500 12px var(--font-body); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ev .bar { align-self: stretch; border-radius: 3px; background: var(--accent); }
.ev .bar.v { background: var(--ok); } .ev .bar.m { background: var(--warn); } .ev .bar.o { background: var(--ink-faint); } .ev .bar.t { background: var(--surface-3); }
.ev .t { font: 500 13.5px var(--font-body); } .ev .s { font-size: 12px; color: var(--ink-faint); }
.sumrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sumrow div { padding: 12px; border-radius: 12px; background: var(--surface-2); }
.sumrow b { display: block; font: var(--num-weight) 26px var(--font-display); }
.sumrow span { font-size: 12px; color: var(--ink-soft); }
.funnel { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.funnel button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 4px; padding: 10px; border-radius: 12px; background: var(--surface-2); text-align: left; }
.funnel button:hover { background: var(--surface-3); }
.funnel .k { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funnel .v { font: var(--num-weight) 24px var(--font-display); line-height: 1; }
.funnel .m { font-size: 11px; color: var(--ink-faint); }
.funnel button.won { background: var(--ok-soft); } .funnel button.hot { background: var(--accent-soft); }
.lead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.lead .t { font: 600 13.5px var(--font-body); } .lead .s { font-size: 12px; color: var(--ink-soft); }
.lead .wait { font: 600 12px var(--font-body); color: var(--warn); }
.lead .acts { display: flex; gap: 6px; }
.nba { display: grid; gap: 6px; }
.nba button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: 13px; }
.nba button:hover { background: var(--surface-2); }
.nba .ico { color: var(--warn); } .nba .ico.ok { color: var(--ok); } .nba .ico.acc { color: var(--accent); }
.nba small { display: block; color: var(--ink-faint); font-size: 11.5px; }
.comm-tabs { display: flex; gap: 4px; }

/* ---------- Connect ---------- */
.connect { display: grid; grid-template-columns: 220px 310px minmax(0, 1fr); gap: 16px; min-height: 600px; }
.chan { padding: 10px; display: grid; gap: 2px; align-content: start; }
.chan .hd { font: 600 10.5px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); padding: 10px 10px 4px; }
.row-btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font: 500 13.5px var(--font-body); color: var(--ink-soft); }
.row-btn:hover { background: var(--surface-2); }
.row-btn[aria-current="true"] { background: var(--accent-soft); color: var(--ink); }
.row-btn .n { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--on-accent); }
.row-btn .n.q { background: var(--surface-3); color: var(--ink-soft); }
.threads { padding: 8px; display: grid; align-content: start; gap: 2px; }
.threads .tools { display: flex; gap: 6px; padding: 2px 2px 8px; }
.thread { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; }
.thread:hover { background: var(--surface-2); }
.thread[aria-current="true"] { background: var(--surface-2); }
.thread .t { font: 600 13px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.thread .s { font-size: 12px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .r { font-size: 11px; color: var(--ink-faint); display: grid; justify-items: end; gap: 4px; }
.thread .r .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font: 600 10.5px var(--font-body); display: grid; place-items: center; }
.thread.unread .t { color: var(--ink); } .thread.unread .s { color: var(--ink-soft); }
.convo { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 560px; }
.convo-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.convo-h .who { font: 600 14px var(--font-body); } .convo-h .via { font-size: 12px; color: var(--ink-faint); }
.convo-h .acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.msgs { padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.msg { max-width: 72%; padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; background: var(--surface-2); align-self: flex-start; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); }
.msg small { display: block; font-size: 10.5px; opacity: .7; margin-top: 4px; white-space: normal; }
.msg .from { display: block; font: 600 11px var(--font-body); margin-bottom: 3px; opacity: .8; }
.msg.sys { align-self: center; background: none; color: var(--ink-faint); font-size: 12px; text-align: center; }
.composer { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.composer .line { display: flex; gap: 8px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick .chip { font-size: 12px; padding: 5px 10px; }
.calllog { display: grid; gap: 8px; padding: 16px; overflow: auto; }
.call { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.call .t { font-weight: 600; } .call .s { color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; }
.call .r { color: var(--ink-faint); font-size: 12px; text-align: right; }
.call .dir { color: var(--ok); } .call .dir.in { color: var(--accent); } .call .dir.missed { color: var(--warn); }
.mail { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; font-size: 13.5px; }
.mail:last-child { border-bottom: 0; }
.mail .h { display: flex; justify-content: space-between; gap: 10px; }
.mail .h b { font-weight: 600; } .mail .h span { color: var(--ink-faint); font-size: 12px; white-space: nowrap; }
.mail .sub { font-weight: 500; }
.mail p { color: var(--ink-soft); font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.mail.me { background: var(--surface-2); }

/* ---------- Sales ---------- */
.sales { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 16px; align-items: start; }
.sales-tools { display: grid; gap: 8px; padding: 10px 10px 4px; }
.appts { padding: 8px; display: grid; gap: 2px; max-height: 70vh; overflow: auto; scrollbar-width: thin; }
.appt { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 12px; padding: 11px 10px; border-radius: 12px; }
.appt:hover { background: var(--surface-2); }
.appt[aria-current="true"] { background: var(--accent-soft); }
.appt .date { text-align: center; border-radius: 10px; background: var(--surface-2); padding: 6px 0; align-self: start; }
.appt[aria-current="true"] .date { background: var(--card-bg); }
.appt .date b { display: block; font: 500 18px var(--font-display); line-height: 1.1; } .appt .date span { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.appt .t { font: 600 13.5px var(--font-body); display: flex; justify-content: space-between; gap: 8px; } .appt .t small { font-weight: 500; color: var(--ink-faint); font-size: 11.5px; white-space: nowrap; }
.appt .s { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.appt .meta { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.col { background: var(--surface); border-radius: var(--r-card); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 240px; }
.col.over { outline: 2px dashed var(--accent); outline-offset: -4px; }
.col .ch { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; font: 600 12.5px var(--font-body); }
.col .ch span { color: var(--ink-faint); font-weight: 500; font-size: 11.5px; }
.kcard { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; cursor: grab; font-size: 13px; }
.kcard:active { cursor: grabbing; }
.kcard .t { font-weight: 600; } .kcard .s { color: var(--ink-soft); font-size: 12px; }
.kcard .f { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kcard .mv { all: unset; cursor: pointer; color: var(--ink-faint); padding: 2px; border-radius: 6px; } .kcard .mv:hover { color: var(--ink); background: var(--surface-3); }
.detail { display: grid; gap: 0; overflow: hidden; }
.detail-h { padding: 18px 20px 12px; display: grid; gap: 10px; }
.detail-h .ttl { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.detail-h h2 { font: 500 22px var(--font-display); letter-spacing: -.01em; }
.detail-h .sub { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.detail-h .contact { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { all: unset; box-sizing: border-box; cursor: pointer; padding: 11px 10px; font: 500 13px var(--font-body); color: var(--ink-soft); white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; display: inline-flex; gap: 6px; align-items: center; }
.tabs button .n { font-size: 10.5px; padding: 1px 6px; border-radius: 99px; background: var(--surface-2); color: var(--ink-faint); }
.tabs button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.tab-body { padding: 18px 20px 22px; display: grid; gap: 14px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.step { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12px; color: var(--ink-soft); display: grid; gap: 3px; }
.step b { font: 600 12.5px var(--font-body); color: var(--ink); display: flex; gap: 6px; align-items: center; }
.step.on { background: var(--accent-soft); } .step.done { background: var(--ok-soft); } .step.done b { color: var(--ok); }
.doc { border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.doc-h { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.doc-h h3 { font: 600 15px var(--font-body); letter-spacing: .04em; }
.doc-sec { border-bottom: 1px solid var(--line); }
.doc-sec:last-child { border-bottom: 0; }
.doc-sec .sh { display: flex; align-items: center; gap: 10px; padding: 12px 18px 6px; }
.doc-sec .sh h4 { font: 700 13px var(--font-body); letter-spacing: .06em; text-transform: uppercase; flex: 1; }
.doc-sec .sh .sum { font-variant-numeric: tabular-nums; font-weight: 600; }
.doc-line { display: grid; grid-template-columns: minmax(0, 1fr) 70px 64px 92px 92px 30px; gap: 6px; align-items: center; padding: 3px 18px; }
.doc-line .input { height: 32px; font-size: 13px; }
.doc-line .out { text-align: right; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.doc-line.head { font: 500 11px var(--font-body); color: var(--ink-faint); padding-top: 4px; }
.doc-line.head span:not(:first-child) { text-align: right; }
.doc-scope { padding: 6px 18px 12px; }
.doc-scope textarea { height: 64px; }
.doc-total { display: grid; gap: 6px; padding: 14px 18px; background: var(--surface-2); }
.doc-total div { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-soft); }
.doc-total div.big { font: 500 18px var(--font-body); color: var(--ink); padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.doc-terms { padding: 14px 18px; display: grid; gap: 10px; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.doc-terms h4 { font: 700 13px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.doc-terms .pay { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.doc-terms .pay div { padding: 10px; border-radius: 10px; background: var(--surface-2); display: grid; gap: 4px; }
.doc-terms .pay b { color: var(--ink); font-weight: 600; }
.sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 18px 18px; }
.sigbox { border-radius: 12px; background: var(--surface-2); padding: 12px 14px; display: grid; gap: 8px; min-height: 110px; }
.sigbox .who { font: 600 12px var(--font-body); color: var(--ink-soft); }
.sigbox .line { border-bottom: 1px solid var(--ink-faint); min-height: 40px; display: flex; align-items: flex-end; padding-bottom: 4px; }
.sigbox small { color: var(--ink-faint); font-size: 11.5px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.kv div { padding: 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.kv span { display: block; font-size: 11.5px; color: var(--ink-faint); } .kv b { display: block; margin-top: 4px; font: 500 14px var(--font-body); }
.kv .input { margin-top: 4px; height: 32px; padding: 0 8px; background: var(--card-bg); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.file { border-radius: 12px; background: var(--surface-2); padding: 12px; display: grid; gap: 8px; font-size: 12.5px; position: relative; }
.file .thumb { height: 70px; border-radius: 8px; background: linear-gradient(135deg, var(--accent-soft), var(--surface-3)); display: grid; place-items: center; color: var(--ink-soft); }
.file .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .file small { color: var(--ink-faint); }
.file .x { position: absolute; top: 8px; right: 8px; }
.drop { border: 1.5px dashed var(--ink-faint); border-radius: 12px; padding: 18px; text-align: center; color: var(--ink-faint); font-size: 13px; display: grid; gap: 6px; justify-items: center; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; font-size: 13px; position: relative; }
.tl::before { content: ""; position: absolute; left: 8px; top: 24px; bottom: -6px; width: 1px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl i { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-soft); } .tl i .ico { width: 11px; height: 11px; }
.tl small { display: block; color: var(--ink-faint); font-size: 11.5px; }
.tl .when { color: var(--ink-faint); font-size: 11.5px; white-space: nowrap; }
.portal-prev { border-radius: 14px; background: var(--surface-2); padding: 16px; display: grid; gap: 10px; }
.portal-prev .ph { display: flex; justify-content: space-between; align-items: center; font: 600 13px var(--font-body); }
.portal-prev .pi { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--card-bg); font-size: 13px; }
.cred { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cred div { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); display: grid; gap: 4px; }
.cred span { font-size: 11.5px; color: var(--ink-faint); } .cred code { font: 600 14px ui-monospace, Menlo, monospace; }

/* ---------- Calendar ---------- */
.cal-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-tools h2 { font: 500 20px var(--font-display); min-width: 170px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.month .dow { background: var(--card-bg); padding: 8px; font: 600 11px var(--font-body); color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.month .day { background: var(--card-bg); min-height: 96px; padding: 6px 8px; display: grid; align-content: start; gap: 4px; font-size: 12px; cursor: pointer; }
.month .day:hover { background: var(--surface-2); }
.month .day .d { font: 500 12px var(--font-body); color: var(--ink-soft); }
.month .day.out { opacity: .4; }
.month .day.today .d { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.month .e { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month .e.v { background: var(--ok-soft); } .month .e.m { background: var(--warn-soft); } .month .e.t { background: var(--surface-3); color: var(--ink-soft); }
.month .more { font-size: 10.5px; color: var(--ink-faint); }
.week { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.week > div { background: var(--card-bg); min-width: 0; }
.week .wh { padding: 8px 6px; text-align: center; font: 600 11px var(--font-body); color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.week .wh b { display: block; font: 500 16px var(--font-display); color: var(--ink); letter-spacing: 0; text-transform: none; }
.week .wh.today b { color: var(--accent); }
.week .hr { font-size: 10.5px; color: var(--ink-faint); padding: 4px 6px; height: 44px; box-sizing: border-box; }
.week .slot { height: 44px; box-sizing: border-box; padding: 2px; display: grid; gap: 2px; align-content: start; }
.week .slot .e { font-size: 10.5px; padding: 2px 5px; border-radius: 5px; background: var(--accent-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.week .slot .e.v { background: var(--ok-soft); } .week .slot .e.m { background: var(--warn-soft); }
.dayv { display: grid; gap: 8px; }
.dayv .ev { grid-template-columns: 72px 3px minmax(0, 1fr) auto; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-bottom: 0; }

/* ---------- Tasks ---------- */
.tboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tcol { display: grid; gap: 8px; align-content: start; }
.tcol .ch { display: flex; justify-content: space-between; padding: 0 4px; font: 600 12.5px var(--font-body); } .tcol .ch span { color: var(--ink-faint); font-weight: 500; }
.tcol .ch.od { color: var(--warn); }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.task .t { font-weight: 500; cursor: pointer; } .task .t:hover { color: var(--accent); }
.task .s { font-size: 11.5px; color: var(--ink-faint); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.task.done .t { text-decoration: line-through; color: var(--ink-faint); }
.pri { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ink-faint); }
.pri.high { background: var(--bad); } .pri.normal { background: var(--accent); } .pri.low { background: var(--ink-faint); }
.quickadd { display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px auto; gap: 8px; }

/* ---------- Costing ---------- */
.cost { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ctable { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; }
.ctable th { text-align: left; font: 500 11.5px var(--font-body); color: var(--ink-faint); padding: 0 6px 8px; white-space: nowrap; }
.ctable td { padding: 4px 6px; }
.ctable .input { height: 34px; font-size: 13px; }
.ctable select.input { line-height: 34px; }
.ctable td.out { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-soft); }
.totals { display: grid; gap: 10px; }
.tot { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: var(--ink-soft); }
.tot b { font: 500 16px var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.tot.big b { font: var(--num-weight) 36px var(--font-display); letter-spacing: -.02em; }
.tot.big { padding-top: 10px; border-top: 1px solid var(--line); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Reports ---------- */
.bars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 12.5px; }
.hbar .trk { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.hbar .trk i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.hbar .trk i.ok { background: var(--ok); } .hbar .trk i.soft { background: var(--surface-3); }
.hbar .n { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cols { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.cols div { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: flex-end; height: 100%; font-size: 11px; color: var(--ink-faint); min-width: 0; }
.cols i { width: 100%; max-width: 34px; flex: none; border-radius: 8px 8px 3px 3px; background: var(--accent); }
.cols div.me i { background: var(--ok); }
.cols b { font: 500 12px var(--font-body); color: var(--ink); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-soft); } .legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); display: inline-block; margin-right: 5px; vertical-align: -1px; } .legend i.me { background: var(--ok); }
.ldr { display: grid; gap: 4px; }
.ldr div { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.ldr div.me { background: var(--accent-soft); }
.ldr b { font-variant-numeric: tabular-nums; }

/* ---------- Training ---------- */
.player { aspect-ratio: 16 / 9; border-radius: 14px; background: linear-gradient(135deg, var(--surface-3), var(--accent-soft)); display: grid; place-items: center; position: relative; overflow: hidden; }
.player .play { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.player .play .ico { width: 26px; height: 26px; }
.player .cap { position: absolute; left: 16px; bottom: 14px; font: 600 14px var(--font-body); }
.player .dur { position: absolute; right: 16px; bottom: 14px; font-size: 12px; color: var(--ink-soft); }
.opt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }
.opt:hover { background: var(--surface-3); }
.opt[data-state="right"] { background: var(--ok-soft); color: var(--ok); } .opt[data-state="wrong"] { background: var(--warn-soft); color: var(--warn); }
.opt .k { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--card-bg); font: 600 11px var(--font-body); flex: none; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.lesson { border-radius: 14px; background: var(--surface-2); overflow: hidden; display: grid; cursor: pointer; }
.lesson:hover { background: var(--surface-3); }
.lesson .th { height: 90px; background: linear-gradient(135deg, var(--accent-soft), var(--surface-3)); display: grid; place-items: center; color: var(--ink-soft); position: relative; }
.lesson .th .pill { position: absolute; top: 8px; right: 8px; }
.lesson div.b { padding: 10px 12px; font-size: 13px; } .lesson small { display: block; color: var(--ink-faint); font-size: 11.5px; margin-top: 3px; }
.lesson.done .th::after { content: "Done"; position: absolute; left: 8px; top: 8px; font: 600 10.5px var(--font-body); padding: 2px 7px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); }

/* ---------- Credibility ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tile { border-radius: 14px; background: var(--surface-2); padding: 14px; display: grid; gap: 10px; align-content: start; }
.tile .art { height: 110px; border-radius: 10px; display: grid; place-items: center; font: 500 13px var(--font-body); color: var(--ink-soft); background: linear-gradient(135deg, var(--accent-soft), var(--surface-3)); position: relative; }
.tile .art .pill { position: absolute; top: 8px; left: 8px; }
.tile h3 { font: 600 14px var(--font-body); } .tile p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.tile .price { font: 500 15px var(--font-body); }
.share { display: flex; gap: 6px; flex-wrap: wrap; }
.rev { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.rev th, .rev td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
.rev th { font: 500 12px var(--font-body); color: var(--ink-faint); }
.rev td .input { height: 32px; font-size: 12.5px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery .g { aspect-ratio: 4 / 3; border-radius: 12px; display: grid; align-content: end; padding: 12px; font: 500 12.5px var(--font-body); color: #fff; position: relative; cursor: pointer; background: linear-gradient(160deg, var(--c1), var(--c2)); overflow: hidden; }
.gallery .g small { display: block; opacity: .8; font-size: 11px; }
.gallery .g .acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.gallery .g:hover .acts, .gallery .g:focus-within .acts { opacity: 1; }
.org { display: grid; gap: 14px; justify-items: center; }
.org .lvl { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.org .node { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); text-align: center; font: 600 13px var(--font-body); min-width: 130px; }
.org .node small { display: block; font: 400 11.5px var(--font-body); color: var(--ink-faint); margin-top: 2px; }
.org .node.top { background: var(--accent-soft); } .org .node.me { box-shadow: inset 0 0 0 2px var(--accent); }
.bcard { aspect-ratio: 1.75; max-width: 440px; border-radius: 18px; padding: 22px; display: grid; align-content: space-between; color: #fff;
  background: radial-gradient(circle at 85% 15%, rgba(62,139,255,.55), transparent 55%), linear-gradient(140deg, #1b2a4a, #0d1424); box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); position: relative; overflow: hidden; }
.bcard .co { font: 600 12px var(--font-display); letter-spacing: .24em; } .bcard .co span { color: #8cbcff; }
.bcard .nm { font: 400 24px var(--font-display); } .bcard .rl { font-size: 12.5px; opacity: .75; margin-top: 2px; }
.bcard .ct { font-size: 12px; opacity: .8; display: grid; gap: 2px; }
.bcard .qr { position: absolute; right: 22px; bottom: 22px; width: 64px; height: 64px; border-radius: 8px; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 9px; text-align: center; opacity: .8; padding: 4px; box-sizing: border-box; }
.bcard.light { background: radial-gradient(circle at 85% 15%, rgba(31,111,255,.25), transparent 55%), linear-gradient(140deg, #ffffff, #e8edf7); color: #16181d; } .bcard.light .co span { color: #1f6fff; } .bcard.light .qr { background: rgba(0,0,0,.06); }
.bcard.mono { background: #111; }

/* ---------- Settings ---------- */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .t { font: 500 13.5px var(--font-body); display: flex; gap: 8px; align-items: center; } .set-row small { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.set-nav { display: grid; gap: 2px; padding: 8px; align-content: start; }
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.swatch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatch button { all: unset; box-sizing: border-box; cursor: pointer; border-radius: 12px; padding: 10px; background: var(--surface-2); display: grid; gap: 6px; font: 500 12.5px var(--font-body); text-align: center; }
.swatch button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.swatch .pv { height: 42px; border-radius: 8px; background: linear-gradient(135deg, var(--surface-3), var(--accent-soft)); }

/* ---------- Print (estimate document) ---------- */
@media print { body * { visibility: hidden; } .print-doc, .print-doc * { visibility: visible; } .print-doc { display: block !important; position: absolute; left: 0; top: 0; width: 100%; color: #000; background: #fff; font: 12.5px/1.5 Georgia, serif; padding: 24px; } .print-doc h1 { font: 700 18px/1.2 Helvetica, Arial, sans-serif; letter-spacing: .04em; } .print-doc h2 { font: 700 13px/1.3 Helvetica, Arial, sans-serif; letter-spacing: .06em; margin: 14px 0 4px; } .print-doc table { width: 100%; border-collapse: collapse; } .print-doc td, .print-doc th { padding: 4px 6px; border-bottom: 1px solid #ddd; text-align: left; } .print-doc td.r, .print-doc th.r { text-align: right; } }

/* ---------- Calm pass: fewer boxes, more air ---------- */
.view { gap: 22px; }
.home-grid { gap: 20px; }
.card.pad, .pad { padding: 22px 24px; }
.card-h { margin-bottom: 14px; }
.card-h h2 { font: 600 14px var(--font-body); }
.page-h p { display: none; }
.hello.calm { background: none; box-shadow: none; padding: 8px 4px 0; }
.hello.calm::before { display: none; }
.hello.calm p { font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-radius: var(--r-card); background: var(--card-bg); box-shadow: var(--card-shadow); overflow: hidden; }
.stats button { all: unset; box-sizing: border-box; cursor: pointer; padding: 20px 24px; display: grid; gap: 6px; border-left: 1px solid var(--line); transition: background .15s; }
.stats button:first-child { border-left: 0; }
.stats button:hover { background: var(--surface-2); }
.stats .k { font: 500 12.5px var(--font-body); color: var(--ink-soft); }
.stats .v { font: var(--num-weight) 34px var(--font-display); letter-spacing: -.03em; line-height: 1; }
.stats .v.warn { color: var(--warn); }

.focus { display: grid; }
.focus .fi { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.focus .fi:last-child { border-bottom: 0; }
.focus .fi > span { display: grid; gap: 2px; min-width: 0; }
.focus .fi .t { font: 500 14px var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus .fi .s { font-size: 12.5px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus .fi:hover .t { color: var(--accent); }
.focus .ico.warn { color: var(--warn); } .focus .ico.acc { color: var(--accent); } .focus .ico { color: var(--ink-faint); }
.focus .chev { color: var(--ink-faint); width: 16px; height: 16px; }
.ev { grid-template-columns: 64px 3px minmax(0, 1fr); padding: 10px 0; }
.ev > span:last-child:not(.t):not(:nth-child(3)) { display: none; }
.link.more { display: inline-block; margin-top: 10px; font-size: 12.5px; }
.input.quiet { width: auto; height: 30px; background: none; color: var(--ink-soft); font-size: 12.5px; box-shadow: inset 0 0 0 1px var(--line); line-height: 30px; }
.input.quiet-in { background: none; box-shadow: inset 0 -1px 0 var(--line); border-radius: 0; padding-left: 0; }
.input.quiet-in:focus-visible { outline: none; box-shadow: inset 0 -2px 0 var(--accent); }

[data-quick-task] { margin-bottom: 4px; }
.icon-seg { display: flex; gap: 2px; }
.icon-seg button { all: unset; cursor: pointer; position: relative; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-faint); }
.icon-seg button .ico { width: 16px; height: 16px; }
.icon-seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.icon-seg button i { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ann { padding: 10px 0; } .ann .t .x { opacity: 0; } .ann:hover .t .x { opacity: 1; }
.li { padding: 11px 0; }
/* Sales calm */
.detail-h { padding: 22px 24px 12px; }
.detail-h h2 { font-size: 24px; }
.round-acts { display: inline-flex; gap: 4px; }
.round-acts button { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); background: var(--surface-2); }
.round-acts button:hover { color: var(--ink); background: var(--surface-3); }
.round-acts button .ico { width: 16px; height: 16px; }
.stage-sel { width: auto; min-width: 128px; }
.tabs { padding: 0 18px; gap: 6px; }
.tabs button { padding: 12px 8px; }
.tab-body { padding: 22px 24px 26px; gap: 20px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 20px; margin: 0; }
.facts div { min-width: 0; } .facts dt { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 3px; } .facts dd { margin: 0; font: 500 13.5px var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next { display: flex; align-items: center; gap: 14px; }
.next .micro { flex: none; }
.notes { min-height: 70px; }
.appt { padding: 12px 10px; }
.appt .meta { align-items: center; }
.sales-tools { grid-template-columns: minmax(0, 1fr) 150px; display: grid; gap: 8px; padding: 12px 12px 6px; }
.sample-chip { font: 500 10.5px var(--font-body); letter-spacing: .04em; color: var(--ink-faint); padding: 2px 8px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line); margin-left: 4px; }
#skin-btn .lbl { display: none; }
.nav .cnt { min-width: 7px; width: 7px; height: 7px; padding: 0; font-size: 0; top: 11px; right: 11px; box-shadow: 0 0 0 2px var(--bg); }

@media (max-width: 1240px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } .stats button:nth-child(3) { border-left: 0; } .stats button:nth-child(n+3) { border-top: 1px solid var(--line); } .next { flex-wrap: wrap; } .sales-tools { grid-template-columns: 1fr; } .detail-h .ttl > .row { width: 100%; justify-content: space-between; } }
@media (max-width: 680px) { .sample-chip { display: none; } .hello.calm { padding: 4px 0 0; } .card.pad, .pad { padding: 18px; } .tab-body { padding: 18px; } .detail-h { padding: 18px 18px 10px; } }
.card-h .link, .row .link { font-size: 12.5px; }
@media (max-width: 680px) { .hello.calm .qa .btn.ghost { width: 40px; padding: 0; font-size: 0; gap: 0; } .hello.calm .qa { gap: 6px; } }

/* ---------- Calm pass 2: Connect, Calendar, Tasks, Costing, Reports, Training, Credibility ---------- */
.connect.two { grid-template-columns: 340px minmax(0, 1fr); min-height: 620px; }
.connect.two .threads { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chan-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: var(--r-ctl); background: var(--surface-2); }
.chan-tabs button { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border-radius: calc(var(--r-ctl) - 3px); color: var(--ink-faint); font: 500 11.5px var(--font-body); }
.chan-tabs button .ico { width: 17px; height: 17px; }
.chan-tabs button[aria-selected="true"] { background: var(--card-bg); color: var(--ink); box-shadow: 0 2px 6px -2px var(--shadow); }

.chan-tabs button i { position: absolute; top: 6px; right: calc(50% - 16px); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.sub-seg .seg { width: 100%; box-sizing: border-box; flex-wrap: nowrap; } .sub-seg .seg button { flex: 1; text-align: center; }
.connect.two .tools { display: flex; gap: 6px; align-items: center; padding: 0 4px; }
.tlist { display: grid; gap: 2px; align-content: start; overflow: auto; }
.thread .r .dot { width: 7px; height: 7px; }
.convo-h { padding: 16px 18px; }
.call { background: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 4px; }
.call .dir { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ok); }
.call .dir .ico { width: 15px; height: 15px; } .call .dir.in { color: var(--accent); } .call .dir.missed { color: var(--warn); }
.composer .line { align-items: center; }
.composer [data-act="toggle-qr"][aria-pressed="true"] { color: var(--accent); }
.quick .chip { font-size: 12px; padding: 5px 11px; }
.cal-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cal-tools h2 { font: 500 20px var(--font-display); min-width: 0; margin: 0 6px; }
[data-act="cal-tasks"][aria-pressed="false"] { color: var(--ink-faint); }
.quickline { display: flex; align-items: center; gap: 12px; padding: 4px 6px; }
.quickline .plus { color: var(--ink-faint); display: grid; } .quickline .plus .ico { width: 18px; height: 18px; }
.quickline .input { height: 40px; font-size: 14px; }
.task { background: var(--card-bg); box-shadow: var(--card-shadow); padding: 12px 14px; align-items: center; }

.task .s { margin-top: 4px; }
.hover-acts { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.task:hover .hover-acts, .task:focus-within .hover-acts { opacity: 1; }
@media (hover: none) { .hover-acts { opacity: 1; } }
.tcol { gap: 10px; } .tcol .ch { padding: 0 4px 2px; }
.done-line { font-size: 12.5px; color: var(--ink-faint); padding: 0 4px; }
.row-del { opacity: .35; } tr:hover .row-del { opacity: 1; }
.totals .tot { font-size: 13px; }
.stats > div { padding: 20px 24px; display: grid; gap: 6px; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats .d { font-size: 12px; color: var(--ok); }
.stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.cols.single { position: relative; gap: 18px; }
.cols.single::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(20px + var(--avg)); border-top: 1px dashed var(--ink-faint); opacity: .6; }
.cols.single div.me i { background: var(--accent); max-width: 40px; }
.ldr div { grid-template-columns: 18px minmax(0, 1fr) auto; padding: 10px 8px; }
.player .play { position: relative; z-index: 1; }
.quiz .dots { display: flex; gap: 5px; } .quiz .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); } .quiz .dots i.done { background: var(--ink-faint); } .quiz .dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }
.quiz .qq { font: 500 15px var(--font-body); line-height: 1.45; margin-bottom: 12px; }
.quiz .score { display: grid; gap: 8px; justify-items: start; padding: 10px 0; } .quiz .score b { font: var(--num-weight) 44px var(--font-display); } .quiz .score span { color: var(--ink-soft); font-size: 13.5px; }
.lesson .th { height: 80px; }
.tile { gap: 8px; } .tile .micro { margin-bottom: -2px; }
.list .li .input.quiet-in { height: 26px; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 1100px) { .connect.two { grid-template-columns: 1fr; } .connect.two .threads { max-height: 46vh; } .stats.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stats.five > div:nth-child(4) { border-left: 0; } .stats.five > div:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 680px) { .stats.five { grid-template-columns: 1fr 1fr; } .stats.five > div:nth-child(n) { border-left: 0; } .stats.five > div:nth-child(even) { border-left: 1px solid var(--line); } .stats.five > div:nth-child(n+3) { border-top: 1px solid var(--line); } .cal-tools h2 { font-size: 17px; } }
@media (max-width: 680px) { .convo-h .via { display: none; } .convo-h { padding: 12px 14px; } .round-acts button { width: 30px; height: 30px; } }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .span-8, .span-7, .span-6, .span-5, .span-4, .span-3 { grid-column: span 12; }
  .connect { grid-template-columns: 200px minmax(0, 1fr); } .connect .convo { grid-column: span 2; }
  .cost { grid-template-columns: 1fr; }
  .funnel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .settings { grid-template-columns: 1fr; } .set-nav { display: flex; overflow-x: auto; scrollbar-width: none; } .set-nav .row-btn { flex: none; }
}
@media (max-width: 1100px) { :root { --rail-w: 72px; } .search { max-width: 260px; } .sales { grid-template-columns: 1fr; } .appts { max-height: 46vh; } .pop-btn .lbl { display: none; } .meet-b { grid-template-columns: 1fr; } .meet .agenda { display: flex; overflow-x: auto; scrollbar-width: none; } .meet .agenda button { flex: none; } }
@media (max-width: 760px) {
  .metrics { grid-template-columns: 1fr 1fr; } .steps { grid-template-columns: 1fr 1fr; } .hello { grid-template-columns: 1fr; } .qa { justify-content: flex-start; }
  .connect { grid-template-columns: 1fr; min-height: 0; } .connect .convo { grid-column: auto; } .chan { display: flex; overflow-x: auto; scrollbar-width: none; padding: 8px; } .chan .hd { display: none; } .chan .row-btn { flex: none; } .msg { max-width: 88%; }
  .tboard { grid-template-columns: 1fr 1fr; } .quickadd { grid-template-columns: 1fr 1fr; }
  .sigs { grid-template-columns: 1fr; } .cred { grid-template-columns: 1fr; } .doc-terms .pay { grid-template-columns: 1fr; }
  .doc-line { grid-template-columns: minmax(0, 1fr) 56px 50px 76px 76px 26px; padding: 3px 10px; } .doc-sec .sh, .doc-scope, .doc-total, .doc-terms { padding-left: 12px; padding-right: 12px; }
  .week { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); } .week .slot .e { font-size: 9px; padding: 1px 3px; }
  .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search span { display: none; }
}
@media (max-width: 680px) {
  body { overflow: auto; }
  .app { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 100%; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .rail { display: none; }
  .main { grid-template-rows: auto auto; }
  .top { padding: 12px 0 10px; flex-wrap: nowrap; gap: 6px; }
  #role-btn b { display: none; }
  .top .pop-btn { padding: 0 11px; }
  .search { flex: none; width: 40px; max-width: 40px; padding: 0; justify-content: center; margin-left: auto; } .search kbd { display: none; }
  .crumb .where { display: none; }
  .stage { overflow: visible; padding: 0 0 12px; }
  .month .day { min-height: 64px; padding: 4px; } .month .e { font-size: 9.5px; padding: 1px 4px; }
  .hbar { grid-template-columns: 90px minmax(0, 1fr) 44px; }
  .tboard { grid-template-columns: 1fr; } .quickadd { grid-template-columns: 1fr; }
  .lead { grid-template-columns: auto minmax(0, 1fr); } .lead > .row { grid-column: 1 / -1; justify-content: space-between; }
  .sales .detail .tabs { padding: 0 8px; }
  .board { grid-auto-columns: 82vw; }
  .modal { border-radius: 18px; }
  .dock { display: flex; position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    gap: 2px; padding: 6px; border-radius: 22px; background: var(--surface-2); box-shadow: 0 14px 34px -12px var(--shadow), inset 0 1px 0 var(--line); }
  .dock .nav { width: 56px; height: 50px; }
  .dock .nav[aria-current="page"] { background: var(--surface); }
  .dock .nav[aria-current="page"]::before { left: 20px; right: 20px; top: auto; bottom: 5px; width: auto; height: 2px; }
  .dock .add { color: var(--on-accent); background: var(--accent); }
  
  .meet-f .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.v5-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 16px; color: var(--ink-soft); text-align: center; } .v5-empty svg { width: 28px; height: 28px; color: var(--ink-faint); }
.v5-none { padding: 12px 2px; color: var(--ink-faint); font-size: 13.5px; }
.df { display: grid; gap: 3px; font-size: 12px; color: var(--ink-soft); } .df.chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); }
.dz-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .dz-top .grow { flex: 1; }
.seg.sm.dz-mode { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); gap: 2px; }
.dz-mode button { border: 0; background: none; height: 32px; padding: 0 14px; border-radius: 9px; font: 600 13px var(--font-body); color: var(--ink-soft); cursor: pointer; }
.dz-mode button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px var(--shadow); }
.dz-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .dz-kpis > div { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); } .dz-kpis span { font-size: 12px; color: var(--ink-soft); } .dz-kpis b { font: 500 19px var(--font-display); }
.dz-allow { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.dz-al { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); } .dz-al small { font-size: 12px; color: var(--ink-soft); }
.dz-alh { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; } .dz-alh span { display: flex; align-items: center; gap: 4px; color: var(--ink-soft); } .dz-alh .num-in { width: 84px; height: 26px; }
.dz-bar { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; } .dz-bar i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.dz-al.over .dz-bar i { background: var(--bad); } .dz-al.over { box-shadow: inset 0 0 0 1px rgba(214, 60, 80, .35); }
.dz-room { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.dz-room > header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); } .dz-room > header small { color: var(--ink-soft); } .dz-room > header .grow { flex: 1; }
.dz-room > .v5-none { padding: 12px 14px; }
.dz-row + .dz-row, .dz-room > header + .dz-row { border-top: 1px solid var(--line); }
.dz-rh { display: grid; grid-template-columns: auto minmax(0, 1fr) 70px 130px auto auto; gap: 12px; align-items: center; width: 100%; padding: 10px 14px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.dz-rh:hover { background: var(--surface-2); } .dz-row.open .dz-rh { background: var(--tint); }
.dz-th { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-faint); } .dz-th svg { width: 20px; height: 20px; }
.dz-th.big { width: 100%; height: 190px; border-radius: 14px 14px 0 0; }
.dz-n { display: grid; min-width: 0; } .dz-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dz-n small { color: var(--ink-soft); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-q { font-size: 13px; color: var(--ink-soft); } .dz-p { display: grid; justify-items: end; } .dz-p small { font-size: 11.5px; color: var(--ink-faint); }
.dz-lock { color: var(--ok); } .dz-lock svg { width: 16px; height: 16px; }
.dz-ed { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 14px; background: var(--surface); border-top: 1px dashed var(--line); }
.dz-edimg { display: grid; gap: 8px; align-content: start; }
.dz-up { display: grid; place-items: center; gap: 4px; width: 170px; height: 150px; border-radius: 14px; background: var(--surface-2); color: var(--ink-soft); cursor: pointer; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; } .dz-up img { width: 100%; height: 100%; object-fit: cover; } .dz-up svg { width: 24px; height: 24px; }
.dz-edg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; }
.dz-eda { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .dz-eda .grow { flex: 1; } .dz-cp { font-size: 13.5px; color: var(--ink-soft); }
.dz-ed .callout { grid-column: 1 / -1; }
.dz-row.locked .dz-ed input:disabled, .dz-row.locked .dz-ed select:disabled { opacity: .7; }
/* client view */
.dz-portal { display: grid; gap: 14px; } .dz-ph { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--tint); color: var(--on-tint); }
.dz-rooms { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; } .dz-rooms button { flex: none; height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface-2); font: 600 13.5px var(--font-body); color: var(--ink-soft); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.dz-rooms button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); } .dz-rooms .n { background: var(--warn); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; }
.dz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.dz-card { border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px -24px var(--shadow); overflow: hidden; }
.dz-cb { display: grid; gap: 6px; padding: 12px 14px 14px; } .dz-cb small { color: var(--ink-soft); font-size: 12.5px; } .dz-cpr { font: 500 22px var(--font-display); display: grid; } .dz-cpr small { font: 12px var(--font-body); }
.dz-ca { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .dz-ca .btn { justify-content: center; }
.dz-allow.cl .dz-al { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
/* board */
.dz-board { display: grid; gap: 12px; }
.dz-mason { columns: 4 220px; column-gap: 10px; } .dz-mason figure { break-inside: avoid; margin: 0 0 10px; border-radius: 14px; overflow: hidden; background: var(--surface-2); position: relative; }
.dz-mason img { width: 100%; display: block; } .dz-mason figcaption { display: flex; align-items: center; gap: 4px; padding: 4px 6px; font-size: 12.5px; } .dz-mason figcaption .input { flex: 1; }
.dz-mason figure.sel figcaption { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px; padding: 3px 10px; }
.dz-insp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 60vh; overflow: auto; } .dz-insp button { border: 0; padding: 0; background: none; cursor: pointer; text-align: left; font: 12.5px var(--font-body); color: var(--ink-soft); }
.dz-insp img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 4px; }
/* decks */
.dz-decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dz-deck { display: grid; gap: 6px; justify-items: start; padding: 18px; border-radius: 18px; border: 0; background: var(--surface-2); text-align: left; cursor: pointer; color: var(--ink); font: inherit; transition: transform .12s ease; }
.dz-deck:hover { transform: translateY(-2px); } .dz-deck small { color: var(--ink-soft); } .dz-dic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); margin-bottom: 4px; } .dz-dic svg { width: 20px; height: 20px; }
/* design studio page */
.ds-list { padding: 4px 8px; } .ds-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 6px; } .ds-row + .ds-row { border-top: 1px solid var(--line); }
.ds-lib .lib-img { width: 100%; height: 130px; object-fit: cover; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-faint); margin-bottom: 6px; } .dir-card.lib { cursor: default; padding: 10px 10px 14px; }
@media (max-width: 900px) { .dz-edg { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dz-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) {
  .dz-rh { grid-template-columns: auto minmax(0, 1fr) auto; } .dz-q, .dz-lock { display: none; } .dz-rh .pill { grid-column: 2 / -1; justify-self: start; }
  .dz-ed { grid-template-columns: 1fr; } .dz-up { width: 100%; } .dz-edg { grid-template-columns: 1fr 1fr; }
  .dz-mason { columns: 2 140px; } .dz-insp { grid-template-columns: 1fr 1fr; } .ds-row { grid-template-columns: auto minmax(0, 1fr) auto; } .ds-row > :nth-child(n+4) { grid-column: 2 / -1; }
}
.dz-alh { display: grid; gap: 2px; justify-content: stretch; } .dz-alh b { font-size: 13.5px; } .dz-alh span { font-size: 13px; white-space: nowrap; } .dz-alh .num-in { width: 96px; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); } .sm-t { font-size: 11.5px; } .num-in { max-width: 96px; }

/* ===================== FRESH BUILD · projects first ===================== */
.fc { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; background: var(--tint); color: var(--on-tint); font: 600 11.5px var(--font-body); box-shadow: 0 0 0 2px var(--card-bg); }
.fc.sm { width: 24px; height: 24px; font-size: 9.5px; } .fc.xl { width: 64px; height: 64px; font-size: 18px; } .fc.xxl { width: 84px; height: 84px; font-size: 24px; }
.fc.none { background: transparent; box-shadow: none; } .fc.more { background: var(--surface-2); color: var(--ink-soft); font-size: 11px; }
.av.lg { width: 54px; height: 54px; font-size: 17px; border-radius: 16px; }
.view { grid-template-columns: minmax(0, 1fr); }
.view > .nav-back, .nav-back { justify-self: start; }
.kvr .row { flex-wrap: nowrap; white-space: nowrap; }
.nav-back { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font: 600 13px var(--font-body); }
.nav-back:hover { background: var(--accent); color: var(--on-accent); }
.nav-back .ico { width: 18px; height: 18px; }
.v5-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--ink-faint); min-width: 260px; flex: 0 1 360px; }
.v5-search input { all: unset; flex: 1; min-width: 0; color: var(--ink); font: 500 13.5px var(--font-body); }
.pj-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .pj-tools .chips { flex: 1; min-width: 0; }
.micro + h1 { margin-top: 2px; }
.code { display: inline-block; font: 700 10.5px var(--font-body); letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-soft); }
.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-h { font: 600 14px var(--font-body); margin: 6px 0 2px; }

/* Projects list */
.pj-list { padding: 6px; }
.pj-row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1.3fr) 110px 150px 18px; gap: 14px; align-items: center; width: 100%; padding: 12px 12px; border-radius: 14px; }
.pj-row + .pj-row { box-shadow: 0 -1px 0 var(--line); }
.pj-row:hover { background: var(--surface-2); } .pj-row:hover b { color: var(--accent); }
.pj-main, .pj-ph, .pj-val { display: grid; gap: 3px; min-width: 0; }
.pj-main b { font: 600 14px var(--font-body); } .pj-main small, .pj-ph small, .pj-val small { color: var(--ink-faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-ph .pill { justify-self: start; } .pj-val { justify-items: end; } .pj-val b { font: 500 15px var(--font-body); font-variant-numeric: tabular-nums; }
.pj-team { display: flex; } .pj-team .fc { margin-left: -6px; } .pj-team .fc:first-child { margin-left: 0; }
.pj-bar { width: 110px; height: 5px; border-radius: 4px; background: var(--surface-3); overflow: hidden; } .pj-bar i { display: block; height: 100%; background: var(--ok); }
.chev { width: 16px; height: 16px; color: var(--ink-faint); }

/* Project page header */
.pj-head { padding: 14px 18px 0; display: grid; gap: 12px; }
.pj-top { display: flex; align-items: center; gap: 10px; }
.pj-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pj-title h1 { font: var(--title-weight) clamp(24px, 2.6vw, 32px) var(--font-display); letter-spacing: -.02em; }
.pj-title p { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }
.pj-kv { display: grid; justify-items: end; gap: 2px; padding: 0 6px; } .pj-kv span { font-size: 11.5px; color: var(--ink-faint); } .pj-kv b { font: var(--num-weight) 28px var(--font-display); letter-spacing: -.02em; } .pj-kv small { font-size: 12px; color: var(--ok); }
.pj-team.big { gap: 10px; } .pj-team.big > span { display: grid; justify-items: center; gap: 2px; font-size: 10.5px; color: var(--ink-faint); } .pj-team.big .fc { width: 38px; height: 38px; margin: 0; }
.phases { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ph { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); color: var(--ink-faint); font-size: 12.5px; min-width: 0; }
.ph b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font: 600 10.5px var(--font-body); flex: none; }
.ph .ico { width: 16px; height: 16px; color: var(--ok); flex: none; }
.ph.done { color: var(--ink-soft); } .ph.on { background: var(--accent); color: var(--on-accent); } .ph.on i { background: rgba(255,255,255,.25); }
.dept-tabs { display: flex; gap: 4px; margin: 0 -6px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; }
.dept-tabs button { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px 13px; font: 600 14px var(--font-body); color: var(--ink-soft); white-space: nowrap; border-bottom: 2.5px solid transparent; }
.dept-tabs button .ico { width: 18px; height: 18px; }
.dept-tabs button:hover { color: var(--ink); }
.dept-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.dept-tabs .bd { font-style: normal; min-width: 16px; height: 16px; border-radius: 99px; background: var(--warn); color: #fff; font: 700 10px var(--font-body); display: grid; place-items: center; padding: 0 4px; }
.pj-body { overflow: hidden; }
.subtabs { display: flex; gap: 6px; padding: 12px 16px 0; overflow-x: auto; scrollbar-width: none; flex-wrap: wrap; }
.subtabs button { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); font: 500 13px var(--font-body); white-space: nowrap; }
.subtabs button:hover { color: var(--ink); }
.subtabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.subtabs .n { font-size: 11px; opacity: .7; }

/* KPIs + accounting boxes (Lovable money layout) */
.kps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; flex: 1; }
.kps.five { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kp { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--card-bg); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.tab-body .kp { background: var(--surface-2); box-shadow: none; }
.kp span { font: 600 10.5px var(--font-body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.kp b { font: var(--num-weight) 26px var(--font-display); letter-spacing: -.02em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp small { font-size: 12px; color: var(--ink-faint); }
.kp.ok b { color: var(--ok); } .kp.warn b { color: var(--warn); } .kp.bad b { color: var(--bad); }
.acc3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ac-card { display: grid; gap: 8px; padding: 16px 18px; border-radius: 18px; background: var(--surface-2); min-width: 0; }
.ac-card b { font: var(--num-weight) 30px var(--font-display); letter-spacing: -.02em; }
.ac-card small { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-faint); }
.ac-card.hero { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #0b1a3a)); color: #fff; } .ac-card.hero .micro, .ac-card.hero small { color: rgba(255,255,255,.8); }
.ac-box { padding: 16px 18px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 2px; align-content: start; min-width: 0; }
.ac-box h3 { font: 600 14px var(--font-body); margin-bottom: 6px; } .ac-box h3 small { font-weight: 500; }
.kvr { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; } .kvr:last-child { border-bottom: 0; }
.kvr span { color: var(--ink-soft); } .kvr b { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; } .kvr.b b, .kvr.b span { font-weight: 700; color: var(--ink); }
.m-tabs { display: flex; gap: 22px; flex-wrap: wrap; align-items: end; }
.m-grp { display: grid; gap: 6px; } .m-grp .subtabs { padding: 0; }
.table td .btn.sm + .btn.sm { margin-left: 4px; }
.link-t { color: var(--accent); font-weight: 600; }

/* Design Team Board (Gabi) */
.dboard { padding: 14px; display: grid; gap: 12px; background: var(--card-bg); }
.db-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; padding: 2px 4px 6px; }
.db-brand { display: flex; align-items: center; gap: 12px; } .db-brand > span:last-child { display: grid; line-height: 1.1; } .db-brand small { font-size: 11px; color: var(--ink-faint); } .db-brand b { font: 700 17px var(--font-body); }
.db-logo { font: 800 15px var(--font-display); letter-spacing: .04em; color: #1f6b3f; display: grid; line-height: 1; } .db-logo small { font: 700 7.5px var(--font-body); letter-spacing: .22em; margin-top: 2px; }
:root[data-theme="dark"] .db-logo, :root:not([data-theme="light"]) .db-logo { color: #6fd39a; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .db-logo { color: #1f6b3f; } }
.db-div { width: 1px; height: 30px; background: var(--line); }
.db-faces { display: flex; } .db-faces .fc { margin-left: -8px; width: 30px; height: 30px; } .db-faces .fc:first-child { margin-left: 0; }
.db-pill { display: inline-flex; gap: 6px; align-items: center; height: 30px; padding: 0 12px; border-radius: 9px; background: var(--surface-2); font-size: 12px; color: var(--ink-soft); } .db-pill b { color: var(--ink); font-weight: 600; }
.db-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.db-col { display: grid; gap: 10px; align-content: start; padding: 10px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 3px 0 var(--cc); min-height: 280px; }
.db-col.over { outline: 2px dashed var(--cc); outline-offset: -3px; }
.db-col > header { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: center; padding: 4px 4px 0; } .db-col > header b { font: 800 11.5px var(--font-body); letter-spacing: .06em; } .db-col > header span { font-size: 12px; color: var(--ink-faint); font-weight: 600; } .db-col > header .btn { justify-self: end; }
.db-empty { padding: 26px 8px; text-align: center; color: var(--ink-faint); font-size: 12px; border: 1.5px dashed var(--line); border-radius: 12px; }
.db-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-faint); padding: 0 4px; } .db-legend span { display: inline-flex; gap: 6px; align-items: center; } .db-legend .dc-bar { position: static; width: 22px; height: 5px; }
.db-legend .dc-pay { position: static; width: 18px; height: 18px; font-size: 11px; }
.db-mini { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.dcard { position: relative; display: grid; gap: 8px; padding: 14px 12px 10px; border-radius: 14px; background: var(--card-bg); box-shadow: 0 1px 0 var(--line), 0 10px 22px -16px var(--shadow), inset 0 0 0 1px var(--line); cursor: pointer; overflow: hidden; transition: transform .12s, box-shadow .12s; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .dcard { background: #fff; } }
:root[data-theme="light"] .dcard { background: #fff; }
.dcard:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -18px var(--shadow), inset 0 0 0 1px var(--line); }
.dcard.dim { opacity: .55; }
.dc-bar { position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 3px; background: #3fbf6f; } .dc-bar.warn { background: #f08a24; } .dc-bar.bad { background: #e5484d; }
.dcard header { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 4px 6px 6px; margin: 0 -12px; padding-left: 18px; padding-right: 12px; background: linear-gradient(var(--surface-2), transparent); }
.dcard header b { font: 700 15px var(--font-body); line-height: 1.2; letter-spacing: -.01em; }
.dc-sub { flex: none; font: 600 10px var(--font-body); text-transform: uppercase; letter-spacing: .05em; padding: 3px 7px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); }
.dc-rows { display: grid; gap: 5px; }
.dc-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 6px 5px 8px; border-radius: 10px; background: var(--surface-2); font: 500 11.5px var(--font-body); letter-spacing: .02em; color: var(--ink); text-transform: uppercase; }
.dc-row.plain { grid-template-columns: minmax(0, 1fr) auto; padding-left: 22px; } .dc-row b { font-weight: 800; }
.dc-dot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; box-shadow: inset 0 -2px 3px rgba(0,0,0,.15), inset 0 2px 2px rgba(255,255,255,.6); }
.dcard footer { display: flex; align-items: center; gap: 8px; padding: 4px 4px 0; }
.dc-date { display: inline-flex; gap: 6px; align-items: center; font: 600 12.5px var(--font-body); font-variant-numeric: tabular-nums; } .dc-date .ico { width: 17px; height: 17px; color: #e5484d; }
.dc-mail { all: unset; cursor: pointer; margin-left: auto; position: relative; color: var(--ink-soft); display: grid; } .dc-mail .ico { width: 19px; height: 19px; } .dc-mail.new::after { content: ""; position: absolute; top: -2px; right: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.dc-pay { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--font-body); border: 1.6px solid; margin-left: auto; position: relative; z-index: 1; }
.dc-mail + .dc-pay { margin-left: 0; }
.dc-pay.paid { color: #2f9e5b; border-color: #2f9e5b; } .dc-pay.due { color: #f08a24; border-color: #f08a24; }
.dcard footer::after { content: ""; position: absolute; right: 0; bottom: 0; width: 64px; height: 44px; background: linear-gradient(135deg, transparent 50%, rgba(63,191,111,.18) 50%); pointer-events: none; }
.dcard:has(.dc-pay.due) footer::after { background: linear-gradient(135deg, transparent 50%, rgba(240,138,36,.2) 50%); }
.dcard.big { cursor: default; padding: 18px 16px 14px; gap: 10px; } .dcard.big:hover { transform: none; }
.dcard.big header b { font-size: 22px; } .dcard.big .dc-row { font-size: 13.5px; padding: 8px 8px 8px 12px; } .dcard.big .dc-row .fc { width: 32px; height: 32px; } .dcard.big .dc-date { font-size: 16px; } .dcard.big .dc-pay { width: 32px; height: 32px; font-size: 16px; }

/* Card detail */
.dsg { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.dsg-l { display: grid; gap: 12px; position: sticky; top: 0; }
.dsg-num { display: flex; align-items: center; gap: 10px; } .dsg-num b { font: 700 14px var(--font-body); } .dsg-num .btn { margin-left: auto; }
.dsg-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .dsg-metrics .kp { padding: 10px; } .dsg-metrics .kp b { font-size: 20px; }
.dsg-r { display: grid; gap: 12px; min-width: 0; }
.dsg-flow { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--accent-soft); }
.dsg-flow .row.grow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dsg-sec { display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); align-content: start; min-width: 0; }
.dsg-sh { display: grid; gap: 1px; } .dsg-sh b { font: 600 14px var(--font-body); } .dsg-sh small { font-size: 12px; color: var(--ink-faint); }
.dsg-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.dsg-line .input.sm { max-width: 150px; }
.dsg-k { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; font: 700 12.5px var(--font-body); letter-spacing: .04em; } .dsg-k small { font: 500 11.5px var(--font-body); letter-spacing: 0; color: var(--ink-faint); }
.rv { display: flex; gap: 4px; flex-wrap: wrap; }
.rv-c { cursor: pointer; padding: 5px 9px; border-radius: 8px; font: 700 11px var(--font-body); color: var(--ink-faint); background: var(--card-bg); box-shadow: inset 0 0 0 1px var(--line); }
.rv-c.has { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-faint); } .rv-c.cur { background: var(--accent); color: var(--on-accent); box-shadow: none; } .rv-c.appr { background: var(--ok); }
.rv-c:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tgl { all: unset; cursor: pointer; padding: 5px 10px; border-radius: 8px; font: 700 11px var(--font-body); letter-spacing: .04em; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); } .tgl.on { background: var(--ok-soft); color: var(--ok); box-shadow: none; } .tgl[disabled] { cursor: default; opacity: .8; }
.whosel { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; } .whosel .input { max-width: 110px; }
.who { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.dsg-pay { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; } .dsg-pay span:nth-child(2) { display: grid; flex: 1; } .dsg-pay small { color: var(--ink-faint); font-size: 12px; } .dsg-pay .dc-pay { margin: 0; width: 30px; height: 30px; }
.dsg-pay.paid { background: var(--ok-soft); } .dsg-pay.due { background: var(--warn-soft); }
.dsg-auto { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-soft); }

/* Production / Construction */
.step { all: unset; box-sizing: border-box; cursor: pointer; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12px; color: var(--ink-soft); display: grid; gap: 3px; }
.cst { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.cs { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font: 500 13px var(--font-body); }
.cs.done { color: var(--ink-soft); } .cs.done .check { background: var(--ok); color: #fff; box-shadow: none; } .cs.cur { background: var(--accent-soft); font-weight: 600; } .cs .pill { margin-left: auto; }
.daily { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.log-img { display: block; max-width: 220px; border-radius: 10px; margin-top: 6px; }

/* Directory */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.dir-card { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 20px 14px 16px; border-radius: 18px; background: var(--card-bg); box-shadow: var(--card-shadow), inset 0 0 0 1px var(--line); text-align: center; }
.dir-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -18px var(--shadow), inset 0 0 0 1px var(--line); }
.dir-card b { font: 600 14px var(--font-body); margin-top: 6px; } .dir-card small { color: var(--ink-soft); font-size: 12.5px; } .dir-card .pill { margin-top: 6px; }
.prof { padding: 22px; display: grid; gap: 16px; margin-top: 12px; }
.prof-h { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; } .prof-h h1 { font: var(--title-weight) 30px var(--font-display); letter-spacing: -.02em; } .prof-h p { color: var(--ink-soft); margin: 2px 0 8px; }

@media (max-width: 1240px) { .pj-row { grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1.2fr) 140px 18px; } .pj-team { display: none; } .dsg { grid-template-columns: 1fr; } .dsg-l { position: static; grid-template-columns: minmax(0, 340px) 1fr; } .dsg-flow .row.grow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .phases { grid-template-columns: repeat(3, minmax(0, 1fr)); } .acc3 { grid-template-columns: 1fr; } .pj-team.big { display: none; } }
@media (max-width: 680px) {
  .pj-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; } .pj-ph { display: none; } .pj-row .chev { display: none; } .pj-val small { display: none; } .pj-bar { width: 70px; }
  .pj-head { padding: 12px 14px 0; } .pj-kv { justify-items: start; padding: 0; } .pj-kv b { font-size: 22px; }
  .phases { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; } .ph { padding: 6px; justify-content: center; } .ph b { display: none; }
  .dept-tabs button { padding: 10px 10px 11px; font-size: 13px; } .dept-tabs button span { display: none; } .dept-tabs button[aria-selected="true"] span { display: inline; }
  .subtabs { flex-wrap: nowrap; padding: 10px 14px 0; }
  .v5-search { min-width: 0; flex: 1 1 100%; }
  .dsg-l { grid-template-columns: 1fr; } .dsg-flow .row.grow { grid-template-columns: 1fr 1fr; } .dsg-line .input.sm { max-width: 120px; } .whosel { margin-left: 0; }
  .db-cols { grid-auto-columns: 82%; } .db-h .row { display: none; }
  .m-tabs { gap: 10px; } .kp b { font-size: 21px; } .ac-card b { font-size: 24px; }
  .dir-grid { grid-template-columns: 1fr 1fr; } .prof { padding: 16px; }
}
/* ===== Richer only · baby blue (from v14) + TDB brand palette (5 Nov 2026 lock) ===== */
/* ---------- Richer · cosmic baby blue (dark) ---------- */
:root {
  color-scheme: dark;
  --bg: #111a2d; --bg-2: #111a2d; --surface: #18233a; --surface-2: #202d48; --surface-3: #2a3956;
  --ink: #eef5ff; --ink-soft: #9db1cf; --ink-faint: #627392; --line: rgba(150,200,255,.09);
  --accent: #8ccbff; --on-accent: #0a1b35; --accent-soft: rgba(140,203,255,.16); --tint: rgba(140,203,255,.12); --on-tint: #d8eeff;
  --ok: #5fd8a6; --ok-soft: rgba(95,216,166,.14); --warn: #ffae6e; --warn-soft: rgba(255,174,110,.15); --bad: #ff7d8d;
  --sketch: #c6dcf5; --shadow: rgba(2,8,22,.5);
  --glow-a: rgba(140,203,255,.13); --glow-b: rgba(160,140,255,.10);
  --font-display: "Montserrat", "Avenir Next", system-ui, sans-serif;
  --font-body: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --r-card: 18px; --r-ctl: 12px; --r-chip: 999px;
  --num-weight: 200; --title-weight: 300;
  --card-bg: var(--surface); --card-shadow: inset 0 1px 0 rgba(170,215,255,.06), 0 14px 34px -20px var(--shadow);
  --rail-w: 78px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #e8f2fb; --bg-2: #e8f2fb; --surface: #ffffff; --surface-2: #f1f7fd; --surface-3: #e1eef9;
    --ink: #10213b; --ink-soft: #4d6283; --ink-faint: #8fa3bf; --line: rgba(20,70,130,.09);
    --accent: #3b98e4; --on-accent: #ffffff; --accent-soft: rgba(59,152,228,.13); --tint: #e2f0fc; --on-tint: #0e4a82;
    --ok: #14a46c; --ok-soft: rgba(20,164,108,.12); --warn: #df6a2c; --warn-soft: rgba(223,106,44,.12); --bad: #d63c50;
    --sketch: #33507a; --shadow: rgba(30,80,140,.10);
    --glow-a: rgba(124,196,250,.35); --glow-b: rgba(190,220,255,.45);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e8f2fb; --bg-2: #e8f2fb; --surface: #ffffff; --surface-2: #f1f7fd; --surface-3: #e1eef9;
    --ink: #10213b; --ink-soft: #4d6283; --ink-faint: #8fa3bf; --line: rgba(20,70,130,.09);
    --accent: #3b98e4; --on-accent: #ffffff; --accent-soft: rgba(59,152,228,.13); --tint: #e2f0fc; --on-tint: #0e4a82;
    --ok: #14a46c; --ok-soft: rgba(20,164,108,.12); --warn: #df6a2c; --warn-soft: rgba(223,106,44,.12); --bad: #d63c50;
    --sketch: #33507a; --shadow: rgba(30,80,140,.10);
    --glow-a: rgba(124,196,250,.35); --glow-b: rgba(190,220,255,.45);
}
:root[data-theme="dark"] { color-scheme: dark; }
body { background-attachment: fixed; background: radial-gradient(1100px 620px at 85% -12%, var(--glow-a), transparent 62%), radial-gradient(900px 560px at -8% 108%, var(--glow-b), transparent 60%), var(--bg) !important; }

:root { --charcoal: #2A2A2A; --snow: #EDEAE5; --brass: #D2AE72; --d-prospects: #C9BEAE; --d-sales: #8ccbff; --d-design: #D2AE72; --d-production: #C49A82; --d-construction: #A9B79C; --d-accounting: #B5AFA3; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --brass: #B08A4C; --d-prospects: #9C8F7B; --d-sales: #3b98e4; --d-design: #B08A4C; --d-production: #8D6E5B; --d-construction: #6F7B63; --d-accounting: #6B665C; } }
:root[data-theme="light"] { --brass: #B08A4C; --d-prospects: #9C8F7B; --d-sales: #3b98e4; --d-design: #B08A4C; --d-production: #8D6E5B; --d-construction: #6F7B63; --d-accounting: #6B665C; }
:root[data-accent="brass"] { --bg: #1b1a19; --bg-2: #1b1a19; --surface: #242220; --surface-2: #2c2a27; --surface-3: #37342f; --ink: #EDEAE5; --ink-soft: #b5afa3; --ink-faint: #7c766c; --line: rgba(237,234,229,.08); --sketch: #d9d2c6; --shadow: rgba(0,0,0,.45); --card-shadow: inset 0 1px 0 rgba(237,234,229,.05), 0 14px 34px -20px var(--shadow); --accent: #D2AE72; --on-accent: #231a0c; --accent-soft: rgba(210,174,114,0.16); --tint: rgba(210,174,114,0.13); --on-tint: #D2AE72; --glow-a: rgba(210,174,114,0.1); --glow-b: rgba(138,148,127,0.08); }
@media (prefers-color-scheme: light) { :root[data-accent="brass"]:not([data-theme="dark"]) { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #B08A4C; --on-accent: #fff; --accent-soft: rgba(176,138,76,0.12); --tint: rgba(176,138,76,0.1); --on-tint: #B08A4C; --glow-a: rgba(176,138,76,0.16); --glow-b: rgba(201,190,174,0.3); } }
:root[data-accent="brass"][data-theme="light"] { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #B08A4C; --on-accent: #fff; --accent-soft: rgba(176,138,76,0.12); --tint: rgba(176,138,76,0.1); --on-tint: #B08A4C; --glow-a: rgba(176,138,76,0.16); --glow-b: rgba(201,190,174,0.3); }
:root[data-accent="aged"] { --bg: #1b1a19; --bg-2: #1b1a19; --surface: #242220; --surface-2: #2c2a27; --surface-3: #37342f; --ink: #EDEAE5; --ink-soft: #b5afa3; --ink-faint: #7c766c; --line: rgba(237,234,229,.08); --sketch: #d9d2c6; --shadow: rgba(0,0,0,.45); --card-shadow: inset 0 1px 0 rgba(237,234,229,.05), 0 14px 34px -20px var(--shadow); --accent: #C4A675; --on-accent: #21190d; --accent-soft: rgba(196,166,117,0.16); --tint: rgba(196,166,117,0.13); --on-tint: #C4A675; --glow-a: rgba(196,166,117,0.1); --glow-b: rgba(138,148,127,0.08); }
@media (prefers-color-scheme: light) { :root[data-accent="aged"]:not([data-theme="dark"]) { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #957A4E; --on-accent: #fff; --accent-soft: rgba(149,122,78,0.12); --tint: rgba(149,122,78,0.1); --on-tint: #957A4E; --glow-a: rgba(149,122,78,0.16); --glow-b: rgba(201,190,174,0.3); } }
:root[data-accent="aged"][data-theme="light"] { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #957A4E; --on-accent: #fff; --accent-soft: rgba(149,122,78,0.12); --tint: rgba(149,122,78,0.1); --on-tint: #957A4E; --glow-a: rgba(149,122,78,0.16); --glow-b: rgba(201,190,174,0.3); }
:root[data-accent="sage"] { --bg: #1b1a19; --bg-2: #1b1a19; --surface: #242220; --surface-2: #2c2a27; --surface-3: #37342f; --ink: #EDEAE5; --ink-soft: #b5afa3; --ink-faint: #7c766c; --line: rgba(237,234,229,.08); --sketch: #d9d2c6; --shadow: rgba(0,0,0,.45); --card-shadow: inset 0 1px 0 rgba(237,234,229,.05), 0 14px 34px -20px var(--shadow); --accent: #A9B79C; --on-accent: #151b12; --accent-soft: rgba(169,183,156,0.16); --tint: rgba(169,183,156,0.13); --on-tint: #A9B79C; --glow-a: rgba(169,183,156,0.1); --glow-b: rgba(138,148,127,0.08); }
@media (prefers-color-scheme: light) { :root[data-accent="sage"]:not([data-theme="dark"]) { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #6F7B63; --on-accent: #fff; --accent-soft: rgba(111,123,99,0.12); --tint: rgba(111,123,99,0.1); --on-tint: #6F7B63; --glow-a: rgba(111,123,99,0.16); --glow-b: rgba(201,190,174,0.3); } }
:root[data-accent="sage"][data-theme="light"] { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #6F7B63; --on-accent: #fff; --accent-soft: rgba(111,123,99,0.12); --tint: rgba(111,123,99,0.1); --on-tint: #6F7B63; --glow-a: rgba(111,123,99,0.16); --glow-b: rgba(201,190,174,0.3); }
:root[data-accent="clay"] { --bg: #1b1a19; --bg-2: #1b1a19; --surface: #242220; --surface-2: #2c2a27; --surface-3: #37342f; --ink: #EDEAE5; --ink-soft: #b5afa3; --ink-faint: #7c766c; --line: rgba(237,234,229,.08); --sketch: #d9d2c6; --shadow: rgba(0,0,0,.45); --card-shadow: inset 0 1px 0 rgba(237,234,229,.05), 0 14px 34px -20px var(--shadow); --accent: #C49A82; --on-accent: #24160f; --accent-soft: rgba(196,154,130,0.16); --tint: rgba(196,154,130,0.13); --on-tint: #C49A82; --glow-a: rgba(196,154,130,0.1); --glow-b: rgba(138,148,127,0.08); }
@media (prefers-color-scheme: light) { :root[data-accent="clay"]:not([data-theme="dark"]) { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #8D6E5B; --on-accent: #fff; --accent-soft: rgba(141,110,91,0.12); --tint: rgba(141,110,91,0.1); --on-tint: #8D6E5B; --glow-a: rgba(141,110,91,0.16); --glow-b: rgba(201,190,174,0.3); } }
:root[data-accent="clay"][data-theme="light"] { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #8D6E5B; --on-accent: #fff; --accent-soft: rgba(141,110,91,0.12); --tint: rgba(141,110,91,0.1); --on-tint: #8D6E5B; --glow-a: rgba(141,110,91,0.16); --glow-b: rgba(201,190,174,0.3); }
:root[data-accent="taupe"] { --bg: #1b1a19; --bg-2: #1b1a19; --surface: #242220; --surface-2: #2c2a27; --surface-3: #37342f; --ink: #EDEAE5; --ink-soft: #b5afa3; --ink-faint: #7c766c; --line: rgba(237,234,229,.08); --sketch: #d9d2c6; --shadow: rgba(0,0,0,.45); --card-shadow: inset 0 1px 0 rgba(237,234,229,.05), 0 14px 34px -20px var(--shadow); --accent: #B5AFA3; --on-accent: #1d1b17; --accent-soft: rgba(181,175,163,0.16); --tint: rgba(181,175,163,0.13); --on-tint: #B5AFA3; --glow-a: rgba(181,175,163,0.1); --glow-b: rgba(138,148,127,0.08); }
@media (prefers-color-scheme: light) { :root[data-accent="taupe"]:not([data-theme="dark"]) { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #6B665C; --on-accent: #fff; --accent-soft: rgba(107,102,92,0.12); --tint: rgba(107,102,92,0.1); --on-tint: #6B665C; --glow-a: rgba(107,102,92,0.16); --glow-b: rgba(201,190,174,0.3); } }
:root[data-accent="taupe"][data-theme="light"] { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #6B665C; --on-accent: #fff; --accent-soft: rgba(107,102,92,0.12); --tint: rgba(107,102,92,0.1); --on-tint: #6B665C; --glow-a: rgba(107,102,92,0.16); --glow-b: rgba(201,190,174,0.3); }
:root[data-accent="sand"] { --bg: #1b1a19; --bg-2: #1b1a19; --surface: #242220; --surface-2: #2c2a27; --surface-3: #37342f; --ink: #EDEAE5; --ink-soft: #b5afa3; --ink-faint: #7c766c; --line: rgba(237,234,229,.08); --sketch: #d9d2c6; --shadow: rgba(0,0,0,.45); --card-shadow: inset 0 1px 0 rgba(237,234,229,.05), 0 14px 34px -20px var(--shadow); --accent: #C9BEAE; --on-accent: #221d16; --accent-soft: rgba(201,190,174,0.16); --tint: rgba(201,190,174,0.13); --on-tint: #C9BEAE; --glow-a: rgba(201,190,174,0.1); --glow-b: rgba(138,148,127,0.08); }
@media (prefers-color-scheme: light) { :root[data-accent="sand"]:not([data-theme="dark"]) { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #8E816D; --on-accent: #fff; --accent-soft: rgba(142,129,109,0.12); --tint: rgba(142,129,109,0.1); --on-tint: #8E816D; --glow-a: rgba(142,129,109,0.16); --glow-b: rgba(201,190,174,0.3); } }
:root[data-accent="sand"][data-theme="light"] { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #8E816D; --on-accent: #fff; --accent-soft: rgba(142,129,109,0.12); --tint: rgba(142,129,109,0.1); --on-tint: #8E816D; --glow-a: rgba(142,129,109,0.16); --glow-b: rgba(201,190,174,0.3); }
:root[data-accent="charcoal"] { --bg: #1b1a19; --bg-2: #1b1a19; --surface: #242220; --surface-2: #2c2a27; --surface-3: #37342f; --ink: #EDEAE5; --ink-soft: #b5afa3; --ink-faint: #7c766c; --line: rgba(237,234,229,.08); --sketch: #d9d2c6; --shadow: rgba(0,0,0,.45); --card-shadow: inset 0 1px 0 rgba(237,234,229,.05), 0 14px 34px -20px var(--shadow); --accent: #EDEAE5; --on-accent: #2A2A2A; --accent-soft: rgba(237,234,229,0.16); --tint: rgba(237,234,229,0.13); --on-tint: #EDEAE5; --glow-a: rgba(237,234,229,0.1); --glow-b: rgba(138,148,127,0.08); }
@media (prefers-color-scheme: light) { :root[data-accent="charcoal"]:not([data-theme="dark"]) { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #2A2A2A; --on-accent: #EDEAE5; --accent-soft: rgba(42,42,42,0.12); --tint: rgba(42,42,42,0.1); --on-tint: #2A2A2A; --glow-a: rgba(42,42,42,0.16); --glow-b: rgba(201,190,174,0.3); } }
:root[data-accent="charcoal"][data-theme="light"] { --bg: #F1EEE9; --bg-2: #F1EEE9; --surface: #ffffff; --surface-2: #F7F5F1; --surface-3: #ECE8E1; --ink: #2A2A2A; --ink-soft: #6B665C; --ink-faint: #A39C90; --line: rgba(42,42,42,.09); --sketch: #4a463f; --shadow: rgba(60,50,35,.10); --accent: #2A2A2A; --on-accent: #EDEAE5; --accent-soft: rgba(42,42,42,0.12); --tint: rgba(42,42,42,0.1); --on-tint: #2A2A2A; --glow-a: rgba(42,42,42,0.16); --glow-b: rgba(201,190,174,0.3); }

/* brand touches */
#skin-btn .lbl { display: inline; } .sw-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
#skin-menu button { grid-template-columns: 22px 1fr auto; } #skin-menu .sw-dot { width: 18px; height: 18px; }
.acc-sw { display: flex; gap: 10px; flex-wrap: wrap; } .acc-sw button { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font: 500 12px var(--font-body); min-width: 74px; }
.acc-sw button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); } .acc-sw .sw-dot { width: 28px; height: 28px; }
.mark { display: grid; place-items: center; } .mark img { width: 30px; height: 30px; display: block; }
.logo-light { display: block; } .logo-dark { display: none; }
:root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .logo-light { display: block; } :root:not([data-theme="dark"]) .logo-dark { display: none; } }
.db-logo img { height: 30px; width: auto; }
.dept-tabs button { --dc: var(--accent); } .dept-tabs button .ico { color: var(--dc); }
.dept-tabs button[aria-selected="true"] { border-bottom-color: var(--dc); }
.dept-tabs [data-t="prospects"] { --dc: var(--d-prospects); } .dept-tabs [data-t="sales"] { --dc: var(--d-sales); } .dept-tabs [data-t="design"] { --dc: var(--d-design); } .dept-tabs [data-t="production"] { --dc: var(--d-production); } .dept-tabs [data-t="construction"] { --dc: var(--d-construction); } .dept-tabs [data-t="accounting"] { --dc: var(--d-accounting); }
.ph.on { background: var(--accent); color: var(--on-accent); }
.pj-kv b { color: var(--ink); } .pj-kv span { color: var(--brass); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; font-size: 10.5px; }
.ac-card.hero { background: #2A2A2A; color: #EDEAE5; box-shadow: inset 0 0 0 1px rgba(210,174,114,.25); } .ac-card.hero .micro { color: #D2AE72; } .ac-card.hero small { color: rgba(237,234,229,.7); }
.micro { color: var(--ink-faint); }
.dir-card .pill, .pj-ph .pill:not(.ok):not(.warn):not(.bad):not(.acc) { background: color-mix(in srgb, var(--d-prospects) 22%, transparent); color: var(--ink-soft); }

/* ===================================================================== */
/* Section B · server-rendered shell additions                           */
/* Every rule here reuses Section A's tokens; nothing redefines a token.  */
/* ===================================================================== */

/* B1 · Real links wearing the artifact's button styles. The artifact draws its navigation with
   <button data-go>. The server renders <a href hx-get>, so refresh, new-tab and no-JS all work.
   These lines give <a> exactly what the <button> rules give. */
/* Most of these use `all: unset`, as their <button> twins do, which also drops link colour and
   underline. These four don't, so they inherit text colour explicitly. */
.palette a.it, a.fi, a.ev, a.li { color: inherit; text-decoration: none; }
.menu a { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--ink); font: 500 13.5px var(--font-body); }
.menu a:hover, .menu a:focus-visible { background: var(--surface); }
.menu a .ico, .menu button .ico { width: 18px; height: 18px; color: var(--ink-soft); }
.menu form { margin: 0; }
.menu button.danger, .menu button.danger .ico { color: var(--bad); }
.menu button[disabled] .av { color: var(--on-tint); }
.sheet-grid a { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--surface-2); font: 500 12px var(--font-body); text-align: center; }
.sheet-grid a .ico { width: 22px; height: 22px; }
.sheet-grid.big a { padding: 18px 8px; font-size: 12.5px; } .sheet-grid.big a .ico { width: 24px; height: 24px; }
.sheet-grid a:hover { background: var(--surface-3); }
.subtabs a { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); font: 500 13px var(--font-body); white-space: nowrap; }
.subtabs a:hover { color: var(--ink); }
.subtabs a[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.subtabs a:focus-visible, .menu a:focus-visible, .sheet-grid a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.subtabs.ss-sections { padding: 0; flex-wrap: nowrap; }
.stats a { all: unset; box-sizing: border-box; cursor: pointer; padding: 20px 24px; display: grid; gap: 6px; border-left: 1px solid var(--line); transition: background .15s; }
.stats a:first-child { border-left: 0; }
.stats a:hover { background: var(--surface-2); }
@media (max-width: 760px) { .stats a:nth-child(3) { border-left: 0; } .stats a:nth-child(n+3) { border-top: 1px solid var(--line); } }
.palette a.it { display: grid; }
a.fi { cursor: pointer; }
.focus .fi > .btn { display: inline-flex; }   /* the artifact's <button> is a <span> here (no button inside a link) */

/* B2 · Brand mark. The artifact's LOGO(): two <img>s (charcoal for light, snowbound for dark).
   If the SVGs in wwwroot/brand/ are missing, a "TOGETHER CRM" text mark shows. */
.mark .mk-text { display: none; font: 600 13px/30px var(--font-display); letter-spacing: .12em; }   /* 30px: same height as the logo image */
.mark.no-logo img { display: none !important; }
.mark.no-logo .mk-text { display: block; }
.mark:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

/* B3 · #layer. The artifact's .scrim / .sheet / .palette, hosted by htmx. */
#layer:empty { display: none; }
.scrim.ss-top { align-items: start; }
.scrim .palette { margin-top: min(12vh, 90px); }
@media (min-width: 681px) {
  .scrim.bottom { align-items: center; padding: 16px; }
  .scrim.bottom .sheet { width: min(600px, 100%); border-radius: 20px; padding: 16px 18px 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5), inset 0 0 0 1px var(--line); }
  .scrim.bottom .sheet .grab { display: none; }
}
.sheet .inline-h { padding: 0 4px; }
.scrim .modal .modal-b > form { display: grid; gap: 12px; }

/* B4 · Request progress. A hairline in the accent colour while a page loads into #stage. */
.ss-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 95; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat; background-size: 40% 100%; }
.ss-loading .ss-progress { opacity: 1; animation: ss-bar 1s linear infinite; }
@keyframes ss-bar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.ss-loading #stage { cursor: progress; }

/* B5 · Placeholders for sections that don't exist yet. */
.ss-soon { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 56px 20px; }
.ss-soon .ico { width: 34px; height: 34px; color: var(--ink-faint); }
.ss-soon h2 { font: var(--title-weight) 24px var(--font-display); letter-spacing: -.01em; }
.ss-soon p { color: var(--ink-soft); max-width: 46ch; font-size: 14px; line-height: 1.5; }

/* B6 · Sign-in, registration and onboarding (_AuthLayout). The artifact has no auth screen, so
   this is built from its parts: the .hello glow, a .card, .field/.input, .btn.primary, the brand
   logo, and the theme switch from the top bar. */
.auth-body { overflow: auto; }
.auth { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; padding: max(18px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); position: relative; overflow: hidden; }
.auth::before { content: ""; position: absolute; right: -10%; top: -30%; width: 70%; height: 120%; background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 10px; height: 40px; }
.auth-brand img { height: 30px; width: auto; }
.auth-brand .mk-text { display: none; font: 600 15px var(--font-display); letter-spacing: .12em; } .auth-brand .mk-text span { color: var(--accent); }
.auth-brand.no-logo img { display: none !important; } .auth-brand.no-logo .mk-text { display: block; }
.auth-main { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px 0; position: relative; z-index: 1; }
.auth-card { box-sizing: border-box; width: min(440px, 100%); display: grid; gap: 18px; padding: clamp(22px, 4vw, 34px); animation: fade .22s ease; }
.auth-card.wide { width: min(560px, 100%); }
.auth-card h1 { font: var(--title-weight) clamp(26px, 3vw, 32px) var(--font-display); letter-spacing: -.02em; }
.auth-card h1 b { font-weight: 500; }
.auth-card .auth-lead { color: var(--ink-soft); font-size: 14px; margin-top: 6px; line-height: 1.5; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .btn.primary { height: 44px; width: 100%; font-size: 14px; }
.auth-card .foot { text-align: center; font-size: 13px; color: var(--ink-soft); }
.auth-card .chk { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; }
.auth-card .chk input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.auth-note { font-size: 12px; color: var(--ink-faint); text-align: center; position: relative; z-index: 1; }
.field-error, .validation-summary-errors, .text-danger { color: var(--bad); font-size: 12px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.input.input-validation-error { box-shadow: inset 0 0 0 1.5px var(--bad); }

/* B7 · Bridge for the pre-rebuild views. They still use Bootstrap/Duralux class names; these few
   rules keep forms, alerts and links readable in the new shell until each view is redone.
   Remove a rule when no view uses it. */
:where(.stage) a:where(:not([class]):not([hx-get]):not([hx-post])) { color: var(--accent); }
.stage .form-control, .stage .form-select { all: unset; box-sizing: border-box; display: block; width: 100%; min-width: 0; height: 38px; padding: 0 12px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink); font: 500 13.5px var(--font-body); }
.stage textarea.form-control { height: auto; min-height: 84px; padding: 10px 12px; line-height: 1.45; white-space: pre-wrap; }
.stage .form-label { display: block; margin-bottom: 6px; font: 500 12px var(--font-body); color: var(--ink-soft); }
.stage .alert { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); margin-bottom: 14px; }
.stage .alert-success { background: var(--ok-soft); } .stage .alert-warning { background: var(--warn-soft); } .stage .alert-danger { background: var(--warn-soft); color: var(--bad); }
.stage .card-body { padding: 18px 20px; }
.stage .text-muted { color: var(--ink-soft); }
.stage .btn-primary { background: var(--accent); color: var(--on-accent); }
.stage .btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }

/* B8 · Short pages on phones: keep the top bar and page at the top instead of letting the grid
   spread the leftover height between rows. */
@media (max-width: 680px) { .app, .main { align-content: start; } }   /* desktop must keep stretching, or short pages end mid-screen */

/* B9 · Link versions of the page-level controls. The artifact filters and switches modes with
   <button>s that change client state; the server renders <a href> so each state has a URL (and
   back/forward, refresh and new-tab work). aria-current marks the active one. */
a.chip { text-decoration: none; }
a.chip[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
a.chip[aria-current="page"] .n { color: var(--ink-soft); }
.seg a { all: unset; box-sizing: border-box; cursor: pointer; padding: 6px 11px; border-radius: calc(var(--r-ctl) - 3px); font: 500 12px var(--font-body); color: var(--ink-soft); white-space: nowrap; display: inline-flex; align-items: center; }
.seg a[aria-current="page"] { background: var(--card-bg); color: var(--ink); box-shadow: 0 2px 6px -2px var(--shadow); }
.seg a:focus-visible, a.chip:focus-visible, a.pj-row:focus-visible, a.kcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg a .ico { width: 16px; height: 16px; }
a.kcard { color: inherit; text-decoration: none; cursor: pointer; }
a.kcard:hover .t { color: var(--accent); }
.table tr[data-href] { cursor: pointer; }
.table td a.cell-link { color: inherit; text-decoration: none; font-weight: 600; }
.table td a.cell-link:hover { color: var(--accent); }
.v5-search .ico { width: 18px; height: 18px; flex: none; }
.ss-map { position: relative; height: min(640px, 70vh); overflow: hidden; padding: 0; }
.ss-map #projectsMap { position: absolute; inset: 0; z-index: 0; }
.ss-map .ss-map-card { position: absolute; top: 14px; left: 14px; z-index: 500; min-width: 230px; display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--card-bg); box-shadow: 0 12px 30px -12px var(--shadow), inset 0 0 0 1px var(--line); font-size: 13px; }
.ss-map .ss-map-card small { color: var(--ink-faint); }
.ss-map .ss-map-empty { position: absolute; inset: 0; z-index: 400; display: grid; place-items: center; text-align: center; background: color-mix(in srgb, var(--bg) 80%, transparent); }
/* A small form in a popover (filters). Looks like .menu, but holds real fields and buttons —
   .menu restyles every <button> inside it as a menu row. */
.ss-popform { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(320px, 86vw); display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-2); box-shadow: 0 18px 40px -12px var(--shadow), inset 0 0 0 1px var(--line); }
.ss-popform[hidden] { display: none; }
.ss-popform .hd { font: 600 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.ss-popform .field > span { font: 500 12px var(--font-body); color: var(--ink-soft); }
.ss-popform .input { background: var(--surface); }
.pj-tools .pop { flex: none; }
.chip .ico { width: 14px; height: 14px; margin-right: -4px; }
/* Tasks: the check and the trash are real forms (POST Toggle / Delete); let their buttons sit
   in the .task grid as if the form weren't there. */
.task > form, .hover-acts > form { display: contents; }
.task .check { margin-top: 1px; }
.task a.t:hover { color: var(--accent); }
/* Calendar: events are links to their source (appointment, project, task, payment stage). */
.month a.e, .week a.e { color: inherit; text-decoration: none; display: block; }
.month a.e:hover, .week a.e:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.week .slot[data-href] { cursor: copy; }
.week .slot[data-href]:hover { background: var(--surface-2); }
.e-key { width: 10px; height: 10px; border-radius: 3px; background: var(--accent-soft); flex: none; }
.e-key.v { background: var(--ok-soft); } .e-key.m { background: var(--warn-soft); } .e-key.t { background: var(--surface-3); }
.dayv a.ev:hover .t { color: var(--accent); }
/* Inbox: on phones an open conversation takes the screen; the list is one tap back. */
.ss-only-phone { display: none; }
.convo-h.card { border-bottom: 0; }
.thread .av { width: 36px; height: 36px; font-size: 12px; }
@media (max-width: 1100px) { .ss-hide-phone { display: none; } .ss-only-phone { display: inline-flex; } }
/* Notifications page: each .li is a form so opening one marks it read (POST). */
.ss-li-btn { all: unset; box-sizing: border-box; cursor: pointer; min-width: 0; display: block; }
.ss-li-form.unread .t { font-weight: 600; }
.li .r .dot, .ss-li-form .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.li .av.sq .ico { width: 17px; height: 17px; }
/* Directory: the whole card opens the profile (.ss-cover), with a corner menu for edit/delete. */
.ss-card-link { position: relative; }
.ss-cover { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.ss-cover:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ss-card-link > :not(.ss-cover) { position: relative; pointer-events: none; }
.ss-card-link > .ss-corner { position: absolute; top: 8px; right: 8px; z-index: 1; pointer-events: auto; opacity: 0; transition: opacity .15s; }
.ss-card-link:hover > .ss-corner, .ss-card-link:focus-within > .ss-corner { opacity: 1; }
@media (hover: none) { .ss-card-link > .ss-corner { opacity: 1; } }
.pj-tools .chips.ss-sections { flex: 1; min-width: 0; }
/* Settings frame: keep .set-nav a grid even where the older views' card rules apply. */
.stage .settings > .card.set-nav { display: grid; }
.stage .settings > .card.set-nav .row-btn .ico { width: 18px; height: 18px; }
.ss-settings-body { min-width: 0; display: grid; gap: 16px; align-content: start; }
.ss-settings-body > * { margin-top: 0 !important; margin-bottom: 0 !important; }
@media (max-width: 1100px) { .stage .settings > .card.set-nav { display: flex; } }
/* Project page header (.pj-head): links in the round actions and department tabs. */
.round-acts a { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); background: var(--surface-2); }
.round-acts a:hover { color: var(--ink); background: var(--surface-3); }
.round-acts a .ico { width: 16px; height: 16px; }
.dept-tabs a { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px 13px; font: 600 14px var(--font-body); color: var(--ink-soft); white-space: nowrap; border-bottom: 2px solid transparent; }
.dept-tabs a .ico { width: 18px; height: 18px; }
.dept-tabs a:hover { color: var(--ink); }
.dept-tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.dept-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 680px) { .dept-tabs a { padding: 10px 10px 11px; font-size: 13px; } .dept-tabs a span { display: none; } .dept-tabs a[aria-selected="true"] span { display: inline; } }
.pj-title .pop .menu { min-width: 200px; }
.pj-title .btn .dot { width: 8px; height: 8px; }
.pj-head + * { margin-top: 0; }
/* Links that carry a class are components (tabs, buttons, rows), never underlined text links. */
.stage a:where([class]) { text-decoration: none; }

/* ---------- Round 6: brand size, search finish, job workflow ---------- */
/* Brand: a slightly larger mark in the rail and company name in the top bar. */
.mark img { width: 38px; height: 38px; }
.mark .mk-text { font-size: 15px; line-height: 38px; }
.crumb b { font: 600 15px var(--font-display); letter-spacing: -.01em; }
/* Search pill: the input is bare text inside the pill. The generic "Tailwind input" rule in
   components.css is (0,2,0); this is (0,2,1), so it wins on every page, native or not. */
.stage .v5-search input, .stage .v5-search input:focus, .stage .v5-search input:focus-visible {
  background: none; min-height: 0; height: auto; padding: 0; border: 0; border-radius: 0; box-shadow: none; outline: none; }
.v5-search:focus-within { box-shadow: 0 0 0 2px var(--accent-soft); }
/* Stage bar: each stage is a button that posts the new stage. */
.phases button.ph { border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; width: 100%; }
.phases button.ph:disabled { cursor: default; }
.phases button.ph:not(.on):hover { background: var(--surface-2); }
.phases button.ph:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Artifact-style checkbox: a hidden input and a drawn box. */
.ss-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.ss-check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ss-check .check { width: 20px; height: 20px; flex: none; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line-strong, var(--line)); display: grid; place-items: center; transition: background .15s; }
.ss-check input:checked + .check { background: var(--accent); box-shadow: none; }
.ss-check input:checked + .check::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.ss-check input:focus-visible + .check { outline: 2px solid var(--accent); outline-offset: 2px; }
.pj-body > .subtabs:last-child { padding-bottom: 12px; }
/* Design board: a card is a link to its project's Design › Board card. */
.dcard-link { display: block; color: inherit; text-decoration: none; border-radius: 14px; }
.dcard-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dcard[draggable="true"] { cursor: grab; } .dcard[draggable="true"]:active { cursor: grabbing; }
.db-logo img { height: 30px; width: auto; }
.db-logo .mk-text { display: none; }
.db-logo.no-logo img { display: none !important; } .db-logo.no-logo .mk-text { display: block; font: 800 15px var(--font-display); letter-spacing: .04em; }
/* A callout that is a link (Prospects chip → open leads). */
a.callout { color: var(--ink-soft); text-decoration: none; align-items: center; margin-bottom: 12px; }
a.callout .chev { margin-left: auto; width: 16px; height: 16px; flex: none; }
a.callout:hover { filter: brightness(.98); }
/* Meeting mode picker rows and the meeting overlay on phones. */
.meet .gallery .g { text-decoration: none; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.meet .kv b { font: var(--title-weight) 22px var(--font-display); }
@media (max-width: 680px) {
  .meet-h h2 { font-size: 20px; } .meet-h .tm { font-size: 20px; }
  .meet-f .btn { flex: 1 1 auto; }
}
/* Inline panels (artifact placePanel): a slot under the page header that htmx fills. */
.ss-panel-slot { display: contents; }
.ss-panel-slot > .inline-form { background: var(--card-bg); box-shadow: var(--card-shadow), inset 3px 0 0 var(--accent); margin: 0; }
/* The stage column must never grow past the screen: without an explicit track the top bar's
   content width (search + menus) widened .main on iPad and pushed every page off the right edge. */
.main { grid-template-columns: minmax(0, 1fr); }
.top .search { min-width: 0; } .top .pop, .top .iconbtn, .top .switch { flex: none; }
.crumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { #skin-btn .lbl { display: none; } }
/* Project header on phones: back button + round actions only (prev/next live on wider screens),
   and the department tabs scroll inside the card instead of nudging the page sideways. */
@media (max-width: 680px) {
  .pj-top { gap: 6px; }
  .pj-top > .btn.icon { display: none; }
  .pj-top .nav-back span { display: none; }
  .round-acts a { width: 30px; height: 30px; }
  .dept-tabs { margin: 0; padding: 0; }
}
/* Meeting mode on iPad/phone: the agenda is a one-line strip above the talking points. */
@media (max-width: 1100px) { .meet-b { grid-template-rows: auto minmax(0, 1fr); } .meet .agenda { align-items: center; align-self: start; } }

/* ---------- Sidebar: BuilderMate's navigation in the TogetherCRM style ----------
   Wide with labels on desktop (one entry per module, Projects and Templates open to their pages,
   a Company group, the profile pinned at the bottom). Icons only with tooltips on iPad; the
   floating dock on phones (the sidebar is hidden there, as before). */
:root { --rail-w: 252px; }
.rail.side { align-items: stretch; gap: 0; padding: 16px 12px 12px; }
.side-h { display: flex; align-items: center; gap: 10px; padding: 0 6px 14px; flex: none; }
.side-h .mark { margin: 0; flex: none; }
.side-co { display: grid; min-width: 0; line-height: 1.15; }
.side-co b { font: 600 15px var(--font-display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-co small { font-size: 11.5px; color: var(--ink-faint); }
.side-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; display: grid; align-content: start; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.side-list::-webkit-scrollbar { display: none; }
.side .nav { width: 100%; height: 40px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 12px; font: 500 13.5px var(--font-body); color: var(--ink-soft); }
.side .nav .ico { width: 19px; height: 19px; flex: none; }
.side .nav .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .nav:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.side .nav[aria-current="page"] { color: var(--ink); background: var(--surface); font-weight: 600; }
.side .nav[aria-current="page"] .ico { color: var(--accent); }
.side .nav[aria-current="page"]::before { left: -12px; top: 10px; bottom: 10px; }
.side .nav .tip { display: none; }
.side .nav .cnt { position: static; margin-left: auto; min-width: 18px; width: auto; height: 18px; padding: 0 6px; font: 600 10.5px var(--font-body); box-shadow: none; }
.nav-row { position: relative; }
.nav-row .nav { padding-right: 40px; }
.nav-tg { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-faint); }
.nav-tg:hover { color: var(--ink); background: var(--surface-2); }
.nav-tg .ico { width: 16px; height: 16px; transition: transform .2s; }
.nav-tg[aria-expanded="true"] .ico { transform: rotate(180deg); }
.nav-tg:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-sub { display: grid; gap: 1px; margin: 2px 0 6px 21px; padding-left: 12px; border-left: 1.5px solid var(--line); }
.side-sub[hidden] { display: none; }
.sub-nav { all: unset; box-sizing: border-box; cursor: pointer; position: relative; height: 32px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 8px; font: 500 13px var(--font-body); color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-nav:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.sub-nav[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.sub-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sub-nav .ico { width: 15px; height: 15px; flex: none; opacity: .8; }
.sub-nav .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sub-nav .tip { display: none; }
.side-sec { padding: 16px 12px 6px; font: 700 10.5px var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.side-me { all: unset; box-sizing: border-box; cursor: pointer; flex: none; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px; border-radius: 14px; background: var(--surface); color: var(--ink); }
.side-me:hover { background: var(--surface-2); }
.side-me[aria-current="page"] { box-shadow: inset 0 0 0 1.5px var(--accent); }
.side-me .av { flex: none; }
.side-me-t { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.side-me-t b { font: 600 13px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-me-t small { font-size: 11.5px; color: var(--ink-faint); }
.side-me > .ico { width: 17px; height: 17px; color: var(--ink-faint); flex: none; }
.side-me:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* iPad: the same list as an icon rail. Labels become tooltips; Projects' pages stay one tap away. */
@media (max-width: 1100px) {
  :root { --rail-w: 76px; }
  .rail.side { padding: 16px 0 12px; align-items: center; }
  .side-h { padding: 0 0 12px; justify-content: center; }
  .side-co, .side .nav .lbl, .nav-tg, .side-me-t, .side-me > .ico { display: none; }
  .side-list { margin: 0; padding: 0 14px; justify-items: center; }
  .side .nav { width: 48px; height: 44px; justify-content: center; padding: 0; }
  .nav-row .nav { padding-right: 0; }
  .side .nav[aria-current="page"]::before { left: -14px; }
  .side .nav .tip { display: block; }
  .side .nav .cnt { position: absolute; top: 9px; right: 9px; min-width: 7px; width: 7px; height: 7px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--bg); }
  .side-sub { margin: 0 0 4px; padding: 4px 0; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--surface) 45%, transparent); justify-items: center; }
  .sub-nav { width: 40px; height: 36px; padding: 0; justify-content: center; }
  .sub-nav .lbl { display: none; }
  .sub-nav .ico { width: 17px; height: 17px; opacity: 1; }
  .sub-nav .tip { display: block; position: fixed; left: calc(var(--rail-w) - 4px); transform: translateY(-50%); white-space: nowrap; font: 500 12px var(--font-body); padding: 6px 10px; border-radius: 8px; color: var(--ink); background: var(--surface-3); opacity: 0; pointer-events: none; z-index: 60; }
  .side-sec { padding: 10px 0 4px; font-size: 0; width: 28px; border-top: 1px solid var(--line); margin-top: 8px; }
  .side-me { padding: 6px; background: none; margin-top: 8px; }
}

/* ---------- Project page · Classic layout (BuilderMate tabs, TogetherCRM look) ---------- */
.pj-views { flex: none; }
.pj-views a { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px var(--font-body); }
.pj-views .ico { width: 15px; height: 15px; }
.cl-tabs { margin-top: 4px; }
.cl-kps { margin: 14px 0; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.cl-rows { display: grid; }
.cl-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; min-width: 0; }
.cl-rows > div:last-child { border-bottom: 0; }
.cl-rows > div > span { color: var(--ink-faint); flex: none; }
.cl-rows > div > b, .cl-rows > div > a { font-weight: 600; text-align: right; min-width: 0; }
.cl-rows > div.tot { border-top: 1.5px solid var(--line); margin-top: 4px; padding-top: 12px; }
.cl-sec { margin-bottom: 14px; }
.cl-sec .table tfoot td { border-top: 1.5px solid var(--line); border-bottom: 0; padding-top: 12px; }
.cl-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.cl-desc { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; margin: 0; }
.cl-chat { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.cl-chat > :only-child { grid-column: 1 / -1; }
.card-h h2 .ico { width: 16px; height: 16px; color: var(--ink-faint); }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.wide { width: 100%; justify-content: center; }
#pj-status-menu { right: auto; left: 0; min-width: 200px; }
@media (max-width: 900px) { .cl-chat { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .pj-views span { display: none; } .pj-views a { padding: 6px 9px; } }

/* ---------- Brand: the Together Design & Build wordmark ---------- */
.brand-mark { width: auto; height: auto; padding: 4px 2px; border-radius: 10px; }
.mark img.brand-icon { width: auto; height: 46px; max-width: 100%; }
.side-h { padding: 2px 8px 16px; }
.auth-brand { height: 52px; }
.auth-brand img.brand-horizontal { height: 46px; width: auto; }
.portal-brand img.brand-horizontal { height: 34px; width: auto; }
.db-logo img.brand-horizontal { height: 30px; width: auto; }
@media (max-width: 1100px) { .mark img.brand-icon { height: auto; width: 54px; } .side-h { padding: 0 0 12px; } }
/* Theme pick for the logo images, strong enough to beat ".mark img { display: block }". */
img.logo-light.logo-light { display: block; } img.logo-dark.logo-dark { display: none; }
:root:not([data-theme="light"]) img.logo-light.logo-light { display: none; } :root:not([data-theme="light"]) img.logo-dark.logo-dark { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) img.logo-light.logo-light { display: block; } :root:not([data-theme="dark"]) img.logo-dark.logo-dark { display: none; } }
.no-logo img.logo-light.logo-light, .no-logo img.logo-dark.logo-dark { display: none; }

/* ===== Settings modules: Configuration, Quotes, Company, Roles, Integrations, Automations, Bossito ===== */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: 0; }
.req { color: var(--bad); font-weight: 600; }
.field label .ico { width: 14px; height: 14px; color: var(--ink-faint); margin-right: 6px; vertical-align: -2px; }
.field > .note { margin-top: -2px; }
.btn.icon.danger-solid, .btn.danger-solid { background: var(--bad); color: #fff; box-shadow: 0 4px 12px -4px var(--shadow); }
.btn.ghost.danger:hover { background: var(--warn-soft); }
.btn[disabled], .tog[disabled], .input[disabled] { opacity: .55; cursor: not-allowed; }
.role-form, #quote-settings, .cfg-form-wrap { display: grid; gap: 22px; }

/* Configuration: module tabs (card strip) + sub-tab chips + headings */
.card.cfg-tabs { padding: 0 14px; }
.cfg-tabs .dept-tabs { margin: 0; }
.cfg-tabs .dept-tabs a { padding: 14px 12px 13px; }
.cfg-sub { margin-top: -8px; }
.cfg-h { display: grid; gap: 3px; min-width: 0; }
.cfg-h h2 { font: 600 15px var(--font-body); display: flex; align-items: center; gap: 8px; color: var(--ink); }
.cfg-h h2 .ico { width: 16px; height: 16px; color: var(--accent); }
.cfg-h .n, .card-h h2 .n { font: 600 11px var(--font-body); padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-soft); }
.cfg-h .note { max-width: 70ch; }
.cfg-table th { padding: 10px 12px; }
.cfg-table td { padding: 12px; }
.cfg-table th:first-child, .cfg-table td:first-child { padding-left: 4px; }
.cfg-table th.c, .cfg-table td.c { text-align: center; }
.cfg-table tbody tr { transition: background .12s; }
.cfg-table tbody tr:hover > td { background: var(--surface-2); }
.lbl-pill { --c: var(--accent); display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 99px; font: 600 12px var(--font-body); color: var(--ink);
  background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); white-space: nowrap; }
.lbl-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 5px; vertical-align: -3px; margin-right: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.cfg-grid > .card { display: grid; gap: 14px; }
.cfg-grid > .card .card-h { margin-bottom: 0; }
.cfg-save { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; }
.card > .cfg-save { border-top: 1px solid var(--line); margin-top: 16px; }
.card.cfg-form { max-width: 720px; }
.cfg-form .stack, .cfg-form form { display: grid; gap: 14px; }

/* Color picking */
.color-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-field input[type="color"] { -webkit-appearance: none; appearance: none; width: 44px; height: 38px; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; cursor: pointer; flex: none; }
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: var(--r-ctl); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.color-field input[type="color"]::-moz-color-swatch { border: 0; border-radius: var(--r-ctl); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset { all: unset; cursor: pointer; width: 26px; height: 26px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .12s; }
.preset:hover { transform: scale(1.12); }
.preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qs-sample { --hc: #34A754; background: var(--hc); color: #fff; padding: 12px 14px; border-radius: 10px; font: 600 13px var(--font-body); letter-spacing: .02em; }

/* Toggle rows */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); cursor: default; }
.toggle-row b { font: 600 13.5px var(--font-body); color: var(--ink); }
.toggle-row .note { margin-top: 2px; }
.toggle-row .tog { flex: none; }

/* Quote attachment library */
.att-list { display: grid; gap: 8px; }
.att-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.att-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.att-ico .ico { width: 18px; height: 18px; }
.att-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.att-main small { font-size: 11.5px; color: var(--ink-faint); }
.att-name .input { font-weight: 600; color: var(--ink); width: 100%; }
.btn.star .ico { transition: color .12s; }
.btn.star.on { color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }
.btn.star.on .ico { fill: currentColor; }
.att-row form { margin: 0; }

/* Saved line items: inline add form */
.item-form { display: grid; grid-template-columns: 1.4fr 1fr .8fr .8fr 1.6fr auto; gap: 8px; padding: 12px; margin-bottom: 14px; border-radius: 14px; background: var(--surface-2); }
.item-form .input { background: var(--surface); }
@media (max-width: 1100px) { .item-form { grid-template-columns: 1fr 1fr; } .item-form .btn { grid-column: 1 / -1; } }
@media (max-width: 520px) { .item-form { grid-template-columns: 1fr; } }

/* Company information */
.co-grid { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .co-grid { grid-template-columns: minmax(0, 1fr); } }
.co-logo { display: grid; gap: 12px; }
.co-logo .card-h { margin-bottom: 0; }
.co-logo-box { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; display: grid; place-items: center; padding: 18px; overflow: hidden;
  background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; box-shadow: inset 0 0 0 1px var(--line); }
.co-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.co-logo-x { position: absolute; top: 10px; right: 10px; margin: 0; }
.co-logo-empty { display: grid; justify-items: center; gap: 8px; color: var(--ink-faint); font-size: 13px; }
.co-logo-empty .ico { width: 32px; height: 32px; opacity: .6; }
.co-sec { font: 600 10.5px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); }

/* Roles: permission matrix */
.perm-table .ss-check { justify-content: center; }
.perm-table .ss-check input:disabled + .check { opacity: .4; cursor: not-allowed; }
.perm-name { font-weight: 600; margin-right: 8px; }
.perm-na { font-size: 12px; font-style: italic; }
.sm-chip { display: inline-flex; align-items: center; font: 600 10.5px var(--font-body); padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--ink-soft); cursor: default; letter-spacing: .01em; }
.chip.sm-chip { padding: 3px 9px; font: 500 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); }

/* Integrations */
.key-once { display: grid; gap: 10px; }
.secret-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.secret-box code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 600 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); background: none; padding: 0; }
.integ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.integ { display: grid; gap: 10px; align-content: start; transition: transform .15s, box-shadow .15s; }
.integ:hover { transform: translateY(-2px); }
.integ-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.integ-h b { font: 600 14px var(--font-body); flex: 1; min-width: 0; }
.integ-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.integ-ico .ico { width: 20px; height: 20px; }
.integ .btn { justify-self: start; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px; }
.ev-grid .ss-check { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); position: relative; }
.ev-grid .ss-check code { margin-left: auto; font: 500 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-faint); background: none; padding: 0; }
.wh-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.wh-row:first-child { border-top: 0; padding-top: 0; }
.wh-row form { margin: 0; }
.wh-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.wh-main .chips { gap: 6px; }
.wh-secret summary { cursor: pointer; font-size: 12px; color: var(--ink-faint); width: max-content; }
.wh-secret summary:hover { color: var(--ink-soft); }
.wh-secret code { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font: 500 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
@media (max-width: 680px) { .wh-row { flex-direction: column; } }

/* Automations */
.page-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-tools .note { max-width: 70ch; font-size: 13px; }
.auto-list { display: grid; gap: 12px; }
.auto-card { padding: 16px 18px; display: grid; gap: 12px; transition: opacity .15s; }
.auto-card.off { opacity: .6; }
.auto-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.2fr); align-items: stretch; gap: 10px; }
.auto-step { display: grid; gap: 6px; align-content: start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.auto-step b { font: 600 13.5px var(--font-body); color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.auto-step:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.auto-arrow { width: 18px; height: 18px; align-self: center; color: var(--ink-faint); }
.auto-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.auto-foot form { margin: 0; display: inline-flex; }
@media (max-width: 860px) { .auto-flow { grid-template-columns: minmax(0, 1fr); } .auto-arrow { transform: rotate(90deg); justify-self: center; } }
.modal.auto-modal { width: min(640px, 100%); }
.auto-box { border: 0; margin: 0; padding: 14px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 12px; min-width: 0; }
.auto-box legend { float: left; width: 100%; padding: 0; margin-bottom: 2px; font: 600 10.5px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.auto-box legend + * { clear: both; }
.auto-box .input { background: var(--surface); }
.auto-modal .toggle-row { cursor: pointer; }

/* Bossito: the embedded app fills the page area */
.stage:has(> .view > .bossito) { padding: 4px 8px 12px 4px; overflow: hidden; display: flex; flex-direction: column; }
.stage:has(> .view > .bossito) > .view { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; }
.bossito { flex: 1; min-height: 360px; display: flex; flex-direction: column; border-radius: var(--r-card); overflow: hidden; background: var(--card-bg); box-shadow: var(--card-shadow); }
.bossito-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); flex: none; }
.bossito-name { display: inline-flex; align-items: center; gap: 8px; font: 600 14px var(--font-body); color: var(--ink); }
.bossito-name .ico { width: 16px; height: 16px; color: var(--accent); }
.bossito-frame { flex: 1; width: 100%; min-height: 0; border: 0; display: block; background: #fff; }
.bossito:fullscreen { border-radius: 0; min-height: 100vh; }
@media (max-width: 680px) { .bossito-bar .btn span, .bossito-bar .btn { font-size: 12px; } .bossito { border-radius: 0; } }
/* components.css sizes the searchable-select tick (.ss-check span) to 14px; checkbox labels share the class. */
label.ss-check { width: auto; flex-shrink: 1; min-width: 0; }
.perm-table label.ss-check { display: inline-flex; }
/* Custom checkbox: keep the real input pinned inside its label and invisible in every state
   (components.css re-shows disabled checkboxes at .45 opacity, and an unanchored absolute
   input drifts away from its box while the page scrolls). */
.ss-check { position: relative; }
.ss-check > input[type="checkbox"], .ss-check > input[type="radio"],
.stage .ss-check > input[type="checkbox"]:disabled, .stage .ss-check > input[type="radio"]:disabled {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0 !important; pointer-events: none; appearance: none; -webkit-appearance: none; }
.ss-check input:disabled + .check { opacity: .4; cursor: not-allowed; }

/* Automations: who to notify */
.pick-list { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; padding: 8px; border-radius: 12px; background: var(--surface); }
.pick-list .ss-check { padding: 6px 8px; border-radius: 10px; }
.pick-list .ss-check:hover { background: var(--surface-2); }
.pick-list .ss-check small { margin-left: auto; font-size: 11.5px; }
.auto-detail { color: var(--ink-soft); }

/* Integrations › Developers */
.api-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.api-facts > div { display: grid; gap: 5px; align-content: start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.api-facts code, .api-path, .card .note code { font: 500 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.api-facts > div > code { background: none; padding: 0; font-size: 13px; overflow-wrap: anywhere; }
.api-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
@media (max-width: 680px) { .api-groups { grid-template-columns: minmax(0, 1fr); } }
.api-group { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 4px; align-content: start; }
.api-group-h { display: flex; align-items: center; gap: 8px; font: 600 13.5px var(--font-body); color: var(--ink); margin-bottom: 4px; }
.api-group-h .ico { width: 16px; height: 16px; color: var(--accent); }
.api-ep { display: grid; grid-template-columns: 56px auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.api-ep .note { grid-column: 2; }
.api-ep .api-path { justify-self: start; background: var(--surface); }
.api-m { font: 700 10.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; text-align: center; padding: 3px 0; border-radius: 6px; }
.api-m.m-get { background: color-mix(in srgb, #0ea5e9 18%, transparent); color: #38bdf8; }
.api-m.m-post { background: color-mix(in srgb, #22c55e 18%, transparent); color: #4ade80; }
.api-m.m-patch { background: color-mix(in srgb, #f59e0b 20%, transparent); color: #fbbf24; }
:root[data-theme="light"] .api-m.m-get { color: #0369a1; } :root[data-theme="light"] .api-m.m-post { color: #15803d; } :root[data-theme="light"] .api-m.m-patch { color: #b45309; }
.api-ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px; }
@media (max-width: 680px) { .api-ex-grid { grid-template-columns: minmax(0, 1fr); } }
.api-ex { display: grid; gap: 8px; align-content: start; min-width: 0; }
.api-ex-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.api-ex pre { margin: 0; padding: 12px 14px; border-radius: 12px; background: #0b1220; color: #dbe4f3; overflow-x: auto; box-shadow: inset 0 0 0 1px var(--line); scrollbar-width: thin; }
.api-ex pre code { font: 500 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: none; padding: 0; color: inherit; white-space: pre; }
