/* dark-theme.css — Validaciones Online shared dark theme */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500,600,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg0: #070B14;
  --bg1: #0B1220;
  --bg2: #0F1A2E;
  --ink: #EAF0FF;
  --muted: rgba(234,240,255,.72);
  --faint: rgba(234,240,255,.46);
  --gold: #D7B86A;
  --gold2: #F2D48A;
  --aqua: #3BD4C6;
  --danger: #FF6B6B;
  --line: rgba(234,240,255,.12);
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --max: 720px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 30% 0%, rgba(59,212,198,.08), transparent 60%),
    radial-gradient(700px 400px at 75% 10%, rgba(215,184,106,.12), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 40%, var(--bg0));
  background-attachment: fixed;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--gold2); }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }

/* Container */
.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  padding: 0 0 2rem;
}

/* Page header */
.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(7,11,20,.82), rgba(7,11,20,.55));
  border-bottom: 1px solid var(--line);
  padding: .75rem 0;
  margin-bottom: 1.5rem;
}
.page-header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.page-header .brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.page-header .brand img {
  height: clamp(36px, 8vw, 48px);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.page-header .brand-text {
  font-family: Fraunces, serif;
  font-weight: 650;
  font-size: .95rem;
  line-height: 1.15;
}
.page-header .brand-sub {
  display: block;
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .1rem;
}

/* Headings */
h1 {
  font-family: Fraunces, serif;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  letter-spacing: -.3px;
  text-align: center;
  margin: 1rem 0 .5rem;
  color: var(--ink);
}
h2 {
  font-family: Fraunces, serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  letter-spacing: -.2px;
  color: var(--ink);
  margin: 1.25rem 0 .5rem;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: .75rem 0 .35rem;
}
p { color: var(--muted); line-height: 1.6; }

/* Card */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.card-gold { border-color: rgba(215,184,106,.25); }
.card-aqua { border-color: rgba(59,212,198,.25); }

/* Form elements */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .35rem;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: .7rem .85rem;
  background: rgba(234,240,255,.05);
  border: 1px solid rgba(234,240,255,.14);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
select {
  background-color: var(--bg1);
  color: var(--ink);
}
select option {
  background-color: var(--bg1);
  color: var(--ink);
}
input::placeholder,
textarea::placeholder {
  color: var(--faint);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(59,212,198,.45);
  box-shadow: 0 0 0 3px rgba(59,212,198,.12);
}
input:disabled,
input[readonly],
select:disabled {
  background: rgba(234,240,255,.03);
  color: var(--faint);
  border-color: rgba(234,240,255,.08);
  cursor: not-allowed;
}

/* Section title inside forms */
.section-title {
  font-family: Fraunces, serif;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 1.25rem 0 .65rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--line);
}

/* Buttons */
.btn,
button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .78rem 1.25rem;
  border: 1px solid rgba(234,240,255,.16);
  background: rgba(234,240,255,.06);
  color: var(--ink);
  border-radius: 999px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 650;
  letter-spacing: .1px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  user-select: none;
}
.btn:hover,
button:hover {
  transform: translateY(-1px);
  border-color: rgba(215,184,106,.3);
}
.btn:active,
button:active {
  transform: translateY(0) scale(.99);
}

.btn-primary,
button[type="submit"] {
  border-color: rgba(215,184,106,.38);
  background: linear-gradient(135deg, rgba(215,184,106,.28), rgba(59,212,198,.14));
  box-shadow: 0 14px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(215,184,106,.06) inset;
}
.btn-primary:hover,
button[type="submit"]:hover {
  background: linear-gradient(135deg, rgba(215,184,106,.36), rgba(59,212,198,.20));
  box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(242,212,138,.12) inset;
}

.btn-danger {
  border-color: rgba(255,107,107,.3);
  background: rgba(255,107,107,.12);
  color: rgba(255,190,190,.95);
}
.btn-danger:hover {
  background: rgba(255,107,107,.2);
  border-color: rgba(255,107,107,.45);
}

.btn-secondary {
  border-color: rgba(234,240,255,.12);
  background: rgba(234,240,255,.04);
  color: var(--muted);
}
.btn-secondary:hover {
  background: rgba(234,240,255,.08);
  color: var(--ink);
}

