/* ============================================================
   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: var(--cur-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 { --mp: 28px; flex: 1; min-width: 0; margin-left: 264px; padding: 0 var(--mp) 48px; }
.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 14px;
  /* ocupa todo el ancho del área principal, pero alinea su contenido con el de la página */
  margin: 0 calc(-1 * var(--mp, 28px)) 10px;
  padding: 14px max(var(--mp, 28px), calc((100% - 1280px) / 2 + var(--mp, 28px))) 12px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid color-mix(in srgb, var(--bd) 70%, 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; padding-right: 2px; }
.sidebar { overflow-y: auto; overscroll-behavior: contain; }
.sidebar > * { flex-shrink: 0; }
.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: var(--cur-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 3px 10px rgba(108, 92, 231, .26); }
.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 6px 16px rgba(108, 92, 231, .26); }
.btn.primary:hover { color: #fff; box-shadow: 0 9px 22px rgba(108, 92, 231, .34); }
.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: var(--cur-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; pointer-events: none; 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, minmax(0, 1fr)); gap: 12px; }
.form-grid > .field, .form-grid > label { min-width: 0; }
.form-grid .field > input, .form-grid .field > select { width: 100%; }
.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, .ficha-grid .list-plain { display: flex; flex-direction: column; gap: 7px; }
.modal .list-row, .ficha-grid .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, .ficha-grid .list-row .lr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.modal .list-row b, .ficha-grid .list-row b { font-size: 12.5px; }
.modal .list-row small, .ficha-grid .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: var(--cur-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 { --mp: 22px; margin-left: 236px; padding: 0 var(--mp) 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 { --mp: 18px; margin-left: 0; padding: 0 var(--mp) 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; }
  /* con el menú lateral abierto, la barra inferior se esconde y el menú queda arriba de todo */
  body.drawer-open #tabbar { transform: translateY(110%); opacity: 0; pointer-events: none; }
  body.drawer-open .app { z-index: 60; }
  body.drawer-open { overflow: hidden; }
  /* avisos por encima de la barra inferior */
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* buscadores a todo el ancho */
  .search-box { max-width: none !important; flex: 1 1 100% !important; }
  /* tarjetas de tablas: los selectores ocupan la fila completa */
  .hist-table td:has(select) { grid-column: 1 / -1; }
  .hist-table td select { min-width: 0; width: auto; max-width: 70%; }
  /* aviso "Viendo los datos de…" compacto */
  .context-bar { flex-wrap: nowrap !important; padding: 7px 8px 7px 10px; font-size: 12px; }
  .ctx-text { flex: 1 1 auto !important; min-width: 0; line-height: 1.3; }
  .context-bar .btn { flex: 0 0 auto !important; padding-left: 9px; padding-right: 9px; }
  .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;
    transition: transform .26s cubic-bezier(.2, .8, .3, 1), opacity .2s;
    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: var(--cur-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 { --mp: 12px; padding: 0 var(--mp) calc(92px + env(safe-area-inset-bottom)); }
  .topbar { gap: 8px; margin-bottom: 12px; padding-top: 10px; padding-bottom: 10px; }
  .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" "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: var(--cur-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; }
}

/* ===== barras de desplazamiento con la paleta del sistema ===== */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--pr) transparent; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--pr), var(--pr-2));
  border-radius: 99px; border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--pr); background-clip: padding-box; border-width: 2px; }
::-webkit-scrollbar-corner { background: transparent; }
@media (max-width: 980px) { ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-thumb { border-width: 1px; } }

