/* =========================================================
   style.css — Banda de Música · Colegio Maranata
   Identidad MBM: violeta profundo · magenta · crema
   ========================================================= */

:root {
  /* Identidad MBM: carbón, magenta del emblema y acentos dorados. */
  --navy: #29242b;
  --navy-2: #482b3d;
  --navy-3: #3a3038;
  --gold: #795712;
  --gold-2: #bd3d68;
  --gold-d: #865c18;
  --cream: #f1d486;
  --cream-soft: #fbf3e2;
  --white: #ffffff;
  --bg: #faf9f6;
  --bg-2: #f2ecef;
  --text: #29252a;
  --muted: #69616a;
  --border: #e1dade;
  --green: #287A56;
  --red: #B4234E;
  --amber: #A5600F;
  --success-bg: #ECF8F0;
  --danger-bg: #FFF0F3;
  --warning-bg: #FFF6E6;
  --violet-night: #452b3e;
  --shadow: 0 14px 34px rgb(41 36 43 / 12%);
  --logo-sm-size: 52px;
  --logo-md-size: 78px;
  --logo-xl-size: 180px;
  --r: 10px;
  --serif: Georgia, 'Times New Roman', serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--text); }

/* ---------- Utilidades ---------- */
.d-none { display: none !important; }

.container { width: min(1120px, 92%); margin-inline: auto; }

.site-logo { width: 40px; height: 40px; color: var(--gold); flex: none; object-fit: contain; object-position: center; }
.logo-sm { width: var(--logo-sm-size); height: var(--logo-sm-size); }
.logo-md { width: var(--logo-md-size); height: var(--logo-md-size); }
.logo-xl { width: var(--logo-xl-size); height: var(--logo-xl-size); }

.screen { min-height: 100vh; }
.screen.fade-panel { animation: fadeUp .45s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  padding: .72rem 1.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, box-shadow .2s, transform .15s ease;
}
.btn-lg { padding: .95rem 2.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-2); box-shadow: 0 8px 18px rgba(33, 16, 111, .28); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-2); box-shadow: 0 8px 18px rgba(224, 0, 104, .28); }
.btn-save { background: var(--navy-3); color: var(--white); }
.btn-save:hover { background: var(--navy); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--navy); background: var(--cream-soft); }
.btn-outline-white {
  background: transparent;
  border: 1px solid var(--gold-2);
  color: var(--white);
}
.btn-outline-white:hover { background: rgba(242, 10, 120, .18); box-shadow: none; }
.btn-small { padding: .5rem 1rem; font-size: .82rem; }

.link-like {
  background: none; border: none; color: var(--navy);
  cursor: pointer; font-size: .88rem; text-decoration: underline;
  text-underline-offset: 3px;
}
.link-like:hover { color: var(--gold-d); }

/* ---------- Cabeceras de sección ---------- */
.page-body { padding: 54px 0 84px; }

.page-head { max-width: 720px; margin: 0 auto 42px; text-align: center; }

.overline {
  display: inline-block;
  color: var(--gold-d);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 10px;
  position: relative;
}
.overline::before, .overline::after {
  content: "";
  display: inline-block; width: 26px; height: 1px;
  background: var(--gold); vertical-align: middle; margin: 0 10px;
}

.page-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: .01em;
}

.page-sub { color: var(--muted); font-size: .98rem; margin-top: 10px; }

.micro-note { text-align: center; color: var(--muted); font-size: .84rem; margin-top: 26px; }

/* ---------- Barra superior de contexto (pantallas 2 y 3) ---------- */
.topbar { background: var(--white); border-bottom: 1px solid var(--border); }
.topbar-in {
  min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; color: var(--navy); }
.tb-name { font-family: var(--serif); font-weight: 700; line-height: 1.05; font-size: 1rem; }
.tb-school { display: block; font-size: .62rem; letter-spacing: .18em; color: var(--gold-d); text-transform: uppercase; font-weight: 700; }
.tb-role { color: var(--muted); font-size: .82rem; letter-spacing: .04em; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 7px; color: var(--navy);
}
.field input {
  width: 100%; padding: .8rem .95rem;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--white); transition: border-color .2s, box-shadow .2s;
}
.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(224, 0, 104, .16);
}
.field input::placeholder { color: var(--muted); }

