:root {
  --page-bg: #0d0812;
  --ink: #ffffff;
  --body: rgba(255, 255, 255, 0.78);
  --muted: rgba(255, 255, 255, 0.56);
  --faint: rgba(255, 255, 255, 0.36);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --panel: rgba(255, 255, 255, 0.045);
  --brand: #b890cf;
  --brand-deep: #9264a2;
  --brand-soft: rgba(184, 144, 207, 0.16);
  --amber: #f5a623;
  --green: #6ce9a6;
  --blue: #84caff;
  --red: #ff8f8f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 12% 10%, rgba(146, 100, 162, 0.2), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(245, 166, 35, 0.08), transparent 30%),
    var(--page-bg);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
  color: var(--body);
  font-family: var(--font-family-body);
  overflow-x: hidden;
}

button { font: inherit; }

.demo-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px);
}

.recording-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.026));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.recording-window { padding: 14px; }

.mock-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: stretch;
}

.mock-app { min-width: 0; display: flex; flex-direction: column; }

.browser-chrome {
  height: 42px;
  display: grid;
  grid-template-columns: 10px 10px 10px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.045);
}

.browser-chrome > span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.browser-chrome > span:nth-child(1) { background: var(--amber); }
.browser-chrome > span:nth-child(2) { background: var(--brand); }
.browser-chrome > span:nth-child(3) { background: var(--green); }

.address-pill {
  min-width: 0;
  height: 26px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-family: var(--font-family-mono);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-canvas {
  position: relative;
  min-height: clamp(560px, 63vh, 700px);
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    #100a16;
  background-size: 32px 32px;
  overflow: hidden;
}

.app-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.992);
  pointer-events: none;
  transition: opacity 260ms var(--ease-standard), transform 260ms var(--ease-standard);
}

.demo-shell[data-view="desktop"] [data-app-view="desktop"],
.demo-shell[data-view="intake"] [data-app-view="intake"],
.demo-shell[data-view="billing"] [data-app-view="billing"],
.demo-shell[data-view="crm"] [data-app-view="crm"],
.demo-shell[data-view="report"] [data-app-view="report"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ============================================================================
   DESKTOP + DOCK (app launch)
   ============================================================================ */
.desktop-app { position: relative; height: 100%; display: flex; flex-direction: column; }
.desktop-wall {
  flex: 1; min-height: 0; position: relative; padding: 28px 30px;
  background:
    radial-gradient(circle at 24% 26%, rgba(146, 100, 162, 0.16), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(132, 201, 255, 0.08), transparent 40%);
}
.desktop-icons { display: flex; flex-direction: column; gap: 22px; width: 96px; }
.desk-icon {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0; border: 0; background: transparent; color: var(--body);
  transition: transform 180ms var(--ease-standard);
}
.desk-glyph {
  width: 64px; height: 64px; display: inline-grid; place-items: center;
  border-radius: 16px; color: var(--ink);
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  transition: border-color 180ms var(--ease-standard), background 180ms var(--ease-standard), box-shadow 180ms var(--ease-standard);
}
.desk-icon[data-desk="intake"] .desk-glyph { color: var(--brand); }
.desk-icon small { font-family: var(--font-family-mono); font-size: 10.5px; color: var(--body); text-align: center; }
.desk-icon.pressed { transform: scale(0.95); }
.desk-icon.pressed .desk-glyph,
.desk-icon.launching .desk-glyph {
  border-color: rgba(245, 166, 35, 0.6); background: rgba(245, 166, 35, 0.12);
  box-shadow: 0 0 28px rgba(245, 166, 35, 0.26);
}

.desktop-dock {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 0 auto 14px; padding: 9px 18px;
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(6px);
}
.dock-item {
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.06);
}
.dock-item.dock-launch { border-color: rgba(184, 144, 207, 0.5); background: rgba(184, 144, 207, 0.18); }
.dock-item.dock-launch.pressed { border-color: rgba(245, 166, 35, 0.6); background: rgba(245, 166, 35, 0.18); transform: scale(0.94); }

