/* =============================================================
   ESCUELA A MANSALVA – Hoja de estilos personalizada
   ============================================================= */

/* ---------- Variables de color (complementan Bootstrap) ------- */
:root {
  --ea-primary:   #2c3e50;
  --ea-accent:    #3498db;
  --ea-green:     #2ecc71;
  --ea-red:       #e74c3c;
  --ea-orange:    #e67e22;
  --ea-radius:    0.5rem;
  --ea-shadow:    0 4px 18px rgba(0,0,0,.08);
  --ea-transition:all .22s ease;
}

/* ---------- Base ----------------------------------------------- */
body {
  background: #f4f6fb;
  color: #333;
  font-size: .92rem;
}

a { text-decoration: none; }

/* ---------- Login page ------------------------------------------ */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--ea-primary) 0%, #1a252f 60%, #1abc9c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--ea-radius);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  border: none;
}

/* Campo OTP — adaptación responsive */
.code-input {
  letter-spacing: 8px;
  font-size: 1.6rem;
}

@media (max-width: 400px) {
  /* Menos margen lateral en pantallas muy pequeñas */
  body.login-page { padding: 0.5rem !important; }

  /* El card ocupa prácticamente todo el ancho */
  .login-card .card-body { padding: 1.25rem !important; }

  /* Código OTP: reducir espaciado para que quepan los 6 dígitos */
  .code-input {
    letter-spacing: 4px;
    font-size: 1.3rem;
  }
}

.login-logo {
  font-size: 2.5rem;
  color: var(--ea-accent);
}

/* ---------- Navbar --------------------------------------------- */
.navbar-brand {
  font-weight: 700;
  letter-spacing: .03em;
}

.notif-menu {
  max-height: 380px;
  overflow-y: auto;
  min-width: 320px;
}

.notif-item { transition: var(--ea-transition); }
.notif-item:hover { background: #f0f6ff !important; }
.notif-item.no-leida { border-left: 3px solid var(--ea-accent); }

/* ---------- Cards ---------------------------------------------- */
.card {
  border-radius: var(--ea-radius);
  border: none;
}

.card-shadow { box-shadow: var(--ea-shadow); }

.hover-lift {
  transition: var(--ea-transition);
  cursor: pointer;
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
}

/* ---------- Stat cards ----------------------------------------- */
.stat-card {
  border-radius: var(--ea-radius);
  padding: 1.25rem 1.5rem;
  color: #fff;
  box-shadow: var(--ea-shadow);
}
.stat-card .stat-icon { font-size: 2.4rem; opacity: .75; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: .8rem; opacity: .85; margin-top: .2rem; }

/* ---------- Tables --------------------------------------------- */
.table-sm td, .table-sm th { padding: .45rem .7rem; }
.table > :not(caption) > * > * { vertical-align: middle; }

/* ---------- Schedule grid (graficos) --------------------------- */
.schedule-wrap { overflow-x: auto; border-radius: var(--ea-radius); }

.schedule-table {
  min-width: 700px;
  border-collapse: collapse;
  font-size: .78rem;
}

.schedule-table th,
.schedule-table td {
  border: 1px solid #dee2e6;
  padding: 2px;
}

.hour-col {
  width: 58px;
  font-size: .72rem;
  color: #8898aa;
  white-space: nowrap;
  padding: 3px 6px !important;
  vertical-align: top;
  background: #f8f9fa;
}

.day-col {
  min-width: 100px;
  padding: 2px !important;
  vertical-align: top;
}

.class-block {
  border-radius: 4px;
  padding: 3px 7px;
  margin: 1px;
  font-size: .72rem;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: opacity .15s;
}
.class-block:hover { opacity: .85; }

/* ---------- Color swatches ------------------------------------- */
.color-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  vertical-align: middle;
  border: 1px solid rgba(0,0,0,.12);
}

/* ---------- Notification badge --------------------------------- */
#notif-badge {
  font-size: .62rem;
  padding: .18em .45em;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  right: 4px;
  pointer-events: none;
}

/* ---------- Alert / flash ------------------------------------- */
.alert { border-radius: var(--ea-radius); margin-bottom: 1rem; }

/* ---------- Buttons ------------------------------------------- */
.btn { border-radius: .4rem; }
.btn-sm { font-size: .8rem; }

/* ---------- Progress bar -------------------------------------- */
.progress { border-radius: 99px; }

/* ---------- Responsive ---------------------------------------- */
@media (max-width: 576px) {
  .hide-mobile { display: none !important; }
  .stat-card .stat-value { font-size: 1.5rem; }
}
