/* Mapsmith — cockpit UI. One accent (volt), graphite surfaces, mono for anything a tuner copies. */
:root {
  --bg: #0a0b0d;
  --bg-2: #0e1013;
  --panel: #13161a;
  --panel-2: #181c21;
  --line: #232830;
  --line-2: #2e343d;
  --ink: #eef2f6;
  --ink-2: #b4bcc7;
  --ink-3: #7c8592;
  --ink-4: #555d69;
  --volt: #c8ff2e;
  --volt-ink: #0b0d06;
  --volt-dim: rgba(200, 255, 46, 0.12);
  --volt-glow: rgba(200, 255, 46, 0.35);
  --amber: #ffb547;
  --amber-dim: rgba(255, 181, 71, 0.12);
  --red: #ff5c5c;
  --red-dim: rgba(255, 92, 92, 0.12);
  --cyan: #5ce1ff;
  --radius: 14px;
  --radius-lg: 22px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
body::before {          /* faint engineering grid */
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 8px; }

/* ---------- buttons */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px;
  border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--ink);
  font-weight: 560; font-size: 15px; letter-spacing: -0.005em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .25s;
}
.btn:hover { border-color: #3d4550; background: #1d2228; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: var(--volt); color: var(--volt-ink); border-color: transparent;
  box-shadow: 0 0 0 0 var(--volt-glow), 0 8px 24px -10px var(--volt-glow);
}
.btn-primary:hover { background: #d6ff5c; box-shadow: 0 0 0 4px var(--volt-dim), 0 10px 30px -10px var(--volt-glow); border-color: transparent; }
.btn-xl { --h: 60px; padding: 0 30px; font-size: 17px; border-radius: 16px; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--panel-2); color: var(--ink); border-color: var(--line); }
.btn-danger:hover { color: var(--red); border-color: rgba(255,92,92,.4); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--ink-2);
  transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--volt); border-color: rgba(200,255,46,.4); background: var(--volt-dim); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 550; letter-spacing: .01em;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--panel);
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-volt { color: var(--volt); border-color: rgba(200,255,46,.3); background: var(--volt-dim); }
.chip-amber { color: var(--amber); border-color: rgba(255,181,71,.3); background: var(--amber-dim); }
.chip-red { color: var(--red); border-color: rgba(255,92,92,.3); background: var(--red-dim); }

/* ---------- login */
.login {
  position: relative; z-index: 1;
  min-height: 100%; display: grid; place-items: center; padding: 32px 16px;
}
.login-card { width: min(440px, 100%); text-align: center; }
.login-mark { width: 132px; height: 132px; margin: 0 auto 8px; }
.login-mark canvas { width: 100%; height: 100%; }
.brand-word { font-size: 30px; font-weight: 680; letter-spacing: -0.035em; margin: 0; }
.brand-word b { color: var(--volt); font-weight: inherit; }
.login-tag { color: var(--ink-3); margin: 6px 0 36px; font-size: 15.5px; }
.login-form { display: grid; gap: 12px; }
.field {
  position: relative; display: flex; align-items: center;
  height: 60px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel);
  transition: border-color .2s, box-shadow .25s;
}
.field:focus-within { border-color: rgba(200,255,46,.55); box-shadow: 0 0 0 4px var(--volt-dim); }
.field svg { width: 20px; height: 20px; margin-left: 18px; color: var(--ink-3); flex: none; }
.field input {
  flex: 1; height: 100%; border: 0; background: transparent; outline: none;
  padding: 0 18px 0 12px; font-size: 17px; letter-spacing: .02em;
}
.field input::placeholder { color: var(--ink-4); letter-spacing: 0; }
.login-error { min-height: 22px; color: var(--red); font-size: 14px; margin: 2px 0 0; }
.shake { animation: shake .42s var(--ease); }
@keyframes shake { 0%,100% { transform: none } 20% { transform: translateX(-10px) } 40% { transform: translateX(8px) } 60% { transform: translateX(-5px) } 80% { transform: translateX(3px) } }
.login-foot { margin-top: 40px; color: var(--ink-4); font-size: 12.5px; }

