/* ============================================================
   EduPanel — hoja de estilos
   Paleta amable, tarjetas suaves y animaciones discretas.
   ============================================================ */
:root {
  color-scheme: light;
  --bg: #f4f3ff;
  --bg-2: #eef4ff;
  --card: #ffffff;
  --card-2: #fbfaff;
  --tx: #1d1b33;
  --tx-2: #4d4b68;
  --mu: #7c7a96;
  --bd: #e8e5f4;
  --bd-2: #f1effb;
  --pr: #6c5ce7;
  --pr-2: #8f7bff;
  --pr-soft: #eeeaff;
  --prt: #ffffff;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --warn: #e08b00;
  --warn-soft: #fef3c7;
  --info: #2f7cf6;
  --info-soft: #dbeafe;
  --danger: #e23b3b;
  --danger-soft: #ffe4e6;
  --pink: #ec4899;
  --pink-soft: #fce7f3;
  --mint: #0d9488;
  --mint-soft: #ccfbf1;
  --sun: #f5b700;
  --sun-soft: #fef9c3;
  --gold: #f4b400;
  --shadow: 0 12px 32px rgba(74, 58, 168, .08), 0 2px 8px rgba(74, 58, 168, .05);
  --shadow-lg: 0 26px 60px rgba(65, 48, 160, .17);
  --radius: 22px;
  --radius-sm: 14px;
  --sidebar: rgba(255, 255, 255, .78);
  --glass: rgba(255, 255, 255, .72);
  --ring: 0 0 0 4px rgba(108, 92, 231, .18);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f1e;
  --bg-2: #151731;
  --card: #181a30;
  --card-2: #1d1f39;
  --tx: #f2f1ff;
  --tx-2: #c0bfdc;
  --mu: #908fae;
  --bd: #2b2d4d;
  --bd-2: #242641;
  --pr: #8f7bff;
  --pr-2: #a99bff;
  --pr-soft: #282352;
  --prt: #141326;
  --ok: #34d399;
  --ok-soft: #0d3328;
  --warn: #fbbf24;
  --warn-soft: #3a2a08;
  --info: #60a5fa;
  --info-soft: #11294a;
  --danger: #f87171;
  --danger-soft: #421a20;
  --pink: #f472b6;
  --pink-soft: #3d1329;
  --mint: #2dd4bf;
  --mint-soft: #0c3330;
  --sun: #fcd34d;
  --sun-soft: #3b3008;
  --gold: #fbbf24;
  --shadow: 0 14px 36px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .18);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .45);
  --sidebar: rgba(18, 20, 40, .82);
  --glass: rgba(20, 22, 43, .78);
  --ring: 0 0 0 4px rgba(143, 123, 255, .22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 105% -10%, rgba(143, 123, 255, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(251, 113, 133, .12), transparent 60%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
  color: var(--tx);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: var(--tx); }
button { cursor: pointer; }
::selection { background: var(--pr); color: #fff; }
:focus-visible { outline: none; box-shadow: var(--ring); }

/* fondo decorativo */
.bg-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: blobFloat 18s ease-in-out infinite alternate; }
.blob.b1 { width: 380px; height: 380px; background: #c4b5fd; top: -120px; right: 8%; }
.blob.b2 { width: 320px; height: 320px; background: #bbf7d0; bottom: -100px; left: 22%; animation-delay: -6s; }
.blob.b3 { width: 300px; height: 300px; background: #fbcfe8; top: 42%; right: -120px; animation-delay: -12s; }
html[data-theme="dark"] .blob { opacity: .16; }

/* ===== estructura ===== */
.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: 264px; padding: 22px 16px 18px;
  display: flex; flex-direction: column; gap: 16px;
  background: var(--sidebar);
  border-right: 1px solid var(--bd);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.main { flex: 1; min-width: 0; margin-left: 264px; padding: 0 28px 48px; }
.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0 12px;
  background: linear-gradient(var(--bg) 72%, transparent);
}
.view { max-width: 1280px; margin: 0 auto; outline: none; animation: viewIn .45s cubic-bezier(.22, .8, .28, 1) both; }
.view + * { }
.boot { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 90px 0; color: var(--mu); }
.boot-fruit { font-size: 54px; animation: bob 1.8s ease-in-out infinite; }

/* ===== marca y navegación ===== */
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 10px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 15px; flex: 0 0 44px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #6c5ce7, #a855f7 60%, #ec4899);
  box-shadow: 0 10px 22px rgba(108, 92, 231, .35);
  animation: brandFloat 6s ease-in-out infinite;
}
.brand-mark svg { width: 28px; height: 28px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy b { font-size: 19px; letter-spacing: -.02em; }
.brand-copy small { font-size: 10.5px; color: var(--mu); letter-spacing: .02em; }

.side-aula {
  border-radius: 18px; padding: 13px 14px;
  background: linear-gradient(140deg, var(--pr-soft), var(--card));
  border: 1px solid var(--bd);
  position: relative; overflow: hidden;
}
.side-aula::after { content: ""; position: absolute; width: 70px; height: 70px; border-radius: 50%; background: var(--pr); opacity: .12; right: -22px; top: -22px; }
.side-aula .sa-label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--mu); font-weight: 800; }
.side-aula .sa-name { display: flex; align-items: center; gap: 9px; margin: 5px 0 9px; }
.side-aula .sa-name b { font-size: 17px; }
.side-aula .sa-name .sa-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.side-aula .sa-empty { color: var(--mu); font-size: 13px; margin: 5px 0 9px; }
.side-aula .sa-switch { width: 100%; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--bd); background: var(--card); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.side-aula .sa-switch:hover { border-color: var(--pr); color: var(--pr); }

.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; padding-right: 2px; }
.nav-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--mu); font-weight: 800; padding: 10px 10px 5px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 13px; font-weight: 650; font-size: 14px; color: var(--tx-2);
  transition: background .18s, color .18s, transform .18s;
  position: relative;
}
.nav a .nav-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: transparent; transition: background .18s, color .18s; }
.nav a:hover { background: var(--bd-2); color: var(--tx); transform: translateX(2px); }
.nav a.on { background: linear-gradient(135deg, var(--pr), var(--pr-2)); color: #fff; box-shadow: 0 10px 22px rgba(108, 92, 231, .28); }
.nav a.on .nav-ico { background: rgba(255, 255, 255, .16); }
.nav a.disabled { opacity: .38; pointer-events: none; }
.nav a .nav-badge { margin-left: auto; font-size: 10px; background: var(--ok); color: #fff; padding: 1px 7px; border-radius: 99px; font-weight: 800; }
.nav a .nav-badge.warn { background: var(--danger); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-link {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--bd);
  background: transparent; color: var(--mu); font-size: 12.5px; font-weight: 650;
}
.side-link:hover { color: var(--pr); border-color: var(--pr); background: var(--pr-soft); }
.side-foot p { font-size: 10.5px; color: var(--mu); text-align: center; line-height: 1.5; }

/* ===== barra superior ===== */
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--mu); min-width: 0; flex-wrap: wrap; }
.crumb-home { display: inline-flex; align-items: center; gap: 5px; color: var(--mu); }
.crumb-home:hover { color: var(--pr); }
.crumbs b { color: var(--tx); font-weight: 750; }
.crumbs .sep { opacity: .45; }
.crumbs .crumb-aula { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; background: var(--pr-soft); color: var(--pr); font-weight: 800; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.date-chip { font-size: 12px; color: var(--mu); padding: 8px 12px; border: 1px solid var(--bd); border-radius: 99px; background: var(--glass); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sync-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 99px; border: 1px solid var(--bd);
  background: var(--glass); color: var(--tx-2);
  font: inherit; font-size: 11.5px; font-weight: 750; white-space: nowrap; cursor: pointer;
  transition: color .18s, background .18s, border-color .18s, transform .18s;
}
.sync-chip:hover { transform: translateY(-1px); border-color: var(--pr); color: var(--pr); }
.sync-chip .ico { flex: 0 0 auto; }
.sync-chip.ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 26%, var(--bd)); }
.sync-chip.local { color: var(--mu); }
.sync-chip.busy { color: var(--info); background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 26%, var(--bd)); }
.sync-chip.busy .ico { animation: spin 1.4s linear infinite; }
.sync-chip.off { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, var(--bd)); }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border: 1px solid var(--bd); background: var(--card); border-radius: 12px;
  transition: border-color .18s, color .18s, transform .18s, background .18s;
}
.icon-btn:hover { border-color: var(--pr); color: var(--pr); transform: translateY(-1px); }
.only-mobile { display: none; }
.drawer-backdrop { display: none; }

