/* RunIt QBO Connector — design system (copied from RunIt Physical Inventory, 2026-12-04)
   RunIt palette (orange accent, ink neutrals, mono eyebrows) from the platform theme,
   rebuilt mobile-first: sidebar >= 1024px, bottom tab bar below. Light + dark. */

:root {
  --accent: #d98324; --accent-ink: #a85c0c; --accent-rgb: 217,131,36;
  --bg: #f4f4f2; --surface: #ffffff; --surface-2: #f8f8f6; --surface-3: #efefec;
  --ink: #15171a; --ink-2: #3a3f46; --muted: #6b7280; --faint: #9aa0a8;
  --line: rgba(20,22,26,.08); --line-strong: rgba(20,22,26,.16);
  --good: #0f8a6c; --good-bg: #e3f5ee; --bad: #d1432f; --bad-bg: #fde9e5;
  --warn: #b7791f; --warn-bg: #fdf3dc; --info: #2f6fd1; --info-bg: #e7effc;
  --shadow-sm: 0 1px 2px rgba(16,18,22,.05);
  --shadow: 0 1px 2px rgba(16,18,22,.04), 0 8px 24px -12px rgba(16,18,22,.12);
  --shadow-lg: 0 24px 60px -20px rgba(16,18,22,.35);
  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --font: "Geist", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Geist Mono", "Cascadia Code", ui-monospace, "SF Mono", Consolas, monospace;
  --side: 248px; --tabbar: 68px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f12; --surface: #15181c; --surface-2: #1a1e23; --surface-3: #22272d;
    --ink: #eef0f2; --ink-2: #c9cdd3; --muted: #8f97a1; --faint: #646c76;
    --line: rgba(255,255,255,.07); --line-strong: rgba(255,255,255,.14);
    --accent-ink: #f0a54e;
    --good: #3ccf9f; --good-bg: rgba(60,207,159,.12); --bad: #ff7a66; --bad-bg: rgba(255,122,102,.12);
    --warn: #f0b94e; --warn-bg: rgba(240,185,78,.12); --info: #7aa7ff; --info-bg: rgba(122,167,255,.12);
    --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f12; --surface: #15181c; --surface-2: #1a1e23; --surface-3: #22272d;
  --ink: #eef0f2; --ink-2: #c9cdd3; --muted: #8f97a1; --faint: #646c76;
  --line: rgba(255,255,255,.07); --line-strong: rgba(255,255,255,.14);
  --accent-ink: #f0a54e;
  --good: #3ccf9f; --good-bg: rgba(60,207,159,.12); --bad: #ff7a66; --bad-bg: rgba(255,122,102,.12);
  --warn: #f0b94e; --warn-bg: rgba(240,185,78,.12); --info: #7aa7ff; --info-bg: rgba(122,167,255,.12);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
svg[aria-hidden] { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }
.card-head svg, h1 svg, h2 svg, h3 svg { width: 20px; height: 20px; color: var(--accent-ink); }
.list .avatar svg { width: 18px; height: 18px; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px;
  line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { letter-spacing: -.022em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); font-weight: 650; }
h2 { font-size: 1.15rem; font-weight: 620; }
h3 { font-size: 1rem; font-weight: 600; }
.mono, code { font-family: var(--mono); font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .85rem; }
.xs { font-size: .75rem; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 600; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.stack { display: grid; gap: 16px; align-content: start; }
/* grid columns may shrink below their content (wide tables scroll inside their card) */
.stack, .stack-sm { grid-template-columns: minmax(0, 1fr); }
.grid.main-side > * { min-width: 0; }
.stack-sm { display: grid; gap: 8px; align-content: start; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.brandmark { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
.brandmark:hover { text-decoration: none; }
.logo { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #7a3600));
  box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), .7), inset 0 1px 0 rgba(255,255,255,.25); flex: none; }
.logo svg { width: 18px; height: 18px; }
.brandmark small { display: block; font-family: var(--mono); font-size: .58rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); font-weight: 500; }
.main { padding: 20px 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); max-width: 1240px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.page-head .eyebrow { margin-bottom: 6px; display: block; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
@media (max-width: 720px) {
  /* phones: title and description get the full width; the buttons go underneath */
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head > div:first-child { width: 100%; }
}

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-auto-flow: column;
  grid-auto-columns: 1fr; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid var(--line); }
.tabbar a { display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted);
  font-size: .68rem; font-weight: 550; letter-spacing: .01em; }
