/* ==========================================================================
   HoneyChain Yield ML Microservice - Immersive Apiary Observatory
   Living scientific atmosphere: Ambient pollen canvas, laser reticle, comb core
   Instrument Serif × Plus Jakarta Sans × JetBrains Mono
   ========================================================================== */

:root {
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-panel: 16px;
  --radius-pill: 9999px;
  --radius-sm: 8px;
  --radius-xs: 5px;
}

/* Base Dark: Titanium Obsidian (Flagship Default) */
:root,
[data-mode="dark"],
[data-theme="amber"][data-mode="dark"] {
  --bg-canvas: #090a0d;
  --bg-panel: #101219;
  --bg-subtle: #151822;
  --bg-input: #0c0e14;
  --bg-hover: #1c202d;

  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: #f3ba63;

  --card-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);

  --text-main: #f5f5f7;
  --text-muted: #8c93a4;
  --text-dim: #545a6c;

  --primary: #f3ba63;
  --primary-hover: #dfa349;
  --primary-glow: rgba(243, 186, 99, 0.25);
  --primary-soft: rgba(243, 186, 99, 0.1);
  --primary-border: rgba(243, 186, 99, 0.3);
  --primary-foreground: #090a0d;

  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.3);

  --danger: #f43f5e;
  --danger-soft: rgba(244, 63, 94, 0.12);
  --danger-border: rgba(244, 63, 94, 0.3);

  --chart-trace: #f3ba63;
  --chart-glow: rgba(243, 186, 99, 0.4);
  --chart-area-top: rgba(243, 186, 99, 0.2);
  --chart-area-bottom: rgba(243, 186, 99, 0.0);
  --chart-reticle: rgba(255, 255, 255, 0.05);
  --chart-label: #646a7c;

  --particle-rgb: 243, 186, 99;
  --ambient-1: rgba(243, 186, 99, 0.07);
  --ambient-2: rgba(217, 119, 6, 0.04);
}

/* Light Mode: Museum Alabaster Ivory */
[data-mode="light"] {
  --bg-canvas: #faf9f6;
  --bg-panel: #ffffff;
  --bg-subtle: #f3f1eb;
  --bg-input: #ffffff;
  --bg-hover: #f7f5ef;

  --border-hairline: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.035);
  --border-focus: #c28422;

  --card-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);

  --text-main: #18191d;
  --text-muted: #6a6e7c;
  --text-dim: #9aa0b0;

  --primary: #c28422;
  --primary-hover: #a36d17;
  --primary-glow: rgba(194, 132, 34, 0.2);
  --primary-soft: #fcf6eb;
  --primary-border: #f5dfb8;
  --primary-foreground: #ffffff;

  --success: #059669;
  --success-soft: #ecfdf5;
  --success-border: #a7f3d0;

  --danger: #e11d48;
  --danger-soft: #fff1f2;
  --danger-border: #fecdd3;

  --chart-trace: #c28422;
  --chart-glow: rgba(194, 132, 34, 0.25);
  --chart-area-top: rgba(194, 132, 34, 0.16);
  --chart-area-bottom: rgba(194, 132, 34, 0.0);
  --chart-reticle: rgba(0, 0, 0, 0.06);
  --chart-label: #8c92a2;

  --particle-rgb: 194, 132, 34;
  --ambient-1: rgba(194, 132, 34, 0.06);
  --ambient-2: rgba(245, 158, 11, 0.03);
}

/* Theme: Darkmatter Copper */
[data-theme="darkmatter"][data-mode="dark"],
[data-theme="dark"][data-mode="dark"] {
  --bg-canvas: #09090b;
  --bg-panel: #111116;
  --bg-subtle: #17171f;
  --bg-input: #0c0c10;
  --bg-hover: #1f1f2a;

  --primary: #e78a53;
  --primary-hover: #f59e6b;
  --primary-glow: rgba(231, 138, 83, 0.25);
  --primary-soft: rgba(231, 138, 83, 0.1);
  --primary-border: rgba(231, 138, 83, 0.32);
  --primary-foreground: #09090b;

  --chart-trace: #e78a53;
  --chart-glow: rgba(231, 138, 83, 0.35);
  --chart-area-top: rgba(231, 138, 83, 0.2);
  --particle-rgb: 231, 138, 83;
}

/* Theme: Botanical Sage */
[data-theme="forest"][data-mode="dark"],
[data-theme="sage"][data-mode="dark"] {
  --bg-canvas: #070c09;
  --bg-panel: #0d1612;
  --bg-subtle: #13221b;
  --bg-input: #09100d;
  --bg-hover: #192b22;

  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --primary-soft: rgba(16, 185, 129, 0.1);
  --primary-border: rgba(16, 185, 129, 0.32);
  --primary-foreground: #031008;

  --chart-trace: #10b981;
  --chart-glow: rgba(16, 185, 129, 0.35);
  --chart-area-top: rgba(16, 185, 129, 0.2);
  --particle-rgb: 16, 185, 129;
}

