:root {
  --primario: #1b5ed1;
  --primario-oscuro: #14469d;
  --acento: #1b5ed1;
  --fondo: #f1f5f9;
  --blanco: #ffffff;
  --texto: #0f172a;
  --gris: #64748b;
  --borde: #e2e8f0;
  --verde: #16a34a;
  --rojo: #dc2626;
  --ambar: #d97706;
  --lima: #7cfc00;
  --lima-oscuro: #65a30d;
  --sombra: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.06);
  --radio: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--primario);
  text-decoration: none;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
}

/* ---------- NAVBAR ---------- */
.top-nav {
  background: #1b5ed1;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--sombra);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: 124px;
  padding: 0 16px;
}

.nav-l {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  min-width: 0;
  grid-column: 1;
}

#nav-nav-titulo {
  color: var(--lima);
  font-size: 2.2rem;
  line-height: 1.1;
  grid-column: 2;
  justify-self: center;
  align-self: center;
  white-space: nowrap;
}

.nav-logo {
  height: 124px;
  width: auto;
  object-fit: contain;
  border-radius: 0;
}

.nav-r {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 3;
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.nav-roles {
  font-size: 0.75rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  object-fit: cover;
}

/* ---------- TYPOGRAPHY ---------- */
.page-title {
  font-size: 1.6rem;
  margin: 18px 0 14px;
}

#club-nombre {
  color: var(--lima);
}

.section-title {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--texto);
}

.subtitle {
  margin-top: 22px;
  font-size: 0.95rem;
  color: var(--gris);
}

.hint {
  color: var(--gris);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.empty {
  color: var(--gris);
  font-style: italic;
  padding: 8px 0;
}

.subtle {
  color: var(--gris);
  font-size: 0.85rem;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 18px;
  margin-bottom: 16px;
}

/* ---------- BOTONES ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
  font-family: inherit;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primario);
  color: #fff;
}

.btn-dark {
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  padding: 9px 18px;
  font-size: 0.98rem;
}

#btn-logout {
  background: var(--lima);
  color: #003166;
}

#btn-logout:hover {
  background: #65a30d;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--borde);
  color: var(--texto);
}

.btn-success {
  background: var(--verde);
  color: #fff;
}

.btn-danger-outline {
  background: transparent;
  border: 1.5px solid var(--rojo);
  color: var(--rojo);
}

.btn-block {
  display: block;
  width: 100%;
  margin-top: 14px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 7px;
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-pendiente {
  background: #fef3c7;
  color: var(--ambar);
}

.badge-confirmado {
  background: #dcfce7;
  color: var(--verde);
}

.badge-ok {
  background: #dcfce7;
  color: var(--verde);
}

.badge-rechazado {
  background: #fee2e2;
  color: var(--rojo);
}

.success-msg {
  color: var(--verde);
  font-weight: 600;
  margin-bottom: 8px;
}

.pac-row-destacada {
  border-left: 4px solid var(--verde);
  background: #f0fdf4;
}

.alert-pend {
  border: 2px solid var(--ambar);
  background: #fffbeb;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.pend-mini {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0;
  border-top: 1px solid #fde68a;
}

.pend-mini:first-of-type {
  border-top: 0;
}

.aviso-turno {
  border: 2px solid var(--ambar);
  background: #fffbeb;
}

.turno-card.urgente {
  border: 2px solid #ef4444;
  background: #fef2f2;
}

.turno-card.urgente .urgencia-aviso {
  display: block;
  margin-top: 8px;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.85rem;
}

.urgencia-aviso {
  display: none;
}

#btn-pend-flotante {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  background: var(--ambar);
  color: #78350f;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

#btn-pend-flotante:hover {
  transform: translateY(-1px);
}

/* ---------- PAGOS ---------- */
.pago-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--borde);
  flex-wrap: wrap;
}

.pago-row:last-child {
  border-bottom: none;
}

.pago-datos {
  min-width: 180px;
}

