/* SchoenherrX v4 pages: job page, boards, calendar, settings (docs/PAGES-V4.md). Layouts after reference screenshots Alex
   sent; our own build in the brand (black #0D0D0D, tan #CAB79B). Uses the tokens in app.css. */

/* ---------- Job page v2: standard sidebar | centre cards | collapsible right panel ---------- */
.jp { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.jp.jp-r-collapsed { grid-template-columns: minmax(0, 1fr) 44px; }
.jp-centre { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.jp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.jp-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.jp-card-h h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jp-card-h a { font-weight: 600; }
.jp-head-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.jp-title { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jp-num { font-size: 14px; font-weight: 500; border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.jp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.jp-ib { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: var(--panel); cursor: pointer; list-style: none; }
.jp-ib::-webkit-details-marker { display: none; }
.jp-ib:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.jp-ib.dis { opacity: .4; cursor: not-allowed; }
.jp-ib.sm { width: 30px; height: 30px; border-radius: 8px; border-color: transparent; background: transparent; }
.jp-menu { position: relative; display: inline-block; }
.jp-menu > summary { list-style: none; }
.jp-menu > summary::-webkit-details-marker { display: none; }
.jp-menu .tb-pop { top: 44px; }
.jp-contact-chip { display: inline-block; margin-top: 12px; background: var(--chip); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 260px; }
.jp-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.jp-chips .muted.small:not(:first-child) { margin-left: 8px; }
.jp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.jp-grid > .jp-wide { grid-column: 1 / -1; }
.jp-contact { display: flex; gap: 14px; align-items: flex-start; }
.jp-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.jp-line svg { color: var(--accent-ink); flex: none; margin-top: 2px; }
.jp-empty { text-align: center; padding: 18px 8px; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.jp-sub { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.jp-sub > summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.jp-sub[open] > summary { margin-bottom: 8px; }
.jp-locked { position: relative; min-height: 180px; overflow: hidden; }
.jp-blur { filter: blur(6px); opacity: .5; user-select: none; pointer-events: none; }
.jp-noperm { position: absolute; inset: 52px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-weight: 600; }
.jp-toggle { font-weight: 500; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.jp-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; max-height: 460px; overflow: auto; padding-right: 4px; }
.jp-fields.full { max-height: none; }
.jp-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.jp-field select, .jp-field input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; }
.only-filled .jp-field:not(.filled) { display: none; }
.jp-fields-save { grid-column: 1 / -1; position: sticky; bottom: 0; background: var(--panel); padding-top: 8px; }
.jp-right { position: sticky; top: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: auto; max-height: calc(100vh - 100px); box-shadow: var(--shadow); }
.jp-right-toggle { position: absolute; right: 8px; top: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font-size: 16px; }
.jp-r-collapsed .jp-right > :not(.jp-right-toggle) { display: none; }
.jp-r-collapsed .jp-right { min-height: 48px; }
.jp-r-collapsed .jp-right-toggle { transform: rotate(180deg); right: 5px; }
.jp-photo { height: 130px; background: linear-gradient(135deg, #0D0D0D, #3a342b) center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.jp-photo-btn { background: var(--panel) !important; }
.jp-rsec { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.jp-rsec > summary { cursor: pointer; margin-bottom: 8px; }
.jp-rsec-h { display: flex; justify-content: space-between; align-items: center; }
.jp-r-icons { display: inline-flex; gap: 2px; }
.jp-rsec textarea { width: 100%; min-height: 60px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; background: var(--panel); color: var(--ink); }
.jp-rtabs { display: grid; grid-template-columns: 1fr 1fr; margin: 10px 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.jp-rtabs a { text-align: center; padding: 7px; color: var(--muted); font-weight: 600; font-size: 13px; }
.jp-rtabs a.on { background: var(--accent); color: #000; }
.jp-rtabs a:hover { text-decoration: none; }
.jp-details { display: flex; flex-direction: column; }
.jp-drow { display: grid; grid-template-columns: 130px minmax(0, 1fr) 24px; align-items: center; gap: 6px; padding: 7px 0; font-size: 13px; }
.jp-dl { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.jp-dl svg { color: var(--accent-ink); }
.jp-dv { min-width: 0; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.jp-dv select, .jp-dv input { max-width: 100%; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
.jp-statno { display: inline-block; border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; margin-right: 4px; }
.jp-pin { border: 0; background: none; color: var(--muted); cursor: pointer; opacity: .35; padding: 2px; }
.jp-pin:hover, .jp-pin.on { opacity: 1; color: var(--accent-ink); }
.chip-x { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 0 0 4px; font-size: 14px; line-height: 1; }
.chip-add { width: 24px; height: 24px; border-radius: 50%; border: 1px dashed var(--line); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; }
.jp-prod-actions .panel { box-shadow: none; border-radius: 12px; }
@media (max-width: 1200px) { .jp, .jp.jp-r-collapsed { grid-template-columns: 1fr; } .jp-right { position: static; max-height: none; } .jp-r-collapsed .jp-right > :not(.jp-right-toggle) { display: block; } }
@media (max-width: 760px) { .jp-fields { grid-template-columns: 1fr; } .jp-grid { grid-template-columns: 1fr; } .jp-contact-chip { min-width: 0; width: 100%; } .jp-drow { grid-template-columns: 110px minmax(0, 1fr) 24px; } }

/* ---------- Boards v2: toolbar, stage brackets, column header cards, job cards ---------- */
.bd-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 8px 10px; margin-bottom: 12px; }
.bd-bar-sub { margin: 10px var(--gutter) 0; }
.bd-pick, .bd-dd { position: relative; }
.bd-pick > summary, .bd-dd > summary { list-style: none; cursor: pointer; }
.bd-pick > summary::-webkit-details-marker, .bd-dd > summary::-webkit-details-marker { display: none; }
.bd-pick > summary { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; font-size: 16px; }
.bd-pick > summary:hover { background: var(--accent-soft); }
.bd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); display: inline-block; flex: none; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
.bd-pop { left: 0; right: auto; top: 44px; max-height: 70vh; overflow: auto; padding: 6px; }
.bd-pop .mi { display: flex !important; align-items: center; gap: 10px; }
.bd-pop .mi.on { background: var(--accent); color: #000; }
.bd-pop-h { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 8px 12px 4px; }
.bd-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; min-width: 260px; }
.bd-form label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.bd-form label.bd-check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.bd-search input { width: 220px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; }
.bd-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--panel); font-weight: 600; font-size: 14px; }
.bd-btn:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.bd-btn.on { background: var(--accent); border-color: var(--accent); color: #000; }
.bd-icon { padding: 7px 10px; }
.bd-spacer { flex: 1; }
.bd-hint { margin: 0 0 8px; }
.bd-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; min-height: 60vh; }
.bd-group { flex: none; display: flex; flex-direction: column; gap: 8px; }
.bd-bracket { position: relative; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); height: 18px; margin: 0 6px; }
.bd-bracket::before { content: ''; position: absolute; left: 0; right: 0; top: 9px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-right: 1px solid var(--line); height: 8px; border-radius: 4px 4px 0 0; }
.bd-bracket span { position: relative; background: var(--bg); padding: 0 10px; }
.bd-cols { display: flex; gap: 10px; }
.bd-col { width: 280px; flex: none; background: var(--chip); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 55vh; transition: box-shadow .1s; }
.bd-col.over { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.bd-col-h { background: var(--panel); border-radius: 10px; border-top: 4px solid var(--c, var(--accent)); padding: 8px 10px; box-shadow: var(--shadow); }
.bd-col-t { display: flex; align-items: center; gap: 8px; }
.bd-col-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-count { font-size: 12px; border-radius: 10px; background: var(--chip); padding: 0 7px; color: var(--muted); font-weight: 600; }
.bd-col-s { font-size: 12px; color: var(--accent-ink); margin-top: 2px; }
.bd-col-b { display: flex; flex-direction: column; gap: 8px; }
.bd-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.bd-more { text-align: center; font-size: 13px; padding: 6px; }
.bd-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; box-shadow: var(--shadow); }
.bd-card[draggable="true"] { cursor: grab; }
.bd-card.dragging { opacity: .45; }
.bd-card.saving { opacity: .6; pointer-events: none; }
.bd-card-t { display: flex; justify-content: space-between; gap: 6px; font-weight: 700; font-size: 14px; }
.bd-card-t a:first-child { color: var(--ink); }
.bd-open { color: var(--muted); font-weight: 400; }
.bd-card-m { color: var(--muted); margin-top: 3px; }
.bd-card-m b { color: var(--ink); font-weight: 600; }
.bd-people { display: flex; gap: 4px; margin-top: 8px; }
.bd-av { width: 24px; height: 24px; border-radius: 50%; background: #0D0D0D; color: #CAB79B; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bd-av.rep { background: #CAB79B; color: #000; }
.bd-foot { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.bd-c { border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) { .bd-search input { width: 150px; } .bd-col { width: 82vw; } .bd-spacer { display: none; } }

/* ---------- Settings v2: grouped searchable nav (standard sidebar) + cards with a Save each ---------- */
.sb-search { margin: 0 4px 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid #2b2722; background: #1a1916; color: #E9E3D8; font: inherit; }
.sb-group { font-size: 11px; letter-spacing: .08em; font-weight: 700; color: #8F8573; padding: 12px 12px 4px; }
.sb-group[hidden], .sb-item[hidden] { display: none; }
.sb-collapsed .sb-group, .sb-collapsed .sb-search { display: none; }
.sb-soon .sb-label { opacity: .7; }
.sb-tag { margin-left: auto; font-size: 10px; border: 1px solid #3a352d; border-radius: 6px; padding: 0 5px; color: #8F8573; }
.sb-item.on .sb-tag { color: #000; border-color: rgba(0,0,0,.3); }
.sb-collapsed .sb-tag { display: none; }
.st-head h1 { margin: 4px 0 2px; }
.st-head { margin-bottom: 14px; }
.st-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.st-card h2 { margin: 0 0 12px; font-size: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.st-form { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.st-form label, .st-idrow label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); }
.st-form select, .st-idrow input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; }
.st-ids { display: flex; flex-direction: column; gap: 4px; }
.st-idrow { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 200px); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.st-flow { display: flex; flex-wrap: wrap; gap: 8px; }
.st-status { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 13px; }
.st-status small { color: var(--muted); margin-left: 4px; }
@media (max-width: 760px) { .st-idrow { grid-template-columns: 1fr; } .st-card { padding: 16px; } }
/* ---------- Calendar v2: header, left panel with collapsible sections, month grid with event pills, popover ---------- */
.cal2 { position: relative; }
.ch { display: grid; grid-template-columns: auto auto auto; justify-content: center; align-items: center; gap: 18px; margin: 4px 0 6px; }
.ch h1 { margin: 0; font-size: 28px; min-width: 240px; text-align: center; }
.ch-nav { width: 38px; height: 38px; border-radius: 50%; background: var(--panel); color: var(--ink); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.ch-nav:hover { background: var(--accent-soft); border-color: #CAB79B; text-decoration: none; }
/* Views as one tan segmented control + a light Today button (QA 2026-11-04: heavy black pills looked dated). */
.ch-views { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: nowrap; }
.ch-seg { display: inline-flex; background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.ch-v { padding: 6px 14px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; }
.ch-v:hover { text-decoration: none; background: var(--accent-soft); }
.ch-v.on { background: #CAB79B; color: #000; }
.ch-today { padding: 7px 14px; border-radius: 999px; border: 1px solid #CAB79B; color: var(--ink); font-weight: 600; font-size: 14px; background: var(--panel); white-space: nowrap; }
.ch-today:hover { background: var(--accent-soft); text-decoration: none; }
.cal2-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
.cl { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.cl-add { display: block; text-align: center; padding: 10px; font-size: 15px; background: #0D0D0D !important; color: #CAB79B !important; border-color: #0D0D0D !important; }
.cl-tools { display: flex; gap: 6px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.cl-tools .jp-ib { width: 34px; height: 34px; }
.cl-loc { margin-left: 4px; display: inline-flex; gap: 6px; align-items: center; }
.cl-sec { border-top: 1px solid var(--line); }
.cl-sec > summary { cursor: pointer; padding: 10px 6px; font-weight: 700; background: var(--chip); border-radius: 8px; margin: 8px 0 4px; list-style: none; display: flex; justify-content: space-between; }
.cl-sec > summary::-webkit-details-marker { display: none; }
.cl-sec > summary::after { content: '\25B4'; color: var(--muted); }
.cl-sec:not([open]) > summary::after { content: '\25BE'; }
.cl-body { padding: 4px 4px 8px; }
.cl-search { width: 100%; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; margin: 4px 0 6px; }
.cl-list { max-height: 220px; overflow: auto; }
.cl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 2px; font-size: 14px; }
.cl-row[hidden] { display: none; }
.cl-l { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.cl-av { width: 26px; height: 26px; border-radius: 50%; background: #0D0D0D; color: #CAB79B; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cl-av.sub { background: #CAB79B; color: #000; }
.cl-sel { text-align: right; }
.cl-sub { margin: 6px 0 0 14px; border-left: 2px solid var(--line); padding-left: 8px; }
.linkish { background: none; border: 0; color: var(--link); cursor: pointer; font: inherit; font-size: 13px; padding: 0 2px; }
.cal2-note { margin: 0 0 8px; }
.cm { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.cm-dh { padding: 8px 10px; font-weight: 700; font-size: 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.cm-dh .short { display: none; }
.cm-d { min-height: 130px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cm-d:nth-child(7n) { border-right: 0; }
.cm-d.other { background: var(--bg); }
.cm-d.other .cm-n { color: var(--muted); opacity: .6; }
.cm-d.today { background: var(--accent-soft); }
.cm-n { align-self: flex-end; font-size: 12px; font-weight: 700; color: var(--ink); }
.cm-more { font-size: 12px; padding-left: 4px; }
.ce { display: block; width: 100%; text-align: left; border: 0; border-radius: 4px; background: var(--c, #0072B2); color: #fff; padding: 2px 5px; font: inherit; font-size: 11.5px; cursor: pointer; line-height: 1.25; }
.ce:hover, .ce:focus-visible { filter: brightness(1.12); outline: 2px solid var(--accent); outline-offset: 1px; }
.ce-t { display: flex; justify-content: space-between; gap: 6px; }
.ce-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-t span { white-space: nowrap; opacity: .95; }
.ce-c { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .95; }
.cw { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cw-d { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-height: 300px; display: flex; flex-direction: column; gap: 4px; }
.cw-d.today { background: var(--accent-soft); }
.cw-h { font-weight: 700; font-size: 13px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.ca { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.ca-day { padding: 6px 0 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.ca-day h3 { margin: 6px 0; }
.ca .ce { font-size: 13px; padding: 5px 8px; max-width: 640px; }
.ce-pop { position: absolute; z-index: 120; width: 300px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.25); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ce-pop[hidden] { display: none; }
.ce-pt { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.ce-pt::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--accent)); }
.ce-x { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
@media (max-width: 1000px) { .cal2-grid { grid-template-columns: 1fr; } .cl { position: static; max-height: none; } }
@media (max-width: 760px) {
  .ch { gap: 8px 10px; } .ch h1 { font-size: 20px; min-width: 0; } .ch-nav { width: 34px; height: 34px; }
  .ch-views { gap: 6px; } .ch-v { padding: 5px 9px; font-size: 13px; } .ch-today { padding: 6px 10px; font-size: 13px; }
  .cm-dh .full { display: none; } .cm-dh .short { display: inline; } .cm-dh { font-size: 12px; padding: 6px 4px; }
  .cm-d { min-height: 74px; padding: 2px; } .ce { font-size: 10px; padding: 1px 3px; } .ce-t span, .ce-c { display: none; }
  .cw { grid-template-columns: 1fr; } .cw-d { min-height: 0; }
}
@media print { .top, .tabbar, .cl, .ch-views, .ch-nav, .cal2-note, .env-banner { display: none !important; } .cal2-grid { grid-template-columns: 1fr; } .cm-d { min-height: 100px; } }.jp-clamp .timeline .body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jp-card .timeline .body { white-space: pre-line; overflow-wrap: anywhere; }
.jp-dv form.inline { display: inline-flex; gap: 4px; align-items: center; flex-wrap: nowrap; max-width: 100%; }
.jp-dv form.inline select { min-width: 0; flex: 1; }.sb-wrap[data-sidebar="settings"] .sb { max-height: calc(100vh - 100px); overflow: auto; }
.sb-wrap[data-sidebar="settings"] .sb-item { min-height: 36px; font-size: 14px; }@media (max-width: 1000px) { .cal2-main { order: -1; } }
/* ---------- Sign-in page (Alex, 2026-11-04): big logo + tagline, install photos cross-fading behind the card ---------- */
.lg-body { background: #0D0D0D; }
.lg-body .login-wrap { position: relative; isolation: isolate; overflow: hidden; background: #0D0D0D; flex-direction: column; gap: 22px; padding: 32px 16px; }
.lg-bg { position: fixed; inset: 0; z-index: -1; background: #0D0D0D; }
/* Placeholder: dark brand gradient with a faint repeating roofline (our logo's roof shape), no photo needed. */
.lg-bg.lg-plain { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='76' viewBox='0 0 146.88 49.8'%3E%3Cpath fill='none' stroke='%23CAB79B' stroke-opacity='.08' stroke-width='1.2' d='M102.7 49.8h44.18L110.35 0H66.17L53.09 17.83H23.45L0 49.8'/%3E%3C/svg%3E") 0 0 / 220px 76px repeat,
  radial-gradient(circle at 20% 15%, #3a3127 0%, rgba(58,49,39,0) 55%),
  radial-gradient(circle at 85% 90%, #2a2520 0%, rgba(42,37,32,0) 50%),
  linear-gradient(160deg, #1a1714, #0D0D0D 70%); }
.lg-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.8s ease-in-out; }
.lg-slide.on { opacity: 1; }
.lg-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,13,13,.68) 0%, rgba(13,13,13,.5) 45%, rgba(13,13,13,.82) 100%), radial-gradient(ellipse at center, rgba(13,13,13,.2), rgba(13,13,13,.6)); }
.lg-plain .lg-shade { display: none; }
.lg-brandmark { text-align: center; color: #fff; z-index: 1; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.lg-logo { width: min(260px, 60vw); height: auto; display: block; margin: 0 auto 10px; color: #fff; filter: drop-shadow(0 4px 18px rgba(0,0,0,.45)); }
.lg-name { font-size: clamp(22px, 3.4vw, 34px); font-weight: 800; letter-spacing: .04em; }
.lg-tag { color: #CAB79B; font-size: clamp(13px, 1.6vw, 16px); letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; font-weight: 600; }
.lg-body .login { position: relative; z-index: 1; box-shadow: 0 18px 60px rgba(0,0,0,.45); }
/* One centred column (Alex, 2026-11-04, after a Microsoft-style reference): logo + name + tagline centred above the white
   card. The brand block above pushes the card's centre to ~55-60% down the screen on desktop. */
@media (min-width: 761px) {
  .lg-body .login-wrap { justify-content: center; gap: 26px; padding: 40px 16px 8vh; }
  .lg-logo { width: 300px; margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { .lg-slide { transition: none; } }
/* Top bar logo */
.tb-logo { height: 30px; width: auto; color: #fff; flex: none; display: block; }
.brand { gap: 10px; }
@media (max-width: 760px) { .tb-logo { height: 26px; } .brand-t { display: none; } }
/* Settings > Company > Sign-in photos */
.st-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.st-photo { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.st-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.st-photo figcaption { padding: 8px 10px; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-photo-actions { display: flex; gap: 4px; }/* Sign-in video: the poster paints at once; the clip fades in over it once it is actually playing. */
.lg-poster, .lg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lg-video { opacity: 0; transition: opacity 1.2s ease-in-out; }
.lg-playing .lg-video { opacity: 1; }.st-radio { display: flex; flex-direction: column; gap: 8px; }
.st-radio label { flex-direction: row !important; align-items: center; gap: 8px; color: var(--ink) !important; }
.st-video { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.st-video img { width: 280px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
/* Home: compact event rows (Alex, 2026-11-04): one line, two at most; no attendee list. */
.pd-ev-c .pd-ev-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.pd-ev-c .pd-ev-j { color: var(--ink); }
.pd-ev-c .pd-ev-j::before, .pd-ev-c .pd-ev-p::before { content: '\00B7'; margin: 0 5px; color: var(--muted); }
.pd-ev-c .pd-ev-p, .pd-ev-c .pd-ev-n { color: var(--muted); font-size: 12px; }
.pd-ev-c .pd-ev-n { margin-left: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 5px; white-space: nowrap; }
/* ---------- My Home (Alex, 2026-11-04; docs/MY-HOME.md) ---------- */
.pd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pd-viewas select { margin-left: 6px; }
.pd-stat.muted b { color: var(--muted); font-size: 18px; }
.pd-pulse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; background: #0D0D0D; color: #E9E3D8; border-radius: var(--radius, 16px); padding: 10px 18px; margin-bottom: 16px; }
.pd-pulse .pd-eyebrow { color: #CAB79B; margin-right: 6px; }
.pd-pulse a { color: #E9E3D8; font-size: 14px; } .pd-pulse a b { color: #fff; font-size: 16px; }
.pd-pulse a:hover { color: #CAB79B; text-decoration: none; }
.pd-pulse-more { margin-left: auto; color: #CAB79B !important; }
.pd-table { width: 100%; font-size: 13px; } .pd-table th { text-align: left; color: var(--muted); font-weight: 600; } .pd-table td, .pd-table th { padding: 5px 4px; border-bottom: 1px solid var(--line); }
/* Mini-month quick-view card */
.pd-daycard { position: absolute; z-index: 150; width: 340px; max-width: calc(100vw - 16px); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(0,0,0,.22); padding: 10px 12px; font-size: 13px; }
.pd-daycard[hidden] { display: none; }
.dc-h { font-weight: 700; margin-bottom: 6px; }
.dc-row { display: flex; gap: 8px; padding: 5px 6px; border-radius: 8px; border-left: 3px solid var(--c, var(--accent)); color: var(--ink); margin-bottom: 3px; }
a.dc-row:hover { background: var(--accent-soft); text-decoration: none; }
.dc-t { flex: none; width: 62px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.dc-m { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dc-j::before, .dc-p::before { content: '\00B7'; margin: 0 4px; color: var(--muted); }
.dc-p, .dc-n { color: var(--muted); font-size: 12px; }
.dc-n { margin-left: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 0 5px; }
.dc-more { color: var(--muted); font-size: 12px; padding: 2px 6px; }
.dc-empty { color: var(--muted); margin: 4px 0; }
.dc-link { display: block; text-align: right; margin-top: 6px; font-weight: 600; }.mh-table { font-size: 13px; } .mh-table th.small { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 600; padding: 6px 2px; }
.mh-table .mh-c { text-align: center; } .mh-group td { font-weight: 700; background: var(--chip); }
.pd-grid { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

/* ---------- Settings pages, layout after Alex's JobNimbus references (2026-11-04) ---------- */
.st-page { margin: 0 auto; width: 100%; }
.st-page.w-1150 { max-width: 1150px; } .st-page.w-575 { max-width: 575px; }
.st-page .st-head { margin: 6px 0 18px; } .st-page .st-head h1 { font-size: 26px; } .st-page .st-head p { margin: 4px 0 0; }
.st-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.st-card-h h2 { margin: 0; }
.st-inline { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.st-inline label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.st-inline input, .st-inline select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; }
.st-grow { flex: 1; min-width: 220px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: transparent; }
.st-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.st-table tr:last-child td { border-bottom: 0; }
.st-table tr.dragging { opacity: .5; }
.st-loc { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.st-loc-logo { width: 34px; height: auto; color: var(--ink); }
.st-logo-big { width: 220px; height: auto; color: #fff; } .st-logo-prev { background: #0D0D0D; border-radius: 12px; padding: 22px; display: inline-block; }
.st-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.st-pill.ok { color: var(--ok); border-color: currentColor; background: color-mix(in srgb, var(--ok) 10%, transparent); }
.st-menu-cell { width: 44px; text-align: right; } .st-menu-cell .tb-pop { right: 0; top: 36px; min-width: 160px; padding: 6px; }
.st-menu-cell .tb-pop .mi, .st-menu-cell .tb-pop form .mi { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; }
.st-menu-cell .tb-pop .mi:hover { background: var(--accent-soft); }
.st-dialog { border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(520px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.st-dialog::backdrop { background: rgba(13,13,13,.5); }
.st-dialog h2 { margin: 0 0 6px; }
.st-dialog .st-form { max-width: none; }
.st-dialog input[type=text], .st-dialog input[type=tel], .st-dialog input[type=number], .st-dialog select, .st-dialog textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; width: 100%; }
.st-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.st-row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.st-check { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--ink) !important; }
@media (max-width: 760px) { .st-row3 { grid-template-columns: 1fr; } .st-table th:nth-child(2), .st-table td:nth-child(2) { display: none; } }.st-suffix { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.st-suffix input { border: 0 !important; border-radius: 0 !important; flex: 1; min-width: 0; padding: 9px 12px; background: var(--panel); color: var(--ink); font: inherit; }
.st-suffix span { background: var(--chip); color: var(--muted); padding: 9px 12px; border-left: 1px solid var(--line); white-space: nowrap; }
.st-form input[type=email], .st-form input[type=text], .st-form textarea { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; }/* Settings > Fields (layout after JobNimbus' Job Fields) */
.fd-jobname-f { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; } .fd-jobname-f p { margin: 4px 0 0; }
.fd-jobname-c { display: flex; gap: 8px; align-items: center; } .fd-jobname-c select, .fd-jobname-c input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; min-width: 220px; }
.fd-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fd-cats, .fd-list { list-style: none; margin: 0; padding: 0; }
.fd-cat { margin-bottom: 10px; } .fd-cat.dragging { opacity: .5; }
.fd-cat-h { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.fd-cat-h b { font-size: 16px; } .fd-cat-tools { margin-left: auto; }
.fd-chev { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; transition: transform .15s; }
.fd-cat.collapsed .fd-chev { transform: rotate(-90deg); } .fd-cat.collapsed .fd-list { display: none; }
.fd-count { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; color: var(--muted); }
.fd-h { cursor: grab; color: var(--muted); user-select: none; font-size: 16px; padding: 0 2px; }
.fd-list { padding-left: 30px; display: flex; flex-direction: column; gap: 8px; min-height: 12px; }
.fd-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; background: var(--panel); }
.fd-row.off .fd-name { color: var(--muted); text-decoration: line-through; } .fd-row.dragging { opacity: .5; }
.fd-name { border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-align: left; padding: 0; flex: 1; }
.fd-name:hover { color: var(--accent-ink); text-decoration: underline; }
.fd-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.fd-ico { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.fd-ico.grey { background: #EEECE8; color: #5F6B7A; } .fd-ico.blue { background: #E3EEFB; color: #1D5FBF; } .fd-ico.teal { background: #DFF3EC; color: #12805C; }
.fd-ico.green { background: #E3F4E8; color: #1E7B45; } .fd-ico.amber { background: #FBF0DD; color: #9A4A07; } .fd-ico.violet { background: #EEE8FB; color: #5f3dc4; } .fd-ico.tan { background: var(--accent-soft); color: var(--accent-ink); }
.fd-bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
.fd-bulk[hidden] { display: none; } .fd-bulk select { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); }
.fd-show { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; gap: 6px 16px; flex-wrap: wrap; } .fd-show legend { font-size: 13px; color: var(--muted); }
.fd-dialog { width: min(600px, calc(100vw - 32px)); }
@media (max-width: 760px) { .fd-list { padding-left: 0; } .fd-tags { display: none; } }/* Settings > Features */
.ft-card { padding: 0; overflow: hidden; }
.ft-sect { background: var(--chip); color: var(--muted); font-weight: 700; font-size: 13px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.ft-list { list-style: none; margin: 0; padding: 0; }
.ft-row { display: flex; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ft-switch { position: relative; width: 40px; height: 22px; flex: none; cursor: pointer; }
.ft-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ft-slider { position: absolute; inset: 0; background: #CFC9BF; border-radius: 22px; transition: background .15s; }
.ft-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.ft-slider::before { box-shadow: 0 1px 2px rgba(0,0,0,.25); }
/* ON = tan fill in both themes (QA 2026-11-04: dark-mode ON looked darker than OFF). */
.ft-switch input:checked + .ft-slider { background: #CAB79B; } .ft-switch input:checked + .ft-slider::before { transform: translateX(18px); background: #0D0D0D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ft-slider { background: #3A4048; } :root:not([data-theme="light"]) .ft-switch input:not(:checked) + .ft-slider::before { background: #9AA7B4; } }
:root[data-theme="dark"] .ft-slider { background: #3A4048; } :root[data-theme="dark"] .ft-switch input:not(:checked) + .ft-slider::before { background: #9AA7B4; }
:root[data-theme="dark"] .ft-switch input:checked + .ft-slider, :root:not([data-theme="light"]) .ft-switch input:checked + .ft-slider { background: #CAB79B; }
.ft-switch input:focus-visible + .ft-slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.ft-switch.dis { opacity: .45; cursor: not-allowed; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ft-savebar { position: sticky; bottom: 12px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; background: #0D0D0D; color: #E9E3D8; border-radius: 12px; padding: 10px 14px; margin-top: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); z-index: 20; }
.ft-savebar[hidden] { display: none; } .ft-savebar span { margin-right: auto; }
/* ===================== Shared UI polish (Alex, 2026-11-04: "make it look new") ===================== */
/* Toast: every flash message slides in bottom-right, with Undo when the change can be undone; fades after 8 s. */
main > .flash { position: fixed; right: 20px; bottom: 20px; z-index: 300; max-width: min(460px, calc(100vw - 32px)); margin: 0; padding: 12px 16px;
  border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.28); display: flex; gap: 12px; align-items: center; border: 0;
  background: #0D0D0D; color: #F3EEE6; animation: toast-in .18s ease-out, toast-out .3s ease-in 8s forwards; }
main > .flash.err { background: #4A1410; color: #fff; }
main > .flash .btn { background: #CAB79B; color: #000; border-color: #CAB79B; }
main > .flash:hover { animation: toast-in .18s ease-out; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; transform: translateY(8px); } }
@media (max-width: 760px) { main > .flash { left: 12px; right: 12px; bottom: 76px; } }

/* Drawers: every settings dialog is a slide-over from the right. */
.st-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: 100dvh; width: min(520px, 100vw); border-radius: 16px 0 0 16px;
  border: 0; border-left: 1px solid var(--line); padding: 26px 28px; overflow: auto; animation: drawer-in .2s ease-out; }
.st-dialog.fd-dialog { width: min(600px, 100vw); }
.st-dialog::backdrop { background: rgba(13,13,13,.45); backdrop-filter: blur(2px); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.st-dialog h2 { font-size: 20px; margin-bottom: 14px; }
.st-dialog-actions { position: sticky; bottom: -26px; background: var(--panel); padding: 14px 0 6px; margin-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .st-dialog { border-radius: 0; padding: 20px 16px; } }

/* Cards and type scale */
.st-page .st-card { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); padding: 22px 24px; }
.st-page .st-head h1 { font-size: 28px; letter-spacing: -.01em; } .st-page .st-head p { font-size: 15px; }
.st-card h2 { font-size: 17px; font-weight: 700; }

/* Tables: light dividers, sticky header, hover, comfortable rows, row menu on hover, cards on phones */
.st-table thead th { position: sticky; top: 70px; background: var(--panel); z-index: 2; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.st-table tbody tr { transition: background .15s; } .st-table tbody tr:hover { background: var(--accent-soft); }
.st-table td { padding: 14px 12px; height: 48px; }
.st-table .st-menu-cell .jp-ib { opacity: .35; transition: opacity .15s; } .st-table tr:hover .st-menu-cell .jp-ib, .st-table .st-menu-cell details[open] .jp-ib { opacity: 1; }
@media (max-width: 760px) {
  .st-table thead { display: none; }
  .st-table, .st-table tbody, .st-table tr, .st-table td { display: block; width: 100%; }
  .st-table tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 6px 4px; position: relative; }
  .st-table td { border: 0; height: auto; padding: 6px 12px; }
  .st-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .st-table td:nth-child(2) { display: block !important; }
  .st-table .st-menu-cell { position: absolute; top: 6px; right: 6px; width: auto; } .st-table .st-menu-cell .jp-ib { opacity: 1; }
}

/* Toggles: checkboxes in settings forms render as switches (bulk-pick boxes stay boxes). */
.st-check input[type=checkbox], input[type=checkbox].ui-toggle { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 22px; background: #CFC9BF;
  position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.st-check input[type=checkbox]::before, input[type=checkbox].ui-toggle::before { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s, background .15s; }
.st-check input[type=checkbox]:checked, input[type=checkbox].ui-toggle:checked { background: #0D0D0D; }
.st-check input[type=checkbox]:checked::before, input[type=checkbox].ui-toggle:checked::before { transform: translateX(16px); background: #CAB79B; }
.st-check input[type=checkbox]:focus-visible, input[type=checkbox].ui-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fd-pick { width: 18px; height: 18px; accent-color: #0D0D0D; border-radius: 5px; }

/* Chips and pills */
.st-pill { border-radius: 999px; padding: 3px 10px; font-weight: 600; font-size: 12px; background: var(--chip); border-color: transparent; }
.st-pill.ok { background: rgba(30,123,69,.12); color: var(--ok); border-color: transparent; }
.st-pill .dot, .ui-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
/* Empty states */
.ui-empty { text-align: center; padding: 36px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ui-empty .ui-empty-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.ui-empty b { color: var(--ink); font-size: 15px; }
/* Buttons in settings: a little more presence */
.st-page .btn { border-radius: 10px; padding: 9px 16px; transition: background .15s, border-color .15s, transform .1s; } .st-page .btn:active { transform: translateY(1px); }
.st-page .btn.small { padding: 5px 10px; border-radius: 8px; }
.st-page .btn[disabled] { opacity: .45; }
/* Dark mode details for the field type icons */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fd-ico { filter: saturate(.9) brightness(.85); } :root:not([data-theme="light"]) .st-check input[type=checkbox]:not(:checked) { background: #4A453D; } }
:root[data-theme="dark"] .fd-ico { filter: saturate(.9) brightness(.85); } :root[data-theme="dark"] .st-check input[type=checkbox]:not(:checked) { background: #4A453D; }
.st-page .table-wrap { overflow: visible; }
@media (max-width: 760px) { .st-page .table-wrap { overflow: visible; } }
/* List editors (Lead Source / Task Type / Note Type / Attachment Categories) */
.st-help { margin: 0 0 16px; padding: 12px 16px 12px 34px; background: var(--accent-soft); border-radius: 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.lst .lst-h { width: 28px; cursor: grab; color: var(--muted); text-align: center; user-select: none; font-size: 16px; }
.lst tr.lst-off td:not(.lst-manage) { opacity: .55; }
.lst-manage { white-space: nowrap; text-align: right; } .lst-manage .inline { display: inline; }
.lst-manage .btn, .lst-manage .jp-ib { opacity: .6; transition: opacity .15s; } .lst tr:hover .lst-manage .btn, .lst tr:hover .lst-manage .jp-ib, .lst-manage .btn:focus-visible { opacity: 1; }
.lst-del:not([disabled]) { color: var(--bad) !important; border-color: transparent !important; }
.st-dialog input[type=color] { width: 64px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
@media (max-width: 760px) { .lst .lst-h { display: none !important; } .lst-manage { text-align: left; } .lst-manage .btn, .lst-manage .jp-ib { opacity: 1; } }
.st-pill { white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-check input[type=checkbox]:checked, :root:not([data-theme="light"]) input[type=checkbox].ui-toggle:checked { background: #CAB79B; } :root:not([data-theme="light"]) .st-check input[type=checkbox]:checked::before, :root:not([data-theme="light"]) input[type=checkbox].ui-toggle:checked::before { background: #0D0D0D; } }
:root[data-theme="dark"] .st-check input[type=checkbox]:checked, :root[data-theme="dark"] input[type=checkbox].ui-toggle:checked { background: #CAB79B; } :root[data-theme="dark"] .st-check input[type=checkbox]:checked::before, :root[data-theme="dark"] input[type=checkbox].ui-toggle:checked::before { background: #0D0D0D; }
/* Products & Services */
.pr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pr-toolbar { padding: 14px 18px !important; }
.pr-filter { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.pr-search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--panel); color: var(--muted); }
.pr-search input { border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; padding: 10px 0; flex: 1; min-width: 0; }
.pr-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pr-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 12px 0 0; width: 100%; }
.pr-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.pr-filters select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; }
.pr-filter details[open] { flex-basis: 100%; order: 3; } .pr-filter details > summary { list-style: none; } .pr-filter details > summary::-webkit-details-marker { display: none; }
.pr-table .pr-ck { width: 34px; }
.pr-desc { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-info { display: grid; grid-template-columns: auto auto; gap: 2px 14px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pr-info b { color: var(--ink); font-weight: 600; } .pr-info b.neg { color: var(--bad); }
.st-pill.pr-material { background: #E3EEFB; color: #1D5FBF; } .st-pill.pr-labor { background: #FBF0DD; color: #9A4A07; } .st-pill.pr-service { background: #DFF3EC; color: #12805C; }
.st-pill.pr-err { background: var(--bad-soft); color: var(--bad); white-space: normal; }
tr.pr-bad td { background: var(--bad-soft); }
.pr-pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; } .pr-pager span { margin-right: auto; }
.pr-form textarea { min-height: 90px; }
@media (max-width: 760px) { .pr-desc { white-space: normal; max-width: none; } .pr-table .pr-ck { display: none !important; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-pill.pr-material, :root:not([data-theme="light"]) .st-pill.pr-labor, :root:not([data-theme="light"]) .st-pill.pr-service { filter: brightness(.8) saturate(1.1); } }
/* Boards: each column scrolls on its own (Alex, 2026-11-04). The board fills the window; column headers stay pinned;
   a slim tan scrollbar is always visible on the right of each column. */
.bd-board { height: calc(100dvh - var(--bd-top, 230px) - 10px); min-height: 360px; align-items: stretch; padding-bottom: 6px; }
.bd-group { min-height: 0; }
.bd-cols { flex: 1; min-height: 0; }
.bd-col { min-height: 0; height: 100%; overflow: hidden; }
.bd-col-h { flex: none; }
.bd-col-b { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; margin-right: -4px; }
/* Production boards (backlog, payment pending): the same, header pinned inside the column. */
.board { height: calc(100dvh - var(--bd-top, 260px) - 10px); min-height: 360px; align-items: stretch; }
.board > .col { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.board > .col > .col-head { position: sticky; top: -8px; z-index: 2; background: inherit; margin: -8px -8px 0; padding: 12px 14px 8px; }
/* Brand scrollbars: always visible (WebKit / Blink incl. Safari and macOS), thin tan thumb. */
.bd-col-b::-webkit-scrollbar, .board > .col::-webkit-scrollbar, .bd-board::-webkit-scrollbar, .board::-webkit-scrollbar { width: 8px; height: 10px; }
.bd-col-b::-webkit-scrollbar-track, .board > .col::-webkit-scrollbar-track { background: rgba(13,13,13,.06); border-radius: 8px; }
.bd-board::-webkit-scrollbar-track, .board::-webkit-scrollbar-track { background: rgba(13,13,13,.06); border-radius: 8px; }
.bd-col-b::-webkit-scrollbar-thumb, .board > .col::-webkit-scrollbar-thumb, .bd-board::-webkit-scrollbar-thumb, .board::-webkit-scrollbar-thumb { background: #CAB79B; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; min-height: 40px; }
.bd-col-b::-webkit-scrollbar-thumb:hover, .board > .col::-webkit-scrollbar-thumb:hover { background-color: #B5A07F; }
@supports not selector(::-webkit-scrollbar) { .bd-col-b, .board > .col, .bd-board, .board { scrollbar-width: thin; scrollbar-color: #CAB79B rgba(13,13,13,.08); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bd-col-b::-webkit-scrollbar-track, :root:not([data-theme="light"]) .board > .col::-webkit-scrollbar-track, :root:not([data-theme="light"]) .bd-board::-webkit-scrollbar-track, :root:not([data-theme="light"]) .board::-webkit-scrollbar-track { background: rgba(255,255,255,.07); } }
:root[data-theme="dark"] .bd-col-b::-webkit-scrollbar-track, :root[data-theme="dark"] .board > .col::-webkit-scrollbar-track, :root[data-theme="dark"] .bd-board::-webkit-scrollbar-track, :root[data-theme="dark"] .board::-webkit-scrollbar-track { background: rgba(255,255,255,.07); }
.bd-loading { text-align: center; color: var(--muted); font-size: 13px; padding: 8px; }
@media (max-width: 760px) { .bd-board, .board { height: calc(100dvh - var(--bd-top, 200px) - 70px); } }
.st-page .table-wrap.pr-wrap { overflow-x: auto; } .pr-wrap .st-table thead th { top: 0; } .pr-desc { max-width: 300px; }
@media (max-width: 760px) { .st-page .table-wrap.pr-wrap { overflow-x: visible; } }

.st-dialog [hidden] { display: none !important; }
/* Lean list rows: short class names, the handle and pills drawn by CSS */
.lst .lst-h::before { content: '\283F'; }
.lst .b { display: inline-block; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; margin-left: 4px; transition: background .15s, border-color .15s; }
.lst .b:hover { background: var(--accent-soft); border-color: var(--accent); } .lst .b[disabled] { opacity: .35; cursor: not-allowed; }
.lst .b.lst-del:not([disabled]) { color: var(--bad); border-color: transparent; }
.lst i.vis { font-style: normal; display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: rgba(30,123,69,.12); color: var(--ok); white-space: nowrap; }
.lst i.vis::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.lst i.vis.off { background: var(--chip); color: var(--muted); } .lst i.vis.off::before { display: none; }.lst input[data-f] { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 22px; background: #CFC9BF; position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.lst input[data-f]::before { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.lst input[data-f]:checked { background: #0D0D0D; } .lst input[data-f]:checked::before { transform: translateX(16px); background: #CAB79B; }/* Lean board cards */
.bd-card .t { display: block; font-weight: 700; font-size: 14px; color: var(--ink); }
.bd-card .m { color: var(--muted); margin-top: 3px; } .bd-card .m b { color: var(--ink); font-weight: 600; }
.bd-card .p { display: flex; gap: 4px; margin-top: 8px; }
.bd-card .p i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: #0D0D0D; color: #CAB79B; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bd-card .p i.r { background: #CAB79B; color: #000; }
.bd-card .f { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.bd-card .f span { border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }/* Lean field rows: handle and type icons drawn by CSS */
.fd-row .fd-h::before { content: '\283F'; font-style: normal; }
.fd-tags i { font-style: normal; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--muted); white-space: nowrap; }
.fd-ico.t-text, .fd-ico.t-longtext { background: #EEECE8; color: #5F6B7A; } .fd-ico.t-text::before { content: 'T'; } .fd-ico.t-longtext::before { content: '\00B6'; }
.fd-ico.t-number { background: #FBF0DD; color: #9A4A07; } .fd-ico.t-number::before { content: '#'; }
.fd-ico.t-money { background: #E3F4E8; color: #1E7B45; } .fd-ico.t-money::before { content: '$'; }
.fd-ico.t-checkbox { background: #EEE8FB; color: #5f3dc4; } .fd-ico.t-checkbox::before { content: '\2713'; }
.fd-ico.t-date, .fd-ico.t-select, .fd-ico.t-multiselect, .fd-ico.t-user { color: transparent; background-repeat: no-repeat; background-position: center; background-size: 16px; }
.fd-ico.t-date { background-color: #E3EEFB; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D5FBF' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.fd-ico.t-select, .fd-ico.t-multiselect { background-color: #DFF3EC; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312805C' stroke-width='2'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
.fd-ico.t-user { background-color: var(--accent-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6443' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }/* Teammates */
.tm-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tm-role { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--ink); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.tm-role:hover { border-color: var(--accent); }
.tm-role-n { padding: 12px 16px 0; font-weight: 600; color: var(--muted); font-size: 13px; }
.tm-role b { padding: 2px 16px 0; font-size: 30px; line-height: 1.1; } .tm-role-l { padding: 0 16px 12px; color: var(--muted); font-size: 13px; }
.tm-role-f { margin-top: auto; background: var(--chip); padding: 8px 16px; font-size: 12px; color: var(--muted); }
.tm-total { background: #0D0D0D; border-color: #0D0D0D; color: #F3EEE6; } .tm-total .tm-role-n, .tm-total .tm-role-l { color: #CAB79B; } .tm-total .tm-role-f { background: #1E1C19; color: #CFC6B8; }
.tm-filter select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; }
.tm-filter { margin-bottom: 12px; }
.tm-user { display: flex; gap: 12px; align-items: center; } .tm-user > span:last-child { display: flex; flex-direction: column; } .tm-email, .tm-e { word-break: break-all; } .tm-e { color: var(--muted); }
.st-pill.tm-inv { background: #E3EEFB; color: #1D5FBF; } .st-pill.tm-off { background: var(--bad-soft); color: var(--bad); }
.tm-menu { min-width: 230px; padding: 6px; } .tm-menu form { margin: 0; }
.tm-menu .mi { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; list-style: none; }
.tm-menu .mi:hover { background: var(--accent-soft); } .tm-sub > summary::-webkit-details-marker { display: none; }
.tm-roles-form { display: flex; flex-direction: column; gap: 6px; padding: 6px 12px 10px; } .tm-roles-form input[type=text] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); }
.tm-table td { vertical-align: middle; }/* Teammates: shared action menu anchored to the clicked row (QA 2026-11-04). */
.tm-table .st-menu-cell { position: relative; }
.tm-table .st-menu-cell .tm-menu { right: 0; top: 36px; min-width: 230px; text-align: left; }
.tm-table td:nth-child(2), .tm-table td:nth-child(4) { font-size: 13px; } .tm-table td:nth-child(4) { white-space: nowrap; } .tm-email, .tm-e { font-size: 13px; }
.tm-menu [hidden] { display: none !important; }
@media (max-width: 760px) { .tm-table td:nth-child(2), .tm-table td:nth-child(4) { display: none; } }
.avatar.av34 { width: 34px; height: 34px; font-size: 14px; } .tm-warn { color: var(--warn-ink); }

/* Boards on phones (QA 2026-11-04): one compact toolbar row (board picker, search, Filters); the rest opens below it.
   No hint line; the board fills the space above the tab bar without scrolling the page. */
.bd-tools { display: none; }
@media (max-width: 760px) {
  .bd-bar { flex-wrap: wrap; padding: 6px 8px; gap: 6px; margin-bottom: 8px; }
  .bd-bar .bd-pick { flex: 0 1 auto; min-width: 0; } .bd-bar .bd-pick summary b { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
  .bd-bar .bd-search { flex: 1 1 90px; min-width: 0; } .bd-bar .bd-search input { width: 100%; min-width: 0; }
  .bd-tools { display: inline-flex; }
  .bd-bar:not(.open) > .bd-dd, .bd-bar:not(.open) > a.bd-btn, .bd-bar:not(.open) > .bd-spacer { display: none; }
  .bd-hint { display: none; }
  .bd-board, .board { min-height: 280px; }
}
/* List pages and Products on phones (QA 2026-11-04): a two-line summary row (name + one key value) and Edit; the rest
   lives in the drawer. */
@media (max-width: 760px) {
  .st-table.lst tr, .st-table.pr-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 10px 12px; margin-bottom: 8px; }
  .st-table.lst td, .st-table.pr-table td { display: none; padding: 0; height: auto; }
  .st-table.lst td::before, .st-table.pr-table td::before { content: none !important; }
  .st-table.lst td:nth-child(2), .st-table.pr-table td:nth-child(2) { display: block !important; grid-column: 1; }
  .st-table.lst td:nth-last-child(2) { display: block; grid-column: 1; font-size: 12px; }
  .st-table.pr-table td:nth-child(4) { display: block; grid-column: 1; font-size: 12px; color: var(--muted); }
  .st-table.pr-table .pr-desc { display: none; }
  .st-table.lst td.lst-manage, .st-table.pr-table td.lst-manage { display: flex; position: static; grid-column: 2; grid-row: 1 / span 2; width: auto; }
  .st-table.lst td.lst-manage .b:not([data-e]), .st-table.pr-table td.lst-manage > :not([data-edit-prod]) { display: none; }
}
/* Field editor on phones: full width, title in view on open. */
@media (max-width: 760px) {
  dialog.st-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; inset: 0; }
  dialog.st-dialog form h2 { position: sticky; top: 0; background: var(--panel); z-index: 2; padding: 6px 0; margin-top: 0; }
}
/* Job page: anchored cards clear the sticky top bar (QA 2026-11-04). */
.jp [id], .jp-card[id] { scroll-margin-top: 90px; }
@media (max-width: 760px) { .bd-bar { flex-wrap: nowrap; } .bd-bar.open { flex-wrap: wrap; } .bd-bar .bd-pick summary b { max-width: 30vw; } .bd-tools { flex: none; } }
@media (max-width: 420px) { .bd-tools-l { display: none; } }
/* Settings > Groups */
.gr-table td:first-child { min-width: 220px; } .gr-desc { font-size: 13px; margin-top: 2px; }
.gr-n { display: inline-flex; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--chip); font-weight: 700; font-size: 12px; align-items: center; justify-content: center; margin-right: 4px; }
.st-pill.gr-role { background: var(--accent-soft); color: var(--ink); }
.gr-out, .gr-out-li .gr-p span { color: var(--muted); font-style: italic; }
.gr-people { list-style: none; margin: 8px 0 0; padding: 0; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.gr-people li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.gr-people li:last-child { border-bottom: 0; } .gr-people li[hidden] { display: none; }
.gr-people label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.gr-mgr { font-size: 12px; color: var(--muted); }
.gr-dialog [data-gr-find] { width: 100%; }
.gr-sum { margin: 6px 0 10px 18px; padding: 0; } .gr-sum li { margin-bottom: 6px; }
@media (max-width: 760px) { .gr-table td:first-child { min-width: 0; } }
.st-form .gr-people label { flex-direction: row; align-items: center; gap: 8px; margin: 0; width: auto; }
.st-form .gr-people .gr-p { flex: 1; min-width: 0; } .st-form .gr-people .gr-p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-form .gr-people input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex: none; }
/* Access Profiles: Roles / Allow / Deny per permission as a small segmented control. */
.ap-perms { display: flex; flex-direction: column; gap: 2px; }
.ap-group { margin: 12px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.ap-row b { font-weight: 600; } .ap-desc, .tm-grp { font-size: 12px; margin-top: 2px; }
.ap-seg { display: inline-flex; flex: none; background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.st-form .ap-seg label { flex-direction: row; gap: 0; margin: 0; color: var(--ink); }
.ap-seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.ap-seg span { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; }
.ap-seg input:checked + span { background: #CAB79B; color: #000; }
.ap-seg input[value="0"]:checked + span { background: var(--bad-soft); color: var(--bad); }
.ap-seg input:focus-visible + span { outline: 2px solid var(--accent); }
.st-pill.ap-custom { background: var(--accent-soft); color: var(--ink); }
@media (max-width: 760px) { .ap-row { flex-direction: column; align-items: flex-start; } }
.mh-table td { text-align: center; } .mh-table tbody th { text-align: left; font-weight: 500; position: static; text-transform: none; letter-spacing: 0; font-size: 13px; }
.bd-col[style*="--sc"] .bd-col-h { border-top-color: var(--sc); }
/* Workflow & Boards Builder */
.wf-tabs { display: inline-flex; background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.wf-tab { padding: 6px 16px; border-radius: 999px; color: var(--ink); font-weight: 600; } .wf-tab.on { background: #CAB79B; color: #000; } .wf-tab:hover { text-decoration: none; }
.wf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.wf-card { display: flex; flex-direction: column; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.wf-card:hover { border-color: #CAB79B; text-decoration: none; transform: translateY(-1px); } .wf-card.off { opacity: .6; }
.wf-strip { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; } .wf-strip i { flex: 1; }
.wf-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.wf-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: end; }
@media (max-width: 760px) { .wf-head { grid-template-columns: 1fr; } }
/* Automations: stored-only banner and drawer rows */
.au-banner { background: var(--warn-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-left: 4px solid var(--warn); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.au-row { display: grid; grid-template-columns: 1fr 120px 1fr; gap: 8px; margin-top: 8px; } .au-row.au-act { grid-template-columns: 220px 1fr; }
.au-row[data-au-t] { grid-template-columns: 1fr 1fr; } .au-row[hidden] { display: none; }
@media (max-width: 760px) { .au-row, .au-row.au-act, .au-row[data-au-t] { grid-template-columns: 1fr; } }
.au-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; } .au-head h1 { margin: 0; font-size: 24px; }
.au-head .pr-search input { min-width: 200px; } .au-filter { display: flex; flex-direction: column; gap: 8px; padding: 12px; min-width: 240px; right: 0; left: auto; }
.au-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--chip) 55%, transparent); }
.au-table td { vertical-align: top; } .au-when { font-size: 13px; margin-top: 3px; } .au-acts { max-width: 420px; white-space: normal; font-size: 13px; }
.au-table td:nth-child(3) { font-size: 13px; } .au-active { width: 18px; height: 18px; accent-color: #B08D57; }
.au-row.au-trig { grid-template-columns: 90px 110px auto 1fr; align-items: center; }
.au-merge { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.chip-btn { border: 1px solid var(--line); background: var(--chip); color: var(--ink); border-radius: 999px; padding: 3px 9px; font-size: 12px; cursor: pointer; } .chip-btn:hover { border-color: #CAB79B; }
@media (max-width: 760px) { .au-row.au-trig { grid-template-columns: 1fr 1fr; } .au-head h1 { width: 100%; } }
/* Forms builder + Templates */
.fm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 16px; align-items: start; }
.fm-preview { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; }
.fm-sec-h { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; } .fm-sec-t { flex: 1; font-weight: 600; }
.fm-qs { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fm-q { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--panel); } .fm-q.dragging { opacity: .5; }
.fm-q-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fm-q-r { display: flex; gap: 8px; align-items: center; } .fm-q-r [data-k=label] { flex: 1; min-width: 0; } .fm-q-r textarea { flex: 1; }
.st-form .fm-req { flex-direction: row; align-items: center; gap: 4px; white-space: nowrap; font-size: 13px; }
.fm-pq { margin-bottom: 12px; } .fm-pl { font-weight: 600; margin-bottom: 4px; } .fm-star { color: var(--bad); } .fm-ph { margin: 14px 0 6px; }
.fm-pq input, .fm-pq textarea { width: 100%; } .fm-opts { display: flex; flex-direction: column; gap: 4px; } .fm-opts label { display: flex; gap: 6px; align-items: center; }
.fm-box { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; color: var(--muted); text-align: center; } .fm-sig { height: 60px; }
.tp-find { min-width: 220px; } .tp-add { right: 0; left: auto; min-width: 200px; }
.tp-table tr.tp-group td { background: var(--chip); font-weight: 700; font-size: 13px; padding: 8px 12px; height: auto; }
.tp-edit { font-weight: 600; white-space: nowrap; }
.tp-tools { display: flex; gap: 4px; margin: 4px 0; } .tp-tools button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.tp-rich { min-height: 220px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--panel); color: var(--ink); }
.tp-rich:focus { outline: 2px solid var(--accent); }
.tp-mail, .tp-sms, .tp-doc { font-size: 14px; } .tp-sms { background: var(--chip); border-radius: 14px; padding: 10px 12px; max-width: 280px; }
.tp-doc table { width: 100%; border-collapse: collapse; font-size: 13px; } .tp-doc th, .tp-doc td { border-bottom: 1px solid var(--line); padding: 6px; text-align: left; }
.tp-doc-logo .tp-logo { height: 34px; width: auto; } .tp-total { text-align: right; } .tp-terms { font-size: 12px; color: var(--muted); margin-top: 10px; }
.tp-sign { display: flex; gap: 20px; margin-top: 30px; } .tp-sign span { flex: 1; border-top: 1px solid var(--ink); padding-top: 4px; font-size: 12px; }
.jp-forms { margin-top: 12px; } .jp-forms ul { margin: 6px 0 0 18px; padding: 0; }
@media (max-width: 1000px) { .fm-grid { grid-template-columns: 1fr; } .fm-preview { position: static; max-height: none; } }
/* Estimate Settings */
.es-top { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; } .es-top h1 { margin: 0; font-size: 24px; }
.es-back { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 18px; }
.es-back:hover { border-color: #CAB79B; text-decoration: none; }
.es-h { margin: 0; font-size: 20px; } .es-help { font-weight: 600; margin-right: 6px; }
.es-explore { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; background: var(--accent-soft); border-radius: 14px; padding: 16px 18px; margin: 4px 0 16px; }
.es-art { display: inline-flex; gap: 4px; } .es-art i { width: 26px; height: 34px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 6px 0 #CAB79B; } .es-art i:nth-child(2) { box-shadow: inset 0 6px 0 #B08D57; } .es-art i:nth-child(3) { box-shadow: inset 0 6px 0 #1E7B45; }
.es-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; } .es-find { max-width: 320px; }
.es-table td { vertical-align: middle; } .es-acts { display: flex; gap: 4px; align-items: center; } .es-acts form { margin: 0; } .es-nodel { visibility: hidden; }
.es-use-line { font-size: 12px; margin-top: 2px; } .es-pick { display: inline-flex; margin-right: 8px; vertical-align: middle; }
.st-pill.es-abc { background: #E3EEFB; color: #1D5FBF; font-weight: 800; letter-spacing: .03em; } .st-pill.es-retired { opacity: .75; }
.es-wide { width: min(980px, 100vw); } .es-starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.es-starter { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.es-starter-h { display: flex; gap: 10px; align-items: center; } .es-ico { display: inline-flex; min-width: 44px; height: 30px; padding: 0 6px; border-radius: 8px; background: #0D0D0D; color: #CAB79B; font-size: 11px; font-weight: 800; align-items: center; justify-content: center; }
.es-use { display: flex; gap: 6px; } .es-use select { flex: 1; min-width: 0; }
.es-optnames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .es-optnames[hidden] { display: none; }
.es-qty { flex: 1; font-family: ui-monospace, monospace; font-size: 13px; }
.es-prev { width: 100%; border-collapse: collapse; font-size: 13px; } .es-prev th, .es-prev td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; } .es-prev tfoot td { border-top: 2px solid var(--ink); }
.es-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .es-explore { grid-template-columns: 1fr; } .es-art { display: none; } .es-cmp { grid-template-columns: 1fr; } .es-optnames { grid-template-columns: 1fr; } }
/* Settings kit: history drawer, bulk bar, inline edit */
.st-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.st-hist li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; } .st-hist form { margin: 0; }
.st-bulk { display: flex; gap: 8px; align-items: center; background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; } .st-bulk[hidden] { display: none; }
[data-inline] { cursor: text; border-bottom: 1px dashed transparent; } [data-inline]:hover { border-bottom-color: var(--muted); }
.st-inline { font: inherit; font-weight: 600; padding: 2px 6px; border: 1px solid #CAB79B; border-radius: 6px; background: var(--panel); color: var(--ink); min-width: 180px; }
/* Taxes */
.tx-help { margin-bottom: 8px; } .tx-used { font-size: 12px; margin-top: 2px; } .tx-sample { font-weight: 600; }
/* Suppliers */
.sp-crumb { margin: 0 0 4px; }
.sp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; overflow-x: auto; }
.sp-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--ink); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.sp-tab.on { border-bottom-color: #CAB79B; } .sp-tab:hover { text-decoration: none; background: var(--accent-soft); border-radius: 8px 8px 0 0; }
.sp-badge { display: inline-flex; min-width: 30px; height: 20px; padding: 0 4px; border-radius: 5px; background: #0D0D0D; color: #CAB79B; font-size: 10px; font-weight: 800; align-items: center; justify-content: center; }
.sp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9AA0A6; }
.sp-dot.ok { background: var(--ok); } .sp-dot.warn { background: #D97706; }
.sp-table td { vertical-align: top; } .sp-table select, .sp-table input[type=text] { width: 100%; min-width: 140px; }
.sp-more summary { cursor: pointer; } .sp-more-b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; min-width: 300px; }
.sp-more-b label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); } .sp-more-b label:last-child { grid-column: 1 / -1; }
.sp-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 760px) { .sp-more-b { grid-template-columns: 1fr; min-width: 0; } }
.st-histbar { display: flex; justify-content: flex-end; margin: -4px 0 6px; } .st-found td, li.st-found, .fd-row.st-found { background: color-mix(in srgb, #CAB79B 35%, transparent) !important; transition: background 1s; }

/* QA 2026-11-04 (revision 00026) */
.st-form.fm-builder, .st-form.tp-form, .st-form[data-es-form] { max-width: none; }
.fm-grid > * { min-width: 0; }
.mh-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.st-page .panel.table-wrap#my-home { overflow: hidden; max-width: 100%; }
.ap-roles-wrap, .st-page .table-wrap.ap-scroll { overflow-x: auto; }
.tm-danger { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.tm-danger-h { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--bad); padding: 4px 12px; }
.tm-danger .mi { color: var(--bad) !important; } .tm-danger .mi:hover { background: var(--bad-soft) !important; }
.au-text { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.15; } .au-sub { font-size: 11px; font-weight: 500; color: var(--muted); }
@media (max-width: 760px) {
  .st-table.tp-table tr:not(.tp-group) { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 2px 10px; padding: 10px 12px; margin-bottom: 8px; }
  .st-table.tp-table tr.tp-group { display: block; border: 0; padding: 6px 0; margin: 10px 0 4px; } .st-table.tp-table tr.tp-group td { background: none; padding: 0; }
  .st-table.tp-table td { padding: 0; height: auto; } .st-table.tp-table td::before { content: none !important; }
  .st-table.tp-table .st-menu-cell { position: static; }
  .st-table.ap-roles, .st-table.ap-roles thead, .st-table.ap-roles tbody, .st-table.ap-roles tr, .st-table.ap-roles td, .st-table.ap-roles th { display: revert; width: auto; } .st-table.ap-roles td { padding: 6px 8px; }
}
.st-pill.tx-qb { white-space: normal; max-width: 100%; border-radius: 10px; } .st-pill { max-width: 100%; }

/* Workflow funnel */
.wf-funnel { display: flex; flex-direction: column; gap: 4px; }
.wf-fr { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 60px 80px; gap: 10px; align-items: center; font-size: 13px; }
.wf-fl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wf-fb { background: var(--chip); border-radius: 4px; height: 12px; overflow: hidden; } .wf-fb i { display: block; height: 100%; border-radius: 4px; }
.wf-fn { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .wf-fr { grid-template-columns: 1fr 50px; } .wf-fb { grid-column: 1 / -1; grid-row: 2; } .wf-fr > :last-child { display: none; } }
.au-sum { font-size: 13px; margin-top: 4px; } .au-sim { font-size: 12px; margin-top: 2px; }

/* View as + permissions matrix */
.va-banner { background: #0D0D0D; color: #CAB79B; padding: 10px 16px; border-radius: 12px; margin-bottom: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .va-banner b { color: #fff; }
.ap-viewas { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; } .ap-viewas label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.st-page .table-wrap.mx-wrap { overflow-x: auto; } .mx-table td, .mx-table th { text-align: center; padding: 6px 8px; height: auto; } .mx-table td:first-child, .mx-table th:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); }
.mx-h span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 11px; } .mx-on { color: var(--ok); font-weight: 800; } .mx-sub { font-size: 11px; }
@media (max-width: 760px) { .st-table.mx-table, .st-table.mx-table thead, .st-table.mx-table tbody, .st-table.mx-table tr, .st-table.mx-table td, .st-table.mx-table th { display: revert; width: auto; } }
.tp-vh { margin-top: 14px; } .tp-versions { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; } .tp-versions li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
