/* styles.css
  -----------------------------------------------------------------------------
  Tema: Vivir Seguros (naranja/azules)
  Propósito:
  - Variables CSS para branding y consistencia visual.
  - Layout móvil responsivo con vistas y título pegado al header.
  - Tarjetas, botones y componentes (cámara, acordeón, pago, recibo).
  Nota: Coloca tus logos en /assets o deja el fallback tipográfico del HTML.
----------------------------------------------------------------------------- */

:root{
  /* Branding Vivir Seguros */
  --brand: #542E91;        /* Naranja principal */
  --brand-600: #d68300;    /* Hover naranja */
  --brand-700: #c27400;    /* Activo naranja */
  --secondary: #600581;    
  --bg: #f0f0f0;           /* Gris claro (fondo) */
  --card: #ffffff;
  --text: #542E91;         /* Azul marino (texto) */

  --muted: #6b7280;
  --border: #e5e7eb;
  --error: #dc2626;
  --shadow: 0 6px 20px rgba(0,0,0,.06);
  --radius-lg: 16px;
  --radius-sm: 10px;
  --tap-size: 44px;

  /* Bienvenida y title card */
  --welcome-grad-top: #542E91;  /* púrpura base */
  --welcome-grad-bot: #542E91;  /* violeta brillante para contraste */
  --title-bg: #600581;          /* Banda bajo header */
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app{
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 480px){ .app{ max-width: 520px; } }
@media (min-width: 768px){ .app{ max-width: 680px; } }
@media (min-width: 1024px){ .app{ max-width: 840px; } }

.hidden{ display: none !important; }

/* Header */
.app-header{
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, #542E91, #542E91);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: none;
  padding: 12px 16px 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

/* ====== CONTENEDOR DEL SPLASH ====== */
.splash-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #EDEDED;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.5s ease-out;
  overflow: hidden;
}

/* Ocultar splash con fade */
.splash-screen.fade-out { opacity: 0; }

/* ====== VIDEO DE FONDO ====== */
.splash-video {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;     /* llena la pantalla */
  z-index: 1;            /* por debajo del overlay */
  pointer-events: none;  /* que no bloquee toques */
  background: #EDEDED;   /* color de fondo mientras carga */
}

/* ====== CAPA OVERLAY (por ENCIMA del video) ====== */
.splash-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;            /* encima del video */
  pointer-events: none;  /* no intercepta clicks */
}

/* Cuñas moradas GRANDES dentro del overlay */
.splash-overlay::before,
.splash-overlay::after {
  content: "";
  position: absolute;
  width: 52vmax;
  height: 52vmax;
  background: #542e91; /* morado */
}

/* Superior izquierda */
.splash-overlay::before {
  top: -18vmax; left: -22vmax;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Inferior derecha */
.splash-overlay::after {
  bottom: -18vmax; right: -22vmax;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* Barras turquesa (paralelas a las cuñas) */
.splash-accent {
  position: absolute;
  width: 3vmax;             /* grosor */
  height: 140vh;            /* atraviesa la pantalla */
  background: #01a89e;      /* turquesa */
  border-radius: 0.65vmax;
  transform: rotate(45deg);
  box-shadow: 0 0 0.6vmax rgba(0,0,0,0.08);
  z-index: 3;               /* encima de las cuñas moradas */
}

/* Superior izquierda */
.splash-accent.tl {
  top: -52vh;
  left: -4vw;
}

/* Inferior derecha */
.splash-accent.br {
  bottom: -52vh;
  right: -4vw;
}

.brand{
  display: flex; align-items: center; justify-content: center;
}
.brand-img{
  height: 72px; object-fit: contain;
}
.progress{ display: flex; gap: 6px; margin-top: 10px; justify-content: center; }
.progress .dot{
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.45);
  transition: background-color .2s ease, box-shadow .2s ease, transform .1s ease;
}
.progress .dot.is-current{
  background: #FFD54F;
  box-shadow: 0 0 0 3px rgba(255,213,79,.25);
  transform: scale(1.05);
}
.progress .dot.is-done{
  background: var(--brand);
  box-shadow: 0 0 0 2px rgba(239,147,0,.25);
}

/* Footer */
.app-footer{
  margin-top: auto;
  padding: 16px;
  text-align: center;
  color: var(--muted);
}

/* Vistas */
.view{ display: none; padding: 0 16px 16px; }
.view.active{ display: block; }
.view-title{ margin: 12px 0; font-size: 20px; }

/* Bienvenida */
.view-welcome{
  min-height: 100dvh; padding: 32px 24px; place-items: center; color: #fff;
}
.view-welcome.active{ display: grid; place-items: center; }
body.welcome-mode{ background: linear-gradient(180deg, var(--welcome-grad-top), var(--welcome-grad-bot)); }

.welcome-content{
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; max-width: 520px; margin: 0 auto;
}
.welcome-title{ margin: 0; font-weight: 800; font-size: clamp(24px, 4vw, 34px); }
.welcome-subtitle{ margin: 0; opacity: .95; font-size: clamp(14px, 2.2vw, 18px); }
.welcome-logo{
  width: clamp(160px, 32vw, 280px);
  height: auto;
  margin: 8px 0 4px;
}

/* Grid de tipos de vehículo */
.veh-grid{
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-top: 8px;
}
.veh-card{
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius-lg);
  padding: 14px; display: grid; place-items: center; gap: 8px; min-height: var(--tap-size);
  box-shadow: 0 10px 24px rgba(0,0,0,.08); cursor: pointer;
}
.veh-card:focus{ outline: 2px solid #fff; outline-offset: -2px; }
.veh-card.active{ border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18), var(--shadow); }
.veh-emoji{ font-size: 22px; }
.veh-text{ color: var(--text); font-weight: 700; }

