/* ==========================================================================
   OpticBudget — Design System & Stylesheet
   ========================================================================== */

/* Theme Variables & Tokens */
:root {
  --bg-primary: #0A0D16;
  --bg-secondary: #121826;
  --bg-card: #1B2337;
  --bg-input: #151B2A;
  --bg-cell-header: #21293E;
  --bg-cell-selected: rgba(59, 130, 246, 0.15);
  
  --accent-primary: #3B82F6;
  --accent-primary-hover: #60A5FA;
  --accent-glow: rgba(59, 130, 246, 0.3);
  
  --accent-emerald: #10B981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  
  --accent-crimson: #EF4444;
  --accent-crimson-glow: rgba(239, 68, 68, 0.25);
  
  --accent-amber: #F59E0B;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);

  --text-main: #E5E7EB;
  --text-muted: #9CA3AF;
  --text-inverse: #0B0F19;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3B82F6;
  --border-cell: rgba(255, 255, 255, 0.05);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --border-radius-lg: 16px;
  --border-radius-md: 8px;
  --border-radius-sm: 4px;
}

/* Base Styles & Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-cell-header);
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Component */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  gap: 1.5rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--accent-primary);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #FFF 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Preset Selector Wrapper */
.preset-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-primary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.preset-selector-wrapper label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.preset-dropdown {
  background-color: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  padding-right: 0.5rem;
}

.preset-dropdown option {
  background-color: var(--bg-secondary);
  color: var(--text-main);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.view-toggle-group {
  display: flex;
  background-color: var(--bg-primary);
  padding: 0.25rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: calc(var(--border-radius-md) - 2px);
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.toggle-btn.active {
  background-color: var(--bg-card);
  color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--accent-primary);
  color: #FFF;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background-color: var(--accent-primary-hover);
  box-shadow: 0 0 12px var(--accent-glow);
}

.glow-btn {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #1D4ED8 100%);
  animation: pulse-glow 3s infinite alternate;
}

/* Formula Bar Component */
.formula-bar-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.35rem 1rem;
  height: 2.25rem;
}

.formula-cell-indicator {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-primary);
  width: 3.5rem;
  text-align: center;
  border-right: 1px solid var(--border-color);
  font-size: 0.9rem;
  margin-right: 0.75rem;
}

.formula-fx-symbol {
  color: var(--text-muted);
  margin-right: 0.75rem;
  display: flex;
  align-items: center;
}

.formula-input {
  flex-grow: 1;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}

.formula-input:focus {
  color: #FFF;
}

/* Main Layout Viewport Grid */
.main-layout {
  display: grid;
  padding: 1.5rem;
  gap: 1.5rem;
  flex-grow: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  transition: grid-template-columns var(--transition-normal);
}

/* Mode Switch Logic */
.main-layout[data-view="dashboard"] {
  grid-template-columns: 1.25fr 1fr;
}

.main-layout[data-view="excel"] {
  grid-template-columns: 1fr;
}

.main-layout[data-view="excel"] .dashboard-side-container {
  display: none;
}

@media (max-width: 1024px) {
  .main-layout[data-view="dashboard"] {
    grid-template-columns: 1fr;
  }
}

/* Premium Card Styles */
.card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--border-radius-sm);
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
}

.card-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.1);
}

/* Excel Spreadsheet Interface */
.spreadsheet-container {
  overflow: auto;
  flex-grow: 1;
  position: relative;
  max-height: 580px;
}

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

.excel-table th, .excel-table td {
  border-right: 1px solid var(--border-cell);
  border-bottom: 1px solid var(--border-cell);
}

.excel-table th {
  background-color: var(--bg-cell-header);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  font-size: 0.8rem;
  user-select: none;
}

.excel-table th.col-index {
  width: 2.5rem;
  text-align: center;
  left: 0;
  z-index: 11;
}

.excel-table th.col-name { width: 35%; }
.excel-table th.col-value { width: 18%; }
.excel-table th.col-unit { width: 12%; }
.excel-table th.col-desc { width: 35%; }

.excel-table td.row-num-cell {
  background-color: var(--bg-cell-header);
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  position: sticky;
  left: 0;
  z-index: 5;
  user-select: none;
  font-family: var(--font-mono);
}

/* Table cell interaction */
.excel-table td {
  padding: 0;
  background-color: var(--bg-secondary);
  height: 2.15rem;
}

