:root {
  color-scheme: dark;
  --bg: #080a0e;
  --bg-2: #0d1118;
  --surface: #111720;
  --surface-2: #151d28;
  --surface-3: #1b2633;
  --line: #2a3442;
  --line-strong: #405064;
  --text: #f4f7fb;
  --soft: #c7d0db;
  --muted: #8e9bad;
  --accent: #40c7f4;
  --accent-strong: #17a9dc;
  --good: #63d471;
  --warn: #f7c35f;
  --orange: #f59e42;
  --danger: #ff6475;
  --violet: #a78bfa;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-sm: 4px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 320px),
    linear-gradient(135deg, #080a0e 0%, #11151d 42%, #0b0f14 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.55;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.eyebrow,
.brand-mark {
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.36rem;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 0;
  font-size: 0.96rem;
}

strong {
  font-weight: 850;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #344357;
  border: 2px solid #111720;
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 348px minmax(0, 1fr);
  gap: 18px;
}

.side-panel {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 12px;
}

.main-stage {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.glass-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)), var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 2px 2px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(64, 199, 244, 0.22), rgba(99, 212, 113, 0.12)),
    #111720;
  border: 1px solid rgba(64, 199, 244, 0.5);
  color: var(--accent);
  font-weight: 950;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 850;
}

.console-menu {
  display: grid;
  gap: 2px;
  padding: 8px;
}

.console-menu a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--soft);
  font-size: 0.88rem;
  border: 1px solid transparent;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.console-menu a:hover,
.console-menu a:focus-visible {
  background: rgba(64, 199, 244, 0.1);
  border-color: rgba(64, 199, 244, 0.28);
  color: var(--text);
  outline: none;
}

.console-menu span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.shift-card,
.metrics-card,
.scenario-config,
.timeline-card,
.queue-card,
.prompt-card,
.log-card,
.report-card,
.hero,
.command-console,
.bank-console {
  padding: 18px;
}

.shift-topline,
.shift-meta,
.section-title-row,
.prompt-header,
.hero-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.shift-topline span,
.shift-meta span,
.muted-label {
  color: var(--muted);
  font-size: 0.84rem;
}

#clockDisplay {
  font-family: var(--mono);
  font-size: 2.35rem;
  line-height: 1;
  color: #ffffff;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  margin: 18px 0 12px;
  background: #0a0f15;
  overflow: hidden;
  border: 1px solid #283342;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--good));
  box-shadow: 0 0 18px rgba(64, 199, 244, 0.36);
  transition: width 260ms ease;
}

.metrics-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.metric-row {
  display: grid;
  gap: 7px;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--soft);
  font-size: 0.84rem;
}

.metric-value {
  font-family: var(--mono);
  font-weight: 850;
  color: var(--text);
}

.metric-track {
  height: 8px;
  background: #0b1118;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--good));
  transition: width 240ms ease;
}

.metric-fill.warn {
  background: linear-gradient(90deg, var(--warn), var(--orange));
}

.metric-fill.danger {
  background: linear-gradient(90deg, var(--orange), var(--danger));
}

.scenario-config {
  display: grid;
  gap: 12px;
}

.toggle-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.35;
}

.toggle-row input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.primary-btn,
.ghost-btn,
.choice-btn,
.next-btn,
.mini-remove-btn {
  border-radius: var(--radius-md);
  color: var(--text);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-btn {
  width: 100%;
  border: 1px solid rgba(64, 199, 244, 0.6);
  padding: 13px 16px;
  background: linear-gradient(135deg, #148fb8, #2275e6);
  font-weight: 850;
  box-shadow: 0 14px 26px rgba(34, 117, 230, 0.2);
}

.ghost-btn {
  border: 1px solid #334156;
  padding: 8px 11px;
  color: var(--soft);
  background: #151d28;
}

.primary-btn:hover,
.ghost-btn:hover,
.next-btn:hover,
.mini-remove-btn:hover,
.choice-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.choice-btn:focus-visible,
.next-btn:focus-visible,
.mini-remove-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(64, 199, 244, 0.72);
  outline-offset: 2px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(64, 199, 244, 0.1), rgba(99, 212, 113, 0.05)),
    var(--surface);
}

.hero h2 {
  font-size: 2.45rem;
  line-height: 1.02;
}

.hero-copy {
  max-width: 860px;
  margin: 10px 0 0;
  color: var(--soft);
  line-height: 1.55;
}

