* { box-sizing: border-box; }

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-subtle: #f7f8fa;
  --surface-raised: #ffffff;
  --border: #dfe3ea;
  --border-strong: #c2c9d6;
  --text: #14171f;
  --text-muted: #5b6472;
  --text-faint: #8a92a0;
  --accent: #2f5fdc;
  --accent-soft: #e9eefc;
  --accent-strong: #2449b0;
  --green: #16815a;
  --green-soft: #e6f6ee;
  --red: #c22c2c;
  --red-soft: #fbe9e9;
  --amber: #96620a;
  --amber-soft: #fdf1dc;
  --media-bg: #10141c;
  --shadow-xs: 0 1px 2px rgba(20, 23, 31, 0.05), 0 1px 1px rgba(20, 23, 31, 0.04);
  --shadow-sm: 0 4px 10px rgba(20, 23, 31, 0.07), 0 1px 3px rgba(20, 23, 31, 0.05);
  --shadow-md: 0 10px 24px rgba(20, 23, 31, 0.10), 0 2px 6px rgba(20, 23, 31, 0.06);
  --shadow-lg: 0 20px 48px rgba(20, 23, 31, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --rail-width: 248px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur-fast: 120ms;
  --dur-med: 200ms;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #10131a;
  --surface: #181d27;
  --surface-subtle: #13161e;
  --surface-raised: #1e2430;
  --border: #2c3342;
  --border-strong: #414b5e;
  --text: #eef1f7;
  --text-muted: #9ba5b6;
  --text-faint: #6f7994;
  --accent: #7fa0ff;
  --accent-soft: rgba(127, 160, 255, 0.16);
  --accent-strong: #9db6ff;
  --green: #4fc189;
  --green-soft: rgba(79, 193, 137, 0.15);
  --red: #ff6f6f;
  --red-soft: rgba(255, 111, 111, 0.15);
  --amber: #ecb04a;
  --amber-soft: rgba(236, 176, 74, 0.15);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

a { color: var(--accent); }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  overflow: hidden;
}