.pago-acciones {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.comprobante-preview {
  margin-top: 8px;
}

.comprobante-preview-img {
  max-width: 220px;
  max-height: 220px;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  display: block;
}

.modal-pago {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal-pago-caja {
  background: #fff;
  border-radius: var(--radio);
  padding: 12px;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.modal-pago-caja img {
  max-width: 88vw;
  max-height: 78vh;
  border-radius: var(--radio);
  display: block;
}

/* ---------- BACKUP ---------- */
.backup-wrap {
  position: relative;
  display: inline-block;
}

.backup-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: #1f2937;
  color: #f9fafb;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 50;
  pointer-events: none;
}

.backup-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 22px;
  border: 6px solid transparent;
  border-bottom-color: #1f2937;
}

.backup-wrap:hover .backup-tooltip,
.backup-wrap:focus-within .backup-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.backup-aviso-vencido {
  color: #fca5a5;
  font-weight: 600;
}

/* ---------- AUTH PAGE ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #1b5ed1 0%, #14469d 100%);
}

.auth-card {
  background: var(--blanco);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 460px;
  padding: 24px;
}

.auth-title {
  text-align: center;
  font-size: 1.4rem;
  color: var(--lima-oscuro);
  margin-bottom: 4px;
}

.auth-logo {
  display: block;
  width: auto;
  height: 140px;
  margin: 0 auto 8px;
  object-fit: contain;
}

.auth-sub {
  text-align: center;
  color: var(--gris);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--borde);
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.tab {
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gris);
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
}

.tab:hover {
  color: var(--primario);
  background: #f0f9ff;
}

.tab.active {
  color: var(--primario);
  background: #e0f2fe;
}

.nav-tab {
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gris);
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
}

.nav-tab:hover {
  color: var(--primario);
  background: #f0f9ff;
}

.nav-tab.active {
  color: var(--primario);
  background: #e0f2fe;
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--rojo);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 4px;
}

/* ---------- FORMULARIOS ---------- */
.label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--texto);
  margin: 10px 0 4px;
}

.input,
select.input,
textarea.input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--borde);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  background: #fff;
  color: var(--texto);
}

.input:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--primario);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 14px;
}

.field-full {
  grid-column: 1 / -1;
}

.campo-form {
  margin-bottom: 8px;
}

.form-error {
  display: none;
  background: #fef2f2;
  color: var(--rojo);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.87rem;
  margin-top: 12px;
}

.label-grupo {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--borde);
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

fieldset legend {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 14px 0 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--borde);
  width: 100%;
}

/* ---------- CHECKBOXES ---------- */
.checks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.checks-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1.5px solid var(--borde);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.87rem;
}

.checks-grid input {
  accent-color: var(--primario);
}

/* ---------- ACCIONES RÁPIDAS ---------- */
.acciones-rapidas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* ---------- TURNOS ---------- */
.turno-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  margin-bottom: 10px;
  background: #fff;
  flex-wrap: wrap;
}

.turno-card-soft {
  background: #fafbfc;
}

.turno-fecha {
  min-width: 120px;
}

.turno-fecha .hora {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primario);
}

.turno-info {
  flex: 1;
  min-width: 180px;
}

.turno-info p {
  color: var(--gris);
  font-size: 0.88rem;
  margin: 4px 0;
}