.form-error { min-height: 1.3em; color: var(--red); font-size: .84rem; font-weight: 600; margin: 2px 0 10px; }

/* ---------- Pantalla 1 · Intro ---------- */
.screen-intro {
  position: relative;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(242, 10, 120, .28), transparent 60%),
    linear-gradient(158deg, var(--navy-2) 0%, var(--navy) 58%, var(--violet-night) 100%);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 48px 22px 92px;
  overflow: hidden;
}
.screen-intro::before {
  content: "";
  position: absolute; inset: 16px;
  border: 1px solid rgba(242, 10, 120, .42);
  pointer-events: none;
}
.screen-intro::after {
  content: "";
  position: absolute; inset: 22px;
  border: 1px solid rgba(255, 240, 210, .18);
  pointer-events: none;
}

.intro-inner { position: relative; z-index: 2; max-width: 720px; }
.intro-inner .site-logo { margin: 0 auto 26px; color: var(--gold); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }

.intro-overline {
  font-size: .78rem; font-weight: 800;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--cream);
}
.intro-title {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vw, 3.8rem);
  line-height: 1.08; font-weight: 700; margin-top: 10px; color: var(--white);
}
.intro-school { margin-top: 10px; color: rgba(255, 240, 210, .82); font-size: .98rem; }

.intro-rule { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 22px auto; max-width: 320px; }
.intro-rule::before, .intro-rule::after { content: ""; height: 1px; flex: 1; background: rgba(255, 240, 210, .62); }
.intro-rule span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-2); }

.intro-text { color: rgba(255, 240, 210, .86); font-size: 1.02rem; line-height: 1.75; max-width: 560px; margin: 0 auto; }

.intro-inner .btn { margin-top: 34px; }

.intro-note { margin-top: 20px; font-size: .8rem; color: rgba(255, 240, 210, .64); letter-spacing: .03em; }

.intro-copy {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
  font-size: .74rem; color: rgba(255, 240, 210, .54); letter-spacing: .05em;
}

/* ---------- PANTALLA 2 · Grid de secciones ---------- */
.grid-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 22px;
  max-width: 1080px; margin-inline: auto;
}
.icon-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 30px 20px 24px;
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.icon-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
.ic-badge {
  width: 66px; height: 66px; margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--cream-soft);
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  display: grid; place-items: center;
  transition: background .2s, color .2s;
}
.icon-card:hover .ic-badge { background: var(--navy); color: var(--cream); }
.ic-name { font-weight: 800; color: var(--navy); letter-spacing: .02em; font-size: 1rem; }
.ic-desc { color: var(--muted); font-size: .84rem; line-height: 1.5; margin-top: 6px; }
.ic-action { margin-top: 14px; color: var(--gold-d); font-size: .82rem; font-weight: 800; letter-spacing: .04em; }
.icon-card:hover .ic-action { color: var(--gold-d); }

/* ---------- PANTALLA 3 · Login ---------- */
.screen-login { background: var(--bg); }
.login-shell { min-height: calc(100vh - 65px); display: flex; align-items: center; padding: 48px 18px; }

.login-card {
  width: min(440px, 100%); margin: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 5px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(33, 16, 111, .14);
  padding: 34px 34px 28px;
}
.login-card-head { text-align: center; margin-bottom: 22px; }
.login-card-head .site-logo { margin: 0 auto 14px; }
.login-title { font-family: var(--serif); font-size: 1.5rem; color: var(--navy); font-weight: 700; }
.login-sub { color: var(--muted); font-size: .88rem; margin-top: 4px; }

.login-sect {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold-d);
  font-size: .76rem;
  font-weight: 700;
  background: var(--cream-soft);
}