.hero-status {
  flex-direction: column;
  align-items: flex-end;
}

.phase-pill,
.score-display,
.severity-badge,
.case-status,
.case-chip,
.timeline-chip,
.source-badge,
.impact-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #334156;
  background: #151d28;
  color: var(--soft);
  white-space: nowrap;
}

.phase-pill,
.score-display {
  padding: 8px 12px;
  font-family: var(--mono);
  font-weight: 850;
}

.score-display {
  color: var(--good);
}

.score-display.pulse {
  animation: pulseScore 520ms ease;
}

@keyframes pulseScore {
  0% { box-shadow: 0 0 0 rgba(99, 212, 113, 0); }
  45% { box-shadow: 0 0 0 5px rgba(99, 212, 113, 0.16); }
  100% { box-shadow: 0 0 0 rgba(99, 212, 113, 0); }
}

.command-console {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr) minmax(260px, 0.5fr);
  gap: 16px;
  align-items: stretch;
}

.console-lede {
  display: grid;
  align-content: center;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}

.console-lede h2 {
  font-size: 1.38rem;
}

.console-start-btn {
  width: auto;
  justify-self: start;
  margin-top: 14px;
  padding: 10px 13px;
}

.console-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.console-stat,
.bank-stat {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 82px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: var(--radius-md);
  padding: 12px;
}

.console-stat span,
.bank-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.console-stat strong,
.bank-stat strong {
  font-family: var(--mono);
  font-size: 1.35rem;
}