/* ---------- app shell */
.shell { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  height: 68px; padding: 0 28px;
  background: rgba(10,11,13,.78); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand canvas { width: 36px; height: 36px; }
.brand span { font-size: 18px; font-weight: 680; letter-spacing: -0.03em; }
.brand span b { color: var(--volt); font-weight: inherit; }
.tabs { display: flex; gap: 4px; margin-left: 18px; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.tab {
  height: 36px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent;
  color: var(--ink-3); font-weight: 560; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: color .2s, background .2s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.tab .count { font: 500 11.5px var(--mono); color: var(--ink-3); padding: 1px 6px; border-radius: 6px; background: var(--bg-2); }
.topbar .spacer { flex: 1; }
.lib-pill { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.lib-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 10px var(--volt); }

main { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 32px 28px 64px; }
.view[hidden] { display: none !important; }

/* ---------- convert layout */
.convert-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }
.eyebrow { font: 500 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* the stage: dropzone → decoding → result */
.stage {
  position: relative; overflow: hidden;
  min-height: 460px; border-radius: 26px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(200,255,46,.06), transparent 55%),
    linear-gradient(180deg, #121519, #0e1013);
  border: 1px solid var(--line);
  isolation: isolate;
}
.stage::after {           /* dashed drop border, drawn inside */
  content: ""; position: absolute; inset: 14px; border-radius: 18px;
  border: 1.5px dashed rgba(255,255,255,.09); pointer-events: none;
  transition: border-color .25s, inset .3s var(--ease), background .25s;
}
.stage.dragging::after { border-color: var(--volt); inset: 10px; background: rgba(200,255,46,.04); }
.stage.busy::after, .stage.done::after, .stage.failed::after { border-color: transparent; }

.stage-idle, .stage-run, .stage-result {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 28px; text-align: center;
  transition: opacity .45s var(--ease), transform .55s var(--ease);
}
.stage:not(.idle) .stage-idle { opacity: 0; transform: scale(.97); pointer-events: none; }
.stage:not(.busy):not(.done):not(.failed) .stage-run { opacity: 0; pointer-events: none; }
.stage:not(.done):not(.failed) .stage-result { opacity: 0; transform: translateY(14px); pointer-events: none; }

.drop-art { position: relative; width: 116px; height: 116px; margin-bottom: 26px; }
.drop-art .tile {
  position: absolute; inset: 0; border-radius: 30px;
  background: linear-gradient(160deg, #1d2228, #14171b); border: 1px solid var(--line-2);
  display: grid; place-items: center;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .35s var(--ease);
}
.drop-art .tile svg { width: 46px; height: 46px; color: var(--volt); }
.drop-art .ghost { transform: rotate(-9deg) translate(-16px, 6px); opacity: .5; }
.drop-art .ghost2 { transform: rotate(8deg) translate(16px, 8px); opacity: .3; }
.stage.dragging .drop-art .tile:last-child { transform: translateY(-8px) scale(1.04); }
.stage-idle h1 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.035em; line-height: 1.1; margin: 0 0 10px; font-weight: 680; }
.stage-idle p { color: var(--ink-3); margin: 0 0 30px; font-size: 16px; max-width: 460px; }
.stage-idle .hint { margin-top: 18px; font-size: 13px; color: var(--ink-4); display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.stage-idle .hint span { display: inline-flex; align-items: center; gap: 6px; }
.stage-idle .hint svg { width: 14px; height: 14px; }
kbd { font: 500 11.5px var(--mono); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2); }

.decode-canvas { width: min(640px, 100%); aspect-ratio: 16 / 9; }
.run-meta { width: min(520px, 100%); margin-top: 4px; }
.run-file { font: 500 13px var(--mono); color: var(--ink-3); margin-bottom: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.steps li { display: grid; gap: 8px; font-size: 12px; color: var(--ink-4); text-align: left; transition: color .3s; }
.steps li::before { content: ""; height: 3px; border-radius: 3px; background: var(--line-2); transition: background .35s var(--ease), box-shadow .35s; }
.steps li.on { color: var(--ink-2); }
.steps li.on::before { background: var(--volt); box-shadow: 0 0 12px var(--volt-glow); }
.stage.busy .stage-run { transform: none; }
.stage.done, .stage.failed { min-height: 580px; }
.stage.done .stage-run, .stage.failed .stage-run { transform: translateY(-150px) scale(.72); opacity: .9; }
.stage.done .run-meta, .stage.failed .run-meta { opacity: 0; }

.stage-result { justify-content: flex-end; padding-bottom: 36px; gap: 18px; }
.result-id { font: 600 clamp(34px, 5vw, 52px)/1 var(--mono); letter-spacing: -0.02em; }
.result-id small { display: block; font: 500 12px var(--mono); letter-spacing: .16em; color: var(--ink-3); margin-bottom: 10px; text-transform: uppercase; }
.result-vehicle { color: var(--ink-2); font-size: 16px; margin-top: -6px; }
.result-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.result-note { font-size: 13px; color: var(--ink-3); }
.result-note a { color: var(--ink-2); }
.result-note b { color: var(--ink-2); font-weight: 600; }
.stage.failed .result-id { color: var(--red); font-size: 30px; font-family: var(--font); letter-spacing: -0.02em; }
.fail-msg { max-width: 520px; color: var(--ink-2); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.kpi { padding: 16px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.kpi b { display: block; font: 600 26px/1.1 var(--mono); letter-spacing: -0.02em; }
.kpi span { font-size: 13px; color: var(--ink-3); }
.kpi.accent b { color: var(--volt); }
.kpi.warn b { color: var(--amber); }

/* report */
.report { margin-top: 20px; }
.report[hidden] { display: none; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button { height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-3); font-size: 13.5px; font-weight: 560; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button .n { font: 500 11px var(--mono); color: var(--ink-3); }
.report-body { padding: 4px 20px 20px; }
.report-empty { padding: 28px; text-align: center; color: var(--ink-3); }
.fix { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 24px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.fix:first-child { border-top: 0; }
.fix .t { font-weight: 580; font-size: 14px; }
.fix .w { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.fix .was { font: 500 12.5px var(--mono); color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(255,92,92,.6); }
.fix .now { font: 500 12.5px var(--mono); color: var(--volt); }
.fix .arrow { color: var(--ink-4); }
.fix .why { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); margin-top: -6px; }
.check { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.check:first-child { border-top: 0; }
.check svg { width: 18px; height: 18px; color: var(--amber); flex: none; margin-top: 2px; }
.check.info svg { color: var(--cyan); }
.check b { font-weight: 580; }
.check span { color: var(--ink-3); }
.tables-list { max-height: 460px; overflow: auto; margin: 0 -20px; }
.trow { display: grid; grid-template-columns: 1fr 64px 92px 104px; gap: 12px; padding: 9px 20px; font-size: 13.5px; border-top: 1px solid var(--line); align-items: center; }
.trow:hover { background: var(--panel-2); }
.trow .a { font: 500 12.5px var(--mono); color: var(--ink-3); }
.trow .c { font-size: 12px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font: 500 11px var(--mono); padding: 2px 7px; border-radius: 6px; justify-self: start; }
.tag.reference, .tag.ported { color: var(--volt); background: var(--volt-dim); }
.tag.discovered { color: var(--cyan); background: rgba(92,225,255,.1); }
.tag.fixed { color: var(--amber); background: var(--amber-dim); }
.filter { height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); padding: 0 12px; font-size: 13.5px; width: 220px; outline: none; }
.filter:focus { border-color: rgba(200,255,46,.5); }

/* recent */
.recent { position: sticky; top: 92px; }
.recent-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.ritem { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; cursor: pointer; transition: background .2s; }
.ritem:hover { background: var(--panel-2); }
.ritem .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 8px var(--volt-glow); }
.ritem.failed .dot { background: var(--red); box-shadow: none; }
.ritem .nm { font-weight: 560; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ritem .sub { font: 500 12px var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ritem .acts { display: flex; gap: 6px; }
.recent-empty { padding: 26px 20px 30px; color: var(--ink-3); font-size: 14px; text-align: center; }
.recent-foot { border-top: 1px solid var(--line); padding: 10px 12px; }
.recent-foot .btn { width: 100%; }

/* history */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 4px 0 0; font-size: 30px; letter-spacing: -0.035em; font-weight: 680; }
.page-head p { margin: 6px 0 0; color: var(--ink-3); max-width: 620px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--ink-3); }
.search input { height: 46px; width: 320px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 14px 0 40px; outline: none; font-size: 14.5px; }
.search input:focus { border-color: rgba(200,255,46,.5); box-shadow: 0 0 0 4px var(--volt-dim); }
.htable { width: 100%; border-collapse: collapse; }
.htable th { text-align: left; font: 500 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.htable td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.htable tr.row { cursor: pointer; transition: background .15s; }
.htable tr.row:hover td { background: var(--panel-2); }
.htable tr:last-child td { border-bottom: 0; }
.htable .f { font-weight: 560; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htable .m { font: 500 13px var(--mono); color: var(--ink-2); }
.htable .d { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.htable .acts { display: flex; gap: 8px; justify-content: flex-end; }
.history-empty { padding: 60px 20px; text-align: center; color: var(--ink-3); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); }

/* drawer */
.drawer-back { position: fixed; inset: 0; background: rgba(4,5,6,.6); backdrop-filter: blur(3px); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100%); z-index: 41; background: var(--bg-2); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .45s var(--ease); display: flex; flex-direction: column; }
.drawer-open .drawer-back { opacity: 1; pointer-events: auto; }
.drawer-open .drawer { transform: none; }
.drawer-head { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; gap: 16px; align-items: flex-start; }
.drawer-head .grow { flex: 1; min-width: 0; }
.drawer-head h2 { margin: 6px 0 4px; font: 600 28px/1 var(--mono); letter-spacing: -0.02em; }
.drawer-head .file { color: var(--ink-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { overflow: auto; padding: 20px 24px 40px; }
.drawer-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.drawer .kpis { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.meta-grid { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; margin: 20px 0; font-size: 13.5px; }
.meta-grid dt { color: var(--ink-3); }
.meta-grid dd { margin: 0; font-family: var(--mono); font-size: 12.5px; word-break: break-all; color: var(--ink-2); }

/* library */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lib-card { padding: 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.lib-card .id { font: 600 24px/1 var(--mono); letter-spacing: -0.02em; }
.lib-card .nm { color: var(--ink-2); font-size: 14.5px; }
.lib-card .facts { display: flex; gap: 18px; font-size: 13px; color: var(--ink-3); }
.lib-card .facts b { color: var(--ink); font: 600 15px var(--mono); display: block; }
.lib-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-size: 12.5px; color: var(--ink-4); }
.lib-top { display: flex; justify-content: space-between; align-items: center; }
.lib-mm { font-size: 12px; color: var(--ink-3); }
.lib-note { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.lib-bases { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--ink-3); }
.lib-add { border-style: dashed; border-color: var(--line-2); background: transparent; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot { position: relative; border-radius: 14px; border: 1px dashed var(--line-2); padding: 16px 12px; text-align: center; cursor: pointer; transition: all .2s var(--ease); min-height: 96px; display: grid; place-items: center; gap: 4px; }
.slot:hover, .slot.dragging { border-color: rgba(200,255,46,.6); background: var(--volt-dim); }
.slot.filled { border-style: solid; border-color: rgba(200,255,46,.4); }
.slot b { font-size: 13.5px; font-weight: 600; display: block; }
.slot span { font-size: 12px; color: var(--ink-3); word-break: break-all; }
.slot svg { width: 20px; height: 20px; color: var(--ink-3); }
.slot.filled svg { color: var(--volt); }
.text-input { height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); padding: 0 14px; outline: none; width: 100%; font-size: 14.5px; }
.text-input:focus { border-color: rgba(200,255,46,.5); }
.callout { padding: 16px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.callout svg { width: 20px; height: 20px; color: var(--volt); flex: none; margin-top: 1px; }

/* toast */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; }
.toast { padding: 12px 18px; border-radius: 12px; background: #1d2228; border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px #000; font-size: 14px; animation: toast-in .4s var(--ease); display: flex; gap: 10px; align-items: center; }
.toast.err { border-color: rgba(255,92,92,.4); }
.toast.ok svg { color: var(--volt); }
.toast.err svg { color: var(--red); }
.toast svg { width: 18px; height: 18px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* page fade */
.view { animation: view-in .5s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1080px) {
  .convert-grid { grid-template-columns: 1fr; }
  .recent { position: static; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 16px; gap: 10px; height: auto; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
  .tab { flex: 1; justify-content: center; padding: 0 8px; }
  .lib-pill { display: none; }
  main { padding: 20px 16px 48px; }
  .stage { min-height: 520px; }
  .kpis, .drawer .kpis { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(5, 1fr); }
  .steps li { font-size: 0; }
  .fix { grid-template-columns: 1fr; gap: 4px; }
  .fix .arrow { display: none; }
  .trow { grid-template-columns: 1fr 80px; }
  .trow .c, .trow .tag:last-child { display: none; }
  .search input { width: 100%; }
  .search { width: 100%; }
  .htable .hide-sm { display: none; }
  .meta-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