/* ===== Login field / button shared bits ===== */
.input-row { display: block; margin-top: 12px; }
.input-row span {
  display: block; margin-bottom: 6px;
  color: var(--muted); font-family: var(--font-family-mono); font-size: 11px;
}
.input-row b {
  display: flex; align-items: center; min-height: 42px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.075); color: var(--ink);
  font-family: var(--font-family-mono); font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden;
}
.input-row b.typing::after {
  content: ""; width: 7px; height: 14px; margin-left: 3px;
  background: var(--amber); animation: blink 700ms steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-logo b { display: block; color: var(--ink); font-family: var(--font-family-display); font-weight: 650; }

.primary-action {
  width: 100%; min-height: 42px; margin-top: 18px;
  border: 1px solid rgba(184, 144, 207, 0.38); border-radius: 999px;
  color: var(--ink); background: linear-gradient(135deg, #9264a2, #643974);
  font-family: var(--font-family-display); font-size: 14px; font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 26px rgba(146, 100, 162, 0.2);
}
.primary-action.pressed { transform: scale(0.99); filter: brightness(1.12); }

.ghost-action, .primary-action.compact {
  width: auto; min-height: 38px; margin: 0; padding: 8px 14px;
  border-radius: 999px; white-space: nowrap;
}
.primary-action.compact.active, .post-button.active {
  border-color: rgba(245, 166, 35, 0.58); box-shadow: 0 0 26px rgba(245, 166, 35, 0.16);
}

/* ===== App shell (top bar, side, content, statusbar) ===== */
.erp-app, .report-app { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; }

.erp-top, .workspace-top {
  min-height: 46px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.035);
}
.erp-top b, .workspace-top b { color: var(--ink); font-family: var(--font-family-display); font-size: 15px; font-weight: 700; }
.erp-top span, .workspace-top span {
  min-width: 0; color: var(--muted); font-family: var(--font-family-mono); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.erp-icon {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid rgba(245, 166, 35, 0.3);
  color: #201304; background: var(--amber);
  font-family: var(--font-family-display); font-weight: 800;
}
.erp-icon.crm-icon {
  background: linear-gradient(135deg, rgba(132, 201, 255, 0.6), rgba(146, 100, 162, 0.9));
  color: #fff; border-color: rgba(132, 201, 255, 0.4);
}

.erp-statusbar {
  display: flex; align-items: center; gap: 20px; min-height: 30px; padding: 0 16px;
  border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--muted); font-family: var(--font-family-mono); font-size: 10.5px;
}
.erp-statusbar .sb-status { margin-left: auto; color: var(--green); }

/* ===== System login cards (billing + crm) ===== */
.sys-login-card {
  position: absolute; left: 50%; top: 50%; z-index: 30;
  width: min(420px, calc(100% - 48px)); padding: 24px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #15101c; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
  opacity: 0; transform: translate(-50%, -46%) scale(0.98); pointer-events: none;
  transition: none; /* hide instantly - no crossfade ghosting over the surface below */
}
.demo-shell[data-step="billing-login"] .billing-login-card,
.demo-shell[data-step="crm-login"] .crm-login-card {
  opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto;
  transition: opacity 220ms var(--ease-standard), transform 220ms var(--ease-standard); /* fade-IN only */
}
.demo-shell[data-step="billing-login"] .billing-body,
.demo-shell[data-step="billing-login"] .tab-bar,
.demo-shell[data-step="crm-login"] .crm-body,
.demo-shell[data-step="crm-login"] .crm-tab-bar { filter: blur(3px); opacity: 0.1; }

/* ===== Tab bar (windowed enterprise app) ===== */
.tab-bar {
  display: flex; align-items: stretch; gap: 1px;
  min-height: 38px; padding: 0 6px;
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.app-tab {
  display: inline-flex; flex: none; align-items: center; padding: 0 10px;
  border-bottom: 2px solid transparent;
  color: var(--muted); font-family: var(--font-family-mono); font-size: 10.5px;
  white-space: nowrap;
  transition: color 160ms var(--ease-standard), border-color 160ms var(--ease-standard), background 160ms var(--ease-standard);
}
.app-tab.active {
  color: var(--ink); border-bottom-color: var(--amber); background: rgba(245, 166, 35, 0.06);
}

/* ============================================================================
   ORDER INTAKE - request queue + opened request
   ============================================================================ */
.intake-layout {
  flex: 1; min-height: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr);
  gap: 16px; padding: 16px;
}

.queue-panel {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}
.queue-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.queue-head b { color: var(--ink); font-family: var(--font-family-display); font-size: 14px; }
.queue-new {
  padding: 4px 9px; border-radius: 999px;
  color: var(--green); background: rgba(108, 233, 166, 0.1); border: 1px solid rgba(108, 233, 166, 0.4);
  font-family: var(--font-family-mono); font-size: 10px; font-weight: 700;
}
.queue-row {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.025); text-align: left;
  transition: border-color 180ms var(--ease-standard), background 180ms var(--ease-standard), opacity 180ms var(--ease-standard);
}
.queue-row .q-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.queue-row .q-meta { min-width: 0; }
.queue-row .q-meta b { display: block; color: var(--ink); font-family: var(--font-family-display); font-size: 13px; }
.queue-row .q-meta small { display: block; margin-top: 2px; color: var(--muted); font-family: var(--font-family-mono); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-row .q-tag {
  padding: 4px 9px; border-radius: 999px; font-style: normal;
  color: var(--muted); background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-family-mono); font-size: 10px; font-weight: 700;
}
.queue-row[data-queue-row="a"] .q-dot { background: var(--green); }
.queue-row.open { border-color: rgba(245, 166, 35, 0.55); background: rgba(245, 166, 35, 0.08); box-shadow: 0 0 22px rgba(245, 166, 35, 0.12); }
.queue-row.open .q-tag { color: var(--amber); background: rgba(245, 166, 35, 0.12); }
.queue-row.done { opacity: 0.6; }
.queue-row.done .q-dot { background: var(--green); }
.queue-row.held .q-dot { background: var(--red); }
.queue-row.held .q-tag { color: var(--red); background: rgba(255, 143, 143, 0.12); }

