/* ==========================================================================
   Proxxumo — pantallas de acceso (login, registro, recuperar contraseña)
   Compactas: en un celular el login cabe sin desplazarse.
   ========================================================================== */

body.px-auth {
  background: linear-gradient(180deg, #242b57 0, #242b57 190px, #eef1f7 190px);
  min-height: 100vh;
}
.px-auth-main {
  max-width: 480px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 14px 20px;
}
.px-auth-brand { display: block; text-align: center; margin: 4px 0 12px; }
.px-auth-brand img { height: 64px; width: auto; }

.px-auth-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, .12);
}
.px-auth-card h1 { font-size: 1.45rem; margin: 0 0 4px; color: #1f2937; text-align: center; }
.px-auth-card .px-auth-sub { text-align: center; color: var(--px-muted); margin: 0 0 16px; font-size: 1rem; }
.px-auth-card .form-group { margin-bottom: 14px; }
.px-auth-card label { margin-bottom: 6px; }

.px-auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 14px; flex-wrap: wrap; }
.px-auth-row a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.px-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; cursor: pointer; margin: 0; }
.px-check input { width: 22px; height: 22px; accent-color: var(--px-primary); }

.px-auth-alt { text-align: center; margin-top: 14px; }
.px-auth-alt p { margin: 0 0 8px; color: #1f2937; font-weight: 600; }
.px-auth-links { display: flex; justify-content: center; gap: 4px 18px; flex-wrap: wrap; margin-top: 4px; }
.px-auth-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }

.px-auth-help { text-align: center; margin: 16px 0 0; color: var(--px-muted); font-size: .95rem; }
.px-auth-help a { font-weight: 700; color: #128c4b; white-space: nowrap; }

/* Campo de contraseña con botón "Mostrar" dentro */
.px-pass { position: relative; }
.px-pass .form-control { padding-right: 104px; }
.px-pass button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px;
  background: #eef2ff; color: var(--px-primary); font-weight: 700; font-size: .95rem;
}

/* ── Registro por pasos ─────────────────────────────────────────────────── */
.px-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 16px; padding: 0; list-style: none; }
.px-tabs button {
  width: 100%; min-height: 56px; border: 0; border-radius: 12px;
  background: #f1f3f8; color: #6b7280; font-weight: 700; font-size: .9rem; line-height: 1.15;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px;
}
.px-tabs button .n {
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #d1d5db; color: #fff; font-size: .9rem;
}
.px-tabs button[aria-selected="true"] { background: #e0e7ff; color: var(--px-primary); }
.px-tabs button[aria-selected="true"] .n { background: var(--px-primary); }
.px-tabs button.done .n { background: var(--px-success); }
.px-tabs button:disabled { opacity: .6; cursor: not-allowed; }

.px-step-panel[hidden] { display: none !important; }
.px-step-actions { display: flex; gap: 10px; margin-top: 6px; }
.px-step-actions .btn { flex: 1; }
.px-field-error { color: var(--px-danger); font-weight: 600; font-size: .95rem; margin-top: 6px; display: none; }
.form-control.is-invalid + .px-field-error, .is-invalid ~ .px-field-error { display: block; }
.px-ok { color: var(--px-success); font-weight: 600; font-size: .95rem; margin-top: 6px; }

.px-invited { background: #ecfdf5; border: 1.5px solid #a7f3d0; border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }

/* Select2 (buscador de municipio) con el mismo tamaño que los campos */
.select2-container--default .select2-selection--single {
  min-height: 52px; border: 1.5px solid var(--px-border); border-radius: 10px; display: flex; align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { font-size: 1.05rem; color: #111827; padding-left: 14px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 50px; right: 8px; }
.select2-results__option { font-size: 1.05rem; padding: 12px; }
.select2-search__field { min-height: 44px; font-size: 1.05rem !important; }

/* Ajustes tras revisión en celular */
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 1.3; padding-top: 0; padding-bottom: 0; width: 100%; }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #6b7280; }
.px-check input[type=checkbox] { width: 22px !important; height: 22px !important; flex-shrink: 0; }
.px-step-actions .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 49px !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { top: 0 !important; height: 100% !important; }

/* ── Pantallas grandes (tablet / computador): más ancho y logo más grande ── */
@media (min-width: 768px) {
  body.px-auth { background: linear-gradient(180deg, #242b57 0, #242b57 260px, #eef1f7 260px); }
  .px-auth-main { max-width: 820px; padding-top: 28px; padding-bottom: 32px; }
  .px-auth-brand { margin: 0 0 22px; }
  .px-auth-brand img { height: 120px; }
  .px-auth-card { padding: 32px 40px; border-radius: 20px; }
  .px-auth-card--narrow { max-width: 560px; margin: 0 auto; }
  .px-auth-card h1 { font-size: 1.75rem; }
  .px-tabs { gap: 12px; margin-bottom: 24px; }
  .px-tabs button { flex-direction: row; gap: 10px; min-height: 60px; font-size: 1.05rem; }

  /* Campos de cada paso en dos columnas */
  .px-step-panel:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .px-step-panel > :not(.form-group) { grid-column: 1 / -1; }
  .px-step-actions { justify-content: flex-end; margin-top: 12px; }
  .px-step-actions .btn { flex: 0 0 auto; min-width: 200px; }
}

/* ── Páginas legales ────────────────────────────────────────────────────── */
.px-legal { line-height: 1.6; color: #1f2937; }
.px-legal h1 { text-align: left; }
.px-legal h2 { font-size: 1.2rem; margin: 26px 0 8px; color: #1f2937; }
.px-legal p, .px-legal li { font-size: 1.02rem; }
.px-legal ul, .px-legal ol { padding-left: 1.3rem; }
.px-legal li { margin-bottom: 6px; }
.px-legal .px-legal-meta { color: var(--px-muted); font-size: .95rem; margin-bottom: 18px; }
.px-legal .px-legal-box { background: #f1f5ff; border-radius: 12px; padding: 12px 14px; }
.px-legal-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; padding: 0; list-style: none; }
.px-legal-toc a { font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; }
.px-note { background: #eef2ff; color: #1e3a8a; border-radius: 12px; padding: 12px 14px; font-size: 1rem; }
