/* ==========================================================================
   Kit Interactivo Anti-Estafas en Construcción Residencial
   Tu Casa con Cata (@tucasaconcata) & ArkiBuilders
   ========================================================================== */

:root {
  --teal-900: #07585a;
  --teal-800: #0d4244;
  --teal-700: #106b6d;
  --teal-500: #11918f;
  --teal-300: #5fbdbd;
  --teal-100: #9ad5d6;
  --teal-50:  #f0f8f8;

  --accent-gold: #c9933b;
  --accent-gold-light: #fef8ee;

  --status-ok: #10b981;
  --status-ok-bg: #ecfdf5;
  --status-warn: #f59e0b;
  --status-warn-bg: #fffbeb;
  --status-danger: #ef4444;
  --status-danger-bg: #fef2f2;
  --status-neutral: #6b7280;
  --status-neutral-bg: #f3f4f6;

  --ink-900: #0b2f30;
  --ink-800: #163e40;
  --ink-700: #235254;
  --ink-500: #527a7c;
  --ink-400: #88a7a8;
  --paper: #ffffff;
  --surface-alt: #f7fafa;
  --border-light: #d8e8e8;
  --border-dark: #b2cecf;

  --font-sans: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 3px rgba(11, 47, 48, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(11, 47, 48, 0.08), 0 2px 4px -2px rgba(11, 47, 48, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(11, 47, 48, 0.1), 0 4px 6px -4px rgba(11, 47, 48, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(11, 47, 48, 0.12), 0 8px 10px -6px rgba(11, 47, 48, 0.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--surface-alt);
  color: var(--ink-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.kit-app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* --------------------------------------------------------------------------
   Header & Hero
   -------------------------------------------------------------------------- */
.header-hero {
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.header-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(154, 213, 214, 0.22) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.header-hero h1 {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  color: var(--paper);
}

.header-hero p {
  font-size: 1.05rem;
  color: var(--teal-100);
  max-width: 820px;
  margin-bottom: 1.5rem;
}

/* Selector de Estado Prominente */
.state-selector-banner {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.state-selector-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.state-toggle-group {
  display: flex;
  gap: 0.5rem;
}

.state-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--paper);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.state-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.state-btn.active {
  background: var(--paper);
  color: var(--teal-900);
  border-color: var(--paper);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Barra de Progreso Global y Navegación de 4 Módulos
   -------------------------------------------------------------------------- */
.modules-nav-bar {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.module-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.6rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-700);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.module-tab-btn:hover {
  background: var(--teal-50);
  color: var(--teal-900);
}

.module-tab-btn.active {
  background: var(--teal-500);
  color: var(--paper);
  border-color: var(--teal-500);
  box-shadow: var(--shadow-sm);
}

.module-tab-num {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

/* Barra de Progreso Global */
.global-progress-wrapper {
  margin-bottom: 1.5rem;
}

.global-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.4rem;
}

.progress-track {
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-300), var(--teal-500));
  width: 0%;
  transition: width 0.3s ease;
}

/* --------------------------------------------------------------------------
   Módulos Contenedores
   -------------------------------------------------------------------------- */
.module-view {
  display: none;
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.module-view.active {
  display: block;
}

.module-header-row {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.module-subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--teal-700);
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.module-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--teal-900);
  line-height: 1.3;
}

.module-description {
  font-size: 0.95rem;
  color: var(--ink-700);
  margin-top: 0.4rem;
}

/* --------------------------------------------------------------------------
   Módulo 1: Licencias
   -------------------------------------------------------------------------- */
.official-agency-box {
  background: var(--teal-50);
  border-left: 4px solid var(--teal-500);
  padding: 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 1.75rem;
}

.official-agency-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.35rem;
}

.license-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.license-type-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.license-code-badge {
  background: var(--teal-700);
  color: var(--paper);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.license-type-card h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.35rem;
}

.license-type-card p {
  font-size: 0.85rem;
  color: var(--ink-700);
  line-height: 1.45;
}

.checklist-items-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.checklist-interactive-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
}

.checklist-interactive-card:hover {
  border-color: var(--teal-300);
  box-shadow: var(--shadow-sm);
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  accent-color: var(--teal-500);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.checklist-item-content {
  flex: 1;
}

.checklist-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.35rem;
}

.checklist-item-howto {
  font-size: 0.88rem;
  color: var(--ink-700);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.source-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-700);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Módulo 2: Banderas Rojas y Semáforo
   -------------------------------------------------------------------------- */
.traffic-light-hud {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
}

.traffic-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-sm);
}