/* CTA bienvenida */
.welcome-cta{ min-width: clamp(220px, 40vw, 320px); margin-top: 8px; }

/* Title card pegado al header */
.title-card{
  position: sticky; top: calc(0px + 60px); margin: 0 -16px 16px; background: #542E91;
  color: #fff; border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg);
  padding: 24px; z-index: 5; margin-top: -1px;
}
.title-card-text{ margin: 0; font-size: 18px; }

/* Contenedor bajo título */
.container-under-title{ margin-top: 8px; }

/* Tarjetas base */
.card{
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow);
}
.card-title{ margin: 0 0 8px; }

/* Texto auxiliar */
.muted{ color: var(--muted); }

/* Botones */
.btn{
  appearance: none; border: 1px solid transparent; border-radius: var(--radius-lg);
  padding: 12px 16px; min-height: var(--tap-size); font-weight: 700; cursor: pointer;
  transition: transform .05s ease, box-shadow .2s ease, background-color .2s ease; box-shadow: var(--shadow);
}
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-primary {
  background: linear-gradient(180deg, #00A89D, #00A89D);
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #01b0a5, #01635b);
}

.btn-secondary{ background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-accent{ background: var(--secondary); color: #fff; }
.btn-outline{ background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-light{ background: #f3f4f6; color: #111827; border: 1px solid #e5e7eb; }

/* Acciones */
.actions{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.actions-bottom{ margin-top: 24px; padding-bottom: 8px; }
@media (max-width: 360px){ .actions{ grid-template-columns: 1fr; } }

/* Tarjetas de planes */
.plan-card {
  background: var(--card);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: 16px;
  width: 100%;
  margin: 0 auto 12px;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left; cursor: pointer;
  transition: all .2s ease;
  box-shadow: var(--shadow);
}

.plan-card .plan-head{
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 800; font-size: 16px; color: var(--text);
}

.plan-card .plan-price{
  font-size: 14px; font-weight: 800; color: var(--brand);
  text-align: right;
}

.plan-card .plan-feats{
  display: grid; gap: 4px; font-size: 14px; color: var(--muted);
}

/* Resaltar totales en planes */
.plan-total {
  display: block;
  margin-top: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--brand); /* usa el color base */
}


.plan-card[aria-pressed="true"]{
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(239,147,0,.12), var(--shadow);
  background: #fffdf7;
}
/* Acordeón por subtipo (ya tienes base; aseguro padding) */
.accordion .accordion-content { padding: 0 16px 14px; }

/* DOCUMENTOS: cámara y carga */
.docs-grid{ display: grid; gap: 12px; }
@media (min-width: 520px){ .docs-grid{ grid-template-columns: 1fr 1fr; } }

.camera-panel{ display: grid; gap: 12px; }
.camera-preview{
  position: relative; background: #0b1210; border-radius: var(--radius-lg);
  overflow: hidden; min-height: 180px; max-height: 180px; border: 1px solid #0f1f19;
}
#vidCedula, #imgCedula, #vidCarnet, #imgCarnet{ display: none; width: 100%; height: auto; }
#vidCedula.active, #imgCedula.active, #vidCarnet.active, #imgCarnet.active{ display: block; }

.upload-box{
  display: grid; place-items: center; width: 100%; padding: 22px; border: 2px dashed var(--border);
  border-radius: var(--radius-lg); color: var(--muted); background: #fafafa; cursor: pointer; text-align: center; font-size: 14px;
}
.upload-box:hover{ background: #f3f4f6; color: var(--text); }

/* Formularios */
.form-field{ display: grid; gap: 6px; margin: 10px 0; }
label{ font-weight: 700; }
input[type="text"], input[type="tel"]{
  width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border);
  padding: 12px 14px; background: #fff; min-height: var(--tap-size); font-size: 16px;
}
.error{ color: var(--error); min-height: 18px; }

/* Acordeón */
.accordion{
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); margin-bottom: 12px; box-shadow: var(--shadow);
}
.accordion-summary{
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; cursor: pointer; font-weight: 800; color: var(--secondary);
}
.accordion summary::-webkit-details-marker{ display:none }
.accordion-content{ padding: 0 16px 14px; }
.accordion[open] .accordion-indicator{ transform: rotate(180deg); }

/* Pago (maquetado) */
.pay-grid{ display: grid; gap: 12px; }
.pay-card{
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  border: 2px solid transparent; border-radius: var(--radius-lg); padding: 14px; background: var(--card); box-shadow: var(--shadow);
}
.pay-card input[type="radio"]{ margin-top: 4px; }
.pay-card[aria-checked="true"], .pay-card:has(input[type="radio"]:checked){
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(239,147,0,.12), var(--shadow);
}
.pay-head{ display: flex; align-items: center; gap: 8px; }
.pay-emoji{ font-size: 22px; }
.fake-fields{ display: grid; gap: 6px; margin-top: 6px; }
.fake-field{
  border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; color: var(--muted); background: #fafafa;
}

/* Summary / Recibo */
.summary{ display: grid; gap: 8px; margin-top: 8px; }
.summary-row{ display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.summary-row strong{ color: var(--secondary); }

/* Accesibilidad: región de estado */
.sr-status{
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

/* ===== Modal básico para “Puestos a asegurar” ===== */
.modal{
  position: fixed;
  inset: 0;
  display: none;                /* se controla con .show */
  place-items: center;
  background: rgba(0,0,0,.45);
  z-index: 50;
  padding: 16px;
}
.modal.show{ display: grid; }

.modal-dialog{
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 16px;
}
.modal-title{ margin: 0 0 6px; font-size: 18px; }
.modal-text{ margin: 0 0 10px; color: var(--muted); }
.modal-actions{
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.muted { color: var(--muted); font-size: 12px; }
.flex-row { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* === Campos consistentes: input, select y textarea === */
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field input[type="date"],
.form-field input[type="number"],
.form-field select,
.form-field textarea {
  width: 100%;
  font-size: 16px;                 /* evita zoom en iOS */
  line-height: 1.2;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03), inset 0 0 0 9999px rgba(0,0,0,0.02);
  color: #24324a;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;        /* iOS */
  appearance: none;
}

.form-field input[type="date"] {
  padding-right: 42px;             /* espacio para el icono */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23600581' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px 20px;
}

/* Quita el picker nativo molesto en algunos navegadores */
.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0; cursor: pointer;
}

/* Select con caret personalizado */
.form-field select {
  padding-right: 40px;             /* espacio para la flecha */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23600581' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}

/* Textarea “Dirección” con la misma estética */
.form-field textarea {
  min-height: 88px;
  resize: vertical;
}

/* Estados: hover / focus / disabled */
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--secondary, #600581);
  box-shadow: 0 0 0 3px rgba(96, 5, 129, 0.15);
}

.form-field input[disabled],
.form-field select[disabled],
.form-field textarea[disabled] {
  background: #f7f7f9;
  color: #8a8fa0;
  cursor: not-allowed;
}

/* Placeholders un poco más suaves */
.form-field ::placeholder { color: #96a0b5; opacity: 1; }

.btn-chip{
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f3f6;
  border: 1px solid #e5e7eb;
  font-size: .95rem;
  transition: background .15s ease;
}
.btn-chip:hover{ background:#eee; }
.copy-row{ display:flex; justify-content:space-between; align-items:center; gap:10px; }

.veh-wrapper{
  background:#5b2a99;   /* morado */
  padding:24px 16px 32px;
  border-radius:16px;
  color:#fff;
  text-align:center;
}

.veh-wrapper .welcome-title{
  font-size:1.3rem;
  margin-bottom:20px;
  text-transform:uppercase;
}

.veh-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  justify-items:center;
}

.veh-card{
  width:120px;
  height:100px;
  border-radius:12px;
  border:none;
  background:#fff;
  color:#5b2a99;              /* mismo morado para el trazo */
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  cursor:pointer;
}

.veh-card .veh-icon{
  width:46px;
  height:46px;
}

.veh-card .veh-icon svg{
  width:100%;
  height:100%;
}

.veh-card .veh-text{
  font-size:.78rem;
}

.camera-panel{
  position: relative;
  padding-top: 8px;
  padding-bottom: 70px;   /* empuja hacia abajo los botones de abajo */
}

.camera-preview{
  background: #d1d5db;
  border-radius: 18px;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.camera-preview video,
.camera-preview img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Botón circular estilo mockup */
.capture-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #542E91; /* turquesa */
  background-color: #d1d5db;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  margin: 10px auto;
}


.capture-btn svg {
  width: 40px;
  height: 40px;
}

.capture-btn:hover {
  transform: scale(1.05);
  background-color: #f5f5f5;
}


.camera-controls{
  margin-top: 40px;
}

#appHeader.hidden{
  display:none !important;
}

body.welcome-mode #appHeader{
  display:none !important;
}

.docs-grid-single {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 520px;
  margin: 0 auto;
}

.plan-list {
  display: grid;
  gap: 16px;
}

.quote-card {
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  border: 1px solid #ececec;
  display: grid;
  gap: 16px;
  transition: .2s ease;
}

.quote-card.is-selected {
  border-color: #111;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}

.quote-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.quote-card__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  color: #7a7a7a;
}

.quote-card__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.quote-card__price-box {
  text-align: right;
  flex-shrink: 0;
}

.quote-card__price-label {
  display: block;
  font-size: 12px;
  color: #7a7a7a;
  margin-bottom: 4px;
}

.quote-card__price-value {
  font-size: 28px;
  line-height: 1;
}

.quote-card__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quote-card__meta-item {
  background: #f7f7f7;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.quote-card__meta-label,
.quote-card__vehicle-grid span {
  font-size: 12px;
  color: #6f6f6f;
}

.quote-card__section-title {
  margin: 0 0 10px;
  font-size: 15px;
}

.quote-card__vehicle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
}

.quote-card__vehicle-grid div {
  background: #fafafa;
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}

.quote-card__coverage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.quote-card__coverage-item {
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 10px 12px;
}

.quote-card__coverage-name {
  font-size: 14px;
}

.quote-card__coverage-bottom {
  margin-top: 6px;
  font-size: 12px;
  color: #666;
}

.quote-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.quote-card__ids {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #666;
}

.quote-card__action {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  background: #111;
  color: #fff;
}

#planLoader,
#planEmpty {
  margin-top: 12px;
  font-size: 14px;
}

#planEmpty {
  color: #8a8a8a;
}

.veh-icon-img{
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

.veh-card.active{
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.18), var(--shadow);
}

#welcomeCodeModal[aria-hidden="true"]{
  display: none;
}

#welcomeCodeModal.show{
  display: grid;
}

.veh-icon-img{
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

#welcomeCodeModal[aria-hidden="true"]{
  display: none;
}

#welcomeCodeModal.show{
  display: grid;
}