.demo-box {
  margin-top: 22px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px 16px;
  text-align: center;
}
.demo-title { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.demo-chip {
  display: block; width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: .86rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.demo-chip b { color: var(--navy); font-weight: 800; }
.demo-chip:hover { border-color: var(--gold); background: var(--cream-soft); }

.login-back { text-align: center; margin-top: 18px; }

/* ---------- PANTALLA 4 · Cabecera fija ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 60;
  background: var(--navy);
  border-bottom: 3px solid var(--gold-2);
  box-shadow: 0 6px 18px rgba(33, 16, 111, .28);
}
.nav-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand-name { font-family: var(--serif); font-weight: 700; line-height: 1.05; font-size: 1.02rem; color: var(--white); }
.brand-school { display: block; font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cream); font-weight: 700; }
.brand .site-logo { color: var(--gold-2); }

.nav-links { display: flex; align-items: center; list-style: none; gap: 4px; }
.nav-link {
  display: inline-block;
  padding: .58rem .82rem;
  color: rgba(255, 240, 210, .9);
  text-decoration: none;
  font-size: .84rem; font-weight: 600; letter-spacing: .03em;
  position: relative;
  transition: color .2s;
}
.nav-link::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .2rem;
  height: 2px; background: var(--gold-2); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--cream); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }

/* Dropdown de secciones */
.has-drop { position: relative; }
.nav-drop-trigger {
  background: none; border: none;
  color: rgba(255, 240, 210, .9);
  font-size: .84rem; font-weight: 600; letter-spacing: .03em;
  padding: .58rem .82rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color .2s;
}
.nav-drop-trigger:hover { color: var(--cream); }
.caret { display: inline-block; font-size: .62rem; transition: transform .2s; }
.has-drop:hover .caret, .has-drop.open .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 3px); left: 0;
  min-width: 218px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold-2);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 18px 40px rgba(33, 16, 111, .24);
  padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 80;
}
.has-drop:hover .dropdown, .has-drop.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown-item {
  display: block; width: 100%; text-align: left;
  padding: .66rem .9rem;
  background: none; border: none; border-radius: 7px;
  color: var(--text); font-size: .88rem; font-family: inherit; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.dropdown-item:hover { background: var(--cream-soft); color: var(--navy); }

/* Acciones derecha */
.nav-actions { display: flex; align-items: center; gap: 12px; }
.user-pill { text-align: right; line-height: 1.2; color: var(--white); border-right: 1px solid rgba(255, 240, 210, .5); padding-right: 14px; }
.u-name { display: block; font-size: .82rem; font-weight: 700; }
.u-role { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; }

.btn-logout {
  background: transparent;
  border: 1px solid rgba(255, 240, 210, .48);
  color: var(--cream);
  padding: .52rem .95rem;
  border-radius: 6px;
  font-size: .76rem; font-weight: 700; letter-spacing: .03em;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-logout:hover { border-color: var(--gold-2); color: var(--cream); background: rgba(242, 10, 120, .16); }

.nav-toggle {
  display: none;
  width: 44px; height: 42px;
  background: rgba(255, 240, 210, .08);
  border: 1px solid rgba(255, 240, 210, .4);
  border-radius: 6px;
  color: var(--cream); font-size: 1.25rem;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--gold-2); }

/* Menú móvil */
.mobile-nav { display: none; background: var(--navy-2); border-top: 1px solid rgba(242, 10, 120, .42); }
.mobile-nav.open { display: block; animation: fadeUp .25s ease both; }
.m-link {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: .8rem 1.1rem;
  color: rgba(255, 240, 210, .92);
  text-decoration: none; background: none; border: none;
  font-size: .92rem; font-weight: 600; cursor: pointer;
  border-bottom: 1px solid rgba(255, 240, 210, .1);
}
.m-link:hover { color: var(--cream); }
.m-sub { display: none; }
.m-sub.open { display: block; }
.m-sub-item {
  display: block; width: 100%; text-align: left;
  padding: .7rem 2rem;
  background: rgba(13, 5, 53, .22); border: none; border-bottom: 1px solid rgba(255, 240, 210, .1);
  color: rgba(255, 240, 210, .86); font-size: .88rem; font-family: inherit; text-decoration: none; cursor: pointer;
}
.m-sub-item:hover { color: var(--cream); }

/* ---------- CARROUSEL DE HÉROE ---------- */
.hero {
  position: relative;
  height: clamp(360px, 54vh, 470px);
  background: linear-gradient(135deg, var(--navy-2) 0%, var(--navy-3) 55%, var(--navy) 100%);
  overflow: hidden;
  color: var(--white);
}
.hero::before {
  content: "";
  position: absolute; right: -120px; top: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  border: 1px solid rgba(242, 10, 120, .3);
}
.hero::after {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 340px; height: 340px; border-radius: 50%;
  border: 1px solid rgba(255, 240, 210, .18);
}

.hero-track { position: relative; height: 100%; }
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 max(26px, 6vw);
  opacity: 0; visibility: hidden;
  transform: translateX(38px);
  transition: opacity .7s ease, transform .7s ease, visibility .7s;
}
.hero-slide.active { opacity: 1; visibility: visible; transform: none; z-index: 2; }

