:root {
  --brand: #0b5ed7;
  --brand-dark: #0b1f3a;
  --surface: #f5f7fb;
  --text: #172033;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--surface);
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.public-body {
  min-height: 100vh;
}

.admin-body {
  min-height: 100vh;
  background: #f3f5f9;
}

.auth-body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, #dbeafe, #f8fafc 45%, #e2e8f0);
}

.admin-navbar {
  background: linear-gradient(135deg, #0b1f3a, #173f73);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--brand);
}

.hero-simple {
  background: linear-gradient(180deg, #fff, transparent);
}

.tournament-card,
.registration-card,
.success-card,
.login-card,
.metric-card {
  border-radius: 1.25rem;
  overflow: hidden;
}

.tournament-thumb,
.admin-tournament-thumb {
  display: block;
  width: 100%;
  object-fit: cover;
  background: #e9eef6;
}

.tournament-thumb {
  height: 210px;
}

.admin-tournament-thumb {
  height: 180px;
}

.status-pill,
.payment-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-registro_abierto,
.payment-pagado {
  color: #166534;
  background: #dcfce7;
}

.status-registro_cerrado,
.status-finalizado,
.payment-rechazado,
.payment-cancelado {
  color: #991b1b;
  background: #fee2e2;
}

.status-proximamente,
.payment-en_revision,
.payment-comprobante_recibido {
  color: #92400e;
  background: #fef3c7;
}

.status-borrador,
.status-archivado,
.payment-pendiente {
  color: #475569;
  background: #e2e8f0;
}

.payment-pago_parcial {
  color: #9a3412;
  background: #ffedd5;
}

.payment-reembolsado {
  color: #5b21b6;
  background: #ede9fe;
}

/* Banner público: pensado para imágenes panorámicas de 1920 x 440 px. */
.tournament-banner-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  line-height: 0;
  background: #091528;
}

.tournament-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
}

.registration-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1320px;
  margin-top: -2rem;
  padding-bottom: 3rem;
}

.registration-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: #fff;
}

.registration-card > .row {
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.registration-card > .row > * {
  min-width: 0;
}

.registration-aside {
  min-width: 0;
  padding: 2.5rem;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(155deg, #0b1f3a 0%, #0b5ed7 100%);
}

.registration-aside h1,
.registration-aside p,
.registration-aside span,
.registration-aside strong,
.event-facts,
.event-facts div {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.registration-aside p {
  line-height: 1.55;
}

.event-facts {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.event-facts div {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.event-facts span {
  color: rgba(255, 255, 255, 0.78);
}

.form-control,
.form-select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-color: #d8dfeb;
  border-radius: 0.8rem;
  padding: 0.72rem 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: #7fb0f8;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.12);
}

.form-check,
.form-check-label {
  max-width: 100%;
}

.form-check-label {
  overflow-wrap: break-word;
}

.btn {
  border-radius: 0.75rem;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.summary-item {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e6eaf0;
  border-radius: 0.8rem;
  background: #f8fafc;
}

.summary-item span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-item strong {
  display: block;
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}

.sending-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(9, 21, 40, 0.72);
  backdrop-filter: blur(5px);
}

.sending-box {
  width: min(92vw, 360px);
  padding: 2rem;
  border-radius: 1.2rem;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.success-card {
  max-width: 760px;
  padding: clamp(2rem, 6vw, 4rem);
  background: #fff;
}

.success-icon,
.closed-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  font-size: 2.2rem;
  font-weight: 800;
}

.success-icon {
  color: #15803d;
  background: #dcfce7;
}

.closed-icon {
  color: #b91c1c;
  background: #fee2e2;
}

.folio-box {
  max-width: 390px;
  margin: 1.75rem auto;
  padding: 1.2rem;
  border: 1px dashed #75a9ef;
  border-radius: 1rem;
  background: #eef5ff;
}

.folio-box span,
.folio-box strong {
  display: block;
}

.folio-box span {
  color: #64748b;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.folio-box strong {
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.login-card {
  width: min(100%, 470px);
  padding: clamp(1.5rem, 5vw, 3rem);
  background: #fff;
}

.metric-card {
  height: 100%;
  padding: 1.25rem;
  background: #fff;
  box-shadow: 0 0.4rem 1.4rem rgba(25, 42, 70, 0.07);
}

.metric-card span {
  display: block;
  min-height: 2.4em;
  color: #64748b;
  font-size: 0.82rem;
}

.metric-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.45rem;
}

.empty-state {
  padding: 3rem;
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  color: #64748b;
  background: #fff;
  text-align: center;
}

.detail-list {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 0.85rem 1rem;
  margin: 0;
}

.detail-list dt {
  color: #64748b;
  font-weight: 600;
}

.detail-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.table thead th {
  white-space: nowrap;
  color: #64748b;
  background: #f8fafc;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Tabletas y teléfonos. Bootstrap cambia col-lg-* debajo de 992 px. */
@media (max-width: 991.98px) {
  .registration-shell {
    width: 100%;
    max-width: 100%;
    margin-top: 1rem;
    padding-right: 12px;
    padding-left: 12px;
  }

  .registration-card > .row {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .registration-card > .row > .registration-aside,
  .registration-card > .row > .col-lg-8 {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .registration-aside {
    padding: 2rem;
  }

  .registration-card > .row > .col-lg-8 {
    padding: 2rem !important;
  }

  .event-facts {
    margin-top: 1.5rem;
  }
}

/* Teléfonos. */
@media (max-width: 575.98px) {
  .registration-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .registration-card {
    border-radius: 1rem;
  }

  .registration-aside {
    padding: 1.35rem;
  }

  .registration-card > .row > .col-lg-8 {
    padding: 1.35rem !important;
  }

  .registration-aside h1 {
    font-size: clamp(1.6rem, 8vw, 2rem);
    line-height: 1.15;
  }

  .registration-aside p {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .event-facts {
    margin-top: 1.25rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .detail-list {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .detail-list dd {
    margin-bottom: 0.8rem;
  }

  .tournament-thumb {
    height: 180px;
  }

  .admin-tournament-thumb {
    height: 150px;
  }
}

/* Teléfonos pequeños de aproximadamente 320 px. */
@media (max-width: 360px) {
  .registration-shell {
    padding-right: 7px;
    padding-left: 7px;
  }

  .registration-aside,
  .registration-card > .row > .col-lg-8 {
    padding: 1rem !important;
  }

  .registration-aside h1 {
    font-size: 1.45rem;
  }

  .registration-aside p {
    font-size: 0.9rem;
  }

  .form-control,
  .form-select,
  textarea {
    padding: 0.65rem 0.72rem;
  }

  .btn-lg {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    font-size: 1rem;
  }
}
