/* The signed-in pages (dashboard, transactions, ID verifications, photo proofs, Order Audit, live demos, workflows) and the owner
   console: one of each shared part. Loaded after the site's sheets and before the page's own. Built from theme.css tokens only. */

.console-body > #app { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.console-body > #app > * { min-width: 0; }

/* ---------- page header: the title, one line under it, controls on the right ---------- */
.vhead { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; justify-content: space-between; }
.vhead h1 { margin: 0; font-size: 32px; line-height: 1.1; letter-spacing: -.025em; }
.vhead p { margin: 4px 0 0; max-width: 120ch; }
.vtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vtools select { --control: 41px; width: auto; padding-block: 7px; }
@media (max-width: 760px) { .vhead { align-items: start; } }

/* tabs are .tabs-nav (site.css): one row of buttons, the open one filled. Segments (.seg, theme.css) are for a choice of view. */

/* ---------- switch: an on/off setting ---------- */
.console input[type=checkbox][role=switch] { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 40px; min-width: 40px; height: 22px; margin: 0; padding: 0; border: 0; border-radius: var(--radius-pill); background: var(--line-strong); box-shadow: none; vertical-align: middle; cursor: pointer; transition: background .15s; }
.console input[type=checkbox][role=switch]::before { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.console input[type=checkbox][role=switch]:checked { background: var(--ink); }
.console input[type=checkbox][role=switch]:checked::before { transform: translateX(18px); }
.console input[type=checkbox][role=switch]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.console input[type=checkbox][role=switch]:disabled { opacity: .5; cursor: not-allowed; }
.console label.switchrow { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.drawer label.switchrow { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.drawer label.switchrow input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; }
.drawer .body > form { display: grid; gap: 18px; }
.drawer .hint { display: block; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.45; margin: 4px 0 0; }
.console label.switchrow.small { align-items: center; margin-top: 8px; font-size: 13px; }

/* ---------- outcome tag: the same three colors for every product's words ---------- */
.console .badge:is(.ok, .active, .approved, .genuine) { background: var(--ok-bg); color: var(--ok); }
.console .badge:is(.warn, .past_due, .medium, .in_review) { background: var(--warn-bg); color: var(--warn); }
.console .badge:is(.bad, .error, .failed, .high, .declined, .suspect, .block) { background: var(--bad-bg); color: var(--bad); }
.console .badge:is(.cancelled, .off, .info, .low) { background: var(--surface-2); color: var(--ink-2); }

/* ---------- number tile: a label, a number, a line of detail ---------- */
.console .kpi { min-width: 0; }
.console .kpi .l { font: 600 12.5px/1.2 var(--font); color: var(--muted); }
.console .kpi .n { font: 700 30px/1.15 var(--display); letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.console .kpi .n small { font: 500 13px var(--font); color: var(--muted); margin-left: 4px; }
.console .kpi .sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.35; }
.console .kpi:is(.bad, .deny) .n { color: var(--bad); }
.console .kpi:is(.warn, .review) .n { color: var(--warn); }
.console .kpi:is(.ok, .allow) .n { color: var(--ok); }
.console .kpi .bar { height: 6px; margin-top: 10px; }
.console .kpis.small { gap: 10px; }
.console .kpis.small .kpi { padding: 10px 12px; }
.console .kpis.small .kpi .n { font-size: 20px; margin-top: 4px; }
@media (max-width: 520px) {
  .console .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .console .kpi { padding: 13px 14px; }
  .console .kpi .n { font-size: 24px; }
}

/* ---------- hint: a line of help under a field or a setting ---------- */
.console .hint { display: block; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.45; margin: 4px 0 0; }

/* ---------- a bar drawn as an SVG: the width is an attribute, never a style ---------- */
svg.bar { width: 100%; }
svg.bar rect { fill: var(--ink); }
svg.bar rect.fl, svg.bar rect.over { fill: var(--warn-fill); }
.legend .k-allow, .legend .k-in { background: var(--ok-fill); } .legend .k-review { background: var(--warn-fill); } .legend .k-deny { background: var(--bad-fill); } .legend .k-accent { background: var(--ink); }
svg.bar .k-allow { fill: var(--ok-fill); } svg.bar .k-review { fill: var(--warn-fill); } svg.bar .k-deny { fill: var(--bad-fill); }
/* credits by product (Plan and billing, with credits on): one bar, a shade of ink per product */
svg.bar rect.cr-1, .cr-key.cr-1 { opacity: .75; } svg.bar rect.cr-2, .cr-key.cr-2 { opacity: .55; } svg.bar rect.cr-3, .cr-key.cr-3 { opacity: .35; }
.cr-legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.cr-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--ink); margin-right: 6px; vertical-align: -1px; }