.console-feed {
  display: grid;
  align-content: start;
  gap: 8px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.feed-row {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid rgba(64, 199, 244, 0.6);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.feed-row strong {
  color: var(--accent);
  font-size: 0.78rem;
}

.feed-row span {
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.ops-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  align-items: stretch;
}

.timeline,
.case-board,
.ops-log,
.custom-scenario-list,
.question-bank-list {
  scrollbar-color: #344357 rgba(255, 255, 255, 0.03);
}

.timeline {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 16px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  opacity: 0.72;
}

.timeline-item.active {
  opacity: 1;
  border-color: rgba(64, 199, 244, 0.55);
  background: rgba(64, 199, 244, 0.09);
}

.timeline-item.done {
  opacity: 0.92;
  border-color: rgba(99, 212, 113, 0.26);
}

.timeline-time {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 850;
  font-size: 0.84rem;
}

.timeline-title {
  color: var(--text);
  font-weight: 800;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.timeline-chip {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.case-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.case-card {
  min-width: 0;
  min-height: 158px;
  display: grid;
  gap: 10px;
  padding: 13px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.026);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.case-card.high {
  border-color: rgba(245, 158, 66, 0.42);
}

.case-card.critical {
  border-color: rgba(255, 100, 117, 0.55);
}

.case-card.closed {
  opacity: 0.68;
  border-color: rgba(99, 212, 113, 0.32);
}

.case-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.case-title-row h3 {
  font-size: 0.96rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.case-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 2px;
}

.case-status,
.case-chip,
.source-badge {
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 750;
}

.case-status.critical,
.severity-badge.critical {
  color: #ffd8df;
  background: rgba(255, 100, 117, 0.13);
  border-color: rgba(255, 100, 117, 0.52);
}

.case-status.high,
.severity-badge.high {
  color: #ffe1bd;
  background: rgba(245, 158, 66, 0.13);
  border-color: rgba(245, 158, 66, 0.42);
}

.case-status.medium,
.severity-badge.medium {
  color: #fff1c2;
  background: rgba(247, 195, 95, 0.13);
  border-color: rgba(247, 195, 95, 0.42);
}

.case-status.closed,
.severity-badge.low,
.severity-badge.neutral {
  color: #dfffe3;
  background: rgba(99, 212, 113, 0.12);
  border-color: rgba(99, 212, 113, 0.36);
}

.case-details {
  display: grid;
  gap: 5px;
  color: var(--soft);
  font-size: 0.83rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.case-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.decision-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.prompt-card {
  min-height: 420px;
}

.prompt-header {
  align-items: start;
}

.severity-badge {
  padding: 8px 11px;
  font-weight: 850;
}

.prompt-narrative {
  color: var(--soft);
  font-size: 1rem;
  line-height: 1.62;
  margin: 20px 0;
  white-space: pre-line;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-btn {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  text-align: left;
  background: #141c26;
  border: 1px solid #313d4d;
}

.choice-btn:hover:not(:disabled) {
  border-color: rgba(64, 199, 244, 0.52);
  background: #182331;
}

.choice-btn.correct {
  border-color: rgba(99, 212, 113, 0.72);
  background: rgba(99, 212, 113, 0.1);
}

.choice-btn.wrong {
  border-color: rgba(255, 100, 117, 0.7);
  background: rgba(255, 100, 117, 0.1);
}

.choice-letter {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: rgba(64, 199, 244, 0.14);
  color: var(--accent);
  border: 1px solid rgba(64, 199, 244, 0.28);
  font-family: var(--mono);
  font-weight: 900;
}

.choice-copy {
  min-width: 0;
  color: var(--text);
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.feedback-panel {
  margin-top: 18px;
  padding: 15px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.feedback-panel.correct {
  border-color: rgba(99, 212, 113, 0.48);
  background: rgba(99, 212, 113, 0.07);
}

.feedback-panel.wrong {
  border-color: rgba(255, 100, 117, 0.5);
  background: rgba(255, 100, 117, 0.07);
}

.feedback-panel.hidden {
  display: none;
}

.feedback-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.feedback-panel h3 {
  margin: 0;
}

.feedback-verdict {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.feedback-panel p {
  margin-bottom: 13px;
  color: var(--soft);
  line-height: 1.55;
}

.impact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.impact-chip {
  padding: 6px 8px;
  font-family: var(--mono);
  font-size: 0.76rem;
}

.impact-chip.positive {
  color: #ddffe1;
  border-color: rgba(99, 212, 113, 0.42);
  background: rgba(99, 212, 113, 0.1);
}

.impact-chip.negative {
  color: #ffd8df;
  border-color: rgba(255, 100, 117, 0.42);
  background: rgba(255, 100, 117, 0.1);
}

.next-btn {
  border: 1px solid rgba(64, 199, 244, 0.56);
  padding: 10px 13px;
  background: linear-gradient(135deg, #148fb8, #2275e6);
  font-weight: 850;
}

.log-card {
  min-height: 420px;
}

.ops-log {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  max-height: 350px;
  overflow: auto;
  padding-right: 4px;
}

.log-entry {
  border-left: 3px solid rgba(64, 199, 244, 0.62);
  padding: 10px 11px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(255, 255, 255, 0.028);
}

.log-entry strong {
  display: block;
  color: var(--accent);
  margin-bottom: 4px;
  font-size: 0.84rem;
}

.log-entry span {
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.38;
}

.bank-console {
  display: grid;
  gap: 16px;
}

.bank-title-row {
  align-items: end;
}

.bank-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bank-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  align-items: end;
}

.bank-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  gap: 14px;
  min-height: 430px;
}

.question-bank-list {
  display: grid;
  align-content: start;
  gap: 9px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.bank-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid #2f3b4b;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.026);
  color: var(--text);
  text-align: left;
}

.bank-item:hover,
.bank-item.active {
  border-color: rgba(64, 199, 244, 0.58);
  background: rgba(64, 199, 244, 0.08);
}

.bank-item-topline,
.bank-preview-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.bank-item-title {
  font-weight: 850;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.bank-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.source-badge.core {
  color: #d9f6ff;
  border-color: rgba(64, 199, 244, 0.38);
  background: rgba(64, 199, 244, 0.1);
}

.source-badge.random {
  color: #fff1c2;
  border-color: rgba(247, 195, 95, 0.38);
  background: rgba(247, 195, 95, 0.1);
}

.source-badge.custom {
  color: #ece4ff;
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.11);
}

.question-bank-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(64, 199, 244, 0.045), transparent 160px),
    rgba(255, 255, 255, 0.022);
  padding: 16px;
  overflow: auto;
}

.question-bank-preview h3 {
  margin: 10px 0 10px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.bank-preview-narrative {
  color: var(--soft);
  line-height: 1.55;
  white-space: pre-line;
  margin-bottom: 14px;
}

.answer-stack {
  display: grid;
  gap: 8px;
}

.answer-preview {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #2f3b4b;
  border-radius: var(--radius-md);
  padding: 10px;
  background: rgba(255, 255, 255, 0.024);
}

.answer-preview.correct {
  border-color: rgba(99, 212, 113, 0.5);
  background: rgba(99, 212, 113, 0.07);
}

.answer-preview span:first-child {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  color: var(--accent);
  background: rgba(64, 199, 244, 0.12);
}

.answer-preview p {
  margin: 0;
  color: var(--soft);
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.scenario-bank-summary {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.026);
}

.compact-field {
  margin: -2px 0 0;
}

.compact-field input {
  max-width: 120px;
}

.scenario-lab-card {
  padding: 20px;
}

.scenario-lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  margin-top: 16px;
}

.scenario-form,
.import-panel {
  display: grid;
  gap: 12px;
}

.import-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.024);
  align-self: start;
}

.import-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.muted-copy {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
  margin-bottom: 0;
}

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

.field-stack {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.3;
}

.field-stack span,
.file-import span {
  color: var(--muted);
  font-weight: 800;
}

.field-stack input,
.field-stack select,
.field-stack textarea,
.import-panel textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #334156;
  border-radius: var(--radius-md);
  background: #0b1118;
  color: var(--text);
  padding: 10px 11px;
  resize: vertical;
}

.field-stack input:focus,
.field-stack select:focus,
.field-stack textarea:focus,
.import-panel textarea:focus {
  border-color: rgba(64, 199, 244, 0.74);
  box-shadow: 0 0 0 3px rgba(64, 199, 244, 0.12);
}

.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.button-row.wrap {
  flex-wrap: wrap;
}

.danger-outline {
  border-color: rgba(255, 100, 117, 0.52) !important;
  color: #ffd4dc !important;
}

.file-import {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-size: 0.84rem;
}

.file-import input {
  width: 100%;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.024);
  color: var(--muted);
}

.custom-scenario-list {
  display: grid;
  gap: 9px;
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
}

.custom-scenario-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.024);
}