/* Theme: Cyber Slate */
[data-theme="tech"][data-mode="dark"],
[data-theme="slate"][data-mode="dark"] {
  --bg-canvas: #070911;
  --bg-panel: #0d1222;
  --bg-subtle: #131a30;
  --bg-input: #090d1a;
  --bg-hover: #192340;

  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --primary-glow: rgba(56, 189, 248, 0.25);
  --primary-soft: rgba(56, 189, 248, 0.1);
  --primary-border: rgba(56, 189, 248, 0.32);
  --primary-foreground: #040e1b;

  --chart-trace: #38bdf8;
  --chart-glow: rgba(56, 189, 248, 0.35);
  --chart-area-top: rgba(56, 189, 248, 0.2);
  --particle-rgb: 56, 189, 248;
}

/* --------------------------------------------------------------------------
   Resets & Canvas Architecture
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.2s var(--ease-spring),
              border-color 0.2s var(--ease-spring),
              color 0.15s ease;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100dvh;
  padding: 22px 22px 60px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Canvas Particle Layer */
.ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

[data-mode="light"] .ambient-canvas {
  opacity: 0.35;
}

.serif-display {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.mono-text {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.glow-1 {
  width: 500px;
  height: 500px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, var(--ambient-1) 0%, transparent 70%);
}

.glow-2 {
  width: 600px;
  height: 600px;
  bottom: -150px;
  left: -120px;
  background: radial-gradient(circle, var(--ambient-2) 0%, transparent 70%);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--card-shadow);
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-border);
  box-shadow: 0 0 16px -2px var(--primary-glow);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

h1 {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.version-tag {
  font-size: 0.58rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.clock-pill {
  font-size: 0.68rem;
  color: var(--text-dim);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
}

.theme-pill-group {
  display: flex;
  background: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  gap: 2px;
}

.theme-pill-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.theme-pill-btn.active {
  background: var(--bg-panel);
  color: var(--text-main);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.theme-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.dot-amber { background: #f3ba63; box-shadow: 0 0 5px rgba(243, 186, 99, 0.6); }
.dot-dark { background: #e78a53; box-shadow: 0 0 5px rgba(231, 138, 83, 0.6); }
.dot-forest { background: #10b981; box-shadow: 0 0 5px rgba(16, 185, 129, 0.6); }
.dot-tech { background: #38bdf8; box-shadow: 0 0 5px rgba(56, 189, 248, 0.6); }

.mode-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.mode-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
}

.header-badge.healthy {
  border-color: var(--success-border);
  background: var(--success-soft);
  color: var(--success);
}

.header-badge.error {
  border-color: var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger);
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --------------------------------------------------------------------------
   Spacious 2-Column Content Grid
   -------------------------------------------------------------------------- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 980px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.card-panel {
  background: var(--bg-panel);
  border-radius: var(--radius-panel);
  padding: 24px 26px;
  border: 1px solid var(--border-hairline);
  box-shadow: var(--card-shadow);
  position: relative;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 12px;
}

.eyebrow-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
  margin-bottom: 2px;
}

h2 {
  font-size: 1.35rem;
  color: var(--text-main);
  line-height: 1.25;
}

.section-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.input-mode-toggle {
  display: flex;
  background: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  gap: 2px;
}

.tab-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--bg-panel);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   Channel Selector Bar
   -------------------------------------------------------------------------- */
.channel-selector-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
}

.channel-selector-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.channel-picker-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.preset-select {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-hairline);
  padding: 6px 10px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  flex: 1;
}

.preset-select:focus {
  border-color: var(--border-focus);
}

.channel-nav-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.channel-nav-btn:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.scenario-summary-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
}

.scenario-desc-inline {
  font-size: 0.71rem;
  color: var(--text-muted);
  flex: 1;
}

.scenario-meta-chips-inline {
  display: flex;
  gap: 6px;
}

.chip-mini {
  font-size: 0.64rem;
  font-family: var(--font-mono);
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Interactive Season Playback Simulator Bar
   -------------------------------------------------------------------------- */
.season-playback-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 16px;
}

.btn-playback {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
}

.btn-playback:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

.scrubber-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border-hairline);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
}

.scrubber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
  cursor: pointer;
}

.scrubber-label {
  font-size: 0.66rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Calm Form Inputs
   -------------------------------------------------------------------------- */
.form-row-calm {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

label {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input,
.textarea {
  font-family: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font-size: 0.78rem;
  outline: none;
  transition: all 0.2s var(--ease-spring);
}

.input:focus,
.textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Collapsible Telemetry JSON Drawer */
.telemetry-drawer {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  margin-bottom: 16px;
  overflow: hidden;
}

.telemetry-drawer-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-subtle);
  cursor: pointer;
  user-select: none;
}

.drawer-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.badge-count {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-canvas);
  color: var(--text-muted);
  border: 1px solid var(--border-hairline);
}