/* ===== frutas, chips y etiquetas ===== */
.fruit-art { display: inline-block; width: 42px; height: 42px; flex: 0 0 auto; line-height: 0; vertical-align: middle; }
.fruit-art svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 7px rgba(30, 20, 70, .16)); }
.fruit-art.mini { width: 18px; height: 18px; }
.fruit-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 5px;
  border-radius: 99px; background: var(--fruit-soft, var(--bd-2)); color: var(--tx-2);
  font-size: 10.5px; font-weight: 750; white-space: nowrap; border: 1px solid transparent;
}
.fruit-chip .fruit-art.mini { width: 17px; height: 17px; }
.fruit-chip.empty { background: var(--bd-2); color: var(--mu); border-color: var(--bd); padding: 3px 9px; }
html[data-theme="dark"] .fruit-chip { background: color-mix(in srgb, var(--fruit, #666) 18%, var(--card)); }
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 9.5px; font-weight: 850; color: #fff; background: var(--mu); letter-spacing: .01em; }
.tag.Presente { background: var(--ok); }
.tag.Tardanza { background: var(--warn); }
.tag.Excusa { background: var(--info); }
.tag.Ausente { background: var(--danger); }
.cat-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }

/* ===== pestañas internas ===== */
.tabbar {
  display: inline-flex; gap: 4px; padding: 4px; max-width: 100%; overflow-x: auto;
  background: var(--card); border: 1px solid var(--bd); border-radius: 15px; box-shadow: var(--shadow);
}
.tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border-radius: 11px; border: 1px solid transparent; background: transparent;
  color: var(--mu); font-size: 12.5px; font-weight: 750; white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s;
}
.tab:hover { background: var(--bd-2); color: var(--tx); }
.tab.on { background: linear-gradient(135deg, var(--pr), var(--pr-2)); color: #fff; box-shadow: 0 8px 18px rgba(108, 92, 231, .25); }
.tab b { font-size: 9px; padding: 1px 6px; border-radius: 99px; background: var(--bd-2); color: var(--mu); }
.tab.on b { background: rgba(255, 255, 255, .2); color: #fff; }

/* ===== tipografía y utilidades ===== */
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 850; color: var(--pr); }
.eyebrow.on-dark { color: rgba(255, 255, 255, .78); }
.muted { color: var(--mu); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.strong { font-weight: 750; }
.hide { display: none !important; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--bd); margin: 14px 0; }
.scroll-y { overflow-y: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ===== botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--bd);
  background: var(--card); font-weight: 700; font-size: 13.5px;
  transition: transform .18s, box-shadow .18s, border-color .18s, background .18s, color .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--pr); color: var(--pr); box-shadow: 0 8px 18px rgba(108, 92, 231, .12); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--pr), var(--pr-2)); color: #fff; border-color: transparent; box-shadow: 0 10px 22px rgba(108, 92, 231, .28); }
.btn.primary:hover { color: #fff; box-shadow: 0 14px 28px rgba(108, 92, 231, .4); }
.btn.soft { background: var(--pr-soft); color: var(--pr); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--mu); }
.btn.ghost:hover { background: var(--bd-2); color: var(--tx); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.danger:hover { color: #fff; box-shadow: 0 10px 22px rgba(226, 59, 59, .32); }
.btn.success { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.success:hover { color: #fff; }
.btn.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.btn.white { background: #fff; color: #5b4be0; border-color: transparent; box-shadow: 0 10px 24px rgba(20, 10, 80, .2); }
.btn.white:hover { color: #4b3bd0; }
.btn.glass { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .32); backdrop-filter: blur(4px); }
.btn.glass:hover { color: #fff; background: rgba(255, 255, 255, .26); }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 9px; }
.btn.xs { padding: 4px 8px; font-size: 11.5px; border-radius: 8px; gap: 5px; }
.btn.block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .45; pointer-events: none; }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

/* ===== formularios ===== */
input, select, textarea {
  background: var(--card); border: 1px solid var(--bd); border-radius: 11px;
  padding: 9px 11px; min-width: 0; font-size: 13.5px; transition: border-color .18s, box-shadow .18s;
}
input:hover, select:hover, textarea:hover { border-color: #cfc9ee; }
input:focus, select:focus, textarea:focus { border-color: var(--pr); box-shadow: var(--ring); outline: none; }
textarea { width: 100%; resize: vertical; min-height: 84px; line-height: 1.5; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--mu); font-weight: 650; }
label.field > span { display: inline-flex; align-items: center; gap: 5px; }
input[type="date"] { color-scheme: inherit; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > .ico { position: absolute; left: 11px; color: var(--mu); pointer-events: none; }
.input-icon input { padding-left: 35px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--tx-2); line-height: 1.4; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--pr); margin-top: 1px; flex: 0 0 17px; }
.search-box { position: relative; flex: 1; min-width: 160px; }
.search-box .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--mu); }
.search-box input { width: 100%; padding-left: 35px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 11.5px; color: var(--mu); line-height: 1.45; }
.err { color: var(--danger); font-size: 12px; }

/* ===== tarjetas y paneles ===== */
.panel {
  background: var(--card); border: 1px solid var(--bd); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.panel.tight { padding: 15px; }
.panel.flat { box-shadow: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h3 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.panel-head h3 .ico { color: var(--pr); }
.panel-head p { font-size: 12px; color: var(--mu); margin-top: 2px; }
.panel-head .ph-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.panel.tint { background: linear-gradient(150deg, var(--card), var(--card-2)); }
.panel.gradient { background: linear-gradient(135deg, var(--pr-soft), var(--card) 70%); }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.dash { grid-template-columns: 1.15fr .85fr; }
.grid.side { grid-template-columns: 1fr 340px; }
.grid.gap-sm { gap: 12px; }

/* ===== cabecera de página ===== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.page-head-copy { min-width: 0; }
.page-head h1 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.035em; margin: 4px 0 6px; }
.page-head p { color: var(--mu); font-size: 13.5px; max-width: 720px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aula-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--pr-soft); color: var(--pr); font-size: 11px; font-weight: 850; letter-spacing: .03em; }

/* ===== hero de aulas ===== */
.hero {
  position: relative; overflow: hidden; border-radius: 30px;
  padding: clamp(26px, 4vw, 44px);
  background: linear-gradient(120deg, #5344d8 0%, #7c5cff 48%, #b06cff 100%);
  color: #fff; box-shadow: 0 28px 60px rgba(84, 62, 210, .3);
  margin-bottom: 22px;
  isolation: isolate;
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 420px; height: 420px; right: -130px; top: -190px; background: rgba(255, 255, 255, .12); }
.hero::after { width: 280px; height: 280px; right: 130px; bottom: -190px; background: rgba(255, 255, 255, .08); }
.hero-copy { position: relative; z-index: 2; max-width: 660px; }
.hero h1 { font-size: clamp(27px, 3.6vw, 43px); letter-spacing: -.04em; line-height: 1.08; margin: 9px 0 10px; }
.hero p { color: rgba(255, 255, 255, .82); font-size: 14px; max-width: 560px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-art { position: absolute; right: 3%; top: 50%; transform: translateY(-50%); width: min(330px, 30%); height: 300px; z-index: 1; }
.hero-fruit {
  position: absolute; display: grid; place-items: center;
  width: 118px; height: 118px; border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 22px 44px rgba(40, 20, 120, .28);
  animation: float 6s ease-in-out infinite;
}
.hero-fruit .fruit-art { width: 84px; height: 84px; }
.hero-fruit.f1 { left: 6px; top: 46px; rotate: -8deg; animation-delay: -.4s; }
.hero-fruit.f2 { width: 146px; height: 146px; left: 104px; top: 4px; z-index: 2; animation-delay: -2s; }
.hero-fruit.f3 { left: 58px; top: 178px; rotate: 9deg; animation-delay: -3.6s; }
.hero-fruit.f2 .fruit-art { width: 104px; height: 104px; }
.hero-fruit.f3 .fruit-art { width: 78px; height: 78px; }
.hero .spark { position: absolute; color: rgba(255, 255, 255, .7); animation: twinkle 3.4s ease-in-out infinite; }
.hero .spark.s1 { top: 20%; left: 62%; font-size: 20px; }
.hero .spark.s2 { bottom: 18%; left: 55%; font-size: 14px; animation-delay: 1.2s; }
.hero .spark.s3 { top: 26%; right: 6%; font-size: 16px; animation-delay: 2.2s; }

/* ===== métricas ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  display: flex; align-items: center; gap: 13px; padding: 16px;
  background: var(--card); border: 1px solid var(--bd); border-radius: 18px;
  box-shadow: var(--shadow); animation: cardIn .5s backwards; animation-delay: var(--d, 0s);
  min-width: 0;
}
.stat-ico { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; display: grid; place-items: center; background: var(--pr-soft); color: var(--pr); }
.stat-card.green .stat-ico { background: var(--ok-soft); color: var(--ok); }
.stat-card.amber .stat-ico { background: var(--warn-soft); color: var(--warn); }
.stat-card.pink .stat-ico { background: var(--pink-soft); color: var(--pink); }
.stat-card .stat-value { display: block; font-size: 23px; letter-spacing: -.04em; line-height: 1.1; }
.stat-card .stat-label { display: block; font-size: 11.5px; color: var(--mu); font-weight: 650; }
.stat-card small { display: block; font-size: 10.5px; color: var(--mu); margin-top: 2px; }

/* ===== rejilla de aulas ===== */
.aula-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.aula-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--bd); border-radius: 24px;
  padding: 20px; box-shadow: var(--shadow);
  transition: transform .28s cubic-bezier(.22, .8, .28, 1), box-shadow .28s, border-color .28s;
  animation: cardIn .5s backwards; animation-delay: var(--d, 0s);
  display: flex; flex-direction: column; gap: 12px;
}
.aula-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.aula-card::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; right: -60px; top: -70px; background: var(--accent); opacity: .07; transition: transform .4s, opacity .4s; }
.aula-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--bd)); }
.aula-card:hover::after { transform: scale(1.3); opacity: .12; }
.aula-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent), var(--shadow); }
.aula-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.aula-icon {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  box-shadow: 0 10px 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
.aula-icon .ico { width: 25px; height: 25px; }
.aula-badge { font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 4px 9px; border-radius: 99px; }
.aula-badge.on { background: var(--ok-soft); color: var(--ok); }
.aula-title { font-size: 27px; letter-spacing: -.045em; }
.aula-sub { font-size: 12px; color: var(--mu); margin-top: -4px; }
.aula-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aula-metric { background: var(--card-2); border: 1px solid var(--bd-2); border-radius: 13px; padding: 9px 10px; }
.aula-metric b { display: block; font-size: 18px; letter-spacing: -.03em; }
.aula-metric small { display: block; font-size: 10px; color: var(--mu); font-weight: 650; }
.aula-fruits { display: flex; align-items: center; gap: 2px; min-height: 30px; }
.aula-fruits .fruit-art { width: 28px; height: 28px; margin-right: -4px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.12)); }
.aula-fruits small { margin-left: 8px; font-size: 10.5px; color: var(--mu); }
.enter-btn {
  margin-top: auto; width: 100%; padding: 11px 14px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 28%, transparent);
  transition: transform .2s, box-shadow .2s, gap .2s;
}
.enter-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px color-mix(in srgb, var(--accent) 38%, transparent); gap: 14px; }
.enter-btn .ico { transition: transform .2s; }
.enter-btn:hover .ico { transform: translateX(2px); }
.aula-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 260px; border: 2px dashed var(--bd); border-radius: 24px; background: transparent;
  color: var(--mu); font-weight: 750; transition: border-color .2s, color .2s, background .2s;
}
.aula-add:hover { border-color: var(--pr); color: var(--pr); background: var(--pr-soft); }
.aula-add .plus-ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--bd); }