.hero-content { max-width: 700px; }
.h-kicker {
  font-size: .76rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: var(--cream);
  display: flex; align-items: center; gap: 12px;
}
.h-kicker::before { content: ""; width: 34px; height: 2px; background: var(--gold-2); }
.hero-title { font-family: var(--serif); font-size: clamp(1.7rem, 4.4vw, 3rem); line-height: 1.12; margin-top: 12px; font-weight: 700; }
.hero-text { margin-top: 14px; color: rgba(255, 240, 210, .88); max-width: 540px; font-size: .98rem; line-height: 1.7; }
.hero-content .btn { margin-top: 26px; }

.hero-arrow {
  position: absolute; top: 50%; z-index: 5;
  transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 240, 210, .06);
  border: 1px solid rgba(255, 240, 210, .4);
  color: var(--white);
  font-size: 1.05rem; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.hero-arrow:hover { background: rgba(242, 10, 120, .2); border-color: var(--gold-2); color: var(--cream); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }

.hero-dots { position: absolute; bottom: 20px; left: 0; right: 0; display: flex; justify-content: center; gap: 9px; z-index: 5; }
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(255, 240, 210, .7);
  background: transparent; cursor: pointer; padding: 0;
  transition: background .2s, transform .2s;
}
.hero-dots button.active { background: var(--gold-2); border-color: var(--gold-2); transform: scale(1.25); }

/* ---------- Secciones de la página ---------- */
.section { padding: 72px 0; }
.section-grey { background: var(--bg); }
.divider { border: none; height: 1px; background: var(--border); }

/* ---------- Instructores ---------- */
.grid-instructors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 24px;
}
.inst-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  padding: 30px 22px 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.inst-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: var(--shadow); }