/* =========================
   VIEW VEHICLE
========================= */

.view-vehicle {
  min-height: 100vh;
  background: #5a2d91;
  padding: 24px 18px 32px;
  justify-content: center;
  align-items: flex-start;
}

.view-vehicle.active {
  display: flex;
}

.vehicle-shell {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.vehicle-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}

.vehicle-logo {
  width: 110px;
  max-width: 100%;
  height: auto;
}

.vehicle-card {
  width: 100%;
}

.vehicle-title {
  color: #ffffff;
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 22px;
  text-transform: uppercase;
}

.vehicle-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vehicle-field {
  margin: 0;
}

.vehicle-select {
  width: 100%;
  height: 46px;
  border: 1px solid #dcdcdc;
  border-radius: 3px;
  background: #f4f4f4;
  color: #8a8a8a;
  font-size: 1rem;
  padding: 0 14px;
  outline: none;
  box-sizing: border-box;
}

.vehicle-select:disabled {
  opacity: 1;
  color: #b2b2b2;
  background: #f1f1f1;
}

.vehicle-actions {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.vehicle-btn {
  min-width: 140px;
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: #00A89D;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
}

.vehicle-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.view-vehicle .error {
  display: block;
  min-height: 14px;
  margin-top: 4px;
  color: #ffd6d6;
  font-size: 0.78rem;
}

.vehicle-field {
  margin: 0 0 14px;
}

.vehicle-field .ts-wrapper,
.vehicle-field .ts-wrapper.single,
.vehicle-field .ts-control,
.vehicle-field .ts-dropdown {
  width: 100%;
  box-sizing: border-box;
}

.vehicle-field .ts-wrapper.single .ts-control {
  min-height: 46px;
  height: 46px;
  border: 1px solid #d7d7d7;
  border-radius: 3px;
  background: #f3f3f3;
  box-shadow: none !important;
  padding: 0 12px;
  display: flex;
  align-items: center;
}

.vehicle-field .ts-wrapper.single .ts-control input,
.vehicle-field .ts-wrapper.single .ts-control .item {
  color: #808080;
  font-size: 1rem;
}

.vehicle-field .ts-wrapper {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.vehicle-field .ts-dropdown {
  margin-top: 0;
  border: 1px solid #d7d7d7;
  border-top: 0;
  border-radius: 0 0 3px 3px;
  box-shadow: none !important;
}

/* por defecto sin cursor si hay valor */
.vehicle-field .ts-wrapper.single.has-items .ts-control input {
  caret-color: transparent;
}

/* pero al enfocar sí permitir escribir */
.vehicle-field .ts-wrapper.single.has-items .ts-control.focus input {
  caret-color: auto;
}

.review-longform {
  padding-bottom: 24px;
}

.review-section {
  background: #efefef;
  border-radius: 0 24px 0 0;
  padding: 14px 12px 12px;
  margin-bottom: 14px;
}

.review-section-title {
  margin: 0 0 10px;
  color: #6b43a6;
  font-size: 1.35rem;
  font-weight: 700;
}

.review-section .form-field {
  margin-bottom: 10px;
}

.review-section .form-field input,
.review-section .form-field select,
.review-section .form-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f8f8f8;
  padding: 0 12px;
  box-sizing: border-box;
  font-size: 1rem;
  color: #666;
}

.review-section .form-field textarea {
  padding-top: 10px;
  padding-bottom: 10px;
  min-height: 70px;
  resize: vertical;
}

.review-section .form-field input[readonly] {
  background: #f4f4f4;
  color: #8a8a8a;
}

.field-top-label {
  font-size: 0.9rem;
  color: #8a8a8a;
  margin-bottom: 4px;
}

.review-section .error {
  display: block;
  min-height: 14px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: #cc4b4b;
}

.quote-vehicle-summary {
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  margin-bottom: 14px;
}

.quote-vehicle-summary__label {
  font-size: 13px;
  color: #7a7a7a;
  margin-bottom: 10px;
  font-weight: 600;
}

.quote-vehicle-summary__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quote-vehicle-summary__item {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  text-align: center;
}

.quote-vehicle-summary__item span {
  font-size: 12px;
  color: #7a7a7a;
}

.quote-vehicle-summary__item strong {
  font-size: 14px;
  color: #5a2d91;
}

.quote-plan-card {
  position: relative;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 18px 16px 16px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  margin-bottom: 14px;
  cursor: pointer;
  transition: all .2s ease;
  outline: none;
}

.quote-plan-card:hover {
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
}

.quote-plan-card.is-selected {
  border-color: #5a2d91;
  box-shadow: 0 12px 32px rgba(90,45,145,.16);
  background: #fffdfd;
}

.quote-plan-card__select-indicator {
  position: absolute;
  left: 10px;
  top: 24px;
}

.quote-plan-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid #b7a4d4;
  display: block;
  background: transparent;
}