.intake-detail { min-width: 0; }
/* empty placeholder before a request is opened */
.intake-empty {
  height: 100%; min-height: 220px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.intake-empty-glyph { color: var(--faint); margin-bottom: 4px; }
.intake-empty b { color: var(--body); font-family: var(--font-family-display); font-size: 15px; }
.intake-empty small { color: var(--muted); font-family: var(--font-family-mono); font-size: 11px; }
/* card hidden until a request is opened; placeholder hidden once it is */
.intake-form-card { display: none; }
.demo-shell[data-intake="open"] .intake-empty { display: none; }
.demo-shell[data-intake="open"] .intake-form-card { display: block; }
.intake-form-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}
.intake-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.intake-form-head b { color: var(--ink); font-family: var(--font-family-display); font-size: 18px; }
.intake-badge {
  padding: 6px 12px; border-radius: 999px;
  color: var(--amber); background: rgba(245, 166, 35, 0.1); border: 1px solid rgba(245, 166, 35, 0.4);
  font-family: var(--font-family-mono); font-size: 11px; font-weight: 700;
}
.intake-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.intake-field {
  min-height: 56px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard);
}
.intake-field.active { border-color: rgba(245, 166, 35, 0.5); background: rgba(245, 166, 35, 0.07); }
.intake-field span { display: block; margin-bottom: 5px; color: var(--muted); font-family: var(--font-family-mono); font-size: 10px; }
.intake-field b { display: block; color: var(--ink); font-family: var(--font-family-display); font-size: 13px; line-height: 1.25; }
.intake-field[data-intake="addr"] { grid-column: span 2; }
.intake-field[data-intake="plan"] { grid-column: span 2; }
.intake-submit {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line);
  font-family: var(--font-family-mono); font-size: 11px;
}
.intake-csr { color: var(--muted); }
.intake-trigger { color: var(--green); }

/* ============================================================================
   BILLING SYSTEM - SIM inventory search
   ============================================================================ */
.billing-body { flex: 1; min-height: 0; padding: 14px 16px; display: flex; flex-direction: column; overflow: hidden; }
.sim-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sim-search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}
.sim-search .search-ico { color: var(--brand); font-size: 15px; }
.sim-search b { min-width: 0; color: var(--ink); font-family: var(--font-family-mono); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.sim-search b.typing::after {
  content: ""; display: inline-block; width: 7px; height: 14px; margin-left: 3px; vertical-align: -2px;
  background: var(--amber); animation: blink 700ms steps(1) infinite;
}
.sim-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-family: var(--font-family-mono); font-size: 11px; }
.sim-filter { color: var(--muted); }
.sim-filter em { color: var(--green); font-style: normal; }
.sim-count { color: var(--amber); }

