@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

* {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background-image:
    linear-gradient(rgba(231,231,231,0.85), rgba(231,231,231,0.85)),
    url("https://images.unsplash.com/photo-1743456110628-6508997cf730?fm=jpg&q=60&w=1600&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #383737;
}

.hidden {
  display: none !important;
}

/* LOGIN — SPLIT SCREEN */
#login-screen {
  height: 100vh;
  overflow: hidden;
}

.login-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  height: 100%;
}

.login-photo {
  background-image: url("https://images.unsplash.com/photo-1743456110628-6508997cf730?fm=jpg&q=75&w=1600&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
}

.login-panel {
  background: #14171a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}

.login-panel-inner {
  width: 100%;
  max-width: 320px;
}

.wordmark {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  color: #0DB496;
  margin-bottom: 2.8rem;
}

.login-panel-inner h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 2.1rem;
  color: white;
  margin: 0 0 0.4rem;
}

.login-subtitle {
  color: #9a9a9a;
  font-size: 0.95rem;
  margin: 0 0 2.2rem;
}

.login-panel-inner input {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #3a3f3d;
  color: white;
  padding: 0.7rem 0.1rem;
  font-size: 1rem;
  margin-bottom: 1.4rem;
  border-radius: 0;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 2rem;
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 0.55rem;
  background: none;
  border: none;
  padding: 0;
  color: #767b79;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.toggle-password:hover {
  color: #0DB496;
}

.login-panel-inner input::placeholder {
  color: #767b79;
}

.login-panel-inner input:focus {
  outline: none;
  border-bottom-color: #0DB496;
}

.login-panel-inner button {
  width: 100%;
  padding: 0.85rem;
  background: #0DB496;
  color: #0e1210;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.4rem;
}

.login-panel-inner button:hover {
  background: #14c9a5;
}

/* El botón del ojo NO debe heredar el estilo de botón grande de arriba */
.login-panel-inner .toggle-password,
.login-panel-inner .toggle-password:hover {
  position: absolute;
  right: 0;
  top: 0.55rem;
  width: auto;
  margin-top: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  color: #767b79;
}

.login-panel-inner .toggle-password:hover {
  color: #0DB496;
}

.error {
  color: #ff7a68;
  font-size: 0.85rem;
  margin-top: 0.8rem;
}

.link-btn {
  background: none;
  border: none;
  color: #9aa19e;
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin-top: 0.6rem;
  display: block;
}

.link-btn:hover {
  color: #0DB496;
}

#registro-form {
  margin-top: 0.5rem;
}

/* CUENTA PENDIENTE */
#pendiente-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #14171a;
  padding: 1.5rem;
}

.pendiente-box {
  max-width: 380px;
  text-align: center;
}

.pendiente-box h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  color: white;
  font-size: 1.8rem;
  margin: 1.5rem 0 0.8rem;
}

.pendiente-box p {
  color: #b7bcba;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.8rem;
}

.pendiente-box button {
  background: rgba(255,255,255,0.08);
  color: #e7e7e7;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .login-split {
    grid-template-columns: 1fr;
    grid-template-rows: 34vh 1fr;
  }
  .login-panel {
    padding: 2rem 1.5rem;
  }
}

/* APP */
header {
  background: #14171a;
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #0DB496;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.header-logo {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
}

header button {
  background: rgba(255,255,255,0.08);
  color: #e7e7e7;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

header h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 0;
  font-size: 1.4rem;
}

main {
  padding: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

#form-alumno {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

#form-alumno input {
  flex: 1 1 150px;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#form-alumno button {
  padding: 0.6rem 1rem;
  background: #0DB496;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#form-alumno button.secondary {
  background: #999;
}

#lista-alumnos {
  list-style: none;
  padding: 0;
  margin: 0;
}

.alumno-item {
  background: white;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.alumno-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.alumno-info .nivel {
  font-size: 0.8rem;
  color: #777;
}

.alumno-acciones button {
  border: none;
  background: none;
  color: #0DB496;
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.alumno-acciones button[data-action="baja"] {
  color: #c0392b;
}

/* TABS */
#tabs {
  display: flex;
  background: #1c2023;
  border-bottom: none;
  padding: 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  border: none;
  background: none;
  padding: 0.9rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  color: #9aa19e;
  border-bottom: 3px solid transparent;
  flex: 0 0 auto;
  white-space: nowrap;
}

.tab-btn.active {
  color: #0DB496;
  border-bottom-color: #0DB496;
  font-weight: 600;
}

/* CUOTAS */
#generador-cuotas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

#label-mes-actual {
  font-weight: 600;
  color: #0DB496;
  flex: 1 1 100%;
}

#generador-cuotas input {
  flex: 1 1 150px;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#generador-cuotas button {
  padding: 0.6rem 1rem;
  background: #0DB496;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#lista-cuotas {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cuota-item {
  background: white;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border-left: 4px solid transparent;
}