/* ===== panel de resumen ===== */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut {
  --sz: 150px; width: var(--sz); height: var(--sz); border-radius: 50%;
  position: relative; flex: 0 0 var(--sz); display: grid; place-items: center;
  animation: pop .55s cubic-bezier(.2, .9, .3, 1.3) both;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
}
.donut::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--card); }
.donut-hole { position: relative; z-index: 1; text-align: center; }
.donut-hole b { display: block; font-size: 27px; letter-spacing: -.05em; line-height: 1; }
.donut-hole small { display: block; font-size: 9.5px; color: var(--mu); text-transform: uppercase; letter-spacing: .1em; font-weight: 800; margin-top: 3px; }
.legend { display: flex; flex-direction: column; gap: 7px; min-width: 150px; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tx-2); }
.legend-item .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.legend-item b { margin-left: auto; font-size: 13px; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.info { background: var(--info); } .dot.danger { background: var(--danger); }
.progress { height: 8px; border-radius: 99px; background: var(--bd-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--pr), var(--pr-2)); transition: width .6s cubic-bezier(.2, .8, .3, 1); }
.progress.green > i { background: linear-gradient(90deg, #34d399, #16a34a); }
.progress.amber > i { background: linear-gradient(90deg, #fbbf24, #e08b00); }
.progress.danger > i { background: linear-gradient(90deg, #fb7185, #e23b3b); }

.mini-board { display: flex; flex-direction: column; gap: 8px; }
.board-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 13px; background: var(--card-2); border: 1px solid var(--bd-2);
  transition: transform .18s, border-color .18s, background .18s;
}
.board-row:hover { transform: translateX(3px); border-color: var(--bd); background: var(--card); }
.board-row .rank { width: 22px; font-size: 11px; font-weight: 850; color: var(--mu); text-align: center; }
.board-row .rank.top { color: var(--gold); }
.board-row .fruit-art { width: 28px; height: 28px; flex: 0 0 28px; }
.board-row .br-name { font-size: 12.5px; font-weight: 750; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .br-sub { font-size: 10.5px; color: var(--mu); }
.board-row .stars { margin-left: auto; }
.board-row .stars .star { width: 15px; height: 15px; }

.activity { display: flex; flex-direction: column; }
.act-item { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--bd-2); }
.act-item:last-child { border-bottom: 0; }
.act-ico { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 10px; display: grid; place-items: center; background: var(--pr-soft); color: var(--pr); }
.act-ico.ok { background: var(--ok-soft); color: var(--ok); }
.act-ico.danger { background: var(--danger-soft); color: var(--danger); }
.act-ico.warn { background: var(--warn-soft); color: var(--warn); }
.act-ico.info { background: var(--info-soft); color: var(--info); }
.act-main { min-width: 0; flex: 1; }
.act-main b { font-size: 12.5px; }
.act-main p { font-size: 11.5px; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-time { font-size: 10px; color: var(--mu); white-space: nowrap; }

.alert-list { display: flex; flex-direction: column; gap: 9px; }
.alert-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 13px; background: var(--card-2); border: 1px solid var(--bd-2); }
.alert-row .ar-main { flex: 1; min-width: 0; }
.alert-row .ar-main b { font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-row .ar-main small { font-size: 10.5px; color: var(--mu); }

/* ===== asistencia ===== */
.att-toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.att-toolbar .field { min-width: 130px; }
.att-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sum-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--bd-2); font-size: 12px; font-weight: 700; }
.sum-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.sum-chip b { font-size: 13px; }
.sum-chip.total { background: var(--pr-soft); border-color: transparent; color: var(--pr); }
.att-progress { display: flex; align-items: center; gap: 10px; }
.att-progress .progress { flex: 1; min-width: 100px; }
.att-progress b { font-size: 12px; color: var(--tx); font-weight: 800; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; border-radius: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 11px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--bd-2); }
th { font-size: 10px; color: var(--mu); text-transform: uppercase; letter-spacing: .09em; font-weight: 850; background: var(--card-2); white-space: nowrap; }
th:first-child { border-top-left-radius: 12px; } th:last-child { border-top-right-radius: 12px; }
tbody tr { transition: background .16s; }
tbody tr:hover { background: var(--card-2); }
tbody tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: 10.5px; color: var(--mu); margin-top: 1px; }
.att-table { min-width: 840px; }
.att-table td { padding: 8px 10px; }
.att-table .c-est { min-width: 210px; }
.att-table .c-time { width: 62px; }
.att-table .c-hearts { width: 96px; }
.att-table .c-part, .att-table .c-extra { width: 92px; }
.student-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.student-cell .st-main { min-width: 0; }
.student-cell .st-name { font-weight: 750; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; display: block; }
.student-cell .st-sub { font-size: 10px; color: var(--mu); display: flex; align-items: center; gap: 5px; }
.student-cell .st-sub .fruit-art { width: 13px; height: 13px; }
.avatar {
  width: var(--sz, 38px); height: var(--sz, 38px); flex: 0 0 var(--sz, 38px);
  border-radius: 50%; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--av) 24%, white), color-mix(in srgb, var(--av) 52%, white));
  color: color-mix(in srgb, var(--av) 82%, black);
  font-size: calc(var(--sz, 38px) * .34); font-weight: 850; letter-spacing: -.02em;
  border: 2px solid var(--card); box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