.login-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.setup-waiting {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.setup-waiting-card {
  width: min(100%, 480px);
  display: grid;
  gap: 14px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.setup-waiting-card .brand-mark {
  width: 34px;
  height: 34px;
}

.setup-waiting-card h1,
.setup-waiting-card p {
  margin: 0;
}

.setup-waiting-card > p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 15px;
}

.setup-waiting-actions,
.workspace-access-resolution-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.login-mode {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 4px;
}

.login-mode .button {
  min-height: 36px;
  padding: 7px 8px;
  font-size: 12px;
}

.login-mode .button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.login-mode .button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.social-auth {
  display: grid;
  gap: 10px;
  margin: 16px 0 14px;
}

.social-auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.social-auth-divider::before,
.social-auth-divider::after {
  content: "";
  height: 1px;
  background: var(--border);
}

.social-auth-buttons {
  display: grid;
  gap: 8px;
}

.social-auth-button {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.social-auth-button:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.social-auth-mark {
  width: 22px;
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 800;
}

.onboarding-page {
  position: fixed;
  inset: 0;
  z-index: 35;
  overflow: auto;
  background: #fff;
  color: #111827;
}

.onboarding-bg-canvas {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.onboarding-shell {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.onboarding-topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid #edf0f5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.onboarding-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.onboarding-audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.onboarding-volume input {
  width: 112px;
  accent-color: #2f5fdc;
}

.onboarding-main {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px);
  align-items: stretch;
}

.onboarding-hero {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 72px);
  overflow: hidden;
}

.onboarding-core {
  width: min(68vw, 620px);
  max-width: 100%;
  aspect-ratio: 1;
  height: auto;
  display: block;
}

.onboarding-launch {
  position: absolute;
  left: clamp(24px, 6vw, 80px);
  bottom: clamp(28px, 7vw, 92px);
  max-width: 540px;
}

.onboarding-launch h1 {
  margin: 8px 0 10px;
  font-size: clamp(32px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: 0;
}

.onboarding-lede {
  max-width: 500px;
  margin: 0 0 24px;
  color: #4b5563;
  font-size: 17px;
}

.onboarding-start {
  min-width: 148px;
}

.onboarding-console {
  display: grid;
  grid-template-rows: minmax(180px, 1fr) auto auto auto;
  gap: 14px;
  padding: clamp(18px, 3vw, 38px);
  border-left: 1px solid #edf0f5;
  background: rgba(251, 252, 254, 0.9);
  backdrop-filter: blur(10px);
}

.onboarding-transcript {
  min-height: 180px;
  max-height: 42vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
}

.onboarding-message {
  max-width: 94%;
  padding: 12px 14px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  box-shadow: var(--shadow-xs);
}

.onboarding-message.user {
  align-self: flex-end;
  background: #eef6f4;
  border-color: #c9e5dd;
}

.onboarding-message.assistant {
  align-self: flex-start;
}

.onboarding-section-title {
  margin-bottom: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.onboarding-readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.onboarding-readiness .onboarding-section-title {
  grid-column: 1 / -1;
}

.onboarding-readiness-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #1f2937;
  font-size: 13px;
}

.onboarding-readiness-row small {
  color: #667085;
  font-weight: 700;
}

.onboarding-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d0d5dd;
}

.onboarding-dot.ready { background: #16815a; }
.onboarding-dot.todo { background: #2f5fdc; }

.onboarding-dashboard-preview {
  display: grid;
  gap: 10px;
}

.onboarding-research {
  display: grid;
  gap: 10px;
}

.onboarding-research-card {
  border: 1px solid #dce3ee;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  color: #172033;
}

.onboarding-research-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.onboarding-research-card small {
  color: #5d6678;
}

.onboarding-research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.onboarding-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-preview {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  text-align: left;
  cursor: pointer;
}

.onboarding-preview strong {
  font-size: 13px;
}

.onboarding-preview span {
  color: #667085;
  font-size: 12px;
}

.onboarding-preview.active,
.onboarding-preview:hover {
  border-color: #2f5fdc;
  box-shadow: 0 0 0 2px rgba(47, 95, 220, 0.12);
}

.onboarding-form {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.onboarding-form input {
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #111827;
}

.onboarding-mic.recording {
  color: #c22c2c;
  box-shadow: 0 0 0 3px rgba(194, 44, 44, 0.14);
}

.onboarding-audio-controls .icon-button.active {
  color: #c22c2c;
}

.login-brand,
.rail-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: inline-block;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background:
    linear-gradient(135deg, transparent 48%, var(--accent) 49%, var(--accent) 52%, transparent 53%),
    linear-gradient(45deg, transparent 48%, var(--accent) 49%, var(--accent) 52%, transparent 53%),
    var(--surface);
}

.muted {
  color: var(--text-muted);
  margin: 0;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 18px 0;
}

.field input,
.search-box input,
.window-select,
.compact-select,
textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
}

.field input {
  min-height: 42px;
  padding: 8px 10px;
}

.field.compact {
  margin: 0;
}

.field textarea {
  min-height: 86px;
  padding: 9px 10px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.form-error {
  color: var(--red);
  margin: 0 0 12px;
  font-size: 13px;
}

.field-help {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.async-status {
  min-height: 1.45em;
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 13px;
}

button[aria-busy="true"],
button:disabled[aria-busy="true"] {
  cursor: progress;
}

.app-shell {
  min-height: 100%;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.rail-brand {
  padding: 4px 8px;
  font-size: 18px;
}

.rail-nav {
  display: grid;
  gap: 4px;
}

.nav-item,
.mobile-nav button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.nav-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  text-align: left;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.nav-item:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.nav-item svg,
.icon-button svg,
.search-icon svg,
.mobile-nav svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
}

.nav-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.rail-footer {
  margin-top: auto;
  padding: 8px;
}

.legacy-link {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
}

.workspace-shell {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.eyebrow {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 { font-size: 22px; line-height: 1.15; }
h2 { font-size: 18px; line-height: 1.2; }
h3 { font-size: 14px; line-height: 1.25; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  min-width: 250px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.window-select,
.compact-select {
  min-height: 38px;
  padding: 0 10px;
}

.button,
.icon-button,
.text-button,
.segment {
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.button {
  min-height: 38px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-weight: 700;
}

.button.primary {
  width: 100%;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.button.primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: var(--shadow-sm);
}

.button.primary:active {
  transform: translateY(1px);
}

.button.secondary {
  background: var(--surface);
}

.button.secondary:hover,
.icon-button:hover {
  background: var(--surface-subtle);
}

.text-button:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.button.danger {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-grid;
  place-items: center;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  padding: 4px 0;
}

.subnav {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow-x: auto;
}

.subnav-item {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 800;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.subnav-item.active {
  background: var(--surface-subtle);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.subnav-item[aria-selected="true"] {
  background: var(--surface-subtle);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.subroute-panel {
  display: none;
}

.subroute-panel.active {
  display: block;
  animation: panelIn 150ms var(--ease);
}

.workspace {
  min-width: 0;
  padding: 20px 24px 34px;
}

.workspace-panel {
  display: none;
}

.workspace-panel.active {
  display: block;
  animation: panelIn 150ms var(--ease);
}

.workspace-access-resolution {
  min-height: min(560px, calc(100vh - 180px));
  display: grid;
  place-items: center;
}

.workspace-access-resolution-card {
  width: min(100%, 520px);
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.workspace-access-resolution-card h2,
.workspace-access-resolution-card p {
  margin: 0;
}

.workspace-access-resolution-card > p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 15px;
}

.command-grid,
.workspace-grid {
  display: grid;
  gap: 16px;
}

.command-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.workspace-grid.two-col {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
}

.workspace-grid.wide-left {
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
}

.panel,
.command-primary,
.command-side > .panel {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.panel,
.command-primary {
  padding: 16px;
}

.command-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head.compact {
  align-items: center;
  margin: 14px 0 8px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric-grid.small {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.metric {
  min-height: 92px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  box-shadow: var(--shadow-xs);
}

.metric .label {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.metric .value {
  margin-top: 8px;
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric .sub {
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.pill.neutral { background: var(--surface-subtle); color: var(--text-muted); }
.pill.good { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.risk { background: var(--red-soft); color: var(--red); }
.pill.info { background: var(--accent-soft); color: var(--accent); }

.pill.good::before,
.pill.warn::before,
.pill.risk::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
}

.action-list,
.stack-list,
.data-list {
  display: grid;
  gap: 8px;
}

.data-list.compact {
  gap: 6px;
}

.row,
.action-row,
.empty-state,
.detail-empty {
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  box-shadow: var(--shadow-xs);
}

.row,
.action-row {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  color: var(--text);
  text-align: left;
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

button.row {
  cursor: pointer;
}

button.row:hover,
.action-row:hover {
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.row-sub {
  color: var(--text-muted);
  font-size: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--text);
}

.check-row input {
  flex: 0 0 auto;
}

.check-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 12px;
}

.intelligence-catalog-row {
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 10px;
}

.intelligence-catalog-image {
  display: block;
  width: 112px;
  height: 100%;
  min-height: 112px;
  border-radius: calc(var(--radius-md) - 2px);
  background: var(--surface-raised);
  box-shadow: var(--shadow-xs);
  object-fit: cover;
}

.intelligence-catalog-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

@media (max-width: 560px) {
  .intelligence-catalog-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }

  .intelligence-catalog-image {
    width: 88px;
    min-height: 88px;
  }
}

.empty-state,
.detail-empty {
  padding: 22px;
  color: var(--text-muted);
  text-align: center;
}

.segmented {
  display: inline-flex;
  border-radius: 7px;
  padding: 2px;
  background: var(--surface-subtle);
  box-shadow: var(--shadow-xs);
}

.segment {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0 10px;
  font-weight: 700;
}

.segment.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.camera-actions {
  display: flex;
  gap: 8px;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.camera-card {
  min-height: 162px;
  display: grid;
  grid-template-rows: 112px auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-subtle);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.camera-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.camera-preview {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--media-bg);
  color: #fff;
  overflow: hidden;
}

.camera-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-preview-fallback {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
}

.camera-card-body {
  padding: 10px;
}

.filter-row,
.tool-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aiops-filter-row {
  margin-bottom: 12px;
}

.aiops-filter-row input {
  min-width: 180px;
  flex: 1 1 220px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.intelligence-goal-field {
  margin-bottom: 12px;
}

.intelligence-goal-field textarea {
  width: 100%;
}

.intelligence-field {
  min-width: 150px;
  flex: 1 1 180px;
}

.intelligence-field input,
.intelligence-field .compact-select {
  width: 100%;
  min-width: 0;
}

.tool-stack,
.mini-form {
  display: grid;
  gap: 10px;
}

.v4-intercom-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.v4-intercom-status {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.v4-intercom-status small {
  color: var(--text-muted);
}

.v4-intercom-events {
  display: grid;
  gap: 6px;
}

.v4-intercom-event {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.v4-intercom-event small {
  flex: 0 0 auto;
  color: var(--text-muted);
}

.mini-form .field {
  margin: 0;
}

.mini-form .field input,
.mini-form .field select,
.mini-form .field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
}

.account-permission-grid {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.account-permission-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) repeat(3, minmax(54px, 74px));
  align-items: center;
  gap: 6px;
  min-height: 30px;
  font-size: 12px;
}

.account-permission-row.header {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-permission-row label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-muted);
}

.account-permission-row input {
  flex: 0 0 auto;
}

.account-users-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.account-users-actions .button,
.button.inline {
  width: auto;
}

.invite-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.invite-link-row input {
  min-width: 0;
}

.video-review-rerun-form {
  align-content: start;
}

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

.video-review-form-grid .field.wide,
.video-review-rerun-form .drawer-actions,
.video-review-rerun-form .check-row {
  grid-column: 1 / -1;
}

.video-review-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.video-review-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 12px;
}

.video-review-table th,
.video-review-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.video-review-table th {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.video-review-table tr:last-child td {
  border-bottom: 0;
}

.video-review-panel-block {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.video-review-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.video-review-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.video-review-check {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.video-review-inline-media {
  display: grid;
  gap: 10px;
}

.video-review-clip-media {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.video-review-clip-media h4 {
  margin: 0;
  font-size: 13px;
}

.video-review-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.video-review-media-grid figure {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.video-review-video,
.video-review-frame-player img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #000;
  object-fit: contain;
}

.video-review-frame-player {
  display: grid;
  gap: 8px;
}

.video-review-frame-controls {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.video-review-frame-controls input[type="range"] {
  width: 100%;
}

.video-review-timeline-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.video-review-marker {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
}

.video-review-marker.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.video-review-score {
  display: grid;
  grid-template-columns: 110px minmax(90px, 1fr) 42px;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
}

.video-review-score-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.video-review-score-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.video-review-warnings {
  display: grid;
  gap: 6px;
}

.video-review-warning {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.video-review-raw {
  max-height: 340px;
  overflow: auto;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.live-stage,
.zone-stage {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--media-bg);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.live-stage video,
.live-stage img,
.zone-stage img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: contain;
  display: block;
}

.live-stage .live-stream-pending,
.live-stage .live-stream-ready {
  position: absolute;
  inset: 0;
  transition: opacity var(--dur-fast) var(--ease);
}

.live-stage .live-stream-pending {
  opacity: 0;
}

.live-stage .live-stream-ready {
  opacity: 1;
}

.live-stage .empty-state,
.zone-stage .empty-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
}

.zone-overlay {
  position: absolute;
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.zone-overlay.selected {
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 32%, transparent);
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.clip-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.clip-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.clip-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background: var(--media-bg);
}

body.modal-open,
body.overlay-open {
  overflow: hidden;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(8, 12, 20, 0.48);
  backdrop-filter: blur(2px);
}

.app-shell [inert] {
  pointer-events: none;
  user-select: none;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(520px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  animation: drawerIn var(--dur-med) var(--ease);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.drawer-body {
  overflow: auto;
  padding: 18px;
}

.drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.drawer-actions .button.primary {
  width: auto;
}

.drawer-evidence-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--media-bg);
  box-shadow: var(--shadow-xs);
}

.ai-action-grid {
  display: grid;
  gap: 10px;
}

.ai-action-grid > .button {
  width: 100%;
}

.artifact-row {
  align-content: start;
}

.artifact-readout {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.artifact-section {
  display: grid;
  gap: 6px;
}

.artifact-section p,
.artifact-section ul {
  margin: 0;
  color: var(--text);
}

.artifact-section ul {
  padding-left: 18px;
}

.artifact-section li + li {
  margin-top: 4px;
}

.artifact-section pre {
  max-height: 280px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-xs);
}

.artifact-feedback-history {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.drawer-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 12px;
  margin-top: 12px;
  font-size: 13px;
}

.drawer-grid .k {
  color: var(--text-muted);
}

.drawer-grid .v {
  color: var(--text);
  overflow-wrap: anywhere;
}

.quick-links,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.quick-links a,
.admin-card {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.quick-links a:hover,
.admin-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.mobile-nav {
  display: none;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 360px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  animation: toastIn var(--dur-med) var(--ease);
}

@keyframes drawerIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes moreSheetIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes toastIn {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes panelIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1180px) {
  .command-grid,
  .workspace-grid.two-col,
  .workspace-grid.wide-left {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .metric-grid.small {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 860px) {
  .onboarding-topbar {
    height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-audio-controls {
    justify-content: space-between;
  }

  .onboarding-main {
    grid-template-columns: 1fr;
  }

  .onboarding-hero {
    min-height: 430px;
    padding: 18px;
  }

  .onboarding-core {
    width: min(92vw, 440px);
  }

  .onboarding-launch {
    position: static;
    max-width: none;
    margin-top: -48px;
    padding: 0 8px 18px;
  }

  .onboarding-console {
    border-left: 0;
    border-top: 1px solid #edf0f5;
  }

  .onboarding-preview-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-bottom: 68px;
  }

  .rail {
    display: none;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    width: 100%;
  }

  .search-box {
    min-width: 0;
  }

  .window-select,
  #logout-btn {
    display: none;
  }

  .workspace {
    padding: 14px;
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    height: 64px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: var(--surface);
    border-top: 1px solid var(--border);
  }

  .mobile-nav button {
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
  }

.mobile-nav button.active {
  color: var(--accent);
}

.detail-drawer {
  width: 100vw;
}

}

.demo-tutorial-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  max-width: min(420px, calc(100vw - 24px));
  font-size: 14px;
}

.demo-tutorial-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast, #fff);
  font-weight: 800;
  box-shadow: var(--shadow);
}

.demo-tutorial-panel {
  width: min(420px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 92px));
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.demo-tutorial-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.demo-tutorial-header strong {
  display: block;
  font-size: 15px;
}

.demo-tutorial-header span,
.demo-tutorial-step p,
.demo-tutorial-status {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.demo-tutorial-route-row,
.demo-tutorial-actions,
.demo-tutorial-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
}

.demo-tutorial-route-row select,
.demo-tutorial-form input {
  min-width: 0;
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg, var(--surface));
  color: var(--text);
  padding: 0 10px;
}

.demo-tutorial-step {
  padding: 2px 14px 10px;
}

.demo-tutorial-step h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.demo-tutorial-image,
.demo-tutorial-video {
  margin: 0 14px 12px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
}

.demo-tutorial-image[hidden],
.demo-tutorial-video[hidden] {
  display: none;
}

.demo-tutorial-image img,
.demo-tutorial-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-tutorial-actions {
  grid-template-columns: repeat(3, 1fr);
}

.demo-tutorial-actions button,
.demo-tutorial-form button,
.demo-tutorial-chip {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

.demo-tutorial-status {
  min-height: 20px;
  padding: 0 14px 8px;
  margin-top: 0;
}

.demo-tutorial-root.audio-unavailable .demo-tutorial-status {
  color: var(--danger);
}

.demo-tutorial-transcript {
  display: grid;
  gap: 8px;
  max-height: 170px;
  overflow: auto;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.demo-tutorial-message {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.4;
}

.demo-tutorial-message strong {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted);
}

.demo-tutorial-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
}

.demo-tutorial-chip {
  padding: 0 10px;
  font-size: 12px;
}

.demo-tutorial-highlight {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 680px) {
  .demo-tutorial-root {
    left: 12px;
    right: 12px;
    bottom: 76px;
  }

  .demo-tutorial-panel {
    width: 100%;
    max-height: calc(100vh - 136px);
  }
}

@media (max-width: 560px) {
  .onboarding-volume input {
    width: 88px;
  }

  .onboarding-readiness {
    grid-template-columns: 1fr;
  }

  .onboarding-form {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .onboarding-form .button {
    grid-column: 1 / -1;
  }

  .metric-grid,
  .metric-grid.small {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .segmented,
  .camera-actions,
  .filter-row {
    width: 100%;
  }

  .segment,
  .camera-actions .button {
    flex: 1;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .inline-fields {
    grid-template-columns: 1fr;
  }
}

/* Teach AXWEL panel (per-tenant learning summary) */
.teach-headline {
  font-size: 15px;
  color: var(--text);
  margin: 4px 0 14px;
}
.teach-headline strong { color: var(--accent); }
.teach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.teach-stat {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.teach-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.teach-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}
.teach-stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================
   AXWEL FIRST-RUN SETUP WIZARD & COPILOT STYLES
   ========================================== */

/* Enable neural network canvas background */
.onboarding-bg-canvas {
  display: block !important;
  background: #090d16;
}

/* Stepper styles */
.onboarding-stepper {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.stepper-step {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stepper-step.active {
  color: #3b82f6;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
.stepper-step.completed {
  color: #10b981;
}
.stepper-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -16px;
  color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

/* Header Action Buttons */
.onboarding-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.onboarding-dock-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.onboarding-dock-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.25);
}
.onboarding-dock-toggle svg {
  width: 14px;
  height: 14px;
}

/* Docked/Copilot Mode Layout shifts */
body.copilot-active {
  overflow: hidden;
}
body.copilot-active #app-shell {
  margin-right: 420px;
  transition: margin-right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.onboarding-page.docked {
  left: auto;
  width: 420px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  background: rgba(10, 15, 26, 0.88) !important;
  backdrop-filter: blur(24px);
}
.onboarding-page.docked .onboarding-shell {
  grid-template-rows: auto 1fr;
  height: 100%;
}
.onboarding-page.docked .onboarding-topbar {
  padding: 12px 18px;
  height: 60px;
  background: rgba(15, 22, 38, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.onboarding-page.docked .onboarding-stepper {
  display: none !important; /* Hide stepper from header when docked */
}
.onboarding-page.docked .onboarding-main {
  grid-template-columns: 1fr; /* Stack into 1 column */
  min-height: calc(100vh - 60px);
}
.onboarding-page.docked .onboarding-hero {
  display: none !important; /* Hide giant orb when docked */
}
.onboarding-page.docked .onboarding-console {
  border-left: none;
  background: transparent;
  backdrop-filter: none;
  padding: 16px;
  grid-template-rows: 1fr auto auto; /* Transcript, forms, actions */
  height: calc(100vh - 60px);
}

/* Mini-orb Canvas */
.onboarding-mini-core {
  display: block;
  width: 32px;
  height: 32px;
  margin-left: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
  background: transparent;
}

/* Guide Card */
.onboarding-step-guide {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(6, 182, 212, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  color: #fff;
  animation: slideIn 0.3s ease-out;
}
.onboarding-step-guide h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #60a5fa;
  display: flex;
  align-items: center;
  gap: 6px;
}
.onboarding-step-guide p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #cbd5e1;
}
.onboarding-step-guide .guide-actions {
  display: flex;
  gap: 8px;
}

/* Quick Replies */
.onboarding-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  justify-content: flex-end;
}
.quick-reply-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-reply-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
  color: #fff;
  transform: translateY(-1px);
}

/* Premium Dark Styling overrides for full-screen */
.onboarding-page:not(.docked) {
  background: #090d16 !important;
  color: #f3f4f6;
}
.onboarding-page:not(.docked) .onboarding-topbar {
  background: rgba(9, 13, 22, 0.85) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.onboarding-page:not(.docked) .onboarding-brand {
  color: #fff !important;
}
.onboarding-page:not(.docked) .onboarding-console {
  background: rgba(13, 18, 30, 0.7) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.onboarding-page:not(.docked) .onboarding-message {
  background: rgba(20, 27, 45, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f3f4f6 !important;
}
.onboarding-page:not(.docked) .onboarding-message.user {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
  color: #a7f3d0 !important;
}
.onboarding-page:not(.docked) .onboarding-readiness-row {
  color: #e5e7eb;
}
.onboarding-page:not(.docked) .onboarding-readiness-row small {
  color: #9ca3af;
}

/* Interactive Readiness Row enhancements */
.onboarding-readiness-row.interactive {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.onboarding-readiness-row.interactive:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}
.onboarding-readiness-row.interactive.active-step {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.25) !important;
}

/* Specific layout adjustments for onboarding steps */
.onboarding-readiness-row .onboarding-dot.ready {
  background: #10b981 !important;
}
.onboarding-readiness-row .onboarding-dot.todo {
  background: #3b82f6 !important;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
