/* ============================================================
   Expediente Digital — Page-specific styles
   Extracted from expediente-digital-v2.html mockup
   ============================================================ */

:root {
  --rail: #141619;
  --sidebar: #1E2126;
  --sidebar-hover: #2A2D34;
  --cream: #F4F0E6;
  --cream-2: #ECE6D6;
  --paper: #FFFFFF;
  --paper-soft: #FBF8F1;
  --ink: #1A1D22;
  --ink-2: #4A4F58;
  --ink-3: #7C828B;
  --ink-4: #B5BAC1;
  --line: #E8E2D2;
  --line-soft: #F0EBDE;
  --teal: #6DC7D0;
  --teal-deep: #2E8B92;
  --teal-soft: #DCEFF1;
  --gold: #C8A55B;
  --gold-soft: #F5EDD8;
  --rose: #C26F6F;
  --rose-soft: #F4DEDE;
  --green: #6FA478;
  --green-soft: #DEEBE0;
  --amber: #D49B47;
  --amber-soft: #F7E9CE;
  --violet: #8B7BB8;
  --violet-soft: #E5DEF1;
  --shadow-card: 0 1px 2px rgba(20,22,25,0.04), 0 8px 24px rgba(20,22,25,0.04);
  --shadow-card-hover: 0 2px 4px rgba(20,22,25,0.06), 0 16px 32px rgba(20,22,25,0.08);
}

/* ============ TOP BAR ============ */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 36px 4px;
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(244,240,230,0.92);
  border-bottom: 1px solid var(--line-soft);
}
/* Especificidad .topbar .breadcrumb para ganarle a portal-estudiante.css
   (define .breadcrumb { color: blanco-translucido } y carga despues). */
.topbar .breadcrumb {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}
.topbar .breadcrumb .crumb-current { color: var(--ink); font-weight: 700; }
.topbar .breadcrumb .material-symbols-outlined { font-size: 17px; opacity: 1; color: var(--ink-2); }

.global-search {
  margin-left: 14px;
  flex: 1;
  max-width: 460px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.15s;
}
.global-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(109,199,208,0.12); }
.global-search input {
  border: none; outline: none; background: transparent;
  flex: 1; font-family: inherit; font-size: 13.5px; color: var(--ink);
}
.global-search input::placeholder { color: var(--ink-3); }
.global-search .kbd { font-size: 10px; color: var(--ink-3); background: var(--cream-2); padding: 2px 6px; border-radius: 4px; font-weight: 600; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  position: relative;
}
.topbar-icon:hover { background: var(--paper-soft); }
.topbar-icon .material-symbols-outlined { font-size: 19px; }
.topbar-icon .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); border: 2px solid var(--paper); }

/* ============ PAGE HEADER ============ */
.page-wrap { padding: 4px 36px 60px; max-width: 1280px; }

.page-title-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px;
}
.page-title-block .eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--teal-deep);
  font-weight: 700;
  margin-bottom: 6px;
}
.page-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.page-title em {
  font-style: italic;
  color: var(--teal-deep);
  font-weight: 500;
}
.page-subtitle {
  color: var(--ink-3);
  font-size: 14px;
  margin-top: 8px;
}

.page-actions { display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-paper:hover { box-shadow: var(--shadow-card); }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: #000; }
.btn-teal { background: var(--teal-deep); color: white; }
.btn-teal:hover { background: #246e74; }
.btn .material-symbols-outlined { font-size: 17px; }

/* ============ STUDENT HERO ============ */
/* .page-wrap .hero más específico que portal-estudiante.css (.hero { background:carbon })
   — sin este scoping el hero del Expediente sale negro y el texto se vuelve invisible. */
.page-wrap .hero {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
  position: relative;
  color: var(--ink);
  padding: 0;
}
.page-wrap .hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 200px at 100% 0%, rgba(109,199,208,0.12), transparent 60%),
    radial-gradient(500px 180px at 0% 100%, rgba(200,165,91,0.08), transparent 60%);
  pointer-events: none;
}

.hero-body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  padding: 28px 32px;
  position: relative;
}