.cell-content-wrapper {
  padding: 0.4rem 0.6rem;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.excel-table td.cell-parameter {
  font-weight: 500;
  color: var(--text-main);
}

.excel-table td.cell-unit {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.excel-table td.cell-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.excel-table td.cell-value-holder {
  cursor: cell;
  position: relative;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #FFF;
  transition: background-color var(--transition-fast);
}

.excel-table td.cell-value-holder:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Active / Editing Cell highlights */
.excel-table td.cell-active {
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
  background-color: var(--bg-cell-selected);
  z-index: 4;
}

/* Calculated cells vs manual inputs indication */
.excel-table tr.row-calculated td.cell-value-holder {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--accent-primary-hover);
}

.excel-table tr.row-result td.cell-value-holder {
  color: #FFF;
}

.excel-table tr.row-calculated td.cell-value-holder::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 4px 4px 0;
  border-color: transparent var(--accent-primary) transparent transparent;
}

/* Excel input field */
.cell-input {
  width: 100%;
  height: 100%;
  border: none;
  background-color: var(--bg-input);
  color: #FFF;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 0.6rem;
  outline: none;
}

/* Header highlighting logic (mocked via JS adding .header-active class) */
.excel-table th.header-active,
.excel-table td.row-num-cell.header-active {
  background-color: var(--accent-primary);
  color: var(--text-inverse);
}

/* Subordinate button styling */
.export-actions {
  display: flex;
  gap: 0.75rem;
}

.sub-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.grid-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* SIDE BAR: Dashboard Panels */
.dashboard-side-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Verdict / Summary Card styling */
.verdict-card {
  padding: 1.75rem;
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  color: #FFF;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Status variants */
.verdict-card.status-pass {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 95, 70, 0.3) 100%);
  border-left: 5px solid var(--accent-emerald);
  box-shadow: 0 8px 32px var(--accent-emerald-glow);
}

.verdict-card.status-warn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(146, 64, 14, 0.3) 100%);
  border-left: 5px solid var(--accent-amber);
  box-shadow: 0 8px 32px var(--accent-amber-glow);
}

.verdict-card.status-fail {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(153, 27, 27, 0.3) 100%);
  border-left: 5px solid var(--accent-crimson);
  box-shadow: 0 8px 32px var(--accent-crimson-glow);
}

.verdict-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.status-pass .verdict-badge { background-color: var(--accent-emerald); color: var(--bg-primary); }
.status-warn .verdict-badge { background-color: var(--accent-amber); color: var(--bg-primary); }
.status-fail .verdict-badge { background-color: var(--accent-crimson); color: #FFF; }

.verdict-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.verdict-description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.25rem;
}

.verdict-actions {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.5rem;
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.75rem;
}

.verdict-tip-title {
  font-weight: 700;
  color: #FFF;
  margin-bottom: 0.15rem;
}

.verdict-tip-desc {
  color: rgba(255, 255, 255, 0.7);
}

/* Meters Container */
.meters-container {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .meters-container {
    grid-template-columns: 1fr;
  }
}

.gauge-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.circular-gauge-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 1rem;
}

.circular-gauge {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--bg-secondary);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--transition-normal), stroke var(--transition-normal);
}

.gauge-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gauge-value {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.gauge-unit {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

.gauge-labels {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.label-item {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  gap: 0.4rem;
}

.label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.bg-blue { background-color: var(--accent-primary); }
.bg-orange { background-color: var(--accent-amber); }

.label-name {
  color: var(--text-muted);
  flex-grow: 1;
}

.label-val {
  font-family: var(--font-mono);
  font-weight: 600;
}

.text-orange {
  color: var(--accent-amber) !important;
}

.text-emerald {
  color: var(--accent-emerald) !important;
}

/* Linear Bar Meters */
.bar-meters-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
}

.meter-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.bar-header span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
}

.bar-track {
  height: 6px;
  background-color: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width var(--transition-normal);
}

.bg-cable { background-color: var(--accent-primary); }
.bg-conn { background-color: #A78BFA; }
.bg-splice { background-color: #EC4899; }
.bg-margin { background-color: var(--text-muted); }

/* SVG Graph: Fiber Attenuation Path */
.dashboard-graph-card {
  flex-grow: 1;
}

.graph-legend {
  display: flex;
  gap: 0.75rem;
}

.legend-item {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.legend-line {
  width: 14px;
  height: 2px;
  display: inline-block;
}

.line-power { background-color: var(--accent-emerald); }
.line-sens { border-top: 2px dashed var(--accent-crimson); }

.graph-container {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.15);
}

#power-path-svg {
  width: 100%;
  height: 100%;
  min-height: 180px;
}

.svg-grid-line {
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 1;
}

.svg-axis {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1;
}

.svg-axis-text {
  fill: var(--text-muted);
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 500;
}

.svg-sens-limit {
  stroke: var(--accent-crimson);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.3));
}