.drawer-toggle-text {
  font-size: 0.66rem;
  color: var(--primary);
  font-weight: 600;
}

.drawer-content {
  padding: 10px 12px;
  border-top: 1px solid var(--border-hairline);
}

.textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.45;
  font-size: 0.73rem;
}

.drawer-help {
  font-size: 0.64rem;
  color: var(--text-dim);
  margin-top: 5px;
  line-height: 1.35;
}

/* Action Button Row */
.form-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: none;
  transition: all 0.2s var(--ease-spring);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 9px 18px;
  gap: 9px;
  box-shadow: 0 4px 16px -2px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

.kbd-badge {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
}

[data-mode="dark"] .kbd-badge {
  background: rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--text-main);
  padding: 8px 13px;
  gap: 5px;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Right Column: Observatory & Chronometer
   -------------------------------------------------------------------------- */
.status-pill {
  font-size: 0.64rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.status-ready {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-hairline);
}

.status-ok {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success-border);
}

/* Oscilloscope Reticle with Laser Scanline */
.trend-visualizer-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.trend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.trend-title-area {
  display: flex;
  align-items: center;
  gap: 6px;
}

.oscilloscope-icon {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

.trend-title {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-main);
}

.trend-meta {
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 600;
}

.trend-chart-box {
  width: 100%;
  height: 85px;
  position: relative;
  overflow: hidden;
}

/* Laser sweep effect */
.laser-scanline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 8px var(--primary);
  pointer-events: none;
  opacity: 0;
  z-index: 10;
}

.laser-scanline.scanning {
  animation: laser-sweep 0.75s var(--ease-fluid) forwards;
}

@keyframes laser-sweep {
  0% { left: 0%; opacity: 0.9; }
  100% { left: 100%; opacity: 0; }
}

.sparkline-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-panel);
  border: 1px solid var(--border-hairline);
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.66rem;
  font-family: var(--font-mono);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -120%);
  display: none;
  z-index: 20;
  white-space: nowrap;
}

/* Empty Placeholder State */
.placeholder-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  margin-bottom: 16px;
}

.placeholder-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.placeholder-state h3 {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 3px;
}

.placeholder-state p {
  font-size: 0.76rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.45;
}

/* Error Banner */
.error-banner {
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.error-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.error-icon-box {
  color: var(--danger);
}

.error-banner h3 {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--danger);
}

.error-banner p {
  font-size: 0.74rem;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 6px;
}

.error-advice {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.1);
  padding: 7px 9px;
  border-radius: var(--radius-xs);
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Harvest Chronometer Result Display
   -------------------------------------------------------------------------- */
.prediction-display {
  margin-bottom: 16px;
}

.metric-highlight {
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
  position: relative;
}

.metric-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
}

.metric-badge-live {
  font-size: 0.58rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.metric-range {
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 3px;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.metric-sub strong {
  color: var(--text-main);
}

/* Flow Timeline with Hexagonal Comb Saturation */
.flow-timeline {
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 10px 12px;
}

.timeline-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.timeline-labels {
  display: flex;
  gap: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
}

.comb-saturation-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.64rem;
  font-family: var(--font-mono);
  color: var(--primary);
}

.comb-hex-icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.timeline-bar {
  height: 5px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.timeline-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #10b981 100%);
  border-radius: var(--radius-pill);
  transition: width 0.6s var(--ease-spring);
}

/* Metric Strip (Clean 4-Item Row) */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-item-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.metric-item-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.badge-confidence {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.badge-high { background: var(--success-soft); color: var(--success); border: 1px solid var(--success-border); }
.badge-low { background: rgba(243, 186, 99, 0.15); color: var(--primary); border: 1px solid var(--primary-border); }

/* Advisory Notice */
.advisory-box {
  background: var(--bg-subtle);
  border-left: 2px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 10px 13px;
  margin-bottom: 14px;
}

.advisory-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--primary);
  margin-bottom: 3px;
}

.advisory-box p {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Collapsible REST Inspector */
.raw-response-area {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-input);
}

.raw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-subtle);
  cursor: pointer;
}

.raw-title-flex {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

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

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xs);
  padding: 2px 7px;
  font-size: 0.64rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-copy:hover {
  color: var(--text-main);
  background: var(--bg-panel);
}

.raw-box {
  padding: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  overflow-x: auto;
  max-height: 200px;
  line-height: 1.4;
  white-space: pre;
}

/* Footer */
.footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

.link-sep {
  color: var(--text-dim);
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-panel);
  border: 1px solid var(--border-hairline);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 7px;
  animation: toast-in 0.22s var(--ease-spring) forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
