/* Panel de Me falta 1 — dueños de cancha y equipo. Sin dependencias externas. */
:root {
  --navy: #0e2350;
  --navy2: #1b3a78;
  --naranja: #ff6b35;
  --naranja2: #e85a26;
  --celeste: #29a3ec;
  --verde: #1f9d57;
  --amarillo: #e8a317;
  --rojo: #d64545;
  --gris: #5a6478;
  --gris2: #8a96ad;
  --linea: #dde3ee;
  --fondo: #f4f6fb;
  --blanco: #fff;
  --texto: #1c2333;
  --radio: 10px;
  --sombra: 0 1px 2px rgba(14, 35, 80, .06), 0 4px 16px rgba(14, 35, 80, .06);
  --lateral: 248px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--texto); background: var(--fondo);
}
a { color: var(--navy2); }
h1 { font-size: 24px; margin: 0 0 4px; color: var(--navy); letter-spacing: -.2px; }
h2 { font-size: 18px; margin: 0 0 12px; color: var(--navy); }
h3 { font-size: 15px; margin: 0 0 8px; color: var(--navy); }
p { margin: 0 0 10px; }
.sub { color: var(--gris); margin-bottom: 18px; }
.chico { font-size: 13px; color: var(--gris); }
.muy-chico { font-size: 12px; color: var(--gris2); }
.oculto { display: none !important; }

