/* ============================================================
   Estilos generales RecaSur (paleta, layout, componentes)
   Compartido por todas las vistas del Check-in
   ============================================================ */
:root{
  /* Paleta RecaSur */
  --purple:#3D2462; --purple-d:#2C1848; --purple-l:#F3EFF8;
  --orange:#EE7623; --orange-h:#D9660F; --orange-d:#B4520B; --orange-l:#FDEEE3;
  --ink:#2A2233; --muted:#5E5868; --line:#D9D5DF; --field:#F6F5F8; --panel:#F1EEF5;
  --ok:#1E7A45; --ok-l:#E4F2EA;
  --err:#B42318; --err-bg:#FDECEA; --warn-bg:#FFF1E2; --warn:#8A4A00;
  --head:Lato,system-ui,sans-serif;
  --body:Lato,system-ui,-apple-system,"Segoe UI",sans-serif;
  box-sizing:border-box;
}
*,*::before,*::after{box-sizing:inherit}
html,body{margin:0}
body{font-family:var(--body);color:var(--ink);background:#fff;font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;
  padding-bottom:env(safe-area-inset-bottom,0px)}
h1,h2,h3{font-family:var(--head);margin:0;letter-spacing:-.2px;line-height:1.15;color:var(--purple)}
p{margin:0}
a{color:var(--orange-d);font-weight:700}
a:hover{color:#8F3F06}
:focus-visible{outline:3px solid var(--orange);outline-offset:2px;border-radius:6px}
[hidden]{display:none!important}
.dot{color:var(--orange)}


/* Barra superior (morada, como el sitio) */
.topbar{display:none;gap:28px;padding:10px 40px;font-size:14px;font-weight:700;background:var(--purple);color:#fff;align-items:center}
.topbar span{display:flex;align-items:center;gap:8px}
.topbar .soc{display:flex;gap:16px;margin-right:auto}
.topbar .soc a{color:#fff;display:flex}

header.site{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;border-bottom:1px solid #ECEAF0}
.logo{display:flex;align-items:center;text-decoration:none}
.logo img{height:42px;width:auto;display:block}
.logo .fb{display:none;flex-direction:column;line-height:1}
.logo .fb b{font:900 26px var(--head);color:var(--purple);letter-spacing:-.5px}
.logo .fb b span{font-weight:400}
.logo .fb small{font:700 9px var(--head);color:var(--orange);letter-spacing:1px}
.steplabel{font:700 13px var(--head);color:var(--muted)}

main{max-width:1200px;margin:0 auto}
.screen{padding:20px;display:flex;flex-direction:column;gap:20px;min-height:calc(100vh - 170px)}
.screen:focus{outline:none}
.hero{background:linear-gradient(160deg,var(--purple) 0%,var(--purple-d) 100%);color:#fff;border-radius:24px;padding:28px 22px;display:flex;flex-direction:column;gap:22px;position:relative;overflow:hidden}
.hero::after{content:"";position:absolute;right:-60px;bottom:-40px;width:320px;height:160px;opacity:.14;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 160'%3E%3Cpath d='M0 160 L90 40 L130 90 L190 10 L320 160Z' fill='%23fff'/%3E%3C/svg%3E") no-repeat center/contain}
.hero > *{position:relative;z-index:1}
.hero h1{color:#fff;font-size:32px;font-weight:900;letter-spacing:-.5px}
.hero .lead{color:#E3DCEE}
.tag{align-self:flex-start;padding:6px 12px;border-radius:8px;background:var(--orange);color:#fff;font-size:13px;font-weight:900;letter-spacing:.3px;text-transform:uppercase}
.lead{color:var(--muted);font-size:16px}
.steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px}
.steps li{display:flex;align-items:center;gap:14px;font-weight:700}
.steps .n{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:var(--orange);color:#fff;font:900 15px var(--head);flex-shrink:0}
.title{display:flex;flex-direction:column;gap:6px}
.title h1{font-size:26px;font-weight:900}
.title p{color:var(--muted);font-size:15px}
.spacer{flex-grow:1}

/* Stepper */
.stepper{display:flex;flex-direction:column;gap:8px}
.stepper .bars,.stepper .labs{display:flex;gap:6px}
.stepper .bars span{flex:1;height:5px;border-radius:3px;background:#E4E0EA}
.stepper .bars span.on{background:var(--orange)}
.stepper .labs span{flex:1;font-size:12px;font-weight:700;color:#817A8B}
.stepper .labs span.on{color:var(--purple)}
.stepper .labs span.cur{font-weight:900}

/* Formularios */
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:14px;font-weight:700}
.field .hint{font-size:13px;color:var(--muted)}
.input,select.input{height:50px;padding:0 14px;border:1px solid var(--line);border-radius:8px;background:var(--field);
  font:16px var(--body);color:var(--ink);width:100%}
.input:focus{border-color:var(--orange);background:#fff}
.input[aria-invalid="true"]{border-color:var(--err);background:#fff}
.ferr{font-size:13px;font-weight:700;color:var(--err)}
.prefix{display:flex}
.prefix span{display:flex;align-items:center;padding:0 12px;border:1px solid var(--line);border-right:0;border-radius:8px 0 0 8px;background:#ECE9F0;font-weight:700}
.prefix .input{border-radius:0 8px 8px 0}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.alert{padding:14px;border-radius:10px;font-size:14px;line-height:1.45}
.alert.err{background:var(--err-bg);border:1px solid #F1B5AE;color:#8A1C12}
.alert.ok{background:var(--orange-l);color:var(--ink)}

.btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;border-radius:26px;border:0;background:var(--orange);color:#fff;
  font:900 16px var(--head);letter-spacing:.2px;cursor:pointer;width:100%;text-decoration:none;padding:0 20px}
.btn:hover{background:var(--orange-h);color:#fff}
.btn[disabled]{opacity:.6;cursor:wait}
.btn.dark{background:var(--purple);color:#fff}
.btn.dark:hover{background:var(--purple-d);color:#fff}
.btn.ghost{background:transparent;border:2px solid var(--orange);color:var(--purple)}
.btn.ghost:hover{background:var(--orange-l);color:var(--purple)}
.btn.link{background:transparent;color:var(--orange-d);min-height:46px;font-family:var(--body);font-size:15px;font-weight:700}
.btn.link:hover{background:transparent;color:#8F3F06}
.btn.small{min-height:44px;font-size:14px}
.spin{width:20px;height:20px;border:3px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}

.summary{background:var(--purple-l);border-left:4px solid var(--orange);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:10px}
.summary h2{font-size:16px;font-weight:900}
.summary div{display:flex;justify-content:space-between;gap:12px;font-size:14px}
.summary dt{color:var(--muted)}
.summary dd{margin:0;font-weight:700;text-align:right}
.summary dl{margin:0;display:flex;flex-direction:column;gap:8px}

.box{border:1px solid #E7E4EC;border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:14px}
.box-h{display:flex;align-items:center;justify-content:space-between;gap:10px}
.box-h h2{font-size:17px;font-weight:900}
.pill{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:700;padding:4px 8px;border-radius:6px;white-space:nowrap}
.pill.req{background:var(--warn-bg);color:var(--warn)}
.pill.ok{background:var(--ok-l);color:var(--ok)}
.pill.opt{background:var(--panel);color:var(--purple)}

/* Tiles de documentos */
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tile{border:2px dashed #B8AFC6;border-radius:14px;padding:10px;display:flex;flex-direction:column;gap:8px}
.tile.done{border:1px solid var(--line)}
.tile.bad{border-color:var(--err)}
.tile .t{font-size:13px;font-weight:700}
.tile .empty{height:110px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:700;color:var(--muted)}
.tile img{width:100%;height:110px;object-fit:cover;border-radius:10px;background:var(--panel)}
.tile .st{display:flex;align-items:center;justify-content:space-between}
.tile .okt{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--ok)}
.tile .again{border:0;background:none;color:var(--orange-d);font:700 13px var(--body);padding:8px 0;cursor:pointer}
.tile .up{border:0;background:none;color:var(--orange-d);font:700 13px var(--body);padding:6px 0;cursor:pointer;text-decoration:underline}

/* Checkboxes */
.check{display:flex;align-items:flex-start;gap:12px}
.check input{width:22px;height:22px;margin:2px 0 0;accent-color:var(--orange-d);flex-shrink:0}
.check label{font-size:15px}

/* Final */
.done-ic{display:flex;align-items:center;justify-content:center;width:84px;height:84px;border-radius:50%;background:var(--orange);margin:0 auto;
  animation:pop .45s cubic-bezier(.2,1.4,.4,1) both}
@keyframes pop{from{transform:scale(.4);opacity:0}}
.center{text-align:center;display:flex;flex-direction:column;gap:14px}
.list{list-style:none;margin:0;padding:0}
.list li{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #E7E4EC;font-weight:700;gap:10px}
.list li span:first-child{display:flex;align-items:center;gap:10px}
.list .c{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--ok-l);color:var(--ok)}
.list .c.skip{background:var(--panel);color:var(--muted)}
.list .v{font-size:14px;color:var(--muted);font-weight:400}
.note{background:var(--purple-l);border-radius:14px;padding:16px;font-size:14px}

footer.help{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:18px 20px;background:var(--purple);color:#fff;font-size:13px;text-align:center}
footer.help .h{display:flex;align-items:center;gap:8px;font-weight:900;font-size:14px}
footer.help .ph{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 18px}
footer.help a{color:#fff;font-weight:700;text-decoration:none}
footer.help a:hover{color:#FFB27A}
footer.help b{color:#FFB27A;font-weight:700}

/* Cámara */
.cam{position:fixed;inset:0;background:#141118;color:#fff;z-index:50;display:flex;flex-direction:column;align-items:center;justify-content:space-between;
  padding:calc(20px + env(safe-area-inset-top,0px)) 20px calc(32px + env(safe-area-inset-bottom,0px))}
.cam video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.9}
.cam > *{position:relative}
.cam .top{align-self:stretch;display:flex;align-items:center;justify-content:space-between}
.cam .x{width:44px;height:44px;border-radius:50%;border:0;background:rgba(0,0,0,.45);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
.cam .lbl{font:700 15px var(--head);background:rgba(0,0,0,.45);padding:6px 12px;border-radius:8px}
.frame{position:relative;width:min(86vw,420px);aspect-ratio:1.586;border-radius:14px;box-shadow:0 0 0 100vmax rgba(0,0,0,.45)}
.frame i{position:absolute;width:30px;height:30px;border:0 solid var(--orange)}
.frame i:nth-child(1){top:-2px;left:-2px;border-top-width:4px;border-left-width:4px;border-top-left-radius:14px}
.frame i:nth-child(2){top:-2px;right:-2px;border-top-width:4px;border-right-width:4px;border-top-right-radius:14px}
.frame i:nth-child(3){bottom:-2px;left:-2px;border-bottom-width:4px;border-left-width:4px;border-bottom-left-radius:14px}
.frame i:nth-child(4){bottom:-2px;right:-2px;border-bottom-width:4px;border-right-width:4px;border-bottom-right-radius:14px}
.cam .mid{display:flex;flex-direction:column;align-items:center;gap:18px}
.cam .mid p{max-width:300px;text-align:center;font-size:15px;background:rgba(0,0,0,.45);padding:8px 12px;border-radius:10px}
.cam .bot{display:flex;flex-direction:column;align-items:center;gap:16px}
.shutter{width:78px;height:78px;border-radius:50%;border:4px solid #fff;background:transparent;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.shutter span{width:60px;height:60px;border-radius:50%;background:var(--orange);display:block}
.cam .gal{background:none;border:0;color:#fff;font:700 14px var(--body);text-decoration:underline;cursor:pointer}

/* Modal T&C */
dialog{border:0;border-radius:16px;padding:0;max-width:640px;width:calc(100% - 32px)}
dialog::backdrop{background:rgba(44,24,72,.6)}
.dlg{padding:22px;display:flex;flex-direction:column;gap:14px;max-height:80vh}
.dlg .body{overflow:auto;font-size:14px;color:var(--muted);display:flex;flex-direction:column;gap:10px}

/* Escritorio */
@media (min-width: 960px){
  .topbar{display:flex}
  header.site{padding:14px 40px;margin-bottom:24px;box-shadow:0 2px 12px rgba(61,36,98,.06);border-bottom:0}
  .logo img{height:56px}
  .screen{padding:0 40px 40px;display:grid;grid-template-columns:minmax(0,1fr) 480px;gap:40px;align-items:start;min-height:auto}
  .screen > .side{position:sticky;top:20px}
  .screen > .form{background:#fff;border-radius:24px;box-shadow:0 4px 24px rgba(61,36,98,.10);padding:36px;display:flex;flex-direction:column;gap:20px}
  .hero{padding:56px;min-height:520px;justify-content:center}
  .hero h1{font-size:46px;letter-spacing:-1px}
  .steps li{font-size:18px}
  .screen .spacer{display:none}
  .mob-only{display:none!important}
}
@media (max-width: 959px){
  .screen > .side,.screen > .form{display:contents}
  .desk-only{display:none!important}
}
@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}
