/* ==========================================================================
   Ticket fiscal: ¿a dónde van exactamente tus impuestos?
   Estilos corporativos canónicos para Fijate Tools
   ========================================================================== */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta base clara */
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Acentos */
  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-primary-light: #e0f2fe;
  --accent-success: #16a34a;
  --accent-warning: #d97706;
  --accent-danger: #dc2626;

  /* Ticket térmico */
  --ticket-paper: #ffffff;
  --ticket-paper-border: #cbd5e1;
  --ticket-ink: #0f172a;
  --ticket-ink-muted: #475569;
  --ticket-shadow: rgba(0, 0, 0, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-card: #151d2a;
  --bg-card-subtle: #1c2637;
  --border-color: #243247;
  --border-strong: #334460;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --accent-primary: #38bdf8;
  --accent-primary-hover: #7dd3fc;
  --accent-primary-light: rgba(56, 189, 248, 0.12);

  --ticket-paper: #182232;
  --ticket-paper-border: #2c3c54;
  --ticket-ink: #f8fafc;
  --ticket-ink-muted: #94a3b8;
  --ticket-shadow: rgba(0, 0, 0, 0.45);
}

/* --------------------------------------------------------------------------
   Layout base
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.hero-title,
.section-title,
.card-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  margin: 0;
}

.mono {
  font-family: var(--font-mono);
}

.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Hero introductorio y KPIs rápidos
   -------------------------------------------------------------------------- */
.fiscal-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

.hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: var(--accent-primary-light);
  color: var(--accent-primary);
}

.hero-pill-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 820px;
  margin-bottom: 1.5rem;
}

.fiscal-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-subtext {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   Panel de dos columnas: Formulario de entrada vs Ticket físico
   -------------------------------------------------------------------------- */
.fiscal-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

@media (max-width: 992px) {
  .fiscal-workspace {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Columna izquierda: Configuración y formulario
   -------------------------------------------------------------------------- */
.config-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
}

.panel-header {
  margin-bottom: 1.25rem;
}

.panel-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

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

/* Pestañas de modo */
.mode-tabs-nav {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card-subtle);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.mode-tab.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.mode-panel {
  display: none;
}

.mode-panel.active {
  display: block;
}

/* Formularios e inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.input-with-select {
  display: flex;
  gap: 0.5rem;
}

.form-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 44px;
  padding: 0 1rem;
  font-size: 1.05rem;
  font-family: var(--font-mono);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-sizing: border-box;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.form-select {
  height: 44px;
  padding: 0 2.2rem 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px;
  cursor: pointer;
  box-sizing: border-box;
}

.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.salary-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.salary-preset {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.salary-preset:hover {
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Radio buttons y ajustes avanzados */
.radio-options-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-main);
  cursor: pointer;
}

.slider-input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card-subtle);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.slider-input-group input[type="range"] {
  flex: 1;
  accent-color: var(--accent-primary);
}

.slider-mini-input {
  width: 70px;
  height: 36px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-main);
}

/* Checkboxes estilizados con caja destacada */
.feature-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.feature-checkbox-card:hover {
  border-color: var(--border-strong);
}

.feature-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  margin-top: 0.15rem;
  cursor: pointer;
}

.checkbox-card-body {
  display: flex;
  flex-direction: column;
}

.checkbox-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.checkbox-card-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   Columna derecha: El Ticket Fiscal físico
   -------------------------------------------------------------------------- */
.ticket-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.ticket-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.period-pills-wrap {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.25rem;
}

.period-pill {
  border: none;
  background: transparent;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.period-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
}

/* El ticket térmico simulado */
.thermal-receipt {
  background: var(--ticket-paper);
  border: 1px solid var(--ticket-paper-border);
  box-shadow: 0 16px 36px var(--ticket-shadow);
  border-radius: var(--radius-sm);
  padding: 2rem 1.75rem 2.5rem;
  position: relative;
  overflow: hidden;
  color: var(--ticket-ink);
  font-family: var(--font-mono);
}

/* Dientes de sierra del papel */
.receipt-jagged-edge-top,
.receipt-jagged-edge-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 8px;
  background-size: 16px 8px;
  background-repeat: repeat-x;
}

.receipt-jagged-edge-top {
  top: 0;
  background-image: linear-gradient(135deg, var(--bg-page) 25%, transparent 25%),
                    linear-gradient(225deg, var(--bg-page) 25%, transparent 25%);
}

.receipt-jagged-edge-bottom {
  bottom: 0;
  background-image: linear-gradient(45deg, var(--bg-page) 25%, transparent 25%),
                    linear-gradient(315deg, var(--bg-page) 25%, transparent 25%);
}

.receipt-header {
  text-align: center;
  margin-bottom: 1.25rem;
  border-bottom: 1.5px dashed var(--ticket-paper-border);
  padding-bottom: 1rem;
}

