/* ==========================================================================
   Calculadora de Tacógrafo Digital y Descansos - Fijate Tools
   Estándar de diseño canónico Midnight Slate y tema accesible
   ========================================================================== */

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

  /* Paleta base oscura (Midnight Slate) */
  --bg-page: #0b0f17;
  --bg-card: #111827;
  --bg-card-sub: #162032;
  --bg-input: #1f293d;
  --border-color: #27354f;
  --border-focus: #3b82f6;

  --text-main: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.15);

  /* Estados semánticos de tacógrafo */
  --status-drive-bg: rgba(239, 68, 68, 0.15);
  --status-drive-border: rgba(239, 68, 68, 0.4);
  --status-drive-text: #fca5a5;

  --status-pause-bg: rgba(59, 130, 246, 0.15);
  --status-pause-border: rgba(59, 130, 246, 0.4);
  --status-pause-text: #93c5fd;

  --status-work-bg: rgba(245, 158, 11, 0.15);
  --status-work-border: rgba(245, 158, 11, 0.4);
  --status-work-text: #fcd34d;

  --status-rest-bg: rgba(16, 185, 129, 0.15);
  --status-rest-border: rgba(16, 185, 129, 0.4);
  --status-rest-text: #6ee7b7;

  --danger-bg: rgba(239, 68, 68, 0.18);
  --danger-border: #ef4444;
  --danger-text: #fecaca;
  --danger-title: #fee2e2;

  --warning-bg: rgba(245, 158, 11, 0.18);
  --warning-border: #f59e0b;
  --warning-text: #fef3c7;
  --warning-title: #fffbeb;

  --success-bg: rgba(16, 185, 129, 0.18);
  --success-border: #10b981;
  --success-text: #d1fae5;
  --success-title: #ecfdf5;

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);

  --status-drive-bg: #fee2e2;
  --status-drive-border: #fca5a5;
  --status-drive-text: #991b1b;

  --status-pause-bg: #dbeafe;
  --status-pause-border: #93c5fd;
  --status-pause-text: #1e40af;

  --status-work-bg: #fef3c7;
  --status-work-border: #fcd34d;
  --status-work-text: #92400e;

  --status-rest-bg: #d1fae5;
  --status-rest-border: #6ee7b7;
  --status-rest-text: #065f46;

  --danger-bg: #fef2f2;
  --danger-border: #ef4444;
  --danger-text: #991b1b;
  --danger-title: #7f1d1d;

  --warning-bg: #fffbeb;
  --warning-border: #f59e0b;
  --warning-text: #92400e;
  --warning-title: #78350f;

  --success-bg: #ecfdf5;
  --success-border: #10b981;
  --success-text: #065f46;
  --success-title: #064e3b;

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
}

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

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

h1, h2, h3, h4, h5, h6,
.brand-title,
.section-title,
.card-title {
  font-family: var(--font-heading);
}

.mono, code, .stat-value, .badge-time, .gauge-num {
  font-family: var(--font-mono);
}

/* Barra superior de la Suite de Transporte */
.transport-suite-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
}

.suite-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.suite-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-color);
}

.suite-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.suite-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.suite-link-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.suite-link-btn.is-active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

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

.tool-with-sidebar {
  display: flex;
  gap: 1.5rem;
  width: 100%;
}

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

/* Tarjeta principal */
.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}

@media (max-width: 640px) {
  .card-main {
    padding: 1rem;
    border-radius: var(--radius-md);
  }
}

/* Cabecera de la herramienta */
.tool-header-intro {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.tool-header-intro h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.tool-header-intro p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 780px;
}

.header-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.pill-badge.is-law {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Grid de paneles: Formulario vs Resultados */
.taco-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem;
}

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

/* Paneles */
.taco-panel {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

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

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

/* Secciones de formulario */
.form-group-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.label-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Desplegables <select> y controles */
select, input[type="text"], input[type="number"], input[type="time"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 0.85rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 2.5rem;
  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='%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 0.85rem center;
  background-size: 16px;
}

select:focus, input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Grupos compactos de inputs (Horas y Minutos) */
.time-input-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.input-suffix-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-suffix-wrap input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  padding-right: 2.2rem;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  pointer-events: none;
}

/* Botones de opción rápida (Chips / Radio tabs) */
.quick-pill-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.quick-pill-group.duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pill-option-btn {
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  user-select: none;
}

.pill-option-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-color);
}

.pill-option-btn.is-selected {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
}

/* Bloque interactivo de Conducción en Equipo (Switch) */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.switch-label-area {
  display: flex;
  flex-direction: column;
}

.switch-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

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

