/* Scanners: The Works™ — static coming-soon + UI preview */
:root {
  --bg: #0b0b0b;
  --panel: #141414;
  --panel2: #1a1a1a;
  --border: #2a2a2a;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --yellow: #f5e000;
  --green: #22c55e;
  --red: #ef4444;
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: Consolas, "Cascadia Mono", monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: #111;
  color: var(--text);
}
body.demo-open {
  overflow: hidden;
  background: var(--bg);
}

/* ---- Landing ---- */
.landing {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}
.landing-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.landing-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
}
.landing-head h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.tagline {
  margin: 4px 0 0;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.soon-pill {
  margin-left: auto;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.lede {
  line-height: 1.55;
  color: #ccc;
  font-size: 0.98rem;
  margin: 0 0 20px;
}
.lede strong { color: #eee; }
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.about h2 {
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--yellow);
}
.about ul {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  color: #ccc;
  line-height: 1.5;
  font-size: 0.92rem;
}
.about li { margin: 6px 0; }
.muted { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.landing-foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: #888;
}

/* ---- Buttons ---- */
.btn {
  border: 1px solid var(--border);
  background: #1f1f1f;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn:hover { background: #2a2a2a; }
.btn-primary {
  background: var(--yellow);
  color: #111;
  border-color: var(--yellow);
  font-weight: 800;
}
.btn-primary:hover { background: #ffe94d; }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-hint {
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  color: var(--yellow);
  border-color: #4a4500;
}

/* ---- Demo chrome ---- */
.app-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  z-index: 20;
}
.app-wrap[hidden] { display: none !important; }
.demo-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  background: #1a1608;
  border-bottom: 1px solid #3a3510;
  font-size: 0.78rem;
  color: #e0d090;
}
.demo-label { font-weight: 700; letter-spacing: 0.04em; }

#app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-header img.brand-logo { height: 44px; width: auto; }
.brand-text { flex: 1; min-width: 0; }
.brand-text .name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand-text .tag {
  color: var(--yellow);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.brand-text .tag-sub {
  color: var(--muted);
  font-size: 0.65rem;
  margin-top: 2px;
}
.app-version {
  font-size: 0.6rem;
  color: #444;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.anniv-badge {
  height: 48px;
  width: auto;
  flex-shrink: 0;
  margin-left: auto;
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
}
.tier-chip {
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.first-run {
  background: #15140c;
  border-bottom: 1px solid #3a3510;
  padding: 10px 14px;
  flex-shrink: 0;
}
.first-run[hidden] { display: none !important; }
.first-run-title {
  font-weight: 800;
  color: var(--yellow);
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.first-run-steps {
  margin: 0 0 8px;
  padding-left: 1.2rem;
  color: #ccc;
  font-size: 0.82rem;
  line-height: 1.45;
}
.first-run-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
}
.first-run-note kbd {
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.75rem;
}
.first-run-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.offline-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #141820;
  border: 1px solid #2a3550;
  border-radius: 8px;
}
.offline-banner-main { display: flex; flex-direction: column; gap: 2px; }
.offline-banner-text { color: var(--muted); font-size: 0.8rem; }
.offline-banner-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.desk-model-pill.is-offline { border-color: #555; color: #aaa; }
.desk-model-pill.is-online { border-color: var(--green); color: var(--green); }
.rr-easy { margin-bottom: 8px; }

/* RR Easy wizard (match app shell) */
.rr-page-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.rr-page-tab {
  border: 1px solid var(--border);
  background: #141414;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.rr-page-tab.on {
  background: #1a1a10;
  color: var(--text);
  border-color: var(--yellow);
  font-weight: 800;
}
.rr-wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.rr-wiz-step {
  border: 1px solid var(--border);
  background: #121212;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.rr-wiz-step.on {
  border-color: var(--yellow);
  color: var(--text);
  background: #1a1a10;
  font-weight: 800;
}
.rr-wiz-step.done {
  color: #a0c070;
  border-color: #2a3a20;
}
.rr-step-panel {
  margin-bottom: 12px;
}
.rr-step-panel h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}
.rr-login-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(200px, 1.6fr);
  gap: 12px 16px;
  align-items: start;
}
.rr-login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.rr-login-field label.sub,
.rr-login-field .sub {
  display: block;
  margin: 0;
  line-height: 1.2;
  font-size: 0.78rem;
  color: var(--muted);
}
.rr-login-field input.mode {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.rr-login-help {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}
.rr-login-help a {
  color: var(--yellow);
  font-weight: 600;
}
.rr-login-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 720px) {
  .rr-login-grid {
    grid-template-columns: 1fr;
  }
}
.sample-list {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.hud .status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.hud .status .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.hud .status.off .dot {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}
.hud .meta { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }
.hud .sep { color: #333; }
.com-lab { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
#portSelect,
#scannerSelect {
  background: #1a1a1a;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.hud-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.workflow {
  display: flex;
  background: #0e0e0e;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.workflow .step {
  flex: 1;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 8px 4px;
  cursor: pointer;
  font-family: var(--font);
}
.workflow .step:last-child { border-right: none; }
.workflow .step.active {
  background: var(--yellow);
  color: #111;
  font-weight: 800;
}
.workflow .step span {
  display: block;
  font-size: 0.65rem;
  opacity: 0.8;
  margin-top: 2px;
  letter-spacing: 0;
  font-weight: 600;
}

.main {
  display: grid;
  grid-template-columns: 160px 1fr;
  flex: 1;
  min-height: 0;
}
.nav {
  background: var(--panel2);
  border-right: 1px solid var(--border);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: auto;
}
.nav button {
  text-align: left;
  border: 1px solid transparent;
  background: #141414;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.nav button:hover { background: #1c1c1c; color: var(--text); }
.nav button.on {
  background: #1a1a10;
  color: var(--text);
  border-color: #2a2a2a;
  box-shadow: inset 3px 0 0 var(--yellow);
  font-weight: 800;
}
.nav-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  line-height: 1.2;
}
.nav-stack .nav-main {
  font-weight: 700;
  font-size: 0.85rem;
}
.nav-stack .nav-small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}
.nav button.on.nav-stack .nav-small {
  color: #c8e6a0;
}
.prog-desk-sub {
  font-size: 0.75em;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.35em;
}
.nav-foot {
  margin-top: auto;
  padding: 10px 6px 4px;
  font-size: 0.65rem;
  color: #6a6a6a;
  line-height: 1.35;
  border-top: 1px solid #222;
}

.content-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: #101010;
}
.subnav:empty { display: none; }
.subnav button {
  border: 1px solid var(--border);
  background: #1a1a1a;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.subnav button.on {
  background: #2a2800;
  color: var(--yellow);
  border-color: #4a4500;
}

.content {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 16px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  background: var(--bg);
}
.content.show { display: flex; }
.content-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.content-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.content-head .sub {
  color: var(--muted);
  font-size: 0.82rem;
}
select.mode, input.mode {
  background: #1a1a1a;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: var(--font);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
  background: #151515;
}
.desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  background: #0d0d0d;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
table.data th {
  text-align: left;
  padding: 7px 8px;
  background: #161616;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
table.data td {
  padding: 6px 8px;
  border-bottom: 1px solid #1a1a1a;
}
table.data tr:nth-child(even) td { background: #111; }
.mono { font-family: var(--mono); font-size: 0.8rem; }
.ok { color: var(--green); }
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.card h4 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.big {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--mono);
}
.big.small { font-size: 1rem; font-family: var(--font); }
.big.muted { color: var(--muted); }
.big.green { color: var(--green); font-size: 1.15rem; }
.sample-pre {
  margin: 0;
  padding: 10px;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #b0b0b0;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 180px;
}
.sample-list {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.banner {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #3a5a20;
  background: #0f1a0c;
  color: #c8e6a0;
  font-size: 0.82rem;
  line-height: 1.4;
}
.banner .wc-title {
  font-weight: 800;
  color: #b8e060;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.banner ul { margin: 4px 0 0; padding-left: 1.1rem; }
.banner[hidden] { display: none !important; }

.probe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  min-height: 280px;
}
.probe-cell {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.probe-cell h4 {
  margin: 0;
  font-size: 0.8rem;
  color: var(--yellow);
}
.probe-cell .sample-pre { flex: 1; max-height: none; }

.toast {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a10;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 50;
  max-width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.toast[hidden] { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal[hidden] { display: none !important; }
.modal-card {
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  padding: 16px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.modal-head h3 { margin: 0; font-size: 1rem; color: var(--yellow); }
.modal-body {
  font-size: 0.88rem;
  color: #ccc;
  line-height: 1.5;
}
.modal-body ul { padding-left: 1.15rem; }

@media (max-width: 800px) {
  .main { grid-template-columns: 1fr; }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .nav-foot { display: none; }
  .panel-grid, .probe-grid { grid-template-columns: 1fr; }
  .probe-grid { grid-template-rows: none; }
  .soon-pill { margin-left: 0; }
}