.quote-plan-card.is-selected .quote-plan-card__dot {
  background: #5a2d91;
  border-color: #5a2d91;
}

.quote-plan-card__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.quote-plan-card__title {
  margin: 0;
  color: #5a2d91;
  font-size: 1.65rem;
  line-height: 1.1;
}

.quote-plan-card__price-wrap {
  text-align: right;
  white-space: nowrap;
}

.quote-plan-card__price {
  font-size: 1.6rem;
  color: #5a2d91;
  line-height: 1;
}

.quote-plan-card__price-label {
  font-size: 12px;
  color: #8a8a8a;
}

.quote-plan-card__section {
  margin-top: 10px;
}

.quote-plan-card__section-title {
  margin: 0 0 8px;
  color: #5a2d91;
  font-size: 1.4rem;
}

.quote-plan__coverage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.quote-plan__coverage-item {
  display: grid;
  gap: 2px;
}

.quote-plan__coverage-name {
  font-size: 14px;
  color: #5a2d91;
  font-weight: 700;
}

.quote-plan__coverage-bottom {
  font-size: 12px;
  color: #8a8a8a;
}

.confirm-data-modal {
  max-width: 420px;
  border-radius: 24px;
  overflow: hidden;
  padding: 0;
}

.confirm-data-title {
  margin: 0;
  padding: 22px 20px 16px;
  background: #5a2d91;
  color: #fff;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
}