html[data-theme="dark"] .avatar { background: color-mix(in srgb, var(--av) 32%, #181a30); color: #fff; }
.avatar.more { background: var(--bd-2); color: var(--mu); font-size: 10px; }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { margin-right: -8px; }
.avatar-stack .avatar:last-child { margin-right: 0; }

.hearts { display: inline-flex; gap: 1px; letter-spacing: 0; }
.heart { font-size: 15px; line-height: 1; transition: transform .2s, color .2s; }
.heart.full { color: #f43f5e; text-shadow: 0 2px 4px rgba(244, 63, 94, .3); }
.heart.empty { color: var(--bd); }
.sanc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 86px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--bd);
  background: var(--card); font-size: 11px;
}
.sanc-btn:hover { border-color: var(--pink); background: var(--pink-soft); }
.sanc-btn.cero { border-color: var(--danger); background: var(--danger-soft); animation: softPulse 2.4s infinite; }
.sanc-btn .lb { display: none; font-weight: 800; font-size: 10.5px; color: var(--danger); }
.sanc-btn:hover .hearts, .sanc-btn:focus .hearts { display: none; }
.sanc-btn:hover .lb, .sanc-btn:focus .lb { display: inline; }
.state-btns { display: flex; gap: 3px; }
.state-btns button {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 8px;
  border: 1px solid var(--bd); background: var(--card); font-size: 11px; font-weight: 650;
  color: var(--mu); transition: all .15s;
}
.state-btns button:hover { border-color: var(--tx-2); color: var(--tx); }
.state-btns button .ico { width: 12px; height: 12px; }
.state-btns .Presente.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.state-btns .Tardanza.on { background: var(--warn); border-color: var(--warn); color: #fff; }
.state-btns .Excusa.on { background: var(--info); border-color: var(--info); color: #fff; }
.state-btns .Ausente.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.state-btns button { flex: 1; justify-content: center; }
.att-table td.c-state { min-width: 236px; }
.num-input { width: 100%; text-align: center; padding: 6px 5px; font-size: 12.5px; border-radius: 8px; }
.time-note { display: block; font-size: 9px; color: var(--mu); text-align: center; margin-top: 2px; font-variant-numeric: tabular-nums; }
.row-marked .student-cell .st-name { color: var(--tx); }
.row-marked { background: color-mix(in srgb, var(--ok) 3%, transparent); }
.row-flash { animation: rowFlash .7s ease; }
.marked-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; color: var(--ok); font-weight: 800; }
.att-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-pill { padding: 6px 10px; border-radius: 99px; border: 1px solid var(--bd); background: var(--card); font-size: 11.5px; font-weight: 700; color: var(--mu); }
.filter-pill.on { background: var(--pr); border-color: var(--pr); color: #fff; }
.filter-pill:hover:not(.on) { border-color: var(--pr); color: var(--pr); }

/* ===== notas ===== */
.notas-toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.notas-toolbar .field { min-width: 140px; }
.weights-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.weight-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--mu); background: var(--card-2); border: 1px solid var(--bd-2); padding: 4px 8px; border-radius: 99px; }
.weight-chip b { color: var(--tx); }
.notas-table { min-width: 760px; }
.notas-table th, .notas-table td { text-align: center; }
.notas-table th:first-child, .notas-table td:first-child { text-align: left; }
.notas-table .grade-cell {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 4px 7px;
  transition: background .15s, border-color .15s; min-width: 58px;
}
.notas-table .grade-cell:hover { background: var(--pr-soft); border-color: var(--pr); }
.notas-table .grade-cell .n { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.notas-table .grade-cell .n.none { color: var(--mu); font-weight: 500; }
.notas-table .grade-cell .c { font-size: 9px; color: var(--mu); }
.grade-chip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 54px;
  padding: 4px 8px; border-radius: 9px; font-size: 12px; font-weight: 850; font-variant-numeric: tabular-nums;
}
.grade-chip.excellent { background: var(--ok-soft); color: var(--ok); }
.grade-chip.good { background: var(--info-soft); color: var(--info); }
.grade-chip.pass { background: var(--pr-soft); color: var(--pr); }
.grade-chip.warn { background: var(--warn-soft); color: var(--warn); }
.grade-chip.low { background: var(--danger-soft); color: var(--danger); }
.grade-chip.none { background: var(--bd-2); color: var(--mu); }
.avg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.avg-box { background: var(--card-2); border: 1px solid var(--bd-2); border-radius: 14px; padding: 11px 12px; }
.avg-box small { display: block; font-size: 10px; color: var(--mu); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.avg-box b { display: block; font-size: 21px; letter-spacing: -.04em; margin-top: 2px; }
.subject-bar { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.subject-bar .sb-name { width: 160px; font-size: 12px; font-weight: 700; }
.subject-bar .progress { flex: 1; }
.subject-bar .sb-val { width: 40px; text-align: right; font-size: 12px; font-weight: 800; }
.notes-timeline { display: flex; flex-direction: column; gap: 10px; }
.obs-card { background: var(--card-2); border: 1px solid var(--bd-2); border-radius: 15px; padding: 12px 14px; transition: border-color .18s, transform .18s; }
.obs-card:hover { border-color: var(--bd); transform: translateY(-1px); }
.obs-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.obs-head .avatar { --sz: 28px; }
.obs-head b { font-size: 12.5px; }
.obs-head .obs-date { margin-left: auto; font-size: 10px; color: var(--mu); }
.obs-text { font-size: 12.5px; color: var(--tx-2); line-height: 1.5; white-space: pre-wrap; }
.obs-type { font-size: 9.5px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; }
.obs-type.Académica { background: var(--info-soft); color: var(--info); }
.obs-type.Conducta { background: var(--danger-soft); color: var(--danger); }
.obs-type.Positiva { background: var(--ok-soft); color: var(--ok); }
.obs-type.Seguimiento { background: var(--warn-soft); color: var(--warn); }
.type-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.type-pill { padding: 6px 10px; border-radius: 99px; border: 1px solid var(--bd); background: var(--card); font-size: 11.5px; font-weight: 750; color: var(--mu); }
.type-pill.on { color: #fff; border-color: transparent; }
.type-pill.on.Académica { background: var(--info); }
.type-pill.on.Conducta { background: var(--danger); }
.type-pill.on.Positiva { background: var(--ok); }
.type-pill.on.Seguimiento { background: var(--warn); }

/* ===== grupos ===== */
.group-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 16px; }
.group-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background:
    radial-gradient(140px 120px at 50% 0%, var(--fruit-soft), transparent 75%),
    var(--card);
  border: 1px solid var(--bd); border-radius: 26px; padding: 16px 14px 14px;
  box-shadow: var(--shadow); text-align: center;
  transition: transform .28s cubic-bezier(.2, .8, .3, 1), box-shadow .28s, border-color .28s;
  animation: cardIn .5s backwards; animation-delay: var(--d, 0s);
}
.group-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--fruit), color-mix(in srgb, var(--fruit) 45%, white)); }
.group-card:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--fruit) 40%, var(--bd)); }
.group-card .fruit-art { width: 96px; height: 96px; animation: float 5.5s ease-in-out infinite; animation-delay: var(--fd, 0s); }
.group-card h3 { font-size: 18px; letter-spacing: -.03em; }
.group-card .g-sub { font-size: 11px; color: var(--mu); margin-top: -4px; }
.group-card .g-members { display: flex; align-items: center; justify-content: center; margin: 2px 0; }
.group-card .g-members .avatar { --sz: 28px; margin-right: -7px; }
.group-card .g-members .avatar:last-child { margin-right: 0; }
.group-card .g-more { font-size: 10px; color: var(--mu); margin-left: 9px; }
.group-card .stars { justify-content: center; }
.group-card .enter-group { width: 100%; margin-top: 5px; padding: 9px 12px; border-radius: 12px; border: 0; font-weight: 800; font-size: 12.5px; color: #fff; background: linear-gradient(135deg, var(--fruit), color-mix(in srgb, var(--fruit) 55%, black)); display: flex; align-items: center; justify-content: center; gap: 7px; transition: gap .2s, transform .2s; }
.group-card .enter-group:hover { gap: 12px; transform: translateY(-1px); }
.stars { display: inline-flex; gap: 2px; align-items: center; }
.star { transition: transform .2s; }
.star.filled { fill: var(--gold); stroke: color-mix(in srgb, var(--gold) 65%, black); filter: drop-shadow(0 3px 4px rgba(244, 180, 0, .35)); }
.star.empty { fill: var(--bd); stroke: var(--bd); }
.star.pop { animation: starPop .45s cubic-bezier(.2, .9, .3, 1.5); }
.zero-stars { font-size: 10px; color: var(--danger); font-weight: 800; background: var(--danger-soft); padding: 3px 8px; border-radius: 99px; }
.group-detail-hero {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  padding: 24px; border-radius: 28px; border: 1px solid var(--bd);
  background:
    radial-gradient(260px 200px at 10% 10%, var(--fruit-soft), transparent 70%),
    linear-gradient(140deg, var(--card), var(--card-2));
  box-shadow: var(--shadow); margin-bottom: 18px; position: relative; overflow: hidden;
}
.group-detail-hero::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: var(--fruit); opacity: .06; right: -60px; bottom: -100px; }
.gd-fruit { width: 150px; height: 150px; display: grid; place-items: center; background: rgba(255,255,255,.6); border-radius: 50%; box-shadow: inset 0 0 0 1px var(--bd); }
html[data-theme="dark"] .gd-fruit { background: rgba(255,255,255,.04); }
.gd-fruit .fruit-art { width: 118px; height: 118px; animation: float 5.5s ease-in-out infinite; }
.gd-copy h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.gd-copy p { color: var(--mu); font-size: 12.5px; margin-top: 3px; }
.gd-stars { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; z-index: 1; }
.gd-stars .stars .star { width: 34px; height: 34px; }
.gd-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.member-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--bd-2); transition: border-color .18s, background .18s, transform .18s; }
.member-card:hover { border-color: var(--bd); background: var(--card); transform: translateY(-1px); }
.member-card .mc-main { flex: 1; min-width: 0; }
.member-card .mc-main b { display: block; font-size: 12.5px; line-height: 1.2; overflow-wrap: anywhere; }
.member-card .mc-main small { display: block; font-size: 10px; color: var(--mu); }
.member-card .mc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.member-card .hearts .heart { font-size: 11px; }
.member-card .icon-btn { width: 26px; height: 26px; border: 0; background: transparent; color: var(--mu); border-radius: 8px; }
.member-card .icon-btn:hover { color: var(--danger); background: var(--danger-soft); }
.log-list { display: flex; flex-direction: column; }
.log-item { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px dashed var(--bd-2); }
.log-item:last-child { border-bottom: 0; }
.log-dot { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); }
.log-dot.up { background: var(--ok-soft); color: var(--ok); }
.log-main { flex: 1; min-width: 0; }
.log-main b { font-size: 12.5px; }
.log-main p { font-size: 11.5px; color: var(--mu); }
.log-time { font-size: 10px; color: var(--mu); white-space: nowrap; }
.star-help { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 72%, black); font-size: 11.5px; line-height: 1.45; }
html[data-theme="dark"] .star-help { color: var(--sun); }
.star-help .ico { flex: 0 0 20px; margin-top: 1px; }

/* ===== estudiantes ===== */
.students-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.students-table { min-width: 760px; }
.st-cell { display: flex; align-items: center; gap: 10px; }
.st-cell .st-main { min-width: 0; }
.st-cell .st-main b { display: block; font-size: 13px; }
.st-cell .st-main small { display: block; font-size: 10.5px; color: var(--mu); }
.actions-cell { display: flex; gap: 4px; justify-content: flex-end; }
.actions-cell .icon-btn { width: 30px; height: 30px; border-radius: 9px; }
.actions-cell .icon-btn:hover { background: var(--pr-soft); }