.tabbar a:hover { text-decoration: none; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--accent-ink); }
.tabbar a.scan-tab span.fab { width: 50px; height: 50px; border-radius: 17px; display: grid; place-items: center;
  margin-top: -18px; color: #fff; background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #7a3600));
  box-shadow: 0 10px 24px -8px rgba(var(--accent-rgb), .8), inset 0 1px 0 rgba(255,255,255,.3); }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--side) 1fr; }
  .side { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100dvh;
    padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface); }
  .side .brandmark { padding: 4px 8px 18px; }
  .side nav { display: grid; gap: 2px; }
  .side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px;
    color: var(--ink-2); font-weight: 520; font-size: .93rem; }
  .side nav a svg { width: 19px; height: 19px; color: var(--muted); }
  .side nav a:hover { background: var(--surface-2); text-decoration: none; }
  .side nav a.on { background: rgba(var(--accent-rgb), .11); color: var(--accent-ink); }
  .side nav a.on svg { color: var(--accent-ink); }
  .side .navlabel { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--faint); padding: 16px 11px 6px; }
  .side .me { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
  .topbar .brandmark, .topbar .mobile-only { display: none; }
  .tabbar { display: none; }
  .main { padding: 28px 36px 56px; }
}

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.card.flat { box-shadow: none; }
.card.pad-lg { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; align-content: start; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid.main-side { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .grid.main-side { grid-template-columns: minmax(0, 1fr) 360px; } }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

/* stat tiles */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.tile .k { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tile .v { font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); font-weight: 650; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .d { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.tile.accent { background: linear-gradient(150deg, rgba(var(--accent-rgb), .14), rgba(var(--accent-rgb), .03)); border-color: rgba(var(--accent-rgb), .25); }
.v.good { color: var(--good); } .v.bad { color: var(--bad); } .v.warn { color: var(--warn); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  font-size: .92rem; padding: 10px 16px; min-height: 42px; border-radius: 12px; border: 1px solid transparent;
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 16px -8px rgba(var(--accent-rgb), .9);
  transition: transform .12s ease, filter .15s ease, background .15s ease; }
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { background: var(--bad); box-shadow: none; }
.btn.good { background: var(--good); box-shadow: none; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: .84rem; border-radius: 10px; }
.btn.lg { min-height: 52px; padding: 12px 22px; font-size: 1rem; border-radius: 14px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-btn svg { width: 19px; height: 19px; }

.input, select.input, textarea.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 10px 12px; min-height: 44px; transition: border-color .15s, box-shadow .15s, background .15s; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .16); background: var(--surface); }
input[type=color].input { padding: 4px; height: 44px; }
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field .help, .helptext { font-size: .78rem; color: var(--muted); }
.field .errorlist, .errorlist { list-style: none; padding: 0; margin: 0; color: var(--bad); font-size: .8rem; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.checks label, .check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; font-weight: 500; font-size: .9rem; }
.checks ul { list-style: none; padding: 0; margin: 0; display: contents; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }

/* segmented choice cards (radio) */
.choice { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.choice label { position: relative; display: grid; gap: 4px; padding: 14px 14px 14px 46px; border-radius: 14px;
  border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.choice label input { position: absolute; left: 15px; top: 16px; }
.choice label b { font-weight: 620; }
.choice label span { font-size: .8rem; color: var(--muted); }
.choice label:has(input:checked) { border-color: var(--accent); background: rgba(var(--accent-rgb), .07); }

/* pills & badges */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem;
  font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.plain::before { display: none; }
.pill.setup { background: var(--surface-3); color: var(--muted); }
.pill.counting { background: var(--good-bg); color: var(--good); }
.pill.counting::before { animation: pulse 1.6s infinite; }
.pill.review { background: var(--warn-bg); color: var(--warn); }
.pill.finalized { background: var(--info-bg); color: var(--info); }
.pill.cancelled { background: var(--surface-3); color: var(--faint); }
.pill.good, .pill.match, .pill.passed, .pill.applied { background: var(--good-bg); color: var(--good); }
.pill.bad, .pill.short, .pill.unmatched { background: var(--bad-bg); color: var(--bad); }
.pill.over, .pill.warn, .pill.submitted, .pill.out_of_scope { background: var(--warn-bg); color: var(--warn); }
.pill.uncounted { background: rgba(var(--accent-rgb), .12); color: var(--accent-ink); }
.pill.open, .pill.counting-s { background: var(--info-bg); color: var(--info); }
.pill.kept { background: var(--surface-3); color: var(--muted); }
@keyframes pulse { 50% { opacity: .25; } }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font-size: .84rem; font-weight: 550;
  border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-family: var(--mono); font-size: .72rem; opacity: .7; }

.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 700;
  background: rgba(var(--accent-rgb), .15); color: var(--accent-ink); flex: none; }

/* progress */
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 65%, #ffcf7a)); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.ring { --p: 0; --size: 64px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* tables -> cards on mobile */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.t th { position: sticky; top: 0; text-align: left; font-family: var(--mono); font-size: .64rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 11px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover { background: var(--surface-2); }
table.t td.r, table.t th.r { text-align: right; }
@media (max-width: 720px) {
  table.t.stack-mobile thead { display: none; }
  table.t.stack-mobile, table.t.stack-mobile tbody, table.t.stack-mobile tr, table.t.stack-mobile td { display: block; width: 100%; }
  table.t.stack-mobile tr { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; align-items: start; }
  table.t.stack-mobile td[data-k] { overflow-wrap: anywhere; }
  table.t.stack-mobile td { padding: 0; border: 0; }
  table.t.stack-mobile td[data-k]::before { content: attr(data-k); display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); line-height: 1.3; }
  table.t.stack-mobile td.primary { grid-column: 1 / -1; }
  table.t.stack-mobile td.r { text-align: left; }
  table.t.stack-mobile td.hide-m { display: none; }
  table.t.stack-mobile td.m-only { display: block; }
  /* filters: chips get their own full-width (scrolling) line, search below */
  .filter-bar > .chips { flex: 1 1 100%; }
  .filter-bar > .row { flex: 1 1 100% !important; max-width: none !important; }
}
td.m-only, th.m-only { display: none; }
@media (max-width: 420px) { .hide-xs { display: none; } }
.more-rows { display: flex; justify-content: center; padding: 12px; }

/* list rows */
.list { display: grid; }
.list > a, .list > div.li { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: inherit; }
.list > a:last-child, .list > div.li:last-child { border-bottom: 0; }
.list > a:hover { text-decoration: none; background: var(--surface-2); border-radius: 12px; }
.chev { color: var(--faint); width: 18px; height: 18px; flex: none; }

/* messages / toasts */
.flash { display: grid; gap: 8px; margin-bottom: 16px; }
.flash div { padding: 12px 14px; border-radius: 12px; font-size: .9rem; font-weight: 500; border: 1px solid transparent; }
.flash .success { background: var(--good-bg); color: var(--good); }
.flash .error { background: var(--bad-bg); color: var(--bad); }
.flash .info, .flash .warning { background: var(--warn-bg); color: var(--warn); }
.notice { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--ink-2); font-size: .9rem; }
.notice.warn { background: var(--warn-bg); border: 0; color: var(--warn); }
.notice.bad { background: var(--bad-bg); border: 0; color: var(--bad); }
[hidden] { display: none !important; }  /* layout classes (.stack, .row...) must not override hidden */
.app-foot { margin: 32px 0 8px; text-align: center; font-size: .72rem; color: var(--faint); }
@media print { .app-foot { margin-top: 16px; } }
.toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 1024px) { .toast-host { bottom: 24px; } }
.toast { pointer-events: auto; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 550; font-size: .9rem; box-shadow: var(--shadow-lg); animation: toast-in .25s cubic-bezier(.2,.9,.3,1.2); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* dialog / sheet */
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--ink); border-radius: var(--r-lg); width: min(520px, calc(100vw - 24px)); box-shadow: var(--shadow-lg); }
dialog.sheet::backdrop { background: rgba(8,10,12,.5); backdrop-filter: blur(4px); }
dialog.sheet .sheet-body { padding: 22px; display: grid; gap: 14px; }
dialog.sheet .sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.sheet[open] { animation: sheet-up .28s cubic-bezier(.2,.9,.3,1); }
  dialog.sheet .sheet-actions .btn { flex: 1; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
details.disclose summary { cursor: pointer; list-style: none; font-weight: 600; display: flex; align-items: center; gap: 8px; }
details.disclose summary::-webkit-details-marker { display: none; }
details.disclose summary::after { content: "+"; margin-left: auto; color: var(--muted); font-weight: 400; font-size: 1.2rem; }
details.disclose[open] summary::after { content: "–"; }

/* empty state */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 10px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* auth */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(var(--accent-rgb), .22), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(var(--accent-rgb), .12), transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); padding: 30px 26px; border-radius: 26px; }