.hero-avatar {
  width: 96px; height: 96px;
  border-radius: 22px;
  background: linear-gradient(135deg, #2E8B92, #1A5A60);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 36px;
  box-shadow: 0 12px 28px rgba(46,139,146,0.28), inset 0 1px 0 rgba(255,255,255,0.18);
  position: relative;
}
.hero-avatar .status-pin {
  position: absolute; bottom: -6px; right: -6px;
  background: var(--amber);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
  border: 3px solid var(--paper);
  display: flex; align-items: center; gap: 3px;
}
.hero-avatar .status-pin .material-symbols-outlined { font-size: 12px; }

.hero-info { display: flex; flex-direction: column; justify-content: center; }
.hero-name {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 10px;
}
.hero-name .first {
  font-style: italic;
  font-weight: 500;
  color: var(--teal-deep);
}

.hero-badges {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--cream-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.badge .material-symbols-outlined { font-size: 13px; }
.badge.teal { background: var(--teal-soft); color: var(--teal-deep); border-color: rgba(46,139,146,0.18); }
.badge.gold { background: var(--gold-soft); color: #8B6B2C; border-color: rgba(139,107,44,0.2); }
.badge.rose { background: var(--rose-soft); color: #8B3A3A; border-color: rgba(139,58,58,0.2); }
.badge.amber { background: var(--amber-soft); color: #8B5A1F; border-color: rgba(139,90,31,0.2); }

.hero-meta {
  display: flex; gap: 22px; flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 12.5px;
}
.hero-meta-item { display: flex; align-items: center; gap: 6px; }
.hero-meta-item .material-symbols-outlined { font-size: 15px; opacity: 0.7; }
.hero-meta-item strong { color: var(--ink-2); font-weight: 600; }

.hero-side {
  display: flex; flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.hero-quick-actions { display: flex; gap: 6px; }
.hero-quick-action {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.hero-quick-action:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.hero-quick-action .material-symbols-outlined { font-size: 18px; }

/* Estado disabled del quick-action: opacidad reducida, sin hover, cursor not-allowed. */
.hero-quick-action.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Wrap para anclar el dropdown del menu (.hero-menu) abajo del boton ⋯. */
.hero-quick-action-wrap { position: relative; }

/* Overlay transparente full-screen para detectar click fuera y cerrar. */
.hero-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: transparent;
}

.hero-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card), 0 8px 24px rgba(0,0,0,0.06);
  padding: 6px;
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.hero-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background 0.12s;
}
.hero-menu-item:hover { background: var(--cream); color: var(--ink); }
.hero-menu-item .material-symbols-outlined { font-size: 18px; color: var(--ink-3); }
.hero-menu-item:hover .material-symbols-outlined { color: var(--teal-deep); }

.hero-tutor {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 10px;
  display: flex; align-items: center; gap: 9px;
  font-size: 12px;
}
.hero-tutor-label { color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.hero-tutor-name { color: var(--ink); font-weight: 600; }
.hero-tutor-avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #8B7BB8, #5C4F8C); color: white; font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; }

/* HERO TABS */
.hero-tabs {
  display: flex;
  gap: 0;
  padding: 0 32px;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
  position: relative;
}
.hero-tab {
  padding: 13px 18px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 7px;
  transition: all 0.15s;
}
.hero-tab:hover { color: var(--ink); }
.hero-tab.active {
  color: var(--teal-deep);
  border-bottom-color: var(--teal-deep);
}
.hero-tab .material-symbols-outlined { font-size: 16px; }
.hero-tab .count {
  background: var(--cream-2);
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
.hero-tab.active .count { background: var(--teal-soft); color: var(--teal-deep); }

/* ============ KPI ROW ============ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ink-4);
}
.kpi.teal::before { background: var(--teal-deep); }
.kpi.gold::before { background: var(--gold); }
.kpi.rose::before { background: var(--rose); }
.kpi.violet::before { background: var(--violet); }

.kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); font-weight: 700; }
.kpi-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.kpi-icon .material-symbols-outlined { font-size: 16px; }
.kpi.teal .kpi-icon { background: var(--teal-soft); color: var(--teal-deep); }
.kpi.gold .kpi-icon { background: var(--gold-soft); color: #8B6B2C; }
.kpi.rose .kpi-icon { background: var(--rose-soft); color: #8B3A3A; }
.kpi.violet .kpi-icon { background: var(--violet-soft); color: #5C4F8C; }

.kpi-value {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 4px;
}
.kpi-value .unit { font-size: 16px; color: var(--ink-3); font-weight: 400; }

.kpi-foot {
  margin-top: 10px;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
}
.trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; padding: 2px 7px; border-radius: 6px; }
.trend.up { background: var(--green-soft); color: #3D6B47; }
.trend.down { background: var(--rose-soft); color: #8B3A3A; }
.trend.flat { background: var(--cream-2); color: var(--ink-3); }
.trend .material-symbols-outlined { font-size: 13px; }

.kpi-bar {
  margin-top: 10px;
  height: 5px; border-radius: 5px;
  background: var(--cream-2);
  overflow: hidden;
  position: relative;
}
.kpi-bar-fill {
  height: 100%;
  border-radius: 5px;
}

.severity-dots { display: flex; gap: 3px; margin-top: 10px; }
.sev-dot { width: 10px; height: 10px; border-radius: 50%; }
.sev-leve { background: var(--amber); }
.sev-moderada { background: #C26F6F; }
.sev-grave { background: #8B3A3A; }
.sev-empty { background: var(--cream-2); }

/* ============ GRID 2-COL ============ */
.grid-2 {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.grid-2.reverse { grid-template-columns: 1fr 1.45fr; }
.grid-3-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-head {
  padding: 18px 22px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title-block { display: flex; align-items: center; gap: 10px; }
.card-title-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}
.card-title-icon .material-symbols-outlined { font-size: 17px; }
.card-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.card-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.card-link { color: var(--teal-deep); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; }
.card-link .material-symbols-outlined { font-size: 14px; }
/* Link de card pendiente: el detalle vive en otra vista que aun no existe.
   No usamos pointer-events:none para que el title (tooltip) siga visible. */
.card-link.is-disabled { color: var(--ink-3); cursor: not-allowed; opacity: 0.55; }
.card-link.is-disabled:hover { color: var(--ink-3); }
.card-body { padding: 4px 22px 22px; }

/* ============ ACADEMIC RADAR ============ */
.radar-section { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: flex-start; }
.radar-svg { width: 260px; height: 234px; }
@media (max-width: 900px) {
  .radar-section { grid-template-columns: 1fr; }
  .radar-svg { width: 100%; max-width: 320px; margin: 0 auto; display: block; }
}
.radar-grid-line { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line); stroke-width: 0.75; }
.radar-area-bg {
  fill: rgba(46,139,146,0.12);
  stroke: var(--teal-deep);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.radar-area-grupo {
  fill: rgba(200,165,91,0.0);
  stroke: var(--gold);
  stroke-width: 1.25;
  stroke-dasharray: 3 3;
  stroke-linejoin: round;
}
.radar-dot { fill: var(--teal-deep); stroke: white; stroke-width: 1.5; }
.radar-label {
  font-family: 'Figtree', sans-serif;
  font-size: 9px;
  fill: var(--ink-2);
  font-weight: 600;
}
.radar-label-value {
  font-family: 'Fraunces', serif;
  font-size: 10.5px;
  fill: var(--teal-deep);
  font-weight: 500;
}
.radar-axis-tick {
  font-family: 'Figtree', sans-serif;
  font-size: 7.5px;
  fill: var(--ink-4);
  font-weight: 500;
}

/* CAMPOS JERARQUICOS CON DISCIPLINAS ANIDADAS */
.campos-list { display: flex; flex-direction: column; gap: 8px; }
.campo-group {
  border-radius: 10px;
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.campo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
}
.campo-head .campo-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.campo-head .campo-prom-label { flex-shrink: 0; }
.campo-num {
  width: 24px; height: 24px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 12px;
  font-weight: 500;
  color: white;
  flex-shrink: 0;
}
.campo-num.c1 { background: linear-gradient(135deg, #6DC7D0, #2E8B92); }
.campo-num.c2 { background: linear-gradient(135deg, #C8A55B, #8B6B2C); }
.campo-num.c3 { background: linear-gradient(135deg, #C26F6F, #8B3A3A); }
.campo-num.c4 { background: linear-gradient(135deg, #8B7BB8, #5C4F8C); }
.campo-name { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.campo-prom-label {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 9.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  line-height: 1;
}
.campo-prom-label .val {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-left: 0;
  margin-top: 2px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
}
/* .campo-toggle removed — era un chevron decorativo sin función. */

.disciplinas-list {
  display: flex; flex-direction: column;
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
}
.disciplina {
  display: grid;
  grid-template-columns: 4px minmax(0,1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 7px 12px 7px 14px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--line-soft);
}
.disciplina:last-child { border-bottom: none; }
.disciplina-tick {
  width: 4px; height: 16px; border-radius: 2px;
}
.disciplina.c1 .disciplina-tick { background: #2E8B92; }
.disciplina.c2 .disciplina-tick { background: #8B6B2C; }
.disciplina.c3 .disciplina-tick { background: #8B3A3A; }
.disciplina.c4 .disciplina-tick { background: #5C4F8C; }
.disciplina-name { color: var(--ink); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disciplina-score {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  width: 32px;
  text-align: right;
}
.disciplina-vs {
  font-size: 10px;
  font-weight: 600;
  width: 38px;
  text-align: right;
  color: var(--ink-3);
}
.disciplina-vs.up { color: #3D6B47; }
.disciplina-vs.down { color: #8B3A3A; }
.disciplina-vs.flat { color: var(--ink-4); }

.legend {
  display: flex; gap: 16px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--paper-soft);
  border-radius: 9px;
  font-size: 11px;
}
.legend-item { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.legend-line { width: 14px; height: 2px; background: var(--teal-deep); }
.legend-line.dashed { background: transparent; border-top: 2px dashed var(--gold); height: 0; }

/* ============ ATTENDANCE HEATMAP ============ */
.heatmap-section { padding: 0 22px 22px; }
.heatmap-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.heat-stat {
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 11px 14px;
}
.heat-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); font-weight: 700; }
.heat-stat-value { font-family: 'Fraunces', serif; font-size: 22px; line-height: 1.1; margin-top: 4px; color: var(--ink); }
.heat-stat-value .pct { font-size: 12px; color: var(--ink-3); margin-left: 2px; }
.heat-stat.green .heat-stat-value { color: #3D6B47; }
.heat-stat.amber .heat-stat-value { color: #8B5A1F; }
.heat-stat.rose .heat-stat-value { color: #8B3A3A; }

.heatmap {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.heat-day-labels { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
.heat-day-label { font-size: 9px; color: var(--ink-3); height: 12px; font-weight: 600; }
.heat-grid-wrap { overflow: hidden; }
.heat-month-labels { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; margin-bottom: 4px; }
.heat-month { font-size: 9.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.heat-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(5, 12px);
  gap: 3px;
}
.heat-cell {
  width: 12px; height: 12px;
  border-radius: 3px;
  background: var(--cream-2);
}
.heat-cell.h0 { background: #ECE6D6; }
.heat-cell.h1 { background: #C8DDC0; }
.heat-cell.h2 { background: #94BD9E; }
.heat-cell.h3 { background: #6FA478; }
.heat-cell.r { background: #E0BD7A; }
.heat-cell.f { background: #C26F6F; }
.heat-cell.empty { background: transparent; }

.heat-legend { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.heat-legend-item { display: flex; align-items: center; gap: 5px; }
.heat-legend-swatch { width: 12px; height: 12px; border-radius: 3px; }

.heat-pattern {
  margin-top: 14px;
  padding: 11px 13px;
  background: linear-gradient(90deg, var(--amber-soft), rgba(247,233,206,0));
  border-left: 3px solid var(--amber);
  border-radius: 7px;
  font-size: 11.5px;
  color: var(--ink-2);
  display: flex; align-items: flex-start; gap: 8px;
}
.heat-pattern .material-symbols-outlined { font-size: 16px; color: var(--amber); flex-shrink: 0; }
.heat-pattern strong { color: var(--ink); }

/* CLASSES TABLE INSIDE ASISTENCIA CARD */
.classes-attendance { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.class-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 9px 12px;
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}
.class-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.class-sub { font-size: 10.5px; color: var(--ink-3); }
.class-bar { width: 80px; height: 5px; border-radius: 5px; background: var(--cream-2); overflow: hidden; }
.class-bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), #4A8552); }
.class-pct { font-family: 'Fraunces', serif; font-size: 14px; color: var(--ink); width: 36px; text-align: right; }
.class-tag { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; }
.class-tag.warn { background: var(--rose-soft); color: #8B3A3A; }
.class-tag.ok { background: var(--green-soft); color: #3D6B47; }

/* ============ INCIDENCIAS TIMELINE ============ */
.timeline-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px 14px;
}
.filter-chips { display: flex; gap: 6px; }
.chip {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--cream);
  color: var(--ink-2);
  cursor: pointer;
  border: 1px solid var(--line);
}
.chip.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.timeline { padding: 0 22px 18px; position: relative; }
.timeline::before {
  content: '';
  position: absolute; left: 47px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.ti {
  display: grid;
  grid-template-columns: 50px auto 1fr;
  gap: 14px;
  padding: 11px 0;
  align-items: flex-start;
}
.ti-date {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  color: var(--ink-3);
  text-align: right;
  line-height: 1.3;
  padding-top: 4px;
}
.ti-date strong { display: block; color: var(--ink); font-size: 13px; font-weight: 500; }
.ti-marker {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink-4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  margin: 4px 0;
}
.ti-marker .material-symbols-outlined { font-size: 12px; color: var(--ink-3); }
.ti.leve .ti-marker { border-color: var(--amber); background: var(--amber-soft); }
.ti.leve .ti-marker .material-symbols-outlined { color: #8B5A1F; }
.ti.moderada .ti-marker { border-color: var(--rose); background: var(--rose-soft); }
.ti.moderada .ti-marker .material-symbols-outlined { color: #8B3A3A; }
.ti.grave .ti-marker { border-color: #8B3A3A; background: #8B3A3A; }
.ti.grave .ti-marker .material-symbols-outlined { color: white; }
.ti.positivo .ti-marker { border-color: var(--green); background: var(--green-soft); }
.ti.positivo .ti-marker .material-symbols-outlined { color: #3D6B47; }

.ti-card {
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 11px 14px;
}
.ti-card-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.ti-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.ti-tag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.ti-tag.leve { background: var(--amber-soft); color: #8B5A1F; }
.ti-tag.moderada { background: var(--rose-soft); color: #8B3A3A; }
.ti-tag.grave { background: #8B3A3A; color: white; }
.ti-tag.positivo { background: var(--green-soft); color: #3D6B47; }
.ti-desc { font-size: 12px; color: var(--ink-2); line-height: 1.45; margin-top: 3px; }
.ti-meta { display: flex; align-items: center; gap: 12px; margin-top: 7px; font-size: 11px; color: var(--ink-3); }
.ti-meta-item { display: flex; align-items: center; gap: 4px; }
.ti-meta-item .material-symbols-outlined { font-size: 13px; opacity: 0.7; }
.ti-meta strong { color: var(--ink-2); font-weight: 600; }

/* ============ AI ALERTS / INSIGHTS ============ */
.insights-list { display: flex; flex-direction: column; gap: 10px; }
.insight {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: var(--paper-soft);
}
.insight.high {
  background: linear-gradient(135deg, var(--rose-soft) 0%, var(--paper-soft) 100%);
  border-color: rgba(194,111,111,0.3);
}
.insight.medium {
  background: linear-gradient(135deg, var(--amber-soft) 0%, var(--paper-soft) 100%);
  border-color: rgba(212,155,71,0.3);
}
.insight.positive {
  background: linear-gradient(135deg, var(--green-soft) 0%, var(--paper-soft) 100%);
  border-color: rgba(111,164,120,0.3);
}
.insight-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
}
.insight-icon .material-symbols-outlined { font-size: 18px; }
.insight.high .insight-icon { color: #8B3A3A; }
.insight.medium .insight-icon { color: #8B5A1F; }
.insight.positive .insight-icon { color: #3D6B47; }
.insight-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.insight-desc { font-size: 12px; color: var(--ink-2); line-height: 1.45; margin-top: 4px; }
.insight-action {
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600;
  color: var(--teal-deep);
  cursor: pointer;
}
.insight-action .material-symbols-outlined { font-size: 13px; }

.insights-foot {
  margin-top: 12px;
  display: flex; align-items: center; gap: 7px;
  padding: 9px 13px;
  background: linear-gradient(90deg, rgba(139,123,184,0.10), transparent);
  border-radius: 8px;
  font-size: 11px;
  color: var(--ink-3);
}
.insights-foot .material-symbols-outlined { font-size: 14px; color: var(--violet); }

/* ============ FAMILY ============ */
.family-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin-bottom: 14px;
}
.family-avatar {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #C8A55B, #8B6B2C);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
}
.family-info-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.family-info-rel { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.family-info-detail { font-size: 12px; color: var(--ink-2); margin-top: 6px; line-height: 1.5; }
.family-info-detail .material-symbols-outlined { font-size: 13px; vertical-align: -2px; opacity: 0.7; margin-right: 3px; }

.family-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 4px;
}
.fa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.fa-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }
.fa-btn .material-symbols-outlined { font-size: 19px; }
.fa-btn.wa { color: #128C7E; }
.fa-btn.call { color: var(--teal-deep); }
.fa-btn.mail { color: #8B5A1F; }
.fa-btn.meet { color: #5C4F8C; }
/* Estilo neutro para <a class="fa-btn"> — evita el subrayado azul del navegador */
a.fa-btn { text-decoration: none; }
/* Estado deshabilitado cuando falta el dato (sin telefono / sin correo) */
.fa-btn:disabled,
.fa-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.comm-history-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); font-weight: 700; margin: 16px 0 8px; }
.comm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.comm-row:last-child { border-bottom: none; }
.comm-row .material-symbols-outlined { font-size: 16px; }
.comm-row .ch-wa { color: #128C7E; }
.comm-row .ch-call { color: var(--teal-deep); }
.comm-row-content { flex: 1; min-width: 0; }
.comm-row-msg { font-weight: 600; color: var(--ink); }
.comm-row-meta { font-size: 10.5px; color: var(--ink-3); margin-top: 1px; }
.comm-row-status { font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 700; }
.comm-row-status.read { background: var(--green-soft); color: #3D6B47; }
.comm-row-status.delivered { background: var(--cream-2); color: var(--ink-3); }
.comm-row-status.replied { background: var(--teal-soft); color: var(--teal-deep); }

/* ============ QR & ACCIONES RAPIDAS ============ */
.qr-card {
  background: linear-gradient(160deg, #1E2126 0%, #2A2D34 100%);
  color: white;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}
.qr-card::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(109,199,208,0.18), transparent 60%);
}
.qr-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--teal); font-weight: 700; margin-bottom: 4px; position: relative; }
.qr-title { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 400; margin-bottom: 14px; position: relative; }
.qr-img-wrap {
  background: white;
  width: 142px; height: 142px;
  margin: 0 auto;
  border-radius: 11px;
  padding: 9px;
  position: relative;
}
.qr-img-wrap svg { width: 100%; height: 100%; display: block; }
.qr-foot { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 12px; position: relative; line-height: 1.4; }
.qr-actions { display: flex; gap: 6px; margin-top: 12px; position: relative; justify-content: center; }
.qr-action {
  padding: 6px 11px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border-radius: 7px;
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.qr-action:hover { background: rgba(255,255,255,0.14); }
.qr-action .material-symbols-outlined { font-size: 13px; }

/* ============ ACCIONES RAPIDAS ============ */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.qa-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  display: flex; flex-direction: column; gap: 7px;
  font-family: inherit;
}
.qa-btn:hover { border-color: var(--ink); box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }
.qa-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}
.qa-icon .material-symbols-outlined { font-size: 18px; }
.qa-btn.primary .qa-icon { background: var(--ink); color: var(--cream); }
.qa-btn.teal .qa-icon { background: var(--teal-soft); color: var(--teal-deep); }
.qa-btn.gold .qa-icon { background: var(--gold-soft); color: #8B6B2C; }
.qa-btn.rose .qa-icon { background: var(--rose-soft); color: #8B3A3A; }
.qa-title { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.qa-desc { font-size: 10.5px; color: var(--ink-3); line-height: 1.3; }

/* ============ DOCUMENTS ============ */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 4px 22px 22px;
}
.doc-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--paper-soft);
  position: relative;
}
.doc-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); border-color: var(--ink-4); }
.doc-icon {
  width: 40px; height: 48px;
  margin: 0 auto 8px;
  border-radius: 5px 7px 7px 5px;
  background: linear-gradient(135deg, #FBF8F1, #F0EBDE);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.doc-icon::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 10px; height: 10px;
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.doc-icon .material-symbols-outlined { font-size: 22px; color: var(--ink-2); }
.doc-title { font-size: 11.5px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.doc-meta { font-size: 10px; color: var(--ink-3); margin-top: 3px; }
.doc-status {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
}
.doc-status.ok { background: var(--green); }
.doc-status.pending { background: var(--amber); }
.doc-status.missing { background: var(--rose); }
.doc-card.missing { border-style: dashed; opacity: 0.7; }
.doc-card.missing .doc-icon { background: transparent; border-style: dashed; }
.doc-card.missing .doc-icon .material-symbols-outlined { color: var(--ink-4); }

/* ============ BITACORA ============ */
.bitacora { padding: 0 22px 22px; }
.bitacora-tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper-soft); border-radius: 10px; margin-bottom: 12px; width: fit-content; }
.bita-tab {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.bita-tab .material-symbols-outlined { font-size: 14px; }
.bita-tab.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.bita-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line-soft);
  background: var(--paper-soft);
}
.bita-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green-soft);
  color: #3D6B47;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bita-icon.neg { background: var(--amber-soft); color: #8B5A1F; }
.bita-icon .material-symbols-outlined { font-size: 16px; }
.bita-content { min-width: 0; }
.bita-text { font-size: 12.5px; color: var(--ink); line-height: 1.5; }
.bita-meta { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 10px; }
.bita-add {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 14px;
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: center;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s;
}
.bita-add:hover { border-color: var(--ink-2); color: var(--ink); background: var(--paper-soft); }
.bita-add .material-symbols-outlined { font-size: 15px; vertical-align: -3px; margin-right: 4px; }

/* ============ FOOTER NOTE ============ */
.footer-note {
  margin-top: 24px;
  padding: 16px 22px;
  background: linear-gradient(135deg, rgba(109,199,208,0.06), rgba(200,165,91,0.04));
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
  font-size: 12px;
  color: var(--ink-2);
}
.footer-note .material-symbols-outlined { font-size: 18px; color: var(--teal-deep); }

/* ============ COMPARATIVO MINI BAR ============ */
.comparativo {
  margin-top: 14px;
  padding: 13px 14px;
  background: var(--paper-soft);
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}
.comp-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.comp-head .pos { color: var(--teal-deep); font-family: 'Fraunces', serif; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.comp-bar { position: relative; height: 6px; background: var(--cream-2); border-radius: 6px; overflow: hidden; }
.comp-bar-mark {
  position: absolute; top: -3px; width: 3px; height: 12px;
  background: var(--ink); border-radius: 2px;
}
.comp-bar-mark.you { background: var(--teal-deep); }
.comp-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--ink-3); }

/* ============ SELECTOR DE ALUMNO (panel A) ============ */
.selector-panel{background:var(--paper);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-card);padding:18px 22px 22px;max-width:1000px}
.selector-body{display:contents}

.selector-header{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.selector-header-icon{
  width:40px;height:40px;border-radius:11px;flex-shrink:0;
  background:linear-gradient(135deg,var(--teal),var(--teal-deep));color:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 12px rgba(109,199,208,.25)
}
.selector-header-icon .material-symbols-outlined{font-size:22px}
.selector-title-block{flex:1;min-width:0}
.selector-title{font-family:'Fraunces',serif;font-weight:500;font-size:22px;color:var(--ink);letter-spacing:-.01em;line-height:1.1;margin:0}
.selector-sub{font-size:12.5px;color:var(--ink-3);margin:3px 0 0}

.selector-search{display:flex;align-items:center;gap:10px;background:var(--paper);border:1.5px solid var(--line);border-radius:11px;padding:10px 13px;transition:all .15s}
.selector-search.is-focus,.selector-search:focus-within{border-color:var(--teal);box-shadow:0 0 0 4px rgba(109,199,208,.12)}
.selector-search .material-symbols-outlined{font-size:19px;color:var(--ink-3)}
.selector-search input{border:none;outline:none;background:transparent;flex:1;font-family:inherit;font-size:13.5px;color:var(--ink)}
.selector-search input::placeholder{color:var(--ink-3)}

.selector-or{display:flex;align-items:center;gap:12px;margin:14px 0 10px;color:var(--ink-4);font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.13em}
.selector-or::before,.selector-or::after{content:"";height:1px;background:var(--line-soft);flex:1}

.selector-empty{padding:20px 4px;text-align:center;color:var(--ink-3);font-size:13px}

/* colores por grado */
.grado-1{--gc:var(--teal-deep);--gcs:var(--teal-soft)}
.grado-2{--gc:var(--amber);--gcs:var(--amber-soft)}
.grado-3{--gc:var(--violet);--gcs:var(--violet-soft)}
.grado-otro{--gc:var(--ink-3);--gcs:var(--cream-2)}

.grade-sec{margin-top:12px}
.grade-sec:first-of-type{margin-top:4px}
.grade-head{display:flex;align-items:center;gap:7px;margin-bottom:8px}
.grade-dot{width:8px;height:8px;border-radius:50%;background:var(--gc)}
.grade-name{font-size:10.5px;text-transform:uppercase;letter-spacing:.13em;font-weight:800;color:var(--ink-2)}
.grade-meta{font-size:10.5px;color:var(--ink-4);font-weight:600}

.chip-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:7px}
.gchip{display:flex;align-items:stretch;background:var(--paper);border:1px solid var(--line);border-radius:10px;overflow:hidden;cursor:pointer;font-family:inherit;text-align:left;box-shadow:var(--shadow-card);transition:all .14s ease;padding:0}
.gchip-bar{width:3px;background:var(--gc);flex-shrink:0}
.gchip-body{padding:8px 10px;display:flex;flex-direction:column;gap:1px}
.gchip-name{font-size:13px;font-weight:700;color:var(--ink);letter-spacing:-.01em;line-height:1.2}
.gchip-count{font-size:10.5px;font-weight:500;color:var(--ink-3);margin-top:1px}
.gchip:hover{border-color:var(--ink-4);box-shadow:var(--shadow-card-hover);transform:translateY(-1px)}

/* resultados de busqueda / alumnos del grupo */
.selector-results{display:flex;flex-direction:column;margin-top:8px;border:1px solid var(--line);border-radius:11px;overflow:hidden}
.result-row{display:flex;align-items:center;gap:11px;padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--line-soft)}
.result-row:last-child{border-bottom:none}
.result-row:hover{background:var(--paper-soft)}
.result-avatar{width:32px;height:32px;border-radius:9px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:#fff;font-family:'Fraunces',serif;font-size:12px;font-weight:600;background:var(--gc)}
.result-body{flex:1;min-width:0}
.result-name{font-size:13px;font-weight:600;color:var(--ink)}
.result-sub{font-size:11px;color:var(--ink-3);margin-top:1px}

/* cabecera de alumnos del grupo */
.group-students-head{display:flex;align-items:center;gap:10px;margin:12px 0 8px}
.back-btn{display:flex;align-items:center;gap:5px;padding:6px 10px;background:var(--paper);border:1px solid var(--line);border-radius:8px;font-family:inherit;font-size:12px;font-weight:600;color:var(--ink-2);cursor:pointer}
.back-btn:hover{background:var(--paper-soft)}
.back-btn .material-symbols-outlined{font-size:16px}
.group-students-title{font-size:13.5px;font-weight:700;color:var(--ink)}

/* selector de periodo (topbar, junto a Cambiar alumno) */
.period-selector{display:inline-flex;align-items:center;gap:6px;margin-left:auto;padding:7px 11px;background:var(--paper);border:1px solid var(--line);border-radius:10px;font-family:inherit;font-size:12.5px;color:var(--ink-2);font-weight:600;box-shadow:var(--shadow-card)}
.period-selector .material-symbols-outlined{font-size:17px;color:var(--teal-deep)}
.period-selector select{border:none;outline:none;background:transparent;font-family:inherit;font-size:12.5px;color:var(--ink);font-weight:600;cursor:pointer;padding-right:2px}

/* boton Cambiar alumno (topbar, estado B) */
.change-btn{display:flex;align-items:center;gap:8px;padding:9px 15px;background:var(--paper);border:1px solid var(--line);border-radius:10px;font-family:inherit;font-size:13px;font-weight:600;color:var(--ink-2);cursor:pointer}
.change-btn:hover{background:var(--paper-soft)}
.change-btn .material-symbols-outlined{font-size:18px;color:var(--teal-deep)}

@media (max-width:640px){
  .selector-panel{padding:14px 14px 16px}
  .selector-header-icon{width:36px;height:36px}
  .selector-title{font-size:20px}
  .chip-grid{grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:6px}
}

/* ============ Anclas de navegacion del Hero ============
   El topbar es sticky (~50px). Damos 80px de respiro para que el
   scrollIntoView de las tabs del hero deje la seccion visible. */
#seccion-vista360,
#seccion-academico,
#seccion-asistencia,
#seccion-conducta,
#seccion-familia,
#seccion-documentos,
#seccion-historico { scroll-margin-top: 80px; }
