/* ==========================================================================
   GHOST SHOPPER — MODERN E-COMMERCE PRICE INTELLIGENCE PLATFORM
   Stylesheet: dashboard.css
   Theme: Clean, Modern, Professional Light SaaS
   ========================================================================== */

:root {
  /* Neutral Color Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-overlay: rgba(15, 23, 42, 0.55);

  /* Borders */
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-bright: #94a3b8;
  --border-focus: #2563eb;

  /* Brand & Accents */
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-light: #eff6ff;

  --accent-cyan: #2563eb;
  --accent-cyan-rgb: 37, 99, 235;
  --accent-green: #10b981;
  --accent-green-rgb: 16, 185, 129;
  --accent-green-bg: #ecfdf5;
  --accent-orange: #f59e0b;
  --accent-orange-rgb: 245, 158, 11;
  --accent-orange-bg: #fffbeb;
  --accent-red: #ef4444;
  --accent-red-rgb: 239, 68, 68;
  --accent-red-bg: #fef2f2;
  --accent-purple: #8b5cf6;
  --accent-purple-rgb: 139, 92, 246;
  --accent-purple-bg: #f5f3ff;

  /* Typography Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-accent: #2563eb;

  /* Typography Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  /* Modern Natural Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
#app-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 48px 24px;
  gap: 24px;
}

/* ==========================================================================
   Modern Clean Header & Top Navbar
   ========================================================================== */
.dashboard-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  margin: 0 -24px 8px -24px;
  padding: 14px 32px;
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.brand-icon:hover {
  transform: translateY(-1px) scale(1.02);
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.16);
}

.brand-ghost-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.brand-title-group h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Navbar Actions */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.nav-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

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

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* View Mode Switcher */
.main-view-nav {
  display: flex;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}

.view-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-nav-btn:hover {
  color: var(--text-primary);
}

.view-nav-btn.active {
  background: #ffffff;
  color: var(--brand-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Hero Search & Pricing Console
   ========================================================================== */
.search-hero-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

.search-hero-header {
  margin-bottom: 20px;
}

.search-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.search-hero-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 680px;
}

/* Search Bar Input Group */
.search-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.search-main-input {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 12px 18px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-main-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-search-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  white-space: nowrap;
}

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

/* Popular Suggestions Chips */
.quick-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-chip-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-chip-btn:hover {
  background: #e2e8f0;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* ==========================================================================
   Price Comparison Section
   ========================================================================== */
.cyber-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title-group svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0;
}

/* Developer Telemetry Status Bar & Metric Items */
.status-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.telemetry-item:hover {
  background: #ffffff;
  border-color: var(--border-medium);
  box-shadow: var(--shadow-xs);
}

.telemetry-label {
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.telemetry-value {
  font-size: 1.0rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 6px;
}

.telemetry-value.accent-cyan {
  color: #0284c7;
}

.telemetry-value.accent-green {
  color: #16a34a;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body {
  padding: 24px;
}

/* KPI Cards Grid */
.observability-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.matrix-stat-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-fast);
}

.matrix-stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.stat-box-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Competitor Store Cards Grid — 4-col on desktop, 2-col on tablet, 1-col on mobile */
.competitor-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .competitor-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .competitor-cards-grid {
    grid-template-columns: 1fr;
  }
}

