/* NEVIO Admin — owner panel, 2026-10 redesign.
   One system: tokens → shell → page → components → overlays → themes → responsive.
   Loaded after the shop tokens (design/nevio.css); every colour below comes from the
   admin tokens so the light theme only swaps variables. */

/* ---------- Tokens ---------- */
.adm {
  color-scheme: dark;
  --bg: #090a0d; --side: #0b0c10; --top: #090a0dee;
  --panel: #111217; --panel-2: #15161c; --raise: #1a1b22; --input: #0c0d11;
  --line: #ffffff10; --line-2: #ffffff1a; --line-3: #ffffff2b;
  --text: #eef0f5; --text-2: #b0b4c0; --muted: #7f8494;
  --hover: #ffffff0a; --press: #ffffff12; --soft: #ffffff06;
  --accent: #7b8cff; --accent-strong: #5b6cff; --accent-bg: #6d7cff1f; --accent-line: #7b8cff59;
  --good: #3fd99a; --good-bg: #3fd99a17; --warn: #f5c565; --warn-bg: #f2b84b17;
  --bad: #ff8080; --bad-bg: #ff6b6b17; --info: #a9b8ff; --info-bg: #6d7cff17;
  --grad: linear-gradient(100deg, #4f7cff 0%, #7c5cff 100%);
  --shadow-pop: 0 24px 60px -24px #000c, 0 0 0 1px var(--line-2);
  --r-xs: 7px; --r-sm: 9px; --r-md: 12px; --r-lg: 16px;
  --side-w: 248px; --top-h: 58px;
  --f-mono: ui-monospace, 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;
  /* adapters for form markup written against older names */
  --surface: var(--panel); --surface-2: var(--panel-2); --surface-3: var(--raise);
  --line-strong: var(--line-3); --lilac: var(--info);
  --amber: var(--warn); --red: var(--bad); --green: var(--good); --sky: var(--info);
  --bad-bg: var(--bad-bg); --good-bg: var(--good-bg); --r: var(--r-md);
  --font-mono: var(--f-mono); --font-display: Manrope, sans-serif; --shadow: none; --glow: none;
}
/* html[data-theme] is set before the first paint; body.light follows once admin.js runs. */
.adm.light, html[data-theme="light"] .adm {
  color-scheme: light;
  --bg: #f4f5f9; --side: #ffffff; --top: #f4f5f9ee;
  --panel: #ffffff; --panel-2: #f7f8fb; --raise: #eef0f5; --input: #ffffff;
  --line: #0d10200f; --line-2: #0d10201a; --line-3: #0d10202e;
  --text: #11131f; --text-2: #434a5e; --muted: #6a7084;
  --hover: #0d102008; --press: #0d10200f; --soft: #0d102005;
  --accent: #4b5ce8; --accent-strong: #3a4bd6; --accent-bg: #4b5ce81a; --accent-line: #4b5ce866;
  --good: #087548; --good-bg: #0c8a5717; --warn: #9a6400; --warn-bg: #e5a10f1f;
  --bad: #cc3337; --bad-bg: #e5484d17; --info: #3a4bd6; --info-bg: #4b5ce814;
  --shadow-pop: 0 24px 60px -24px #10132a55, 0 0 0 1px var(--line-2);
}

/* ---------- Base ---------- */
body.adm { margin: 0; background: var(--bg); color: var(--text); font: 500 14px/1.5 Manrope, system-ui, sans-serif; overflow-x: hidden; }
body.adm::after { display: none; }
.adm .ambient { display: none; }
.adm a { color: inherit; text-decoration: none; }
.adm h1, .adm h2, .adm h3 { margin: 0; color: var(--text); letter-spacing: -.02em; }
.adm p { margin: 0; }
.adm :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.adm ::selection { background: var(--accent-bg); }
.adm .icon { width: 16px; height: 16px; flex-shrink: 0; }
[hidden] { display: none !important; }
.sr, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; left: 12px; top: 12px; z-index: 200; width: auto; height: auto; clip: auto; padding: 8px 12px; border-radius: 8px; background: var(--panel); }
.num, .a-fact strong, .a-table td, .ch { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.a-shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.a-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--side); overflow-y: auto; scrollbar-width: none; z-index: 40; }
.a-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 4px; }
.a-brand img { height: 17px; width: auto; }
.a-brand span { padding-left: 10px; border-left: 1px solid var(--line-2); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.adm.light .a-brand img, html[data-theme="light"] .adm .a-brand img { filter: invert(1) brightness(.2); }
.a-env { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--soft); }
.a-env b { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--text); white-space: nowrap; }
.a-env b i { width: 7px; height: 7px; border-radius: 50%; background: var(--info); box-shadow: 0 0 0 3px var(--info-bg); }
.a-env small { display: none; }
.a-env.prod { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-bg); }
.a-env.prod b i { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.a-env:has(.a-env-switch) { flex-wrap: wrap; row-gap: 6px; }
.a-env-switch { margin-left: auto; padding: 3px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--input); color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.a-env-switch:hover { color: var(--text); border-color: var(--line-3); }
.a-find { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--input); color: var(--muted); font: 600 13px Manrope, sans-serif; cursor: pointer; white-space: nowrap; overflow: hidden; }
.a-find:hover { color: var(--text-2); border-color: var(--line-3); }
.a-find kbd { margin-left: auto; }
.a-nav { display: grid; gap: 2px; }
.a-nav .nav-group { display: grid; gap: 2px; }
.a-nav .nav-group::before { content: 'Разделы'; padding: 0 10px 6px; color: var(--muted); font: 700 11px Manrope, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.a-nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text-2); font-size: 14px; font-weight: 650; transition: background .15s, color .15s; }
.a-nav a .icon { width: 17px; height: 17px; color: var(--muted); transition: color .15s; }
.a-nav a:hover { background: var(--hover); color: var(--text); }
.a-nav a[aria-current] { background: var(--press); color: var(--text); }
.a-nav a[aria-current] .icon { color: var(--accent); }
.a-nav a[aria-current]::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.a-side-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.a-me { display: flex; align-items: center; gap: 10px; padding: 2px 4px; min-width: 0; }
.a-me .av { width: 32px; height: 32px; font-size: 12px; }
.a-me > div { min-width: 0; }
.a-me b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-me small { color: var(--muted); font-size: 12px; }
.a-me .a-out { margin-left: auto; width: 32px; height: 32px; }
.a-mode { display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px; border-radius: var(--r-sm); background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }
.a-mode .icon { width: 14px; height: 14px; margin-top: 2px; color: var(--good); }
.a-side .sidebar-close { display: none; }

