/* ============================================================
   Blocksett dashboard · Inflow direction of the Blocksett dark system
   (tokens and components from inflow.html: ink ground, flat surfaces,
   hairlines, one Ember accent, mono for every figure). Layout and class
   names follow token_service web/style.css (shell, sidebar, stats, panel,
   table-wrap, badge→pill, dialog), restyled.
   ============================================================ */
:root {
  color-scheme: dark;
  --ink: #0A0B0F; --surface: #111318; --raised: #171A21; --raised-2: #1E222B;
  --fg: #ECE8E1; --fg-2: #A9A6A0; --fg-3: #8E8B85;
  --line: #22252D; --line-2: #2A2E38;
  --ok: #39D98A; --warn: #F5B142; --bad: #FF5C5C; --ok-rgb: 57, 217, 138;
  --accent: #FF6A3D; --accent-2: #FF7A4D; --accent-ink: #0A0B0F; --accent-rgb: 255, 106, 61;
  --mark-a: var(--fg); --mark-b: var(--accent);
  --w-display: 300; --w-strong: 700; --track: -.035em;
  --body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-lg: 20px; --r: 14px; --r-sm: 10px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --side: 252px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ink); color: var(--fg); font: 400 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 3vw, 34px); font-weight: var(--w-display); letter-spacing: var(--track); line-height: 1.1; }
h1 b { font-weight: var(--w-strong); }
h2 { font-size: 17px; font-weight: var(--w-strong); letter-spacing: -.015em; }
h3 { font-size: 15px; font-weight: var(--w-strong); letter-spacing: -.01em; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; font-weight: var(--w-strong); }
.skip:focus { left: 16px; }
.mono { font-family: var(--mono); }
.muted { color: var(--fg-3); }
.dim { color: var(--fg-2); }
.label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); font-weight: 500; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.fine { font-size: 12.5px; color: var(--fg-3); line-height: 1.5; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); } .acc-t { color: var(--accent-2); }

