:root{
  --ink:#10233A;
  --ink-light:#1B3A5C;
  --green:#22C55E;
  --green-light:#E4F9EC;
  --cream:#F7F8FA;
  --gray:#8A94A3;
}
*{box-sizing:border-box; margin:0; padding:0;}
body{
  font-family:'Poppins',sans-serif;
  background:var(--cream);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 16px;
}
.device{
  width:390px;
  max-width:100%;
  background:#000;
  border-radius:44px;
  padding:12px;
  box-shadow:0 20px 60px rgba(16,35,58,0.25);
}
.screen{
  background:var(--cream);
  border-radius:32px;
  height:780px;
  overflow:hidden;
  position:relative;
  display:flex;
  flex-direction:column;
}
.view{
  flex:1;
  overflow-y:auto;
  display:none;
  flex-direction:column;
  padding:24px 20px 20px;
}
.view.active{display:flex;}

/* ---- Header comun ---- */
.app-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 0 16px;
}
.app-header h1{font-size:18px; font-weight:600; color:var(--ink);}
.app-header .sub{font-size:12px; color:var(--gray); font-weight:400; margin-top:2px;}
.chip-salir{
  background:var(--green-light); color:var(--green);
  padding:6px 14px; border-radius:20px; font-size:12px; font-weight:700;
  cursor:pointer;
}