.custom-scenario-item strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.custom-scenario-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.mini-remove-btn {
  border: 1px solid rgba(255, 100, 117, 0.42);
  background: rgba(255, 100, 117, 0.08);
  color: #ffd4dc;
  padding: 7px 10px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.report-card {
  min-height: 260px;
}

.handoff-report {
  margin: 16px 0 0;
  padding: 16px;
  max-height: 420px;
  overflow: auto;
  border-radius: var(--radius-md);
  background: #070b10;
  color: #dbeafe;
  border: 1px solid #293344;
  white-space: pre-wrap;
  line-height: 1.5;
  font-family: var(--mono);
  font-size: 0.86rem;
}

.empty-state {
  color: var(--muted);
  padding: 15px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.024);
  border: 1px dashed #3a4658;
  text-align: center;
  grid-column: 1 / -1;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  background: rgba(17, 23, 32, 0.96);
  box-shadow: var(--shadow);
  padding: 12px 13px;
  animation: toastIn 180ms ease;
}

.toast.good {
  border-left-color: var(--good);
}

.toast.warn {
  border-left-color: var(--warn);
}

.toast.danger {
  border-left-color: var(--danger);
}

.toast strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.toast span {
  color: var(--soft);
  line-height: 1.35;
  font-size: 0.84rem;
}

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

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .brand-block,
  .console-menu {
    grid-column: 1 / -1;
  }

  .console-menu {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .command-console,
  .scenario-lab-grid,
  .field-row,
  .bank-workspace,
  .bank-toolbar {
    grid-template-columns: 1fr;
  }

  .console-lede,
  .console-feed {
    border: 0;
    padding: 0;
  }

  .console-kpis,
  .bank-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding: 12px;
  }

  .side-panel,
  .ops-grid,
  .decision-layout,
  .case-board,
  .console-menu {
    grid-template-columns: 1fr;
  }

  .hero,
  .prompt-header,
  .feedback-topline,
  .bank-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero-status {
    flex-direction: row;
    align-items: center;
  }

  .console-kpis,
  .bank-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shift-card,
  .metrics-card,
  .scenario-config,
  .timeline-card,
  .queue-card,
  .prompt-card,
  .log-card,
  .report-card,
  .hero,
  .command-console,
  .bank-console,
  .scenario-lab-card {
    padding: 14px;
  }

  .choice-btn,
  .answer-preview {
    grid-template-columns: 1fr;
  }

  .choice-letter,
  .answer-preview span:first-child {
    width: 30px;
  }

  #clockDisplay {
    font-size: 2rem;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row .ghost-btn,
  .button-row .primary-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
