@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@700;800&display=swap');

:root {
  --purple: #681e5b;
  --purple-dark: #421039;
  --purple-soft: #f6edf4;
  --gold: #d29703;
  --gold-soft: #fff7df;
  --ink: #25272b;
  --muted: #687177;
  --line: #e7e1e5;
  --success: #176a4d;
  --success-soft: #e5f5ee;
  --warning: #8a601a;
  --warning-soft: #fff1d6;
  --danger: #9b3b3b;
  --danger-soft: #faeaea;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 88% 7%, rgba(210,151,3,.17), transparent 26%), linear-gradient(145deg, #faf8fa, #f0ebef);
  font-family: "DM Sans", system-ui, sans-serif;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.page-shell { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 28px; }
.brand-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.brand-link { display: inline-flex; }
.brand-link img { width: 195px; height: 66px; object-fit: contain; object-position: left center; }
.brand-bar > span { color: #756d73; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.consultation-card { position: relative; min-height: 535px; padding: 48px 62px; overflow: hidden; background: rgba(255,255,255,.96); border: 1px solid rgba(220,211,218,.95); border-radius: 24px; box-shadow: 0 24px 70px rgba(63,28,55,.12); }
.card-accent { position: absolute; inset: 0 0 auto; height: 7px; background: linear-gradient(90deg, var(--purple) 0 72%, var(--gold) 72%); }
.step { max-width: 640px; margin: 0 auto; }
.back-link,.text-button { display: inline-flex; margin: 0 0 32px; padding: 0; color: var(--purple); background: none; border: 0; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; }
.eyebrow { margin: 0 0 9px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .16em; }
h1,h2 { margin: 0; color: var(--purple-dark); font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing: -.035em; }
h1 { max-width: 580px; font-size: clamp(33px, 5vw, 48px); line-height: 1.08; }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.12; }
.lead { max-width: 610px; margin: 15px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.lead strong { color: var(--purple); }

label,legend { color: #3b4145; font-size: 12px; font-weight: 700; }
.input-prefix { display: flex; align-items: stretch; margin-top: 8px; border: 1px solid #cfc6cc; border-radius: 12px; overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.input-prefix:focus-within { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(104,30,91,.1); }
.input-prefix > span { display: grid; place-items: center; min-width: 68px; color: var(--purple); background: var(--purple-soft); border-right: 1px solid #e0d2dc; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.input-prefix input { width: 100%; min-height: 55px; padding: 0 17px; color: var(--ink); background: #fff; border: 0; outline: 0; font-size: 17px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.input-prefix input::placeholder { color: #a69fa4; font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.field-help { margin: 8px 0 0; color: #81878b; font-size: 11px; }
.primary-button,.secondary-button { width: 100%; min-height: 50px; margin-top: 25px; border-radius: 11px; font-weight: 700; cursor: pointer; transition: transform .15s, background .15s, opacity .15s; }
.primary-button { color: #fff; background: var(--purple); border: 0; box-shadow: 0 10px 24px rgba(104,30,91,.18); }
.primary-button:hover { background: #771f68; transform: translateY(-1px); }
.primary-button:disabled { opacity: .52; cursor: not-allowed; transform: none; }
.secondary-button { color: var(--purple); background: #fff; border: 1px solid #cdbfc9; }
.form-message { min-height: 20px; margin: 13px 0 0; color: var(--danger); font-size: 12px; font-weight: 600; text-align: center; }

fieldset { margin: 0 0 25px; padding: 0; border: 0; }
legend { margin-bottom: 10px; }
.option-grid { display: grid; gap: 9px; }
.option-card { position: relative; display: flex; align-items: center; min-height: 48px; padding: 12px 15px; color: #41464a; background: #fff; border: 1px solid #dcd5da; border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.option-card:hover { border-color: #bfa9b9; background: #fdfbfc; }
.option-card:has(input:checked) { color: var(--purple-dark); background: var(--purple-soft); border-color: var(--purple); box-shadow: inset 4px 0 var(--purple); }
.option-card input { width: 17px; height: 17px; margin: 0 11px 0 0; accent-color: var(--purple); }
.option-card span { font-size: 12px; font-weight: 600; }

.status-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 18px; color: var(--success); background: var(--success-soft); border-radius: 15px; font-size: 25px; font-weight: 800; }
.status-icon.warning { color: var(--warning); background: var(--warning-soft); }
.status-icon.pending { color: var(--danger); background: var(--danger-soft); }
.result-name { margin: 10px 0 24px; color: var(--muted); font-size: 14px; font-weight: 600; }
.record-summary { display: grid; grid-template-columns:.65fr 1.55fr 1fr; gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 12px; }
.record-summary div { min-width: 0; padding: 15px; background: #faf9fa; }
.record-summary span { display: block; margin-bottom: 5px; color: #858086; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.record-summary strong { display: block; color: var(--purple-dark); font-size: 12px; overflow-wrap: anywhere; }
.result-notice { margin-top: 17px; padding: 15px 17px; color: #39433f; background: #f4f7f6; border-left: 4px solid var(--success); border-radius: 9px; font-size: 12px; line-height: 1.55; }
.result-notice.warning { color: #6f4e1b; background: var(--warning-soft); border-color: var(--gold); }
.result-notice.pending { color: #773b3b; background: var(--danger-soft); border-color: var(--danger); }
.dates-list { margin: 18px 0 0; border-top: 1px solid var(--line); }
.dates-list > div { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.dates-list dt { color: #767d80; font-size: 11px; }
.dates-list dd { margin: 0; color: #31383b; font-size: 11px; font-weight: 700; text-align: right; }

.security-note { display: flex; align-items: flex-start; gap: 12px; margin: 16px 9px 0; padding: 13px 16px; color: #666d70; background: rgba(255,255,255,.55); border-radius: 12px; }
.security-note svg { flex: 0 0 auto; width: 19px; height: 19px; fill: none; stroke: var(--purple); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.security-note p { margin: 0; font-size: 10px; line-height: 1.5; }
.security-note strong { color: var(--purple-dark); }
footer { display: flex; justify-content: space-between; padding: 22px 5px 0; color: #7b7479; font-size: 10px; }

.loading-overlay { position: absolute; inset: 7px 0 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; color: var(--purple); background: rgba(255,255,255,.88); backdrop-filter: blur(3px); font-size: 12px; font-weight: 700; }
.spinner { width: 32px; height: 32px; border: 3px solid #eadfe7; border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 650px) {
  .page-shell { width: calc(100% - 22px); padding-top: 10px; }
  .brand-bar { padding: 0 6px; }
  .brand-link img { width: 155px; height: 56px; }
  .brand-bar > span { font-size: 8px; }
  .consultation-card { min-height: 560px; padding: 37px 21px; border-radius: 18px; }
  .back-link,.text-button { margin-bottom: 27px; }
  .lead { margin-bottom: 25px; }
  .record-summary { grid-template-columns: 1fr; }
  .dates-list > div { grid-template-columns: 1fr; gap: 5px; }
  .dates-list dd { text-align: left; }
  footer { flex-direction: column; gap: 4px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.identity-prefix { margin: 8px 0; letter-spacing: .08em; }
.consent { display:flex; gap:10px; align-items:flex-start; margin-top:22px; line-height:1.6; }
.consent input { margin-top:3px; accent-color:var(--purple); }
button:focus-visible,a:focus-visible,input:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }
.record-summary { grid-template-columns: .6fr 1.8fr; }
@media(max-width:650px) { .record-summary { grid-template-columns:1fr; } }

.aviso-transeuntes {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  color: #111;
  max-width: 760px;
}
.aviso-transeuntes p {
  margin: 0 0 20px 0;
}
.aviso-transeuntes ul {
  margin: 0;
  padding-left: 40px;
}
.aviso-transeuntes li {
  margin-bottom: 4px;
}