.cuota-item.cuota-pagado { border-left-color: #0DB496; }
.cuota-item.cuota-pendiente { border-left-color: #e0a800; }
.cuota-item.cuota-vencido { border-left-color: #c0392b; }

.cuota-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cuota-info span {
  font-size: 0.85rem;
  color: #777;
}

.cuota-acciones {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: capitalize;
  color: white;
}

.badge-pagado { background: #0DB496; }
.badge-pendiente { background: #e0a800; }
.badge-vencido { background: #c0392b; }

.cuota-acciones button {
  border: none;
  background: none;
  color: #0DB496;
  cursor: pointer;
  font-size: 0.85rem;
}

/* GRILLA DE TURNOS */
#grid-turnos {
  display: grid;
  gap: 2px;
  background: #ddd;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.75rem;
}

.grid-header {
  background: #0DB496;
  color: white;
  padding: 0.5rem 0.3rem;
  text-align: center;
  font-weight: 600;
}

.grid-hora {
  background: #eef1ef;
  padding: 0.5rem 0.3rem;
  text-align: center;
  font-weight: 600;
  color: #555;
}

.grid-celda {
  background: white;
  min-height: 40px;
  padding: 0.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.grid-celda:hover {
  background: #f0f7f2;
}

.grid-celda.ocupada {
  background: #d9f0e1;
}

.turno-nombres {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.turno-alumno {
  font-size: 0.68rem;
  line-height: 1.15;
  color: #0a8a75;
  font-weight: 600;
  background: rgba(13,180,150,0.12);
  border-radius: 4px;
  padding: 2px 5px;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  width: 90%;
  max-width: 360px;
}

.modal-box h3 {
  margin-top: 0;
  color: #0DB496;
}

.modal-label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

#modal-tipo-turno {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#modal-lista-alumnos {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 0.5rem;
}

.checkbox-alumno {
  display: block;
  padding: 0.3rem 0;
  font-size: 0.9rem;
}

.hint-modal {
  font-size: 0.8rem;
  color: #888;
  margin: 0.3rem 0;
}

.modal-acciones {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.modal-acciones button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #0DB496;
  color: white;
}

.modal-acciones button.secondary {
  background: #999;
}

.modal-acciones button.danger {
  background: #c0392b;
  margin-right: auto;
}

/* DASHBOARD */
#dash-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.dash-card {
  background: white;
  padding: 1.2rem 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #0DB496;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  min-width: 160px;
  flex: 1 1 160px;
}

.dash-card.alert {
  border-left-color: #e0a800;
}

.dash-card.alert .dash-numero {
  color: #b8860b;
}

.dash-numero {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #0DB496;
}

.dash-label {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.2rem;
}

.dash-sublabel {
  font-size: 0.8rem;
  color: #c0392b;
  font-weight: 600;
  margin-top: 0.2rem;
}

.dash-titulo-seccion {
  color: #0DB496;
  margin-bottom: 0.5rem;
}

#dash-turnos-hoy {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dash-turno-item {
  background: white;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.dash-turno-hora {
  font-weight: 700;
  color: #0DB496;
  min-width: 50px;
}

.dash-turno-nombres {
  flex: 1;
  font-size: 0.9rem;
}

/* BANNERS DE FOTO POR PESTAÑA */
.tab-banner {
  width: 100%;
  height: 130px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.tab-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,23,26,0.45), transparent 65%);
}

.tab-banner-dashboard {
  background-image: url("https://images.unsplash.com/photo-1673266893877-f31c1583aad3?fm=jpg&q=70&w=1200&auto=format&fit=crop");
}

.tab-banner-alumnos {
  background-image: url("https://images.unsplash.com/photo-1613870930431-a09c7139eb33?fm=jpg&q=70&w=1200&auto=format&fit=crop");
}

.tab-banner-cuotas {
  background-image: url("https://images.unsplash.com/photo-1657704227277-04e8accd079e?fm=jpg&q=70&w=1200&auto=format&fit=crop");
}

.tab-banner-turnos {
  background-image: url("https://images.unsplash.com/photo-1658491830143-72808ca237e3?fm=jpg&q=70&w=1200&auto=format&fit=crop");
}

/* PERFIL */
#perfil-card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  max-width: 380px;
}

#perfil-logo-preview {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  background: #E7E7E7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1rem;
}

#perfil-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#perfil-logo-placeholder {
  font-size: 0.75rem;
  color: #888;
}

#perfil-card input[type="file"] {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

#perfil-card input[type="text"] {
  display: block;
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1.2rem;
}

#perfil-card button {
  padding: 0.6rem 1.2rem;
  background: #0DB496;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#perfil-mensaje {
  font-size: 0.85rem;
  margin-top: 0.6rem;
}

#perfil-mensaje.error {
  color: #c0392b;
}

#perfil-mensaje.exito {
  color: #0DB496;
}

/* AJUSTES MOBILE */
@media (max-width: 480px) {
  header {
    padding: 0.8rem 1rem;
  }

  header h1 {
    font-size: 1.15rem;
  }

  .header-logo {
    width: 28px;
    height: 28px;
  }

  header button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .tab-btn {
    padding: 0.8rem 0.9rem;
    font-size: 0.88rem;
  }
}