.a-main { min-width: 0; display: flex; flex-direction: column; }
.a-prodbar { display: none; align-items: center; justify-content: center; gap: 8px; padding: 7px 16px; background: var(--warn-bg); border-bottom: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); font-size: 13px; font-weight: 700; }
.adm.is-prod .a-prodbar { display: flex; }
.a-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: var(--top-h); padding: 0 32px; border-bottom: 1px solid var(--line); background: var(--top); backdrop-filter: saturate(140%) blur(10px); }
.a-menu { display: none; }
.a-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; }
.a-crumbs a:hover { color: var(--text); }
.a-crumbs b { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.a-crumbs span { color: var(--line-3); }
.a-top-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.a-switch { display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 11px 0 7px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--text-2); font: 700 12.5px Manrope, sans-serif; cursor: pointer; }
.a-switch:hover { border-color: var(--line-3); color: var(--text); }
.a-switch .t { position: relative; width: 28px; height: 16px; border-radius: 8px; background: var(--line-3); transition: background .2s; }
.a-switch .t::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.a-switch[aria-pressed="true"] .t { background: var(--accent-strong); }
.a-switch[aria-pressed="true"] .t::after { transform: translateX(12px); }
.a-icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; }
.a-icon-btn:hover { background: var(--hover); color: var(--text); }
.a-icon-btn .icon { width: 17px; height: 17px; }
.a-top-tools .a-icon-btn { border-color: var(--line-2); }

/* ---------- Page ---------- */
.a-page { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px 32px 88px; outline: none; }
.a-page > * + * { margin-top: 16px; }
.a-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.a-head h1 { font-size: 27px; font-weight: 750; letter-spacing: -.03em; line-height: 1.15; }
.a-head p { margin-top: 6px; color: var(--text-2); font-size: 14.5px; max-width: 60ch; }
.a-head .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.a-tabs { display: flex; gap: 2px; margin-top: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.a-tabs a { position: relative; flex: 0 0 auto; padding: 10px 12px 12px; color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap; transition: color .15s; }
.a-tabs a:hover { color: var(--text); }
.a-tabs a[aria-current] { color: var(--text); }
.a-tabs a[aria-current]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); }

/* Hints and notices */
.a-explain, .adm .notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.a-explain > .icon, .adm .notice > .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--info); }
.a-explain b { display: block; margin-bottom: 2px; color: var(--text); font-size: 13.5px; }
.a-explain p + p { margin-top: 6px; }
.adm .notice { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.adm .a-explain.keep { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.adm .notice > p { margin: 0; }
.adm:not(.hints) .a-explain:not(.keep), .adm:not(.hints) .hint-only, .hints-off [data-admin-hint] { display: none !important; }
.help-text { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.live-note { display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons, chips, inputs ---------- */
.a-btn, .button, button.primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 700 13.5px Manrope, sans-serif; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, filter .15s; }
.a-btn:hover, .button:hover { background: var(--raise); border-color: var(--line-3); }
.a-btn .icon, .button .icon { width: 15px; height: 15px; }
.a-btn.pri, .button.primary, button.primary { border-color: transparent; background: var(--grad); color: #fff; box-shadow: inset 0 1px 0 #ffffff30, 0 6px 16px -8px #5b6cff99; }
.a-btn.pri:hover, .button.primary:hover { filter: brightness(1.08); }
.a-btn.ghost, .button.ghost { border-color: transparent; background: none; color: var(--text-2); }
.a-btn.ghost:hover, .button.ghost:hover { background: var(--hover); color: var(--text); }
.a-btn.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-bg); color: var(--warn); }
.a-btn.danger { border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-bg); color: var(--bad); }
.a-btn.sm, .button.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-xs); }
.a-btn.block, .button.block { width: 100%; }
.a-btn[disabled], .button[disabled], button[disabled] { opacity: .45; cursor: not-allowed; }
.st { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; line-height: 1; }
.st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.good { color: var(--good); background: var(--good-bg); }
.st.warn { color: var(--warn); background: var(--warn-bg); }
.st.bad { color: var(--bad); background: var(--bad-bg); }
.st.info { color: var(--info); background: var(--info-bg); }
.st.quiet { color: var(--text-2); background: var(--press); }
.ch { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-xs); border: 1px solid var(--line); background: var(--soft); color: var(--text); font: 700 12px Manrope, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch b { color: var(--muted); font-weight: 650; }
.ch.off { color: var(--muted); font-weight: 600; background: none; border-style: dashed; }
kbd { padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--soft); color: var(--muted); font: 700 10.5px var(--f-mono); }
.adm :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select, textarea) { width: 100%; min-width: 0; height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--input); color: var(--text); font: 600 14px Manrope, sans-serif; outline: none; transition: border-color .15s, box-shadow .15s; }
.adm select { padding-right: 32px; appearance: none; -webkit-appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
.adm textarea { height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.adm input:hover, .adm select:hover, .adm textarea:hover { border-color: var(--line-3); }
.adm input:focus, .adm select:focus, .adm textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-bg); }
.adm input::placeholder, .adm textarea::placeholder { color: var(--muted); }
.adm input[type=checkbox], .adm input[type=radio] { width: 17px; height: 17px; accent-color: var(--accent-strong); }
.adm input[type=file] { width: 100%; padding: 9px 12px; border-radius: var(--r-sm); border: 1px dashed var(--line-3); background: var(--input); color: var(--text-2); }
.adm input[aria-invalid=true], .adm select[aria-invalid=true] { border-color: var(--bad); }
.adm fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.adm legend { margin-bottom: 12px; padding: 0; color: var(--text); font-size: 13.5px; font-weight: 750; }
.adm form label { min-width: 0; }
.form-errors, .field-error { color: var(--bad); }