/* ===== informe PDF del aula (siempre claro, pensado para imprimir) ===== */
#printRoot {
  position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column;
  background: #eceaf8; color: #1d1b33; color-scheme: light;
}
body.rpt-open { overflow: hidden; }
body.rpt-open #tabbar { display: none !important; }
.rpt-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: #ffffff; border-bottom: 1px solid #e3e0f3; box-shadow: 0 6px 20px rgba(45, 32, 110, .08);
}
.rpt-bar .btn.ghost { color: #4b4868; }
.rpt-bar-filters { display: flex; gap: 10px; flex: 1; justify-content: center; flex-wrap: wrap; }
.rpt-bar-filters label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 750; color: #6b6890; }
.rpt-bar-filters select { background-color: #fff; color: #1d1b33; border: 1px solid #dcd8f0; border-radius: 10px; padding: 7px 32px 7px 10px; font: inherit; font-size: 13px; }
.rpt-scroll { flex: 1; overflow: auto; padding: 22px 14px 40px; -webkit-overflow-scrolling: touch; }
.rpt-hoja {
  width: 1060px; max-width: none; margin: 0 auto; background: #fff; border-radius: 6px;
  box-shadow: 0 18px 50px rgba(45, 32, 110, .16); padding: 30px 34px;
}
@media (max-width: 1120px) { .rpt-scroll { padding: 12px 8px 30px; } }
@media (max-width: 640px) {
  .rpt-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 8px 10px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .rpt-bar .rpt-back { justify-self: start; }
  .rpt-bar .rpt-print { justify-self: end; grid-column: 2; grid-row: 1; }
  .rpt-bar-filters { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; min-width: 0; }
  .rpt-bar-filters label { min-width: 0; }
  .rpt-bar-filters label { flex-direction: column; align-items: stretch; gap: 3px; font-size: 10.5px; }
  .rpt-bar-filters select { width: 100%; min-width: 0; font-size: 14px; }
}
.rpt-doc { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1d1b33; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rpt-doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rpt-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px 22px; border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, #6c5ce7 0%, #8f5cf7 45%, #ec4899 100%);
}
.rpt-brand { display: flex; align-items: center; gap: 14px; }
.rpt-logo { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: rgba(255,255,255,.2); color: #fff; }
.rpt-logo svg { width: 30px; height: 30px; }
.rpt-brand small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; opacity: .85; }
.rpt-brand h1 { margin: 2px 0 3px; font-size: 28px; letter-spacing: -.03em; color: #fff; }
.rpt-brand p { margin: 0; font-size: 12px; opacity: .92; }
.rpt-fecha { text-align: right; display: flex; flex-direction: column; font-size: 12px; }
.rpt-fecha small { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; opacity: .8; font-weight: 800; }
.rpt-fecha b { font-size: 14px; text-transform: capitalize; }

.rpt-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 16px 0; }
.rpt-kpis .k { border-radius: 14px; padding: 11px 14px; border: 1.5px solid; }
.rpt-kpis .k small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.rpt-kpis .k b { font-size: 24px; letter-spacing: -.03em; }
.rpt-kpis .k1 { background: #f1efff; border-color: #c9c2fb; color: #4c3fc4; }
.rpt-kpis .k2 { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.rpt-kpis .k3 { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.rpt-kpis .k4 { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.rpt-kpis .k5 { background: #fff1f2; border-color: #fecdd3; color: #be123c; }

.rpt-chart {
  display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: center;
  padding: 16px 22px; border: 1.5px solid #e6e2f8; border-radius: 18px; background: #fcfbff;
}
.rpt-radial { width: 230px; height: 230px; display: block; }
.rpt-radial-num { font-size: 34px; font-weight: 850; fill: #1d1b33; letter-spacing: -.03em; }
.rpt-radial-lbl { font-size: 11px; font-weight: 650; fill: #6b6890; }
.rpt-chart-side h2, .rpt-lista h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.02em; color: #1d1b33; }
.rpt-note { margin: 0 0 12px; font-size: 11.5px; color: #6b6890; }
.rpt-leyendas { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.rpt-ley { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px; background: #fff; border: 1.5px solid #ece9f8; }
.rpt-ley.aprobado { background: #ecfdf5; border-color: #a7f3d0; }
.rpt-ley.proceso { background: #fffbeb; border-color: #fde68a; }
.rpt-ley.reprobado { background: #fef2f2; border-color: #fecaca; }
.rpt-ley.sinNotas { background: #f6f7fb; border-color: #e2e5ef; }
.rpt-ley-dot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 14px; }
.rpt-ley-txt { flex: 1; display: flex; flex-direction: column; }
.rpt-ley-txt b { font-size: 13px; }
.rpt-ley-txt small { font-size: 10.5px; color: #6b6890; }
.rpt-ley-num { font-size: 26px; font-weight: 850; letter-spacing: -.03em; text-align: right; line-height: 1; }
.rpt-ley-num small { display: block; font-size: 11px; font-weight: 800; color: #6b6890; margin-top: 2px; }

.rpt-lista { margin-top: 18px; }
.rpt-lista h2 small { font-size: 12px; color: #6b6890; font-weight: 650; margin-left: 6px; }
.rpt-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 10px; font-size: 11px; }
.rpt-table thead th {
  background: #6c5ce7; color: #fff; text-align: left; padding: 8px 7px; font-size: 9.5px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 800; white-space: nowrap;
}
.rpt-table thead th:first-child { border-radius: 10px 0 0 10px; }
.rpt-table thead th:last-child { border-radius: 0 10px 10px 0; }
.rpt-table td { padding: 7px; border-bottom: 1px solid #eeebf8; vertical-align: middle; color: #1d1b33; }
.rpt-table tbody tr:nth-child(even) td { background: #faf9ff; }
.rpt-table tr { break-inside: avoid; page-break-inside: avoid; }
.rpt-table thead { display: table-header-group; }
.rpt-table small { display: block; font-size: 9px; color: #8a87a8; margin-top: 1px; white-space: nowrap; }
.rpt-table .c-n { color: #8a87a8; font-weight: 700; width: 22px; }
.rpt-table .c-nom b { font-weight: 750; }
.rpt-table .c-num { text-align: center; white-space: nowrap; }
.rpt-table .c-part { color: #2563eb; font-weight: 800; }
.rpt-table .c-extra { color: #c026d3; font-weight: 800; }
.rpt-table .c-total { color: #ea580c; font-weight: 850; font-size: 12px; }
.rpt-table .c-prom { font-weight: 850; font-size: 12px; }
.rpt-table tr.e-aprobado .c-prom { color: #059669; }
.rpt-table tr.e-proceso .c-prom { color: #d97706; }
.rpt-table tr.e-reprobado .c-prom { color: #dc2626; }
.rpt-hearts span { display: inline-block; vertical-align: middle; margin: 0 1px; }
.rpt-hearts .on { color: #ef4444; }
.rpt-hearts .off { color: #f6d4d4; }
.rpt-team { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; color: #1d1b33;
  background: color-mix(in srgb, var(--c) 18%, #fff); border: 1px solid color-mix(in srgb, var(--c) 45%, #fff); }
.rpt-estado { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 9.5px; font-weight: 850; white-space: nowrap; }
.rpt-estado.aprobado { background: #d1fae5; color: #047857; }
.rpt-estado.proceso { background: #fef3c7; color: #b45309; }
.rpt-estado.reprobado { background: #fee2e2; color: #b91c1c; }
.rpt-estado.sinNotas { background: #eef0f6; color: #64748b; }
.rpt-vacio { text-align: center; padding: 24px !important; color: #8a87a8; }
.rpt-pie { margin: 10px 0 0; font-size: 9.5px; color: #8a87a8; }

@page { size: A4 landscape; margin: 10mm; }
@media print {
  html, body { background: #fff !important; background-image: none !important; color: #1d1b33 !important; color-scheme: light !important; }
  body.rpt-open > *:not(#printRoot) { display: none !important; }
  body.rpt-open #printRoot { position: static; display: block; background: #fff; }
  body.rpt-open .rpt-bar { display: none !important; }
  body.rpt-open .rpt-scroll { overflow: visible; padding: 0; }
  body.rpt-open .rpt-hoja { width: auto; zoom: 1 !important; box-shadow: none; border-radius: 0; padding: 0; margin: 0; }
  .rpt-chart, .rpt-head, .rpt-kpis { break-inside: avoid; page-break-inside: avoid; }
}

/* pestañas internas dentro de filas flexibles: no deben ensanchar la página en el celular */
.row > div:has(> .tabbar) { min-width: 0; max-width: 100%; }
@media (max-width: 980px) { .row > div:has(> .tabbar) { flex: 1 1 100%; } }
.grid > * { min-width: 0; }
@media (max-width: 980px) { .grid.dash, .grid.side, .grid.two { grid-template-columns: minmax(0, 1fr); } }


/* ===== barras de herramientas: todos los campos alineados ===== */
label.field.field-search { min-width: 180px; }
.field-search .search-box { min-width: 0; flex: none; width: 100%; }
div.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--mu); font-weight: 650; }
div.field > span { display: inline-flex; align-items: center; gap: 5px; }
.att-toolbar input, .att-toolbar select, .notas-toolbar input, .notas-toolbar select,
.students-toolbar input, .students-toolbar select, .hist-filters input, .hist-filters select,
.editor-filters input, .editor-filters select { height: 42px; padding-top: 0; padding-bottom: 0; }
.students-toolbar { align-items: flex-end; }
.students-toolbar #estCount, .att-toolbar .att-dirty, .editor-filters .editor-count { align-self: center; margin-top: 18px; }
.att-date-row { display: flex; gap: 6px; align-items: stretch; }
.att-date-row input { flex: 1 1 auto; min-width: 0; }
.att-hoy { height: 42px; padding: 0 14px; border-radius: 11px; }
.hist-filters .filter-pills { align-self: flex-end; min-height: 42px; align-items: center; }

/* espacio entre los paneles de asistencia */
.panel + .panel.att-list { margin-top: 16px; }
.view > .panel + .panel, .view > section.panel + section.panel { margin-top: 16px; }

@media (max-width: 980px) {
  .att-toolbar input, .att-toolbar select, .notas-toolbar input, .notas-toolbar select,
  .students-toolbar input, .students-toolbar select, .hist-filters input, .hist-filters select,
  .editor-filters input, .editor-filters select, .att-hoy { height: 46px; }
  .att-toolbar .att-date { flex: 1 1 100%; }
  label.field.field-search { flex: 1 1 100% !important; max-width: none !important; }
  .att-toolbar .spacer { display: none; }
  .att-toolbar .att-dirty { margin-top: 0; margin-left: auto; }
  .panel + .panel.att-list { margin-top: 12px; }
  /* tarjeta de asistencia: el nombre no se monta sobre los corazones */
  .att-table .c-est { min-width: 0; }
  .att-table .student-cell { min-width: 0; }
  .att-table .student-cell .st-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .att-table tr { align-items: center; }
}

/* ===== cambio de tema animado ===== */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease, stroke .45s ease, box-shadow .45s ease !important;
}

/* ===== ficha del estudiante ===== */
.ficha-back { margin: 4px 0 14px; gap: 8px; }
.ficha-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: var(--radius-lg, 22px); border: 1px solid var(--bd);
  background: linear-gradient(135deg, color-mix(in srgb, var(--pr) 14%, var(--card)), var(--card) 60%);
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(0,0,0,.06));
}
.ficha-hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -70px; top: -90px; background: var(--pr); opacity: .09; pointer-events: none; }
.ficha-id { display: flex; align-items: center; gap: 16px; min-width: 0; position: relative; z-index: 1; }
.ficha-id .avatar { box-shadow: 0 0 0 4px color-mix(in srgb, var(--pr) 18%, transparent); }
.ficha-id-txt { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ficha-id-txt h1 { font-size: 27px; letter-spacing: -.035em; line-height: 1.12; }
.ficha-id-txt p { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--mu); }
.ficha-id-txt p span { display: inline-flex; align-items: center; gap: 5px; }
.ficha-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.ficha-stats { margin: 16px 0; }
.ficha-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ficha-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ficha-col > .panel { margin: 0 !important; }
.ficha-notas td, .ficha-notas th { text-align: center; }
.ficha-notas td:first-child, .ficha-notas th:first-child { text-align: left; }
.ficha-att-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--bg-2, var(--bd)); margin-bottom: 10px; }
.ficha-att-bar i { display: block; height: 100%; transition: width .5s; }
.ficha-att-bar i.ok, .ficha-att-ley i.ok { background: var(--ok); }
.ficha-att-bar i.warn, .ficha-att-ley i.warn { background: var(--warn); }
.ficha-att-bar i.info, .ficha-att-ley i.info { background: var(--info); }
.ficha-att-bar i.danger, .ficha-att-ley i.danger { background: var(--danger); }
.ficha-att-ley { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--mu); margin-bottom: 12px; }
.ficha-att-ley span { display: inline-flex; align-items: center; gap: 6px; }
.ficha-att-ley i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ficha-att-ley b { color: var(--tx); }
.ficha-more { margin-top: 10px; width: 100%; justify-content: center; }
.ficha-hearts { font-size: 15px !important; }
.ficha-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 800; }
.ficha-badge.big { font-size: 12px; padding: 4px 12px; margin-top: 4px; }
.ficha-badge.aprobado { background: var(--ok-soft); color: var(--ok); }
.ficha-badge.proceso { background: var(--warn-soft); color: var(--warn); }
.ficha-badge.reprobado { background: var(--danger-soft, var(--pink-soft)); color: var(--danger); }
.ficha-badge.sinNotas { background: color-mix(in srgb, var(--mu) 16%, transparent); color: var(--mu); }
.profile-section.quick { padding-top: 12px; margin-top: 12px; }
.profile-section.quick h3 { margin-bottom: 8px; }
.nn-fijo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--pr) 9%, var(--card)); border: 1px solid var(--bd); }
.nn-fijo span { display: flex; flex-direction: column; }
.nn-fijo small { color: var(--mu); font-size: 11.5px; }
@media (max-width: 980px) {
  .ficha-grid { grid-template-columns: minmax(0, 1fr); }
  .ficha-hero { padding: 18px; }
  .ficha-id .avatar { --sz: 58px !important; }
  .ficha-id-txt h1 { font-size: 21px; }
  .ficha-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .ficha-actions .btn { justify-content: center; }
}
.ficha-point-note { font-size: 11px; color: var(--mu); margin: -4px 0 10px; }
/* en la ficha, las observaciones son todas del mismo estudiante: no repetir su nombre */
.ficha-grid .obs-head > .avatar, .ficha-grid .obs-head > b { display: none; }
.ficha-grid .obs-head { align-items: center; }
.ficha-grid .obs-head .obs-date { margin-left: auto; }
@media (max-width: 980px) {
  .ficha-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ficha-actions .btn { min-width: 0; white-space: normal; line-height: 1.15; padding-left: 10px; padding-right: 10px; font-size: 13px; }
}

/* ===== tarjeta "nuevo maestro" dentro de la lista ===== */
.admin-add-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 220px; padding: 22px; border-radius: 22px; cursor: var(--cur-pointer); font: inherit; color: var(--tx);
  border: 2px dashed color-mix(in srgb, var(--pr) 35%, var(--bd)); background: color-mix(in srgb, var(--pr) 4%, transparent);
  transition: border-color .2s, background .2s, transform .2s;
}
.admin-add-card:hover, .admin-add-card:focus-visible { border-color: var(--pr); background: color-mix(in srgb, var(--pr) 9%, transparent); transform: translateY(-2px); outline: none; }
.admin-add-card .add-circle {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, var(--pr), var(--pr-2)); box-shadow: 0 10px 24px color-mix(in srgb, var(--pr) 38%, transparent);
  transition: transform .25s cubic-bezier(.2, .8, .3, 1.4);
}
.admin-add-card:hover .add-circle { transform: scale(1.08) rotate(90deg); }
.admin-add-card b { font-size: 15px; margin-top: 4px; }
.admin-add-card small { font-size: 12px; color: var(--mu); }
@media (max-width: 760px) { .admin-add-card { min-height: 150px; } }

/* ===== escuelas, maestros y materias ===== */
.aula-school { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 750; color: var(--mu); margin-bottom: 2px; }
.ap-school { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 750; color: var(--pr); margin: -2px 0 10px; }
.ap-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--mu); margin: 10px 0 5px; }
.ap-materia { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 750;
  background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); }
.ap-materia.more { background: var(--card-2); color: var(--mu); border-color: var(--bd); }
.school-pills { margin: 0 0 12px; flex-wrap: wrap; }
.school-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.school-panel .panel-head h3 { font-size: 17px; }
.school-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px; text-align: center; color: var(--mu);
  border: 2px dashed var(--bd); border-radius: 18px; }
.aula-teachers { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.aula-teachers .ap-aula .avatar { margin-right: 2px; }
.admin-aulas-table td { vertical-align: middle; }
.assign-select { width: 100%; height: 42px; }
.materia-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.materia-chip { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 99px; cursor: var(--cur-pointer); font: inherit; font-size: 12.5px; font-weight: 700;
  background: var(--card); color: var(--tx-2); border: 1.5px solid var(--bd); transition: all .15s; }
.materia-chip:hover { border-color: var(--pr); }
.materia-chip.on { background: var(--pr); border-color: var(--pr); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--pr) 30%, transparent); }
.materia-add { display: flex; gap: 8px; margin-top: 10px; }
.materia-add input { flex: 1; min-width: 0; }

/* ===== historial de clases ===== */
.cls-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cls-toolbar .filter-pills { align-self: flex-end; min-height: 42px; align-items: center; }
.cls-timeline { display: flex; flex-direction: column; gap: 12px; position: relative; }
.cls-day { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 14px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--bd-2); }
.cls-day.today { border-color: color-mix(in srgb, var(--pr) 45%, var(--bd)); background: color-mix(in srgb, var(--pr) 6%, var(--card-2)); }
.cls-date { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; height: 70px;
  background: linear-gradient(160deg, var(--pr), var(--pr-2)); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--pr) 28%, transparent); }
.cls-date b { font-size: 24px; line-height: 1; letter-spacing: -.03em; }
.cls-date span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.cls-date small { font-size: 10px; opacity: .85; text-transform: capitalize; }
.cls-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cls-title { min-width: 0; }
.cls-title h3 { font-size: 15.5px; letter-spacing: -.01em; line-height: 1.3; }
.cls-title small { font-size: 11.5px; color: var(--mu); }
.cls-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cls-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 750; border: 1px solid transparent; }
.cls-chip small { font-weight: 650; opacity: .8; margin-left: 2px; }
.cls-chip.ok { background: var(--ok-soft); color: var(--ok); }
.cls-chip.media { background: var(--warn-soft); color: var(--warn); }
.cls-chip.pts { background: color-mix(in srgb, var(--pink, #ec4899) 14%, transparent); color: var(--pink, #ec4899); }
.cls-chip.eval { background: color-mix(in srgb, var(--pr) 13%, transparent); color: var(--pr); }
.cls-chip.obs { background: color-mix(in srgb, var(--info) 13%, transparent); color: var(--info); }
.cls-chip.sanc { background: var(--danger-soft); color: var(--danger); }
.cls-media { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.cls-media .photo-thumb { width: 64px; height: 64px; }
.cls-more { width: 100%; justify-content: center; margin-top: 12px; }
@media (max-width: 760px) {
  .cls-day { grid-template-columns: 50px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .cls-date { height: 58px; border-radius: 12px; }
  .cls-date b { font-size: 20px; }
  .cls-head { flex-direction: column; }
  .cls-media .photo-thumb { width: 54px; height: 54px; }
  .materia-add { flex-direction: column; }
}
.modal .profile-section.quick:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
@media (max-width: 980px) { .admin-aulas-table td:has(.aula-teachers) { grid-column: 1 / -1; } }

/* aviso de servidor desactualizado */
.server-old {
  position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 450;
  display: flex; align-items: flex-start; gap: 12px; width: min(640px, calc(100% - 24px));
  padding: 14px 14px 14px 16px; border-radius: 16px; color: #7c2d12;
  background: #fff7ed; border: 1.5px solid #fdba74; box-shadow: 0 18px 40px rgba(124, 45, 18, .18);
  animation: serverOldIn .35s cubic-bezier(.2, .8, .3, 1);
}
.server-old > .ico { flex: 0 0 auto; margin-top: 2px; color: #ea580c; }
.server-old div { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.4; }
.server-old b { font-size: 14px; }
.server-old .icon-btn { width: 30px; height: 30px; flex: 0 0 auto; }
@keyframes serverOldIn { from { opacity: 0; transform: translate(-50%, -12px); } }

/* ===== escuelas y aulas: tarjetas ===== */
.setup-steps { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; padding: 0; }
.setup-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; font-size: 12.5px; font-weight: 750;
  background: var(--card); border: 1px solid var(--bd); color: var(--mu); }
.setup-steps li b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--bd); font-size: 12px; }
.setup-steps li.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--bd)); }
.setup-steps li.done b { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup-steps li.now { color: var(--pr); border-color: var(--pr); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pr) 14%, transparent); }
.setup-steps li.now b { background: var(--pr); border-color: var(--pr); color: #fff; }

.school-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 16px; }
.school-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; text-align: left; cursor: var(--cur-pointer); font: inherit; color: var(--tx);
  background: var(--card); border: 1.5px solid var(--bd); box-shadow: var(--shadow-sm, 0 6px 18px rgba(0,0,0,.05)); transition: border-color .2s, transform .2s, box-shadow .2s; }
.school-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pr) 45%, var(--bd)); }
.school-card.on { border-color: var(--pr); background: color-mix(in srgb, var(--pr) 8%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pr) 16%, transparent); }
.school-card .sc-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto;
  background: color-mix(in srgb, var(--pr) 14%, transparent); color: var(--pr); }
.school-card.on .sc-ico { background: linear-gradient(135deg, var(--pr), var(--pr-2)); color: #fff; }
.school-card .sc-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.school-card .sc-txt b { font-size: 14.5px; line-height: 1.25; }
.school-card .sc-txt small { font-size: 11.5px; color: var(--mu); }
.school-card .sc-txt em { font-style: normal; font-size: 11px; font-weight: 750; color: var(--warn); display: inline-flex; align-items: center; gap: 4px; }
.school-card.add { border-style: dashed; border-color: color-mix(in srgb, var(--pr) 40%, var(--bd)); background: color-mix(in srgb, var(--pr) 4%, transparent); box-shadow: none; }
.school-card.add .sc-ico { border-radius: 50%; background: linear-gradient(135deg, var(--pr), var(--pr-2)); color: #fff; }

.aula-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.aula-admin-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--bd-2);
  animation: rise .35s both; animation-delay: var(--d, 0ms); }
.aula-admin-card.sin-maestro { border-color: color-mix(in srgb, var(--warn) 45%, var(--bd)); background: color-mix(in srgb, var(--warn) 5%, var(--card-2)); }
.aac-top { display: flex; align-items: center; gap: 8px; }
.aac-top h4 { flex: 1; font-size: 18px; letter-spacing: -.02em; min-width: 0; }
.aac-tools { display: flex; gap: 4px; }
.aac-tools .icon-btn { width: 30px; height: 30px; }
.aac-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.aac-stats span { display: flex; flex-direction: column; align-items: center; padding: 7px 4px; border-radius: 11px; background: var(--card); border: 1px solid var(--bd-2); }
.aac-stats b { font-size: 15px; }
.aac-stats small { font-size: 9.5px; color: var(--mu); }
.aac-teachers .ap-label { margin-top: 0; }
.aac-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.aac-warn { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--warn); }
.aac-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.admin-add-card.aula-add { min-height: 200px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 760px) {
  .school-cards { grid-template-columns: minmax(0, 1fr); }
  .aula-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-add-card.aula-add { min-height: 130px; }
}

/* ===== editor de datos: estudiantes ===== */
.editor-student-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: -2px 0 12px; }
.editor-student-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.editor-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--pr) 10%, var(--card)); border: 1.5px solid color-mix(in srgb, var(--pr) 35%, var(--bd)); animation: rise .25s both; }
.editor-bulk b { margin-right: auto; color: var(--pr); }
.sel-cell { width: 34px; text-align: center; }
.sel-cell input { width: 17px; height: 17px; accent-color: var(--pr); cursor: var(--cur-pointer); }
.ed-est { display: flex; align-items: center; gap: 10px; }
.ed-est > span:not(.avatar) { display: flex; flex-direction: column; }
.warn-txt { color: var(--warn); font-weight: 700; }
.editor-students tr:has(.sel-cell input:checked) td { background: color-mix(in srgb, var(--pr) 7%, var(--card)) !important; }
.assign-school { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--pr); margin: 10px 0 6px; }
.assign-school:first-child { margin-top: 0; }
.materia-chip.school.on { background: linear-gradient(135deg, var(--pr), var(--pr-2)); }
@media (max-width: 980px) {
  .editor-students td.sel-cell { position: absolute; top: 10px; right: 10px; width: auto; }
  .editor-students tr { position: relative; }
  .editor-bulk b { flex: 1 1 100%; }
}

/* tablas: la celda de acciones se comporta como celda (antes era flex y se desalineaba) */
@media (min-width: 981px) {
  td.actions-cell, .editor-table td.actions-cell { display: table-cell; white-space: nowrap; text-align: right; vertical-align: middle; }
  td.actions-cell .icon-btn { display: inline-grid; place-items: center; vertical-align: middle; margin-left: 4px; }
  .editor-table td { vertical-align: middle; }
}
.ed-est b { line-height: 1.25; }
.ed-aula { display: flex; flex-direction: column; min-width: 0; max-width: 170px; }
.ed-aula b { white-space: nowrap; }
.ed-aula small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-team { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.editor-students td:nth-child(5), .editor-students td:nth-child(6), .editor-students td:nth-child(7) { white-space: nowrap; }
/* tiras de pestañas: se desplazan sin mostrar barra */
.editor-tabs, .tabbar { scrollbar-width: none; }
.editor-tabs::-webkit-scrollbar, .tabbar::-webkit-scrollbar { display: none; height: 0; }
/* el aviso del servidor no tapa la barra superior en computadora */
@media (min-width: 981px) { .server-old { top: auto; bottom: 18px; } }

/* ===== cursor del sistema ===== */
:root {
  --cur-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 2.5 4 19.5 8.6 15.4 11.6 22 14.6 20.6 11.7 14.2 18 14.2Z' fill='%236c5ce7' stroke='white' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, default;
}
html, body { cursor: var(--cur-default); }
/* el texto que no se edita no muestra la barra de escritura */
body :where(p, span, b, small, h1, h2, h3, h4, li, td, th, label, div, strong, em) { cursor: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="date"]):not([type="color"]), textarea, [contenteditable="true"] { cursor: var(--cur-text); }
:is(a[href], button:not(:disabled), [role="button"], [role="menuitem"], [role="tab"], summary, select, label.check, input[type="checkbox"], input[type="radio"], input[type="date"], input[type="file"]) { cursor: var(--cur-pointer); }
button:disabled { cursor: var(--cur-no); }

/* ===== menú contextual ===== */
.ctx-menu {
  position: fixed; z-index: 600; min-width: 230px; max-width: 290px; padding: 6px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--bd); border-radius: 16px;
  box-shadow: 0 22px 50px rgba(15, 10, 40, .22), 0 2px 6px rgba(15, 10, 40, .08);
  animation: ctxIn .14s cubic-bezier(.2, .8, .3, 1);
  user-select: none;
}
html[data-theme="dark"] .ctx-menu { box-shadow: 0 22px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .04); }
@keyframes ctxIn { from { opacity: 0; transform: scale(.94); } }
.ctx-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--bd-2); }
.ctx-head span { display: flex; flex-direction: column; min-width: 0; }
.ctx-head b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tx); }
.ctx-head small { font-size: 11px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-head-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: 0 0 auto; background: color-mix(in srgb, var(--pr) 15%, transparent); color: var(--pr); }
.ctx-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 13.5px; font-weight: 650; color: var(--tx); text-align: left; }
.ctx-item .ico { color: var(--pr); flex: 0 0 auto; }
.ctx-item:hover, .ctx-item:focus-visible { background: color-mix(in srgb, var(--pr) 12%, transparent); outline: none; }
.ctx-item.danger, .ctx-item.danger .ico { color: var(--danger); }
.ctx-sep { height: 1px; margin: 5px 6px; background: var(--bd-2); }

