/* Quotewright console — auxiliary views (customers / gaps / settings).
   Self-contained: inherits Seam Studio tokens + .btn/.wrap/.kicker from styles.css,
   but declares its own chrome so it never depends on dashboard.css (owned elsewhere).
   Theme: white / ink / Inter / lime #D2FF37. */

[hidden] { display: none !important; }
body.qc { background: var(--bg); min-height: 100vh; color: var(--ink); }

/* ── top bar ─────────────────────────────────────────────────────────────── */
.qc-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 28px; border-bottom: 1px solid var(--hair);
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 20;
}
.qc-top .logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font); font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.qc-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); border: 1px solid var(--hair); border-radius: 100px; padding: 3px 9px; }
.qc-top-right { display: flex; align-items: center; gap: 14px; }
.qc-who { font-size: 13px; color: var(--soft); font-family: var(--mono); }

/* ── section sub-nav (to/from the console) ───────────────────────────────── */
.qc-subnav {
  display: flex; gap: 4px; padding: 10px 24px; border-bottom: 1px solid var(--hair);
  background: rgba(255,255,255,.85); position: sticky; top: 57px; z-index: 15;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow-x: auto;
}
.qc-subnav a {
  flex: none; font-family: var(--font); font-size: 13.5px; font-weight: 500;
  color: var(--soft); text-decoration: none; padding: 7px 14px; border-radius: 100px;
  border: 1px solid transparent; white-space: nowrap;
  transition: color .18s, background .18s, border-color .18s, transform .3s var(--spring);
}
.qc-subnav a:hover { color: var(--ink); background: var(--row); }
.qc-subnav a:active { transform: scale(.96); transition-duration: .08s; }
.qc-subnav a[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--lime); border-color: var(--lime); }
@media (prefers-reduced-motion: reduce) { .qc-subnav a { transition: none; } }

/* ── login (mirrors the console gate) ─────────────────────────────────────── */
.qc-login { display: grid; place-items: center; padding: 8vh 20px; }
.qc-login-card { width: 100%; max-width: 384px; background: #fff; border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 34px 32px; box-shadow: var(--shadow-md); transition: transform .5s var(--expo), box-shadow .5s var(--expo); }
.qc-login-card h1 { font-family: var(--font); font-weight: 600; font-size: 30px; margin: 6px 0 4px; color: var(--ink); letter-spacing: -.03em; }
.qc-login-card .sub { margin: 0 0 20px; }
.qc-login .field { margin-bottom: 14px; }
.qc-login label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.qc-login input { width: 100%; padding: 12px 13px; border: 1px solid var(--hair); border-radius: 12px; font: inherit; font-family: var(--font); background: var(--row); color: var(--ink); }
.qc-login input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(19,19,19,.08); }
.qc-login-card form { background: none; border: none; padding: 0; box-shadow: none; }
.qc-login .btn-primary { width: 100%; margin-top: 6px; justify-content: center; }
.qc-error { color: #b42318; font-size: 13px; margin-top: 12px; min-height: 1em; }

/* ── awaiting-activation screen ───────────────────────────────────────────────
   Shown INSTEAD of the data view when the signed-in user has no active tenant
   assignment (pending / suspended / not linked). Mirrors .qc-pending in
   dashboard.css so the state looks identical on every console page. */
.qc-pending { text-align: center; max-width: 440px; }
.qc-pending-ico { width: 54px; height: 54px; margin: 2px auto 16px; display: grid; place-items: center; border-radius: 16px; background: var(--lime-dim); color: #4e6a10; }
.qc-pending h1 { font-size: 25px; text-wrap: balance; }
.qc-pending .sub { max-width: 40ch; margin: 8px auto 12px; }
.qc-pending b { color: var(--ink); }
.qc-pending-note { font-size: 12.5px; color: var(--grey); margin: 0 auto 20px; max-width: 38ch; line-height: 1.5; }
.qc-pending-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── page shell ──────────────────────────────────────────────────────────── */
.qc-view { padding-top: 32px; padding-bottom: 88px; }
.qc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.qc-head .kicker { margin-bottom: 12px; }
.qc-h1 { font-family: var(--font); font-weight: 600; font-size: clamp(27px, 3.2vw, 38px); margin: 0; color: var(--ink); letter-spacing: -.04em; }
.qc-lede { font-size: 15px; color: var(--soft); line-height: 1.6; margin: 10px 0 0; max-width: 62ch; }

/* ── stat tiles ──────────────────────────────────────────────────────────── */
.qc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.qc-tile { background: #fff; border: 1px solid var(--hair); border-radius: var(--r-md); padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.03);
  transition: transform .32s var(--expo), box-shadow .32s var(--expo), border-color .32s; }
.qc-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.qc-tile .n { font-family: var(--font); font-weight: 600; font-size: 30px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.04em; }
.qc-tile .n.small { font-size: 18px; letter-spacing: -.02em; }
.qc-tile .l { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--grey); margin-top: 6px; font-family: var(--mono); }
.qc-tile .sub2 { font-size: 11.5px; color: var(--soft); margin-top: 3px; }
.qc-tile.accent { background: var(--lime); border-color: var(--lime); }
.qc-tile.accent:hover { box-shadow: 0 16px 36px -18px var(--lime-glow); border-color: var(--lime); }
.qc-tile.accent .l { color: rgba(0,0,0,.55); }
.qc-tile.accent .sub2 { color: rgba(0,0,0,.6); }
@media (prefers-reduced-motion: reduce) { .qc-tile { transition: none; } }

/* ── controls row ────────────────────────────────────────────────────────── */
.qc-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.qc-search, .qc-select { padding: 10px 13px; border: 1px solid var(--hair); border-radius: 10px; font: inherit; font-family: var(--font); font-size: 14px; background: var(--row); color: var(--ink); }
.qc-search:focus, .qc-select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(19,19,19,.06); }
.qc-search { flex: 1 1 220px; max-width: 340px; }
.qc-count { font-size: 13px; color: var(--soft); font-family: var(--mono); margin-left: auto; white-space: nowrap; }

