:root {
  color-scheme: light;
  --red: #c8102e;
  --red-dark: #9f0c24;
  --ink: #172033;
  --muted: #667085;
  --line: #d9dee8;
  --soft: #f4f6f9;
  --green: #087a45;
  --white: #ffffff;
  --shadow: 0 14px 36px rgba(23, 32, 51, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--soft); }
body { margin: 0; min-height: 100%; color: var(--ink); background: linear-gradient(180deg, #fff 0 180px, var(--soft) 180px); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.shell { width: min(100%, 620px); min-height: 100vh; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom)); }
.brandbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.adas-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; color: #fff; background: var(--red); font-size: 16px; font-weight: 900; letter-spacing: -.04em; box-shadow: 0 8px 18px rgba(200, 16, 46, .24); }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .14em; line-height: 1.2; text-transform: uppercase; }
.eyebrow.red { color: var(--red); }
.brand-title { margin: 0; font-size: 20px; font-weight: 850; letter-spacing: -.02em; }

.event-hero { padding: 4px 2px 22px; }
.event-hero h1, .card h1 { margin: 0; font-size: clamp(28px, 8vw, 42px); line-height: 1.06; letter-spacing: -.04em; }
.event-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 13px; color: var(--muted); font-weight: 700; }
.progress-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 700; }
.status-pill { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: var(--green); background: #e5f6ed; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.status-pill.closed { color: var(--red-dark); background: #fde9ed; }

.flow { display: grid; gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.step-card { display: grid; grid-template-columns: 42px 1fr; gap: 13px; padding: 18px; }
.step-card.locked { opacity: .65; box-shadow: none; }
.step-card.complete .step-number { background: var(--green); }
.step-number { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--red); font-weight: 900; }
.step-body h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.step-body > p:not(.eyebrow):not(.notice) { margin: 7px 0 15px; color: var(--muted); line-height: 1.5; }
label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 850; }
input { width: 100%; min-height: 52px; margin-bottom: 10px; padding: 0 14px; border: 1px solid #bac2d0; border-radius: 12px; color: var(--ink); background: #fff; font-size: 17px; outline: none; }
input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 16, 46, .12); }

.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; border: 0; border-radius: 12px; padding: 0 17px; color: var(--ink); background: #e9edf3; font-weight: 900; text-align: center; text-decoration: none; cursor: pointer; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .55; cursor: wait; }
.button.primary { color: #fff; background: var(--red); }
.button.primary:hover { background: var(--red-dark); }
.button.whatsapp { color: #fff; background: var(--green); }
.button.secondary { border: 1px solid #c9d0dc; background: #fff; }
.button.full { width: 100%; }
.notice { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; color: #754c00; background: #fff4d6; font-size: 13px; line-height: 1.45; }

.lot-form { margin-top: 12px; padding: 13px; border-radius: 12px; background: var(--soft); }
.lot-entry-row { display: grid; grid-template-columns: minmax(90px, .5fr) 1.5fr; gap: 8px; }
.lot-entry-row input { margin: 0; text-align: center; font-size: 22px; font-weight: 900; text-transform: uppercase; }

.confirmation { overflow: hidden; border-radius: 20px; padding: 24px; color: #fff; background: var(--red); box-shadow: 0 18px 42px rgba(200, 16, 46, .25); }
.confirmation .eyebrow { color: #ffd7de; }
.confirmation h2 { margin: 0; font-size: 24px; }
.confirmation > p:not(.eyebrow) { color: #fff; line-height: 1.5; }
.assignment { display: grid; grid-template-columns: .75fr .75fr 1.5fr; gap: 1px; overflow: hidden; margin: 18px 0; border-radius: 14px; background: rgba(255,255,255,.27); }
.assignment div { display: flex; min-height: 116px; flex-direction: column; align-items: center; justify-content: center; background: rgba(122, 0, 22, .32); }
.assignment span { color: #ffd7de; font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.assignment strong { margin-top: 5px; color: #fff; font-size: clamp(30px, 10vw, 46px); line-height: 1; }
.confirmation .whatsapp { border: 1px solid rgba(255,255,255,.35); }
.confirmation .secondary { margin-bottom: 9px; color: var(--red-dark); border-color: #fff; background: #fff; }

.status-card { display: flex; align-items: center; gap: 14px; padding: 20px; }
.status-card strong, .status-card span { display: block; }
.status-card span { margin-top: 3px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid #f1b8c3; border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.message { position: sticky; bottom: 12px; z-index: 5; margin: 14px 0 0; padding: 13px 15px; border-radius: 12px; color: #fff; background: var(--red-dark); font-weight: 800; box-shadow: var(--shadow); }
.message.success { background: var(--green); }
footer { display: flex; flex-direction: column; gap: 3px; padding: 26px 4px 0; color: var(--muted); font-size: 12px; text-align: center; }
footer strong { color: var(--ink); }

@media (max-width: 390px) {
  .shell { padding-left: 12px; padding-right: 12px; }
  .step-card { grid-template-columns: 36px 1fr; gap: 9px; padding: 15px; }
  .step-number { width: 32px; height: 32px; }
  .lot-entry-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .spinner { animation-duration: 1.6s; }
}