.sim-table { display: grid; gap: 5px; }
.sim-row {
  display: grid; grid-template-columns: 1.5fr 1fr 0.6fr 0.7fr; gap: 10px; align-items: center;
  min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--body); font-family: var(--font-family-mono); font-size: 11px;
  transition: border-color 180ms var(--ease-standard), background 180ms var(--ease-standard), opacity 180ms var(--ease-standard);
}
.sim-head { color: var(--brand); background: rgba(184, 144, 207, 0.12); font-weight: 700; }
.sim-stat { font-style: normal; }
.sim-stat.idle { color: var(--green); }
.sim-stat.busy { color: var(--faint); }
.sim-row.dim { opacity: 0.4; }
.sim-row.picked {
  border-color: rgba(245, 166, 35, 0.6); background: rgba(245, 166, 35, 0.09);
  box-shadow: 0 0 22px rgba(245, 166, 35, 0.14);
}
.sim-row.captured { border-color: rgba(108, 233, 166, 0.4); background: rgba(108, 233, 166, 0.07); }
.sim-row.captured .sim-stat { color: var(--green); }
.sim-row.released { border-color: rgba(132, 201, 255, 0.4); background: rgba(132, 201, 255, 0.06); }
.sim-row.released .sim-stat { color: var(--blue); }

.sim-capture {
  display: flex; align-items: center; gap: 13px; margin-top: 10px;
  padding: 10px 15px; border: 1px solid rgba(108, 233, 166, 0.3); border-radius: 8px;
  background: rgba(108, 233, 166, 0.06);
  opacity: 0; transform: translateY(8px);
  transition: opacity 240ms var(--ease-standard), transform 240ms var(--ease-standard);
}
.demo-shell[data-step="capture-sim"] .sim-capture,
.demo-shell[data-step="capture-sim-b"] .sim-capture,
.demo-shell[data-step="release-sim"] .sim-capture { opacity: 1; transform: none; }
.demo-shell[data-step="release-sim"] .sim-capture { border-color: rgba(132, 201, 255, 0.4); background: rgba(132, 201, 255, 0.07); }
.demo-shell[data-step="release-sim"] .sim-capture-state { color: var(--blue); }
.sim-capture-icon {
  width: 42px; height: 32px; flex: none; display: inline-grid; place-items: center;
  border-radius: 6px; color: var(--ink); background: rgba(184, 144, 207, 0.2); border: 1px solid rgba(184, 144, 207, 0.34);
  font-family: var(--font-family-mono); font-size: 10px; font-weight: 800;
}
.sim-capture-meta { flex: 1; min-width: 0; }
.sim-capture-meta b { display: block; color: var(--ink); font-family: var(--font-family-display); font-size: 14px; }
.sim-capture-meta small { display: block; margin-top: 2px; color: var(--muted); font-family: var(--font-family-mono); font-size: 11px; }
.sim-capture-state { color: var(--green); font-family: var(--font-family-mono); font-size: 11px; font-weight: 700; }

/* ============================================================================
   CRM SYSTEM - customer/account forms, subscriber, credit, hold
   ============================================================================ */
.crm-body { position: relative; flex: 1; min-height: 0; padding: 16px; overflow: hidden; }

.crm-panel { display: none; }
.demo-shell[data-crm-panel="customer"] .crm-panel[data-crm-panel="customer"],
.demo-shell[data-crm-panel="account"] .crm-panel[data-crm-panel="account"],
.demo-shell[data-crm-panel="credit"] .crm-panel[data-crm-panel="credit"],
.demo-shell[data-crm-panel="subscriber"] .crm-panel[data-crm-panel="subscriber"] { display: block; }

/* create + hold sit side by side, both present from the first appearance */
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.form-actions .post-button { margin-top: 0; }
.ghost-button {
  min-height: 40px; padding: 9px 18px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--body); background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-family-display); font-weight: 650;
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard), color 160ms var(--ease-standard), transform 160ms var(--ease-standard);
}
.ghost-button.active {
  transform: scale(0.98); color: var(--ink);
  border-color: rgba(245, 166, 35, 0.7); background: rgba(245, 166, 35, 0.12);
  box-shadow: 0 0 24px rgba(245, 166, 35, 0.2);
}

/* Credit Check tab - empty state + Run */
.credit-panel { display: flex; flex-direction: column; }
.credit-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; text-align: center; min-height: 160px; margin: 6px 0 14px;
  border: 1px dashed var(--line-strong); border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.credit-empty-glyph { color: var(--faint); margin-bottom: 2px; }