/* ── table (customers list) ──────────────────────────────────────────────── */
.qc-tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--hair); border-radius: var(--r-md); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.qc-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 14px; }
.qc-table th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); padding: 13px 16px; border-bottom: 1px solid var(--hair); font-weight: 600; }
.qc-table th.num, .qc-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.qc-table td { padding: 13px 16px; border-bottom: 1px solid var(--hair); color: var(--ink); vertical-align: middle; }
.qc-table tbody tr:last-child td { border-bottom: 0; }
.qc-table tbody tr { cursor: pointer; transition: background .16s var(--ease); }
.qc-table tbody tr:hover { background: var(--row); }
.qc-cust-name { font-weight: 600; letter-spacing: -.01em; }
.qc-cust-sub { display: block; font-size: 11.5px; color: var(--soft); font-family: var(--mono); margin-top: 2px; }
.qc-num-strong { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.qc-chev { color: var(--grey); }

/* ── pills / badges ──────────────────────────────────────────────────────── */
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 100px; font-family: var(--mono); letter-spacing: .02em; }
.pill.repeat { background: var(--lime); color: #111; }
.pill.new { background: var(--row); color: var(--soft); }
.pill.open { background: var(--amber-bg); color: var(--amber); }
.pill.resolved { background: var(--ok-bg); color: #1f6d3a; }
.pill.ignored { background: var(--row); color: var(--grey); }
.qc-cur { display: inline-block; font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--soft); }
.qc-mut { color: var(--grey); }

/* ── customer detail drawer (native dialog → right sheet) ────────────────── */
dialog.qc-drawer { border: none; padding: 0; margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(460px, 100vw); background: #fff; box-shadow: -24px 0 60px -30px rgba(0,0,0,.4); color: var(--ink); overflow: hidden; }
dialog.qc-drawer::backdrop { background: rgba(19,19,19,.34); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
dialog.qc-drawer[open] { animation: qc-sheet-in .34s var(--expo) both; }
dialog.qc-drawer[open]::backdrop { animation: qc-fade-in .34s var(--ease) both; }
@keyframes qc-sheet-in { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes qc-fade-in { from { opacity: 0; } to { opacity: 1; } }
.qc-drawer-inner { display: flex; flex-direction: column; height: 100%; }
.qc-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 24px 18px; border-bottom: 1px solid var(--hair); }
.qc-drawer-head h2 { font-family: var(--font); font-weight: 600; font-size: 22px; letter-spacing: -.03em; margin: 0; color: var(--ink); }
.qc-drawer-head .qc-cust-sub { margin-top: 5px; }
.qc-drawer-close { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--hair); background: #fff; color: var(--soft); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.qc-drawer-close:hover { background: var(--row); color: var(--ink); border-color: var(--line-strong); }
.qc-drawer-body { padding: 20px 24px 32px; overflow-y: auto; flex: 1; }
.qc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.qc-fact { background: var(--row); border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; }
.qc-fact .k { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.qc-fact .v { font-family: var(--font); font-weight: 600; font-size: 19px; color: var(--ink); margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.qc-fact.wide { grid-column: 1 / -1; }
.qc-fact.wide .v { font-size: 15px; font-weight: 500; }
.qc-sec-title { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--grey); font-weight: 600; margin: 6px 0 10px; }
.qc-prefs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.qc-chipk { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--hair); border-radius: 100px; padding: 5px 11px; font-size: 12.5px; color: var(--ink); }
.qc-chipk b { font-weight: 600; }
.qc-chipk .k { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--grey); }
.qc-hist { list-style: none; margin: 0 0 8px; padding: 0; border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; }
.qc-hist li { padding: 11px 14px; border-bottom: 1px solid var(--hair); font-size: 13.5px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.qc-hist li:last-child { border-bottom: 0; }
.qc-hist .qc-hp { font-weight: 500; color: var(--ink); }
.qc-hist .qc-hd { font-family: var(--mono); font-size: 11px; color: var(--soft); white-space: nowrap; }
.qc-notes { font-size: 13.5px; line-height: 1.6; color: var(--ink); background: var(--row); border: 1px solid var(--hair); border-radius: 12px; padding: 13px 15px; white-space: pre-wrap; }

/* ── gaps list ───────────────────────────────────────────────────────────── */
.qc-gaps { display: flex; flex-direction: column; gap: 12px; }
.qc-gap { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--hair); border-radius: var(--r-md); padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: border-color .2s, box-shadow .2s, transform .32s var(--expo); }
.qc-gap:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.qc-gap.is-resolved, .qc-gap.is-ignored { opacity: .62; }
.qc-gap-count { display: grid; place-items: center; width: 62px; }
.qc-gap-count .cn { font-family: var(--font); font-weight: 600; font-size: 30px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.qc-gap-count .cl { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--grey); margin-top: 4px; }
.qc-gap-count .bar { width: 100%; height: 4px; border-radius: 3px; background: var(--lime); margin-top: 8px; transform-origin: left; }
.qc-gap-main { min-width: 0; }
.qc-gap-desc { font-family: var(--font); font-weight: 600; font-size: 15.5px; letter-spacing: -.02em; color: var(--ink); margin: 0 0 5px; }
.qc-gap-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 12px; color: var(--soft); }
.qc-gap-sig { font-family: var(--mono); font-size: 11px; color: var(--grey); background: var(--row); border: 1px solid var(--hair); border-radius: 6px; padding: 2px 7px; word-break: break-word; }
.qc-gap-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 132px; }
.qc-gap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-family: var(--font); font-size: 12.5px; font-weight: 600; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--hair); background: #fff; color: var(--ink); transition: transform .3s var(--spring), background .15s, border-color .15s, color .15s; }
.qc-gap-btn:hover { transform: translateY(-1px); }
.qc-gap-btn:active { transform: scale(.95); transition-duration: .08s; }
.qc-gap-btn.add { border-color: var(--lime-border); background: var(--lime-dim); }
.qc-gap-btn.add:hover { background: var(--lime); border-color: var(--lime); }
.qc-gap-btn.ignore:hover { border-color: var(--ink); }
.qc-gap-btn:disabled { opacity: .5; cursor: default; transform: none; }
.qc-gap-state { font-family: var(--mono); font-size: 11px; color: var(--soft); text-align: center; }
.qc-note { display: flex; gap: 10px; align-items: flex-start; background: var(--row); border: 1px solid var(--hair); border-radius: 12px; padding: 13px 15px; font-size: 13px; line-height: 1.55; color: var(--soft); margin-bottom: 18px; }
.qc-note svg { flex: none; margin-top: 1px; stroke: var(--grey); }
.qc-note b { color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .qc-gap, .qc-gap-btn { transition: none; } }