.acciones {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- SOLICITUD DE TURNO ---------- */
.prof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.prof-card {
  border: 1.5px solid var(--borde);
  border-radius: var(--radio);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.prof-card:hover {
  border-color: var(--primario);
  box-shadow: var(--sombra);
}

.prof-av {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-inicial {
  font-size: 1.15rem;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
}

.avatar-lg {
  width: 68px;
  height: 68px;
  font-size: 1.9rem;
}

.avatar-xl {
  width: 96px;
  height: 96px;
  font-size: 2.3rem;
}

.pac-datos {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.perfil-foto {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.perfil-foto-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.perfil-foto-editar {
  margin-left: auto;
}

.perfil-logo-wrap {
  text-align: center;
  margin: 16px 0 4px;
}

.perfil-logo {
  height: 140px;
  width: auto;
  object-fit: contain;
}

.av-lg {
  width: 64px;
  height: 64px;
  font-size: 1.8rem;
}

.esp {
  color: var(--gris);
  font-size: 0.82rem;
}

.lista-dias {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dia-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--borde);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.92rem;
}

.dia-card:hover {
  border-color: var(--primario);
}

.dia-nombre {
  font-weight: 700;
  min-width: 90px;
}

.dia-fecha {
  color: var(--gris);
  flex: 1;
}

.dia-cant {
  color: var(--primario);
  font-weight: 600;
  font-size: 0.82rem;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.slot-btn {
  padding: 10px;
  border: 1.5px solid var(--borde);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
}

.slot-btn:hover {
  background: var(--primario);
  color: #fff;
  border-color: var(--primario);
}

.resumen-card p {
  margin: 6px 0;
}

.ok-card {
  text-align: center;
  padding: 32px 18px;
}

/* ---------- DATOS / CAMPOS ---------- */
.datos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.campo {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
}

.campo-full {
  grid-column: 1 / -1;
}

.campo-titulo {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gris);
  margin-bottom: 2px;
}

.campo-valor {
  font-weight: 600;
}

.campo-lista {
  list-style: none;
  padding-left: 0;
}

.campo-lista li {
  padding: 2px 0;
}

.campo-lista li:before {
  content: "• ";
  color: var(--primario);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1.5px solid var(--borde);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  color: var(--gris);
}

.check.on {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: var(--verde);
  font-weight: 600;
}

/* ---------- CONSULTA ---------- */
.consulta {
  position: relative;
}

.consulta-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.consulta-head h3 {
  color: var(--primario-oscuro);
  font-size: 1rem;
}

.signos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin: 12px 0;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-radius: 10px;
  padding: 12px;
}

.campo-sv {
  text-align: center;
}

.campo-sv strong {
  display: block;
  font-size: 1.05rem;
  color: var(--acento);
}

.evolucion {
  margin-top: 10px;
  background: #fffbf1;
  border-left: 3px solid var(--ambar);
  border-radius: 6px;
  padding: 10px 12px;
}

.evolucion p {
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ---------- CALENDARIO ---------- */
.calendario-card {
  padding: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cal-nav-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.cal-titulo {
  text-transform: capitalize;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.dia-titulo {
  font-size: 1.08rem;
  font-weight: 800;
  white-space: nowrap;
}

#btn-adm-prev,
#btn-adm-next {
  min-width: 120px;
  text-align: center;
}

.hoy-tag {
  display: inline-block;
  background: var(--acento);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 7px;
  margin-right: 6px;
  vertical-align: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-dow {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gris);
  padding: 4px 0;
}

.cal-dia {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.78rem;
  border: 1.5px solid transparent;
  background: #fff;
  color: var(--texto);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  position: relative;
}

.cal-dia.disponible {
  background: #f0fdfa;
  border-color: #a7f3d0;
  font-weight: 600;
  cursor: pointer;
}

.cal-dia.disponible:hover {
  background: var(--primario);
  border-color: var(--primario);
  color: #fff;
}

.cal-dia.sin-turnos {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: default;
}

.cal-dia.conf-turno {
  background: #ecfdf5;
  border-color: #34d399;
  cursor: default;
  font-weight: 600;
}

.cal-dia.pend-turno {
  background: #fffbeb;
  border-color: #fbbf24;
  cursor: default;
  font-weight: 600;
}

.cal-cant {
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: 0.55rem;
  font-weight: 800;
  background: var(--primario);
  color: #fff;
  border-radius: 50%;
  min-width: 13px;
  height: 13px;
  line-height: 13px;
  text-align: center;
  padding: 0 2px;
}

.cal-pelota {
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  line-height: 1;
  display: flex;
  gap: 1px;
  white-space: nowrap;
}

.cal-dia.pasado,
.cal-dia.vacio {
  background: #f8fafc;
  color: #e2e8f0;
  cursor: default;
}

.cal-dia.hoy {
  border-color: var(--primario);
  font-weight: 800;
}

.cal-dia.sel {
  background: var(--primario);
  border-color: var(--primario);
  color: #fff;
  font-weight: 800;
}

.cal-leyenda {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--gris);
}

.leyenda-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leyenda-caja {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--borde);
  display: inline-block;
}

.leyenda-caja.av-disp {
  background: #f0fdfa;
  border-color: #a7f3d0;
}

.leyenda-caja.av-sin {
  background: #f8fafc;
}

.leyenda-caja.av-hoy {
  border-color: var(--primario);
  background: #fff;
}

.leyenda-caja.av-conf {
  background: #ecfdf5;
  border-color: #34d399;
}

.leyenda-caja.av-pend {
  background: #fffbeb;
  border-color: #fbbf24;
}

/* ---------- EJERCICIOS ---------- */
.ej-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.ej-card {
  background: #f8fafc;
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}

.ej-form-row {
  display: grid;
  grid-template-columns: 2fr 0.6fr 0.8fr 1.2fr 1.5fr auto;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
}

/* ---------- PROFESIONAL ---------- */
.lista-pacientes {
  margin-top: 12px;
}

.pac-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--borde);
  border-radius: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  background: #fff;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .container {
    padding: 12px;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .turno-fecha {
    min-width: 100%;
  }

  .ej-form-row {
    grid-template-columns: 1fr 1fr;
  }

  .ej-form-row .ej-obs {
    grid-column: 1 / -1;
  }

  .nav-user strong {
    display: none;
  }

  .top-nav {
    grid-template-columns: 1fr auto 1fr;
    padding: 0 10px;
    height: 88px;
  }

  .nav-l .nav-roles,
  .nav-l strong {
    display: none;
  }

  .nav-logo {
    height: 88px;
  }

  #nav-nav-titulo {
    font-size: 1.05rem;
    line-height: 1.05;
    white-space: normal;
  }

  .dia-titulo {
    font-size: 0.9rem;
    flex-basis: 100%;
    text-align: center;
  }

  #btn-adm-prev,
  #btn-adm-next {
    min-width: 44px;
    flex: 1 1 40%;
  }

  .cal-nav {
    flex-wrap: wrap;
    row-gap: 6px;
  }

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

  .dia-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .dia-cant {
    align-self: flex-end;
  }
}