/* ---------- Cards and grids ---------- */
.a-card, .panel { position: relative; min-width: 0; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); container-type: inline-size; }
.a-card-h, .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.a-card-h h2, .panel-heading h2, .a-card > h2 { font-size: 15px; font-weight: 750; letter-spacing: -.01em; }
.a-card-h p, .panel-heading p { margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.a-card-h .a-btn { margin: -4px -6px 0 0; }
.a-grid { display: grid; gap: 16px; align-items: start; }
.a-grid.c2 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.a-grid.c2e { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.a-grid > .a-wide { grid-column: 1 / -1; }
.a-sec :is(h2, h3) { margin-bottom: 10px; color: var(--muted); font-size: 12.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }

/* KPI facts */
.a-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.a-fact { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.a-fact > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.a-fact strong { display: block; font-size: 26px; font-weight: 780; letter-spacing: -.035em; line-height: 1.05; overflow-wrap: anywhere; }
.a-fact strong .st { font-size: 12.5px; letter-spacing: 0; vertical-align: middle; }
.a-fact small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.a-fact.txt strong { font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.4; }
.overview-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.overview-facts .a-fact:first-child { background: radial-gradient(120% 140% at 100% 0%, var(--accent-bg), transparent 60%), var(--panel); border-color: var(--accent-line); }

/* Overview */
.overview-grid { display: grid; gap: 16px; }
.overview-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.overview-attention, .overview-summary { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.overview-attention > .a-card, .overview-summary > .a-card { flex: 1; }
.overview-row > .a-card { height: 100%; }
.chart-panel { display: flex; flex-direction: column; }
.chart-panel .a-bars { flex: 1 1 auto; min-height: 164px; height: auto; }
.a-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.a-q { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); transition: border-color .15s, background .15s, transform .2s var(--ease); }
.a-q:hover { border-color: var(--line-3); background: var(--panel-2); transform: translateY(-1px); }
.a-q .ic { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); }
.a-q .ic .icon { width: 18px; height: 18px; }
.a-q b { display: block; font-size: 14px; font-weight: 750; }
.a-q small { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-q > span:last-child { min-width: 0; }
.a-summary { display: grid; margin: 0; }
.a-summary div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.a-summary div:first-child { border-top: 0; padding-top: 0; }
.a-summary dt { color: var(--text-2); font-size: 13.5px; }
.a-summary dd { margin: 0; font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }

/* Chart */
.chart-panel .a-card-h { margin-bottom: 18px; }
.a-chart-total { display: flex; align-items: baseline; gap: 10px; margin: -6px 0 18px; }
.a-chart-total b { font-size: 26px; font-weight: 780; letter-spacing: -.035em; }
.a-chart-total span { color: var(--muted); font-size: 13px; }
.a-bars { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 164px; padding-top: 4px; background: repeating-linear-gradient(to top, var(--line) 0 1px, transparent 1px 41px); }
.a-bars i { flex: 1; min-width: 3px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #8d9bff, #5865e6); opacity: .92; transition: opacity .15s, filter .15s; }
.a-bars i:hover { opacity: 1; filter: brightness(1.15); }
.a-bars i.z, .a-bars i.is-empty { height: 3px !important; background: var(--line-2); }
.a-axis { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font: 600 11px var(--f-mono); }
.chart-empty { margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.a-day { display: grid; justify-items: center; gap: 6px; padding: 26px 0 12px; text-align: center; }
.a-day b { font-size: 44px; font-weight: 780; letter-spacing: -.04em; line-height: 1; }
.a-day span { color: var(--text-2); font-size: 14px; }
.a-day small { color: var(--muted); font-size: 12.5px; }

/* Attention inbox */
.a-inbox { display: grid; gap: 10px; }
.a-todo { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel-2); }
.a-todo .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.a-todo .ic .icon { width: 17px; height: 17px; }
.a-todo.warn .ic { background: var(--warn-bg); color: var(--warn); }
.a-todo.info .ic { background: var(--info-bg); color: var(--info); }
.a-todo.good .ic { background: var(--good-bg); color: var(--good); }
.a-todo.bad .ic { background: var(--bad-bg); color: var(--bad); }
.a-todo b { display: block; font-size: 14px; font-weight: 750; line-height: 1.4; }
.a-todo p { margin-top: 3px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.a-todo .go { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.a-todo .attention-all { display: inline-block; margin-top: 6px; color: var(--muted); font-size: 12.5px; font-weight: 650; }
.a-todo .attention-all:hover { color: var(--text); }
.attention-empty { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-md); border: 1px dashed var(--line-2); color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.attention-empty::before { content: ''; flex-shrink: 0; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px var(--good-bg); }

/* Product rows */
.a-plist { display: grid; }
.a-prod { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; margin: 0 -12px; border-radius: var(--r-md); transition: background .15s; }
.a-prod + .a-prod { border-top: 1px solid var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
a.a-prod:hover { background: var(--hover); }
.a-prod .pi { width: 40px; height: 40px; border-radius: 11px; }
.a-prod .pi .icon { width: 19px; height: 19px; }
.a-prod > div:not(.chips) { min-width: 0; }
.a-prod b { display: block; font-size: 14.5px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-prod small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-prod .chips { display: grid; grid-template-columns: 118px 190px 190px; gap: 8px; justify-items: start; align-items: center; }
.a-prod .chips .ch { max-width: 100%; }
@container (max-width: 760px) {
  .a-prod { grid-template-columns: 40px minmax(0, 1fr); }
  .a-prod .chips { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
}

/* Event feed */
.a-feed { display: grid; }
.a-ev { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 0; border-top: 1px solid var(--line); }
.a-ev:first-child { border-top: 0; padding-top: 2px; }
.a-ev .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--press); color: var(--text-2); }
.a-ev .ic .icon { width: 15px; height: 15px; }
.a-ev[data-tone=bad] .ic { background: var(--bad-bg); color: var(--bad); }
.a-ev[data-tone=warn] .ic { background: var(--warn-bg); color: var(--warn); }
.a-ev[data-tone=good] .ic { background: var(--good-bg); color: var(--good); }
.a-ev > div { min-width: 0; }
.a-ev b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.a-ev b a:hover { color: var(--accent); }
.a-ev p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.a-ev time { color: var(--muted); font: 600 11.5px var(--f-mono); white-space: nowrap; padding-top: 3px; }
@container (max-width: 520px) { .a-ev { grid-template-columns: 30px minmax(0, 1fr); } .a-ev time { grid-column: 2; padding-top: 0; } }

/* ---------- Tables, toolbar, pagination, empty ---------- */
.table-panel { padding: 6px 20px 8px; }
.table-panel:has(> .a-plist), .table-panel:has(> .a-feed) { padding: 12px 20px; }
.a-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.a-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.a-table th { padding: 12px 12px 10px; border-bottom: 1px solid var(--line); text-align: left; color: var(--muted); font-size: 11.5px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.a-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.a-table tbody tr:last-child td { border-bottom: 0; }
.a-table th:first-child, .a-table td:first-child { padding-left: 0; }
.a-table th:last-child, .a-table td:last-child { padding-right: 0; }
.a-table td:first-child { color: var(--text); font-weight: 700; }
.a-table tr.click { cursor: pointer; }
.a-table tr.click:hover td { background: var(--hover); }
.row-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
.row-link .icon { width: 14px; height: 14px; color: var(--muted); }
.row-link:hover { color: var(--accent); }
.a-tools, .filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.filters { padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.filters label { display: grid; gap: 6px; min-width: 150px; color: var(--muted); font-size: 12.5px; font-weight: 650; }
.adm .filters .search { position: static; display: grid; flex: 1 1 260px; max-width: none; margin: 0; }
.search-input { position: relative; display: block; }
.adm .search-input .icon { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; translate: 0 -50%; transform: none; color: var(--muted); pointer-events: none; }
.adm .search-input input { height: 38px; padding: 0 12px 0 36px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--input); font-size: 14px; }
.filters .a-seg { align-self: flex-end; }
.filter-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.a-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--input); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.a-seg a, .a-seg button { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 11px; border: 0; border-radius: var(--r-xs); background: none; color: var(--text-2); font: 700 12.5px Manrope, sans-serif; white-space: nowrap; cursor: pointer; }
.a-seg a:hover, .a-seg button:hover { color: var(--text); }
.a-seg a[aria-current], .a-seg button[aria-pressed="true"] { background: var(--raise); color: var(--text); box-shadow: 0 1px 0 var(--line-2); }
.a-input { display: flex; align-items: center; gap: 8px; height: 38px; min-width: 260px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--input); }
.a-input .icon { color: var(--muted); }
.adm .a-input input { height: 36px; padding: 0; border: 0; background: none; box-shadow: none; }
.a-more { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.a-more > span { margin-right: auto; }
.adm .empty, .a-empty { display: grid; justify-items: center; gap: 6px; margin: 0; padding: 36px 16px; border: 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.adm .empty .icon, .a-empty > .icon { width: 40px; height: 40px; padding: 10px; margin-bottom: 6px; border-radius: 12px; background: var(--press); color: var(--text-2); }
.adm .empty b, .a-empty b { color: var(--text); font-size: 14.5px; font-weight: 750; }
.adm .empty p, .a-empty p { margin: 0; color: var(--muted); }

/* Shop rules that must not leak into the panel */
.adm .panel + .panel { margin-top: 0; }
.adm .a-page > .panel + .panel, .adm .a-page > * + .panel { margin-top: 16px; }
.related-grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }

/* ---------- Detail, actions ---------- */
.a-dl { display: grid; grid-template-columns: minmax(150px, max-content) minmax(0, 1fr); margin: 0; font-size: 13.5px; }
.a-dl dt, .a-dl dd { margin: 0; padding: 11px 0; border-top: 1px solid var(--line); }
.a-dl dt { padding-right: 20px; color: var(--muted); }
.a-dl dd { color: var(--text); font-weight: 650; overflow-wrap: anywhere; }
.a-dl dt:first-of-type, .a-dl dt:first-of-type + dd { border-top: 0; }
.a-sec { min-width: 0; }
.a-sec > .a-dl { padding: 6px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.actions-title { color: var(--muted); font-size: 12.5px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.actions-area { display: grid; gap: 10px; }
.detail-actions-full { margin-top: 28px; scroll-margin-top: calc(var(--top-h) + 16px); }
.action-panel { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.action-panel > summary { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 14px; list-style: none; cursor: pointer; transition: background .15s; }
.action-panel > summary::-webkit-details-marker { display: none; }
.action-panel > summary:hover { background: var(--hover); }
.action-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); }
.action-icon .icon { width: 18px; height: 18px; }
.action-panel.tone-warn .action-icon { background: var(--warn-bg); color: var(--warn); }
.action-panel.tone-danger .action-icon { background: var(--bad-bg); color: var(--bad); }
.action-title { display: grid; gap: 2px; min-width: 0; flex: 1; }
.action-title b { font-size: 14px; font-weight: 750; }
.action-hint { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.action-chevron { color: var(--muted); transition: transform .2s var(--ease); }
.action-panel[open] .action-chevron { transform: rotate(90deg); }
.action-panel[open] > summary { border-bottom: 1px solid var(--line); }
.action-panel form, .panel > form { display: grid; gap: 16px; padding: 16px; }
.action-panel fieldset { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.action-panel fieldset:last-of-type { padding-bottom: 0; border-bottom: 0; }
.action-panel p, .panel > p { color: var(--text-2); font-size: 13px; line-height: 1.55; }
.action-panel button, .panel > form button { justify-self: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid label, .action-panel form > label, .a-field { display: grid; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 650; }
.a-field > span { color: var(--text); font-size: 13.5px; font-weight: 700; }
.a-field > small { color: var(--muted); font-size: 12.5px; }
.full-width { grid-column: 1 / -1; }
label.checkbox, .panel > form label:has(input[type='checkbox']) { display: flex; align-items: flex-start; gap: 10px; }
.form-footer { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.technical { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.technical > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--text-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.technical dl { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px 18px; margin: 0; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--panel-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.technical dt { font-size: 12.5px; }
.technical dd { margin: 0; overflow-wrap: anywhere; font: 12px/1.6 var(--f-mono); color: var(--text); }
.product-cover { float: right; width: 200px; max-width: 100%; height: auto; margin: 0 0 16px 16px; border-radius: var(--r-md); }
.product-image-preview { display: block; max-width: min(100%, 480px); max-height: 320px; object-fit: contain; border-radius: var(--r-md); }
.a-cover { display: grid; place-items: center; min-height: 120px; border-radius: var(--r-md); border: 1px dashed var(--line-3); overflow: hidden; background: var(--soft); }
.a-cover img { width: 100%; max-height: 260px; object-fit: cover; object-position: top; display: block; }
.wizard, .flow-preview { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.stage { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }
.stage-num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); font: 800 12px var(--f-mono); }
.stage-body { min-width: 0; display: grid; gap: 8px; }
.flow-preview { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.flow-preview li { padding: 8px 10px; border-radius: var(--r-sm); background: var(--soft); border: 1px solid var(--line); color: var(--text-2); font-size: 12px; font-weight: 650; text-align: center; }

/* Pipelines */
.a-pipe { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; counter-reset: s; }
.a-pipe li { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 13px; font-weight: 700; }
.a-pipe li::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font: 800 11px var(--f-mono); background: var(--press); color: var(--muted); }
.a-pipe li.done { color: var(--text-2); }
.a-pipe li.done::before { content: '✓'; font: 900 13px Manrope, sans-serif; background: var(--good-bg); color: var(--good); }
.a-pipe li.now { color: var(--text); border-color: var(--accent-line); background: var(--accent-bg); }
.a-pipe li.now::before { background: var(--grad); color: #fff; }
.pipeline-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); font-size: 13.5px; }
.pipeline-note.bad { border-color: color-mix(in srgb, var(--bad) 30%, transparent); background: var(--bad-bg); }
.pipeline-note .icon { width: 18px; height: 18px; color: var(--bad); }

/* Section headings and host load */
.a-sec-h { margin-bottom: 12px; }
.a-sec-h h2 { font-size: 16px; font-weight: 750; letter-spacing: -.01em; }
.a-sec-h p { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.a-page > .a-sec-h { margin-top: 28px; }
.a-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.a-meter { display: grid; gap: 10px; align-content: start; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.a-meter-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.a-meter strong { font-size: 22px; font-weight: 780; letter-spacing: -.03em; line-height: 1.1; }
.a-meter small { color: var(--muted); font-size: 12.5px; }
.a-meter-pct { font-size: 12.5px; font-weight: 800; }
.a-meter-pct.good { color: var(--good); } .a-meter-pct.warn { color: var(--warn); } .a-meter-pct.bad { color: var(--bad); }
.a-meter-bar { width: 100%; height: 6px; border: 0; border-radius: 999px; overflow: hidden; background: var(--press); appearance: none; -webkit-appearance: none; }
.a-meter-bar::-webkit-progress-bar { background: var(--press); border-radius: 999px; }
.a-meter-bar::-webkit-progress-value { border-radius: 999px; background: var(--good); }
.a-meter-bar::-moz-progress-bar { border-radius: 999px; background: var(--good); }
.a-meter-bar.warn::-webkit-progress-value { background: var(--warn); } .a-meter-bar.warn::-moz-progress-bar { background: var(--warn); }
.a-meter-bar.bad::-webkit-progress-value { background: var(--bad); } .a-meter-bar.bad::-moz-progress-bar { background: var(--bad); }

/* Health */
.a-health { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.a-hc { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.a-hc-h { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.a-hc b { font-size: 14.5px; font-weight: 750; }
.a-hc p { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.a-hc small { color: var(--muted); font: 600 11.5px var(--f-mono); }

/* Glossary and help */
.a-gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.a-g { padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); scroll-margin-top: 90px; }
.a-g:target { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-bg); }
.a-g b { font-size: 14.5px; font-weight: 750; }
.a-g p { margin-top: 6px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.a-faq-list { display: grid; gap: 8px; }
.a-faq { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); scroll-margin-top: 90px; }
.a-faq:target, .a-faq[open] { border-color: var(--accent-line); }
.a-faq summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; }
.a-faq summary::-webkit-details-marker { display: none; }
.a-faq summary .icon { flex-shrink: 0; color: var(--accent); }
.a-faq summary b { font-size: 14.5px; font-weight: 750; }
.a-faq > p, .a-faq-steps, .a-faq-note { margin: 0 16px 14px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.a-faq-steps { padding-left: 22px; display: grid; gap: 6px; }
.a-faq-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: var(--accent-bg); color: var(--text); }
.a-faq-note .icon { flex-shrink: 0; margin-top: 2px; }
.a-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.a-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.a-list li .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--good); }
.term { border-bottom: 1px dashed color-mix(in srgb, var(--info) 60%, transparent); cursor: help; }

/* Release wizard */
.release-picker { padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.release-picker label { flex: 1 1 320px; max-width: 520px; }
.wizard-product { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wizard-product > span { color: var(--muted); font-size: 13px; }
.wizard-product > b { font-size: 16px; }
.wizard-product > a { margin-left: auto; color: var(--accent); font-size: 13px; font-weight: 700; }
.a-wiz { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.a-wiz-nav { position: sticky; top: calc(var(--top-h) + 16px); display: grid; gap: 4px; }
.a-wiz-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid transparent; background: none; color: var(--muted); text-align: left; font: 700 13.5px Manrope, sans-serif; cursor: pointer; }
.a-wiz-nav button:hover { background: var(--hover); color: var(--text); }
.a-wiz-nav button i { width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; display: grid; place-items: center; background: var(--press); font: 800 11px var(--f-mono); font-style: normal; }
.a-wiz-nav button.now { border-color: var(--accent-line); background: var(--accent-bg); color: var(--text); }
.a-wiz-nav button.now i { background: var(--grad); color: #fff; }
.a-wiz-next { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); font: 700 11px Manrope, sans-serif; }
.release-wizard { min-width: 0; }
.a-wiz-step { display: grid; gap: 14px; align-content: start; min-width: 0; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.a-wiz-step > h2 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.a-wiz-step > p { color: var(--text-2); font-size: 14px; line-height: 1.6; }
.a-wiz-step > .a-btn { justify-self: start; }
.a-wiz-step .a-card { padding: 16px; background: var(--panel-2); }
.release-checklist { display: grid; gap: 8px; }
.a-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2); font-size: 13.5px; cursor: pointer; }

/* ---------- Overlays ---------- */
.a-scrim, .nav-scrim { position: fixed; inset: 0; z-index: 80; border: 0; padding: 0; background: #05060899; opacity: 0; pointer-events: none; transition: opacity .2s; }
.a-scrim.on { opacity: 1; pointer-events: auto; }
.adm.nav-open .nav-scrim { opacity: 1; pointer-events: auto; z-index: 35; }
#actions { scroll-margin-top: 16px; }
.a-pop { position: fixed; z-index: 120; max-width: 320px; padding: 12px 14px; border-radius: var(--r-md); background: var(--raise); box-shadow: var(--shadow-pop); color: var(--text-2); font-size: 13px; line-height: 1.5; pointer-events: none; opacity: 0; transition: opacity .15s; }
.a-pop.on { opacity: 1; }
.a-dialog, .cmdk, .ai-dialog { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow-pop); }
.a-dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; margin: auto; }
dialog.a-dialog:not([open]) { display: none; }
.cmdk::backdrop, .ai-dialog::backdrop, .a-dialog::backdrop { background: #05060899; backdrop-filter: blur(2px); }
.a-dialog-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; }
.a-dialog-h .ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); }
.a-dialog-h h2 { font-size: 18px; font-weight: 750; }
.a-dialog-h p { margin-top: 3px; color: var(--text-2); font-size: 13.5px; }
.a-dialog-h .a-icon-btn, .ai-dialog .a-dialog-h button { margin-left: auto; }
.a-dialog-b { flex: 1; overflow-y: auto; padding: 4px 20px 18px; display: grid; gap: 14px; align-content: start; }
.a-dialog-b p { color: var(--text-2); font-size: 13.5px; }
.a-dialog-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }
.ai-dialog .a-field textarea { min-height: 156px; }
.cmdk { position: fixed; inset: 12vh auto auto 50%; transform: translateX(-50%); width: min(620px, calc(100% - 32px)); max-height: 70vh; margin: 0; overflow: hidden; }
.a-cmd-in { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.a-cmd-in .icon { width: 18px; height: 18px; color: var(--muted); }
.adm .cmdk .a-cmd-in input { flex: 1; height: auto; padding: 0; border: 0; background: none; box-shadow: none; font-size: 15.5px; }
.a-cmd-list { max-height: calc(70vh - 56px); overflow-y: auto; margin: 0; padding: 6px; list-style: none; }
.cmdk-list a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--text); font-size: 14px; font-weight: 650; }
.cmdk-list a .icon { color: var(--muted); }
.cmdk-list a small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.cmdk-list a.is-active, .cmdk-list a:hover { background: var(--press); }
.cmdk-empty { margin: 0; padding: 18px; color: var(--muted); text-align: center; }
.a-toast { position: fixed; left: 50%; bottom: 22px; z-index: 130; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--r-md); background: var(--raise); box-shadow: var(--shadow-pop); color: var(--text); font-size: 13.5px; font-weight: 650; transform: translate(-50%, 10px); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast:not([hidden]), .loading:not([hidden]) { opacity: 1; transform: translate(-50%, 0); }
.toast.is-leaving { opacity: 0; transform: translate(-50%, 10px); }
.submit-recovery { display: block; box-sizing: border-box; width: min(520px, calc(100% - 32px)); line-height: 1.5; pointer-events: auto; }
.submit-recovery a { display: flex; align-items: center; min-height: 44px; margin-top: 4px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Confirmation ---------- */
.confirm-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.confirm-summary { padding: 18px 20px 16px; }
.confirm-summary > .panel-heading { margin-bottom: 4px; }
.confirm-facts { display: grid; grid-template-columns: minmax(140px, .45fr) minmax(0, 1fr); margin: 0; }
.confirm-facts dt, .confirm-facts dd { padding: 12px 0; border-bottom: 1px solid var(--line); }
.confirm-facts dt { padding-right: 16px; color: var(--muted); font-size: 13px; }
.confirm-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; white-space: pre-wrap; }
.confirm-facts dd.next { color: var(--good); }
.confirm-facts dd.current { color: var(--muted); text-decoration: line-through; }
.confirm-summary .technical { margin: 14px 0 0; }
.confirm-card { position: sticky; top: calc(var(--top-h) + 16px); display: grid; gap: 12px; padding: 22px; border-color: var(--accent-line); }
.confirm-card h2 { font-size: 18px; font-weight: 750; }
.confirm-card p { color: var(--text-2); font-size: 13px; }
.confirm-card form { display: grid; gap: 14px; margin: 0; padding: 0; }
.adm .otp-input { height: 56px; font: 700 24px/1 var(--f-mono); letter-spacing: .45em; text-align: center; -webkit-text-security: disc; }
.state-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-bg); color: var(--accent); }

/* ---------- Sign-in and error pages ---------- */
.a-login, .admin-login { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 32px 16px; }
.a-login-logo { height: 22px; width: auto; }
.a-login-card { width: min(420px, 100%); display: grid; justify-items: center; gap: 12px; padding: 32px 28px; border-radius: 22px; border: 1px solid var(--line-2); background: radial-gradient(80% 60% at 50% 0%, var(--accent-bg), transparent 70%), var(--panel); text-align: center; box-shadow: 0 40px 80px -40px #000; }
.a-login-mk { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--raise); border: 1px solid var(--line-2); }
.a-login-mk img { width: 36px; }
.a-login-card h1 { font-size: 23px; font-weight: 750; }
.a-login-card > p { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.a-login-notes { list-style: none; margin: 8px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; text-align: left; }
.a-login-notes li { display: flex; gap: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.a-login-notes .icon { margin-top: 2px; color: var(--info); }
.login-widget { width: 100%; }
.login-widget .button { width: 100%; height: 46px; margin-top: 6px; border: 0; border-radius: var(--r-md); background: #1677c2; color: #fff; font-size: 15px; }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.error-page main { width: min(460px, 100%); display: grid; gap: 14px; padding: 32px 28px; border-radius: 22px; border: 1px solid var(--line-2); background: var(--panel); }
.error-page main > img { width: 110px; height: auto; }

/* ---------- Chart bar heights (no inline styles) ---------- */
.a-bars .h0 { height: 0%; } .a-bars .h1 { height: 1%; } .a-bars .h2 { height: 2%; } .a-bars .h3 { height: 3%; } .a-bars .h4 { height: 4%; }
.a-bars .h5 { height: 5%; } .a-bars .h6 { height: 6%; } .a-bars .h7 { height: 7%; } .a-bars .h8 { height: 8%; } .a-bars .h9 { height: 9%; }
.a-bars .h10 { height: 10%; } .a-bars .h11 { height: 11%; } .a-bars .h12 { height: 12%; } .a-bars .h13 { height: 13%; } .a-bars .h14 { height: 14%; }
.a-bars .h15 { height: 15%; } .a-bars .h16 { height: 16%; } .a-bars .h17 { height: 17%; } .a-bars .h18 { height: 18%; } .a-bars .h19 { height: 19%; }
.a-bars .h20 { height: 20%; } .a-bars .h21 { height: 21%; } .a-bars .h22 { height: 22%; } .a-bars .h23 { height: 23%; } .a-bars .h24 { height: 24%; }
.a-bars .h25 { height: 25%; } .a-bars .h26 { height: 26%; } .a-bars .h27 { height: 27%; } .a-bars .h28 { height: 28%; } .a-bars .h29 { height: 29%; }
.a-bars .h30 { height: 30%; } .a-bars .h31 { height: 31%; } .a-bars .h32 { height: 32%; } .a-bars .h33 { height: 33%; } .a-bars .h34 { height: 34%; }
.a-bars .h35 { height: 35%; } .a-bars .h36 { height: 36%; } .a-bars .h37 { height: 37%; } .a-bars .h38 { height: 38%; } .a-bars .h39 { height: 39%; }
.a-bars .h40 { height: 40%; } .a-bars .h41 { height: 41%; } .a-bars .h42 { height: 42%; } .a-bars .h43 { height: 43%; } .a-bars .h44 { height: 44%; }
.a-bars .h45 { height: 45%; } .a-bars .h46 { height: 46%; } .a-bars .h47 { height: 47%; } .a-bars .h48 { height: 48%; } .a-bars .h49 { height: 49%; }
.a-bars .h50 { height: 50%; } .a-bars .h51 { height: 51%; } .a-bars .h52 { height: 52%; } .a-bars .h53 { height: 53%; } .a-bars .h54 { height: 54%; }
.a-bars .h55 { height: 55%; } .a-bars .h56 { height: 56%; } .a-bars .h57 { height: 57%; } .a-bars .h58 { height: 58%; } .a-bars .h59 { height: 59%; }
.a-bars .h60 { height: 60%; } .a-bars .h61 { height: 61%; } .a-bars .h62 { height: 62%; } .a-bars .h63 { height: 63%; } .a-bars .h64 { height: 64%; }
.a-bars .h65 { height: 65%; } .a-bars .h66 { height: 66%; } .a-bars .h67 { height: 67%; } .a-bars .h68 { height: 68%; } .a-bars .h69 { height: 69%; }
.a-bars .h70 { height: 70%; } .a-bars .h71 { height: 71%; } .a-bars .h72 { height: 72%; } .a-bars .h73 { height: 73%; } .a-bars .h74 { height: 74%; }
.a-bars .h75 { height: 75%; } .a-bars .h76 { height: 76%; } .a-bars .h77 { height: 77%; } .a-bars .h78 { height: 78%; } .a-bars .h79 { height: 79%; }
.a-bars .h80 { height: 80%; } .a-bars .h81 { height: 81%; } .a-bars .h82 { height: 82%; } .a-bars .h83 { height: 83%; } .a-bars .h84 { height: 84%; }
.a-bars .h85 { height: 85%; } .a-bars .h86 { height: 86%; } .a-bars .h87 { height: 87%; } .a-bars .h88 { height: 88%; } .a-bars .h89 { height: 89%; }
.a-bars .h90 { height: 90%; } .a-bars .h91 { height: 91%; } .a-bars .h92 { height: 92%; } .a-bars .h93 { height: 93%; } .a-bars .h94 { height: 94%; }
.a-bars .h95 { height: 95%; } .a-bars .h96 { height: 96%; } .a-bars .h97 { height: 97%; } .a-bars .h98 { height: 98%; } .a-bars .h99 { height: 99%; }
.a-bars .h100 { height: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .confirm-layout { grid-template-columns: minmax(0, 1fr); }
  .confirm-card { position: static; }
}
@media (max-width: 1100px) {
  .overview-row, .a-grid.c2 { grid-template-columns: minmax(0, 1fr); }
  .overview-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-wiz { grid-template-columns: minmax(0, 1fr); }
  .a-wiz-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .a-wiz-nav button { flex: 0 0 auto; }
}
@media (max-width: 860px) {
  .a-shell { grid-template-columns: minmax(0, 1fr); }
  .a-side { position: fixed; left: 0; top: 0; bottom: 0; width: min(296px, 86vw); transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: 30px 0 60px -30px #000; }
  .adm.nav-open .a-side { transform: none; }
  .a-side .sidebar-close { display: inline-grid; position: absolute; top: 12px; right: 10px; }
  .a-brand { padding-right: 40px; }
  .a-menu { display: inline-grid; width: 36px; height: 36px; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: none; color: var(--text); cursor: pointer; }
  .a-top { padding: 0 16px; }
  .a-switch .lbl { display: none; }
  .a-page { padding: 20px 16px 80px; }
  .a-grid.c2e { grid-template-columns: minmax(0, 1fr); }
  .a-quick { grid-template-columns: minmax(0, 1fr); }
  .a-pipe, .flow-preview { grid-auto-flow: row; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .technical dl, .confirm-facts { grid-template-columns: minmax(0, 1fr); }
  .table-panel { padding: 4px 16px 6px; }
  .a-scroll { margin: 0; padding: 0; overflow: visible; }
  .a-table.cards thead { display: none; }
  .a-table.cards, .a-table.cards tbody { display: block; }
  .a-table.cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .a-table.cards tbody tr:last-child { border-bottom: 0; }
  .a-table.cards td { padding: 0; border: 0; }
  .a-table.cards td:first-child { grid-column: 1 / -1; }
  .a-table.cards td[data-l]::before { content: attr(data-l) ' · '; color: var(--muted); font-size: 12px; font-weight: 600; }
  .filters { padding: 12px; }
  .filters label { min-width: 0; flex: 1 1 140px; }
  .filter-actions { margin-left: 0; width: 100%; }
  .filter-actions .a-btn { flex: 1; }
}
@media (max-width: 520px) {
  .overview-facts { grid-template-columns: minmax(0, 1fr); }
  .a-head h1 { font-size: 23px; }
  .a-crumbs > a, .a-crumbs > span { display: none; }
  .a-top-tools a.a-icon-btn { display: none; }
  .a-head .acts { width: 100%; }
  .a-head .acts .a-btn { flex: 1; }
  .a-gloss { grid-template-columns: minmax(0, 1fr); }
  .a-dl { grid-template-columns: minmax(0, 1fr); }
  .a-dl dt { padding-bottom: 0; border-top: 1px solid var(--line); }
  .a-dl dd { padding-top: 2px; border-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .adm * { transition: none !important; animation: none !important; } }

/* Support conversation (D-086) */
.support-thread{display:grid;gap:.6rem;margin:0 0 1rem}
.support-msg{max-width:46rem;padding:.7rem .9rem;border-radius:10px;border:1px solid var(--line,rgba(127,127,127,.25))}
.support-msg.mine{justify-self:end;background:rgba(124,108,255,.12)}
.support-msg small{display:block;opacity:.7;margin-bottom:.3rem}
.support-msg p{margin:0;overflow-wrap:anywhere}
.action-panel textarea{width:100%;min-height:7rem}