.btn-google {
  background: rgba(255,255,255,.08);
  border-color: rgba(234,240,255,.18);
  gap: .6rem;
}
.btn-google:hover {
  background: rgba(255,255,255,.12);
}
.btn-google svg { flex-shrink: 0; }

button:disabled,
.btn:disabled,
.btn.disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Status messages */
.status-message,
.message {
  text-align: center;
  padding: .75rem 1rem;
  border-radius: var(--radius-md);
  font-size: .92rem;
  margin: .75rem 0;
  border: 1px solid var(--line);
  background: rgba(234,240,255,.04);
  color: var(--muted);
}
.status-success,
.message-success {
  background: rgba(59,212,198,.1);
  border-color: rgba(59,212,198,.25);
  color: var(--aqua);
}
.status-error,
.message-error {
  background: rgba(255,107,107,.1);
  border-color: rgba(255,107,107,.25);
  color: var(--danger);
}
.message-info,
.status-info {
  background: rgba(215,184,106,.08);
  border-color: rgba(215,184,106,.2);
  color: var(--gold2);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0;
  color: var(--faint);
  font-size: .88rem;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Match status */
.match-status { margin-left: .5rem; font-size: .85rem; font-weight: 600; }
.match-status.success { color: var(--aqua); }
.match-status.error { color: var(--danger); }

/* Password toggle */
.input-wrapper {
  position: relative;
}
.input-wrapper input {
  padding-right: 4.5rem;
}
.toggle-password {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  box-shadow: none;
  color: var(--faint);
  font-size: .82rem;
  font-weight: 600;
  padding: .3rem .5rem;
  width: auto;
  cursor: pointer;
}
.toggle-password:hover {
  color: var(--ink);
  transform: translateY(-50%);
  background: none;
  border: none;
  box-shadow: none;
}

/* Radio/Checkbox dark */
input[type="radio"],
input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--gold);
  cursor: pointer;
}

/* Radio option cards (payment) */
.radio-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: .65rem;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.radio-card:hover {
  border-color: rgba(215,184,106,.25);
  background: rgba(234,240,255,.04);
}
.radio-card.selected {
  border-color: rgba(215,184,106,.45);
  background: rgba(215,184,106,.08);
}
.radio-card label { cursor: pointer; margin-bottom: 0; flex: 1; }
.radio-card .price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold2);
  white-space: nowrap;
}

/* Data display */
.data-display {
  background: rgba(234,240,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.data-display p {
  margin: .35rem 0;
  font-size: .92rem;
}
.data-display strong {
  color: var(--ink);
}

/* Pre (for JSON output) */
pre {
  background: rgba(234,240,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: .82rem;
  overflow-x: auto;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,11,20,.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.loading-overlay .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(234,240,255,.15);
  border-top-color: var(--aqua);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p {
  color: var(--ink);
  margin-top: .75rem;
  text-align: center;
}

/* Two-column grid for summary cards */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.summary-grid .item {
  padding: .5rem 0;
}
.summary-grid .item-label {
  font-size: .78rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.summary-grid .item-value {
  font-weight: 500;
  color: var(--ink);
  margin-top: .15rem;
}

/* Security info bar */
.security-info {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--muted);
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-top: 1rem;
}
.security-info svg { flex-shrink: 0; color: var(--aqua); }

/* Hidden utility */
.hidden { display: none !important; }

/* Link styled as text */
.text-link {
  color: var(--gold2);
  text-decoration: underline;
  font-weight: 600;
}
.text-link:hover { color: var(--gold); }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  margin-top: .75rem;
}
.back-link:hover { color: var(--ink); }

/* Footer (simple) */
.page-footer {
  text-align: center;
  padding: 1.5rem 0;
  font-size: .82rem;
  color: var(--faint);
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.page-footer a { color: var(--faint); text-decoration: none; }
.page-footer a:hover { color: var(--muted); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 600px) {
  :root { --max: 100%; }
  .container { width: calc(100% - 1.5rem); }
  .page-header-inner { width: calc(100% - 1.5rem); }
  h1 { font-size: 1.3rem; }
  .card { padding: 1rem; border-radius: var(--radius-md); }
  .summary-grid { grid-template-columns: 1fr; }
  button, .btn { font-size: .9rem; padding: .7rem 1rem; }
}

/* ============================
   ACCESSIBILITY
   ============================ */
:focus-visible {
  outline: 3px solid rgba(59,212,198,.35);
  outline-offset: 2px;
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