/* ── settings (autonomy) ─────────────────────────────────────────────────── */
.qc-settings { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
.qc-panel { background: #fff; border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 26px 26px 28px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.qc-panel h3 { font-family: var(--font); font-weight: 600; font-size: 19px; letter-spacing: -.03em; color: var(--ink); margin: 0 0 4px; }
.qc-panel .ph-sub { font-size: 13.5px; color: var(--soft); line-height: 1.55; margin: 0 0 22px; }

/* master auto-send switch */
.qc-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid var(--hair); border-radius: 14px; background: var(--row); margin-bottom: 8px; transition: background .2s, border-color .2s; }
.qc-switchrow.on { background: var(--lime-dim); border-color: var(--lime-border); }
.qc-switchrow .sw-label { font-family: var(--font); font-weight: 600; font-size: 15px; color: var(--ink); }
.qc-switchrow .sw-state { font-family: var(--mono); font-size: 11.5px; color: var(--soft); margin-top: 3px; }
.qc-switch { flex: none; position: relative; width: 52px; height: 30px; border-radius: 100px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; padding: 0; transition: background .22s var(--ease), border-color .22s; }
.qc-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .28s var(--spring); }
.qc-switch[aria-checked="true"] { background: var(--ink); border-color: var(--ink); }
.qc-switch[aria-checked="true"]::after { transform: translateX(22px); background: var(--lime); }
.qc-switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.qc-sendhint { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.55; color: var(--soft); margin: 12px 2px 0; }
.qc-sendhint svg { flex: none; margin-top: 1px; stroke: var(--grey); }