/* ===== ayuda ===== */
.help-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--bd-2); margin-bottom: 16px; }
.help-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 750; color: var(--mu); }
.help-tab:hover { color: var(--tx); }
.help-tab.on { background: var(--card); color: var(--pr); box-shadow: 0 4px 14px rgba(20, 10, 60, .08); }
.help-hero { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--pr) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--pr) 22%, var(--bd)); }
.help-hero > .ico { flex: 0 0 auto; color: var(--pr); margin-top: 2px; }
.help-hero h3 { font-size: 16px; margin-bottom: 4px; }
.help-hero p { font-size: 13.5px; line-height: 1.55; color: var(--tx-2); }
.help-steps { margin: 0; padding: 0; list-style: none; counter-reset: paso; display: flex; flex-direction: column; gap: 10px; }
.help-steps li { counter-increment: paso; position: relative; padding: 11px 12px 11px 46px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--bd-2); font-size: 13.5px; line-height: 1.5; }
.help-steps li::before { content: counter(paso); position: absolute; left: 12px; top: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pr), var(--pr-2)); color: #fff; font-size: 12px; font-weight: 800; }
@media (max-width: 560px) { .help-tab { flex-direction: column; font-size: 11px; gap: 3px; } }

/* ===== reportes y campana ===== */
.notif-btn { position: relative; }
.notif-btn.has { color: var(--pr); }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; box-shadow: 0 0 0 2px var(--bg); animation: pop .3s; }
@keyframes pop { from { transform: scale(.4); } }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; }
.rep-list { display: flex; flex-direction: column; gap: 14px; }
.rep-card { padding: 16px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--bd-2); }
.rep-card.unread { border-color: color-mix(in srgb, var(--pr) 55%, var(--bd)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pr) 12%, transparent); }
.rep-card.resuelto { opacity: .85; }
.rep-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rep-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rep-who span { display: flex; flex-direction: column; }
.rep-who small { font-size: 11.5px; color: var(--mu); }
.rep-estado { padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.rep-estado.abierto { background: var(--danger-soft); color: var(--danger); }
.rep-estado.respondido { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.rep-estado.resuelto { background: var(--ok-soft); color: var(--ok); }
.rep-ctx { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rep-ctx span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; color: var(--mu); background: var(--card); border: 1px solid var(--bd-2); }
.rep-thread { display: flex; flex-direction: column; gap: 8px; }
.rep-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--bd-2); }
.rep-msg.admin { background: color-mix(in srgb, var(--pr) 9%, var(--card)); border-color: color-mix(in srgb, var(--pr) 25%, var(--bd)); }
.rep-msg.mine { align-self: flex-end; }
.rep-msg-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; }
.rep-msg-head small { margin-left: auto; color: var(--mu); font-size: 10.5px; padding-left: 8px; }
.rep-rol { font-size: 10px; font-weight: 800; color: var(--mu); text-transform: uppercase; letter-spacing: .06em; }
.rep-msg p { font-size: 13.5px; line-height: 1.5; color: var(--tx); white-space: normal; }
.rep-reply { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.rep-reply textarea { width: 100%; resize: vertical; min-height: 56px; }
.rep-reply-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ===== informe PDF: el hover siempre claro, aunque la app esté en modo oscuro ===== */
#printRoot .rpt-table tbody tr:hover, #printRoot .rpt-table tbody tr:hover td { background: #f1eeff !important; }
#printRoot, #printRoot * { cursor: var(--cur-default); }
#printRoot :is(button, select) { cursor: var(--cur-pointer); }

/* ===== cursores del sistema: selección (mano), enlace, texto y no permitido ===== */
:root {
  --cur-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M9.5 13.5V4.8a1.9 1.9 0 0 1 3.8 0v6.4h.4V9.6a1.9 1.9 0 0 1 3.8 0v1.8h.4v-.9a1.9 1.9 0 0 1 3.8 0v1.4h.2a1.8 1.8 0 0 1 3.4.9v4.8c0 4.7-2.8 7.6-7.4 7.6h-1.6c-2.8 0-4.4-1.3-5.9-3.3L5.3 17.6a1.9 1.9 0 0 1 2.9-2.4z' fill='%236c5ce7' stroke='white' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 11 3, pointer;
  --cur-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M9.5 13.5V4.8a1.9 1.9 0 0 1 3.8 0v6.4h.4V9.6a1.9 1.9 0 0 1 3.8 0v1.8h.4v-.9a1.9 1.9 0 0 1 3.8 0v1.4h.2a1.8 1.8 0 0 1 3.4.9v4.8c0 4.7-2.8 7.6-7.4 7.6h-1.6c-2.8 0-4.4-1.3-5.9-3.3L5.3 17.6a1.9 1.9 0 0 1 2.9-2.4z' fill='%23ec4899' stroke='white' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='21.5' cy='21.5' r='5' fill='%236c5ce7' stroke='white' stroke-width='1.4'/%3E%3Cpath d='M19.6 21.5h3.8M21.5 19.6v3.8' stroke='white' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 11 3, pointer;
  --cur-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28' viewBox='0 0 24 28'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h2.6c1.3 0 2.4 1 2.4 2.3 0-1.3 1.1-2.3 2.4-2.3H17M12 5.8v16.4M7 24.5h2.6c1.3 0 2.4-1 2.4-2.3 0 1.3 1.1 2.3 2.4 2.3H17M9 14h6' stroke='white' stroke-width='4.2'/%3E%3Cpath d='M7 3.5h2.6c1.3 0 2.4 1 2.4 2.3 0-1.3 1.1-2.3 2.4-2.3H17M12 5.8v16.4M7 24.5h2.6c1.3 0 2.4-1 2.4-2.3 0 1.3 1.1 2.3 2.4 2.3H17M9 14h6' stroke='%236c5ce7' stroke-width='1.9'/%3E%3C/g%3E%3C/svg%3E") 12 14, text;
  --cur-no: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='white' stroke='%23ef4444' stroke-width='2.6'/%3E%3Cpath d='M5.8 5.8l12.4 12.4' stroke='%23ef4444' stroke-width='2.6'/%3E%3C/svg%3E") 12 12, not-allowed;
}
a[href], a[href] * { cursor: var(--cur-link) !important; }
::selection { background: color-mix(in srgb, var(--pr) 30%, transparent); }
/* las fotos de perfil (iniciales) siempre centradas, aunque estén dentro de otro contenedor */
span.avatar.avatar { display: inline-grid !important; place-items: center !important; flex-direction: row !important; line-height: 1 !important;
  padding: 0 !important; text-align: center; overflow: hidden; vertical-align: middle; }
/* ventanas y avisos abiertos desde el informe quedan por encima de él */
body.rpt-open .modal-overlay { z-index: 470; }
body.rpt-open .toast { z-index: 480; }

/* ===== sombras: más suaves y con espacio para no cortarse ===== */
.photo-strip { padding: 8px 4px 14px; }
.tabbar, .editor-tabs { padding-bottom: 6px; }
.tabbar .tab.on, .editor-tabs .tab.on { box-shadow: 0 2px 8px rgba(108, 92, 231, .28); }
.modal .btn.primary { box-shadow: 0 4px 12px rgba(108, 92, 231, .24); }
.materia-chip.on { box-shadow: 0 3px 10px color-mix(in srgb, var(--pr) 26%, transparent); }
.admin-add-card .add-circle { box-shadow: 0 6px 16px color-mix(in srgb, var(--pr) 32%, transparent); }
html[data-theme="dark"] .btn.primary { box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .tab.on { box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
/* inicio: el título no se monta sobre las frutas */
@media (min-width: 761px) { .hero-copy { max-width: min(660px, calc(100% - min(330px, 30%) - 24px)); } }

/* ===== menú contextual: íconos en una columna fija ===== */
.ctx-item { line-height: 1.2; }
.ctx-ico { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 7px; color: var(--pr); }
.ctx-ico .ico { display: block; width: 16px; height: 16px; }
.ctx-item:hover .ctx-ico { background: color-mix(in srgb, var(--pr) 14%, transparent); }
.ctx-item.danger .ctx-ico { color: var(--danger); }
.ctx-txt { flex: 1; min-width: 0; }

/* ===== campos de fecha con el estilo del sistema ===== */
input[type="date"] { position: relative; padding-right: 38px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='17' rx='3'/%3E%3Cpath d='M8 2.5v4M16 2.5v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 17px; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; width: 0; padding: 0; margin: 0; pointer-events: none; }
@media (pointer: coarse) { input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; width: 100%; height: 100%; position: absolute; inset: 0; pointer-events: auto; } }
input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus { background: color-mix(in srgb, var(--pr) 22%, transparent); color: var(--tx); border-radius: 4px; }
input[type="date"].cal-open { border-color: var(--pr); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pr) 18%, transparent); }

.cal-pop { position: fixed; z-index: 700; width: 292px; padding: 12px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--bd); box-shadow: 0 20px 44px rgba(20, 12, 60, .2);
  animation: ctxIn .14s cubic-bezier(.2, .8, .3, 1); user-select: none; }
