/* ==========================================================================
   Calculadora de bienestar y paseos caninos - Hoja de estilos canónica
   ========================================================================== */

:root,
[data-theme="dark"],
body.dark-mode {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores canónicos modo oscuro */
  --bg-body: #0b0f17;
  --bg-card: #131926;
  --bg-card-sub: #172033;
  --bg-input: #1a233a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --accent-primary: #10b981; /* Verde esmeralda bienestar canino */
  --accent-primary-hover: #059669;
  --accent-blue: #3b82f6;
  --accent-amber: #f59e0b;
  --accent-danger: #ef4444;
  --accent-orange: #f97316;

  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

[data-theme="light"],
body.light-mode {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-sub: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --accent-primary: #059669;
  --accent-primary-hover: #047857;
  --accent-blue: #2563eb;
  --accent-amber: #d97706;
  --accent-danger: #dc2626;
  --accent-orange: #ea580c;

  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* Reset y contención canónica */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.tool-hero-title,
.section-title,
.subcard-title,
.plan-hero-title {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  color: var(--text-main);
  margin-top: 0;
}

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

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

.tool-with-sidebar {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

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

/* Tarjeta contenedora principal */
.card-main {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* Bloque titular */
.tool-header-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.badge-official {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tool-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.tool-hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 900px;
  line-height: 1.6;
}

/* Barra de pestañas táctiles */
.tabs-nav-container {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.75rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.08);
}

.tab-pane {
  display: none;
  animation: fadeInPane 0.25s ease-out forwards;
}

.tab-pane.active {
  display: block;
}

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

/* Estructura en 2 columnas para paneles */
.panel-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .panel-grid-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Subtarjetas internas */
.subcard-box {
  background-color: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.subcard-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

/* Formularios y controles accesibles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

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

@media (max-width: 540px) {
  .form-row-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-control {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Desplegables conformes a reglas canónicas */
.custom-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  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='%239ca3af' 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 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
  appearance: none;
  cursor: pointer;
}

.custom-select optgroup,
.custom-select option {
  background-color: var(--bg-card);
  color: var(--text-main);
}

/* Wrapper flex para inputs con sufijo */
.input-with-suffix {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.input-with-suffix .form-control {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  border: none;
  background: transparent;
}

.input-with-suffix .suffix-label {
  padding: 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-left: 1px solid var(--border-color);
  height: 42px;
  display: flex;
  align-items: center;
}

/* Deslizadores táctiles (Range Sliders) */
.range-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-range {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.range-value-badge {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  min-width: 85px;
  text-align: center;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* Avisos destacados */
.notice-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.notice-callout svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

/* KPIs energéticos */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.kpi-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}

.kpi-card.highlight-card {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

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

.kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
}

.kpi-val small {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

/* Distribución de paseos recomendados */
.routine-summary-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
}

.routine-card-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.walk-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 600px) {
  .walk-schedule-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.walk-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.walk-item-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.tag-morning {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.tag-noon {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.tag-afternoon {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.walk-item-dur {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text-main);
}

.walk-item-type {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.walk-metrics-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Módulo 2: Termómetro de asfalto y comparativa
   ========================================================================== */

.surface-comparison-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
}

.comparison-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.surface-bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.surface-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
}

.surface-name {
  width: 110px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.surface-bar-track {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  overflow: hidden;
}

.surface-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-asphalt { background: #ef4444; }
.bar-concrete { background: #f97316; }
.bar-dirt { background: #f59e0b; }
.bar-grass { background: #10b981; }

.surface-temp-val {
  width: 48px;
  text-align: right;
  font-weight: 700;
  color: var(--text-main);
  flex-shrink: 0;
}

/* Semáforo de riesgo */
.risk-gauge-box {
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
}

.risk-safe {
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid #10b981;
  color: #10b981;
}

.risk-caution {
  background: rgba(245, 158, 11, 0.12);
  border: 2px solid #f59e0b;
  color: #f59e0b;
}

.risk-danger {
  background: rgba(249, 115, 22, 0.15);
  border: 2px solid #f97316;
  color: #f97316;
}

.risk-critical {
  background: rgba(239, 68, 68, 0.18);
  border: 2px solid #ef4444;
  color: #ef4444;
}

.gauge-temp-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.gauge-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.gauge-unit {
  font-size: 1.5rem;
  font-weight: 600;
}

.gauge-status-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.gauge-status-desc {
  font-size: 0.88rem;
  color: var(--text-main);
  max-width: 440px;
  margin: 0;
  line-height: 1.5;
}

/* Simulador interactivo de los 5 segundos */
.rule-5s-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rule-5s-header {
  margin-bottom: 0.5rem;
}

.rule-5s-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.15);
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.rule-5s-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.rule-5s-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 380px;
  margin: 0.35rem 0 1rem;
}

.timer-interactive-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.timer-circle-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  transform: rotate(-90deg);
  width: 120px;
  height: 120px;
}

.timer-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}

.timer-progress-circle {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.7; /* 2 * PI * 52 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear, stroke 0.2s ease;
}

.timer-number-display {
  position: absolute;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.timer-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 280px;
}

.test-5s-feedback-box {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-main);
  text-align: left;
}

/* ==========================================================================
   Módulo 3: Estimulación mental (Pilares)
   ========================================================================== */

.checkbox-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.custom-check-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  transition: background 0.15s ease;
}

.custom-check-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.custom-check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.pillars-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pillar-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pillar-card.pillar-olfato { border-left-color: #10b981; }
.pillar-card.pillar-masticacion { border-left-color: #3b82f6; }
.pillar-card.pillar-propiocepcion { border-left-color: #f59e0b; }

.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.pillar-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.pillar-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.pillar-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.pillar-steps {
  margin: 0.35rem 0 0 0;
  padding-left: 1.25rem;
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* ==========================================================================
   Módulo 4: Plan diario completo de 24h
   ========================================================================== */

.plan-full-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.plan-title-area {
  flex: 1 1 300px;
}

.plan-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
}

.plan-hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.plan-actions-group {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

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

@media (max-width: 820px) {
  .timeline-schedule-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.timeline-slot-card {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-top: 4px solid var(--border-color);
}

.slot-morning { border-top-color: #3b82f6; }
.slot-noon { border-top-color: #f59e0b; }
.slot-afternoon { border-top-color: #10b981; }
.slot-night { border-top-color: #8b5cf6; }

.timeline-slot-time {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.slot-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.timeline-slot-time h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.timeline-slot-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.slot-activity-item strong {
  color: var(--text-main);
  display: block;
  font-size: 0.85rem;
}

.slot-activity-item span {
  color: var(--text-muted);
}

/* ==========================================================================
   Botones canónicos y controles táctiles
   ========================================================================== */

.btn-primary-action,
.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-primary-action {
  background-color: var(--accent-primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

.btn-secondary-action {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary-action:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

@media (max-width: 640px) {
  .plan-actions-group {
    width: 100%;
  }

  .plan-actions-group .btn-primary-action,
  .plan-actions-group .btn-secondary-action {
    width: 100%;
  }
}

/* ==========================================================================
   Acordeón de preguntas frecuentes (FAQ)
   ========================================================================== */

.faq-accordion-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

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

.faq-question:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.faq-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

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

.faq-answer p {
  margin: 0;
}

/* ==========================================================================
   Modal canónico accesible
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.is-open .modal-container {
  transform: scale(1);
}

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

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

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-modal-close:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

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

.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background-color: var(--bg-card-sub);
}

/* ==========================================================================
   Modo Impresión (A4 para nevera)
   ========================================================================== */

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .app-header,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .fijate-footer,
  .tabs-nav-container,
  .plan-actions-group,
  .faq-accordion-section,
  .affiliate-section,
  #btn-theme-toggle {
    display: none !important;
  }

  .tool-layout {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .card-main {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .tab-pane {
    display: block !important;
  }

  .timeline-schedule-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    page-break-inside: avoid;
  }

  .timeline-slot-card {
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
}