.inst-avatar {
  width: 84px; height: 84px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  color: var(--gold-2);
  font-family: var(--serif); font-size: 1.6rem; font-weight: 700;
  display: grid; place-items: center;
}
.inst-name { font-family: var(--serif); color: var(--navy); font-size: 1.08rem; font-weight: 700; }
.inst-cargo { color: var(--gold-d); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.inst-rule { width: 42px; height: 2px; background: var(--gold); margin: 14px auto; }
.inst-meta { color: var(--muted); font-size: .84rem; line-height: 1.6; }
.inst-meta b { color: var(--text); font-weight: 700; }
.inst-card .btn { width: 100%; margin-top: 16px; }

/* ---------- Módulo de secciones y estudiantes ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 26px; }
.chip {
  background: var(--white);
  border: 1px solid var(--border);
  padding: .6rem 1.1rem;
  border-radius: 999px;
  font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  color: var(--text); cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--navy); border-color: var(--navy); color: var(--cream); }

.seccion-info {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--gold);
  border-radius: var(--r);
  padding: 20px 24px;
  margin-bottom: 28px;
}
.si-name { font-family: var(--serif); color: var(--navy); font-size: 1.2rem; font-weight: 700; flex: 1 1 200px; }
.si-desc { color: var(--muted); font-size: .88rem; flex: 2 1 320px; }
.si-count {
  flex: none;
  background: var(--cream-soft);
  border: 1px solid var(--gold);
  color: var(--gold-d);
  font-weight: 800; font-size: .78rem; letter-spacing: .04em;
  padding: 7px 14px; border-radius: 999px;
}

.grid-estudiantes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 22px;
}
.stu-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stu-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow); }
.stu-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.stu-top > div:last-child { flex: 1; min-width: 0; }
.stu-avatar {
  width: 58px; height: 58px; flex: none;
  border-radius: 50%;
  background: var(--navy-3);
  border: 2px solid var(--gold);
  color: var(--white);
  font-family: var(--serif); font-size: 1.15rem; font-weight: 700;
  display: grid; place-items: center;
}
.stu-name {
  font-weight: 700; color: var(--navy); font-size: .98rem; line-height: 1.25;
  overflow-wrap: break-word; word-break: break-word; -webkit-hyphens: auto; hyphens: auto;
}
.stu-course {
  color: var(--muted); font-size: .8rem;
  overflow-wrap: break-word; word-break: break-word; -webkit-hyphens: auto; hyphens: auto;
}
.stu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 16px; }
.stu-item { min-width: 0; }
.stu-item .k {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.stu-item .v {
  display: block;
  font-size: .9rem; font-weight: 600; color: var(--text);
  overflow-wrap: break-word; word-break: break-word; -webkit-hyphens: auto; hyphens: auto;
}
.stu-card .btn { margin-top: auto; }

/* ---------- ASISTENCIA ---------- */
.att-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.att-toolbar .field-ctrl { display: flex; flex-direction: column; gap: 6px; }
.att-toolbar label { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.att-toolbar select {
  min-width: 200px;
  padding: .6rem .8rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  cursor: pointer;
}
.att-toolbar select:focus { outline: none; border-color: var(--gold); }
.att-fecha { font-size: .92rem; color: var(--muted); margin-bottom: 4px; }
.att-fecha b { color: var(--navy); }

.att-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.sum-chip {
  flex: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .84rem; font-weight: 700; color: var(--text);
}
.sum-chip b { color: var(--navy); font-size: 1.02rem; }
.sum-chip.p b { color: var(--green); }
.sum-chip.a b { color: var(--red); }
.sum-chip.t b { color: var(--amber); }

.att-table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); }
.att-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.att-table th {
  background: var(--navy);
  color: var(--cream);
  font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 12px 14px; text-align: left;
}
.att-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.att-table tbody tr:nth-child(even) { background: var(--bg); }
.att-table tbody tr:hover { background: var(--cream-soft); }
.att-name { font-weight: 700; color: var(--navy); }
.att-sub2 { color: var(--muted); font-size: .78rem; }

.status-btns { display: flex; gap: 6px; }
.status-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-size: .78rem; font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.status-btn:hover { border-color: var(--gold-d); color: var(--navy); }
.status-btn.on-p { background: var(--green); border-color: var(--green); color: var(--white); }
.status-btn.on-a { background: var(--red); border-color: var(--red); color: var(--white); }
.status-btn.on-t { background: var(--amber); border-color: var(--amber); color: var(--white); }
.status-btn:disabled { opacity: .45; cursor: not-allowed; }

.att-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; align-items: center; }
.att-msg { color: var(--muted); font-size: .86rem; }

.att-notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--cream-soft);
  border: 1px solid var(--gold);
  border-radius: var(--r);
  padding: 16px 20px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: .9rem;
}
.att-notice b { color: var(--gold-d); }