.competitor-store-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.competitor-store-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.store-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.store-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.store-badge.amazon { background: #ff9900; color: #111111; }
.store-badge.bestbuy { background: #0046be; color: #ffffff; }
.store-badge.walmart { background: #0071dc; color: #ffffff; }
.store-badge.target { background: #cc0000; color: #ffffff; }
.store-badge.jumia { background: #f68b1e; color: #ffffff; }
.store-badge.konga { background: #ed017f; color: #ffffff; }
.store-badge.jiji { background: #3db83a; color: #ffffff; }
.store-badge.generic { background: #2563eb; color: #ffffff; }

.store-card-price {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.1;
}

.store-card-orig {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.store-card-meta {
  font-size: 0.80rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.store-card-footer {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.btn-card-action {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: none;
  white-space: nowrap;
}

.btn-card-action.preview {
  background: var(--brand-light);
  color: var(--brand-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.btn-card-action.preview:hover {
  background: rgba(37, 99, 235, 0.15);
}

.btn-card-action.link {
  background: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-card-action.link:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   Data Table
   ========================================================================== */
.table-responsive-wrapper {
  overflow-x: auto;
}

.cyber-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.cyber-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.cyber-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.cyber-table tr:hover {
  background: #f8fafc;
}

.cyber-select {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
}

.cyber-select:focus {
  border-color: var(--brand-primary);
}

/* ==========================================================================
   Modal & Lightbox
   ========================================================================== */
.cyber-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.cyber-modal-backdrop.open {
  display: flex;
}

.cyber-modal-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-image-preview-wrapper {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.modal-image-preview {
  max-width: 100%;
  max-height: 480px;
  border-radius: var(--radius-sm);
}

/* Toasts */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 280px;
  max-width: 400px;
}

.toast-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.toast-body {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Utilities */
.hidden { display: none !important; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ==========================================================================
   Market Price Distribution Band
   ========================================================================== */
.price-band {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.price-band-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.price-band-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-band-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.price-band-figures {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  text-align: center;
}

.price-band-fig {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.price-band-fig.primary {
  border-color: var(--brand-primary);
  background: #eff6ff;
}

.price-band-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}

.price-band-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.price-band-value.median {
  color: var(--brand-primary);
}

.price-band-sub {
  display: block;
  font-size: 0.70rem;
  color: var(--text-muted);
}

.price-band-track {
  position: relative;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  margin: 16px 8px 8px 8px;
}

.price-band-whisker {
  position: absolute;
  top: 3px;
  height: 2px;
  background: #94a3b8;
  border-radius: 1px;
}

.price-band-iqr {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(37, 99, 235, 0.3);
  border: 1px solid var(--brand-primary);
  border-radius: 4px;
}

.price-band-marker {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: var(--brand-primary);
  border: 2px solid #ffffff;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.price-band-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

/* Store Card Browser Previews */
.store-card-shot {
  display: block;
  width: 100%;
  height: 155px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  background: #f1f5f9;
  position: relative;
  cursor: pointer;
  padding: 0;
  margin: 2px 0 6px 0;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.store-card-shot:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.store-card-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.store-card-shot-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  backdrop-filter: blur(4px);
  letter-spacing: 0.02em;
}

.store-card-provenance {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: #f1f5f9;
  color: var(--text-secondary);
}

.store-card-provenance.live {
  background: #ecfdf5;
  color: #059669;
}

/* ==========================================================================
   Developer Telemetry & Infrastructure Dashboard
   ========================================================================== */
.main-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

@media (max-width: 1080px) {
  .main-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.column-left,
.column-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Control Panel Inputs */
.mode-tabs-container {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.active-tab {
  background: var(--brand-primary) !important;
  color: #ffffff !important;
  border-color: var(--brand-primary) !important;
}

.url-input-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.url-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.url-input-label {
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-quick-actions {
  display: flex;
  gap: 6px;
}

.cyber-textarea {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-primary);
  resize: vertical;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.cyber-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.control-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Log Terminal Viewport */
.log-stream-card {
  display: flex;
  flex-direction: column;
}

.log-terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.log-terminal-viewport {
  width: 100%;
  height: 380px;
  background: #0f172a;
  border-radius: var(--radius-sm);
  overflow-y: auto;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  word-break: break-all;
}

.log-ts {
  color: #64748b;
  flex-shrink: 0;
  user-select: none;
}

.log-level {
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.70rem;
  flex-shrink: 0;
}

.log-level.INFO { background: rgba(37, 99, 235, 0.25); color: #93c5fd; }
.log-level.WARN { background: rgba(245, 158, 11, 0.25); color: #fde047; }
.log-level.ERROR { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.log-level.SECURITY { background: rgba(16, 185, 129, 0.25); color: #86efac; }

.log-msg {
  color: #f8fafc;
  flex: 1;
}

/* Viewport Grid & Cameras */
.viewport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  min-height: 200px;
}

.viewport-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  width: 100%;
  grid-column: 1 / -1;
  background: #f8fafc;
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-md);
}

.viewport-empty-state svg {
  width: 48px;
  height: 48px;
  stroke: #94a3b8;
  margin-bottom: 12px;
}

.snapshot-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.snapshot-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.snapshot-thumb-container {
  position: relative;
  width: 100%;
  height: 145px;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.snapshot-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform var(--transition-normal);
}

.snapshot-card:hover .snapshot-thumb-img {
  transform: scale(1.03);
}

.snapshot-scanning-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-primary);
  box-shadow: 0 0 8px var(--brand-primary);
  opacity: 0.8;
  animation: scanline 2.5s linear infinite;
  pointer-events: none;
}

@keyframes scanline {
  0% { top: 0; opacity: 0.8; }
  50% { opacity: 1; }
  100% { top: 100%; opacity: 0.2; }
}

.snapshot-overlay-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.snapshot-status-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.snapshot-details {
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.snapshot-url {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snapshot-step-description {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.badge-executing {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.status-badge.badge-completed {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.badge-provisioning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.badge-verifying {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.status-badge.badge-failed {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.badge-paused {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

/* Observability Matrix Gauges */
.stat-gauge-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0;
}

.circular-gauge {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
  flex-shrink: 0;
}

.gauge-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 4;
}

.gauge-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 400ms ease;
}

.gauge-fill.cyan { stroke: var(--brand-primary); }
.gauge-fill.green { stroke: #10b981; }

.stat-numeric-group {
  display: flex;
  flex-direction: column;
}

.stat-big-number {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-sub-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.meter-bar-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.meter-bar-fill {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 3px;
  transition: width 300ms ease;
}

.meter-bar-fill.orange { background: #f59e0b; }

/* MicroVM Lifecycle Pipeline */
.state-pipeline-container {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 18px;
}

.pipeline-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.pipeline-track {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  gap: 8px;
}

.pipeline-track::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: #cbd5e1;
  z-index: 0;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
}

.pipeline-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #94a3b8;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all var(--transition-fast);
}

.pipeline-step.active .pipeline-node {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.pipeline-step.completed .pipeline-node {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.pipeline-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pipeline-count {
  font-size: 0.70rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* Approvals Card */
.approvals-card {
  margin-bottom: 20px;
}

.approval-badge-warning {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.approval-empty-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  color: #15803d;
  font-size: 0.82rem;
  font-weight: 600;
}

.approval-empty-state svg {
  width: 18px;
  height: 18px;
  fill: #15803d;
  flex-shrink: 0;
}

/* HITL Action Required Badge Button on Competitor Cards */
.store-card-provenance.synthetic.btn-hitl-trigger {
  cursor: pointer;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: var(--radius-full) !important;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.store-card-provenance.synthetic.btn-hitl-trigger:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}
