html {
  font-size: 14px;
  min-height: 100%;
  position: relative;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 32rem),
    #151515;
  color: #f5f5f5;
  margin-bottom: 86px;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #151515, 0 0 0 0.25rem var(--color-primario);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.athlete-shell {
  margin: 0 auto;
  max-width: 520px;
  padding: 0 0 1rem;
}

.athlete-hero {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)),
    #202020;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  margin: -1rem -0.75rem 1rem;
  overflow: hidden;
  padding: 1.25rem;
  position: relative;
}

.athlete-hero::after {
  background: var(--color-primario);
  bottom: 0;
  content: "";
  height: 3px;
  left: 1.25rem;
  position: absolute;
  right: 1.25rem;
}

.athlete-hero__brand,
.section-heading,
.merch-card,
.wod-actions,
.leaderboard-row,
.athlete-bottom-nav {
  align-items: center;
  display: flex;
}

.athlete-hero__brand {
  gap: 0.9rem;
}

.athlete-hero__logo {
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  height: 58px;
  object-fit: contain;
  padding: 0.35rem;
  width: 58px;
}

.eyebrow {
  color: #a8a8a8;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.athlete-hero h1,
.section-heading h2,
.wod-card h3,
.merch-card h3,
.athlete-modal h5 {
  letter-spacing: 0;
  margin: 0;
}

.athlete-hero h1 {
  color: var(--color-primario);
  font-size: clamp(1.35rem, 6vw, 2rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.membership-chip,
.soft-tag,
.category-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 800;
  gap: 0.4rem;
  line-height: 1;
  padding: 0.45rem 0.65rem;
  text-transform: uppercase;
}

.membership-chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  margin-top: 1rem;
}

.status-dot {
  background: var(--color-primario);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--color-primario);
  height: 0.55rem;
  width: 0.55rem;
}

.athlete-hero__copy {
  margin-top: 1rem;
}

.athlete-hero__copy p {
  color: #cfcfcf;
  margin: 0;
}

.athlete-hero__copy strong {
  color: #ffffff;
  display: block;
  font-size: 1.18rem;
  line-height: 1.2;
  margin-top: 0.2rem;
}

.quick-metrics {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 1rem;
}