/* ── readiness gating: a locked control can't be flipped while it can't work ── */
.qc-switchrow.locked { background: var(--row); border-color: var(--hair); }
.qc-switch:disabled { cursor: not-allowed; opacity: .5; background: var(--hair); border-color: var(--line-strong); }
.qc-switch:disabled::after { background: var(--grey); box-shadow: none; }
.qc-locknote { display: flex; gap: 9px; align-items: flex-start; margin: 8px 2px 4px; font-size: 12.5px; line-height: 1.5; color: var(--soft); }
.qc-locknote .qc-locknote-ico { flex: none; margin-top: 1px; stroke: var(--grey); }
.qc-locknote-body { display: block; min-width: 0; }
.qc-locknote-saved { display: block; margin-top: 5px; font-family: var(--mono); font-size: 11px; color: var(--grey); }
.qc-field input:disabled, .qc-field textarea:disabled { opacity: .55; cursor: not-allowed; background: var(--hair); }
.qc-field input:disabled::placeholder, .qc-field textarea:disabled::placeholder { color: var(--grey); }

/* threshold sliders */
.qc-thr { margin-top: 24px; }
.qc-thr-item { padding: 18px 0; border-top: 1px solid var(--hair); }
.qc-thr-item:first-child { border-top: 0; }
.qc-thr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.qc-thr-name { font-family: var(--font); font-weight: 600; font-size: 14.5px; color: var(--ink); }
.qc-thr-val { font-family: var(--font); font-weight: 600; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.qc-thr-val .u { font-size: 13px; color: var(--soft); font-weight: 500; margin-left: 1px; }
.qc-thr-desc { font-size: 12.5px; color: var(--soft); line-height: 1.5; margin: 3px 0 12px; max-width: 52ch; }
.qc-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 100px; background: var(--hair); outline: none; cursor: pointer; }
.qc-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.28); cursor: pointer; transition: transform .18s var(--spring); }
.qc-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.qc-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.28); cursor: pointer; }
.qc-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--lime); outline-offset: 2px; }