/* ===== historial ===== */
.hist-filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.hist-filters .field { min-width: 130px; }
.hist-table { min-width: 720px; }
.stat-mini { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-mini > div { min-width: 100px; }
.stat-mini b { display: block; font-size: 20px; letter-spacing: -.03em; }
.stat-mini small { font-size: 10.5px; color: var(--mu); }

/* ===== modal ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; padding: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(18, 16, 45, .52); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .18s ease;
}
.modal-overlay.show { opacity: 1; }
.modal {
  width: 100%; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--bd); border-radius: 24px;
  box-shadow: 0 40px 90px rgba(10, 8, 40, .34);
  transform: translateY(16px) scale(.98); transition: transform .22s cubic-bezier(.2, .85, .3, 1.1);
  overflow: hidden;
}
.modal-overlay.show .modal { transform: none; }
.modal.sm { max-width: 430px; }
.modal.md { max-width: 580px; }
.modal.lg { max-width: 780px; }
.modal.xl { max-width: 1000px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 12px; border-bottom: 1px solid var(--bd-2); }
.modal-head > div { min-width: 0; }
.modal-head h2 { font-size: 18px; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; }
.modal-head p { font-size: 12px; color: var(--mu); margin-top: 3px; }
.modal-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--pr-soft); color: var(--pr); margin-bottom: 8px; }
.modal-head .icon-btn { flex: 0 0 36px; width: 36px; height: 36px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 20px 17px; border-top: 1px solid var(--bd-2); flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }
.confirm-text { font-size: 13.5px; color: var(--tx-2); line-height: 1.55; }
.modal .form-grid { gap: 11px; }
.modal .form-grid label.field { font-size: 11.5px; }
.modal section + section { margin-top: 16px; }
.modal .section-title { font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; color: var(--mu); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.modal .list-plain { display: flex; flex-direction: column; gap: 7px; }
.modal .list-row { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--bd-2); }
.modal .list-row .lr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.modal .list-row b { font-size: 12.5px; }
.modal .list-row small { font-size: 10.5px; color: var(--mu); }
.eval-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--bd-2); }
.eval-row .er-main { flex: 1; min-width: 0; }
.eval-row .er-main b { font-size: 12.5px; display: block; }
.eval-row .er-main small { font-size: 10px; color: var(--mu); }
.eval-row .er-score { font-size: 12px; font-weight: 850; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; max-height: 46vh; overflow-y: auto; padding-right: 3px; }
.score-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--bd-2); }
.score-row .sr-name { flex: 1; min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-row input { width: 64px; text-align: center; padding: 6px; font-size: 12px; }
.profile-hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 16px;
  background: linear-gradient(135deg, var(--pr-soft), var(--card));
  border: 1px solid var(--bd); margin-bottom: 15px;
}
.profile-hero::after { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; background: var(--pr); opacity: .08; right: -40px; top: -50px; }
.profile-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.profile-top .avatar { --sz: 56px; }
.profile-top h2 { font-size: 19px; letter-spacing: -.03em; }
.profile-top p { font-size: 11.5px; color: var(--mu); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.profile-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; position: relative; z-index: 1; }
.profile-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--card); border: 1px solid var(--bd); border-radius: 99px; padding: 4px 9px; font-size: 10.5px; font-weight: 700; color: var(--tx-2); }
.profile-chip b { color: var(--tx); }
.profile-chip .ico { color: var(--pr); }
.profile-section { border-top: 1px solid var(--bd-2); padding-top: 14px; margin-top: 14px; }
.profile-section > h3 { font-size: 13px; display: flex; align-items: center; gap: 6px; margin-bottom: 9px; }
.profile-section > h3 .ico { color: var(--pr); }
.mini-table { width: 100%; font-size: 11.5px; }
.mini-table th, .mini-table td { padding: 5px 6px; }
.mini-table th { font-size: 9px; }
.mini-table td { text-align: center; }
.mini-table td:first-child, .mini-table th:first-child { text-align: left; }
.add-note-box { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; padding: 10px; border-radius: 12px; background: var(--card-2); border: 1px dashed var(--bd); }
.add-note-box textarea { min-height: 62px; font-size: 12px; }
.add-note-box .row { gap: 6px; }

/* ===== aviso flotante ===== */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px);
  background: #211f3d; color: #fff; padding: 10px 16px; border-radius: 14px;
  font-size: 12.5px; font-weight: 650; display: flex; align-items: center; gap: 9px;
  box-shadow: 0 16px 40px rgba(20, 16, 60, .3); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; z-index: 200; max-width: min(92vw, 520px);
}
html[data-theme="dark"] .toast { background: #f2f1ff; color: #1d1b33; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-ico { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .14); flex: 0 0 24px; }
html[data-theme="dark"] .toast-ico { background: rgba(20, 18, 50, .1); }
.toast.ok .toast-ico { color: #4ade80; }
.toast.warn .toast-ico { color: #fbbf24; }
.toast.error .toast-ico { color: #f87171; }
.toast.info .toast-ico { color: #a5b4fc; }

/* confeti */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti-layer span {
  position: fixed; left: var(--x); top: var(--y);
  animation: confettiFly 1.1s cubic-bezier(.15, .65, .35, 1) forwards;
  animation-delay: var(--delay); will-change: transform, opacity;
}
@keyframes confettiFly {
  0% { transform: translate(-50%, -50%) rotate(0) scale(.4); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); opacity: 0; }
}

/* ===== detalles varios ===== */
.grade-cell .n.excellent { color: var(--ok); }
.grade-cell .n.good { color: var(--info); }
.grade-cell .n.pass { color: var(--pr); }
.grade-cell .n.warn { color: var(--warn); }
.grade-cell .n.low { color: var(--danger); }
.member-hearts { border: 0; background: transparent; padding: 2px 3px; border-radius: 7px; display: inline-flex; line-height: 1; }
.member-hearts:hover { background: var(--pink-soft); }
.member-hearts .heart { font-size: 11px; }
.sanc-hero {
  text-align: center; padding: 16px 14px; margin-bottom: 14px;
  border-radius: 18px; border: 1px solid var(--bd);
  background: radial-gradient(160px 100px at 50% 0%, var(--pink-soft), transparent 80%), var(--card-2);
}
.big-hearts { display: flex; justify-content: center; gap: 3px; margin-bottom: 7px; }
.big-hearts .heart { font-size: 32px; }
.sanc-hero p { font-size: 12px; color: var(--tx-2); }
.sanc-group { background: var(--card-2); border: 1px solid var(--bd-2); border-radius: 13px; padding: 10px 11px; }
.quick-tile {
  text-align: left; font: inherit; cursor: pointer; box-shadow: none;
  transition: transform .18s, border-color .18s, background .18s;
}
.quick-tile:hover { transform: translateY(-2px); border-color: var(--pr); background: var(--card); }
.quick-tile .stat-ico { width: 38px; height: 38px; flex: 0 0 38px; margin-bottom: 8px; }

/* ===== vacíos ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 34px 18px; gap: 7px; }
.empty-art { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: var(--pr-soft); color: var(--pr); margin-bottom: 4px; animation: bob 4s ease-in-out infinite; }
.empty-state h3 { font-size: 15.5px; }
.empty-state p { font-size: 12.5px; color: var(--mu); max-width: 380px; line-height: 1.5; }
.empty-state .btn { margin-top: 8px; }

/* ===== animaciones ===== */
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.86); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-9px) rotate(2deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes brandFloat { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-3deg); } }
@keyframes blobFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(30px, -24px) scale(1.08); } }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes softPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(226, 59, 59, .18); } 50% { box-shadow: 0 0 0 6px rgba(226, 59, 59, 0); } }
@keyframes rowFlash { 0% { background: var(--ok-soft); } 100% { background: transparent; } }
@keyframes starPop { 0% { transform: scale(.5) rotate(-25deg); } 60% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes punch { 0% { transform: scale(1); } 35% { transform: scale(.94); } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
.punch { animation: punch .35s ease; }

/* ===== barra inferior del celular ===== */
.tabbar { display: none; }

/* ===== datos y respaldo ===== */
.sync-hero {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 16px; border: 1px solid var(--bd);
  background: var(--card-2);
}
.sync-hero.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 24%, var(--bd)); }
.sync-hero.local { background: var(--pr-soft); border-color: color-mix(in srgb, var(--pr) 22%, var(--bd)); }
.sync-hero-ico { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 13px; background: var(--card); color: var(--pr); box-shadow: var(--shadow); }
.sync-hero.ok .sync-hero-ico { color: var(--ok); }
.sync-hero b { display: block; font-size: 14px; }
.sync-hero p { margin: 3px 0 0; font-size: 12px; color: var(--tx-2); line-height: 1.45; }
.sync-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sync-actions .btn { flex: 1 1 190px; justify-content: center; }
.sync-help { margin-top: 16px; padding: 13px 15px; border-radius: 14px; background: var(--card-2); border: 1px dashed var(--bd); }
.sync-help h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; font-size: 12.5px; }
.sync-help ol { margin: 0; padding-left: 18px; font-size: 12px; color: var(--tx-2); line-height: 1.55; }
.sync-help li + li { margin-top: 4px; }
.sync-help code { background: var(--bd-2); padding: 1px 5px; border-radius: 6px; font-size: 11px; }
.sync-help p { margin: 9px 0 0; }