/* ---------- rows that open something: pointer and focus ring (the script answers Enter and Space) ---------- */
.console dialog.why { width: min(560px, calc(100vw - 32px)); padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.console .why-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; } .console .why-head h2 { margin: 0; }
.console .why-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 16px 0 0; } .console .why-rows dt { color: var(--muted); } .console .why-rows dd { margin: 0; overflow-wrap: anywhere; }
.console button.chip { border: 0; cursor: pointer; font: inherit; }
.console tr.open-row { cursor: pointer; }
.console tr.open-row:hover td, .console tr.open-row:focus-visible td { background: var(--surface-2); }
.console tr.open-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.console tr.open-row td.ref { font-family: var(--mono); font-size: 12.5px; }

/* ---------- spacing and alignment ---------- */
.console .m0 { margin: 0; } .console .mt0 { margin-top: 0; } .console .mt4 { margin-top: 4px; } .console .mt6 { margin-top: 6px; } .console .mt8 { margin-top: 8px; } .console .mt10 { margin-top: 10px; }
.console .mt12 { margin-top: 12px; } .console .mt14 { margin-top: 14px; } .console .mt16 { margin-top: 16px; } .console .mt18 { margin-top: 18px; } .console .mt20 { margin-top: 20px; } .console .mt22 { margin-top: 22px; }
.console .mb0 { margin-bottom: 0; } .console .mb4 { margin-bottom: 4px; } .console .mb6 { margin-bottom: 6px; } .console .mb8 { margin-bottom: 8px; } .console .mb12 { margin-bottom: 12px; }
.console .stack { display: grid; gap: 16px; } .console .stack-8 { display: grid; gap: 8px; } .console .stack-14 { display: grid; gap: 14px; } .console .stack-18 { display: grid; gap: 18px; }
.console .inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.console .ta-c { text-align: center; } .console .ta-r { text-align: right; } .console .nowrap { white-space: nowrap; }
.console .grow { flex: 1; } .console .fs-13 { font-size: 13px; } .console .fw-500 { font-weight: 500; }
.console .brk { word-break: break-all; } .console td.brk { min-width: 150px; overflow-wrap: anywhere; word-break: normal; }