/* --- Estructura --- */
.app { display: flex; min-height: 100vh; }
.lateral {
  width: var(--lateral); flex: 0 0 var(--lateral); background: var(--navy); color: #dbe4f7;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.marca { display: flex; align-items: center; gap: 10px; padding: 18px 18px 12px; color: #fff; text-decoration: none; }
.marca img { width: 40px; height: 40px; }
.marca b { display: block; font-size: 16px; }
.marca span { font-size: 12px; color: #9fb3dc; }
.selector { margin: 6px 14px 10px; }
.selector select { width: 100%; background: #16306a; color: #fff; border: 1px solid #2a4a8e; }
.nav { display: flex; flex-direction: column; padding: 4px 8px; gap: 2px; }
.nav .titulo { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #7f95c4; padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: #dbe4f7; text-decoration: none; font-weight: 500;
}
.nav a:hover { background: #16306a; }
.nav a.activo { background: var(--naranja); color: #fff; }
.nav a .contador {
  margin-left: auto; background: var(--naranja); color: #fff; border-radius: 999px; font-size: 12px;
  padding: 1px 8px; font-weight: 700;
}
.nav a.activo .contador { background: #fff; color: var(--naranja); }
.lateral .pie { margin-top: auto; padding: 14px 18px; font-size: 13px; color: #9fb3dc; border-top: 1px solid #1d3a75; }
.lateral .pie b { color: #fff; display: block; }
.lateral .pie button { margin-top: 8px; width: 100%; }
.principal { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.cabecera { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cabecera .sub { margin-bottom: 0; }
.barra-movil { display: none; }

/* --- Tarjetas y grillas --- */
.tarjeta { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px 20px; margin-bottom: 16px; }
.tarjeta.peligro { border-color: #f1c4c4; }
.grilla { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); padding: 14px 16px; box-shadow: var(--sombra); }
.kpi .v { font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.kpi .t { font-size: 13px; color: var(--gris); }
.kpi.alerta .v { color: var(--rojo); }
.kpi.ok .v { color: var(--verde); }
.fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fila.entre { justify-content: space-between; }
.espaciador { flex: 1; }

/* --- Formularios --- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--gris); margin-bottom: 4px; }
.campo { margin-bottom: 12px; }
input, select, textarea {
  font: inherit; color: var(--texto); background: #fff; border: 1px solid #c9d2e3; border-radius: 8px;
  padding: 8px 10px; width: 100%; min-height: 38px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--celeste); outline-offset: 0; border-color: var(--celeste); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; margin: 0 6px 0 0; accent-color: var(--naranja); }
.check { display: flex; align-items: flex-start; gap: 4px; font-weight: 500; color: var(--texto); font-size: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ayuda { font-size: 12px; color: var(--gris2); margin-top: 3px; }
.error-campo { color: var(--rojo); font-size: 13px; margin-top: 4px; }

button, .boton {
  font: inherit; font-weight: 600; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
  padding: 8px 14px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--naranja); color: #fff; text-decoration: none; white-space: nowrap;
}
button:hover { background: var(--naranja2); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.sec, .boton.sec { background: #fff; color: var(--navy); border-color: #c9d2e3; }
button.sec:hover { background: #eef2fa; }
button.verde { background: var(--verde); }
button.verde:hover { background: #18834a; }
button.rojo { background: #fff; color: var(--rojo); border-color: #ecc3c3; }
button.rojo:hover { background: #fdf0f0; }
button.lleno-rojo { background: var(--rojo); }
button.chico { min-height: 30px; padding: 4px 10px; font-size: 13px; }
button.texto { background: none; color: var(--navy2); padding: 4px 6px; min-height: 0; }
button.texto:hover { text-decoration: underline; background: none; }

a.boton:hover { background: var(--naranja2); }
a.boton.sec:hover { background: #eef2fa; }
.paso { width: 32px; height: 32px; border-radius: 50%; background: var(--naranja); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
ul.lista { margin: 0 0 6px; padding-left: 20px; }
ul.lista li { margin-bottom: 6px; }
.solo-movil { display: none; }

/* --- Tablas --- */
.tabla-cont { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--gris); padding: 8px 10px; border-bottom: 1px solid var(--linea); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid #edf0f6; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f7f9fd; }
.vacio { text-align: center; color: var(--gris2); padding: 28px 10px; }

/* --- Etiquetas de estado --- */
.etq { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.etq.verde { background: #e3f5ea; color: #157a42; }
.etq.amarillo { background: #fdf2d8; color: #9a6a00; }
.etq.rojo { background: #fbe4e4; color: #b42f2f; }
.etq.azul { background: #e2f1fc; color: #1673ad; }
.etq.gris { background: #eceff5; color: #5a6478; }
.etq.naranja { background: #ffe9df; color: #c4471a; }

/* --- Pestañas --- */
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--linea); margin-bottom: 16px; overflow-x: auto; }
.pestanas button {
  background: none; color: var(--gris); border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  padding: 10px 12px; min-height: 0;
}
.pestanas button:hover { background: none; color: var(--navy); }
.pestanas button.activa { color: var(--navy); border-bottom-color: var(--naranja); }

/* --- Agenda --- */
.agenda-cont { overflow-x: auto; }
.agenda { display: grid; gap: 4px; min-width: 760px; }
.agenda .cab { font-size: 12px; font-weight: 700; color: var(--gris); text-align: center; padding: 6px 2px; text-transform: capitalize; }
.agenda .cab.hoy { color: var(--naranja); }
.agenda .hora { font-size: 12px; color: var(--gris2); text-align: right; padding: 8px 6px 0 0; }
.turno {
  border-radius: 7px; padding: 6px 7px; font-size: 12px; line-height: 1.25; text-align: left; min-height: 44px;
  border: 1px solid transparent; cursor: pointer; display: block; width: 100%; font-weight: 500;
}
.turno b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.turno.libre { background: #fff; border-color: #d7e9dd; color: #2e7a4d; }
.turno.libre:hover { background: #eefaf3; }
.turno.pendiente { background: #fff4d9; border-color: #f0cf7c; color: #7c5600; }
.turno.confirmada { background: #dff3e7; border-color: #9ad4b0; color: #11663a; }
.turno.bloqueado { background: #eceff5; border-color: #d3d9e5; color: #4f5a70; }
.turno.pasado { background: #f6f7fa; color: #b2bacb; cursor: default; }
.turno.nada { background: transparent; cursor: default; min-height: 0; }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--gris); margin-top: 12px; }
.leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid #ccd; }
.dia-lista .turno { margin-bottom: 6px; min-height: 0; padding: 10px 12px; font-size: 14px; }

/* --- Horarios --- */
.dia-franjas { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf0f6; align-items: start; }
.dia-franjas:last-child { border-bottom: 0; }
.dia-franjas .nombre-dia { font-weight: 700; color: var(--navy); padding-top: 8px; }
.franja { display: grid; grid-template-columns: 110px 110px 150px 36px; gap: 8px; margin-bottom: 6px; align-items: center; }

/* --- Avisos, modal, toast --- */
.aviso { border-radius: var(--radio); padding: 12px 14px; margin-bottom: 16px; border: 1px solid; font-size: 14px; }
.aviso.info { background: #eaf5fd; border-color: #b8dcf5; color: #134e78; }
.aviso.ok { background: #e8f6ee; border-color: #b4dfc5; color: #155c35; }
.aviso.alerta { background: #fff5e0; border-color: #f2d595; color: #6e4c00; }
.aviso.error { background: #fdeeee; border-color: #f0c4c4; color: #8b2525; }
.aviso b { display: block; margin-bottom: 2px; }
.fondo-modal { position: fixed; inset: 0; background: rgba(10, 20, 45, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal .cab-modal { padding: 18px 20px 6px; }
.modal .cuerpo { padding: 6px 20px 10px; }
.modal .acciones { padding: 12px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 32px); }
.toast { background: var(--navy); color: #fff; padding: 11px 15px; border-radius: 10px; box-shadow: var(--sombra); font-size: 14px; max-width: 380px; }
.toast.error { background: var(--rojo); }
.toast.ok { background: var(--verde); }
.dato { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #e4e8f0; font-size: 14px; }
.dato:last-child { border-bottom: 0; }
.dato span { color: var(--gris); }
.dato b { text-align: right; }
pre.datos-pago { background: var(--fondo); border: 1px solid var(--linea); border-radius: 8px; padding: 12px; white-space: pre-wrap; font: 14px/1.5 ui-monospace, Menlo, Consolas, monospace; margin: 0 0 12px; }
.cargando { color: var(--gris); padding: 30px 0; text-align: center; }

/* --- Ingreso --- */
.ingreso { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(circle at 30% 20%, #1b3a78 0, #0e2350 55%, #081633 100%); }
.ingreso .caja { background: #fff; border-radius: 16px; width: 100%; max-width: 420px; padding: 28px 28px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.ingreso .logo { display: block; width: 84px; height: 84px; margin: 0 auto 10px; }
.ingreso h1 { text-align: center; }
.ingreso .sub { text-align: center; }
.ingreso button[type="submit"] { width: 100%; margin-top: 4px; }
.separador { display: flex; align-items: center; gap: 10px; color: var(--gris2); font-size: 13px; margin: 16px 0; }
.separador::before, .separador::after { content: ""; flex: 1; border-top: 1px solid var(--linea); }
#google-boton { display: flex; justify-content: center; min-height: 44px; }

/* --- Celular --- */
@media (max-width: 900px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app { display: block; }
  .barra-movil {
    display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 10px 14px;
    position: sticky; top: 0; z-index: 30;
  }
  .barra-movil img { width: 32px; height: 32px; }
  .barra-movil b { flex: 1; font-size: 15px; }
  .barra-movil button { background: #16306a; padding: 6px 10px; min-height: 34px; }
  .lateral { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; width: 82vw; max-width: 300px; }
  .lateral.abierto { transform: none; box-shadow: 0 0 0 100vmax rgba(10,20,45,.45); }
  .principal { padding: 18px 14px 50px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .solo-pc { display: none; }
  .solo-movil { display: block; }
  .kpis.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .franja { grid-template-columns: 1fr 1fr 1fr 32px; }
  .franja.muy-chico { margin-left: 0 !important; }
  .dia-franjas { grid-template-columns: 1fr; }
  h1 { font-size: 21px; }
}
@media print {
  .lateral, .barra-movil, button { display: none !important; }
  .principal { padding: 0; }
}