html[data-theme="dark"] .cal-pop { box-shadow: 0 20px 44px rgba(0, 0, 0, .55); }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cal-title { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14.5px; font-weight: 800; color: var(--tx); text-transform: capitalize; padding: 6px; border-radius: 10px; }
.cal-title:hover { background: color-mix(in srgb, var(--pr) 10%, transparent); color: var(--pr); }
.cal-nav { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--bd); background: var(--card-2); color: var(--pr); }
.cal-nav:hover { background: color-mix(in srgb, var(--pr) 12%, var(--card)); }
.cal-week, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-week span { text-align: center; font-size: 10.5px; font-weight: 800; color: var(--mu); padding: 4px 0; text-transform: uppercase; letter-spacing: .04em; }
.cal-day { height: 34px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--tx); position: relative; }
.cal-day.finde { color: var(--tx-2); }
.cal-day.otro { color: var(--mu); opacity: .45; }
.cal-day:hover:not(:disabled) { background: color-mix(in srgb, var(--pr) 13%, transparent); color: var(--pr); }
.cal-day.hoy { box-shadow: inset 0 0 0 1.5px var(--pr); color: var(--pr); }
.cal-day.on { background: linear-gradient(135deg, var(--pr), var(--pr-2)); color: #fff !important; box-shadow: 0 3px 10px color-mix(in srgb, var(--pr) 35%, transparent); opacity: 1; }
.cal-day:disabled { opacity: .25; }
.cal-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cal-month { height: 40px; border: 1px solid var(--bd-2); border-radius: 12px; background: var(--card-2); font: inherit; font-size: 13px; font-weight: 750; color: var(--tx); text-transform: capitalize; }
.cal-month:hover { border-color: var(--pr); color: var(--pr); }
.cal-month.on { background: linear-gradient(135deg, var(--pr), var(--pr-2)); color: #fff; border-color: transparent; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--bd-2); }
.cal-link { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 750; color: var(--mu); padding: 6px 10px; border-radius: 9px; }
.cal-link:hover { background: var(--card-2); color: var(--tx); }
.cal-link.strong { color: var(--pr); }

/* ===== nueva evaluación ===== */
.ne-progreso { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--bd-2); flex-wrap: wrap; }
.ne-ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; flex: 0 0 58px; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--card-2) 74%, transparent 75%), conic-gradient(var(--pr) calc(var(--p) * 1%), color-mix(in srgb, var(--pr) 14%, transparent) 0); }
.ne-ring b { font-size: 17px; line-height: 1; }
.ne-ring small { font-size: 9.5px; color: var(--mu); }
.ne-txt { flex: 1 1 180px; display: flex; flex-direction: column; gap: 2px; }
.ne-txt small { font-size: 12px; color: var(--mu); }
.ne-txt small.err { color: var(--danger); font-weight: 700; }
.ne-tools { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.ne-fill { display: flex; gap: 6px; }
.ne-fill input { min-width: 0; width: 70px; height: 42px; }
.ne-fill .btn { height: 42px; }
.score-grid.big { max-height: 56vh; padding: 2px 4px 6px 2px; }
.score-row { cursor: var(--cur-default); }
.score-row input.bad { border-color: var(--danger) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent); }