@media (min-width: 1200px) {
  body {
    font-size: 0.98rem;
  }
}

/* ---------- PÁDEL EXTRA ---------- */
.periodo-dato {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primario-oscuro);
  line-height: 1;
}

.tip-jugador {
  background: #f1f5f9;
  border: 1px solid var(--borde);
  color: var(--texto);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-cancelado {
  background: #f1f5f9;
  color: var(--gris);
}

.cal-reservar-card {
  margin: 14px 0 4px;
  background: #f8fafc;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 14px;
}

.cal-reservar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-reservar-grid .cal-dia {
  height: 42px;
  font-size: 0.82rem;
}

.cal-reservar-grid .cal-cant {
  background: var(--acento);
  font-size: 0.5rem;
}

.slot-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.slot-btn .slot-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gris);
}

.slot-btn.on {
  background: var(--primario);
  color: #fff;
  border-color: var(--primario);
}

.slot-btn.on .slot-sub {
  color: rgba(255, 255, 255, 0.85);
}

.slot-btn.slot-ok {
  border-color: #22c55e;
  background: #f0fdf4;
}

.slot-btn.slot-medio {
  border-color: #eab308;
  background: #fefce8;
}

.slot-btn.slot-pocos {
  border-color: #f59e0b;
  background: #fff7ed;
}

.slot-btn.slot-ok:hover,
.slot-btn.slot-medio:hover,
.slot-btn.slot-pocos:hover {
  background: var(--primario);
  color: #fff;
  border-color: var(--primario);
}

.slot-btn .slot-libre {
  font-weight: 700;
}

.slot-btn .slot-libre.ok {
  color: #15803d;
}

.slot-btn .slot-libre.medio {
  color: #a16207;
}

.slot-btn .slot-libre.pocos {
  color: #b45309;
}

.slot-btn.on .slot-libre {
  color: rgba(255, 255, 255, 0.9);
}

.slots-leyenda {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--gris);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.slots-leyenda .ley {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: -1px;
}

.slots-leyenda .ley.ok {
  background: #22c55e;
}

.slots-leyenda .ley.medio {
  background: #eab308;
}

.slots-leyenda .ley.pocos {
  background: #f59e0b;
}

.cal-reservar-grid .cal-cant.cal-cant-ok {
  background: #16a34a;
}

.cal-reservar-grid .cal-cant.cal-cant-medio {
  background: #eab308;
}

.cal-reservar-grid .cal-cant.cal-cant-poco {
  background: #f59e0b;
}

/* Grilla día por cancha (admin) */
.grid-dia-wrap {
  overflow-x: auto;
}

.grid-dia {
  display: grid;
  grid-template-columns: 88px repeat(5, 1fr);
  gap: 2px;
  min-width: 940px;
}

