/**
 * Estilos canónicos: Calculadora biomecánica de ajuste básico MTB
 * Fijate Tools • Suite Canónica de Herramientas Web
 */

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

  /* Paleta cromática modo oscuro Midnight Slate (predeterminado) */
  --bg-primary: #0b0f17;
  --bg-secondary: #111827;
  --bg-surface: #1a2234;
  --bg-surface-hover: #222d42;
  --bg-card: #151d2d;
  --border-subtle: #243048;
  --border-focus: #38bdf8;

  --text-main: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #8392a8; /* Contraste óptimo verificado sobre fondo oscuro */
  --text-inverse: #0b0f17;

  /* Acentos biomecánicos ciclistas (Cyan / Verde Trail / Naranja Advertencia) */
  --accent-primary: #0284c7;
  --accent-hover: #0369a1;
  --accent-light: rgba(2, 132, 199, 0.14);
  --accent-glow: rgba(2, 132, 199, 0.35);

  --accent-teal: #06b6d4;
  --accent-teal-light: rgba(6, 182, 212, 0.12);

  --accent-success: #10b981;
  --accent-success-bg: rgba(16, 185, 129, 0.14);
  --accent-warning: #f59e0b;
  --accent-warning-bg: rgba(245, 158, 11, 0.14);
  --accent-danger: #ef4444;
  --accent-danger-bg: rgba(239, 68, 68, 0.14);

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

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-card: #ffffff;
  --border-subtle: #e2e8f0;
  --border-focus: #0284c7;

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #52637a; /* Contraste > 4.5:1 sobre fondo claro */
  --text-inverse: #ffffff;

  --accent-primary: #0284c7;
  --accent-hover: #0369a1;
  --accent-light: rgba(2, 132, 199, 0.08);
  --accent-glow: rgba(2, 132, 199, 0.2);

  --accent-teal: #0891b2;
  --accent-teal-light: rgba(8, 145, 178, 0.08);

  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.1);
}

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

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

h1, h2, h3, h4, h5, h6,
.brand-title,
.section-title,
.card-title,
.modal-title {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  font-weight: 700;
}

.mono,
.metric-val,
.range-val,
code {
  font-family: var(--font-mono);
}

/* Layout y contenedor 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%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Cabecera institucional complementos */
.brand-logo-box svg {
  display: block;
}

/* Tarjeta principal */
.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Hero descriptivo */
.tool-hero {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.tool-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  background: var(--accent-light);
  color: var(--accent-primary);
  border: 1px solid rgba(2, 132, 199, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tool-hero-title {
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--text-main);
}

.tool-hero-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Parrilla de trabajo principal (2 columnas en desktop) */
.biomech-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr);
  gap: 1.5rem;
  align-items: start;
}

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

/* Paneles izquierdo y derecho */
.panel-inputs,
.panel-outputs {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Secciones dentro de paneles */
.form-section-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.65rem;
}

.form-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.btn-section-help {
  background: transparent;
  border: 1px dashed var(--accent-primary);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
}

.btn-section-help:hover {
  background: var(--accent-light);
  border-style: solid;
}

/* Campos de formulario */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Input con wrapper y sufijo */
.input-suffix-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  height: 42px;
}

.input-suffix-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.input-suffix-wrapper input[type="number"],
.input-suffix-wrapper input[type="text"] {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  padding: 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
}

.input-suffix-badge {
  padding: 0 0.85rem;
  background: var(--bg-surface-hover);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  height: 100%;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border-subtle);
  user-select: none;
}

/* Desplegables con estilo canónico estricto */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-custom {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 40px 0 0.75rem;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.select-custom option {
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 0.5rem;
}

.select-custom:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.select-icon-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
}

/* Grids compactos de botones o tríos */
.grid-compact-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.grid-compact-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

/* Selector de radio en píldora */
.radio-pill-group {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
  gap: 0.2rem;
}

.radio-pill-item {
  flex: 1 1 0%;
  min-width: 0;
  text-align: center;
}

.radio-pill-item input {
  display: none;
}

