:root {
  /* Paleta de marca LIVESPORT (confirmada en livesport.pe) */
  --bg: #0a0a0a;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #cc0019;
  --brand-hover: #ff001f;
  --brand-deep: #99000f;
  --accent: #def919;
  --ok: #16a34a;
  --block: #cc0019;
  --focus: #cc0019;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
/* El atributo hidden debe ganar siempre: .view.center usa display:flex y, sin esto,
   su especificidad supera al [hidden] del user-agent (dejaba visibles ok+block a la vez). */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, #0a0a0a 0%, #17070a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--accent);
}

.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 22px;
  background: var(--brand);
  color: #fff;
}
.brand-mark { font-weight: 800; font-size: 1.25rem; letter-spacing: .5px; }
.brand-accent { color: var(--accent); }
.brand-sub { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: .85; }

.view { padding: 22px; }
.view.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 22px; }

.head { text-align: center; margin-bottom: 18px; }
.head-ico { width: 44px; height: 44px; color: var(--brand); margin-bottom: 6px; }
.head h1 { font-size: 1.3rem; margin: 4px 0 6px; }
.head p { color: var(--muted); font-size: .92rem; margin: 0; line-height: 1.4; }

.grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.label { font-size: .82rem; font-weight: 600; color: #334155; }
.opt { color: var(--muted); font-weight: 400; font-size: .76rem; }

select, input[type="text"], input[type="date"], #num_doc, #nombre {
  width: 100%;
  font-size: 1.05rem;
  padding: 13px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  min-height: 48px;
}
select:focus, input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(204, 0, 25, .18);
}

.doc-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-weight: 700;
  color: #334155;
}
.link-btn {
  background: none;
  border: none;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  font-size: .88rem;
  padding: 4px;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .86rem;
  color: #334155;
  line-height: 1.4;
  margin: 4px 0 6px;
}
.consent input { width: 22px; height: 22px; margin-top: 1px; flex: 0 0 auto; }
.consent a { color: var(--brand); font-weight: 600; }
.legal-extra {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.legal-extra p { margin: 0; }

.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--block);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .88rem;
  margin: 4px 0 12px;
}

.btn-primary, .btn-secondary {
  width: 100%;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 15px;
  cursor: pointer;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-secondary { background: #f1f5f9; color: var(--ink); border: 1.5px solid var(--line); }

.btn-spin {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.state-ico { width: 66px; height: 66px; }
.state-ico.ok { color: var(--ok); }
.state-ico.block { color: var(--block); }
.view.center h2 { margin: 6px 0 2px; font-size: 1.25rem; }
.view.center p { color: var(--muted); margin: 0 0 8px; }
#close-block { max-width: 220px; margin-top: 8px; }

.foot {
  border-top: 1px solid var(--line);
  padding: 12px 22px;
  font-size: .74rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.35;
}

@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
}