.credit-empty b { color: var(--body); font-family: var(--font-family-display); font-size: 15px; }
.credit-empty small { color: var(--muted); font-family: var(--font-family-mono); font-size: 11px; }
.credit-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.credit-panel-foot .post-button { margin-top: 0; }
.credit-applicant { color: var(--muted); font-family: var(--font-family-mono); font-size: 11px; }
#accountBadge, #creditPanelBadge {
  padding: 6px 11px; border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-family-mono); font-size: 11px; font-weight: 600;
}
#accountBadge.posted { color: var(--green); background: rgba(108, 233, 166, 0.08); }

.sys-form {
  padding: 16px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}
.form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.form-head b { color: var(--ink); font-family: var(--font-family-display); font-size: 18px; }
.form-head span {
  padding: 6px 11px; border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-family-mono); font-size: 11px; font-weight: 600;
}
.form-head span.posted { color: var(--green); background: rgba(108, 233, 166, 0.08); }
.form-head span.active-badge { color: var(--green); background: rgba(108, 233, 166, 0.12); border: 1px solid rgba(108, 233, 166, 0.4); }
.form-head span.pending { color: var(--amber); background: rgba(245, 166, 35, 0.1); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.sys-field {
  min-height: 44px; display: block; padding: 6px 11px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.045);
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard), box-shadow 160ms var(--ease-standard);
}
.sys-field span { display: block; margin-bottom: 5px; color: rgba(255, 255, 255, 0.62); font-family: var(--font-family-mono); font-size: 10px; }
.sys-field b { display: block; min-height: 18px; color: var(--ink); font-family: var(--font-family-display); font-size: 13px; line-height: 1.2; }
.sys-field b.typing::after {
  content: ""; display: inline-block; width: 6px; height: 13px; margin-left: 3px; vertical-align: -2px;
  background: var(--amber); animation: blink 700ms steps(1) infinite;
}
.sys-field.active { border-color: rgba(245, 166, 35, 0.54); background: rgba(245, 166, 35, 0.08); box-shadow: 0 0 22px rgba(245, 166, 35, 0.12); }
.sys-field.filled { border-color: rgba(108, 233, 166, 0.32); background: rgba(108, 233, 166, 0.055); }
.sub-field-wide { grid-column: span 3; }

.sys-divider { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.sys-divider::before, .sys-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sys-divider span { color: var(--brand); font-family: var(--font-family-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.post-button {
  min-height: 40px; margin-top: 4px; padding: 9px 18px;
  border: 1px solid rgba(184, 144, 207, 0.38); border-radius: 999px;
  color: var(--ink); background: linear-gradient(135deg, #9264a2, #643974);
  font-family: var(--font-family-display); font-weight: 700;
}
.post-button.active { transform: scale(0.98); filter: brightness(1.14); border-color: rgba(245, 166, 35, 0.7); box-shadow: 0 0 28px rgba(245, 166, 35, 0.3); }
#activateButton.activated { background: rgba(108, 233, 166, 0.12); border-color: rgba(108, 233, 166, 0.45); color: var(--green); }

/* subscriber form: status flips to Active */
.sub-form.active { border-color: rgba(108, 233, 166, 0.34); box-shadow: 0 0 34px rgba(108, 233, 166, 0.08); }

/* number pool */
.number-pool {
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  opacity: 0; transform: translateY(8px); visibility: hidden; height: 0; margin: 0; padding: 0; overflow: hidden;
  transition: opacity 200ms var(--ease-standard), transform 200ms var(--ease-standard);
}
.demo-shell[data-step="check-pool"] .number-pool,
.demo-shell[data-step="assign-number"] .number-pool {
  opacity: 1; transform: none; visibility: visible; height: auto;
  padding: 9px; margin: 2px 0 8px;
}
.pool-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.pool-head b { color: var(--ink); font-family: var(--font-family-display); font-size: 14px; }
.pool-head span { color: var(--amber); font-family: var(--font-family-mono); font-size: 11px; }
.pool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pool-num {
  min-height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.035);
  color: var(--body); font-family: var(--font-family-mono); font-size: 12px;
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard), color 160ms var(--ease-standard);
}
.pool-num.picked {
  border-color: rgba(245, 166, 35, 0.6); background: rgba(245, 166, 35, 0.1); color: var(--ink);
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.16);
}
.pool-num.assigned { border-color: rgba(108, 233, 166, 0.4); background: rgba(108, 233, 166, 0.08); color: var(--green); }

/* ===== Credit + hold overlays ===== */
.report-item {
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 220ms var(--ease-standard), transform 220ms var(--ease-standard), border-color 180ms var(--ease-standard), background 180ms var(--ease-standard);
}
.report-item.visible { opacity: 1; transform: none; pointer-events: auto; }

.credit-window, .hold-window {
  position: absolute; left: 50%; top: 50%; z-index: 26;
  width: min(460px, calc(100% - 48px)); padding: 20px;
  border: 1px solid rgba(184, 144, 207, 0.34); border-radius: 8px;
  background: #16101e; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.78);
  transform: translate(-50%, -44%) scale(0.96);
  transition: none; /* hide instantly - no crossfade ghosting when credit/hold swap at the same center */
}
.credit-window.visible, .hold-window.visible {
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 220ms var(--ease-standard), transform 220ms var(--ease-standard); /* fade-IN only */
}
/* solid backdrop behind any open overlay (no bleed-through) */
.demo-shell[data-step="credit-run"] .crm-body,
.demo-shell[data-step="credit-wait"] .crm-body,
.demo-shell[data-step="credit-result"] .crm-body,
.demo-shell[data-step="credit-fail"] .crm-body,
.demo-shell[data-step="hold-route"] .crm-body,
.demo-shell[data-step="credit-wait-b"] .crm-body,
.demo-shell[data-step="credit-result-b"] .crm-body { filter: blur(2px); }
.crm-scrim {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(8, 5, 12, 0.82);
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease-standard);
}
.demo-shell[data-step="credit-run"] .crm-scrim,
.demo-shell[data-step="credit-wait"] .crm-scrim,
.demo-shell[data-step="credit-result"] .crm-scrim,
.demo-shell[data-step="credit-fail"] .crm-scrim,
.demo-shell[data-step="hold-route"] .crm-scrim,
.demo-shell[data-step="credit-wait-b"] .crm-scrim,
.demo-shell[data-step="credit-result-b"] .crm-scrim { opacity: 1; }