/* ---------- GALERÍA ---------- */
.gal-title {
  font-family: var(--serif);
  font-size: 1.3rem; font-weight: 700; color: var(--navy);
  margin: 40px 0 20px;
  padding-left: 14px;
  border-left: 4px solid var(--gold);
}
.grid-gal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 8px;
}
.gal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.gal-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: var(--shadow); }
.gal-img {
  height: 176px;
  background:
    radial-gradient(300px 120px at 88% 0%, rgba(242, 10, 120, .34), transparent 60%),
    linear-gradient(140deg, var(--navy-2) 0%, var(--navy-3) 60%, var(--navy) 100%);
  display: grid; place-items: center;
  color: var(--cream);
  font-size: 3.4rem; font-family: var(--serif); font-weight: 700;
  position: relative;
}
.gal-img small {
  position: absolute; bottom: 10px; left: 14px;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 240, 210, .78); font-family: 'Segoe UI', sans-serif;
}
.gal-body { padding: 18px 20px 20px; }
.gal-tit { font-weight: 800; color: var(--navy); font-size: 1rem; }
.gal-meta { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.gal-desc { color: var(--muted); font-size: .85rem; margin-top: 8px; line-height: 1.55; }
.gal-card .btn { width: 100%; margin-top: 14px; }

.vid-badge {
  position: absolute; right: 12px; top: 12px;
  background: rgba(33, 16, 111, .86);
  color: var(--cream);
  border: 1px solid rgba(242, 10, 120, .72);
  font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px;
}
.play-mark { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--gold-2); color: var(--gold-2); display: grid; place-items: center; font-size: 1.05rem; }

/* ---------- ESCÁNER DE CÓDIGO DE BARRAS ---------- */
.scanner-wrap {
  max-width: 780px; margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 28px;
}
.scan-head { margin-bottom: 18px; }
.scan-head-title {
  display: block;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
}
.scan-head-sub { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.scan-modes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.scan-modes .chip { border-radius: 8px; }
.scan-modes .chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.scan-toolbar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.scan-toolbar .field { margin-bottom: 0; }
.scan-login-field { flex: 1 1 220px; min-width: 0; }
.scan-input {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  font-size: 1rem;
  letter-spacing: .05em;
}
.scan-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 0, 104, .16); }
.scan-input::placeholder { color: var(--muted); }
.scan-help { color: var(--muted); font-size: .76rem; line-height: 1.45; margin-top: 6px; }

.login-scanner {
  max-width: none;
  margin-top: 24px;
  padding: 18px;
  background: var(--bg);
}
.login-scanner .scan-head { margin-bottom: 14px; }
.login-scanner .scan-toolbar { align-items: flex-end; }

.camera-reader { margin: 18px auto 0; max-width: 420px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--navy); min-height: 180px; }
.camera-reader video { width: 100%; display: block; }