/* ---- Hero / login ---- */
.hero{
  background:var(--ink);
  border-radius:24px;
  padding:24px 20px;
  color:#fff;
  margin-bottom:20px;
}
.hero h2{font-size:22px; font-weight:700; margin-bottom:6px;}
.hero p{font-size:13px; color:#B9C6D6; font-weight:400; line-height:1.5;}
.section-label{font-size:13.5px; font-weight:700; color:var(--gray); text-transform:uppercase; letter-spacing:.5px; margin:14px 0 8px;}
.input-numero{
  width:100%; font-size:14px; font-weight:500; color:var(--ink);
  border:1.5px solid #E1E5EA; border-radius:14px; padding:14px; margin-bottom:10px;
  font-family:'Poppins',sans-serif;
}
.btn-primary{
  background:var(--green); color:#fff; border:none;
  padding:16px; border-radius:16px; font-size:15px; font-weight:600;
  font-family:'Poppins',sans-serif; cursor:pointer; width:100%;
}
.btn-primary:disabled{background:#D9DEE6; color:#9AA3B0; cursor:not-allowed;}
.btn-ghost{
  background:none; border:1.5px solid var(--ink); color:var(--ink);
  padding:12px; border-radius:14px; font-size:13px; font-weight:600;
  font-family:'Poppins',sans-serif; cursor:pointer; width:100%; margin-top:10px;
}
.link-chico{
  text-align:center; font-size:13.5px; color:var(--gray); text-decoration:underline;
  cursor:pointer; margin-top:14px;
}
.link-chico-header{text-decoration:underline; cursor:pointer;}
.pin-error{color:#D34C3D; font-size:13px; text-align:center; margin-top:8px; min-height:16px;}
.textarea{min-height:80px; resize:vertical; line-height:1.4;}
.nota-vacia{color:var(--gray); font-size:14px; text-align:center; margin-top:24px;}

/* ---- Nav inferior ---- */
.tabbar{
  display:flex; justify-content:space-around; padding:12px 0;
  border-top:1px solid #E1E5EA; background:#fff; flex-shrink:0;
}
.tab{
  font-size:13px; color:var(--gray); font-weight:600; cursor:pointer;
  background:none; border:none; font-family:'Poppins',sans-serif;
  padding:6px 18px; border-radius:10px;
}
.tab.active{color:var(--green); background:var(--green-light);}

/* ---- Alumnos ---- */
.alumno-item{
  background:#fff; border:1px solid #E1E5EA; border-radius:16px; padding:14px;
  display:flex; gap:12px; align-items:center; margin-bottom:10px; cursor:pointer;
}
.alumno-item:hover{border-color:var(--green);}
.alumno-item-avatar{
  width:40px; height:40px; border-radius:50%; background:var(--ink);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700; flex-shrink:0;
}
.alumno-item-info h3{font-size:14px; font-weight:600; color:var(--ink); margin-bottom:2px;}
.alumno-item-info p{font-size:12px; color:var(--gray);}

/* ---- Ficha de alumno: horarios ---- */
.horario-row{display:flex; gap:8px; align-items:center; margin-bottom:10px; flex-wrap:wrap;}
.btn-quitar{
  background:#FCECEA; color:#D34C3D; border:none; border-radius:10px;
  width:38px; height:38px; font-size:14px; cursor:pointer; flex-shrink:0;
}

/* ---- Agenda del día ---- */
.dia-selector{
  display:flex; align-items:center; justify-content:space-between;
  background:var(--ink); border-radius:20px; padding:14px 16px; margin-bottom:16px;
}
.dia-selector-texto{text-align:center; flex:1;}
.dia-selector-texto h3{font-size:16px; font-weight:700; color:#fff;}
.dia-selector-texto p{font-size:11px; color:#B9C6D6; margin-top:2px;}
.dia-selector-texto .link-chico{color:#B9C6D6; margin-top:2px;}
.btn-flecha{
  background:rgba(255,255,255,0.12); border:none; color:#fff;
  width:34px; height:34px; border-radius:10px; font-size:18px; cursor:pointer; flex-shrink:0;
}
.clase-item{
  background:#fff; border:1px solid #E1E5EA; border-radius:14px 14px 0 0;
  padding:12px 14px; display:flex; gap:12px; align-items:center; border-bottom:none;
}
.clase-item-hora{font-size:13px; font-weight:700; color:var(--ink); width:48px; flex-shrink:0;}
.clase-item-info{flex:1; min-width:0;}
.clase-item-info h3{font-size:14px; font-weight:600; color:var(--ink);}
.clase-item-info p{font-size:11px; color:var(--gray); margin-top:1px;}
.estado-chip{font-size:10px; font-weight:700; padding:4px 10px; border-radius:999px; flex-shrink:0; white-space:nowrap;}
.estado-chip.estado-pendiente{background:#EEF1F5; color:var(--gray);}
.estado-chip.estado-confirmada{background:var(--green-light); color:var(--green);}
.estado-chip.estado-cancelada{background:#FCECEA; color:#D34C3D;}
.estado-chip.estado-ausente{background:#FDEBDA; color:#C97A1E;}
.estado-chip.estado-recuperada{background:#E7ECFB; color:#3B5BDB;}
.clase-acciones{
  display:flex; gap:6px; background:#fff; border:1px solid #E1E5EA; border-top:1px dashed #E1E5EA;
  border-radius:0 0 14px 14px; padding:10px 14px 12px; margin-bottom:10px; flex-wrap:wrap;
}
.btn-mini{
  background:#F1F3F6; color:var(--ink); border:none; border-radius:10px;
  padding:10px 14px; font-size:13.5px; font-weight:700; cursor:pointer;
  font-family:'Poppins',sans-serif;
}
.btn-mini-confirmar{background:var(--green-light); color:var(--green);}
.btn-mini-cancelar{background:#FCECEA; color:#D34C3D;}

/* ---- Checkbox ---- */
.check-row{
  display:flex; align-items:flex-start; gap:10px; margin:4px 0 14px;
  font-size:12.5px; color:var(--ink); cursor:pointer; line-height:1.4;
}
.check-row input{margin-top:3px; flex-shrink:0; width:16px; height:16px;}
.badge-extra{
  display:inline-block; background:var(--green-light); color:var(--green);
  font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.3px;
  padding:2px 7px; border-radius:999px; margin-left:6px; vertical-align:middle;
}

/* ---- Cupo libre ---- */
.motivo-cancelacion{
  background:#FFF7E6; border:1px dashed #E8A93B; border-bottom:none;
  border-radius:14px 14px 0 0; padding:8px 14px 4px;
  font-size:12px; color:#8A5E12; font-style:italic; line-height:1.4;
}
.cupo-libre-banner{
  background:#FFF7E6; border:1px dashed #E8A93B; border-top:none;
  border-radius:0 0 14px 14px; padding:10px 14px; margin-bottom:10px;
  display:flex; justify-content:space-between; align-items:center;
  font-size:12px; font-weight:600; color:#8A5E12; cursor:pointer;
}
.cupo-candidatos{
  background:#fff; border:1px solid #E1E5EA; border-radius:14px;
  padding:10px 12px; margin:-4px 0 10px;
}
.candidato-item{
  display:flex; flex-direction:column; gap:6px;
  padding:8px 0; border-bottom:1px solid #F1F3F6;
}
.candidato-item:last-child{border-bottom:none;}
.candidato-item > span{font-size:13px; font-weight:600; color:var(--ink);}
.candidato-acciones{display:flex; gap:6px; flex-wrap:wrap;}

/* ---- Mini calendario del mes ---- */
.calendario-mes{
  background:#fff; border:1px solid #E1E5EA; border-radius:16px;
  padding:12px; margin-bottom:12px;
}
.calendario-mes-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px;}
.calendario-mes-header h4{font-size:13px; font-weight:700; color:var(--ink); text-transform:capitalize;}
.btn-flecha-chica{width:26px; height:26px; font-size:14px; background:var(--cream); color:var(--ink);}
.calendario-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:2px;}
.calendario-dia-nombre{text-align:center; font-size:10px; font-weight:700; color:var(--gray); padding-bottom:4px;}
.calendario-celda{
  aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  border-radius:8px; cursor:pointer; font-size:12px; font-weight:600; color:var(--ink); gap:2px;
}
.calendario-celda:hover{background:var(--cream);}
.calendario-celda-vacia{cursor:default;}
.calendario-celda-hoy{border:1.5px solid var(--green);}
.calendario-celda-seleccionada{background:var(--green); color:#fff;}
.calendario-punto{width:4px; height:4px; border-radius:50%; background:var(--green);}
.calendario-celda-seleccionada .calendario-punto{background:#fff;}

/* ---- Recordatorio con nota personal ---- */
.recordatorio-panel{
  background:#fff; border:1px solid #E1E5EA; border-radius:14px;
  padding:12px; margin:-4px 0 10px;
}
.recordatorio-ayuda{font-size:11px; color:var(--gray); line-height:1.4; margin-bottom:8px;}

/* ---- Cobros ---- */
.resumen-cobros{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:16px;}
.resumen-item{
  background:#fff; border:1px solid #E1E5EA; border-radius:16px; padding:16px;
  display:flex; flex-direction:column; align-items:center; gap:2px;
}
.resumen-num{font-size:20px; font-weight:800; color:var(--green);}
.resumen-item span:last-child{font-size:11px; color:var(--gray); font-weight:600; text-transform:uppercase;}
.pago-item{
  background:#fff; border:1px solid #E1E5EA; border-radius:14px; padding:12px 14px;
  display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;
}
.pago-item-info h3{font-size:13px; font-weight:600; color:var(--ink);}
.pago-item-info p{font-size:11px; color:var(--gray); margin-top:1px;}
.pago-item-monto{font-size:14px; font-weight:700; color:var(--green);}

/* ---- Modal de cobro rápido ---- */
.modal{
  display:none; position:absolute; inset:0; background:rgba(16,35,58,0.55);
  align-items:center; justify-content:center; padding:20px; z-index:30;
}
.modal.visible{display:flex;}
.modal-box{background:#fff; border-radius:20px; padding:20px; width:100%;}
.modal-box h3{font-size:16px; font-weight:700; color:var(--ink); margin-bottom:12px;}
.medios-grid{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:4px;}
.btn-medio{
  background:var(--green-light); color:var(--green); border:none; border-radius:12px;
  padding:12px 6px; font-size:12px; font-weight:700; cursor:pointer;
  font-family:'Poppins',sans-serif;
}

/* ---- Toast ---- */
.toast{
  position:absolute; top:20px; left:20px; right:20px;
  background:var(--ink); color:#fff; padding:14px 16px; border-radius:14px;
  font-size:13px; font-weight:600; text-align:center;
  opacity:0; transform:translateY(-10px); transition:.25s;
  pointer-events:none; box-shadow:0 8px 24px rgba(16,35,58,0.35); z-index:40;
}
.toast.show{opacity:1; transform:translateY(0);}

/* ---- Ligas y Torneos ---- */
.categoria-chips{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px;}
.chip-categoria{
  background:#F1F3F6; color:var(--ink); font-size:13.5px; font-weight:700;
  padding:9px 15px; border-radius:999px; cursor:pointer;
}
.chip-categoria-activa{background:var(--ink); color:#fff;}
.chip-categoria-nueva{background:var(--green-light); color:var(--green);}
.pareja-item{
  background:#fff; border:1px solid #E1E5EA; border-radius:12px; padding:12px 14px;
  display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;
  font-size:14.5px; font-weight:600; color:var(--ink); cursor:pointer;
}
.evento-item{
  background:#fff; border:1px solid #E1E5EA; border-left:5px solid var(--gray); border-radius:14px; padding:14px 16px;
  display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; cursor:pointer;
  font-size:15.5px; font-weight:700; color:var(--ink);
}
.evento-item-liga{border-left-color:var(--green);}
.evento-item-liga:hover{border-color:var(--green); border-left-color:var(--green);}
.evento-item-torneo{border-left-color:#3B5BDB;}
.evento-item-torneo:hover{border-color:#3B5BDB; border-left-color:#3B5BDB;}

.jornada-card, .grupo-card{
  background:#fff; border:1px solid #E1E5EA; border-radius:16px; padding:14px; margin-bottom:12px;
}
.jornada-header{display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;}
.jornada-card h4, .grupo-card h4{font-size:13px; font-weight:700; color:var(--ink);}
.input-fecha{
  font-size:12px; font-weight:600; color:var(--ink); border:1.5px solid #E1E5EA;
  border-radius:10px; padding:6px 8px; font-family:'Poppins',sans-serif;
}
.partido-item{padding:10px 0; border-bottom:1px solid #F1F3F6;}
.partido-item:last-child{border-bottom:none;}
.partido-parejas{display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--ink); flex-wrap:wrap;}
.partido-vs{font-size:10px; color:var(--gray); font-weight:700;}
.partido-numero{font-size:10.5px; color:var(--gray); font-weight:700; text-transform:uppercase; letter-spacing:.3px; margin-bottom:2px;}
.partido-ganador{color:var(--green);}
.partido-resultado-texto{font-size:11.5px; color:var(--gray); margin-top:3px;}
.resultado-form{margin-top:8px;}

.tabla-posiciones{
  background:#fff; border:1px solid #E1E5EA; border-radius:14px; padding:10px 12px; margin-bottom:12px;
}
.tabla-header, .tabla-fila{
  display:grid; grid-template-columns:2fr 0.6fr 0.6fr 0.6fr 0.6fr; gap:4px; align-items:center;
  padding:6px 0; font-size:11.5px;
}
.tabla-header{color:var(--gray); font-weight:700; text-transform:uppercase; border-bottom:1px solid #F1F3F6;}
.tabla-fila{color:var(--ink); font-weight:600; border-bottom:1px solid #F1F3F6;}
.tabla-fila:last-child{border-bottom:none;}
.tabla-fila-primero{color:var(--green);}
.tabla-wo{
  display:inline-block; background:#FCECEA; color:#D34C3D; font-size:9.5px; font-weight:700;
  padding:2px 6px; border-radius:999px; vertical-align:middle;
}
.tabla-fila span:not(:first-child), .tabla-header span:not(:first-child){text-align:center;}

.zona-armada-card{
  background:#F7F8FA; border:1px solid #E1E5EA; border-radius:14px; padding:10px 12px; margin-bottom:10px;
}
.zona-armada-header{display:flex; justify-content:space-between; align-items:center; margin-bottom:2px;}
.zona-armada-header h4{font-size:12.5px; font-weight:700; color:var(--ink);}
.zona-pareja-row{
  display:flex; justify-content:space-between; align-items:center; gap:8px;
  padding:6px 0; font-size:12.5px; font-weight:600; color:var(--ink);
  border-bottom:1px solid #F1F3F6;
}
.zona-pareja-row:last-child{border-bottom:none;}
.cancha-svg-wrap{
  background:#fff; border:1px solid #E1E5EA; border-radius:14px; padding:8px; margin:4px 0 8px;
}
.reglamento-texto{
  background:#fff; border:1px solid #E1E5EA; border-radius:14px; padding:12px 14px;
  font-size:12.5px; color:var(--ink); line-height:1.6; white-space:pre-wrap; margin-bottom:8px;
}
.campeon-banner{
  background:var(--ink); color:#fff; border-radius:16px; padding:16px;
  text-align:center; font-size:15px; font-weight:700; margin-bottom:14px;
}

/* ---- Página pública de confirmación (c.html) ---- */
.confirmar-card{
  width:100%; max-width:380px; background:#fff; border-radius:24px;
  padding:32px 24px; box-shadow:0 20px 60px rgba(16,35,58,0.15); text-align:center;
}
.confirmar-logo{font-size:40px; margin-bottom:8px;}
.confirmar-titulo{font-size:19px; font-weight:700; color:var(--ink); margin-bottom:10px;}
.confirmar-texto{font-size:14px; color:var(--gray); line-height:1.6; margin-bottom:20px;}
.confirmar-texto strong{color:var(--ink);}