.credit-head, .hold-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.credit-head b, .hold-head b { color: var(--ink); font-family: var(--font-family-display); font-size: 19px; line-height: 1.15; }
.credit-status { color: var(--amber); font-family: var(--font-family-mono); font-size: 11px; font-weight: 700; }
.credit-status.approved { color: var(--green); }
.credit-status.failed { color: var(--red); }
.hold-status { color: var(--red); font-family: var(--font-family-mono); font-size: 11px; font-weight: 700; flex: none; }

.credit-spinner {
  display: grid; place-items: center; gap: 10px; min-height: 84px; margin-bottom: 8px;
}
.credit-spinner i {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid rgba(184, 144, 207, 0.24); border-top-color: var(--amber);
  animation: spin 720ms linear infinite;
}
.credit-spinner em { color: var(--muted); font-family: var(--font-family-mono); font-size: 11px; font-style: normal; }

.credit-result { display: none; }
.credit-window.result .credit-result { display: grid; gap: 0; }
.credit-window.result .credit-spinner { display: none; }
.credit-row, .hold-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 34px; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-family-mono); font-size: 12px;
}
.credit-row span, .hold-row span { color: var(--muted); flex: none; }
.credit-row b, .hold-row b { color: var(--ink); text-align: right; }
.credit-verdict.approved { color: var(--green); }
.credit-verdict.failed { color: var(--red); }
.credit-note {
  margin: 13px 0 0; padding: 11px; border-radius: 8px;
  border: 1px solid rgba(245, 166, 35, 0.4); background: rgba(245, 166, 35, 0.08);
  color: var(--amber); font-family: var(--font-family-mono); font-size: 11px; line-height: 1.5;
}