.qc-save { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.qc-save .btn-primary { justify-content: center; }
.qc-saved { font-family: var(--mono); font-size: 12px; color: var(--soft); }

/* tier explainer */
.qc-tiers { display: flex; flex-direction: column; gap: 12px; }
.qc-tier { border: 1px solid var(--hair); border-radius: 14px; padding: 15px 16px; background: #fff; position: relative; }
.qc-tier-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.qc-tier-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.qc-tier.green { border-color: rgba(47,143,78,.32); background: linear-gradient(180deg, var(--ok-bg), #fff 62%); }
.qc-tier.green .qc-tier-dot { background: #2f8f4e; }
.qc-tier.amber { border-color: #eddcb3; background: linear-gradient(180deg, #fdf6e6, #fff 62%); }
.qc-tier.amber .qc-tier-dot { background: #d8a41a; }
.qc-tier.red { border-color: #f1b4ac; background: linear-gradient(180deg, #fdeeeb, #fff 62%); }
.qc-tier.red .qc-tier-dot { background: #d1443a; }
.qc-tier-name { font-family: var(--font); font-weight: 600; font-size: 14.5px; color: var(--ink); letter-spacing: -.02em; }
.qc-tier-rule { font-family: var(--mono); font-size: 11.5px; color: var(--ink); margin-left: auto; font-variant-numeric: tabular-nums; background: rgba(255,255,255,.7); border: 1px solid var(--hair); border-radius: 7px; padding: 2px 8px; }
.qc-tier-desc { font-size: 12.5px; line-height: 1.55; color: var(--soft); margin: 0; }
.qc-tier-desc b { color: var(--ink); font-weight: 600; }

/* ── settings hub (tabbed) ───────────────────────────────────────────────── */
.qc-hub { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start; }
.qc-hubnav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 118px; }
.qc-hubtab { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--soft);
  background: none; border: 1px solid transparent; border-radius: 12px; padding: 10px 13px;
  transition: color .16s, background .16s, border-color .16s, transform .3s var(--spring); }
.qc-hubtab svg { flex: none; stroke: currentColor; opacity: .85; }
.qc-hubtab:hover { color: var(--ink); background: var(--row); }
.qc-hubtab:active { transform: scale(.98); transition-duration: .08s; }
.qc-hubtab[aria-selected="true"] { color: var(--ink); font-weight: 600; background: #fff; border-color: var(--hair); box-shadow: var(--lift-1); }
.qc-hubtab[aria-selected="true"] svg { color: var(--ink); opacity: 1; }
.qc-hubtab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.qc-hubbody { min-width: 0; }
.qc-sec { animation: qc-sec-in .32s var(--expo) both; }
@keyframes qc-sec-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* forms inside a section */
.qc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-bottom: 6px; }
.qc-field { display: flex; flex-direction: column; min-width: 0; }
.qc-field-wide { grid-column: 1 / -1; }
.qc-field label { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.qc-field input, .qc-field textarea, .qc-field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--hair); border-radius: 11px;
  font: inherit; font-family: var(--font); font-size: 14px; background: var(--row); color: var(--ink);
  transition: border-color .16s, box-shadow .16s; box-sizing: border-box; }
.qc-field textarea { resize: vertical; line-height: 1.5; }
.qc-field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.qc-field input:focus, .qc-field textarea:focus, .qc-field select:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(19, 19, 19, .07); background: #fff; }
.qc-hint { font-size: 12px; line-height: 1.5; color: var(--soft); margin: 7px 0 0; }
.qc-field-sm { max-width: 200px; }
.qc-inputwrap { position: relative; }
.qc-inputwrap input { padding-right: 54px; }
.qc-unit { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--grey); pointer-events: none; }
.qc-inline { display: flex; gap: 16px; margin: 12px 0 4px; }
.qc-inline.off { opacity: .45; pointer-events: none; }

/* section sub-heading (divides a long panel) */
.qc-subhead { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); font-weight: 600; margin: 28px 0 12px; padding-top: 22px; border-top: 1px solid var(--hair); }
.qc-sec .qc-switchrow + .qc-sendhint { margin-bottom: 4px; }

/* segmented control */
.qc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; max-width: 460px; }
.qc-seg-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--hair); border-radius: 12px; background: #fff; font-family: var(--font);
  transition: border-color .16s, background .16s, box-shadow .16s, transform .3s var(--spring); }
.qc-seg-btn:active { transform: scale(.98); transition-duration: .08s; }
.qc-seg-t { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.qc-seg-d { font-size: 11.5px; color: var(--soft); }
.qc-seg-btn.on { border-color: var(--ink); background: var(--lime-dim); box-shadow: inset 0 0 0 1px var(--ink); }
.qc-seg-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.qc-saved.ok { color: #1f6d3a; }

/* Console language control — compact segmented pill (matches the Seam Studio theme) */
.qc-langrow { display: flex; align-items: center; justify-content: space-between; gap: 20px 24px;
  flex-wrap: wrap; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--hair); }
.qc-langrow > div { min-width: 0; }
.qc-langseg { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--hair);
  border-radius: 13px; background: var(--row); flex: none; }
.qc-langseg-btn { appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--soft);
  padding: 9px 20px; border-radius: 9px; line-height: 1;
  transition: background .2s cubic-bezier(.2,.8,.2,1), color .2s, box-shadow .2s; }