.confirm-data-text {
  margin: 0;
  padding: 14px 20px 8px;
  text-align: center;
  color: #8a8a8a;
  font-size: 1.05rem;
  line-height: 1.35;
}

.confirm-data-grid {
  padding: 14px 18px 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirm-data-card {
  background: #f3f3f3;
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.confirm-data-card--full {
  grid-column: 1 / -1;
}

.confirm-data-label {
  color: #5a2d91;
  font-weight: 700;
  font-size: 0.95rem;
}

.confirm-data-card strong {
  color: #8a8a8a;
  font-size: 1rem;
  font-weight: 600;
}

#confirmPlanName,
#confirmPlanPrice {
  color: #8a8a8a;
}

#confirmPlanPrice {
  line-height: 1.3;
}

#confirmDataModal .modal-actions {
  padding: 12px 18px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#emitResultModal .modal-dialog {
  max-width: 420px;
  border-radius: 24px;
  overflow: hidden;
  padding: 24px 22px 18px;
  text-align: center;
}

#emitResultModal .modal-title {
  margin: 0 0 10px;
  color: #5a2d91;
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
}

#emitResultModal .modal-text {
  margin: 0 0 16px;
  color: #6f7682;
  font-size: 1.05rem;
  line-height: 1.45;
  text-align: center;
}