/* ===== Exception routing screen (Request A) ===== */
.hold-window { border-color: rgba(255, 143, 143, 0.45); background: #1b1016; }
.hold-detail { display: grid; gap: 0; }
.hold-actions { display: grid; gap: 7px; margin-top: 14px; }
.hold-step {
  display: flex; align-items: center; gap: 9px; min-height: 26px;
  color: var(--faint); font-family: var(--font-family-mono); font-size: 11.5px;
  opacity: 0.45; transition: color 200ms var(--ease-standard), opacity 200ms var(--ease-standard);
}
.hold-step::before {
  content: ""; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: background 200ms var(--ease-standard), border-color 200ms var(--ease-standard), box-shadow 200ms var(--ease-standard);
}
.hold-step.done { color: var(--body); opacity: 1; }
.hold-step.done::before { border-color: rgba(255, 143, 143, 0.6); background: var(--red); box-shadow: 0 0 12px rgba(255, 143, 143, 0.3); }
.hold-step.route.done::before { border-color: rgba(132, 201, 255, 0.6); background: var(--blue); box-shadow: 0 0 12px rgba(132, 201, 255, 0.3); }
.hold-note {
  margin: 13px 0 0; padding: 11px; border-radius: 8px;
  border: 1px solid rgba(132, 201, 255, 0.42); background: rgba(132, 201, 255, 0.08);
  color: var(--blue); font-family: var(--font-family-mono); font-size: 11px; line-height: 1.5;
}

/* ============================================================================
   COMPLETE - checklist
   ============================================================================ */
.report-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 18px; }
.completion-checklist {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  width: min(620px, calc(100% - 56px)); padding: 22px;
  border: 1px solid rgba(108, 233, 166, 0.3); border-radius: 8px;
  background: rgba(19, 11, 25, 0.94); transform: translate(-50%, -44%) scale(0.96);
}
.completion-checklist.visible { transform: translate(-50%, -50%) scale(1); }
.completion-checklist > b { display: block; margin-bottom: 14px; color: var(--ink); font-family: var(--font-family-display); font-size: 21px; line-height: 1.15; }
.completion-checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-item { min-height: 30px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; opacity: 0.42; }
.check-item::before { content: ""; width: 16px; height: 16px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; }
.check-item.checked { color: var(--body); opacity: 1; }
.check-item.checked::before { border-color: rgba(108, 233, 166, 0.6); background: var(--green); box-shadow: 0 0 14px rgba(108, 233, 166, 0.28); }
.check-item.final { margin-top: 4px; color: var(--ink); font-family: var(--font-family-display); font-size: 15px; font-weight: 750; }

/* ============================================================================
   RIGHT-HAND STEP LIST (sidebar, phased)
   ============================================================================ */
.action-panel {
  min-width: 0; min-height: 100%; max-height: clamp(560px, 63vh, 700px);
  display: flex; flex-direction: column;
  padding: 14px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(13, 8, 18, 0.72); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(184, 144, 207, 0.34) transparent;
}
.action-panel::before {
  content: "IDW actions"; display: block; margin-bottom: 12px;
  color: var(--brand); font-family: var(--font-family-mono);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.action-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 11px; }

.action-list li {
  display: flex; align-items: flex-start; gap: 10px; min-height: 0;
  padding: 0; border: 0; background: transparent;
}
.action-list li::before {
  content: ""; flex: none; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  transition: background 240ms var(--ease-standard), box-shadow 240ms var(--ease-standard);
}
.action-list b { display: block; font-family: var(--font-family-display); font-size: 13px; line-height: 1.3; color: var(--faint); transition: color 240ms var(--ease-standard), text-shadow 240ms var(--ease-standard); }
.action-list li.active::before { background: var(--amber); box-shadow: 0 0 10px rgba(245, 166, 35, 0.7); }
.action-list li.active b { color: var(--ink); }
.action-list li.done::before { background: var(--green); box-shadow: 0 0 11px rgba(108, 233, 166, 0.8); }
.action-list li.done b { color: var(--ink); text-shadow: 0 0 12px rgba(108, 233, 166, 0.3); }