.qc-langseg-btn:hover { color: var(--ink); }
.qc-langseg-btn[aria-checked="true"] { background: #fff; color: var(--ink);
  box-shadow: 0 1px 2px rgba(16,20,30,.09), inset 0 0 0 1px var(--ink); }
.qc-langseg-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .qc-langseg-btn { transition: none; } }
@media (max-width: 520px) { .qc-langseg { width: 100%; } .qc-langseg-btn { flex: 1; text-align: center; } }

@media (max-width: 820px) {
  .qc-hub { grid-template-columns: 1fr; gap: 16px; }
  .qc-hubnav { flex-direction: row; position: static; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .qc-hubtab { width: auto; flex: none; white-space: nowrap; }
  .qc-form { grid-template-columns: 1fr; }
}

/* ── empty / error / loading ─────────────────────────────────────────────── */
.qc-empty, .qc-tableerror { padding: 54px 32px; text-align: center; }
.qc-empty .ico, .qc-tableerror .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 16px; }
.qc-empty .ico { background: var(--row); border: 1px solid var(--hair); }
.qc-empty .ico svg { stroke: var(--grey); }
.qc-tableerror .ico { background: #fbe3df; }
.qc-tableerror .ico svg { stroke: #b42318; }
.qc-empty h4, .qc-tableerror h4 { font-family: var(--font); font-size: 19px; font-weight: 600; letter-spacing: -.025em; color: var(--ink); margin-bottom: 7px; }
.qc-empty p, .qc-tableerror p { font-size: 14px; line-height: 1.6; color: var(--soft); max-width: 400px; margin: 0 auto; }
.qc-empty code { font-family: var(--mono); font-size: 12.5px; background: var(--row); border: 1px solid var(--hair); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
.qc-empty .btn, .qc-tableerror .btn { margin-top: 18px; }
.qc-card { background: #fff; border: 1px solid var(--hair); border-radius: var(--r-md); box-shadow: 0 1px 2px rgba(0,0,0,.03); }

.qc-boot-error { max-width: 640px; margin: 12vh auto; padding: 20px 24px; background: #fbe3df; color: #7a1b12; border: 1px solid #f1b4ac; border-radius: 14px; font-size: 14px; line-height: 1.6; }

/* skeleton */
@keyframes qc-shimmer { 100% { background-position: -200% 0; } }
.sk { background: linear-gradient(100deg, var(--row) 28%, #ececec 48%, var(--row) 68%); background-size: 200% 100%; animation: qc-shimmer 1.25s ease-in-out infinite; border-radius: 8px; }
.sk-tile { height: 92px; border-radius: var(--r-md); border: 1px solid var(--hair); }
.sk-row { height: 66px; border-radius: var(--r-md); border: 1px solid var(--hair); margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } dialog.qc-drawer[open], dialog.qc-drawer[open]::backdrop { animation: none; } }

/* toast */
.qc-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; font-size: 13px; padding: 11px 18px; border-radius: 100px; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 60; max-width: 90vw; }
.qc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.qc-toast.bad { background: #b42318; }

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .qc-settings { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .qc-top { padding: 13px 18px; }
  .qc-who { display: none; }
  .qc-subnav { top: 55px; padding: 9px 16px; }
  .qc-facts { grid-template-columns: 1fr; }
  .qc-gap { grid-template-columns: auto 1fr; gap: 14px; }
  .qc-gap-actions { grid-column: 1 / -1; flex-direction: row; min-width: 0; }
  .qc-gap-actions .qc-gap-btn { flex: 1; }
}

/* ════════════════════════════════════════════════════════════════════════════
   TASTE PASS — depth & hierarchy elevation, matched to the main console (2026-07)
   Same Seam Studio identity: white / ink #131313 / Inter / lime. Transform/opacity
   motion only; a11y intact. Mirrors dashboard.css so the whole console reads as one.
   ════════════════════════════════════════════════════════════════════════════ */
:root {
  --sheen-light: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0) 46%);
  --lift-1: 0 1px 2px rgba(17,17,17,.04), 0 5px 14px -10px rgba(17,17,17,.15);
  --lift-2: 0 2px 4px rgba(17,17,17,.05), 0 20px 44px -22px rgba(17,17,17,.30);
}

/* ── stat tiles: quiet label over a confident number, with real depth ──────── */
.qc-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 15px 17px 16px; border-radius: 16px; box-shadow: var(--lift-1); }
.qc-tile::before { content: ""; position: absolute; inset: 0; background: var(--sheen-light); pointer-events: none; }
.qc-tile > * { position: relative; z-index: 1; }
.qc-tile .l { order: -1; font-size: 10.5px; letter-spacing: .085em; margin-top: 0; }
.qc-tile .n { font-size: 33px; letter-spacing: -.05em; margin-top: 11px; }
.qc-tile .n.small { font-size: 21px; letter-spacing: -.03em; }
.qc-tile .sub2 { margin-top: 7px; }
.qc-tile:hover { transform: translateY(-3px); box-shadow: var(--lift-2); border-color: var(--line-strong); }
.qc-tile.accent { border-color: rgba(150,190,20,.55); box-shadow: 0 1px 2px rgba(110,140,10,.16), 0 16px 34px -20px var(--lime-glow); }
.qc-tile.accent::before { background: linear-gradient(180deg, rgba(255,255,255,.55), transparent 48%); }
.qc-tile.accent .l { color: rgba(24,34,0,.6); }
.qc-tile.accent .sub2 { color: rgba(24,34,0,.66); }

/* ── surfaces: layered lift instead of the flat hairline shadow ────────────── */
.qc-tablewrap, .qc-card, .qc-panel { box-shadow: var(--lift-1); }
.qc-panel { position: relative; overflow: hidden; }
.qc-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 76px; background: var(--sheen-light); pointer-events: none; }
.qc-panel > * { position: relative; z-index: 1; }
.qc-search, .qc-select { box-shadow: 0 1px 1px rgba(17,17,17,.02); }
.qc-table th { padding: 14px 18px; background: linear-gradient(180deg, #fbfbfa, #fff); }
.qc-table td { padding: 15px 18px; }
.qc-table .qc-cust-name { font-size: 14.5px; }
.qc-table tbody tr { transition: background .16s var(--ease), box-shadow .16s var(--ease); }
.qc-table tbody tr:hover { box-shadow: inset 3px 0 0 var(--line-strong); }

/* ── gap cards: a touch more presence + a confident count column ───────────── */
.qc-gap { box-shadow: var(--lift-1); border-radius: 16px; }
.qc-gap-count .cn { font-size: 32px; letter-spacing: -.05em; }
.qc-gap:hover { box-shadow: var(--lift-2); }

/* ── tier explainer + facts: subtle inner-light, crisper edges ─────────────── */
.qc-tier { box-shadow: var(--lift-1); }
.qc-fact { box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }

/* ── login card: a considered gate, lime hairline accent ───────────────────── */
.qc-login-card { position: relative; overflow: hidden; box-shadow: var(--lift-2); }
.qc-login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--lime); z-index: 2; }

@media (prefers-reduced-motion: reduce) { .qc-tile, .qc-gap, .qc-table tbody tr { transition: none; } }

/* ══════════════════════════════════════════════════════════════════════════════
   CLIENT EDITING / DELETION (customers.html)
   White · ink · lime, same language as the rest of the console. Every control
   below is wired up by delegation in customers.js — the site CSP (script-src
   'self') forbids inline handlers, so never add onclick="" to this markup.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── confirm dialog ─────────────────────────────────────────────────────────
   Mirrors dashboard.css so the auxiliary views (which don't load dashboard.css)
   get the identical confirm treatment. Keep the two in sync. */
.qc-confirm { border: 0; padding: 0; margin: auto; inset: 0; position: fixed; border-radius: var(--r-md);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); max-width: 400px; width: calc(100vw - 32px); background: #fff; color: var(--ink); }
.qc-confirm.qc-confirm-wide { max-width: 520px; max-height: calc(100vh - 48px); overflow-y: auto; }
.qc-confirm::backdrop { background: rgba(17,17,17,.45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.qc-confirm-card { padding: 24px 24px 20px; background: #fff; border: 0; box-shadow: none; }
.qc-confirm-card h3 { font-family: var(--font); font-weight: 600; font-size: 19px; letter-spacing: -.03em; color: var(--ink); margin-bottom: 8px; }
.qc-confirm-card p { font-size: 14px; line-height: 1.6; color: var(--soft); margin-bottom: 20px; }
.qc-confirm-card p strong { color: var(--ink); font-weight: 600; }
.qc-confirm-acts { display: flex; justify-content: flex-end; gap: 10px; }
.qc-confirm-acts .btn-primary.is-danger { background: #b42318; }
.qc-confirm-acts .btn-primary.is-danger:hover { background: #9a1d13; }
.qc-confirm-acts .btn:disabled { opacity: .45; pointer-events: none; }
.qc-confirm[open] { animation: qc-dialog-in .26s var(--expo); }
@keyframes qc-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── delete-scope card ──────────────────────────────────────────────────────── */
.qc-delcard .qc-del-lead { margin-bottom: 10px; }
.qc-delcard .qc-del-count { font-family: var(--mono); font-size: 12px; color: var(--grey); margin-bottom: 16px; }
.qc-scopes { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.qc-scopes legend { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--grey); font-weight: 600; padding: 0; margin-bottom: 10px; }
.qc-scope { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; padding: 13px 14px;
  border: 1px solid var(--hair); border-radius: 13px; background: #fff;
  transition: border-color .16s, background .16s, box-shadow .16s; }
.qc-scope:hover { border-color: var(--line-strong); }
.qc-scope.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--row); }
.qc-scope.off { opacity: .45; cursor: not-allowed; }
.qc-scope input { margin-top: 3px; flex: none; accent-color: #111; width: 15px; height: 15px; }
.qc-scope:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.qc-scope-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qc-scope-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.qc-scope-d { font-size: 12.5px; line-height: 1.55; color: var(--soft); }
.qc-scope-tag { font-family: var(--mono); font-style: normal; font-size: 10px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 100px; }
.qc-scope-tag.ok { background: var(--ok-bg); color: #1f6d3a; }
.qc-scope-tag.warn { background: var(--amber-bg); color: var(--amber); }
.qc-scope-tag.bad { background: #fbe3df; color: #b42318; }
.qc-del-warn { font-size: 12.5px; line-height: 1.55; color: #b42318; background: #fbe3df;
  border-radius: 11px; padding: 11px 13px; margin-bottom: 16px; }
.qc-delcard .qc-del-confirm { margin-bottom: 16px; }
.qc-delcard .qc-del-keep { margin-bottom: 14px; }
.qc-delcard .qc-error { margin-top: 0; margin-bottom: 12px; }

/* ── drawer: action bar + edit form + learned block ─────────────────────────── */
.qc-drawer-acts { flex: none; display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  padding: 14px 24px; border-top: 1px solid var(--hair); background: #fff; }
.qc-drawer-acts .qc-hint { margin: 0; text-align: right; }
.qc-btn-danger { color: #b42318; border-color: #f0cdc7; }
.qc-btn-danger:hover { border-color: #b42318; }
.qc-editform { grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-bottom: 4px; }
.qc-editform .qc-error { margin: 0; }
.qc-hidden-submit { position: absolute; width: 1px; height: 1px; padding: 0; border: 0;
  opacity: 0; pointer-events: none; overflow: hidden; }
.qc-learned { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hair); }
.qc-learned-note { margin: 0 0 14px; }

/* ── recently-deleted list ──────────────────────────────────────────────────── */
.qc-deltoggle { flex: none; }
.qc-deltoggle[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.qc-table tbody tr.qc-row-deleted { cursor: default; color: var(--soft); }
.qc-table tbody tr.qc-row-deleted:hover { box-shadow: none; background: var(--row); }
.qc-table tbody tr.qc-row-deleted .qc-cust-name { color: var(--soft); }

@media (max-width: 560px) {
  .qc-editform { grid-template-columns: 1fr; }
  .qc-drawer-acts { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .qc-confirm[open] { animation: none; }
  .qc-scope { transition: none; }
}
