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

:root {
  --brand:        #f30b0bd5;
  --brand-light:  #E1F5EE;
  --brand-mid:    #1D9E75;
  --brand-dark:   #085041;
  --brand-darker: #04342C;
  --danger:       #A32D2D;
  --danger-light: #FCEBEB;
  --warn-light:   #FAEEDA;
  --warn:         #854F0B;
  --text:         #1a1a1a;
  --text-muted:   #6b7280;
  --text-hint:    #9ca3af;
  --border:       #e5e7eb;
  --border-soft:  #f3f4f6;
  --bg:           #ffffff;
  --bg-soft:      #f9fafb;
  --radius:       10px;
  --radius-lg:    14px;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* HEADER */
.header { background: var(--brand); position: static; }
.header-inner { max-width: 480px; margin: 0 auto; padding: 18px 20px 14px; }
.header-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.header-icon {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.header-title { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.92); }
.step-bar { display: flex; gap: 5px; margin-bottom: 6px; }
.step-dot { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); transition: background 0.35s; }
.step-dot.active { background: #fff; }
.step-dot.done   { background: rgba(255,255,255,0.55); }
.step-label { font-size: 11px; color: rgba(255,255,255,0.65); }

.main { max-width: 480px; margin: 0 auto; padding: 0 0 40px; }
.screen-body { display: flex; flex-direction: column; gap: 16px; padding: 24px 20px; }
.screen-title { font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.3; }
.screen-sub { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin-top: -6px; }

/* CAMPOS */
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; }
.field-input {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 14px; font-size: 15px; color: var(--text);
  background: var(--bg); width: 100%; transition: border-color 0.2s; font-family: inherit;
}
.field-input:focus { outline: none; border-color: var(--brand); }
.field-input::placeholder { color: var(--text-hint); }
.field-input:disabled { opacity: 0.5; }
textarea.field-input { resize: none; line-height: 1.55; }

/* STATUS */
.status-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; line-height: 1.4;
}
.badge-success { background: var(--brand-light); color: var(--brand-dark); }
.badge-error   { background: var(--danger-light); color: var(--danger); }
.badge-loading { background: var(--warn-light);   color: var(--warn); }

/* BOTONES */
.btn-primary {
  background: var(--brand); color: #fff; border: none;
  border-radius: var(--radius); padding: 14px;
  font-size: 15px; font-weight: 600; cursor: pointer; width: 100%;
  transition: opacity 0.2s; font-family: inherit;
}
.btn-primary:active  { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.4; cursor: default; }
.btn-outline-sm {
  background: transparent; color: var(--brand); border: 1px solid var(--brand);
  border-radius: var(--radius); padding: 10px 24px;
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
}
.divider { height: 1px; background: var(--border-soft); }

/* TALLER CARD */
.taller-card {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-light); color: var(--brand-dark);
  border-radius: var(--radius); padding: 8px 12px;
  font-size: 13px; font-weight: 500;
}

/* SINIESTRO RESUMEN */
.siniestro-resumen {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.siniestro-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sr-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; flex-shrink: 0; }
.sr-valor { font-size: 13px; color: var(--text); font-weight: 500; text-align: right; }

/* CONFORMIDAD */
.conform-options { display: flex; flex-direction: column; gap: 10px; }
.conform-btn {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; background: var(--bg); text-align: left;
  transition: all 0.2s; width: 100%; font-family: inherit;
}
.conform-btn.selected-yes { border-color: var(--brand); background: var(--brand-light); }
.conform-btn.selected-no  { border-color: var(--danger); background: var(--danger-light); }
.conform-icon { font-size: 20px; flex-shrink: 0; }
.btn-text { font-size: 14px; font-weight: 600; color: var(--text); }
.btn-sub  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* NO CONFORME ALERT */
.no-conforme-alert {
  display: flex; align-items: center; gap: 8px;
  background: var(--warn-light); color: var(--warn);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 13px; font-weight: 500;
}

/* RADIO */
.radio-options { display: flex; flex-direction: column; gap: 8px; }
.radio-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg);
  cursor: pointer; font-size: 14px; color: var(--text);
  font-family: inherit; transition: all 0.2s; text-align: left;
}
.radio-btn.selected { border-color: var(--brand); background: var(--brand-light); }
.radio-circle {
  width: 18px; height: 18px; border: 2px solid var(--border);
  border-radius: 50%; flex-shrink: 0; transition: all 0.2s;
}
.radio-circle.filled { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px white; }