/* ===== ponderación con barras deslizantes ===== */
.peso-barra { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--bd-2); margin-bottom: 10px; }
.peso-barra i { display: block; height: 100%; transition: width .2s; }
.peso-barra i.vacio { background: repeating-linear-gradient(45deg, var(--bd), var(--bd) 6px, var(--bd-2) 6px, var(--bd-2) 12px); }
.peso-total { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 750; padding: 8px 12px; border-radius: 12px; margin-bottom: 14px; }
.peso-total.ok { background: var(--ok-soft); color: var(--ok); }
.peso-total.falta { background: var(--warn-soft); color: var(--warn); }
.peso-list { display: flex; flex-direction: column; gap: 14px; }
.peso-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.peso-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex: 0 0 11px; }
.peso-head b { font-size: 13.5px; }
.peso-libre { flex: 1; font-size: 11px; color: var(--mu); text-align: right; }
.peso-num { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: var(--c); }
.peso-num input { width: 58px; height: 34px; padding: 0 8px !important; text-align: right; font-weight: 800; }
.peso-range { --v: 0%; --l: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; margin: 0; }
.peso-range::-webkit-slider-runnable-track { height: 10px; border-radius: 99px;
  background: linear-gradient(to right, var(--c) 0 var(--v), color-mix(in srgb, var(--c) 22%, var(--card)) var(--v) var(--l), var(--bd) var(--l) 100%); }