.quick-metrics > div,
.wod-card,
.score-panel,
.leaderboard-panel,
.merch-panel,
.empty-state {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.quick-metrics > div {
  min-width: 0;
  padding: 0.8rem 0.7rem;
}

.quick-metrics span,
.score-panel p,
.merch-card p,
.merch-card small,
.helper-note {
  color: #a8a8a8;
}

.quick-metrics span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.quick-metrics strong {
  color: #ffffff;
  display: block;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.wod-card,
.score-panel,
.leaderboard-panel,
.merch-panel {
  margin-bottom: 1rem;
  padding: 1rem;
}

.section-heading {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
}

.section-heading time {
  color: #cfcfcf;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 800;
}

.wod-card__body {
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1rem;
}

.category-pill {
  background: var(--color-primario);
  color: var(--color-secundario);
  margin-bottom: 0.85rem;
}

.wod-card h3,
.merch-card h3,
.athlete-modal h5 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.15;
}

.wod-description {
  color: #e8e8e8;
  line-height: 1.65;
  margin: 1rem 0 0;
  white-space: pre-line;
}

.wod-actions {
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.btn-box-primary,
.btn-box-secondary {
  border-radius: 8px;
  font-weight: 900;
  min-height: 46px;
  text-transform: uppercase;
}

.btn-box-primary {
  background: var(--color-primario) !important;
  border: 1px solid var(--color-primario) !important;
  color: var(--color-secundario) !important;
}

.btn-box-primary:hover {
  background: transparent !important;
  color: var(--color-primario) !important;
}

.btn-box-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.btn-box-secondary:hover {
  border-color: var(--color-primario);
  color: var(--color-primario);
}

.soft-tag {
  background: rgba(255, 255, 255, 0.08);
  color: #d8d8d8;
}

.score-panel p {
  line-height: 1.45;
  margin: 0;
}

.leaderboard-list,
.merch-list {
  display: grid;
  gap: 0.65rem;
}

.leaderboard-row {
  background: #171717;
  border-radius: 8px;
  gap: 0.75rem;
  padding: 0.8rem;
}

.leaderboard-row span {
  align-items: center;
  background: var(--color-primario);
  border-radius: 50%;
  color: var(--color-secundario);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 900;
  height: 1.7rem;
  justify-content: center;
  width: 1.7rem;
}

.leaderboard-row strong {
  color: #ffffff;
  flex: 1 1 auto;
  min-width: 0;
}

.leaderboard-row em {
  color: #cfcfcf;
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 800;
}

.merch-card {
  align-items: stretch;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.merch-card__content {
  min-width: 0;
}

.merch-card h3 {
  font-size: 1rem;
  margin-top: 0.7rem;
}

.merch-card p {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0.65rem 0;
}

.merch-card__action {
  display: flex;
  flex: 0 0 8.3rem;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: space-between;
  text-align: right;
}

.merch-card__action strong {
  color: var(--color-primario);
  font-size: 0.95rem;
}

.empty-state {
  color: #a8a8a8;
  padding: 1rem;
}

.athlete-bottom-nav {
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px 8px 0 0;
  bottom: 0;
  box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.3);
  gap: 0.25rem;
  justify-content: space-around;
  left: 50%;
  max-width: 520px;
  padding: 0.75rem;
  position: fixed;
  transform: translateX(-50%);
  width: min(100%, 520px);
  z-index: 20;
}

.athlete-bottom-nav a {
  border-radius: 8px;
  color: #a8a8a8;
  flex: 1;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.6rem 0.35rem;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.athlete-bottom-nav a.active {
  background: var(--color-primario);
  color: var(--color-secundario);
}

.athlete-modal {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
}

.athlete-modal .modal-header {
  background: #171717;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.athlete-modal label {
  color: #d8d8d8;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.athlete-input {
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.athlete-input:focus {
  background: #151515;
  border-color: var(--color-primario);
  color: #ffffff;
}

.athlete-input::placeholder {
  color: #9f9f9f;
  opacity: 1;
}

.athlete-input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1);
  opacity: 0.85;
}

.admin-payments-table .athlete-input {
  background: #0f0f0f;
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.admin-payments-card {
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.85rem;
}

.admin-payments-title {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-payments-label {
  color: #d6d6d6;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.admin-payments-help {
  color: #bdbdbd;
  font-size: 0.8rem;
  line-height: 1.35;
}

.report-tile {
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.report-label {
  color: #d8d8d8;
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-tile:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.helper-note {
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.4;
  padding: 0.75rem;
}

@media (max-width: 420px) {
  .wod-actions,
  .merch-card {
    flex-direction: column;
  }

  .merch-card__action {
    flex: none;
    text-align: left;
  }

  .quick-metrics {
    grid-template-columns: 1fr;
  }
}

/* Tema operativo claro */
/* Tema operativo claro */
html[data-theme="light"] {
  body {
    background: #f4f6f8;
    color: #1f2937;
  }

  main,
  main section,
  main .card,
  main .modal-content,
  main .athlete-modal,
  main .empty-state {
    color: #1f2937;
  }

  main .card.border-0.shadow-sm,
  main .athlete-hero,
  main .quick-metrics > div,
  main .wod-card,
  main .score-panel,
  main .leaderboard-panel,
  main .merch-panel,
  main .empty-state,
  main .athlete-modal {
    background: #ffffff !important;
    border: 1px solid #d8dee6 !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important;
  }

  main .text-white,
  main h1,
  main h2,
  main h3,
  main h4,
  main h5,
  main strong,
  main .section-heading h2,
  main .wod-card h3,
  main .merch-card h3,
  main .athlete-modal h5,
  main .admin-payments-title,
  main .wod-description {
    color: #111827 !important;
  }

  main .text-muted,
  main .eyebrow,
  main .helper-note,
  main .quick-metrics span,
  main .score-panel p,
  main .merch-card p,
  main .merch-card small,
  main .athlete-hero__copy p,
  main .section-heading time,
  main .admin-payments-help,
  main .admin-payments-label {
    color: #5f6673 !important;
  }

  main .table-dark {
    --bs-table-bg: #ffffff;
    --bs-table-color: #1f2937;
    --bs-table-border-color: #d8dee6;
    --bs-table-hover-bg: #eef2f7;
    --bs-table-hover-color: #111827;
    color: #1f2937;
  }

  main .table-dark th,
  main .table-dark td {
    color: #1f2937;
  }

  main .athlete-input,
  main .admin-payments-table .athlete-input,
  main .form-control,
  main .form-select {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #111827 !important;
  }

  main .athlete-input:focus,
  main .form-control:focus,
  main .form-select:focus {
    background: #ffffff !important;
    border-color: var(--color-botones) !important;
    color: #111827 !important;
  }

  main .athlete-input::placeholder {
    color: #7b8492;
  }

  main .athlete-input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
  }

  .btn-box-primary,
  main .btn-box-primary {
    background: var(--color-botones) !important;
    border: 1px solid var(--color-botones) !important;
    color: #ffffff !important;
    min-height: 42px;
    padding: 0.6rem 1rem;
  }

  .btn-box-primary:hover,
  main .btn-box-primary:hover {
    background: #ffffff !important;
    color: var(--color-botones) !important;
  }

  .btn-box-secondary,
  main .btn-box-secondary,
  main .btn-outline-secondary {
    background: #ffffff !important;
    border: 1px solid var(--color-botones) !important;
    color: var(--color-botones) !important;
    min-height: 42px;
    padding: 0.6rem 1rem;
  }

  .btn-box-secondary:hover,
  main .btn-box-secondary:hover,
  main .btn-outline-secondary:hover {
    background: var(--color-botones) !important;
    color: #ffffff !important;
  }

  main .btn-outline-light {
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    background-color: transparent !important;
  }

  main .btn-outline-light:hover {
    background-color: #1e293b !important;
    border-color: #1e293b !important;
    color: #ffffff !important;
  }

  main .btn-sm {
    min-height: 36px;
    padding: 0.45rem 0.75rem;
  }

  main .helper-note,
  main .wod-card__body,
  main .leaderboard-row,
  main .merch-card,
  main .admin-payments-card,
  main .report-tile,
  main .athlete-modal .modal-header {
    background: #f8fafc !important;
    border: 1px solid #d8dee6 !important;
  }

  main .report-label {
    color: #4b5563;
  }

  main .category-pill,
  main .leaderboard-row span,
  main .athlete-bottom-nav a.active {
    background: var(--color-botones) !important;
    color: #ffffff !important;
  }

  main .badge[style*="var(--color-primario)"] {
    background-color: var(--color-botones) !important;
    color: #ffffff !important;
  }

  .athlete-bottom-nav {
    background: #ffffff;
    border-color: #d8dee6;
    box-shadow: 0 -12px 35px rgba(15, 23, 42, 0.12);
  }

  .athlete-bottom-nav a {
    color: #5f6673;
  }

  main .soft-tag {
    background: #e2e8f0 !important;
    color: #334155 !important;
  }
}

/* Adaptación de colores de esquema e inputs nativos en el navegador */
html[data-theme="dark"] {
  color-scheme: dark;
}
html[data-theme="light"] {
  color-scheme: light;
}

/* Sobrescribir elementos con estilos inline de fondo claro en modo oscuro */
html[data-theme="dark"],
html:not([data-theme="light"]) {
  tr.collapse .p-3.rounded[style*="background-color: #f1f5f9"],
  tr.collapse .p-3.rounded[style*="background-color: #f8fafc"],
  .p-3.rounded[style*="background-color: #f8fafc"],
  .p-2.rounded[style*="background-color: #f8fafc"] {
    background-color: #171717 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f5f5f5 !important;
  }

  tr.collapse .p-3.rounded[style*="background-color: #f1f5f9"] *,
  tr.collapse .p-3.rounded[style*="background-color: #f8fafc"] *,
  .p-3.rounded[style*="background-color: #f8fafc"] *,
  .p-2.rounded[style*="background-color: #f8fafc"] * {
    color: #f5f5f5 !important;
  }

  tr.collapse table,
  tr.collapse table th,
  tr.collapse table td {
    color: #f5f5f5 !important;
  }

  .alert-light[style*="background-color: #e2e8f0"] {
    background-color: #171717 !important;
    color: #a8a8a8 !important;
  }
}

/* --- Estilización Consistente Premium (Opción 3) --- */

/* 1. Categorías: Mayúsculas fijas (badges y píldoras) */
.category-pill,
.badge-category,
.wod-category,
#modalWodCategoria {
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-weight: 700 !important;
}

/* 2. Títulos, Grupos y Ciclos: Capitalización automática (primera letra mayúscula) */
.group-name,
.cycle-name,
.wod-title,
.capitalize-text,
.wod-card h3,
.btn-ver-detalle-titulo {
  text-transform: capitalize !important;
}
