/* ==========================================================================
   Calculadora de Millas Smiles - Estilos Canónicos
   fijate.com/tools/calculadora-smiles/
   ========================================================================== */

:root {
  --bg-main: #0a0e17;
  --bg-card: #111827;
  --bg-card-secondary: #172033;
  --bg-input: #0f172a;
  --bg-input-focus: #1e293b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --smiles-orange: #ff7020;
  --smiles-gradient: linear-gradient(135deg, #ff7020 0%, #e65100 100%);

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

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.3);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.3);

  --neutral: #8b5cf6;
  --neutral-bg: rgba(139, 92, 246, 0.12);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.25);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-title: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-secondary: #f1f5f9;
  --bg-input: #f8fafc;
  --bg-input-focus: #ffffff;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-focus: #2563eb;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-primary);
  line-height: 1.25;
}

/* Layout */
.main-wrapper.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3.5rem;
  padding: 0 1rem;
  flex: 1;
}

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

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

/* Grid de la herramienta */
.calculator-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

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

/* Tarjetas */
.card-main,
.card-result,
.card-seo {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Chips de rutas populares */
.popular-routes-wrapper {
  margin-bottom: 1.25rem;
}

.popular-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chips-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
}

.chips-scroll::-webkit-scrollbar {
  height: 4px;
}

.chips-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.route-chip {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.route-chip:hover {
  background: var(--bg-input-focus);
  color: var(--text-primary);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Formularios y controles */
.form-group {
  margin-bottom: 1.15rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.form-row-airports {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: flex-end;
}

@media (max-width: 540px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .form-row-airports {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

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

.btn-help-inline {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}

.btn-help-inline:hover {
  color: var(--accent-primary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  min-height: 42px;
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: var(--bg-input-focus);
}

.form-control {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 42px;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
}

.input-number {
  font-family: var(--font-mono);
  font-weight: 600;
}

.input-suffix {
  padding: 0 0.85rem 0 0.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
}

/* Botón swap aeropuertos */
.btn-swap {
  width: 42px;
  height: 42px;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-swap:hover {
  background: var(--bg-input-focus);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: rotate(180deg);
}

@media (max-width: 540px) {
  .btn-swap {
    width: 100%;
    height: 36px;
  }
}

/* Desplegables <select> conforme a normas canónicas */
select.form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  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='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

[data-theme="light"] select.form-control {
  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='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

select.form-control option,
select.form-control optgroup {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

/* Tabs de tipo de vuelo (Ida / Ida y vuelta) */
.radio-tab-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.3rem;
  border-radius: var(--radius-md);
}

.radio-tab-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
}

.radio-tab-label input[type="radio"] {
  display: none;
}

.radio-tab-label:has(input[type="radio"]:checked) {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin-top: 4px;
  z-index: 50;
  max-height: 250px;
  overflow-y: auto;
  display: none;
}

.autocomplete-dropdown.is-open {
  display: block;
}

.autocomplete-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--bg-card-secondary);
}

.iata-tag {
  background: var(--bg-card-secondary);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.airport-info small {
  color: var(--text-muted);
}

.autocomplete-empty {
  padding: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Botón estimar millas */
.btn-estimate {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-estimate:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-primary);
}

/* Smiles & Money Toggle & Fields */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #ffffff;
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.smiles-money-container {
  background: var(--bg-card-secondary);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  margin-top: 0.75rem;
  animation: fadeIn 0.2s ease;
}

/* ==========================================================================
   Panel de Resultados
   ========================================================================== */
.card-result {
  position: sticky;
  top: 1.5rem;
}

/* Veredicto principal */
.verdict-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card-secondary);
  transition: all 0.3s ease;
}

.verdict-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.verdict-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.verdict-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.verdict-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.verdict-advice {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 2px solid var(--border-color);
  padding-left: 0.6rem;
  margin-top: 0.5rem;
}

/* Clases cromáticas de veredicto */
.verdict-card.verdict-excellent {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.03) 100%);
  border-color: var(--success-border);
}
.verdict-badge.verdict-excellent {
  background: var(--success);
  color: #ffffff;
}

.verdict-card.verdict-good {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.03) 100%);
  border-color: rgba(59, 130, 246, 0.3);
}
.verdict-badge.verdict-good {
  background: var(--accent-primary);
  color: #ffffff;
}

.verdict-card.verdict-neutral {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.03) 100%);
  border-color: var(--warning-border);
}
.verdict-badge.verdict-neutral {
  background: var(--warning);
  color: #111827;
}

.verdict-card.verdict-poor,
.verdict-card.verdict-negative {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.03) 100%);
  border-color: var(--danger-border);
}
.verdict-badge.verdict-poor,
.verdict-badge.verdict-negative {
  background: var(--danger);
  color: #ffffff;
}

/* KPIs de métricas */
.kpis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-number {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

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

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* Balance de millas y faltantes */
.balance-box {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.balance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.status-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

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

.status-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.balance-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.missing-alert {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Tabla comparativa de escenarios */
.comparison-table-wrapper {
  margin-bottom: 1.25rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.comparison-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.comparison-table td:last-child,
.comparison-table th:last-child {
  text-align: right;
}

.comparison-table td.cost-cell {
  font-family: var(--font-mono);
  font-weight: 600;
}

.table-summary-box {
  background: var(--bg-card-secondary);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Botones de acción principales */
.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn-action {
  height: 44px;
  width: 100%;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

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

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

/* ==========================================================================
   Historial de comparativas
   ========================================================================== */
.history-section {
  margin-top: 1.5rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.history-item {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

.history-item:hover {
  border-color: var(--accent-primary);
}

.history-route {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.history-cities {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.history-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.history-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: right;
}

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

.history-savings {
  font-size: 0.8rem;
  font-weight: 600;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-history-load {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-history-load:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-history-del {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.btn-history-del:hover {
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Guía SEO y Preguntas Frecuentes
   ========================================================================== */
.seo-prose {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.seo-prose h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 1.25rem 0 0.5rem;
}

.seo-prose p {
  margin-bottom: 0.85rem;
}

.seo-prose ul {
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
}

.seo-prose li {
  margin-bottom: 0.35rem;
}

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

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

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

.faq-answer {
  padding: 0 1rem 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Modales Canónicos
   ========================================================================== */
.fijate-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 1rem;
}

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

.fijate-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(15px);
  transition: transform 0.2s ease;
}

.fijate-modal-overlay.is-active .fijate-modal-card {
  transform: translateY(0);
}

.fijate-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.fijate-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.fijate-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.fijate-modal-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.fijate-modal-body p {
  margin-bottom: 0.6rem;
}

.fijate-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.btn-modal {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-modal-cancel {
  background: var(--bg-card-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-modal-confirm {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Toast */
.fijate-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2000;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.fijate-toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