.radio-pill-label {
  display: block;
  padding: 0.45rem 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-pill-item input:checked + .radio-pill-label {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

/* Botones de acción principales */
.btn-primary-action {
  width: 100%;
  min-height: 44px;
  background: linear-gradient(135deg, var(--accent-primary), #0284c7);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-heading);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: all var(--transition-fast);
}

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

.btn-secondary-action {
  width: 100%;
  min-height: 40px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-secondary-action:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-muted);
}

/* Tarjetas métricas de resultados */
.results-header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.results-header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-actions-group {
  display: flex;
  gap: 0.4rem;
}

.btn-mini-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
}

.btn-mini-action:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-focus);
}

/* Cuadrícula de tarjetas métricas */
.metrics-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

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

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.metric-card:hover {
  border-color: rgba(2, 132, 199, 0.4);
  transform: translateY(-2px);
}

.metric-card.highlight {
  border-color: var(--accent-primary);
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--bg-surface) 100%);
}

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

.metric-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.metric-card-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--accent-primary);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.metric-big-num {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.metric-unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-card-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.metric-card-range {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: var(--bg-card);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Indicador visual de flexión de rodilla Holmes */
.holmes-gauge-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.holmes-gauge-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.holmes-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-success-bg);
  color: var(--accent-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.holmes-bar-container {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.holmes-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, 
    var(--accent-warning) 0%, 
    var(--accent-warning) 20%, 
    var(--accent-success) 25%, 
    var(--accent-success) 75%, 
    var(--accent-warning) 80%, 
    var(--accent-danger) 100%
  );
  position: relative;
  overflow: visible;
}

.holmes-bar-marker {
  position: absolute;
  top: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
  transition: left var(--transition-normal);
}

.holmes-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Simulador visual anatómico SVG */
.visualizer-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.visualizer-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.visualizer-svg-box {
  width: 100%;
  height: auto;
  min-height: 240px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.visualizer-svg-box svg {
  width: 100%;
  height: 100%;
  max-height: 320px;
  display: block;
}

/* Doctor Biomecánico MTB - Diagnóstico de molestias */
.doctor-section-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doctor-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.doctor-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

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

.symptom-cards-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

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

.symptom-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.symptom-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-focus);
}

.symptom-btn.active {
  background: var(--accent-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

.symptom-solution-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-main);
  display: none;
}

.symptom-solution-box.visible {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* Sección SEO y Contenido Educativo */
.seo-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.seo-title {
  font-size: 1.35rem;
  color: var(--text-main);
}

.seo-prose {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.seo-prose h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-top: 0.5rem;
}

.seo-prose ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.seo-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

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

.seo-table th,
.seo-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.seo-table th {
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 700;
  font-family: var(--font-heading);
}

.seo-table td {
  color: var(--text-secondary);
}

.seo-table tr:last-child td {
  border-bottom: none;
}

/* Acordeón FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

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

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

.faq-question:hover {
  background: var(--bg-surface-hover);
}

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

.faq-item.open .faq-answer {
  display: block;
}

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

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

/* Modales canónicos accesibles (prohibido alerts) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 23, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

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

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  transform: scale(0.95);
  transition: transform var(--transition-fast);
}

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

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

.modal-title {
  font-size: 1.15rem;
  color: var(--text-main);
}

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

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

.modal-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.modal-footer .btn-secondary-action,
.modal-footer .btn-primary-action {
  width: auto;
  padding: 0.5rem 1rem;
  min-height: 38px;
}

/* Toast de notificación rápida */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10001;
  transform: translateY(100px);
  opacity: 0;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Reglas estrictas de impresión */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .app-header,
  .fijate-footer,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .btn-section-help,
  .btn-mini-action,
  .btn-primary-action,
  .btn-secondary-action,
  .results-actions-group,
  .doctor-section-box,
  .seo-guide-section,
  .modal-backdrop,
  .toast-notice {
    display: none !important;
  }

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

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

  .biomech-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .form-section-box,
  .metric-card,
  .visualizer-container {
    border: 1px solid #ccc !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid;
  }

  .metric-big-num {
    color: #000000 !important;
  }
}