#emitResultModal .modal-policy {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f4f4f6;
  text-align: center;
}

#emitResultModal .modal-policy-label {
  display: block;
  color: #6f7682;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

#emitResultModal .modal-policy-number {
  display: block;
  color: #5a2d91;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

#emitResultModal .modal-actions {
  display: flex;
  justify-content: center;
  align-items: center;
}

#emitResultModal .emit-result-dialog {
  position: relative;
  max-width: 360px;
  padding: 24px 18px 20px;
  border-radius: 0;
  text-align: center;
  background: #f3f3f3;
}

#emitResultModal .emit-result-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #6e6e6e;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

#emitResultModal .emit-result-icon-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 18px;
}

#emitResultModal .emit-result-icon-circle {
  width: 86px;
  height: 86px;
  border: 6px solid #15b4ab;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

#emitResultModal .emit-result-icon-check {
  color: #15b4ab;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
}

#emitResultModal .emit-result-title {
  margin: 0 0 8px;
  color: #5a2d91;
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
}

#emitResultModal .emit-result-policy-number {
  color: #5a2d91;
  font-size: 1.95rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
}

#emitResultModal .emit-result-error .modal-title {
  margin: 0 0 10px;
  color: #5a2d91;
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
}

#emitResultModal .emit-result-error .modal-text {
  margin: 0 0 16px;
  color: #6f7682;
  font-size: 1.05rem;
  line-height: 1.45;
  text-align: center;
}

#emitResultModal .emit-result-error .modal-actions {
  display: flex;
  justify-content: center;
}

/* =========================
   PAYMENT VIEW
========================= */