.custom-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-color);
  border-radius: 9999px;
  transition: 0.2s;
}

.switch-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.2s;
}

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

.custom-switch input:checked + .switch-slider::before {
  transform: translateX(22px);
}

/* ==========================================================================
   Panel de Resultados y Semáforos de Tacógrafo
   ========================================================================== */

/* Tarjeta de alerta / Estado principal */
.taco-hero-status {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.taco-hero-status.is-normal {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}
.taco-hero-status.is-normal .status-title { color: var(--success-title); }

.taco-hero-status.is-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}
.taco-hero-status.is-warning .status-title { color: var(--warning-title); }

.taco-hero-status.is-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}
.taco-hero-status.is-danger .status-title { color: var(--danger-title); }

.status-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
}

.status-info-box {
  flex: 1;
}

.status-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.status-msg {
  font-size: 0.86rem;
  line-height: 1.4;
}

/* Tarjetas métricas (Gauges / Tiles) */
.taco-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

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

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

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

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

.metric-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.metric-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.metric-val.is-danger {
  color: #ef4444;
}
.metric-val.is-warning {
  color: #f59e0b;
}
.metric-val.is-success {
  color: #10b981;
}

.metric-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Barra de progreso de tacógrafo */
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.2rem;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 9999px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-fill.is-warning { background: #f59e0b; }
.progress-fill.is-danger { background: #ef4444; }

/* ==========================================================================
   Cronograma Visual de la Jornada
   ========================================================================== */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

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

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

.timeline-legend {
  display: flex;
  gap: 0.75rem;
  font-size: 0.74rem;
  flex-wrap: wrap;
}

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

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.legend-dot.drive { background: #ef4444; }
.legend-dot.pause { background: #3b82f6; }
.legend-dot.work { background: #f59e0b; }
.legend-dot.rest { background: #10b981; }

.timeline-track {
  width: 100%;
  height: 28px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  display: flex;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.timeline-block {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: width 0.3s ease;
}

.timeline-block.block-drive { background: #ef4444; }
.timeline-block.block-pause { background: #3b82f6; }
.timeline-block.block-work { background: #f59e0b; }
.timeline-block.block-rest { background: #10b981; }
.timeline-block.block-free { background: var(--bg-input); color: var(--text-muted); }

.timeline-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Banner de Sanciones LOTT y Proyecciones Horarias
   ========================================================================== */
.projections-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}

.projection-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.86rem;
}

.projection-row:last-child {
  border-bottom: none;
}

.proj-label {
  color: var(--text-secondary);
}

.proj-val {
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.sanction-alert-card {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  color: var(--danger-text);
  margin-top: 0.5rem;
}

.sanction-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
  color: var(--danger-title);
}

.sanction-desc {
  font-size: 0.82rem;
  line-height: 1.4;
}

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

.btn-primary, .btn-secondary {
  height: 44px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 1.25rem;
  transition: all 0.2s ease;
  user-select: none;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: #ffffff;
  flex: 1 1 0%;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

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

.btn-secondary:hover {
  color: var(--text-main);
  border-color: var(--primary-color);
}

@media (max-width: 640px) {
  .actions-row {
    flex-direction: column;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
  }
}

/* ==========================================================================
   Guía Normativa SEO y Preguntas Frecuentes
   ========================================================================== */
.seo-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.seo-guide-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.seo-guide-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

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

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

.seo-card {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

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

.seo-card-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Tabla comparativa normativa */
.table-responsive-box {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

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

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

.normative-table th {
  background: var(--bg-card-sub);
  font-weight: 700;
  color: var(--text-main);
}

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

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

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

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

.faq-question svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.is-open .faq-question svg {
  transform: rotate(180deg);
}

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

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

/* ==========================================================================
   Modales canónicos accesibles (cero alerts)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  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-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

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

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

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s;
}

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

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

/* Vista de Impresión Oficial A4 */
.print-sheet {
  display: none;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }
  .app-header,
  .transport-suite-nav,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .fijate-footer,
  .actions-row,
  .taco-grid,
  .seo-guide-section {
    display: none !important;
  }
  .print-sheet {
    display: block !important;
    max-width: 210mm;
    margin: 0 auto;
    padding: 20mm 15mm;
  }
  .print-header {
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  .print-title {
    font-size: 16pt;
    font-weight: bold;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
  }
  .print-table th, .print-table td {
    border: 1px solid #333333;
    padding: 6px 10px;
    text-align: left;
  }
  .print-signatures {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
  }
  .print-sign-box {
    width: 45%;
    border-top: 1px solid #000000;
    padding-top: 5px;
    text-align: center;
  }
}