/* ---------- the fraud network map (network-map.js, docs/roadmap/21-engaging-ui.md, U20): the site's own look, tokens only ---------- */
.nm-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.nm-tiles > div { padding: 14px 16px; display: grid; gap: 2px; }
.nm-tiles span { color: var(--muted); font-size: 13px; }
.nm-tiles b { font-family: var(--display); font-size: 28px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
.nm-tiles .nm-flagged b { color: var(--seal); }
.nm-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 16px 0 12px; }
.nm-frame { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.nm-map { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: grab; user-select: none; }
.nm-map:active { cursor: grabbing; }
.nm-map:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nm-sphere { fill: var(--bg-soft); }
.nm-country { stroke: var(--surface); stroke-width: .7; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.nm-c0 { fill: var(--bg-tint); }
.nm-c1 { fill: color-mix(in srgb, var(--ink) 12%, var(--bg-tint)); }
.nm-c2 { fill: color-mix(in srgb, var(--ink) 24%, var(--bg-tint)); }
.nm-c3 { fill: color-mix(in srgb, var(--ink) 38%, var(--bg-tint)); }
.nm-c4 { fill: color-mix(in srgb, var(--ink) 52%, var(--bg-tint)); }
.nm-c5 { fill: color-mix(in srgb, var(--ink) 66%, var(--bg-tint)); }
.nm-country:hover { stroke: var(--ink); }
.nm-mark { cursor: pointer; outline: none; }
.nm-mark > * { stroke: var(--surface); stroke-width: 1; }
.nm-allow { fill: var(--ok-fill); } .nm-review { fill: var(--warn-fill); } .nm-deny { fill: var(--bad-fill); } .nm-none { fill: var(--muted); }
.nm-mark > .nm-site, .nm-legend .nm-site, .nm-dec .nm-site { fill: var(--surface); stroke: var(--ink); stroke-width: 2.2; }
.nm-mark:hover > *, .nm-mark:focus-visible > * { stroke: var(--ink); stroke-width: 2.5; }
.nm-cell { fill: color-mix(in srgb, var(--ink) 12%, transparent); stroke: var(--ink); stroke-width: 1.2; }
.nm-mark > .nm-cell-n { fill: var(--ink); stroke: none; font: 650 10px var(--display); pointer-events: none; }
.nm-links { pointer-events: none; }
.nm-link { fill: none; stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 4 3; opacity: .55; }
.nm-zoom { position: absolute; top: 10px; right: 10px; display: grid; gap: 6px; }
.nm-zoom button { width: 34px; height: 34px; padding: 0; font-size: 17px; line-height: 1; background: var(--surface); }
.nm-legend { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 70px); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 12px; color: var(--ink-2); }
.nm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.nm-legend svg { overflow: visible; }
.nm-legend svg > * { stroke: var(--surface); stroke-width: 1; }
.nm-legend svg > .nm-link { stroke: var(--ink-2); }
.nm-shade i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.nm-shade i:last-of-type { margin-right: 2px; }
.nm-shade .nm-c1 { background: color-mix(in srgb, var(--ink) 12%, var(--bg-tint)); }
.nm-shade .nm-c3 { background: color-mix(in srgb, var(--ink) 38%, var(--bg-tint)); }
.nm-shade .nm-c5 { background: color-mix(in srgb, var(--ink) 66%, var(--bg-tint)); }
.nm-tip { position: absolute; z-index: 3; max-width: 90%; padding: 5px 9px; border-radius: var(--radius-xs); background: var(--ink); color: var(--bg);
  font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.nm-note { margin: 10px 0 0; font-size: 13.5px; }
.nm-card { margin-top: 16px; }
.nm-card-head { display: flex; gap: 16px; align-items: center; }
.nm-print { flex: none; width: 64px; height: 64px; }
.nm-print .ink-tile { width: 100%; height: 100%; }
.nm-id { margin: 0; font-family: var(--display); font-size: 21px; overflow-wrap: anywhere; }
.nm-card-head p { margin: 2px 0 0; }
.nm-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 20px; margin: 16px 0 8px; }
.nm-rows dt { color: var(--muted); font-size: 12.5px; }
.nm-rows dd { margin: 2px 0 0; color: var(--ink); }
.nm-dec { display: inline-flex; align-items: center; gap: 6px; }
.nm-dec svg > * { stroke: var(--surface); stroke-width: 1; }
.nm-context { margin: 8px 0; color: var(--ink-2); }
.nm-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0 0; }
.nm-table { margin-top: 12px; font-size: 13.5px; }
.nm-table summary { cursor: pointer; color: var(--muted); width: fit-content; }
.nm-table .tablewrap { margin-top: 8px; max-height: 360px; overflow: auto; }
.nm-table .nm-csv { margin-top: 8px; }
.nm-table button.linkish { border: 0; padding: 0; background: none; box-shadow: none; color: var(--ink); font: inherit; text-decoration: underline; cursor: pointer; }
.nm-preview { border-radius: var(--radius-sm); }
.nm-preview-n { margin: 8px 0 0; font-size: 13px; }
@media (max-width: 640px) {
  .nm-legend { position: static; max-width: none; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
  .nm-zoom { top: 6px; right: 6px; }
}

/* ---------- a simulated verification's steps (verify-console.js, plan 22, IV48), in the detail drawer: the demo player's drawings where a real one shows photos ---------- */
.vstory { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vstory > li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: start; margin: 0; }
.vstory-pic { width: 72px; height: 84px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); overflow: hidden; }
.vstory-pic svg { max-width: 86%; height: auto; }
.vstory ul { list-style: none; margin: 4px 0 0; padding: 0; }
.vstory ul li { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.vstory-pic .dp-acc { stroke: var(--ink-2); } .vstory-pic .dp-pt { fill: var(--ink-2); stroke: none; } .vstory-pic .dp-thin { stroke-width: 1.2; }
.vstory-pic .dp-bad { stroke: var(--bad); stroke-width: 2.5; } .vstory-pic .dp-dash { stroke-dasharray: 3 6; }
.vstory-pic .dp-txt { fill: var(--muted); stroke: none; font: 9px var(--mono); }
.vstory-v { flex: none; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.vstory-v.ok { background: var(--ok-bg); color: var(--ok); } .vstory-v.warn { background: var(--warn-bg); color: var(--warn); } .vstory-v.bad { background: var(--bad-bg); color: var(--bad); }