/* ===== responsive ===== */
@media (max-width: 1180px) {
  .sidebar { width: 236px; }
  .main { margin-left: 236px; padding: 0 22px 42px; }
  .hero-art { width: 27%; }
  .grid.side { grid-template-columns: 1fr 300px; }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-105%); transition: transform .28s cubic-bezier(.2, .8, .3, 1); width: 280px; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; padding: 0 18px 42px; }
  .only-mobile { display: inline-grid; }
  .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(16, 14, 40, .45); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .drawer-backdrop.show { opacity: 1; pointer-events: auto; }
  .main { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--glass); border-top: 1px solid var(--bd);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 -8px 26px rgba(45, 32, 110, .10);
  }
  .tab-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    padding: 4px 2px 2px; border: 0; background: none; color: var(--tx-2);
    font: inherit; font-size: 10px; font-weight: 750; letter-spacing: .01em;
    text-decoration: none; border-radius: 14px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .tab-item .tab-ico {
    display: grid; place-items: center; width: 44px; height: 30px; border-radius: 11px;
    transition: background .18s, color .18s, transform .16s;
  }
  .tab-item.on { color: var(--pr); }
  .tab-item.on .tab-ico { background: var(--pr-soft); }
  .tab-item:active .tab-ico { transform: scale(.9); }
  .sync-label { display: none; }
  .sync-chip { padding: 0; width: 40px; height: 40px; justify-content: center; border-radius: 12px; }
  input, select, textarea, .state-btns button, .btn, .icon-btn, .filter-pill { touch-action: manipulation; }
  input, select, textarea { font-size: 16px; }
  .icon-btn { min-width: 40px; min-height: 40px; }
  .actions-cell .icon-btn { width: 38px; height: 38px; }
  .state-btns button { min-height: 38px; }
  .sidebar { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid.dash, .grid.side, .grid.two { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero-copy { max-width: none; }
  .avg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .main { padding: 0 12px calc(92px + env(safe-area-inset-bottom)); }
  .topbar { padding: 10px 0 8px; gap: 8px; }
  .date-chip { display: none; }
  .page-head { align-items: flex-start; }
  .head-actions { width: 100%; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 12px; gap: 9px; }
  .stat-ico { width: 38px; height: 38px; flex: 0 0 38px; }
  .stat-card .stat-value { font-size: 19px; }
  .aula-grid, .group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .aula-card { padding: 14px; border-radius: 18px; gap: 9px; }
  .aula-title { font-size: 21px; }
  .aula-icon { width: 40px; height: 40px; border-radius: 13px; }
  .aula-metrics { grid-template-columns: 1fr; gap: 5px; }
  .aula-add { min-height: 210px; }
  .group-card { padding: 12px 10px; border-radius: 18px; }
  .group-card .fruit-art { width: 82px; height: 82px; }
  .group-detail-hero { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .gd-fruit { margin: 0 auto; width: 108px; height: 108px; }
  .gd-fruit .fruit-art { width: 86px; height: 86px; }
  .gd-stars { align-items: center; }
  .gd-actions { justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .panel { padding: 15px; border-radius: 18px; }
  .hero { border-radius: 22px; }
  .hero-actions .btn { flex: 1; }
  .student-cell .st-name { max-width: 150px; }
  .att-table { min-width: 0; }
  .att-table thead { display: none; }
  .att-table, .att-table tbody { display: flex; flex-direction: column; }
  .att-table tbody { gap: 9px; }
  .att-table tr {
    display: grid; grid-template-columns: 1fr auto; gap: 7px 9px; padding: 11px;
    border: 1px solid var(--bd-2); border-radius: 14px; background: var(--card-2);
    grid-template-areas: "est hearts" "state state" "part extra" "time time";
  }
  .att-table td { border: 0; padding: 0; }
  .att-table .c-est { grid-area: est; }
  .att-table .c-hearts { grid-area: hearts; justify-self: end; }
  .att-table .c-state { grid-area: state; min-width: 0; }
  .att-table .c-part { grid-area: part; }
  .att-table .c-extra { grid-area: extra; }
  .att-table .c-time { grid-area: time; text-align: right; }
  .att-table .c-part::before, .att-table .c-extra::before { content: attr(data-label); display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: var(--mu); font-weight: 800; margin-bottom: 3px; }
  .state-btns button { font-size: 10px; padding: 6px 4px; }
  .state-btns button .ico { display: none; }
  .student-cell .st-name { max-width: none; }
  /* estudiantes en tarjetas (sin desplazamiento horizontal) */
  .table-cards { min-width: 0; }
  .table-cards thead { display: none; }
  .table-cards tbody { display: flex; flex-direction: column; gap: 10px; }
  .table-cards tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "main main" "team hearts" "avg notes" "actions actions";
    gap: 7px 12px; padding: 12px; border: 1px solid var(--bd-2); border-radius: 16px; background: var(--card-2);
  }
  .table-cards td { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; padding: 0; font-size: 12px; min-width: 0; }
  .table-cards td::before { content: attr(data-label); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); font-weight: 800; white-space: nowrap; }
  .table-cards td:nth-child(1) { grid-area: main; }
  .table-cards td:nth-child(1)::before, .table-cards td:nth-child(6)::before { display: none; }
  .table-cards td:nth-child(2) { grid-area: team; }
  .table-cards td:nth-child(3) { grid-area: hearts; justify-content: flex-end; }
  .table-cards td:nth-child(4) { grid-area: avg; }
  .table-cards td:nth-child(5) { grid-area: notes; justify-content: flex-end; }
  .table-cards td:nth-child(6) { grid-area: actions; justify-content: flex-end; border-top: 1px dashed var(--bd-2); padding-top: 9px; }
  .table-cards tr.hide { display: none; }
  .table-cards .student-cell { min-width: 0; }
  .table-cards .st-name { white-space: normal; }
  .table-cards .actions-cell { gap: 6px; }
  .table-cards .actions-cell .icon-btn { width: 40px; height: 40px; }
  /* historial en tarjetas */
  .hist-table { min-width: 0; }
  .hist-table thead { display: none; }
  .hist-table tbody { display: flex; flex-direction: column; gap: 10px; }
  .hist-table tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px; padding: 12px; border: 1px solid var(--bd-2); border-radius: 16px; background: var(--card-2);
  }
  .hist-table td { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; padding: 0; font-size: 12px; min-width: 0; }
  .hist-table td::before { content: attr(data-label); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); font-weight: 800; white-space: nowrap; }
  .hist-table td:first-child { grid-column: 1 / -1; }
  .hist-table td:first-child::before { display: none; }
  .hist-table td:has(button.icon-btn):last-child { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px dashed var(--bd-2); padding-top: 9px; }
  .hist-table td:has(button.icon-btn):last-child::before { display: none; }
  .hist-table tr.hide { display: none; }
  .group-card .enter-group { font-size: 11px; padding: 8px; }
  .group-card h3 { font-size: 15px; }
  .group-card .g-sub { font-size: 9.5px; }
  .modal-overlay { padding: 8px; }
  .modal { max-height: 94vh; border-radius: 18px; }
  .modal-body { padding: 14px; }
  .modal-head { padding: 14px 14px 10px; }
  .modal-foot { padding: 11px 14px 14px; }
  .avg-grid { grid-template-columns: 1fr 1fr; }
  .notas-toolbar .field { flex: 1; }
  .hist-filters .field { flex: 1; }
  .score-grid { grid-template-columns: 1fr; }
  .sync-actions .btn { flex: 1 1 100%; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 430px) {
  .aula-grid, .group-grid { grid-template-columns: 1fr 1fr; }
  .aula-sub { display: none; }
  .aula-fruits { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card small { display: none; }
  .group-card .fruit-art { width: 68px; height: 68px; }
  .group-card .g-members { display: none; }
  .group-card { gap: 5px; }
  .hero-actions { flex-direction: column; }
  .profile-top { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Clase del día, fotos y puntos
   ============================================================ */
.class-bar {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--pr-soft), var(--card) 68%);
  border: 1px solid var(--bd); border-radius: var(--radius); box-shadow: var(--shadow);
}
.class-bar .cb-ico {
  flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
  background: var(--card); color: var(--pr); box-shadow: 0 6px 16px rgba(108, 92, 231, .16);
}
.cb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cb-main .eyebrow { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--mu); font-weight: 850; }
.cb-main b { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.cb-main small { font-size: 11.5px; color: var(--mu); }
.cb-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.clase-suggest { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.mini-chip {
  border: 1px solid var(--bd); background: var(--card-2); color: var(--tx-2);
  border-radius: 99px; padding: 4px 9px; font-size: 11px; font-weight: 700;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-chip:hover { border-color: var(--pr); color: var(--pr); background: var(--pr-soft); }
.profile-chip.action { cursor: pointer; }
.profile-chip.action:hover { border-color: var(--pr); color: var(--pr); }

/* tira de fotos y videos del día */
.photo-strip-wrap {
  margin: -4px 0 16px; padding: 12px 14px; background: var(--card);
  border: 1px solid var(--bd); border-radius: 18px; box-shadow: var(--shadow);
}
.photo-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 1px 2px; scrollbar-width: thin; }
.photo-thumb {
  flex: 0 0 92px; width: 92px; height: 92px; padding: 0; border: 0; border-radius: 12px;
  overflow: hidden; position: relative; background: var(--card-2);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb.more { display: grid; place-items: center; font-weight: 850; color: var(--pr); background: var(--pr-soft); font-size: 13px; }
.photo-thumb .photo-pending { top: 4px; right: 4px; width: 20px; height: 20px; }

/* galería */
.photo-day { margin-top: 16px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-tile {
  position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 14px;
  overflow: hidden; background: var(--card-2); box-shadow: 0 4px 14px rgba(31, 24, 84, .1);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .26s ease; }
.photo-tile:hover img { transform: scale(1.045); }
.photo-meta {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px;
  background: rgba(15, 12, 40, .64); color: #fff; font-size: 10px; font-weight: 750;
  padding: 2px 6px; border-radius: 99px; backdrop-filter: blur(4px);
}
.photo-pending {
  position: absolute; top: 6px; right: 6px; width: 23px; height: 23px; border-radius: 50%;
  display: grid; place-items: center; background: var(--warn); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.photo-local-tag {
  position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 99px;
  background: rgba(15, 12, 40, .64); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .04em;
}
.photo-no-file {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; color: var(--mu); background: var(--card-2); font-size: 10px;
}
.photo-tile.no-file .photo-no-file { display: flex; }

/* visor */
.lightbox {
  position: fixed; inset: 0; z-index: 90; padding: 16px; display: flex; align-items: center; justify-content: center;
  background: #0a0916; opacity: 0; transition: opacity .16s ease;
}
.lightbox.show { opacity: 1; }
.lb-top {
  position: absolute; top: 0; left: 0; right: 0; padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; color: #fff; background: linear-gradient(rgba(0, 0, 0, .5), transparent);
}
.lb-count { font-size: 12px; font-weight: 800; opacity: .85; }
.lb-tools { display: flex; gap: 6px; }
.lb-btn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff;
}
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-btn.danger:hover { background: var(--danger); border-color: var(--danger); }
.lb-stage { position: relative; max-width: min(1100px, 96vw); max-height: 78vh; display: flex; align-items: center; justify-content: center; }
.lb-stage img { max-width: 100%; max-height: 78vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .2s ease; }
.lb-stage img.ready { opacity: 1; }
.lb-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: #c9c6e6; font-size: 12px; text-align: center; padding: 20px;
}
.lb-loading.hide { display: none; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; z-index: 2;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); background: rgba(20, 18, 42, .62);
  color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px);
}
.lb-nav:hover { background: rgba(40, 36, 76, .8); }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-caption { position: absolute; bottom: 14px; left: 16px; right: 16px; text-align: center; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.lb-caption b { font-size: 14px; }
.lb-caption span { font-size: 11px; color: #c9c6e6; }

/* puntos */
.type-pill.on.Participación { background: var(--info); }
.point-target { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--pr-soft); margin-bottom: 12px; }
.point-target b { display: block; font-size: 13px; }
.point-target small { color: var(--mu); font-size: 11px; }
.point-presets { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.point-preset {
  min-width: 44px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--bd);
  background: var(--card); font-weight: 850; color: var(--tx-2);
}
.point-preset.on { background: var(--pr); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(108, 92, 231, .25); }
.point-presets input { width: 80px; }
.point-preview {
  display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 9px 11px;
  border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-size: 12px;
}
.point-totals { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 8px; }
.point-total {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 750; background: var(--card-2); border: 1px solid var(--bd); color: var(--tx-2);
}
.point-total b { color: var(--tx); }
.point-total.part { color: var(--info); background: var(--info-soft); border-color: transparent; }
.point-total.extra { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.point-total.all { color: var(--pr); background: var(--pr-soft); border-color: transparent; }
.point-list { display: flex; flex-direction: column; }
.point-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--bd-2); }
.point-row:last-child { border-bottom: 0; }
.point-badge {
  flex: none; min-width: 38px; text-align: center; padding: 4px 7px; border-radius: 10px;
  font-size: 12px; font-weight: 850; background: var(--info-soft); color: var(--info);
}
.point-badge.extra { background: var(--ok-soft); color: var(--ok); }
.pr-main { flex: 1; min-width: 0; }
.pr-main b { display: block; font-size: 12.5px; line-height: 1.25; overflow-wrap: anywhere; }
.pr-main small { display: block; font-size: 10.5px; color: var(--mu); }
.point-type-tag {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 6px; border-radius: 6px; background: var(--info-soft); color: var(--info);
}
.point-type-tag.extra { background: var(--ok-soft); color: var(--ok); }
.gd-points-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; margin-top: 2px; }