.peso-range::-moz-range-track { height: 10px; border-radius: 99px;
  background: linear-gradient(to right, var(--c) 0 var(--v), color-mix(in srgb, var(--c) 22%, var(--card)) var(--v) var(--l), var(--bd) var(--l) 100%); }
.peso-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -6px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--c); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .15s; }
.peso-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--c); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.peso-range:active::-webkit-slider-thumb, .peso-range:focus-visible::-webkit-slider-thumb { transform: scale(1.15); }
.peso-range:focus-visible { outline: none; }
.peso-ley { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 11.5px; color: var(--mu); }
.peso-ley span { display: inline-flex; align-items: center; gap: 6px; }
.peso-ley i { width: 22px; height: 8px; border-radius: 99px; display: inline-block; }
.peso-ley i.actual { background: var(--pr); }
.peso-ley i.libre { background: color-mix(in srgb, var(--pr) 22%, var(--card)); border: 1px solid var(--bd-2); }
.peso-ley i.ocupado { background: var(--bd); }
.peso-presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ===== contraseña: sin el "mostrar" del navegador (Edge/IE), solo nuestro ojo ===== */
input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear,
input::-ms-reveal, input::-ms-clear { display: none !important; width: 0; height: 0; }
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button { visibility: hidden; display: none !important; pointer-events: none; }