#view-payment .title-card {
  padding-bottom: 22px;
}

#view-payment .title-card-text {
  text-transform: uppercase;
  letter-spacing: .4px;
}

#view-payment .container-under-title {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Resumen */
.pay-summary-card {
  background: #f7f7f7;
  border: 2px solid #e7e1ef;
  border-radius: 20px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.pay-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: #6f7682;
  font-size: 0.98rem;
}

.pay-summary-row strong {
  color: #5a2d91;
  font-weight: 800;
}

.pay-summary-row--total strong {
  color: #12a8a0;
  font-size: 1.1rem;
}

.pay-summary-rate {
  margin-top: 8px;
  text-align: center;
  color: #8c8c97;
  font-size: 0.88rem;
}

/* Acordeones */
#view-payment .accordion {
  background: #fff;
  border: 2px solid #d8d1df;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
}

#view-payment .accordion-summary {
  list-style: none;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #5a2d91;
  font-size: 1.45rem;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

#view-payment .accordion-summary::-webkit-details-marker {
  display: none;
}

#view-payment .accordion-indicator {
  font-size: 1.2rem;
  color: #9f90b7;
  transition: transform .2s ease;
}

#view-payment .accordion[open] .accordion-indicator {
  transform: rotate(180deg);
}

#view-payment .accordion-content {
  padding: 0 14px 14px;
  background: #fbfbfb;
}

/* Caja interior tipo imagen */
.pay-box {
  background: #fff;
  border: 2px solid #dcd6e3;
  border-radius: 18px;
  padding: 14px;
}

.pay-box--destino {
  margin-bottom: 12px;
}

.pay-box-title {
  text-align: left;
  color: #5a2d91;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
}

/* Filas copiar */
.pay-copy-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #f7f7f7;
  border-radius: 14px;
  padding: 12px 12px;
  margin-bottom: 10px;
}

.pay-copy-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-copy-label {
  color: #5a2d91;
  font-size: 0.95rem;
  font-weight: 800;
}

.pay-copy-value {
  color: #8f9099;
  font-size: 0.95rem;
  font-weight: 600;
}

#view-payment .btn-chip.copy-btn {
  min-width: 86px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #c0c0c0;
  border: 0;
  font-weight: 700;
  box-shadow: none;
}

/* Formularios internos */
#view-payment .card,
#view-payment form.card {
  background: #fff;
  border: 2px solid #dcd6e3;
  border-radius: 18px;
  padding: 14px;
  box-shadow: none;
}

#view-payment .form-field label {
  color: #5a2d91;
  font-weight: 700;
}

#view-payment .form-field input,
#view-payment .form-field select {
  border-radius: 14px;
  background: #f7f7f7;
  border: 1px solid #e3e3e3;
  min-height: 46px;
}

/* Fake fields */
#view-payment .fake-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#view-payment .fake-field {
  background: #f7f7f7;
  border-radius: 14px;
  padding: 12px 14px;
  color: #8b8c95;
  font-weight: 600;
}

/* Botones abajo */
#view-payment .actions-bottom {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

#view-payment .actions-bottom .btn {
  min-width: 140px;
}

#view-payment #btnPaymentBack {
  border: 2px solid #c7b6df;
  background: #fff;
  color: #7e5fb3;
}

#view-payment #btnPaymentNext {
  background: #00A89D;
  border-color: #00A89D;
  color: #fff;
}

/* =========================
   RECEIPT / CONFIRMATION
========================= */

.receipt-view {
  padding: 0;
}

.confirmation-container {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 36px 24px 28px;
  background: #f3f3f3;
}

.confirmation-logo {
  width: 180px;
  max-width: 72%;
  height: auto;
  display: block;
}

.success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 320px;
}

.success-message h2 {
  margin: 0;
  color: #5a2d91;
  line-height: 1.2;
  font-weight: 800;
}

.success-message p {
  margin: 0;
  color: #8f86a6;
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 600;
}

.success-message .follow-text {
  color: #5a2d91;
  font-size: 2rem;
  font-weight: 800;
  margin-top: 8px;
}

.social-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.social-img {
  max-width: 240px;
  width: 100%;
  height: auto;
  display: block;
}

.receipt-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.receipt-actions .btn {
  min-width: 170px;
}

.icon-ring {
  width: 90px;
  height: 90px;
  display: block;
}