/* Components. Two parts: own classes used by the layouts and the dashboard, then the mapping that gives the
   Tailwind utilities in the views the same look. The mapping is light theme only; dark mode keeps dark: utilities. */

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: var(--r-btn); background: var(--card); color: var(--ink); font-size: 13.5px; font-weight: 500; white-space: nowrap; box-shadow: var(--ring); cursor: pointer; list-style: none; transition: background .18s; }
.btn:hover { background: var(--card-2); }
.btn svg { width: 16px; height: 16px; }
.btn--icon { width: 38px; padding: 0; justify-content: center; }
.btn--primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; box-shadow: var(--glow); }
.btn--primary:hover { background: var(--accent-hi); }

/* page head */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head h1 { color: var(--ink); }
.page-head p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.page-head b { color: var(--ink); font-weight: 600; }
.page-head__actions { display: flex; gap: 8px; }

/* cards and tiles */
.card { border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.card__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.card__head h2 { color: var(--ink); font-size: 15px; font-weight: 600; }
.card__head a { color: var(--accent-text); font-size: 13px; font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 4px; min-height: 132px; padding: 18px; border-radius: var(--r-lg); color: var(--tile-ink); transition: transform .18s; }
.tile:hover { transform: translateY(-2px); }
.tile--1 { background: var(--tile-1); }
.tile--2 { background: var(--tile-2); }
.tile--3 { background: var(--tile-3); }
.tile--4 { background: var(--tile-4); }
.tile__label { color: var(--tile-muted); font-size: 13.5px; font-weight: 500; }
.tile__value { font-size: 26px; font-weight: 600; line-height: 1.2; }
.tile__foot { margin-top: auto; color: var(--tile-muted); font-size: 12.5px; }

/* document flow */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; padding: 6px; }
.flow a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-md); color: var(--ink); font-size: 13.5px; font-weight: 600; transition: background .18s; }
.flow a:hover { background: var(--card-2); }
.flow i { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-style: normal; font-size: 12.5px; }
.flow small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }

/* rows */
.rows { padding: 0 6px 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13.5px; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--card-2); border-radius: var(--r-md); }
.row small { display: block; color: var(--muted); font-size: 12px; }
.row__end { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.rows__empty { padding: 22px; color: var(--muted); font-size: 13.5px; text-align: center; }
.layout-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }

/* modal */
.modal-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); }