.traffic-badge.safe { background: var(--status-ok-bg); border: 3px solid var(--status-ok); }
.traffic-badge.caution { background: var(--status-warn-bg); border: 3px solid var(--status-warn); }
.traffic-badge.danger { background: var(--status-danger-bg); border: 3px solid var(--status-danger); }

.traffic-hud-info h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--teal-900);
  margin-bottom: 0.25rem;
}

.traffic-hud-info p {
  font-size: 0.9rem;
  color: var(--ink-700);
}

.red-flags-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.red-flag-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  background: var(--paper);
  transition: var(--transition);
}

.red-flag-card.flagged {
  border-color: var(--status-danger);
  background: var(--status-danger-bg);
}

.flag-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.flag-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-900);
  flex: 1;
}

.flag-danger-badge {
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.flag-body {
  margin-top: 0.75rem;
  padding-left: 2rem;
  font-size: 0.88rem;
  color: var(--ink-700);
}

.flag-solution-box {
  margin-top: 0.65rem;
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--status-ok);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: #065f46;
}

.flag-solution-box strong {
  color: #047857;
}

/* Directorio de Denuncia */
.report-directory-box {
  background: var(--teal-50);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--teal-300);
}

.report-directory-box h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--teal-900);
  margin-bottom: 0.5rem;
}

.report-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.report-link-card {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-decoration: none;
  color: var(--teal-900);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.report-link-card:hover {
  border-color: var(--teal-500);
  background: var(--teal-100);
}

/* --------------------------------------------------------------------------
   Módulo 3: Cláusulas del Contrato
   -------------------------------------------------------------------------- */
.contract-clauses-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contract-clause-card {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
}

.contract-clause-card.checked {
  border-color: var(--status-ok);
  background: var(--status-ok-bg);
}

.clause-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.clause-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-900);
  flex: 1;
}

.clause-details {
  margin-top: 0.75rem;
  padding-left: 2.2rem;
}

.clause-desc {
  font-size: 0.9rem;
  color: var(--ink-700);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.clause-red-flag-callout {
  background: #fff1f2;
  border-left: 3px solid var(--status-danger);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: #9f1239;
}

.lawyer-summary-box {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.lawyer-summary-box h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--teal-900);
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Módulo 4: Calendario de Pagos
   -------------------------------------------------------------------------- */
.payment-setup-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.input-money-group {
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}

.input-money-symbol {
  font-weight: 700;
  color: var(--ink-500);
  margin-right: 0.35rem;
}

.input-money {
  border: none;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal-900);
  width: 140px;
}

.input-money:focus {
  outline: none;
}

.payment-sum-hud {
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 700;
}

.payment-sum-hud.valid { color: var(--status-ok); }
.payment-sum-hud.invalid { color: var(--status-danger); }

/* Alerta Regulatoria del 10% (F.S. 489.126) */
.statutory-alert-box {
  background: var(--status-warn-bg);
  border: 1px solid var(--status-warn);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: none;
}

.statutory-alert-box.active {
  display: block;
}

.statutory-alert-box h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 0.25rem;
}

.statutory-alert-box p {
  font-size: 0.88rem;
  color: #78350f;
  line-height: 1.45;
}

/* Gráfico Comparativo CSS */
.payment-chart-box {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.payment-chart-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 1rem;
}

.chart-bar-comparison-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chart-bar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chart-bar-label {
  width: 130px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
  text-align: right;
  flex-shrink: 0;
}