.grid-dia-cab {
  background: #f1f5f9;
  font-weight: 700;
  text-align: center;
  padding: 8px 4px;
  font-size: 0.82rem;
  border-radius: 6px;
  min-width: 0;
}

.cancha-cab {
  color: var(--primario-oscuro);
}

.celda-hora {
  background: #f8fafc;
  color: var(--gris);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
}

.cell {
  background: #fff;
  border: 1px dashed var(--borde);
  border-radius: 6px;
  min-height: 44px;
}

.cell.ocup {
  border-style: solid;
  background: #ecfdf5;
  border-color: #a7f3d0;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cell.ocup.pend {
  background: #fffbeb;
  border-color: #fde68a;
}

.cell.ocup.cont {
  background: #d1fae5;
  border-top: 2px solid #10b981;
  border-bottom: 2px solid #10b981;
  border-radius: 0;
}

.cell.ocup.pend.cont {
  background: #fef3c7;
  border-top: 2px solid #f59e0b;
  border-bottom: 2px solid #f59e0b;
  border-radius: 0;
}

.cell-titulo {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-hora {
  font-size: 0.7rem;
  color: var(--gris);
}

.cell-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 0.7rem;
  border-radius: 6px;
}

/* Modal genérico */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-caja {
  background: #fff;
  border-radius: var(--radio);
  padding: 22px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  animation: modal-in 0.18s ease;
}

@keyframes modal-in {
  from {
    transform: translateY(14px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 2000;
  transition: opacity 0.25s ease;
  text-align: center;
  max-width: 90vw;
}

.toast.err {
  background: #dc2626;
}

.toast.ok {
  background: #16a34a;
}

.dia-movil {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.corte-movil {
  border: 1px solid var(--borde);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.corte-movil-titulo {
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fila-movil {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px dashed var(--borde);
}

.fila-movil.pend {
  background: #fffbeb;
  border-left: 3px solid #fbbf24;
  padding-left: 6px;
}

.fila-movil.clase {
  border-left: 3px solid #7c3aed;
  padding-left: 6px;
}

.fm-hora {
  font-weight: 800;
  font-size: 0.85rem;
  min-width: 82px;
}

.fm-info {
  flex: 1;
  min-width: 150px;
  font-size: 0.85rem;
}

.fm-acciones {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .cal-reservar-grid .cal-dia {
    height: 38px;
    font-size: 0.75rem;
  }
}

.deporte-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.deporte-tab {
  border: 1px solid var(--borde);
  background: #fff;
  color: var(--texto);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  cursor: pointer;
}

.deporte-tab.active {
  background: var(--primario);
  color: #fff;
  border-color: var(--primario);
}

.deporte-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
  white-space: nowrap;
}

.deporte-badge.dep-padel {
  background: #1b5ed1;
  color: #fff;
}

.deporte-badge.dep-futbol {
  background: #16a34a;
  color: #fff;
}

.deporte-badge.dep-admin {
  background: #334155;
  color: #fff;
}

.cell-kiosko {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.kio-pend {
  font-size: 0.66rem;
  font-weight: 700;
  color: #b45309;
}

.modal-ancha {
  max-width: 760px;
  width: auto;
}

.kio-venta {
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
}

.kio-linea-head,
.kio-linea {
  display: grid;
  grid-template-columns: 120px 1fr 90px 70px 90px 30px;
  gap: 6px;
  align-items: center;
}

.kio-linea-head span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gris);
}

.kio-linea {
  margin-bottom: 6px;
}

.kio-total {
  margin-left: auto;
  align-self: center;
}

@media (max-width: 600px) {
  .kio-linea-head,
  .kio-linea {
    grid-template-columns: 1fr 1fr;
  }
  .kio-sub {
    display: none;
  }
}

/* ===================== CLASES ===================== */
.cell.ocup.clase {
  background: #f3e8ff;
  border-color: #a855f7;
}

.cell-sub {
  font-size: 0.7rem;
  color: #4b5563;
  margin-top: 2px;
}

.cal-dia.cli-turno {
  background: #f3e8ff;
}

.cal-dia.cli-turno:hover {
  background: #c9a5f0;
}

.cal-clase {
  background: #a855f7;
  color: #fff;
  margin-left: 4px;
}

.av-clase {
  background: #f3e8ff;
  border-color: #a855f7;
}