@media (max-width: 760px) {
  .class-bar { align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 13px; }
  .cb-actions { width: 100%; justify-content: flex-start; }
  .cb-main b { font-size: 14.5px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  .photo-strip-wrap { padding: 10px 12px; }
  .photo-thumb { flex-basis: 78px; width: 78px; height: 78px; }
  .lb-nav { width: 40px; height: 40px; }
  .lb-nav.prev { left: 4px; }
  .lb-nav.next { right: 4px; }
  .lb-caption { bottom: 8px; left: 10px; right: 10px; }
  .gd-points-actions { justify-content: center; }
  .point-presets { width: 100%; }
  .point-presets input { flex: 1; min-width: 84px; }
  .point-totals { gap: 5px; }
}
@media (max-width: 430px) {
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .class-bar .cb-ico { width: 38px; height: 38px; border-radius: 12px; }
  .cb-main small { font-size: 10.5px; }
  .point-total { font-size: 10.5px; padding: 3px 7px; }
  .lb-stage img, .lb-stage { max-height: 70vh; }
}

/* ============================================================
   Videos de la clase
   ============================================================ */
.stat-card.info .stat-ico { background: var(--info-soft); color: var(--info); }
.video-block { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.video-tile {
  position: relative; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 14px;
  overflow: hidden; background: linear-gradient(135deg, #2a2358, #4b3b8f 70%, #6c5ce7);
  box-shadow: 0 4px 14px rgba(31, 24, 84, .16);
}
.video-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  display: block; opacity: 0; transition: opacity .22s ease, transform .26s ease;
}
.video-tile.has-poster img { opacity: 1; }
.video-tile:hover img { transform: scale(1.035); }
.video-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: rgba(255, 255, 255, .78);
}
.video-tile.has-poster .video-fallback { display: none; }
.video-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10, 8, 30, .14);
}
.video-play span {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--pr);
  box-shadow: 0 8px 22px rgba(10, 8, 30, .35);
}
.video-meta {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px;
  background: rgba(15, 12, 40, .68); color: #fff; font-size: 10px; font-weight: 750;
  padding: 2px 6px; border-radius: 99px; backdrop-filter: blur(4px);
}
.photo-thumb.video-thumb { background: linear-gradient(135deg, #2a2358, #6c5ce7); }
.video-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .2s ease;
}
.photo-thumb.video-thumb.has-poster img { opacity: 1; }
.video-thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .85); }
.photo-thumb.video-thumb.has-poster .video-thumb-fallback { display: none; }
.video-thumb-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--pr);
  box-shadow: 0 4px 12px rgba(10, 8, 30, .35);
}
.video-lightbox .lb-stage { width: min(1100px, 96vw); max-width: min(1100px, 96vw); }
.lb-stage video {
  max-width: 100%; max-height: 78vh; border-radius: 12px; background: #000;
  outline: none; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
@media (max-width: 760px) {
  .video-grid { grid-template-columns: 1fr 1fr; }
  .video-play span { width: 42px; height: 42px; }
  .lb-stage video { max-height: 70vh; }
}
@media (max-width: 430px) {
  .video-grid { grid-template-columns: 1fr; }
  .video-thumb-play { width: 24px; height: 24px; }
}

/* ============================================================
   Acceso, cuentas y administración
   ============================================================ */
body:not(.authed) .app,
body:not(.authed) #tabbar { display: none !important; }
body.authed #loginScreen { display: none; }

/* ===== pantalla de acceso ===== */
.login-screen {
  position: fixed; inset: 0; z-index: 500; overflow-y: auto;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(143, 123, 255, .28), transparent 62%),
    radial-gradient(760px 480px at 90% 92%, rgba(236, 72, 153, .16), transparent 62%),
    linear-gradient(150deg, var(--bg), var(--bg-2));
}
.login-shell {
  width: min(980px, 100%); display: grid; grid-template-columns: 1.06fr .94fr;
  background: var(--card); border: 1px solid var(--bd); border-radius: 30px;
  overflow: hidden; box-shadow: 0 40px 100px rgba(40, 26, 120, .24);
  animation: viewIn .5s cubic-bezier(.22, .8, .28, 1) both;
}
.login-brand-panel {
  position: relative; overflow: hidden; padding: 44px;
  color: #fff; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(150deg, #6250e8, #8f7bff 58%, #ec4899);
}
.login-brand-panel::before,
.login-brand-panel::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.login-brand-panel::before { width: 360px; height: 360px; right: -140px; top: -150px; background: rgba(255, 255, 255, .14); }
.login-brand-panel::after { width: 260px; height: 260px; left: -120px; bottom: -150px; background: rgba(255, 255, 255, .09); }
.login-logo {
  position: relative; z-index: 1; width: 62px; height: 62px; border-radius: 19px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 16px 34px rgba(20, 10, 80, .2);
}
.login-logo svg { width: 36px; height: 36px; }
.login-brand-panel .eyebrow { position: relative; z-index: 1; color: rgba(255, 255, 255, .8); }
.login-brand-panel h1 { position: relative; z-index: 1; font-size: clamp(34px, 4.2vw, 48px); letter-spacing: -.05em; margin: 7px 0 10px; }
.login-brand-panel > p { position: relative; z-index: 1; color: rgba(255, 255, 255, .84); font-size: 14px; line-height: 1.6; max-width: 390px; }
.login-points { position: relative; z-index: 1; list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 410px; }
.login-points li { display: flex; flex-direction: column; gap: 2px; padding: 10px 13px; border-radius: 13px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); }
.login-points b { font-size: 12.5px; }
.login-points span { font-size: 11.5px; color: rgba(255, 255, 255, .8); line-height: 1.45; }
.login-fruits { position: relative; z-index: 1; display: flex; gap: 6px; margin-top: 24px; font-size: 28px; filter: drop-shadow(0 8px 10px rgba(30, 10, 90, .2)); }
.login-fruits span:nth-child(2) { transform: translateY(7px) rotate(5deg); }
.login-fruits span:nth-child(3) { transform: translateY(-3px) rotate(-4deg); }
.login-fruits span:nth-child(4) { transform: translateY(5px) rotate(7deg); }
.login-panel { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.login-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.login-panel h2 { font-size: clamp(24px, 2.7vw, 31px); letter-spacing: -.04em; margin: 0 0 7px; }
.login-panel > p { font-size: 13px; color: var(--mu); line-height: 1.55; max-width: 360px; }
.login-panel form { display: flex; flex-direction: column; gap: 13px; margin-top: 20px; }
.login-panel .field > span { font-size: 12px; }
.pass-wrap { position: relative; display: flex; align-items: center; }
.pass-wrap input { width: 100%; padding-right: 46px; }
.pass-eye {
  position: absolute; right: 5px; width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: transparent; color: var(--mu); display: grid; place-items: center;
}
.pass-eye:hover { color: var(--pr); background: var(--pr-soft); }
.login-error { min-height: 17px; font-size: 12px; font-weight: 700; color: var(--danger); line-height: 1.4; }
.login-submit { margin-top: 2px; padding: 12px 16px; font-size: 14px; }
.login-hints { margin-top: 18px; padding-top: 15px; border-top: 1px dashed var(--bd); }
.login-hints-title { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin-bottom: 8px; }
.login-chips { display: flex; flex-direction: column; gap: 7px; }
.login-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--bd); background: var(--card-2); text-align: left; }
.login-chip:hover { border-color: var(--pr); background: var(--pr-soft); }
.login-chip b { font-size: 11.5px; color: var(--tx); }
.login-chip span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10.5px; color: var(--pr); font-weight: 700; }
.login-hints-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 9px; font-size: 11px; color: var(--mu); line-height: 1.5; }
.login-hints-note .ico { flex: 0 0 auto; margin-top: 1px; }
.login-note { margin-top: 18px; font-size: 10.5px; color: var(--mu); line-height: 1.5; }