.chart-bar-track {
  flex: 1;
  height: 20px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.chart-bar-fill-paid {
  height: 100%;
  background: var(--teal-500);
  width: 0%;
  transition: width 0.3s ease;
}

.chart-bar-fill-work {
  height: 100%;
  background: var(--accent-gold);
  width: 0%;
  transition: width 0.3s ease;
}

.chart-bar-value {
  width: 60px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-900);
}

/* Tabla de Hitos */
.milestones-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.75rem;
  font-size: 0.88rem;
}

.milestones-table th, .milestones-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.milestones-table th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--teal-900);
}

.pct-input {
  width: 60px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.pct-input:focus {
  outline: none;
  border-color: var(--teal-500);
}

/* --------------------------------------------------------------------------
   Módulo de Cierre / Resumen Ejecutivo
   -------------------------------------------------------------------------- */
.summary-executive-panel {
  background: linear-gradient(180deg, var(--paper) 0%, var(--teal-50) 100%);
  border: 1px solid var(--teal-300);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}

.summary-executive-panel h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--teal-900);
  margin-bottom: 1.25rem;
}

.summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-metric-card {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.metric-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--teal-700);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-700);
}

/* --------------------------------------------------------------------------
   Acciones CTA (Agendar llamada, WhatsApp, PDF)
   -------------------------------------------------------------------------- */
.actions-cta-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn-cta-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--teal-500) 0%, var(--teal-700) 100%);
  color: var(--paper);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 1.15rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 22px rgba(17, 145, 143, 0.32);
  transition: var(--transition);
  text-align: center;
  border: none;
  cursor: pointer;
}

.btn-cta-main:hover {
  background: linear-gradient(135deg, var(--teal-700) 0%, #084849 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(17, 145, 143, 0.45);
}

.secondary-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.btn-action-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--paper);
  border: 1px solid var(--teal-700);
  color: var(--teal-900);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-action-tool:hover {
  background: var(--teal-50);
}

/* --------------------------------------------------------------------------
   Modal Glosario
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 88, 90, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.modal-box {
  background: var(--paper);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  background: var(--teal-900);
  color: var(--paper);
  padding: 1.25rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--paper);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
}

.glossary-item {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
}

.glossary-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.25rem;
}

.glossary-item p {
  font-size: 0.88rem;
  color: var(--ink-700);
  line-height: 1.5;
}

/* Footer Legal */
.legal-footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--ink-500);
}

.legal-footer p {
  margin-bottom: 0.75rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Estilos de Impresión (@media print)
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .kit-app {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .header-hero {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cccccc;
    box-shadow: none !important;
    padding: 1rem !important;
  }
  .header-hero h1 { color: #000000 !important; }
  .header-hero p { color: #333333 !important; }
  .state-selector-banner, .modules-nav-bar, .actions-cta-container, .modal-overlay, .source-pill-link {
    display: none !important;
  }
  .module-view {
    display: block !important;
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    margin-bottom: 1.5rem !important;
    page-break-inside: avoid;
  }
}

/* --------------------------------------------------------------------------
   Responsive Móvil (360px - 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .header-hero h1 { font-size: 1.6rem; }
  .modules-nav-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .license-types-grid {
    grid-template-columns: 1fr;
  }
  .traffic-light-hud {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .traffic-badge {
    margin: 0 auto;
  }
  .report-links-grid {
    grid-template-columns: 1fr;
  }
  .secondary-actions-grid {
    grid-template-columns: 1fr;
  }
  .summary-cards-grid {
    grid-template-columns: 1fr;
  }
  .payment-setup-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .payment-sum-hud {
    margin-left: 0;
  }
}

/* ==========================================================================
   Botón Flotante de WhatsApp
   ========================================================================== */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  z-index: 9999;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

.floating-whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: rgba(7, 88, 90, 0.95);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.floating-whatsapp-btn:hover .floating-whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@media print {
  .floating-whatsapp-btn {
    display: none !important;
  }
}