/* ---------- brand ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: var(--w-strong); font-size: 17px; letter-spacing: -.045em; color: var(--fg); text-decoration: none; }
.mark { width: 22px; height: 22px; }
.m-a { fill: var(--mark-a); } .m-b { fill: var(--mark-b); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; z-index: 40; }
.sidebar .logo { padding: 4px 8px 0; }
.ws-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 11px; background: var(--ink); border: 1px solid var(--line); }
.ws-switch button { height: 32px; border-radius: 8px; font-size: 12.5px; font-weight: var(--w-strong); color: var(--fg-2); }
.ws-switch button.on { background: var(--fg); color: var(--ink); }
.nav { display: grid; gap: 2px; }
.nav-heading { padding: 10px 10px 6px; }
.nav button { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--fg-2); font-size: 13.5px; font-weight: 500; text-align: left; width: 100%; transition: background .15s, color .15s; }
.nav button:hover { background: var(--raised); color: var(--fg); }
.nav button.active { background: var(--raised-2); color: var(--fg); font-weight: var(--w-strong); }
.nav button.active svg { color: var(--accent-2); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; display: grid; place-items: center; font: 500 10.5px/1 var(--mono); background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-2); }
.nav .count[hidden] { display: none; }
.nav .count.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 10px; }
.profile { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink); }
.avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--raised-2); color: var(--fg); font: 600 11px/1 var(--mono); flex: none; }
.avatar.acc { background: var(--accent); color: var(--accent-ink); }
.profile-name { font-weight: var(--w-strong); font-size: 13px; line-height: 1.2; }
.profile-role { font-size: 11.5px; color: var(--fg-3); }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(10, 11, 15, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.crumbs { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs b { color: var(--fg); font-weight: 500; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ok); font-weight: 500; white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 2px; background: var(--ok); box-shadow: 0 0 0 0 rgba(var(--ok-rgb), .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(var(--ok-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--ok-rgb), 0); } }
.demo-select { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 10px; border-radius: 9px; border: 1px dashed var(--line-2); }
.demo-select .label { color: var(--warn); }
.demo-select select { height: 26px; border: 0; background-color: transparent; padding: 0 24px 0 4px; font-size: 12.5px; font-weight: var(--w-strong); background-position: right 6px center; }
.burger { display: none; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line-2); place-items: center; flex: none; }
.content { padding: 28px 32px 64px; width: 100%; max-width: 1360px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
.content > * { min-width: 0; }
.scrim { display: none; }

/* ---------- page heading ---------- */
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-heading > div:first-child { display: grid; gap: 10px; min-width: 0; }
.page-heading .lede { color: var(--fg-2); max-width: 70ch; font-size: 14.5px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-3); font-size: 13px; font-weight: 500; text-decoration: none; }
.back:hover { color: var(--fg); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font-weight: var(--w-strong); font-size: 13.5px; letter-spacing: -.005em; border: 1px solid transparent; white-space: nowrap; text-decoration: none; transition: transform .15s var(--ease), background .15s, border-color .15s, filter .15s; }
.btn svg.i { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-glass { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-glass:hover:not(:disabled) { background: var(--raised); border-color: #3A3F4B; }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.btn-ok { background: var(--ok); color: var(--ink); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--fg-2); flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--raised); color: var(--fg); }
.icon-btn svg.i { width: 16px; height: 16px; }
.link { color: var(--accent-2); font-weight: var(--w-strong); text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; }
.row-link { color: var(--fg); font-weight: var(--w-strong); text-align: left; }
.row-link:hover { color: var(--accent-2); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { display: grid; gap: 8px; align-content: start; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stat-top svg.i { color: var(--fg-3); width: 16px; height: 16px; }
.stat-value { font: 500 24px/1.1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value small { font-size: .55em; color: var(--fg-3); font-weight: 400; letter-spacing: 0; margin-left: 4px; }
.stat-sub { font-size: 12.5px; color: var(--fg-3); }
/* the one colour block on the page (inflow .t-settle) */
.stat.feature { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); --fg: var(--accent-ink); --fg-2: color-mix(in srgb, var(--accent-ink) 86%, transparent); --fg-3: color-mix(in srgb, var(--accent-ink) 68%, transparent); --line: color-mix(in srgb, var(--accent-ink) 22%, transparent); }
.stat.feature .stat-value { font-size: clamp(30px, 3.4vw, 40px); font-weight: 600; }
.stat.feature .bar-split { background: color-mix(in srgb, #000 18%, transparent); }
.bar-split { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; background: var(--raised-2); }
.bar-split i { display: block; background: var(--fg); }
.bar-split i + i { opacity: .45; }
.overview-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; }
.overview-grid .stat.feature { grid-row: span 2; align-content: space-between; gap: 16px; padding: 22px; }
.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head > div:first-child { display: grid; gap: 3px; min-width: 0; }
.panel-head p { font-size: 12.5px; color: var(--fg-3); }
.panel-body { padding: 18px; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: 12.5px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.toolbar { display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.search { position: relative; flex: 1 1 240px; min-width: 0; }
.search svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--fg-3); width: 16px; height: 16px; }
.search input { padding-left: 36px; }

/* ---------- forms (inflow inputs) ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 12.5px; font-weight: var(--w-strong); color: var(--fg-2); }
.field .hint { font-size: 12px; color: var(--fg-3); }
input[type=text], input[type=search], input[type=url], input[type=number], input[type=email], input[type=password], input[type=tel], input:not([type]), select, textarea { width: 100%; height: 40px; font: 400 14px/1.3 var(--body); padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--raised); color: var(--fg); min-width: 0; transition: border-color .2s, box-shadow .2s; }
textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 72px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A9A6A0' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.toolbar select { width: auto; min-width: 140px; }
.amt { position: relative; }
.amt input { height: 52px; font: 500 20px/1 var(--mono); letter-spacing: -.02em; padding-right: 80px; }
.amt span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: var(--w-strong); color: var(--fg-2); cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check:has(input:checked) { border-color: var(--accent); color: var(--fg); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.check:has(input:focus-visible) { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.seg { display: inline-grid; grid-auto-flow: column; gap: 3px; padding: 3px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); }
.seg button { height: 30px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; font-weight: var(--w-strong); color: var(--fg-2); }
.seg button.on { background: var(--fg); color: var(--ink); }
.error { color: var(--bad); font-size: 13px; min-height: 0; }
.error:not(:empty) { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line-2); color: var(--fg-2); font-size: 13px; line-height: 1.5; }
.note svg.i { color: var(--accent-2); margin-top: 1px; width: 16px; height: 16px; }
.note.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--raised)); }
.note.warn svg.i { color: var(--warn); }
.note.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 8%, var(--raised)); }
.note.bad svg.i { color: var(--bad); }

/* switch (inflow .vk/.sw) */
.vk { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; font-weight: var(--w-strong); user-select: none; position: relative; }
.vk input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw { width: 40px; height: 24px; border-radius: 999px; background: var(--raised-2); border: 1px solid var(--line-2); position: relative; transition: background .25s; flex: none; }
.sw i { position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--fg); transition: transform .25s var(--ease), background .25s; }
.vk input:checked + .sw { background: var(--accent); border-color: var(--accent); }
.vk input:checked + .sw i { transform: translateX(16px); background: var(--accent-ink); }
.vk.danger input:checked + .sw { background: var(--bad); border-color: var(--bad); }
.vk input:focus-visible + .sw { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font: 500 10px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); padding: 11px 14px; white-space: nowrap; background: color-mix(in srgb, var(--ink) 40%, transparent); }
td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--raised) 70%, transparent); }
tbody tr.clickable { cursor: pointer; }
th.r, td.r { text-align: right; }
td small.num { white-space: normal; }
td small, .sub { display: block; font-size: 11.5px; color: var(--fg-3); margin-top: 2px; font-weight: 400; }
td .mono { font-size: 12px; }
.cell-main { font-weight: var(--w-strong); }
.cell-main.mono, td .row-link { white-space: nowrap; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; text-align: center; color: var(--fg-3); }
.empty svg.i { width: 26px; height: 26px; color: var(--fg-3); }
.empty h3 { color: var(--fg); }

/* ---------- pills, chain chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 0 8px; border-radius: 6px; background: var(--raised-2); color: var(--fg-2); white-space: nowrap; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 1.5px; background: currentColor; }
.pill.plain::before { display: none; }
.pill.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.pill.v { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-2); }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.chain { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 500; }
.chain i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 7.5px/1 var(--mono); letter-spacing: .02em; font-style: normal; color: var(--c); background: color-mix(in srgb, var(--c) 18%, var(--raised)); flex: none; }
.chain.lg i { width: 30px; height: 30px; font-size: 9px; }
.chain-stack { display: inline-flex; }
.chain-stack i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 600 7px/1 var(--mono); font-style: normal; color: var(--c); background: color-mix(in srgb, var(--c) 22%, var(--raised)); border: 2px solid var(--surface); margin-left: -6px; }
.chain-stack i:first-child { margin-left: 0; }
.facts { display: flex; gap: 4px; flex-wrap: wrap; }
.fact { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 5px; font: 500 10px/1 var(--mono); letter-spacing: .04em; color: var(--fg-3); border: 1px solid var(--line-2); }
.fact.on { color: var(--fg); border-color: var(--fg-3); }
.fact.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.fact svg.i { width: 11px; height: 11px; }
.copy { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-family: var(--mono); font-size: 12px; color: var(--fg-2); }
.copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.copy button { color: var(--fg-3); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; flex: none; }
.copy button:hover { color: var(--fg); background: var(--raised-2); }
.copy button svg.i { width: 14px; height: 14px; }

/* ---------- key-value, timeline, progress ---------- */
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 10px 20px; margin: 0; font-size: 13px; }
.kv dt { font: 500 10px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); padding-top: 2px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; padding: 0 0 18px; }
.timeline li::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; background: var(--line-2); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 18px; height: 18px; border-radius: 5px; background: var(--raised-2); border: 1px solid var(--line-2); margin-top: 1px; display: grid; place-items: center; }
.timeline .dot svg.i { width: 11px; height: 11px; }
.timeline li.ok .dot { background: color-mix(in srgb, var(--ok) 18%, transparent); border-color: var(--ok); color: var(--ok); }
.timeline li.warn .dot { background: color-mix(in srgb, var(--warn) 18%, transparent); border-color: var(--warn); color: var(--warn); }
.timeline li.bad .dot { background: color-mix(in srgb, var(--bad) 18%, transparent); border-color: var(--bad); color: var(--bad); }
.timeline li.acc .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.timeline li.todo { opacity: .45; }
.timeline b { font-weight: var(--w-strong); display: block; }
.timeline time { font: 400 11.5px/1.6 var(--mono); color: var(--fg-3); white-space: nowrap; }
.progress { height: 6px; border-radius: 3px; background: var(--raised-2); overflow: hidden; min-width: 80px; }
.progress i { display: block; height: 100%; background: var(--fg-2); border-radius: 3px; }
.progress.warn i { background: var(--warn); } .progress.bad i { background: var(--bad); } .progress.acc i { background: var(--accent); }
.steps-h { display: flex; gap: 6px; flex-wrap: wrap; }
.steps-h span { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--fg-3); }
.steps-h span.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.steps-h span.now { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.steps-h span.stop { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); min-width: 0; }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; font-weight: var(--w-strong); font-size: 13.5px; }
.list .grow span { display: block; font-size: 12.5px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; }
.alert-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--raised-2); color: var(--fg-2); }
.alert-ic.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.alert-ic.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.alert-ic.acc { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-2); }
.alert-ic svg.i { width: 16px; height: 16px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-family: var(--mono); font-size: 12px; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 9px; background: var(--ink); border: 1px solid var(--line); min-width: 0; }
.feed .t { color: var(--fg-3); }
.feed .w { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); }