/* ===== tarjeta de usuario en el menú ===== */
.side-user { display: flex; flex-direction: column; gap: 7px; padding: 10px; border: 1px solid var(--bd); border-radius: 14px; background: var(--card-2); }
.side-user-main { display: flex; align-items: center; gap: 9px; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.side-user-main .avatar { --sz: 34px; }
.su-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.su-copy b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-copy small { font-size: 10px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-role { flex: 0 0 auto; font-size: 8.5px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; padding: 3px 6px; border-radius: 99px; background: var(--pr-soft); color: var(--pr); }
.su-role.admin { background: var(--warn-soft); color: var(--warn); }
.side-user-actions { display: flex; gap: 6px; }
.side-user-actions button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 6px; border: 1px solid var(--bd); border-radius: 8px; background: var(--card); color: var(--mu); font-size: 10.5px; font-weight: 700; }
.side-user-actions button:hover { color: var(--pr); border-color: var(--pr); }

/* ===== aviso de administrador viendo a un maestro ===== */
.context-bar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 8px 11px 8px 13px; border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--pr) 26%, var(--bd));
  background: linear-gradient(135deg, var(--pr-soft), var(--card) 72%);
  font-size: 12.5px; color: var(--tx-2);
}
.ctx-eye { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; background: var(--card); color: var(--pr); flex: 0 0 27px; }
.ctx-text b { color: var(--tx); }
.ctx-spacer { flex: 1; }

/* ===== panel de administración ===== */
.admin-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.admin-shortcut {
  display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left;
  border: 1px solid var(--bd); border-radius: 17px; background: var(--card); box-shadow: var(--shadow);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.admin-shortcut:hover { transform: translateY(-2px); border-color: var(--pr); box-shadow: var(--shadow-lg); }
.admin-shortcut > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.admin-shortcut b { font-size: 13px; }
.admin-shortcut small { font-size: 10.5px; color: var(--mu); line-height: 1.4; }
.admin-shortcut > .ico:last-child { color: var(--mu); flex: 0 0 auto; }
.as-ico { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; background: var(--pr-soft); color: var(--pr); }
.as-ico.blue { background: var(--info-soft); color: var(--info); }
.as-ico.green { background: var(--ok-soft); color: var(--ok); }
.admin-alert {
  display: flex; align-items: flex-start; gap: 11px; flex-wrap: wrap; margin: 0 0 16px;
  padding: 12px 14px; border-radius: 15px; background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 26%, var(--bd)); color: var(--tx-2);
}
.admin-alert > .ico { color: var(--warn); flex: 0 0 auto; margin-top: 1px; }
.admin-alert > div { flex: 1 1 240px; }
.admin-alert b { font-size: 12.5px; color: var(--tx); display: block; }
.admin-alert p { font-size: 11.5px; margin-top: 2px; line-height: 1.45; }
.admin-people-panel { margin-top: 18px; }
.admin-people-tabs { margin-bottom: 12px; }
.admin-people-search { max-width: 400px; margin-bottom: 14px; }
.admin-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.admin-person {
  display: flex; flex-direction: column; gap: 11px; padding: 14px;
  border: 1px solid var(--bd); border-radius: 18px; background: var(--card-2);
  transition: border-color .18s, box-shadow .18s;
}
.admin-person.viewing { border-color: var(--pr); box-shadow: 0 0 0 3px var(--pr-soft); }
.admin-person.inactive { opacity: .62; }
.ap-top { display: flex; align-items: center; gap: 10px; }
.ap-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ap-id b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-id small { font-size: 10.5px; color: var(--mu); }
.ap-you { font-size: 8.5px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; color: var(--pr); background: var(--pr-soft); border-radius: 99px; padding: 1px 6px; }
.ap-state { flex: 0 0 auto; font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 99px; }
.ap-state.on { color: var(--ok); background: var(--ok-soft); }
.ap-state.off { color: var(--danger); background: var(--danger-soft); }
.ap-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-metrics span { flex: 1 1 66px; min-width: 62px; padding: 6px 7px; text-align: center; border-radius: 10px; border: 1px solid var(--bd-2); background: var(--card); }
.ap-metrics b { display: block; font-size: 15px; letter-spacing: -.02em; }
.ap-metrics small { font-size: 9px; color: var(--mu); }
.ap-aulas { display: flex; flex-wrap: wrap; gap: 5px; min-height: 20px; }
.ap-aula { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; background: var(--card); border: 1px solid var(--bd); font-size: 10px; font-weight: 700; color: var(--tx-2); }
.ap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 2px; }
.ap-actions .icon-btn { width: 34px; height: 34px; border-radius: 10px; }
.ap-actions .icon-btn:disabled { opacity: .35; pointer-events: none; }
.assign-box { margin-top: 15px; padding: 12px; border-radius: 13px; border: 1px dashed var(--bd); background: var(--card-2); }
.assign-title { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; color: var(--mu); margin-bottom: 9px; }
.assign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; max-height: 250px; overflow-y: auto; padding-right: 3px; }
.assign-item { padding: 7px 9px; border: 1px solid var(--bd-2); border-radius: 10px; background: var(--card); font-size: 12px; }
.assign-item span { display: flex; flex-direction: column; gap: 1px; }
.assign-item small { font-size: 9.5px; color: var(--warn); }
.aula-admin-name { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.aula-teacher-select { min-width: 150px; max-width: 230px; padding: 6px 8px; font-size: 12px; }

/* ===== editor central de datos ===== */
.editor-tabs {
  display: flex; gap: 5px; overflow-x: auto; max-width: 100%;
  padding: 4px; margin-bottom: 16px; background: var(--card); border: 1px solid var(--bd);
  border-radius: 15px; box-shadow: var(--shadow);
}
.editor-tabs .tab { text-decoration: none; }
.editor-panel { padding: 16px; }
.editor-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.editor-filters .field { min-width: 170px; }
.editor-filters .search-box { flex: 1; min-width: 220px; }
.editor-count { margin-left: auto; white-space: nowrap; }
.editor-table .actions-cell { display: flex; gap: 4px; justify-content: flex-end; }
.editor-table .actions-cell .icon-btn { width: 30px; height: 30px; border-radius: 9px; }
.media-kind { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; background: var(--pr-soft); color: var(--pr); white-space: nowrap; }
.media-kind.video { background: var(--pink-soft); color: var(--pink); }
.mono-small { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 10.5px; overflow-wrap: anywhere; }
.editor-more { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 14px; }
.editor-empty-filter { margin-top: 12px; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; max-width: 560px; }
  .login-brand-panel { padding: 28px 30px; }
  .login-brand-panel h1 { font-size: 34px; }
  .login-brand-panel > p { max-width: none; }
  .login-points { display: none; }
  .login-fruits { display: none; }
  .login-panel { padding: 28px 30px 34px; }
  .admin-shortcuts { grid-template-columns: 1fr; }
  .admin-people { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .login-screen { padding: 9px; align-items: flex-start; }
  .login-shell { border-radius: 20px; margin: 8px 0; }
  .login-brand-panel { padding: 22px 20px 24px; }
  .login-logo { width: 50px; height: 50px; border-radius: 16px; margin-bottom: 12px; }
  .login-logo svg { width: 30px; height: 30px; }
  .login-brand-panel h1 { font-size: 30px; }
  .login-brand-panel > p { font-size: 12.5px; }
  .login-panel { padding: 22px 20px 26px; }
  .login-panel h2 { font-size: 23px; }
  .login-panel form { margin-top: 15px; }
  .login-hints { margin-top: 14px; }
  .context-bar { align-items: center; }
  .ctx-text { flex: 1 1 100%; }
  .ctx-spacer { display: none; }
  .ctx-text + .btn { flex: 1 1 auto; justify-content: center; }
  .ap-actions .btn { flex: 1 1 auto; justify-content: center; }
  .ap-actions .icon-btn { flex: 0 0 38px; }
  .admin-person { padding: 12px; }
  .editor-panel { padding: 12px; }
  .editor-filters { flex-direction: column; align-items: stretch; gap: 9px; }
  .editor-count { margin-left: 0; }
  .editor-tabs .tab span { font-size: 11.5px; }
  .aula-teacher-select { min-width: 130px; }
}
@media (max-width: 430px) {
  .login-panel, .login-brand-panel { padding: 18px 16px; }
  .login-chip { flex-direction: column; align-items: flex-start; gap: 1px; }
  .ap-metrics span { flex: 1 1 54px; min-width: 54px; padding: 5px 4px; }
  .ap-metrics b { font-size: 13px; }
  .ap-metrics small { font-size: 8.5px; }
}