/* SECCIONES */
.section-block { display: flex; flex-direction: column; gap: 12px; }
.section-label { font-size: 13px; font-weight: 700; color: var(--text); }

/* FOTOS */
.photo-grid-v2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-slot-v2 {
  border: 1.5px dashed var(--border); border-radius: var(--radius-lg);
  min-height: 130px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: var(--bg-soft); transition: all 0.2s; overflow: hidden;
}
.photo-slot-v2.slot-done-v2     { border-style: solid; border-color: var(--brand-mid); }
.photo-slot-v2.slot-wide        { grid-column: 1 / -1; min-height: 160px; }
.photo-slot-v2.slot-wide-selfie { grid-column: 1 / -1; min-height: 110px; }
.slot-empty-v2 { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; text-align: center; }
.slot-icon-wrap { width: 52px; height: 52px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.slot-icon-doc    { background: #EEF2FF; color: #4F46E5; }
.slot-icon-selfie { background: var(--brand-light); color: var(--brand); }
.slot-label-v2 { font-size: 12px; font-weight: 600; color: var(--text); }
.slot-hint     { font-size: 11px; color: var(--text-hint); }
.slot-captured { position: relative; width: 100%; height: 100%; min-height: 160px; }
.slot-thumb-v2 { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 160px; }
.slot-captured-overlay {
  position: absolute; inset: 0; background: rgba(15,110,86,0.6);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px;
}
.slot-check { width: 28px; height: 28px; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid white; }
.slot-label-captured { font-size: 11px; color: white; font-weight: 600; text-align: center; }
.slot-retomar        { font-size: 10px; color: rgba(255,255,255,0.75); }
.photo-status { font-size: 12px; color: var(--text-muted); text-align: center; }

/* NPS */
.nps-card {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 10px;
  display: flex; flex-direction: column; gap: 10px;
}
.nps-pregunta { font-size: 14px; color: var(--text); line-height: 1.45; }
.nps-escala {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 2px;
}
.nps-btn {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  transition: all 0.15s;
  font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.nps-btn:active { transform: scale(0.93); }
.nps-rojo        { border-color: #FCA5A5; color: #DC2626; }
.nps-amarillo    { border-color: #FCD34D; color: #B45309; }
.nps-verde-claro { border-color: #86EFAC; color: #16A34A; }
.nps-verde       { border-color: #4ADE80; color: #15803D; }
.nps-btn.nps-selected.nps-rojo        { background: #FEE2E2; border-color: #DC2626; }
.nps-btn.nps-selected.nps-amarillo    { background: #FEF9C3; border-color: #B45309; }
.nps-btn.nps-selected.nps-verde-claro { background: #DCFCE7; border-color: #16A34A; }
.nps-btn.nps-selected.nps-verde       { background: #DCFCE7; border-color: #15803D; }
.nps-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-hint); }

/* ÉXITO */
.success-body { align-items: center; text-align: center; padding-top: 48px; }
.success-circle { width: 80px; height: 80px; background: var(--brand-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.success-title { font-size: 20px; font-weight: 700; color: var(--text); }
.success-sub { font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 280px; }
.siniestro-chip { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 20px; font-size: 14px; color: var(--text-muted); }
.siniestro-chip strong { color: var(--text); }

/* EMPRESA FOOTER */
.company-footer { margin-top: 8px; border-top: 1px solid var(--border-soft); padding-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.company-logo-wrap { width: 140px; height: 64px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.company-logo-img { width: 100%; height: 100%; object-fit: contain; }
.company-text { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.company-name    { font-size: 13px; font-weight: 600; color: var(--text); text-align: center; }
.company-tagline { font-size: 11px; color: var(--text-muted); text-align: center; }

/* BIENVENIDA */
.welcome-body { padding-top: 32px; align-items: center; text-align: center; }
.welcome-logo-wrap { width: 160px; height: 72px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.welcome-logo-img { width: 100%; height: 100%; object-fit: contain; }
.welcome-company-name { font-size: 15px; font-weight: 600; color: var(--text); margin-top: -4px; }
.welcome-divider { width: 48px; height: 3px; background: var(--brand-light); border-radius: 2px; }
.welcome-texto { display: flex; flex-direction: column; gap: 8px; }
.welcome-title { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.3; }
.welcome-sub   { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.welcome-requisitos { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.requisito-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; text-align: left;
}
.requisito-icon { width: 40px; height: 40px; background: var(--brand-light); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.requisito-titulo { font-size: 14px; font-weight: 600; color: var(--text); }
.requisito-sub    { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.welcome-nota { font-size: 13px; color: var(--text-muted); background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; width: 100%; }

/* ERROR */
.error-screen { align-items: center; text-align: center; padding-top: 60px; gap: 14px; }
.error-icon { width: 72px; height: 72px; background: var(--danger-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* SPINNER */
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* CÁMARA */
[x-cloak] { display: none !important; }
.camara-modal { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; }
.camara-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(0,0,0,0.7); }
.camara-close { width: 36px; height: 36px; background: rgba(255,255,255,0.15); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.camara-titulo { font-size: 14px; font-weight: 500; color: #fff; text-align: center; }
.camara-viewport { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#camara-video { width: 100%; height: 100%; object-fit: cover; }
#camara-video.espejo { transform: scaleX(-1); }
.camara-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.guia-cedula { position: absolute; width: 82%; aspect-ratio: 1.586; top: 50%; left: 50%; transform: translate(-50%, -56%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; }
.guia-esquinas { position: absolute; inset: 0; }
.guia-corner { position: absolute; width: 24px; height: 24px; border-color: #fff; border-style: solid; }
.guia-corner.tl { top: -1px; left: -1px;   border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.guia-corner.tr { top: -1px; right: -1px;  border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.guia-corner.bl { bottom: -1px; left: -1px;  border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.guia-corner.br { bottom: -1px; right: -1px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }
.guia-linea-h { position: absolute; top: 50%; left: 5%; right: 5%; height: 1px; background: rgba(255,255,255,0.3); }
.guia-instruccion { font-size: 12px; color: white; text-align: center; background: rgba(0,0,0,0.5); padding: 5px 12px; border-radius: 20px; line-height: 1.5; position: relative; z-index: 1; }
.guia-zona-oscura { position: absolute; background: rgba(0,0,0,0.45); }
.guia-arriba { top: 0; left: 0; right: 0; height: 22%; }
.guia-abajo  { bottom: 0; left: 0; right: 0; height: 22%; }
.guia-izq    { top: 22%; bottom: 22%; left: 0; width: 9%; }
.guia-der    { top: 22%; bottom: 22%; right: 0; width: 9%; }
.guia-ovalo { position: absolute; height: min(48vh, 340px); aspect-ratio: 0.78; top: 50%; left: 50%; transform: translate(-50%, -60%); border: 2.5px solid rgba(255,255,255,0.85); border-radius: 50%; box-shadow: 0 0 0 9999px rgba(0,0,0,0.45); }
.guia-selfie-texto { position: absolute; bottom: 24%; left: 50%; transform: translateX(-50%); font-size: 13px; color: white; background: rgba(0,0,0,0.5); padding: 5px 14px; border-radius: 20px; white-space: nowrap; }
.camara-preview { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.preview-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.camara-footer { background: rgba(0,0,0,0.75); padding: 20px 24px 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.camara-acciones { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.camara-hint { font-size: 12px; color: rgba(255,255,255,0.65); text-align: center; }
.btn-capturar { width: 68px; height: 68px; border-radius: 50%; border: 3px solid white; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.1s; }
.btn-capturar:active { transform: scale(0.93); }
.btn-capturar-inner { width: 52px; height: 52px; border-radius: 50%; background: white; }
.preview-acciones { display: flex; gap: 12px; width: 100%; }
.btn-repetir { flex: 1; padding: 13px; border: 1.5px solid rgba(255,255,255,0.4); border-radius: var(--radius); background: transparent; color: white; font-size: 15px; font-weight: 500; cursor: pointer; font-family: inherit; }
.btn-usar    { flex: 2; padding: 13px; border: none; border-radius: var(--radius); background: var(--brand); color: white; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }

/* BOTÓN PDF */
.btn-pdf {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--brand);
  border: 1.5px solid var(--brand); border-radius: var(--radius);
  padding: 12px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; width: 100%;
  transition: background 0.2s;
}
.btn-pdf:active { background: var(--brand-light); }