/* dashboard */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 130px; grid-auto-flow: dense; gap: 16px; }
.dash-w2 { grid-column: span 2; }
.dash-w3 { grid-column: span 3; }
.dash-w4 { grid-column: span 4; }
.dash-w5 { grid-column: span 5; }
.dash-w6 { grid-column: span 6; }
.dash-w7 { grid-column: span 7; }
.dash-w8 { grid-column: span 8; }
.dash-w9 { grid-column: span 9; }
.dash-w10 { grid-column: span 10; }
.dash-w11 { grid-column: span 11; }
.dash-w12 { grid-column: span 12; }
.dash-h1 { grid-row: span 1; }
.dash-h2 { grid-row: span 2; }
.dash-h3 { grid-row: span 3; }
.dash-h4 { grid-row: span 4; }
.dash-h5 { grid-row: span 5; }
.dash-h6 { grid-row: span 6; }
@media (max-width: 900px) {
  .dash [class*="dash-w"] { grid-column: span 12; }
}
.dash-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.dash-card--tone1 { background: var(--tile-1); }
.dash-card--tone2 { background: var(--tile-2); }
.dash-card--tone3 { background: var(--tile-3); }
.dash-card--tone4 { background: var(--tile-4); }
.dash-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px 4px; }
.dash-card__head h2 { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dash-card__tools { display: flex; gap: 4px; }
.dash-card__tools button { width: 26px; height: 26px; border-radius: 6px; color: var(--muted); }
.dash-card__tools button:hover { background: var(--card-3); color: var(--ink); }
.dash-card__body { flex: 1; min-height: 0; padding: 4px 14px 12px; }
.dash-card__resize { position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; border-right: 3px solid var(--line-2); border-bottom: 3px solid var(--line-2); cursor: nwse-resize; touch-action: none; }
.dash--editing .dash-card { cursor: grab; box-shadow: inset 0 0 0 1px var(--accent), var(--shadow); }
.dash-number { padding-top: 6px; color: var(--ink); font-size: 26px; font-weight: 600; line-height: 1.2; }
.dash-number__foot { color: var(--muted); font-size: 12.5px; }
.dash-note { height: 100%; overflow: auto; color: var(--ink-2); font-size: 13.5px; white-space: pre-wrap; }
.dash-empty { display: grid; place-items: center; height: 100%; padding: 12px; color: var(--muted); font-size: 13.5px; text-align: center; }
.dash-message { color: #b91c1c; font-size: 13px; }
.dash-chart { display: block; width: 100%; height: 100%; }
.dash-chart__text { fill: var(--muted); font-size: 11px; }
.dash-chart__label { fill: var(--ink); font-size: 11.5px; font-weight: 600; }
.dash-chart__value { fill: var(--ink); font-size: 24px; font-weight: 600; }
.dash-chart__grid { stroke: var(--line-2); stroke-width: 1; }
.dash-chart__track { stroke: var(--card-3); }
.dash-table-wrap { height: 100%; overflow: auto; }
.dash-table { width: 100%; border-collapse: collapse; color: var(--ink); font-size: 13px; }
.dash-table th { position: sticky; top: 0; padding: 6px 8px; background: var(--card); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.dash-table td { padding: 6px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.dash-table .is-number { font-variant-numeric: tabular-nums; text-align: right; }
.dash-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; width: min(460px, 100vw); background: var(--card); box-shadow: -8px 0 28px rgba(0, 0, 0, .18); }
.dash-panel__head, .dash-panel__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dash-panel__head h2 { color: var(--ink); font-size: 15px; font-weight: 600; }
.dash-panel__foot { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.dash-panel__body { flex: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding: 14px 18px; }
.dash-field { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.dash-panel input:not([type=checkbox]):not([type=color]), .dash-panel select, .dash-panel textarea { width: 100%; min-width: 0; height: 34px; padding: 0 8px; border-radius: 8px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 13px; }
.dash-panel textarea { height: auto; padding: 8px; }
.dash-panel input[type=color] { width: 56px; height: 34px; padding: 2px; border-radius: 8px; background: var(--card); }
.dash-field > .btn { align-self: flex-start; height: 32px; }
.dash-inline { display: flex; align-items: flex-end; gap: 6px; }
.dash-check { display: flex; align-items: center; gap: 6px; height: 34px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.dash-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; max-height: 190px; overflow-y: auto; padding: 8px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }
.dash-checks label { display: flex; align-items: center; gap: 6px; }
.dash-types { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-types button { padding: 6px 10px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 12.5px; }
.dash-types button.is-active { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.dash-panel textarea.dash-sql { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.5; white-space: pre; }
.dash-hint { color: var(--muted); font-size: 12px; }
.dash-schema { max-height: 200px; overflow-y: auto; padding: 6px 8px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 12.5px; }
.dash-schema summary { padding: 2px 0; cursor: pointer; font-family: ui-monospace, Consolas, monospace; }
.dash-schema button { display: block; width: 100%; padding: 1px 0 1px 14px; color: var(--ink-2); font-family: ui-monospace, Consolas, monospace; text-align: left; }
.dash-schema button:hover { color: var(--accent-text); }
.dash-schema small { color: var(--muted); }
.dash-schema .dash-schema__table { color: var(--accent-text); }
.dash-preview { height: 230px; padding: 8px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }

/* document totals (sales forms) */
.doc-totals { display: flex; flex-direction: column; gap: 6px; min-width: 330px; font-size: 13.5px; }
.doc-totals > div { display: grid; grid-template-columns: minmax(0, 1fr) 230px; align-items: center; gap: 12px; min-height: 32px; color: var(--muted); }
.doc-totals > div > :nth-child(2) { justify-self: end; color: var(--ink); text-align: right; white-space: nowrap; }
.doc-totals > div > div { display: flex; align-items: center; justify-content: flex-end; gap: 8px; width: 100%; }
.doc-totals > div > input:not([type=hidden]), .doc-totals > div > select { width: 100%; }
.doc-totals > div > div > input:not([type=hidden]), .doc-totals > div > div > div { flex: 1 1 0; min-width: 0; width: auto; }
.doc-totals input:not([type=hidden]), .doc-totals select { height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-btn); background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 13.5px; text-align: right; }
.doc-totals input[type=text] { text-align: left; }
.doc-totals > div > div > span { min-width: 72px; text-align: right; font-weight: 600; white-space: nowrap; }
.doc-totals > div:last-child > :nth-child(2) { color: var(--accent-text); }
.doc-totals > div:last-child { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line-2); color: var(--ink); font-size: 15px; font-weight: 700; }

/* relationship map */
.relmap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 12, 12, .45); backdrop-filter: blur(2px); user-select: none; }
.relmap__window { display: flex; flex-direction: column; width: 100%; max-width: 1180px; height: 85vh; overflow: hidden; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, .25); }
.relmap__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.relmap__title { display: flex; align-items: center; gap: 12px; }
.relmap__title svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.relmap__title h2 { color: var(--ink); font-size: 16px; font-weight: 600; }
.relmap__title p { color: var(--muted); font-size: 13px; }
.relmap__tools, .relmap__zoom { display: flex; align-items: center; gap: 6px; }
.relmap__zoom span { min-width: 44px; color: var(--muted); font-size: 12.5px; text-align: center; font-variant-numeric: tabular-nums; }
.relmap__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 18px; background: var(--card-2); color: var(--muted); font-size: 12.5px; }
.relmap__stats, .relmap__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.relmap__stats b { margin-left: 4px; color: var(--ink); font-weight: 600; }
.relmap__key { display: inline-block; width: 16px; margin-right: 6px; vertical-align: middle; border-top: 2px solid var(--accent); }
.relmap__key--journal { border-top: 2px dashed var(--chart-3); }
.relmap__canvas { position: relative; flex: 1; overflow: auto; padding: 16px; background-color: var(--card-2); background-image: radial-gradient(var(--line-2) 1px, transparent 1px); background-size: 18px 18px; }
.relmap__stage { position: relative; min-width: 1500px; min-height: 650px; }
.relmap__lines { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; min-width: 1500px; min-height: 650px; pointer-events: none; }
.relmap__arrow { fill: var(--accent); }
.relmap__arrow--journal { fill: var(--chart-3); }
.relmap-node { position: absolute; z-index: 1; width: 170px; overflow: hidden; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); cursor: grab; }
.relmap-node:active { cursor: grabbing; }
.relmap-node--bp { width: 150px; }
.relmap-node__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px 0; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.relmap-node__head > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relmap-node__tag { flex-shrink: 0; padding: 1px 7px; border-radius: 999px; background: var(--card-3); color: var(--ink-2); font-size: 10.5px; }
.relmap-node__body { display: flex; flex-direction: column; gap: 3px; padding: 4px 10px 10px; }
.relmap-node__num { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
a.relmap-node__num:hover { color: var(--accent-text); text-decoration: underline; }
.relmap-node__sub { overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.relmap-node__ref { overflow: hidden; padding: 2px 7px; border-radius: 6px; background: var(--card-2); color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.relmap-node__ref b { color: var(--ink-2); font-weight: 600; }
.relmap-node__amount { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.relmap-node__amount small { color: var(--muted); font-size: 10.5px; font-weight: 500; }
.relmap-node__foot { padding: 3px 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; text-align: center; }
.relmap-node.is-current { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px var(--accent-soft), var(--shadow); }
.relmap-node.is-journal { box-shadow: inset 0 0 0 1px var(--chart-3), var(--shadow); }
.relmap-node.is-journal .relmap-node__head { color: var(--chart-3); }
.relmap-node.is-draft { box-shadow: none; outline: 2px dashed var(--accent); outline-offset: -2px; }
.relmap-node.is-draft .relmap-node__foot { background: var(--card-3); color: var(--ink-2); }
.relmap-node.is-cancelled { opacity: .6; }
.relmap-node.is-cancelled .relmap-node__num { text-decoration: line-through; }
.relmap-node.is-cancelled .relmap-node__tag { background: #fbe4e2; color: #9f2a21; }

/* headings */
main h1 { font-size: 28px !important; font-weight: 600 !important; letter-spacing: -.01em; line-height: 1.15; }
main .uppercase { text-transform: none; letter-spacing: 0; }
main .tracking-wider, main .tracking-wide, main .tracking-tight { letter-spacing: 0; }
main .text-\[10px\] { font-size: 12px; }
main .text-\[11px\] { font-size: 12.5px; }
main .text-xs { font-size: 13px; }
main .font-mono { font-variant-numeric: tabular-nums; }
main span.text-blue-700.bg-blue-50.tracking-wider { display: none; }

/* controls */
main input:not([type=checkbox], [type=radio], [type=hidden], [type=file]), main select, main textarea { border-radius: var(--r-btn); }
main input.h-8, main select.h-8 { height: 36px; }
main td input.h-8, main td select.h-8 { height: 32px; }
main a.rounded-md, main button.rounded-md, main a.rounded, main button.rounded, main a.rounded-lg, main button.rounded-lg { border-radius: var(--r-btn); }
html:not(.dark) main input:not([type=checkbox], [type=radio]):not(.bg-zinc-100, .bg-zinc-50), html:not(.dark) main select, html:not(.dark) main textarea { background-color: var(--card); }
html:not(.dark) main :is(input, select, textarea) { border-color: var(--line-2); }
main input:focus, main select:focus, main textarea:focus { outline: none !important; border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; }

/* surfaces */
html:not(.dark) .bg-zinc-100 { background-color: var(--card-3); }
html:not(.dark) body.bg-zinc-100, html:not(.dark) .h-screen.bg-zinc-100 { background-color: var(--bg); }
html:not(.dark) .bg-zinc-50 { background-color: var(--card-2); }
html:not(.dark) .flex-1.bg-zinc-50 { background-color: var(--bg); }
html:not(.dark) .bg-white { background-color: var(--card); }
html:not(.dark) .bg-zinc-200 { background-color: var(--card-3); }
html:not(.dark) .hover\:bg-zinc-50:hover, html:not(.dark) .hover\:bg-zinc-100:hover { background-color: var(--card-3); }

/* lines */
html:not(.dark) .border-zinc-100, html:not(.dark) .border-zinc-200,
html:not(.dark) .divide-zinc-100 > * + *, html:not(.dark) .divide-zinc-200 > * + * { border-color: var(--line); }
html:not(.dark) .border-zinc-300 { border-color: var(--line-2); }

/* text */
html:not(.dark) .text-zinc-900 { color: var(--ink); }
html:not(.dark) .text-zinc-700, html:not(.dark) .text-zinc-800 { color: var(--ink-2); }
html:not(.dark) main .text-zinc-500, html:not(.dark) main .text-zinc-600 { color: var(--muted); }
html:not(.dark) main a:is(.text-blue-500, .text-blue-600, .text-blue-700), html:not(.dark) main :is(.text-blue-500, .text-blue-600, .text-blue-700) a { color: var(--accent-text); }
html:not(.dark) main :is(td, th, button):is(.text-blue-500, .text-blue-600, .text-blue-700, .text-emerald-600, .text-rose-600) { color: var(--ink); }
html:not(.dark) main td:is(.text-blue-600, .text-rose-600) a { color: var(--accent-text); }

/* cards */
html:not(.dark) main :is(div, section, form, details).bg-white:is(.rounded, .rounded-md, .rounded-lg, .rounded-xl) {
  border-radius: var(--r-lg);
  border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
html:not(.dark) main > .bg-white.p-3 { padding: 14px; }
html:not(.dark) body > .bg-white.rounded-xl { border-radius: var(--r-lg); border-color: transparent; box-shadow: var(--shadow-lg); }
/* the dark strip on document forms becomes a quiet header */
html:not(.dark) main div:is(.bg-zinc-900, .bg-zinc-950, .bg-zinc-800) { background-color: var(--card-2); color: var(--ink); border-color: var(--line); }
html:not(.dark) main div:is(.bg-zinc-900, .bg-zinc-950, .bg-zinc-800) :is(span, div, b, strong, p):not([class*="bg-"]) { color: inherit; }

/* solid buttons all speak the accent; danger stays quiet */
html :is(a, button):is(.bg-zinc-900, .bg-zinc-800, .bg-blue-500, .bg-blue-600, .bg-blue-700, .bg-emerald-500, .bg-emerald-600, .bg-emerald-700, .bg-violet-500, .bg-violet-600, .bg-indigo-600, .bg-amber-500, .bg-amber-600, .bg-orange-500, .bg-orange-600, .bg-sky-600, .bg-teal-600) {
  background-color: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: var(--glow); font-weight: 600;
}
html :is(a, button):is(.bg-zinc-900, .bg-zinc-800, .bg-blue-500, .bg-blue-600, .bg-blue-700, .bg-emerald-500, .bg-emerald-600, .bg-emerald-700, .bg-violet-500, .bg-violet-600, .bg-indigo-600, .bg-amber-500, .bg-amber-600, .bg-orange-500, .bg-orange-600, .bg-sky-600, .bg-teal-600) * { color: inherit; }
html :is(a, button):is(.bg-zinc-900, .bg-zinc-800, .bg-blue-500, .bg-blue-600, .bg-blue-700, .bg-emerald-500, .bg-emerald-600, .bg-emerald-700, .bg-violet-500, .bg-violet-600, .bg-indigo-600, .bg-amber-500, .bg-amber-600, .bg-orange-500, .bg-orange-600, .bg-sky-600, .bg-teal-600):hover { background-color: var(--accent-hi); }
html:not(.dark) :is(a, button):is(.bg-rose-500, .bg-rose-600, .bg-red-500, .bg-red-600) { background-color: var(--bad-soft); color: var(--bad); border-color: transparent; font-weight: 600; }
html:not(.dark) main :is(a, button).bg-white { box-shadow: var(--ring); border-color: transparent; }

/* soft badges and notes */
html:not(.dark) span:is(.bg-emerald-50, .bg-emerald-100, .bg-green-50, .bg-green-100) { background-color: var(--good-soft); color: var(--good); border-color: transparent; border-radius: 999px; }
html:not(.dark) span:is(.bg-amber-50, .bg-amber-100, .bg-yellow-50, .bg-yellow-100, .bg-orange-50, .bg-orange-100) { background-color: var(--warn-soft); color: var(--warn); border-color: transparent; border-radius: 999px; }
html:not(.dark) span:is(.bg-rose-50, .bg-rose-100, .bg-red-50, .bg-red-100) { background-color: var(--bad-soft); color: var(--bad); border-color: transparent; border-radius: 999px; }
html:not(.dark) span:is(.bg-blue-50, .bg-blue-100, .bg-sky-50, .bg-sky-100, .bg-indigo-50, .bg-violet-50, .bg-violet-100) { background-color: var(--info-soft); color: var(--info); border-color: transparent; border-radius: 999px; }
html:not(.dark) main span.bg-zinc-100 { background-color: var(--card-3); border-color: transparent; border-radius: 999px; }
html:not(.dark) main div:is(.bg-emerald-50, .bg-rose-50, .bg-blue-50, .bg-amber-50, .bg-violet-50, .bg-sky-50, .bg-red-50, .bg-orange-50) { border-color: transparent; border-radius: var(--r-md); }
html:not(.dark) main div.bg-blue-50, html:not(.dark) main div.bg-sky-50 { background-color: var(--tile-3); }
html:not(.dark) main div.bg-amber-50, html:not(.dark) main div.bg-orange-50 { background-color: var(--tile-1); }
html:not(.dark) main div.bg-emerald-50 { background-color: var(--tile-4); }
html:not(.dark) main div.bg-violet-50 { background-color: var(--tile-2); }
html:not(.dark) :is(.border-blue-500, .border-blue-600, .border-zinc-900) { border-color: var(--accent); }

/* tables read as quiet rows */
html:not(.dark) main thead, html:not(.dark) main thead th { background-color: transparent; color: var(--muted); }
main thead th { font-weight: 500; }
main table:not(.lg-table) td { padding-top: 10px; padding-bottom: 10px; }
html:not(.dark) main tbody tr:hover { background-color: var(--card-2); }

/* document line grid and its column chooser */
.lg-table, .lg-table thead, .lg-table tbody { display: block; }
[data-line-grid] { overflow-x: auto; }
.lg-table { width: 100%; }
.lg-row { display: grid; align-items: center; column-gap: 0; }
/* the grid tracks size the cells: width classes written for the old table layout must not shrink a header */
.lg-table th, .lg-table td { width: auto !important; min-width: 0 !important; max-width: none !important; }
.lg-has-detail td[data-pin="start"] { cursor: pointer; }
.lg-has-detail td[data-pin="start"]::after { content: "\203A"; margin-left: 4px; color: #a1a1aa; display: inline-block; transition: transform .1s; }
.lg-has-detail .lg-open > td[data-pin="start"]::after { transform: rotate(90deg); }
.lg-open > td.lg-detail-cell, .lg-open { background: rgba(244, 244, 245, .6); }
.lg-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 4px; background: var(--card); font-size: 12px; }
.lg-item[draggable="true"] { cursor: grab; }
.lg-btns button { padding: 0 6px; border: 1px solid var(--line-2); border-radius: 4px; margin-left: 2px; }
.lg-btns button:disabled { opacity: .3; }
dialog[id^="lg-dialog-"]::backdrop { background: rgba(9, 9, 11, .5); }

/* sign-in / sign-up: two cream forms side by side; a night panel with a slanted gold edge covers the one not in use
   and sweeps across the card when the state switches (.auth__card--signup) */
.auth { --night: #0d2a22; --night-2: #12382d; --night-ink: #e9efe9; --cream: #fbf7ef; --cream-2: #efe6d6; --auth-ink: #10231d; --auth-muted: #5a6b64;
  min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, #173d31, #07110e 60%); font-family: Urbanist, ui-sans-serif, system-ui, sans-serif; }
.auth__card { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(960px, 100%); min-height: 520px; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, var(--cream), var(--cream-2)); box-shadow: 0 40px 90px -30px #000000cc, 0 0 0 1px #ffffff10; }
.auth__form { position: relative; z-index: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 56px 48px; color: var(--auth-ink); }
.auth__brand { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-text); }
.auth__brand::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.auth__title { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.auth__title::after { content: ""; display: block; width: 40px; height: 2px; margin-top: 12px; background: var(--accent); border-radius: 2px; }
.auth__error { padding: 10px 12px; border-radius: 10px; background: #a8201514; color: #a82015; font-size: 13px; font-weight: 500; box-shadow: inset 0 0 0 1px #a8201533; }
.auth__field { position: relative; }
.auth__field input { width: 100%; height: 46px; padding: 16px 32px 4px 0; border: 0; border-bottom: 1.5px solid #10231d33; background: transparent; color: var(--auth-ink); font-size: 15px; outline: none; transition: border-color .2s; }
.auth__field input:focus { border-bottom-color: var(--night); }
.auth__field label { position: absolute; left: 0; top: 14px; color: var(--auth-muted); font-size: 15px; pointer-events: none; transition: top .18s, font-size .18s, color .18s; }
.auth__field input:focus + label, .auth__field input:not(:placeholder-shown) + label { top: -2px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--night); }
.auth__field::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--accent); transition: width .3s; }
.auth__field:focus-within::after { width: 100%; }
.auth__icon { position: absolute; right: 0; top: 14px; width: 20px; height: 20px; color: var(--auth-muted); background: none; border: 0; padding: 0; }
button.auth__icon { cursor: pointer; }
button.auth__icon:hover { color: var(--auth-ink); }
.auth__icon svg { width: 18px; height: 18px; }
.auth__hint { margin-top: 6px; font-size: 11.5px; color: var(--accent-text); }
.auth__submit { height: 50px; border: 0; border-radius: 999px; background: linear-gradient(180deg, var(--night-2), var(--night)); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 14px 28px -14px #0d2a22, inset 0 1px 0 #ffffff1f; transition: transform .15s, box-shadow .2s; }
.auth__submit:hover { transform: translateY(-1px); box-shadow: 0 18px 32px -14px #0d2a22, inset 0 1px 0 #ffffff1f; }
.auth__submit:active { transform: translateY(0); }
.auth__demo { font-size: 12px; color: var(--auth-muted); }
.auth__demo b { font-family: ui-monospace, monospace; color: var(--auth-ink); }
.auth__form--signin { grid-column: 1; }
.auth__form--signup { grid-column: 2; }
.auth__switch { font-size: 13px; color: var(--auth-muted); }
.auth__switch button { padding: 0 0 1px; border: 0; background: none; color: var(--auth-ink); font-weight: 600; cursor: pointer; box-shadow: inset 0 -1.5px 0 var(--accent); }
.auth__switch button:hover { color: var(--accent-text); }
.auth__notice { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 500; }
.auth__panel { position: absolute; z-index: 2; top: 0; bottom: 0; left: 46%; width: 54%; padding: 56px 48px 56px 120px; color: var(--night-ink);
  background: radial-gradient(500px 300px at 80% 0%, #1d4a3c, transparent 70%), linear-gradient(160deg, var(--night-2), var(--night));
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%); animation: auth-blade .9s cubic-bezier(.2, .8, .2, 1) both;
  transition: left .8s cubic-bezier(.7, 0, .2, 1), clip-path .8s cubic-bezier(.7, 0, .2, 1), padding .8s cubic-bezier(.7, 0, .2, 1); }
.auth__panel::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom right, transparent calc(50% - 1px), var(--accent) 50%, transparent calc(50% + 1px)) 0 0 / 15% 100% no-repeat; opacity: .9; transition: background-position .8s cubic-bezier(.7, 0, .2, 1); }
.auth__card--signup .auth__panel { left: 0; padding: 56px 120px 56px 48px; clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%); animation: none; }
.auth__card--signup .auth__panel::before { background-position: 100% 0; }
.auth__side { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: inherit; transition: opacity .35s .3s; }
.auth__side--signup, .auth__card--signup .auth__side--signin { opacity: 0; transition-delay: 0s; pointer-events: none; }
.auth__card--signup .auth__side--signup { opacity: 1; transition-delay: .4s; pointer-events: auto; }
.auth__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); }
.auth__welcome { font-family: "Instrument Serif", Georgia, serif; font-size: 52px; font-weight: 400; line-height: 1; letter-spacing: -.01em; }
.auth__welcome em { display: block; color: var(--accent); }
.auth__lead { max-width: 300px; font-size: 14.5px; line-height: 1.6; color: #e9efe9b8; }
.auth__modules { display: flex; flex-wrap: wrap; gap: 6px; max-width: 320px; }
.auth__modules span { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; color: #e9efe9cc; box-shadow: inset 0 0 0 1px #e9efe92e; }
@keyframes auth-blade { from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 85% 100%); } }
@media (prefers-reduced-motion: reduce) { .auth__panel, .auth__panel::before, .auth__side { animation: none; transition: none; } }
@media (max-width: 760px) {
  .auth { padding: 16px; align-items: start; }
  .auth__card { grid-template-columns: 1fr; min-height: 0; }
  .auth__panel, .auth__card--signup .auth__panel { position: relative; left: 0; width: auto; grid-row: 1; grid-column: 1; min-height: 210px; padding: 32px 24px 44px; clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%); animation: none; }
  .auth__panel::before { display: none; }
  .auth__welcome { font-size: 40px; }
  .auth__modules { display: none; }
  .auth__side { padding: 32px 24px 44px; }
  .auth__form { padding: 28px 24px 36px; grid-row: 2; grid-column: 1; }
  .auth__card:not(.auth__card--signup) .auth__form--signup, .auth__card--signup .auth__form--signin { display: none; }
}

/* Superbys: licence notice under the top bar, and the gateway's own pages (sign-up, billing, team) */
.plan-banner { flex-shrink: 0; margin: 0 26px 8px; padding: 8px 14px; border-radius: var(--r-btn); background: #fef3c7; color: #78350f; font-size: 13px; }
.dark .plan-banner { background: rgba(120, 53, 15, .35); color: #fde68a; }
.plan-banner a { margin-left: 8px; font-weight: 600; text-decoration: underline; }
.pf-input { height: 38px; padding: 0 10px; border-radius: var(--r-btn); background: transparent; color: var(--ink); box-shadow: var(--ring); font-size: 13.5px; }
.ob-status { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r-card, 12px); box-shadow: var(--ring); background: var(--card, #fff); font-size: 13.5px; }
.ob-status b { font-size: 15px; }
.ob-status--ok { background: #ecfdf5; box-shadow: inset 0 0 0 1px #a7f3d0; color: #065f46; }
.ob-status--warn { background: #fffbeb; box-shadow: inset 0 0 0 1px #fde68a; color: #78350f; }
.ob-status--bad { background: #fef2f2; box-shadow: inset 0 0 0 1px #fecaca; color: #7f1d1d; }
.ob-verdict__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.ob-verdict__head h2 { font-size: 18px; font-weight: 600; }
.ob-verdict__head p { font-size: 13px; color: var(--muted); }
.ob-verdict__badge { flex: none; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; font-size: 20px; font-weight: 700; color: #fff; }
.ob-verdict--recommended .ob-verdict__badge { background: #16a34a; }
.ob-verdict--notes .ob-verdict__badge { background: #d97706; }
.ob-verdict--not_ready .ob-verdict__badge { background: #dc2626; }
.ob-checks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ob-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; padding: 7px 10px; border-radius: var(--r-btn); }
.ob-check b { display: block; }
.ob-check small { color: var(--muted); font-size: 12.5px; }
.ob-check__mark { flex: none; width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; margin-top: 1px; }
.ob-check--ok .ob-check__mark { background: #16a34a; }
.ob-check--info .ob-check__mark { background: #64748b; }
.ob-check--warn { background: #fffbeb; }
.ob-check--warn .ob-check__mark { background: #d97706; }
.ob-check--block { background: #fef2f2; }
.ob-check--block .ob-check__mark { background: #dc2626; }
.dark .ob-check--warn { background: #3a2a05; }
.dark .ob-check--block { background: #3b0d0d; }
.ob-control { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; padding-top: 12px; border-top: 1px solid var(--line); }
.ob-bs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.ob-bs__col h3 { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.ob-bs__col h3 span { font-weight: 400; color: var(--muted); }
.ob-bs__line, .ob-bs__total { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 3px 0; }
.ob-bs__line b, .ob-bs__total b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ob-bs__total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; font-weight: 600; }
.ob-eq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; padding: 10px 12px; border-radius: var(--r-btn); font-size: 13px; }
.ob-eq b { font-variant-numeric: tabular-nums; }
.ob-eq.is-ok { background: #ecfdf5; color: #065f46; }
.ob-eq.is-off { background: #fffbeb; color: #78350f; }
.ob-eq__ok { font-weight: 600; }
.ob-step--ok { background: #16a34a; color: #fff; }
.ob-step--bad { background: #dc2626; color: #fff; }
.ob-count { font-size: 13px; font-weight: 600; color: #b91c1c; }
.ob-rows { max-height: 480px; overflow-y: auto; }
.ob-row--bad td { background: #fef2f2; }
.ob-why { color: #b91c1c; font-size: 12.5px; }
.ob-fine { color: #15803d; font-size: 12.5px; }
.dark .ob-status--ok, .dark .ob-eq.is-ok { background: #052e1c; color: #a7f3d0; box-shadow: none; }
.dark .ob-status--warn, .dark .ob-eq.is-off { background: #3a2a05; color: #fde68a; box-shadow: none; }
.dark .ob-status--bad, .dark .ob-row--bad td { background: #3b0d0d; color: #fecaca; box-shadow: none; }
.ppn-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ppn-sum__tile { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ppn-sum__tile span { font-size: 12px; color: var(--muted); }
.ppn-sum__tile b { font-size: 22px; font-variant-numeric: tabular-nums; }
.ppn-sum__tile small { font-size: 11.5px; color: var(--muted); }
.ppn-sum__tile.is-due b { color: var(--danger, #b91c1c); }
.onb { padding: 16px 18px; }
.onb__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.onb__head h2 { font-size: 15px; font-weight: 600; }
.onb__head p { font-size: 12.5px; color: var(--muted); }
.onb__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.onb__step { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-btn); box-shadow: var(--ring); }
.onb__step.is-done { opacity: .6; }
.onb__mark { flex: none; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 600; box-shadow: var(--ring); }
.onb__step.is-done .onb__mark { background: var(--ok, #16a34a); color: #fff; box-shadow: none; }
.onb__text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.onb__text small { color: var(--muted); font-size: 11.5px; }
.staff-access { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.staff-access__item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.staff-row { flex-wrap: wrap; gap: 10px; }
.staff-row__form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; flex: 1 1 420px; justify-content: flex-end; }
.pf-otp { height: 48px; max-width: 220px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 24px; letter-spacing: .4em; text-align: center; }
.pf-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pf-label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pf-hint { font-size: 12px; opacity: .7; }
.pf-ok { padding: 12px; border-radius: var(--r-btn); background: #ecfdf5; color: #065f46; font-size: 13.5px; }
.pf-err { padding: 12px; border-radius: var(--r-btn); background: #fff1f2; color: #9f1239; font-size: 13.5px; }
.dark .pf-ok { background: rgba(6, 95, 70, .35); color: #a7f3d0; }
.dark .pf-err { background: rgba(159, 18, 57, .35); color: #fecdd3; }
.pf-table { width: 100%; text-align: left; font-size: 13px; }
.pf-table th { padding: 8px 10px; font-size: 11px; text-transform: uppercase; opacity: .7; }
.pf-table td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.auth__terms { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 6px; font-size: 12.5px; text-align: left; }

/* Superbys gateway: page parts on the ERP's tokens */
.pf-public { background: var(--bg); }
.pf-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 700; }
.pf-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 4px; }
.pf-head h1 { color: var(--ink); font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.pf-head p { margin-top: 4px; color: var(--muted); font-size: 14px; max-width: 640px; }
.pf-eyebrow { color: var(--accent-text); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.pf-section { padding: 20px 22px; }
.pf-section__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.pf-section__head h2 { color: var(--ink); font-size: 15px; font-weight: 600; }
.pf-section__head p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.pf-step { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.pf-label > span:first-child { color: var(--ink); font-weight: 500; }
.pf-label .pf-hint { font-weight: 400; }
.pf-textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.pf-choice { position: relative; display: flex; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--card); box-shadow: var(--ring); cursor: pointer; transition: box-shadow .15s, background .15s; }
.pf-choice:hover { background: var(--card-2); }
.pf-choice:has(input:checked) { box-shadow: 0 0 0 2px var(--accent); background: var(--card-2); }
.pf-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pf-choice__icon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r-md); background: var(--card-3); color: var(--ink); }
.pf-choice:has(input:checked) .pf-choice__icon { background: var(--accent); color: var(--accent-ink); }
.pf-choice__icon svg { width: 20px; height: 20px; }
.pf-choice b { display: block; color: var(--ink); font-weight: 600; }
.pf-choice small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.pf-choice__price { margin-top: 6px; color: var(--ink); font-size: 18px; font-weight: 600; }
.pf-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--card-3); color: var(--ink-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pf-badge--ok { background: #d1fae5; color: #065f46; }
.pf-badge--warn { background: #fef3c7; color: #92400e; }
.pf-badge--bad { background: #ffe4e6; color: #9f1239; }
.pf-badge--info { background: #e0e7ff; color: #3730a3; }
.dark .pf-badge--ok { background: rgba(6, 95, 70, .4); color: #a7f3d0; }
.dark .pf-badge--warn { background: rgba(146, 64, 14, .4); color: #fde68a; }
.dark .pf-badge--bad { background: rgba(159, 18, 57, .4); color: #fecdd3; }
.dark .pf-badge--info { background: rgba(55, 48, 163, .4); color: #c7d2fe; }
.pf-ws { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.pf-ws__top { display: flex; align-items: center; gap: 12px; }
.pf-ws__logo { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r-md); background: var(--tile-2); color: var(--tile-ink); font-size: 17px; font-weight: 700; }
.pf-ws__name { color: var(--ink); font-size: 15px; font-weight: 600; }
.pf-ws__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-ws__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.pf-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; border-radius: var(--r-lg); border: 1.5px dashed var(--line); color: var(--muted); font-weight: 500; transition: border-color .15s, color .15s; }
.pf-add:hover { border-color: var(--accent); color: var(--ink); }
.pf-add svg { width: 26px; height: 26px; }
.pf-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.pf-kv dt { color: var(--muted); font-size: 12px; }
.pf-kv dd { margin-top: 2px; color: var(--ink); font-size: 15px; font-weight: 600; }
.pf-meter { height: 6px; border-radius: 999px; background: var(--card-3); overflow: hidden; }
.pf-meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pf-empty { padding: 28px; color: var(--muted); text-align: center; }
.pf-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pf-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-btn); background: var(--card-2); box-shadow: var(--ring); }
.pf-tabs a { padding: 5px 12px; border-radius: calc(var(--r-btn) - 2px); color: var(--muted); font-size: 13px; font-weight: 500; }
.pf-tabs a.is-active { background: var(--card); color: var(--ink); box-shadow: var(--ring); }
.pf-table tbody tr:hover { background: var(--card-2); }
.pf-table td.num, .pf-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pf-file { display: flex; flex: 1; min-width: 240px; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); border: 1.5px dashed var(--line); color: var(--muted); font-size: 12.5px; cursor: pointer; transition: border-color .15s; }
.pf-file:hover, .pf-file:focus-within { border-color: var(--accent); }
.pf-file input { min-width: 0; color: var(--ink); font-size: 12.5px; }
.pf-file input::file-selector-button { margin-right: 10px; height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-btn); background: var(--card-3); color: var(--ink); font-weight: 600; cursor: pointer; }
.pf-cols { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-group { margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
/* Superbys public site: landing, pricing, legal */
.site { min-height: 100%; background: var(--bg); color: var(--ink); }
.site-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .site-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a.site-link { padding: 8px 12px; border-radius: var(--r-btn); color: var(--muted); font-size: 14px; font-weight: 500; }
.site-nav a.site-link:hover, .site-nav a.site-link.is-active { color: var(--ink); background: var(--card-2); }
.site-hero { padding: 72px 0 56px; text-align: center; }
.site-hero h1 { max-width: 820px; margin: 14px auto 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
.site-lead { max-width: 640px; margin: 18px auto 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.site-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.site-cta .btn { height: 46px; padding: 0 20px; font-size: 15px; }
.site-note { margin-top: 12px; color: var(--muted); font-size: 13px; }
.site-section { padding: 56px 0; }
.site-section--alt { background: var(--card-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.site-section h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.01em; }
.site-section .site-sub { margin-top: 8px; max-width: 640px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.site-card { padding: 22px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.site-card h3 { margin-top: 14px; font-size: 16px; font-weight: 600; }
.site-card p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.site-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); }
.site-icon svg { width: 20px; height: 20px; }
.site-plans { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.site-plan { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.site-plan--hl { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.site-plan h3 { font-size: 18px; font-weight: 700; }
.site-plan p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.site-price { font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.site-price small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.site-plan ul { display: grid; gap: 8px; font-size: 13.5px; }
.site-plan li { display: flex; gap: 8px; }
.site-plan li::before { content: "✓"; color: var(--accent-text); font-weight: 700; }
.site-plan .btn { justify-content: center; margin-top: auto; }
.site-band { padding: 48px 28px; border-radius: var(--r-lg); background: var(--accent); color: var(--accent-ink); text-align: center; }
.site-band h2 { color: inherit; }
.site-band .btn { margin-top: 20px; background: var(--card); color: var(--ink); }
.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer .site-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a:hover { color: var(--ink); }
.site-legal { max-width: 760px; margin: 0 auto; padding: 48px 0 64px; font-size: 15px; line-height: 1.7; }
.site-legal h1 { font-size: 32px; font-weight: 700; letter-spacing: -.01em; }
.site-legal h2 { margin-top: 32px; font-size: 18px; font-weight: 600; }
.site-legal p, .site-legal ul { margin-top: 10px; color: var(--ink-2); }
.site-legal ul { padding-left: 20px; list-style: disc; }
.site-legal li { margin-top: 4px; }
.site-legal a { color: var(--accent-text); text-decoration: underline; }
.site-faq { display: grid; gap: 10px; margin-top: 24px; }
.site-faq details { padding: 16px 18px; border-radius: var(--r-md); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.site-faq summary { cursor: pointer; font-weight: 600; }
.site-faq details p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 640px) { .site-nav a.site-link:not(.site-keep) { display: none; } .site-hero { padding: 48px 0 40px; } }
.pf-details > summary { list-style: none; cursor: pointer; }
.pf-details > summary::-webkit-details-marker { display: none; }