/* ===== cabecera del menú contextual: icono centrado y alineado con los demás ===== */
.ctx-head { padding: 8px 10px 10px 6px; }
.ctx-head > span:not(.ctx-head-ico):not(.avatar) { display: flex; flex-direction: column; justify-content: center; min-width: 0; gap: 1px; }
.ctx-head > .ctx-head-ico { display: grid !important; place-items: center !important; flex-direction: initial; width: 30px; height: 30px; flex: 0 0 30px; }
.ctx-head > .ctx-head-ico .ico { display: block; width: 16px; height: 16px; margin: 0; }
.ctx-head > .avatar { flex: 0 0 30px; }
.ctx-head b { line-height: 1.25; }
.ctx-head small { line-height: 1.3; }

/* ===== listas desplegables (select) con la paleta del sistema ===== */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 16px;
  text-overflow: ellipsis;
}
select.sel-open { border-color: var(--pr); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pr) 18%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E"); }
select option { background: var(--card); color: var(--tx); }
.sel-pop { position: fixed; z-index: 710; padding: 6px; border-radius: 14px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border: 1px solid var(--bd); box-shadow: 0 18px 40px rgba(20, 12, 60, .18), 0 2px 6px rgba(20, 12, 60, .06);
  animation: ctxIn .13s cubic-bezier(.2, .8, .3, 1); user-select: none; max-width: min(420px, calc(100vw - 16px)); scrollbar-width: thin; }
