:root{
  --bg1:#f7f2ef;
  --bg2:#efe8e2;
  --ink:#1d1a18;
  --muted:#6b635e;
  --gold:#caa46a;
  --glass: rgba(255,255,255,.62);
  --glass2: rgba(255,255,255,.38);
  --border: rgba(20,16,14,.10);
  --shadow: 0 25px 70px rgba(20,16,14,.10);
  --radius: 22px;
  --radius2: 16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Poppins,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background: radial-gradient(1200px 700px at 30% 15%, #ffffff, transparent),
              radial-gradient(900px 600px at 80% 20%, #f1e8e1, transparent),
              linear-gradient(180deg,var(--bg1),var(--bg2));
}

.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(202,164,106,.18), transparent 60%),
    radial-gradient(800px 500px at 90% 30%, rgba(0,0,0,.06), transparent 65%);
  pointer-events:none;
}

.wrap{
  width:min(980px,92vw);
  margin:30px auto 60px;
  position:relative;
}

.glass{
  background:var(--glass);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  border-radius:var(--radius);
  backdrop-filter: blur(10px);
}

.glassInner{
  background:var(--glass2);
  border:1px solid var(--border);
  border-radius:var(--radius2);
  padding:14px 16px;
}

.top{
  padding:18px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.logo{
  font-weight:600;
  letter-spacing:.2px;
  font-size:20px;
}
.logo span{ color:var(--gold); }
.tag{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}

.meta{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.65);
  font-size:12px;
  color:var(--ink);
}
.chip.soft{ background:rgba(255,255,255,.35); color:var(--muted); }

.card{ margin-top:16px; padding:22px; }
.card h1{ margin:0 0 6px; font-size:28px; }
.sub{ margin:0 0 18px; color:var(--muted); line-height:1.5; }

.section{
  padding:18px 0;
  border-top:1px solid rgba(20,16,14,.08);
}
.section:first-of-type{ border-top:none; }

.sectionHead{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  margin-bottom:12px;
}
.sectionHead h2{ margin:0; font-size:16px; }
.sectionHead p{ margin:0; color:var(--muted); font-size:12px; }

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
.grid .full{ grid-column:1/-1; }

label{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:12px;
  color:var(--muted);
}

input,select,textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(20,16,14,.12);
  background:rgba(255,255,255,.75);
  color:var(--ink);
  outline:none;
  font-size:13px;
}
textarea{ resize:vertical; }
input:focus,select:focus,textarea:focus{
  border-color: rgba(202,164,106,.55);
  box-shadow: 0 0 0 4px rgba(202,164,106,.16);
}

.row{
  margin-top:10px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.radioGroup{
  flex:1;
  min-width:260px;
  padding:12px;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.35);
}

.labelTop{
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
}

.pillRadio{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  margin:4px 6px 0 0;
  border-radius:999px;
  border:1px solid rgba(20,16,14,.12);
  background:rgba(255,255,255,.7);
  color:var(--ink);
  cursor:pointer;
}

.checks{ display:flex; gap:10px; flex-wrap:wrap; }
.checks.tight{ gap:8px; }
.check{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(20,16,14,.12);
  background:rgba(255,255,255,.68);
  color:var(--ink);
  cursor:pointer;
  font-size:13px;
}
.check input{ width:auto; padding:0; margin:0; box-shadow:none; }
.hint{ margin:10px 0 0; color:var(--muted); font-size:12px; }

.twoCols{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:12px;
}

.box{
  padding:12px;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.35);
}
.boxTitle{
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
}

.warning{
  margin:10px 0 0;
  font-size:12px;
  color:#6a3b2a;
}

.waiver p{
  margin:0 0 10px;
  font-size:12px;
  color:var(--muted);
  line-height:1.55;
}
.waiver p:last-child{ margin-bottom:0; }

.agree{ margin-top:12px; }
.agree span{ font-size:13px; }

.sigWrap{
  border:1px solid rgba(20,16,14,.12);
  border-radius:16px;
  background:rgba(255,255,255,.65);
  overflow:hidden;
}
#sigPad{
  width:100%;
  height:auto;
  display:block;
  background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(255,255,255,.6));
}
.sigActions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-top:1px solid rgba(20,16,14,.10);
  background:rgba(255,255,255,.5);
}

.actions{
  margin-top:16px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  border:none;
  cursor:pointer;
  padding:12px 16px;
  border-radius:14px;
  font-weight:600;
  font-size:13px;
}
.btnPrimary{
  background:linear-gradient(180deg, rgba(202,164,106,.95), rgba(202,164,106,.78));
  color:#1b1510;
  box-shadow: 0 14px 30px rgba(202,164,106,.25);
}
.btnGhost{
  background:rgba(255,255,255,.6);
  border:1px solid rgba(20,16,14,.12);
  color:var(--ink);
}

.fine{
  margin:12px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}

.foot{
  margin-top:14px;
  display:flex;
  justify-content:center;
  gap:10px;
  color:var(--muted);
  font-size:12px;
}
.dot{ opacity:.7; }

@media (max-width:780px){
  .top{ flex-direction:column; align-items:flex-start; }
  .meta{ justify-content:flex-start; }
  .grid{ grid-template-columns:1fr; }
  .twoCols{ grid-template-columns:1fr; }
  .card h1{ font-size:22px; }
}

.intakeDoneBadge {
  margin-top: 12px;
  padding: 10px 16px;
  background: #e6f7ec;
  color: #1f7a4d;
  font-weight: 600;
  border-radius: 999px;
  font-size: 14px;
  display: inline-block;
}

/* ================= SIGNATURE FIX ================= */
.sigWrap {
  position: relative;
  background: #fff; /* 👈 fondo sólido */
  border-radius: 14px;
  padding: 12px;
  z-index: 5;
}

#sigPad {
  background: #fff !important;
  border: 1px solid #ddd;
  border-radius: 10px;
  touch-action: none; /* 🔥 CLAVE */
}

#sigPad {
  position: relative;
  z-index: 10;
  touch-action: none;
  background: #fff;
}

.sigWrap {
  position: relative;
  z-index: 10;
}