.svg-point-circle {
  fill: var(--bg-card);
  stroke-width: 2.5;
  cursor: pointer;
  transition: r var(--transition-fast);
}

.svg-point-circle:hover {
  r: 6;
}

.svg-point-text {
  fill: #FFF;
  font-size: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.svg-tooltip-bg {
  fill: var(--bg-secondary);
  stroke: var(--accent-primary);
  stroke-width: 1;
  rx: 4;
}

.graph-x-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Modals Overlay Base */
.defense-modal-overlay,
.help-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.defense-modal-overlay.active,
.help-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Content Card */
.defense-modal-card,
.help-modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  max-width: 680px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
  overflow: hidden;
}

.defense-modal-overlay.active .defense-modal-card,
.help-modal-overlay.active .help-modal-card {
  transform: translateY(0);
}

.close-modal-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.close-modal-btn:hover {
  color: #FFF;
}

/* Slide Deck Styling (Presentation Mode) */
.modal-slide {
  padding: 2.25rem;
}

.slide-header {
  margin-bottom: 1.5rem;
}

.slide-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: 0.075em;
  background-color: rgba(59, 130, 246, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: var(--border-radius-sm);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.slide-header h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
}

.slide-question {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.speech-quote-box {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  position: relative;
  margin-bottom: 1.5rem;
}

#speech-text {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 400;
  color: #FFF;
  margin-bottom: 1rem;
}

.copy-speech-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--accent-primary);
  color: #FFF;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.copy-speech-btn:hover {
  background-color: var(--accent-primary-hover);
}

.slide-grid-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.metric-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
}

.metric-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-num {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
}

.metric-status-text {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.slide-footer-info {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.slide-footer-info h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.slide-footer-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.slide-footer-info code {
  font-family: var(--font-mono);
  background-color: var(--bg-secondary);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.75rem;
  color: var(--accent-primary-hover);
}

/* Help Parameter Details Modal Grid */
.help-modal-card {
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}

.help-modal-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

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

.help-item strong {
  color: var(--accent-primary-hover);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.help-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Application Footer */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 0.5rem;
}

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

.footer-links a:hover {
  text-decoration: underline;
}

.footer-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

/* Keyframes animations */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 4px var(--accent-glow);
  }
  100% {
    box-shadow: 0 0 16px var(--accent-glow);
  }
}

@keyframes pulse-dot {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* ==========================================================================
   Wizard Form Component Styles
   ========================================================================== */

.wizard-card-container {
  display: none;
}

.main-layout[data-view="wizard"] .wizard-card-container {
  display: flex;
}
.main-layout[data-view="wizard"] .grid-card-container {
  display: none;
}

.main-layout[data-view="dashboard"] .wizard-card-container {
  display: none;
}
.main-layout[data-view="dashboard"] .grid-card-container {
  display: flex;
}

.main-layout[data-view="excel"] .wizard-card-container {
  display: none;
}
.main-layout[data-view="excel"] .grid-card-container {
  display: flex;
}

.wizard-form-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 580px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wizard-section {
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
}

.wizard-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary-hover);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.step-num {
  background-color: var(--accent-primary);
  color: #FFF;
  font-size: 0.75rem;
  font-weight: 800;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-field-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.wizard-field-row:last-child {
  margin-bottom: 0;
}

.wizard-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.wizard-field.full-width {
  flex: none;
  width: 100%;
}

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

.wizard-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.wiz-value-display {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background-color: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--border-radius-sm);
}

.input-slider-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.input-slider-group input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-primary);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}

.input-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent-glow);
  transition: transform var(--transition-fast);
}

.input-slider-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-primary-hover);
}

.wiz-num-input {
  width: 4.5rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #FFF;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 0.25rem;
  border-radius: var(--border-radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.wiz-num-input:focus {
  border-color: var(--accent-primary);
}

.field-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

@media (max-width: 640px) {
  .wizard-field-row {
    flex-direction: column;
    gap: 1rem;
  }
}