.receipt-agency-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.receipt-agency-subtitle {
  font-size: 0.78rem;
  color: var(--ticket-ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.receipt-meta-grid {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ticket-ink-muted);
  margin-top: 0.75rem;
}

.receipt-columns-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  border-bottom: 1.5px dashed var(--ticket-paper-border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
  color: var(--ticket-ink-muted);
}

.receipt-col-left {
  flex: 1;
}

.receipt-col-right {
  display: flex;
  gap: 1.25rem;
}

/* Filas de conceptos del ticket */
.ticket-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.ticket-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ticket-item-row:hover,
.ticket-item-row:focus-visible {
  background: var(--bg-card-subtle);
  outline: none;
}

.ticket-item-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-item-code {
  color: var(--ticket-ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ticket-item-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-item-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.ticket-item-pct {
  color: var(--ticket-ink-muted);
  font-size: 0.75rem;
  width: 42px;
  text-align: right;
}

.ticket-item-val {
  font-weight: 700;
  width: 78px;
  text-align: right;
}

/* Subtotales y Total del ticket */
.receipt-subtotals {
  border-top: 1.5px dashed var(--ticket-paper-border);
  padding-top: 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--ticket-ink-muted);
}

.receipt-subtotal-row {
  display: flex;
  justify-content: space-between;
}

.receipt-total-block {
  border-top: 2px solid var(--ticket-paper-border);
  border-bottom: 2px solid var(--ticket-paper-border);
  padding: 0.85rem 0;
  margin-bottom: 1.25rem;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.receipt-total-label {
  font-size: 1rem;
  font-weight: 800;
}

.receipt-total-amount {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.receipt-tax-rate-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--ticket-ink-muted);
  margin-top: 0.35rem;
}

/* Código de barras simulado */
.receipt-barcode-wrap {
  text-align: center;
  margin: 1.25rem 0 0.5rem;
}

.barcode-svg {
  width: 80%;
  max-width: 260px;
  height: 38px;
}

.receipt-footer-tagline {
  font-size: 0.7rem;
  text-align: center;
  color: var(--ticket-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.35rem;
}

.receipt-click-hint {
  font-size: 0.72rem;
  text-align: center;
  color: var(--accent-primary);
  margin-top: 0.5rem;
  font-family: var(--font-main);
  font-weight: 600;
}

/* Botones de acción del ticket */
.ticket-actions-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn-action-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 700;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  transition: all var(--transition-fast);
}

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

.btn-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-secondary:hover {
  background: var(--bg-card-subtle);
  border-color: var(--border-strong);
}

/* --------------------------------------------------------------------------
   Sección: Equivalencias cívicas tangibles
   -------------------------------------------------------------------------- */
.civic-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.section-header-block {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.civic-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.civic-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.civic-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.civic-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.civic-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.civic-cat-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.civic-card-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.civic-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.civic-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Sección: Simulador "Mi presupuesto soñado"
   -------------------------------------------------------------------------- */
.dream-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.dream-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dream-total-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.dream-total-badge {
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.dream-total-badge.match {
  background: #dcfce7;
  color: #166534;
}

.dream-total-badge.over {
  background: #fee2e2;
  color: #991b1b;
}

.dream-total-badge.under {
  background: #fef3c7;
  color: #92400e;
}

[data-theme="dark"] .dream-total-badge.match {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}
[data-theme="dark"] .dream-total-badge.over {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
[data-theme="dark"] .dream-total-badge.under {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.dream-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 992px) {
  .dream-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.dream-sliders-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dream-slider-item {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.dream-slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.dream-slider-track-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.dream-range-input {
  width: 100%;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.dream-official-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 16px;
  background: var(--text-subtle);
  border-radius: 2px;
  pointer-events: none;
}

.dream-slider-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.dream-diff.positive {
  color: var(--accent-success);
  font-weight: 700;
}
.dream-diff.negative {
  color: var(--accent-danger);
  font-weight: 700;
}
.dream-diff.neutral {
  color: var(--text-muted);
}

/* Barras comparativas */
.dream-bars-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dream-bar-comparison-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dream-bar-name-col {
  font-size: 0.85rem;
  font-weight: 600;
}

.bar-pair {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--bg-card-subtle);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.bar-fill {
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  transition: width 0.3s ease;
}

.bar-fill.real {
  background: #cbd5e1;
  color: #1e293b;
}

.bar-fill.dream {
  background: var(--accent-primary);
  color: #ffffff;
}

[data-theme="dark"] .bar-fill.real {
  background: #334460;
  color: #e2e8f0;
}

/* --------------------------------------------------------------------------
   Sección SEO y Acordeón FAQ
   -------------------------------------------------------------------------- */
.seo-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  margin-bottom: 2.5rem;
}

.seo-guide-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.seo-guide-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.faq-accordion-wrap {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card-subtle);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.faq-arrow {
  transition: transform var(--transition-fast);
}

.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Modal de detalle de partida
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  z-index: 10;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.modal-close-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.modal-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.modal-meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}

.modal-meta-label {
  color: var(--text-muted);
}

.modal-meta-val {
  font-weight: 700;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Toast flotante */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 1200;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all var(--transition-normal);
}

.toast-msg.active {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Ajustes responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.65rem;
  }
  .fiscal-hero-card,
  .config-panel,
  .civic-section,
  .dream-section,
  .seo-guide-section {
    padding: 1.25rem;
  }
  .thermal-receipt {
    padding: 1.5rem 1rem 2rem;
  }
  .receipt-col-right {
    gap: 0.6rem;
  }
  .ticket-item-right {
    gap: 0.6rem;
  }
  .toast-msg {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    text-align: center;
  }
}