/* view transitions (progressive) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } @view-transition { navigation: none; } }

.role-card { display: block; color: var(--ink); text-decoration: none; }
.role-card:hover { border-color: rgba(var(--accent-rgb), .45); }
.role-card, .role-card * { text-decoration: none !important; }
/* sortable grids (app.js PI.sortable) */
table.t th.sortable { cursor: pointer; user-select: none; }
table.t th.sortable:hover, table.t th.sortable:focus-visible { color: var(--ink); outline: none; }
table.t th.sortable::after { content: "↕"; margin-left: 5px; opacity: .3; font-size: .9em; }
table.t th[aria-sort="ascending"]::after { content: "↑"; opacity: 1; color: var(--accent-ink); }
table.t th[aria-sort="descending"]::after { content: "↓"; opacity: 1; color: var(--accent-ink); }
.sortbar { display: none; }
@media (max-width: 720px) {
  .sortbar { display: flex; justify-content: flex-end; margin: 0 0 8px; }
  .sortbar select { width: auto; max-width: 100%; font-size: .85rem; padding: 6px 10px; }
}

/* new-client setup checklist (_setup_card.html) */
.setup-card > summary { cursor: pointer; list-style: none; }
.setup-card > summary::-webkit-details-marker { display: none; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.setup-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.setup-steps li.next { border-color: var(--accent); background: rgba(var(--accent-rgb), .06); }
.setup-steps li.done { opacity: .7; }
.setup-steps .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.setup-steps li.done .tick { background: var(--good-bg); color: var(--good); }
.setup-steps li.next .tick { background: var(--accent); color: #fff; }
.setup-steps .tick svg { width: 15px; height: 15px; }
@media (max-width: 720px) { .setup-steps li { flex-wrap: wrap; } .setup-steps li .btn { margin-left: 38px; } }

/* ---------- QBO Connector additions ---------- */
.pill.new { background: var(--info-bg); color: var(--info); }
.pill.synced, .pill.in_qbo, .pill.linked, .pill.connected, .pill.done { background: var(--good-bg); color: var(--good); }
.pill.mismatch, .pill.suggested, .pill.running, .pill.queued, .pill.reset { background: var(--warn-bg); color: var(--warn); }
.pill.error, .pill.failed, .pill.missing, .pill.expired { background: var(--bad-bg); color: var(--bad); }
.pill.sandbox { background: rgba(var(--accent-rgb), .12); color: var(--accent-ink); }
.pill.production { background: var(--surface-3); color: var(--ink-2); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 12px; }
.actionbar { position: sticky; bottom: calc(var(--tabbar) + 10px + env(safe-area-inset-bottom)); z-index: 30; display: flex; flex-wrap: wrap;
  gap: 10px; align-items: center; padding: 10px 14px; margin-top: 12px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); }
@media (min-width: 1024px) { .actionbar { bottom: 16px; } }
.jobbox { display: flex; gap: 12px; align-items: center; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(var(--accent-rgb), .25); border-top-color: var(--accent);
  animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
pre.json { margin: 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  font-family: var(--mono); font-size: .78rem; overflow: auto; max-height: 420px; white-space: pre; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .9rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.qbo-btn { background: #2ca01c; box-shadow: 0 6px 16px -8px rgba(44,160,28,.8); }