/* ---------- bar chart (single series, HTML) ---------- */
.bars { position: relative; margin: 8px 0 0; padding-left: 48px; }
.bars-grid { position: absolute; left: 0; right: 0; top: 0; height: var(--h); pointer-events: none; }
.bars-grid span { position: absolute; left: 48px; right: 0; border-top: 1px solid var(--line); }
.bars-grid em { position: absolute; left: -48px; top: -7px; width: 42px; text-align: right; font: 400 10px/1 var(--mono); color: var(--fg-3); font-style: normal; }
.bars-cols { position: relative; height: var(--h); display: flex; align-items: flex-end; gap: 2px; }
.bar-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; border-radius: 4px; }
.bar-col i { display: block; width: 100%; max-width: 30px; margin: 0 auto; background: var(--accent); border-radius: 4px 4px 0 0; }
.bar-col i.muted { background: var(--fg-3); }
.bar-col:hover i, .bar-col:focus-visible i { filter: brightness(1.2); }
.bar-col::after { content: attr(data-tip); position: absolute; left: 50%; top: 0; transform: translate(-50%, -100%); padding: 7px 10px; border-radius: 9px; background: var(--raised-2); border: 1px solid var(--line-2); font: 500 11.5px/1.45 var(--mono); color: var(--fg); white-space: pre; text-align: left; pointer-events: none; z-index: 5; display: none; }
.bar-col:first-child::after, .bar-col:nth-child(2)::after { left: 0; transform: translate(0, -100%); }
.bar-col:last-child::after, .bar-col:nth-last-child(2)::after { left: auto; right: 0; transform: translate(0, -100%); }
.bar-col:hover::after, .bar-col:focus-visible::after { display: block; }
.bars-x { display: flex; gap: 2px; margin-top: 8px; }
.bars-x span { flex: 1; min-width: 0; text-align: center; font: 400 10px/1 var(--mono); color: var(--fg-3); overflow: hidden; white-space: nowrap; }
.table-view { margin-top: 12px; }
.table-view summary { cursor: pointer; font-size: 12.5px; color: var(--fg-3); font-weight: 500; width: max-content; }
.table-view summary:hover { color: var(--fg); }
.table-view table { margin-top: 8px; }
@media (max-width: 720px) { .bars-x span:nth-child(even) { visibility: hidden; } }