html[data-theme="dark"] .sel-pop { box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.sel-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; border-radius: 9px;
  background: transparent; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--tx); text-align: left; }
.sel-opt + .sel-opt { margin-top: 2px; }
.sel-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-opt:hover:not(:disabled), .sel-opt:focus-visible { background: color-mix(in srgb, var(--pr) 11%, transparent); color: var(--pr); outline: none; }
.sel-opt:focus { outline: none; }
.sel-opt.on { background: linear-gradient(135deg, var(--pr), var(--pr-2)); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--pr) 30%, transparent); }
.sel-opt.on:hover, .sel-opt.on:focus-visible { color: #fff; background: linear-gradient(135deg, var(--pr), var(--pr-2)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pr) 35%, transparent); }
.sel-opt:disabled { opacity: .4; }
.sel-check { display: grid; place-items: center; flex: 0 0 auto; }
.sel-check .ico { display: block; }
.sel-grupo { padding: 8px 10px 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mu); }
.sel-vacio { padding: 10px; font-size: 13px; color: var(--mu); }
.help-list { display: grid; gap: 10px; font-size: 13.5px; line-height: 1.55; color: var(--tx-2); }
.help-list p { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--bd-2); }
.help-list p:first-child { background: color-mix(in srgb, var(--pr) 8%, var(--card)); border-color: color-mix(in srgb, var(--pr) 20%, transparent); }
.help-list b { color: var(--tx); }
body:not(.authed) .modal-overlay { z-index: 560; }
/* sugerencias de campos con lista */
.ac-pop .sel-opt { white-space: normal; }
.ac-pop .sel-opt.act:not(.on) { background: color-mix(in srgb, var(--pr) 13%, transparent); color: var(--pr); }
.ac-pop .sel-opt.on.act { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pr) 40%, transparent); }
.ac-tag { flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--pr) 12%, transparent); color: var(--pr); }
.sel-opt.on .ac-tag { background: rgba(255, 255, 255, .22); color: #fff; }
input.sel-open { border-color: var(--pr); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pr) 18%, transparent); }
.icon-btn.danger-hover:hover { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