.scan-result { margin-top: 20px; min-height: 48px; }
.scan-status { color: var(--muted); font-size: .9rem; }
.scan-result .scan-card {
  background: var(--white);
  border: 1px solid var(--gold);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.scan-title { font-family: var(--serif); color: var(--navy); font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.scan-success {
  background: var(--success-bg); border: 1px solid var(--green);
  border-radius: var(--r); padding: 16px 20px;
  color: var(--text); font-size: .92rem; line-height: 1.7;
}
.scan-success b { color: var(--green); font-weight: 800; }
/* ---------- PIE DE PÁGINA ---------- */
.site-footer { background: var(--navy); color: rgba(255, 240, 210, .8); border-top: 4px solid var(--gold-2); margin-top: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 42px; padding: 56px 0 40px; }
.f-brand { display: flex; align-items: center; gap: 12px; color: var(--cream); }
.f-brand .site-logo { color: var(--gold-2); }
.f-brand-name { font-family: var(--serif); font-weight: 700; line-height: 1.1; }
.f-brand-name span { display: block; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.f-about-txt { margin-top: 16px; font-size: .88rem; line-height: 1.7; max-width: 380px; }
.f-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.s-link {
  text-decoration: none;
  color: rgba(255, 240, 210, .86);
  border: 1px solid rgba(242, 10, 120, .48);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: .8rem; font-weight: 700;
  transition: background .2s, color .2s;
}
.s-link:hover { background: rgba(242, 10, 120, .18); color: var(--cream); }

.f-title { color: var(--gold-2); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; margin-bottom: 18px; }
.f-links { list-style: none; }
.f-links li { margin-bottom: 10px; }
.f-links a { color: rgba(255, 240, 210, .82); text-decoration: none; font-size: .9rem; transition: color .2s; }
.f-links a:hover { color: var(--cream); }
.f-contact { list-style: none; }
.f-contact li { font-size: .86rem; margin-bottom: 10px; }
.f-contact a { color: var(--cream); }

.f-bottom {
  border-top: 1px solid rgba(255, 240, 210, .16);
  padding: 20px 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-size: .78rem; color: rgba(255, 240, 210, .58);
}

/* ---------- VENTANA MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(33, 16, 111, .56);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  position: relative;
  width: min(540px, 100%);
  max-height: 88vh; overflow: auto;
  background: var(--white);
  border-radius: 12px;
  border-top: 5px solid var(--gold);
  box-shadow: 0 26px 60px rgba(33, 16, 111, .35);
  padding: 34px 34px 30px;
  transform: translateY(16px);
  transition: transform .3s ease;
}
.modal-overlay.open .modal { transform: none; }

.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-size: 1.25rem; line-height: 1;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.modal-close:hover { border-color: var(--gold); color: var(--gold-d); transform: rotate(90deg); }

.m-kicker { color: var(--gold-d); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.m-title { font-family: var(--serif); color: var(--navy); font-size: 1.45rem; font-weight: 700; margin-top: 4px; }
.m-sub { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.m-rule { width: 52px; height: 2px; background: var(--gold); margin: 16px 0; }

.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 6px; }
.m-item .k { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.m-item .v { font-size: .94rem; font-weight: 600; color: var(--text); }

.m-desc { color: var(--muted); font-size: .92rem; line-height: 1.65; margin-top: 16px; }

.m-logros { margin-top: 18px; list-style: none; }
.m-logros li { position: relative; padding-left: 20px; font-size: .9rem; color: var(--text); margin-bottom: 9px; }
.m-logros li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 2px; background: var(--gold); }

.m-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Modal de video */
.m-modal-video video { width: 100%; border-radius: 8px; border: 1px solid var(--border); background: #000; }
.m-legend { color: var(--muted); font-size: .86rem; margin-top: 10px; line-height: 1.6; }

/* ---------- AVISO TOSTADA ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; z-index: 120;
  transform: translate(-50%, 150%);
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--gold-2);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(33, 16, 111, .25);
  padding: 13px 22px;
  font-size: .88rem; font-weight: 600; color: var(--navy);
  max-width: 92vw;
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 980px) {
  .nav-links, .user-pill { display: none; }
  .nav-toggle { display: block; }
  .btn-logout { padding: .5rem .8rem; font-size: .72rem; }
  .mobile-nav { padding-bottom: 8px; }
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding: 44px 0 32px; }
  .section { padding: 56px 0; }
  .page-body { padding: 40px 0 64px; }
}

@media (max-width: 600px) {
  .brand-name { font-size: .92rem; }
  .tb-role { display: none; }
  .icon-card { padding: 24px 14px 20px; }
  .grid-sections { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .grid-instructors, .grid-estudiantes, .grid-gal { grid-template-columns: 1fr; }
  .m-grid { grid-template-columns: 1fr; }
  .modal { padding: 28px 22px 24px; }
  .hero { height: clamp(340px, 66vh, 480px); }
  .hero-arrow { width: 40px; height: 40px; }
  .att-toolbar .field-ctrl select, .att-toolbar select { min-width: 100%; }
  .att-toolbar { flex-direction: column; align-items: stretch; }
  .f-bottom { justify-content: center; text-align: center; }
  .login-card { padding: 28px 22px 24px; }
  .logo-sm { width: 46px; height: 46px; }
  .logo-md { width: 70px; height: 70px; }
  .logo-xl { width: 156px; height: 156px; }
  .login-scanner .scan-toolbar { align-items: stretch; }
  .login-scanner .scan-toolbar .btn { width: 100%; }
}

@media (max-width: 400px) {
  .grid-sections { grid-template-columns: 1fr; }
  .nav-actions .btn-logout { display: none; }
}

/* Estado de lectura del estudiante en la tabla */
.att-table.readonly .status-btn { pointer-events: none; }