/* ---------- code / secrets ---------- */
.secret { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--ink); border: 1px dashed var(--accent); font: 500 12.5px/1.4 var(--mono); color: var(--fg); overflow-wrap: anywhere; }
.secret span { flex: 1; min-width: 0; }
.code { padding: 12px 14px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); font: 400 12px/1.7 var(--mono); color: var(--fg-2); overflow-x: auto; white-space: pre; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); font-size: 12.5px; font-weight: var(--w-strong); display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--fg); border-color: var(--fg-3); }
.tab.on { background: var(--fg); color: var(--ink); border-color: var(--fg); }
.tab span { opacity: .7; font-family: var(--mono); font-size: 11px; }

/* ---------- dialog (token_service modal, restyled) ---------- */
dialog { padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
dialog.wide { width: min(760px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(5, 6, 9, .66); backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.dialog-head > div { display: grid; gap: 6px; }
.dialog-head p { font-size: 13px; color: var(--fg-3); }
.dialog-body { padding: 20px 22px; display: grid; gap: 16px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.quote-box { display: grid; gap: 10px; padding: 16px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line-2); }
.quote-amt { font: 500 28px/1.05 var(--mono); letter-spacing: -.03em; }
.quote-amt small { font-size: .45em; color: var(--fg-3); font-weight: 400; letter-spacing: 0; }
.otp { display: flex; gap: 8px; }
.otp input { width: 44px; height: 52px; text-align: center; font: 500 20px var(--mono); padding: 0; }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; z-index: 200; padding: 12px 16px; border-radius: 12px; background: var(--fg); color: var(--ink); font-weight: var(--w-strong); font-size: 13.5px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); transition: opacity .2s, transform .2s var(--ease); max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- pay page (hosted, pay.blocksett.io/r/{token}) ---------- */
.pay-root { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 300px; background: var(--ink); }
.pay-stage { min-width: 0; grid-template-columns: minmax(0, 1fr); display: grid; justify-items: center; align-content: start; gap: 16px; padding: 28px 16px 48px; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.4px); background-size: 28px 28px; }
.pay-url { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 400 11.5px var(--mono); color: var(--fg-3); max-width: min(440px, 100%); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pay-url svg.i { width: 13px; height: 13px; color: var(--ok); }
.pay-card { min-width: 0; grid-template-columns: minmax(0, 1fr); width: min(440px, 100%); display: grid; gap: 18px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.pay-merchant { display: flex; align-items: center; gap: 12px; }
.pay-merchant .avatar { width: 40px; height: 40px; border-radius: 11px; font-size: 13px; }
.pay-amount { display: grid; gap: 4px; }
.pay-amount .fine { white-space: normal; }
.pay-merchant > div { min-width: 0; }
.pay-amount .quote-amt { font-size: clamp(32px, 9vw, 42px); }
.pay-chains { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-chains button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: var(--w-strong); color: var(--fg-2); }
.pay-chains button.on { border-color: var(--fg); color: var(--fg); background: var(--raised); }
.pay-chains button i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 7.5px/1 var(--mono); font-style: normal; color: var(--c); background: color-mix(in srgb, var(--c) 18%, var(--raised)); }
.qr-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.qr { width: 150px; height: 150px; padding: 10px; border-radius: 12px; background: #fff; }
.qr svg { width: 100%; height: 100%; display: block; }
.addr-box { display: grid; gap: 10px; min-width: 0; }
.addr-box .label { display: block; margin-bottom: 4px; }
.addr { padding: 10px 12px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); font: 500 12px/1.5 var(--mono); overflow-wrap: anywhere; color: var(--fg); }
.pay-status { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); }
.pay-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pay-steps span { height: 4px; border-radius: 2px; background: var(--raised-2); }
.pay-steps span.done { background: var(--ok); }
.pay-steps span.now { background: var(--warn); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .4; } }
.pay-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--fg-3); }
.pay-result { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 8px 0; }
.pay-result .big-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pay-result .big-ic.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.pay-result .big-ic.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.pay-result .big-ic svg.i { width: 26px; height: 26px; }
.demo-panel { border-left: 1px solid var(--line); background: var(--surface); padding: 20px; display: grid; gap: 14px; align-content: start; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.demo-panel .label { color: var(--warn); }
.demo-panel .btn { justify-content: flex-start; }

/* ---------- responsive ---------- */
@media (max-width: 1500px) { .hide-lg { display: none; } }
@media (max-width: 1180px) {
  .split, .overview-grid { grid-template-columns: 1fr; }
  .overview-grid .stat.feature { grid-row: auto; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-md { display: none; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: 0 0 60px rgba(0, 0, 0, .6); }
  .menu-open .sidebar { transform: none; }
  .menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(5, 6, 9, .6); z-index: 35; }
  .burger { display: inline-grid; }
  .topbar { padding: 0 16px; gap: 10px; }
  .content { padding: 20px 16px 56px; }
  .pay-root { grid-template-columns: minmax(0, 1fr); }
  .demo-panel { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .form-grid, .mini-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 20px; }
  .demo-select .label, .live span, .hide-sm { display: none; }
  .page-heading .actions { width: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .qr-row { grid-template-columns: 1fr; justify-items: center; }
  .addr-box { width: 100%; }
  .panel-head, .toolbar, .panel-body { padding-left: 14px; padding-right: 14px; }
  th:first-child, td:first-child { padding-left: 14px; }
  .toolbar select { flex: 1 1 140px; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .crumbs { display: none; }
}

/* Player detail: the UAH balance tile spans two columns (from the prototype). */
.player-stats .stat.feature { grid-column: span 2; }
@media (max-width: 720px) { .player-stats .stat.feature { grid-column: auto; } }

/* Printing a point's QR: only the sheet in the open dialog goes to paper. */
@media print {
  body:has(#dialog[open] .print-sheet) > :not(#dialog) { display: none !important; }
  #dialog:has(.print-sheet) { position: static; inset: auto; margin: 0 auto; border: 0; box-shadow: none; background: #fff; color: #000; max-width: none; width: auto; }
  #dialog:has(.print-sheet) .dialog-head, #dialog:has(.print-sheet) .dialog-foot, #dialog:has(.print-sheet) .note { display: none !important; }
  #dialog:has(.print-sheet)::backdrop { display: none; }
  .print-sheet, .print-sheet * { color: #000 !important; }
}

/* Sign-in (WEB-002). */
.signin-page { min-height: 100dvh; place-content: center; justify-items: center; }
.signin-panel { width: min(420px, 100%); }
.signin-form { display: grid; gap: 14px; }
.signin-setup summary { cursor: pointer; color: var(--fg-2); font-size: 13px; min-height: 44px; display: flex; align-items: center; }
.signin-setup[open] summary { margin-bottom: 8px; }
.code-input { letter-spacing: .3em; font-size: 18px; height: 46px; }
.secret span { overflow-wrap: anywhere; }

/* Touch screens: no zoom on focus (iOS zooms inputs under 16px) and
   44 px tap targets. */
@media (hover: none) and (pointer: coarse) {
  input[type=text], input[type=search], input[type=url], input[type=number], input[type=email], input[type=password], input[type=tel], input:not([type]), select, textarea { font-size: 16px; height: 44px; }
  textarea { height: auto; }
  .code-input { font-size: 18px; height: 48px; }
  .btn { min-height: 44px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
}