.action-list li.phase { margin-top: 10px; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.action-list li.phase:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.action-list li.phase::before { display: none; }
.action-list li.phase b {
  color: var(--brand); font-family: var(--font-family-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
/* final rail dot turns green at completion */
.demo-shell[data-step="complete"] .action-list li[data-action="complete"].active::before { background: var(--green); box-shadow: 0 0 11px rgba(108, 233, 166, 0.8); }
.demo-shell[data-step="complete"] .action-list li[data-action="complete"].active b { color: var(--ink); text-shadow: 0 0 12px rgba(108, 233, 166, 0.3); }

/* ===== Compact tier ===== */
@media (max-width: 760px) {
  .mock-workspace { grid-template-columns: 1fr; }
  .action-panel { max-height: none; }
  .action-panel::before { display: none; }
  .action-list { grid-template-columns: 1fr 1fr; gap: 9px 16px; }
  .action-list li.phase { grid-column: 1 / -1; }

  /* keep multi-column tables; tighten where needed */
  .intake-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
  .intake-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intake-field[data-intake="addr"],
  .intake-field[data-intake="plan"] { grid-column: span 2; }

  .form-grid, .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub-field-wide { grid-column: span 2; }
  .pool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* SIM table: drop IMSI column gracefully but keep type+status visible */
  .sim-row { grid-template-columns: 1.5fr 0.7fr 0.7fr; gap: 8px; }
  .sim-row span:nth-child(2) { display: none; }
  .sim-head span:nth-child(2) { display: none; }

  .credit-row, .hold-row { font-size: 11px; }
  .desktop-icons { flex-direction: row; flex-wrap: wrap; width: auto; }
}

/* ===== Embed mode (?embed=1) + bare mode (?bare=1) ===== */
html[data-embed], html[data-embed] body { min-height: 0; background: transparent; }
html[data-embed] body { overflow: hidden; }
.demo-shell[data-embed] { width: 100%; min-height: 0; padding: 0; margin: 0; }
.demo-shell[data-embed] .recording-window { padding: 10px; }
.demo-shell[data-bare] .recording-card { border: 0; background: transparent; box-shadow: none; border-radius: 0; }
.demo-shell[data-bare] .recording-window { padding: 0; }

/* ============================================================================
   LIGHT MODE (token flip + dark-surface reskin), matching the other demos.
   ============================================================================ */
[data-theme="light"] {
  --page-bg: #f7f7f8;
  --ink: #2a2730; --body: rgba(42,39,48,0.86); --muted: rgba(42,39,48,0.58); --faint: rgba(42,39,48,0.42);
  --line: rgba(20,18,24,0.11); --line-strong: rgba(20,18,24,0.17); --panel: rgba(20,18,24,0.03);
  --brand: #7e4e90; --brand-deep: #643974; --brand-soft: rgba(146,100,162,0.12);
  --amber: #c77f12; --green: #16a34a; --blue: #2563eb; --red: #d6453f;
  --shadow: 0 18px 44px rgba(40,40,42,0.12);
}
[data-theme="light"] body {
  background:
    linear-gradient(rgba(20,18,24,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,18,24,0.028) 1px, transparent 1px),
    radial-gradient(circle at 12% 10%, rgba(146,100,162,0.10), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(245,166,35,0.05), transparent 30%),
    var(--page-bg);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
}
[data-theme="light"] .screen-canvas {
  background:
    linear-gradient(rgba(20,18,24,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,18,24,0.025) 1px, transparent 1px),
    #f7f7f8;
  background-size: 32px 32px;
}
[data-theme="light"] .recording-card { background: linear-gradient(180deg, #ffffff, #fbfbfc); }
[data-theme="light"] .browser-chrome { background: rgba(20,18,24,0.03); }
[data-theme="light"] .address-pill { background: rgba(20,18,24,0.045); }
[data-theme="light"] .action-panel { background: rgba(255,255,255,0.7); }
[data-theme="light"] .erp-app,
[data-theme="light"] .report-app,
[data-theme="light"] .intake-form-card,
[data-theme="light"] .queue-panel,
[data-theme="light"] .sys-form,
[data-theme="light"] .sys-field,
[data-theme="light"] .intake-field,
[data-theme="light"] .queue-row,
[data-theme="light"] .sim-row,
[data-theme="light"] .number-pool,
[data-theme="light"] .pool-num,
[data-theme="light"] .desk-glyph,
[data-theme="light"] .completion-checklist { background: #ffffff; }
[data-theme="light"] .sys-login-card,
[data-theme="light"] .credit-window { background: #ffffff; }
[data-theme="light"] .hold-window { background: #fff4f4; }
[data-theme="light"] .crm-scrim { background: rgba(40, 38, 44, 0.5); }
[data-theme="light"] .primary-action,
[data-theme="light"] .post-button { color: #ffffff; }
[data-theme="light"] .erp-icon.crm-icon { color: #ffffff; }

/* ============================================================
   UNIFIED PILL BUTTON STANDARD (global) — sleek, consistent
   height across every CTA/pill button in every flow.
   Appended last so it wins the cascade. Height = ~32px.
   ============================================================ */
.primary-action,
.primary-action.compact,
.ghost-action,
.ghost-action.db-search-button,
.db-search-button,
.ghost-button,
.company-trigger,
.company-trigger.selected,
.post-button,
.export-button,
.archive-source-button,
.compose-send-button,
.save-reservation-button,
.record-save-button,
.new-mail-button,
.dl-button,
.replay-button {
  min-height: 32px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.15;
  border-radius: 999px;
}

.action-list li.phase { grid-column: 1 / -1; }
