/* ============================================================
   CEPRODENT — Sistema de diseño            public_html/css/ceprodent.css
   Concepto: "medianoche eléctrica". Base profunda, paneles de vidrio,
   un acento eléctrico en degradado (iris → azul → cian) y luz que
   responde al cursor. Notas con la escala institucional:
   Superior · Alto · Básico · Bajo. Modo claro, oscuro y automático.
   ============================================================ */

@font-face { font-family: 'Sora'; src: url('fonts/sora-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('fonts/sora-600.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('fonts/sora-700.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/manrope-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/manrope-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/manrope-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/manrope-700.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }

/* ---------- Tokens: modo claro ---------- */
:root {
  color-scheme: light;
  --c-paper: #f3f5fa;
  --c-surface: #ffffff;
  --c-surface-2: #f7f8fc;
  --c-surface-3: #edf0f7;
  --c-glass: rgba(255,255,255,.78);
  --c-line: #e2e6f0;
  --c-line-strong: #cbd2e1;
  --c-ink: #0b1020;
  --c-ink-2: #454e68;
  --c-ink-3: #78819a;
  --c-brand: #5b4dff;
  --c-brand-hover: #4a3cf0;
  --c-brand-ink: #ffffff;
  --c-brand-soft: #ecebff;
  --c-brand-text: #4c3fe6;
  --c-brand-2: #0ea5e9;
  --grad: linear-gradient(120deg, #7b61ff 0%, #4f7cff 48%, #12c2e9 100%);
  --grad-soft: linear-gradient(120deg, rgba(123,97,255,.14), rgba(18,194,233,.10));
  --glow: 0 8px 28px rgba(91,77,255,.28);
  --c-ok: #059669;   --c-ok-soft: #e3f7ef;
  --c-warn: #c26a00; --c-warn-soft: #fdf1df;
  --c-bad: #e11d48;  --c-bad-soft: #fde6eb;
  --c-info: #0284c7; --c-info-soft: #e1f2fb;
  --g-superior: #059669; --g-alto: #0284c7; --g-basico: #c26a00; --g-bajo: #e11d48;
  --c-board: #0a0e1b;
  --c-board-2: #131a2c;
  --c-board-line: rgba(255,255,255,.08);
  --c-board-ink: #e7ebf7;
  --c-board-ink-2: #a2abc6;
  --c-board-ink-3: #6e7894;
  --c-overlay: rgba(8, 11, 22, .55);
  --sh-1: 0 1px 2px rgba(15, 20, 45, .06);
  --sh-2: 0 4px 12px rgba(15, 20, 45, .06), 0 18px 40px rgba(15, 20, 45, .08);
  --sh-pop: 0 24px 64px rgba(10, 14, 35, .28);
  --rad-1: 10px;
  --rad-2: 16px;
  --rad-3: 22px;
  --font: 'Manrope', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --font-d: 'Sora', 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --side-w: 256px;
  --top-h: 64px;
}

/* ---------- Tokens: modo oscuro ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --c-paper: #060912;
  --c-surface: #0d1220;
  --c-surface-2: #111829;
  --c-surface-3: #172036;
  --c-glass: rgba(14,19,34,.72);
  --c-line: rgba(148,163,214,.13);
  --c-line-strong: rgba(148,163,214,.24);
  --c-ink: #eef1fb;
  --c-ink-2: #a8b1cc;
  --c-ink-3: #717c9a;
  --c-brand: #7b6bff;
  --c-brand-hover: #8f82ff;
  --c-brand-ink: #ffffff;
  --c-brand-soft: rgba(123,107,255,.16);
  --c-brand-text: #b0a6ff;
  --c-brand-2: #38bdf8;
  --grad-soft: linear-gradient(120deg, rgba(123,97,255,.20), rgba(18,194,233,.12));
  --glow: 0 8px 32px rgba(123,107,255,.40);
  --c-ok: #34d399;   --c-ok-soft: rgba(52,211,153,.13);
  --c-warn: #fbbf24; --c-warn-soft: rgba(251,191,36,.13);
  --c-bad: #fb7185;  --c-bad-soft: rgba(251,113,133,.14);
  --c-info: #38bdf8; --c-info-soft: rgba(56,189,248,.13);
  --g-superior: #34d399; --g-alto: #38bdf8; --g-basico: #fbbf24; --g-bajo: #fb7185;
  --c-board: #070a14;
  --c-board-2: #0f1526;
  --c-overlay: rgba(2, 4, 10, .66);
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 4px 14px rgba(0,0,0,.35), 0 18px 44px rgba(0,0,0,.4);
  --sh-pop: 0 28px 80px rgba(0,0,0,.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --c-paper: #060912;
    --c-surface: #0d1220;
    --c-surface-2: #111829;
    --c-surface-3: #172036;
    --c-glass: rgba(14,19,34,.72);
    --c-line: rgba(148,163,214,.13);
    --c-line-strong: rgba(148,163,214,.24);
    --c-ink: #eef1fb;
    --c-ink-2: #a8b1cc;
    --c-ink-3: #717c9a;
    --c-brand: #7b6bff;
    --c-brand-hover: #8f82ff;
    --c-brand-ink: #ffffff;
    --c-brand-soft: rgba(123,107,255,.16);
    --c-brand-text: #b0a6ff;
    --c-brand-2: #38bdf8;
    --grad-soft: linear-gradient(120deg, rgba(123,97,255,.20), rgba(18,194,233,.12));
    --glow: 0 8px 32px rgba(123,107,255,.40);
    --c-ok: #34d399;   --c-ok-soft: rgba(52,211,153,.13);
    --c-warn: #fbbf24; --c-warn-soft: rgba(251,191,36,.13);
    --c-bad: #fb7185;  --c-bad-soft: rgba(251,113,133,.14);
    --c-info: #38bdf8; --c-info-soft: rgba(56,189,248,.13);
    --g-superior: #34d399; --g-alto: #38bdf8; --g-basico: #fbbf24; --g-bajo: #fb7185;
    --c-board: #070a14;
    --c-board-2: #0f1526;
    --c-overlay: rgba(2, 4, 10, .66);
    --sh-1: 0 1px 2px rgba(0,0,0,.4);
    --sh-2: 0 4px 14px rgba(0,0,0,.35), 0 18px 44px rgba(0,0,0,.4);
    --sh-pop: 0 28px 80px rgba(0,0,0,.6);
  }
}

/* ---------- Nombres antiguos (los usan los paneles en sus plantillas) ---------- */
:root, [data-theme] {
  --bg: var(--c-paper); --bg2: var(--c-surface-2); --bg3: var(--c-surface-3); --bg-subtle: var(--c-surface-2);
  --card: var(--c-surface); --card2: var(--c-surface-2); --glass: var(--c-surface);
  --surface: var(--c-surface); --surface2: var(--c-surface-2); --surface-raised: var(--c-surface); --surface-hover: var(--c-surface-3);
  --s1: var(--c-surface); --s2: var(--c-surface-2); --s3: var(--c-surface-3);
  --border: var(--c-line); --border2: var(--c-line-strong); --border3: var(--c-ink-3); --border-strong: var(--c-line-strong);
  --text: var(--c-ink); --text2: var(--c-ink-2); --text3: var(--c-ink-3);
  --text-primary: var(--c-ink); --text-secondary: var(--c-ink-2); --text-muted: var(--c-ink-3);
  --accent: var(--c-brand); --accent2: var(--c-brand-text); --accent3: var(--c-brand-hover); --accent-glow: transparent;
  --acc: var(--c-brand); --acc2: var(--c-brand-text); --acc3: var(--c-brand-text); --acc-glow: transparent;
  --brand: var(--c-brand); --brand-hover: var(--c-brand-hover); --brand-light: var(--c-brand-soft); --brand-ring: color-mix(in srgb, var(--c-brand) 28%, transparent);
  --cyan: var(--c-brand-text); --cyan2: var(--c-brand); --cyan-glow: transparent;
  --purple: var(--c-info); --pur: var(--c-info); --blue: var(--c-info); --blu: var(--c-info); --info: var(--c-info);
  --green: var(--c-ok); --grn: var(--c-ok); --success: var(--c-ok); --green-glow: transparent; --grn-glow: transparent;
  --red: var(--c-bad); --danger: var(--c-bad); --red-glow: transparent;
  --gold: var(--c-warn); --warn: var(--c-warn); --gold-glow: transparent;
  --success-light: var(--c-ok-soft); --warn-light: var(--c-warn-soft); --danger-light: var(--c-bad-soft); --info-light: var(--c-info-soft);
  --success-border: color-mix(in srgb, var(--c-ok) 30%, transparent); --warn-border: color-mix(in srgb, var(--c-warn) 30%, transparent); --danger-border: color-mix(in srgb, var(--c-bad) 30%, transparent);
  --r: var(--rad-2); --r-sm: var(--rad-2); --r-xs: var(--rad-1); --radius: var(--rad-2); --radius-sm: var(--rad-1); --radius-xs: var(--rad-1); --radius-lg: var(--rad-3);
  --shadow-sm: var(--sh-1); --shadow: var(--sh-2); --shadow-lg: var(--sh-pop);
  --input-bg: var(--c-surface); --input-border: var(--c-line-strong);
  --theme-btn-bg: transparent; --theme-btn-text: var(--c-ink-2);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  background: var(--c-paper);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  letter-spacing: -0.003em;
  overflow-x: hidden;
}
body::before, .bg-grid { display: none !important; content: none !important; }
a { color: var(--c-brand-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
img, video { max-width: 100%; }
strong, b { font-weight: 700; }
h1, h2, h3, h4 { font-family: var(--font-d); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--c-ink); }
::selection { background: color-mix(in srgb, var(--c-brand) 25%, transparent); }
:focus-visible { outline: 2px solid var(--c-brand) !important; outline-offset: 2px !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--c-ink) 18%, transparent); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sin animaciones de entrada en cada bloque: el contenido aparece quieto */
.au, .d1, .d2, .d3, .d4, .d5 { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Íconos ---------- */
.i { width: 1.1em; height: 1.1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.16em; }
.i-lg { width: 22px; height: 22px; }

/* ---------- Marca ---------- */
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; display: block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   ESTRUCTURA: pizarra (barra lateral) + hoja (contenido)
   ============================================================ */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 300;
  background: var(--c-board); color: var(--c-board-ink);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--c-board-line);
  transition: transform .25s ease;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 18px; }
.side-brand .brand-name { font-weight: 700; font-size: 16px; letter-spacing: .02em; color: #fff; line-height: 1.1; }
.side-brand .brand-sub { font-size: 12.5px; color: var(--c-board-ink-2); margin-top: 2px; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 10px 12px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); }
.side-sec { font-size: 12px; font-weight: 600; color: var(--c-board-ink-3); padding: 16px 10px 6px; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; margin: 1px 0; border: 0; border-radius: var(--rad-1);
  background: transparent; color: var(--c-board-ink-2); font: inherit; font-size: 14.5px; font-weight: 500;
  text-align: left; cursor: pointer; transition: background .15s, color .15s;
}
.side-link .i { width: 19px; height: 19px; opacity: .85; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.is-active, .side-link.active { background: rgba(255,255,255,.09); color: #fff; font-weight: 600; }
.side-link.is-active::before, .side-link.active::before { content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-brand); }
.side-link.is-active .i, .side-link.active .i { opacity: 1; color: var(--c-brand); }
.side-link .nav-txt { flex: 1; min-width: 0; }
.side-badge, .nav-badge {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; text-align: center;
  background: var(--c-brand); color: #1b1404; font-size: 12px; font-weight: 700; line-height: 1.5;
}
.side-foot { padding: 12px 10px 14px; border-top: 1px solid var(--c-board-line); display: flex; flex-direction: column; gap: 6px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--rad-1); cursor: pointer; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; width: 100%; }
.side-user:hover { background: rgba(255,255,255,.06); }
.side-user .av { width: 36px; height: 36px; }
.side-user .nm { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .ml { font-size: 12.5px; color: var(--c-board-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user > div { min-width: 0; flex: 1; }
.side-foot .side-link { font-size: 14px; padding: 8px 10px; }
.side-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 10px 6px; border-radius: var(--rad-1); overflow: hidden; background: var(--c-board-line); }
.side-stats > button { background: var(--c-board-2); border: 0; color: var(--c-board-ink-2); font: inherit; text-align: left; padding: 9px 11px; cursor: pointer; }
.side-stats > button:hover { color: #fff; }
.side-stats b { display: block; font-size: 20px; line-height: 1.1; color: #fff; font-weight: 700; }
.side-stats span { font-size: 12px; }
.side-scrim { display: none; position: fixed; inset: 0; background: var(--c-overlay); z-index: 290; }
.side-scrim.show { display: block; }

.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 200; height: var(--top-h);
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: color-mix(in srgb, var(--c-paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.topbar-title { font-size: 15px; font-weight: 600; color: var(--c-ink-2); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title b { color: var(--c-ink); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn, .icon-btn.menu-btn { display: none; }
.content { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 28px 64px; display: flex; flex-direction: column; gap: 22px; }
.content > * { min-width: 0; }

/* Botón de tema */
.theme-toggle-btn, .theme-switch-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px;
  border-radius: var(--rad-1); border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-ink-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.theme-toggle-btn:hover { color: var(--c-ink); border-color: var(--c-line-strong); }
.theme-toggle-btn.solo-icono { width: 36px; padding: 0; justify-content: center; }
.theme-toggle-btn.solo-icono .theme-label { display: none; }
.side .theme-toggle-btn { background: transparent; border-color: var(--c-board-line); color: var(--c-board-ink-2); width: 100%; justify-content: flex-start; height: 38px; }
.side .theme-toggle-btn:hover { color: #fff; background: rgba(255,255,255,.06); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: var(--rad-1); border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--c-ink); border-color: var(--c-line-strong); }
.icon-btn .i { width: 19px; height: 19px; }

/* Avatar */
.av {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-brand-soft); color: var(--c-brand-text); font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side .av { background: var(--c-board-2); color: var(--c-board-ink); box-shadow: inset 0 0 0 1px var(--c-board-line); }

@media (max-width: 900px) {
  .side { transform: translateX(-100%); box-shadow: none; }
  .side.open { transform: translateX(0); box-shadow: var(--sh-pop); }
  .main { margin-left: 0; }
  .menu-btn, .icon-btn.menu-btn { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .content { padding: 18px 16px 90px; gap: 18px; }
  .topbar .theme-toggle-btn .theme-label { display: none; }
  .topbar .theme-toggle-btn { width: 36px; padding: 0; justify-content: center; }
}

/* ============================================================
   COMPONENTES
   ============================================================ */

/* Encabezado de página */
.page-header, .section-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0;
}
.page-header > div:first-child, .section-header > div:first-child { min-width: 0; }
.page-header .flex-between { width: 100%; }
.page-title, .section-title, .page-header h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; color: var(--c-ink); line-height: 1.15; }
.page-title span { color: inherit; }
.page-sub, .section-sub, .page-header p { font-size: 14.5px; color: var(--c-ink-3); margin-top: 4px; }
.page-line { display: none; }
.page-header h1 .i, .section-title .i { display: none; }
.subhead { font-size: 15px; font-weight: 700; color: var(--c-ink); margin: 6px 0 -6px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: var(--rad-1); border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  text-decoration: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  background: var(--c-surface); color: var(--c-ink);
}
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .i { width: 17px; height: 17px; }
.btn-primary { background: var(--c-brand); color: var(--c-brand-ink); border-color: var(--c-brand); }
.btn-primary:hover { background: var(--c-brand-hover); border-color: var(--c-brand-hover); }
.btn-outline, .btn-finalizar { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line-strong); }
.btn-outline:hover, .btn-finalizar:hover { border-color: var(--c-ink-3); background: var(--c-surface-2); }
.btn-outline.active { background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink); }
.btn-ghost { background: transparent; color: var(--c-ink-2); border-color: transparent; }
.btn-ghost:hover { background: var(--c-surface-3); color: var(--c-ink); }
.btn-danger { background: transparent; color: var(--c-bad); border-color: color-mix(in srgb, var(--c-bad) 35%, transparent); }
.btn-danger:hover { background: var(--c-bad); color: #fff; border-color: var(--c-bad); }
.btn-success { background: transparent; color: var(--c-ok); border-color: color-mix(in srgb, var(--c-ok) 35%, transparent); }
.btn-success:hover { background: var(--c-ok); color: #fff; }
.btn-warn { background: var(--c-warn-soft); color: var(--c-warn); border-color: color-mix(in srgb, var(--c-warn) 35%, transparent); }
.btn-warn:hover { background: var(--c-warn); color: #fff; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13.5px; }
.btn-xs { height: 28px; padding: 0 9px; font-size: 13px; gap: 5px; }
.btn-xs .i, .btn-sm .i { width: 15px; height: 15px; }
.btn-w { width: 100%; }
.btn-ico { width: 32px; padding: 0; }
.btn-xs.btn-ico { width: 28px; }

/* Formularios */
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 6px; }
.field, .form-field { margin-bottom: 14px; display: block; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }
.form-field label, .form-label, .field label, .login-label, .pf-field label { font-size: 13.5px; font-weight: 600; color: var(--c-ink-2); text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.form-field .form-label { margin-bottom: 0; }
.form-row, .pt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-hint { font-size: 13px; color: var(--c-ink-3); margin-top: 6px; }
input, select, textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; border-radius: var(--rad-1);
  border: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-ink);
  font: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--c-brand); flex-shrink: 0; }
input[type="file"] { padding: 7px; font-size: 14px; }
input[type="color"] { padding: 2px; height: 40px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737b77' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
select option { background: var(--c-surface); color: var(--c-ink); }
input::placeholder, textarea::placeholder { color: var(--c-ink-3); opacity: .85; }
input:focus, select:focus, textarea:focus { border-color: var(--c-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-brand) 20%, transparent); }
.vc-btn { color: var(--c-ink-3) !important; }

/* Paneles (tarjetas) */
.card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2);
  padding: 20px 22px; margin: 0;
}
.card:hover { box-shadow: none; }
.card + .card { margin-top: 0; }
.card-title {
  display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 700; color: var(--c-ink);
  text-transform: none; letter-spacing: 0; margin-bottom: 14px;
}
.card-title::after { display: none; }
.card-title .i { color: var(--c-ink-3); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
  font-size: 15.5px; font-weight: 700; color: var(--c-ink); text-transform: none; letter-spacing: 0; }
.card-header .card-title { margin: 0; }
.card.flush, .card[style*="padding:0"], .card[style*="padding: 0"] { padding: 0 !important; overflow: hidden; }

/* Insignias y chips */
.badge, .chip, .sc-state {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid transparent;
  background: var(--c-surface-3); color: var(--c-ink-2);
}
.badge .i, .chip .i { width: 14px; height: 14px; }
.b-green, .bg, .badge-green, .chip.g, .chip-grn, .sc-state.activa { background: var(--c-ok-soft); color: var(--c-ok); }
.b-red, .br, .badge-red, .chip.r { background: var(--c-bad-soft); color: var(--c-bad); }
.b-gold, .b-warn, .by, .badge-yellow, .chip-warn { background: var(--c-warn-soft); color: var(--c-warn); }
.b-cyan, .bp, .badge-purple, .chip.p, .chip-ind, .badge-blue, .chip.b { background: var(--c-brand-soft); color: var(--c-brand-text); }
.bd, .badge-gray, .sc-state.finalizada { background: var(--c-surface-3); color: var(--c-ink-3); }

/* Pestañas */
.tabs {
  display: flex; gap: 2px; padding: 0; margin: 0; background: transparent; border: 0; border-bottom: 1px solid var(--c-line);
  border-radius: 0; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px 11px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent;
  color: var(--c-ink-3); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: none !important;
}
.tab .i { width: 16px; height: 16px; }
.tab:hover { color: var(--c-ink); background: transparent; }
.tab.active { color: var(--c-ink); border-bottom-color: var(--c-brand); background: transparent; }
.tab-badge { background: var(--c-surface-3); color: var(--c-ink-2); padding: 1px 8px; border-radius: 99px; font-size: 12px; }

/* Resumen de cifras: una franja, no tarjetas sueltas */
.stats-grid, .stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 0;
  background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--rad-2); overflow: hidden;
}
.stat-card, .stat {
  position: relative; background: var(--c-surface); border: 0 !important; border-radius: 0 !important; padding: 16px 18px;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: start;
  box-shadow: none !important; transform: none !important; cursor: default; overflow: visible;
}
.stat-card[onclick], .stat[onclick] { cursor: pointer; }
.stat-card[onclick]:hover, .stat[onclick]:hover { background: var(--c-surface-2); }
.stat-card::before, .stat-card::after, .stat::before, .stat::after { display: none !important; }
.stat-num, .stat-value, .stat-val {
  grid-column: 1; grid-row: 1; font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--c-ink) !important; margin: 0;
}
.stat-lbl, .stat-label { grid-column: 1; grid-row: 2; font-size: 13.5px; color: var(--c-ink-3); text-transform: none; letter-spacing: 0; font-weight: 500; margin-top: 2px; }
.stat-corner, .stat-icon {
  grid-column: 2; grid-row: 1 / span 2; width: auto; height: auto; margin: 2px 0 0; background: none !important;
  color: var(--c-ink-3) !important; opacity: 1; position: static; font-size: 0;
}
.stat-corner .i, .stat-icon .i { width: 20px; height: 20px; }
.stat-sub { grid-column: 1; font-size: 12.5px; color: var(--c-ink-3); }

/* Listas en fila (el patrón principal de la app) */
.user-row, .student-item, .cal-row, .entrega-row, .reminder-card, .list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--c-line); border-radius: 0;
}
.user-row:last-child, .student-item:last-child, .cal-row:last-child, .list-row:last-child { border-bottom: 0; }
.user-row:hover, .student-item:hover { background: var(--c-surface-2); }
.user-av, .user-avatar, .st-av, .er-av, .asistencia-est-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-surface-3) !important; color: var(--c-ink-2) !important; font-weight: 700; font-size: 13px;
}
.user-avatar .i, .st-av .i { width: 18px; height: 18px; }
.user-info, .st-info, .er-info { flex: 1; min-width: 0; }
.user-name, .st-name, .er-name { font-size: 15px; font-weight: 600; color: var(--c-ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-email, .st-grade, .er-date { font-size: 13.5px; color: var(--c-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-actions, .row-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.list-group-head {
  padding: 9px 16px; font-size: 13.5px; font-weight: 700; color: var(--c-ink-2);
  background: var(--c-surface-2); border-bottom: 1px solid var(--c-line); border-top: 1px solid var(--c-line);
}
.list-group-head:first-child { border-top: 0; }

/* Agrupación por grado */
.grade-group { margin-bottom: 18px; border: 1px solid var(--c-line); border-radius: var(--rad-2); overflow: hidden; background: var(--c-surface); }
.grade-group-header { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--c-surface-2); border-bottom: 1px solid var(--c-line); margin: 0; }
.gg-line { display: none; }
.gg-title { font-size: 14px; font-weight: 700; color: var(--c-ink); text-transform: none; letter-spacing: 0; }
.gg-count { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--c-ink-3); background: none; padding: 0; }

/* Tablas */
.tbl-wrap, .table-wrap, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th {
  text-align: left; padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--c-ink-2) !important;
  text-transform: none !important; letter-spacing: 0 !important; background: var(--c-surface-2); border-bottom: 1px solid var(--c-line-strong) !important;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
tr:hover td { background: color-mix(in srgb, var(--c-surface-3) 45%, transparent); }

/* Barras de progreso */
.prog, .progress, .prog-bar { height: 6px; background: var(--c-surface-3); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.prog-fill, .progress-bar { height: 100%; border-radius: 99px; background: var(--c-brand); transition: width .6s ease; }

/* Estados vacíos */
.empty, .empty-state { text-align: center; padding: 44px 20px; color: var(--c-ink-3); }
.empty-icon, .empty-state .icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 50%; background: var(--c-surface-3); color: var(--c-ink-3); margin-bottom: 12px; opacity: 1; font-size: 0; }
.empty-icon .i, .empty-state .icon .i { width: 24px; height: 24px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--c-ink); margin-bottom: 4px; }
.empty-sub, .empty-text, .empty-state p { font-size: 14px; color: var(--c-ink-3); }
.empty .btn { margin-top: 14px; }

/* Avisos dentro de páginas */
.note, .alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--rad-1); font-size: 14px; line-height: 1.5; border: 1px solid; }
.note .i, .alert .i { margin-top: 2px; }
.note-info, .alert-info { background: var(--c-info-soft); color: var(--c-ink); border-color: color-mix(in srgb, var(--c-info) 28%, transparent); }
.note-warn, .alert-warn { background: var(--c-warn-soft); color: var(--c-ink); border-color: color-mix(in srgb, var(--c-warn) 30%, transparent); }
.note-bad, .alert-danger { background: var(--c-bad-soft); color: var(--c-bad); border-color: color-mix(in srgb, var(--c-bad) 30%, transparent); }
.alert-success { background: var(--c-ok-soft); color: var(--c-ok); border-color: color-mix(in srgb, var(--c-ok) 30%, transparent); }
.info-box { padding: 12px 14px; border-radius: var(--rad-1); background: var(--c-surface-2); border: 1px solid var(--c-line); font-size: 14px; color: var(--c-ink-2); }

/* Nota con escala institucional */
.nota { font-weight: 700; font-variant-numeric: tabular-nums; }
.g-superior { color: var(--g-superior) !important; }
.g-alto { color: var(--g-alto) !important; }
.g-basico { color: var(--g-basico) !important; }
.g-bajo { color: var(--g-bajo) !important; }
.escala { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.escala::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }

/* ---------- Modales ---------- */
.modal-bg, .modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 800; padding: 20px;
  background: var(--c-overlay); align-items: center; justify-content: center;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.modal-bg.open, .modal-overlay.show { display: flex; }
.modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); border-radius: var(--rad-3);
  box-shadow: var(--sh-pop); animation: modalIn .18s ease-out;
}
.modal::before { display: none !important; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--c-line); }
.modal-title { font-size: 18px; font-weight: 700; color: var(--c-ink); text-transform: none; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.modal-x, .modal-close {
  width: 34px; height: 34px; border-radius: var(--rad-1); border: 0; background: transparent; color: var(--c-ink-3);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; flex-shrink: 0;
}
.modal-x:hover, .modal-close:hover { background: var(--c-surface-3); color: var(--c-ink); }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.modal-body > .field { margin: 0; }
.modal-foot { padding: 14px 20px 18px; display: flex; flex-direction: row-reverse; gap: 8px; border-top: 1px solid var(--c-line); background: var(--c-surface-2); }
.modal-foot .btn-w { width: auto; flex: 0 0 auto; }
/* Modales del panel de coordinación (contenido directo) */
.modal > h2 { font-size: 18px; padding: 18px 20px 14px; margin: 0; border-bottom: 1px solid var(--c-line); }
.modal > .field, .modal > div:not([class]), .modal > button, .modal > p { margin-left: 20px; margin-right: 20px; }
.modal > h2 + .field { margin-top: 18px; }
.modal > button:last-child, .modal > div:last-child:not([class]) { margin-bottom: 20px; }
.modal-scroll { overflow-y: auto; }
@media (max-width: 640px) {
  .modal-bg, .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: none; border-radius: var(--rad-3) var(--rad-3) 0 0; max-height: 92vh; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn-w, .modal-foot .btn { width: 100%; }
  .form-row, .pt-row { grid-template-columns: 1fr; }
}

/* ---------- Notificación ---------- */
#toast, .toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 9500; transform: translate(-50%, 16px);
  display: flex; align-items: center; gap: 10px; max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px 12px 14px; border-radius: var(--rad-2);
  background: var(--c-ink); color: var(--c-paper); font-size: 14.5px; font-weight: 600; line-height: 1.4;
  box-shadow: var(--sh-pop); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: normal;
  border: 0;
}
#toast.show, .toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast .i { width: 19px; height: 19px; }
.toast-ok .i { color: #7fd6a5; }
.toast-err .i { color: #ff9a8f; }
.toast-info .i { color: #9cc7ee; }
[data-theme="dark"] #toast, :root[data-theme-efectivo="dark"] #toast { background: #f1f4f2; color: #16201b; }
:root[data-theme-efectivo="dark"] .toast-ok .i { color: var(--c-ok); filter: brightness(.7); }
:root[data-theme-efectivo="dark"] .toast-err .i { color: #b3261e; }
:root[data-theme-efectivo="dark"] .toast-info .i { color: #275f8e; }
@media (max-width: 900px) { body.has-bottom-nav #toast { bottom: 84px; } }

/* ---------- Cargando ---------- */
#loader, #loading {
  position: fixed; inset: 0; z-index: 9800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--c-paper); color: var(--c-ink-3); font-size: 14px; transition: opacity .3s, visibility .3s;
}
#loading { display: none; background: color-mix(in srgb, var(--c-paper) 70%, transparent); z-index: 9000; }
#loading.show { display: flex; }
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.spinner, .loader-ring, .loader-spin, .loader-spinner, .ld-ring {
  width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--c-line-strong); border-top-color: var(--c-brand);
  animation: giro .7s linear infinite; margin: 0;
}
@keyframes giro { to { transform: rotate(360deg); } }
.loader-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 28px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); box-shadow: var(--sh-2); }
.loader-txt { font-size: 14px; color: var(--c-ink-2); text-transform: none; letter-spacing: 0; }

/* Utilidades */
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.flex-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--c-ink-3); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.toolbar-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.toolbar-row > .grow { flex: 1; min-width: 200px; }
.toolbar-row label { margin-bottom: 5px; }
.search { position: relative; }
.search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--c-ink-3); width: 17px; height: 17px; pointer-events: none; }
.search input { padding-left: 36px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid var(--c-surface); box-shadow: 0 0 0 1px var(--c-line-strong); transition: transform .15s; }
.swatch.sel { box-shadow: 0 0 0 2px var(--c-ink); transform: scale(1.06); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14.5px; }
.kv dt { color: var(--c-ink-3); }
.kv dd { color: var(--c-ink); font-weight: 600; }

/* Marca de materia (monograma de color) */
.mat-mark, .sc-icon, .mc-icon, .det-icon, .ban-av.mat {
  width: 44px; height: 44px; border-radius: var(--rad-2); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px !important; font-weight: 700; letter-spacing: .02em; color: #fff !important;
  background: var(--mc, var(--c-brand)) !important; box-shadow: none !important;
}

/* ============================================================
   ACCESO (login)
   ============================================================ */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; }
.auth-board {
  position: relative; background: var(--c-board); color: var(--c-board-ink); padding: 40px 48px; display: flex; flex-direction: column; overflow: hidden;
}
.auth-board::after { /* trazos de tiza muy tenues */
  content: ''; position: absolute; inset: auto -10% -18% 30%; height: 60%;
  background: repeating-linear-gradient(-8deg, transparent 0 22px, rgba(255,255,255,.035) 22px 23px);
  pointer-events: none;
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { width: 40px; height: 40px; }
.auth-brand b { font-size: 17px; letter-spacing: .03em; color: #fff; }
.auth-brand span { display: block; font-size: 13px; color: var(--c-board-ink-3); }
.auth-quote { margin-top: auto; position: relative; z-index: 1; }
.auth-quote h1 { color: #fff; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; max-width: 14ch; }
.auth-quote p { color: var(--c-board-ink-2); font-size: 16px; margin-top: 14px; max-width: 38ch; }
.auth-ledge { margin-top: 36px; height: 6px; width: 120px; border-radius: 3px; background: var(--c-brand); }
.auth-side { display: flex; flex-direction: column; padding: 24px 32px; }
.auth-top { display: flex; justify-content: flex-end; gap: 8px; }
.auth-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 0 40px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; letter-spacing: -0.015em; }
.auth-card .lead { color: var(--c-ink-3); margin-top: 6px; font-size: 15px; }
.auth-form { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.auth-form .field { margin: 0; }
.auth-form .btn { height: 44px; font-size: 15px; }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 22px; border: 1px solid var(--c-line-strong); border-radius: var(--rad-2); overflow: hidden; }
.role-pick button {
  border: 0; border-right: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-ink-2);
  font: inherit; font-size: 14px; font-weight: 600; padding: 12px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.role-pick button:last-child { border-right: 0; }
.role-pick button .i { width: 20px; height: 20px; }
.role-pick button:hover { color: var(--c-ink); background: var(--c-surface-2); }
.role-pick button.sel { background: var(--c-brand); color: var(--c-brand-ink); }
.link-btn { background: none; border: 0; color: var(--c-brand-text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--c-ink-3); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 18px; }
.back-btn:hover { color: var(--c-ink); }
.steps { display: flex; gap: 6px; margin-top: 18px; }
.steps span { height: 4px; flex: 1; border-radius: 2px; background: var(--c-line); }
.steps span.on { background: var(--c-brand); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-board { padding: 22px 20px 26px; min-height: 0; }
  .auth-quote { margin-top: 26px; }
  .auth-quote h1 { font-size: 28px; }
  .auth-quote p { display: none; }
  .auth-ledge { margin-top: 18px; height: 4px; width: 72px; }
  .auth-side { padding: 14px 18px; }
  .auth-top { position: absolute; top: 18px; right: 16px; }
  .auth-top .theme-toggle-btn { background: transparent; border-color: var(--c-board-line); color: var(--c-board-ink-2); }
  .auth-body { padding-top: 8px; align-items: flex-start; }
}

/* ============================================================
   PIEZAS DE LOS PANELES
   ============================================================ */

/* Saludo / encabezado de inicio */
.hello { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hello .av { width: 52px; height: 52px; font-size: 17px; }
.hello h1 { font-size: 26px; letter-spacing: -0.015em; }
.hello p { color: var(--c-ink-3); margin-top: 2px; }
.hello .grow { flex: 1; min-width: 220px; }

/* Rejilla de dos columnas */
.cols-2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .cols-2 { grid-template-columns: 1fr; } }

/* Materias (tarjetas: aquí sí, porque cada materia es un objeto) */
.subjects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.subject-card, .mat-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; cursor: pointer;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2);
  transition: border-color .15s, box-shadow .15s; overflow: hidden;
}
.subject-card::before, .mat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mc, var(--c-brand)); }
.subject-card:hover, .mat-card:hover { border-color: var(--c-line-strong); box-shadow: var(--sh-2); transform: none; }
.subject-card.finalizada { opacity: .8; }
.subject-card.finalizada::before { background: var(--c-ink-3); }
.color-bar { display: none; }
.sc-head, .mc-head { display: flex; align-items: center; gap: 13px; margin: 0; }
.sc-name, .mc-name { font-size: 16.5px; font-weight: 700; color: var(--c-ink); line-height: 1.25; }
.sc-grade, .mc-sub { font-size: 13.5px; color: var(--c-ink-3); margin-top: 2px; }
.sc-state { margin-top: 6px; height: 22px; font-size: 12px; }
.mc-docente { font-size: 13.5px; color: var(--c-ink-2); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.mc-docente .i { color: var(--c-ink-3); }
.mc-badge { margin-left: auto; align-self: flex-start; }
.sc-meta, .mc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding-top: 12px; border-top: 1px solid var(--c-line); }
.meta-item, .mc-stat { text-align: left; padding-right: 8px; }
.meta-val, .mc-stat-val { font-size: 19px; font-weight: 700; color: var(--c-ink) !important; line-height: 1.1; }
.meta-lbl, .mc-stat-lbl { font-size: 12.5px; color: var(--c-ink-3); text-transform: none; letter-spacing: 0; margin-top: 2px; }
.meta-val.bad { color: var(--c-bad) !important; }
.sc-actions { display: none; }

/* Cabecera de materia (detalle) */
.banner, .det-header {
  position: relative; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2);
  overflow: hidden;
}
.banner::before, .det-header::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mc, var(--c-brand)); }
.banner::after, .det-header::after { display: none; }
.ban-av { width: 52px; height: 52px; border-radius: var(--rad-2); }
.ban-info, .det-info { flex: 1; min-width: 220px; }
.ban-label { font-size: 13px; font-weight: 600; color: var(--c-ink-3); text-transform: none; letter-spacing: 0; margin-bottom: 2px; }
.ban-name, .det-name { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--c-ink); }
.ban-sub, .det-meta { font-size: 14px; color: var(--c-ink-3); margin-top: 2px; }
.ban-chips, .det-chips, .hero-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ban-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.det-docente { font-size: 14px; color: var(--c-ink-2); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.det-docente span { color: var(--c-ink); font-weight: 600; }
.det-prog { width: 100%; padding-top: 12px; margin-top: 2px; border-top: 1px solid var(--c-line); }
.det-prog-label, .prog-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--c-ink-3); }

/* Tareas del docente */
.tarea-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); overflow: hidden; margin-bottom: 12px; }
.tarea-card.activa, .tarea-card.vencida { border-left: 1px solid var(--c-line); }
.tarea-card.vencida .tarea-title::after { content: ''; }
.tarea-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 16px 18px 12px; cursor: pointer; }
.tarea-header:hover { background: transparent; }
.tarea-title { font-size: 16px; font-weight: 700; color: var(--c-ink); display: flex; align-items: center; gap: 7px; }
.tarea-title .i { color: var(--c-ink-3); }
.tarea-desc { font-size: 14px; color: var(--c-ink-2); margin-top: 4px; line-height: 1.5; }
.tarea-meta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.tmeta { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--c-ink-3); background: none; padding: 0; }
.tarea-prog { margin: 0 18px 12px; }
.tarea-footer { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 18px; border-top: 1px solid var(--c-line); background: var(--c-surface-2); }
.tarea-entregas { display: none; border-top: 1px solid var(--c-line); }
.tarea-entregas.open { display: block; }
.te-list-title { padding: 12px 18px 6px; font-size: 14px; font-weight: 700; color: var(--c-ink); text-transform: none; letter-spacing: 0; }
.entrega-row { padding: 10px 18px; flex-wrap: wrap; }
.er-nota { font-size: 18px; font-weight: 700; min-width: 34px; text-align: right; }
.ev-block { padding: 0 18px 16px; }

/* Asistencia (lista para pasar) */
.asistencia-wrapper { display: flex; flex-direction: column; gap: 16px; }
.asistencia-top-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 14px 18px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); }
.asistencia-fecha-display { display: flex; align-items: center; gap: 12px; }
.asistencia-fecha-icon { width: 40px; height: 40px; border-radius: var(--rad-1); background: var(--c-surface-3); color: var(--c-ink-2); display: flex; align-items: center; justify-content: center; font-size: 0; }
.asistencia-fecha-icon .i { width: 20px; height: 20px; }
.asistencia-fecha-texto { font-size: 16px; font-weight: 700; }
.asistencia-fecha-texto::first-letter { text-transform: uppercase; }
.asistencia-fecha-sub { font-size: 13.5px; color: var(--c-ink-3); }
.asistencia-contador { display: flex; gap: 18px; align-items: center; }
.asistencia-contador-item { text-align: center; min-width: 60px; }
.asistencia-contador-num { font-size: 24px; font-weight: 700; }
.asistencia-contador-lbl { font-size: 12.5px; color: var(--c-ink-3); text-transform: none; letter-spacing: 0; }
.asistencia-contador-divider { width: 1px; height: 30px; background: var(--c-line); }
.asistencia-acciones-top { display: flex; gap: 8px; flex-wrap: wrap; }
.asistencia-table-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); overflow: hidden; }
.asistencia-table-header { display: grid; grid-template-columns: 1fr 156px; padding: 10px 18px; background: var(--c-surface-2); border-bottom: 1px solid var(--c-line); }
.asistencia-table-header-cell { font-size: 13px; font-weight: 700; color: var(--c-ink-2); text-transform: none; letter-spacing: 0; }
.asistencia-fila { display: grid; grid-template-columns: 1fr 156px; align-items: center; padding: 6px 18px; border-bottom: 1px solid var(--c-line); min-height: 58px; border-left: 3px solid transparent; }
.asistencia-fila.estado-presente { border-left-color: var(--c-ok); background: transparent; }
.asistencia-fila.estado-tarde { border-left-color: var(--c-warn); background: color-mix(in srgb, var(--c-warn) 5%, transparent); }
.asistencia-fila.estado-ausente { border-left-color: var(--c-bad); background: color-mix(in srgb, var(--c-bad) 6%, transparent); }
.asistencia-est-info { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.asistencia-est-avatar { width: 36px; height: 36px; }
.asistencia-est-nombre { font-size: 15px; font-weight: 600; }
.asistencia-est-grado { font-size: 13px; color: var(--c-ink-3); }
.asistencia-estado-selector { display: flex; gap: 6px; justify-content: center; }
.asistencia-chip {
  width: 42px; height: 38px; border-radius: var(--rad-1); border: 1px solid var(--c-line-strong); background: var(--c-surface);
  color: var(--c-ink-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 0; opacity: 1; transition: none;
}
.asistencia-chip .i { width: 19px; height: 19px; }
.asistencia-chip:hover { border-color: var(--c-ink-3); transform: none; }
.asistencia-chip.presente.active { background: var(--c-ok); border-color: var(--c-ok); color: #fff; box-shadow: none; }
.asistencia-chip.tarde.active { background: var(--c-warn); border-color: var(--c-warn); color: #fff; box-shadow: none; }
.asistencia-chip.ausente.active { background: var(--c-bad); border-color: var(--c-bad); color: #fff; box-shadow: none; }
.asistencia-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; background: var(--c-surface-2); }
.asistencia-footer-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.asistencia-footer-stat { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--c-ink-2); }
.asistencia-footer-dot { width: 8px; height: 8px; border-radius: 50%; }
.asistencia-historico-item { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-1); margin-bottom: 8px; overflow: hidden; }
.asistencia-historico-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; cursor: pointer; flex-wrap: wrap; }
.asistencia-historico-head:hover { background: var(--c-surface-2); }
.asistencia-historico-body { display: none; padding: 0 16px 12px; }
.asistencia-historico-body.open { display: block; }
@media (max-width: 640px) {
  .asistencia-table-header { display: none; }
  .asistencia-fila { grid-template-columns: 1fr; padding: 8px 14px 12px; }
  .asistencia-estado-selector { justify-content: flex-start; }
  .asistencia-chip { width: 54px; height: 40px; }
  .asistencia-contador { width: 100%; justify-content: space-around; }
}

/* Anuncios */
.anuncio-item, .ann-card {
  padding: 14px 16px; margin-bottom: 10px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2);
  border-left: 3px solid var(--c-line-strong);
}
.anuncio-item.urgent, .ann-card.imp { border-left-color: var(--c-bad); background: var(--c-surface); }
.anuncio-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.anuncio-titulo, .anuncio-title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.anuncio-fecha, .anuncio-time { font-size: 13px; color: var(--c-ink-3); margin-top: 2px; }
.anuncio-text, .anuncio-body { font-size: 14.5px; color: var(--c-ink-2); line-height: 1.55; white-space: pre-wrap; }
.anuncio-card { padding: 14px 0; border-bottom: 1px solid var(--c-line); }
.anuncio-card:last-child { border-bottom: 0; padding-bottom: 0; }
.anuncio-card:first-child { padding-top: 0; }

/* Calificar */
.cal-grupo { background: var(--c-surface); }
.cal-row { align-items: flex-start; }
.grade-selector-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--c-line); border-radius: var(--rad-1); cursor: pointer; background: var(--c-surface); }
.grade-selector-card:hover, .grade-selector-card.selected { border-color: var(--c-brand); background: var(--c-brand-soft); }
.badge-tardia { background: var(--c-warn-soft); color: var(--c-warn); padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; }

/* Páginas de formulario a pantalla completa (docente) */
.pagina-tarea { position: fixed; inset: 0; z-index: 700; background: var(--c-paper); display: none; flex-direction: column; overflow-y: auto; }
.pagina-tarea.show { display: flex; }
.pt-topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 24px; background: color-mix(in srgb, var(--c-paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-line); }
.pt-back { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--rad-1); border: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pt-back:hover { border-color: var(--c-ink-3); }
.pt-title { font-size: 18px; font-weight: 700; }
.pt-sub { font-size: 13.5px; color: var(--c-ink-3); }
.pt-body { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 24px 110px; display: flex; flex-direction: column; gap: 18px; }
.pt-foot { position: sticky; bottom: 0; display: flex; gap: 10px; justify-content: flex-end; padding: 12px 24px; background: var(--c-surface-2); border-top: 1px solid var(--c-line); margin-top: auto; }
.pt-foot .btn { width: auto; min-width: 140px; }
.pt-section { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 640px) { .pt-body { padding: 18px 16px 110px; } .pt-foot { flex-direction: column-reverse; } .pt-foot .btn { width: 100%; } }

/* Selector de color de materia */
.color-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.color-pick button { width: 32px; height: 32px; border-radius: var(--rad-1); border: 2px solid var(--c-surface); box-shadow: 0 0 0 1px var(--c-line-strong); cursor: pointer; }
.color-pick button.sel { box-shadow: 0 0 0 2px var(--c-ink); }

/* Estudiante: tareas */
.task-item {
  position: relative; padding: 16px 18px; margin-bottom: 10px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-left: 4px solid var(--c-line-strong); border-radius: var(--rad-2); overflow-wrap: anywhere;
}
.task-item:hover { background: var(--c-surface); border-color: var(--c-line-strong); }
.task-item.done { border-left-color: var(--c-ok); }
.task-item.review { border-left-color: var(--c-warn); }
.task-item.pending { border-left-color: var(--c-bad); }
.task-item.locked { border-left-color: var(--c-ink-3); opacity: .85; }
.task-name { font-size: 16px; font-weight: 700; }
.task-desc { font-size: 14.5px; color: var(--c-ink-2); margin-top: 4px; line-height: 1.55; }
.task-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 13.5px; color: var(--c-ink-3); }
.task-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.nota-display { font-size: 26px; font-weight: 700; line-height: 1; }
.feedback-box { margin-top: 12px; padding: 10px 12px; border-radius: var(--rad-1); background: var(--c-surface-2); border: 1px solid var(--c-line); font-size: 14px; color: var(--c-ink-2); }
.feedback-box strong { color: var(--c-ink); }
.nota-mat { padding: 16px 18px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); margin-bottom: 10px; }
.nota-mat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.nota-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--c-line); font-size: 14.5px; }
.nota-row:last-child { border-bottom: 0; }

/* Estudiante: portada */
.hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 0; background: none; border: 0; }
.hero::after { display: none; }
.hero-av { width: 56px; height: 56px; border-radius: 50%; background: var(--c-brand-soft); color: var(--c-brand-text); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; overflow: hidden; }
.hero-info { flex: 1; min-width: 220px; }
.hero-name { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.hero-sub { font-size: 14.5px; color: var(--c-ink-3); margin-top: 2px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); cursor: pointer; }
.quick:hover { border-color: var(--c-line-strong); transform: none; box-shadow: none; }
.quick-ico { width: 40px; height: 40px; border-radius: var(--rad-1); background: var(--c-surface-3) !important; color: var(--c-ink-2) !important; display: flex; align-items: center; justify-content: center; font-size: 0; }
.quick-ico .i { width: 20px; height: 20px; }
.quick-lbl { font-size: 15px; font-weight: 700; }
.quick-sub { font-size: 13.5px; color: var(--c-ink-3); }
.prog-ring-wrap { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.prog-ring { transform: rotate(-90deg); width: 72px; height: 72px; }
.prog-ring-bg { fill: none; stroke: var(--c-surface-3); stroke-width: 6; }
.prog-ring-fill { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.prog-ring-txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }

/* Perfil */
.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); }
.profile-head .av { width: 76px; height: 76px; font-size: 24px; position: relative; cursor: pointer; }
.profile-head .av .cam { position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--c-ink); color: var(--c-paper); display: flex; align-items: center; justify-content: center; border: 2px solid var(--c-surface); }
.profile-head .av .cam .i { width: 14px; height: 14px; }
.profile-head h2 { font-size: 22px; }
.profile-head p { color: var(--c-ink-3); font-size: 14.5px; margin-top: 2px; }
.action-list { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); overflow: hidden; }
.action-list button, .pf-action {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; background: transparent; border: 0;
  border-bottom: 1px solid var(--c-line); color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; border-radius: 0;
}
.action-list button:last-child { border-bottom: 0; }
.action-list button:hover, .pf-action:hover { background: var(--c-surface-2); transform: none; }
.action-list .ai { width: 38px; height: 38px; border-radius: var(--rad-1); background: var(--c-surface-3); color: var(--c-ink-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.action-list .ai .i { width: 19px; height: 19px; }
.action-list b { display: block; font-size: 15px; }
.action-list small { display: block; font-size: 13.5px; color: var(--c-ink-3); }
.action-list .danger b, .action-list .danger .ai { color: var(--c-bad); }
.action-list .chev { margin-left: auto; color: var(--c-ink-3); }

/* Navegación inferior (estudiante en celular) */
.bot-nav { display: none; }
@media (max-width: 900px) {
  .bot-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 250; height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--c-surface); border-top: 1px solid var(--c-line);
  }
  .bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative;
    border: 0; background: transparent; color: var(--c-ink-3); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  }
  .bn-item .i { width: 22px; height: 22px; }
  .bn-item.active, .bn-item.is-active { color: var(--c-brand-text); }
  .bn-item.active::before, .bn-item.is-active::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--c-brand); }
  .bn-badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--c-brand); color: #1b1404; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
  body.has-bottom-nav .side, body.has-bottom-nav .menu-btn { display: none !important; }
}

/* Entregar (zona de archivos) */
.drop-zone { border: 2px dashed var(--c-line-strong); border-radius: var(--rad-2); padding: 22px 18px; text-align: center; cursor: pointer; background: var(--c-surface-2); transition: border-color .15s, background .15s; }
.drop-zone:hover, .drop-zone.over { border-color: var(--c-brand); background: var(--c-brand-soft); }
.drop-zone .i { width: 26px; height: 26px; color: var(--c-ink-3); margin-bottom: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--c-line); border-radius: var(--rad-1); background: var(--c-surface); }
.file-row .i { color: var(--c-ink-3); }
.file-row .nm { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .sz { font-size: 12.5px; color: var(--c-ink-3); }

/* Exportaciones */
.export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.export-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 0; cursor: pointer;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--rad-2); transition: border-color .15s;
}
.export-item:hover { border-color: var(--c-brand); background: var(--c-surface); transform: none; }
.export-icon, .exp-icon { width: 40px; height: 40px; border-radius: var(--rad-1); background: var(--c-surface-3); color: var(--c-ink-2); display: flex; align-items: center; justify-content: center; font-size: 0; flex-shrink: 0; border: 0; }
.export-icon .i, .exp-icon .i { width: 20px; height: 20px; }
.export-name, .exp-title { font-size: 15px; font-weight: 700; }
.export-sub, .exp-sub { font-size: 13.5px; color: var(--c-ink-3); }
.export-arrow { margin-left: auto; color: var(--c-ink-3); }

/* Diagnóstico */
.check-list { display: flex; flex-direction: column; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--c-line); font-size: 14.5px; }
.check-row:last-child { border-bottom: 0; }
.check-row .st { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check-row .st.ok { background: var(--c-ok-soft); color: var(--c-ok); }
.check-row .st.bad { background: var(--c-bad-soft); color: var(--c-bad); }
.check-row .st .i { width: 14px; height: 14px; }
.check-row .num { margin-left: auto; color: var(--c-ink-3); font-size: 13.5px; }

/* Selector de estudiantes (agregar) */
.pick-list label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 0; border-bottom: 1px solid var(--c-line); cursor: pointer; font-weight: 500; color: var(--c-ink); }
.pick-list label:hover { background: var(--c-surface-2); }

/* Boletín */
.bol-toolbar { max-width: 860px; margin: 0 auto 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--c-line); }
.panel-head h3 { font-size: 15.5px; font-weight: 700; }
.panel-head .muted { font-size: 13.5px; }
.panel-empty { padding: 26px 16px; text-align: center; color: var(--c-ink-3); font-size: 14px; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 15px; font-weight: 600; color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13.5px; color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-btn { margin-bottom: 0; align-self: flex-start; }
.section-header { align-items: center; }
.section-header .subhead { margin: 0; }
/* Panel admin: pantalla de acceso y contenedor */
#login-screen.hide { display: none; }
#app { display: none; }
#app.show { display: block; }
.login-err { display: none; }
.login-err.show { display: flex; }
.rol-txt { font-size: 13.5px; color: var(--c-ink-2); min-width: 92px; }
@media (max-width: 700px) { .rol-txt { display: none; } }

/* ============================================================
   CAPA "MEDIANOCHE ELÉCTRICA": vidrio, degradado, luz e interacción
   ============================================================ */
body.panel, body .auth {
  background-color: var(--c-paper);
  background-image:
    radial-gradient(900px 520px at 100% -10%, rgba(91,77,255,.10), transparent 60%),
    radial-gradient(700px 480px at 20% 110%, rgba(18,194,233,.08), transparent 60%);
  background-attachment: fixed;
}
:root[data-theme-efectivo="dark"] body.panel {
  background-image:
    radial-gradient(1000px 600px at 100% -10%, rgba(123,97,255,.20), transparent 60%),
    radial-gradient(800px 520px at 15% 110%, rgba(18,194,233,.12), transparent 60%);
}
.page-title, .section-title, .page-header h1, .hello h1, .ban-name, .det-name, .modal-title, .pt-title, .auth-card h2, .subhead, .panel-head h3, .card-title,
.stat-num, .stat-value, .stat-val, .meta-val, .mc-stat-val, .side-stats b, .nota-display, .asistencia-contador-num, .er-nota, .prog-ring-txt, .brand-name {
  font-family: var(--font-d);
}
.page-title, .page-header h1, .hello h1 { font-weight: 600; letter-spacing: -0.03em; }
.stat-num, .stat-value, .stat-val { font-weight: 600; letter-spacing: -0.04em; font-size: 32px; }

/* Barra lateral: vidrio oscuro con brillo */
.side {
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(123,97,255,.22), transparent 70%),
    radial-gradient(360px 300px at 100% 100%, rgba(18,194,233,.10), transparent 70%),
    var(--c-board);
  border-right: 1px solid var(--c-board-line);
}
.side-brand .brand-name { letter-spacing: .06em; font-weight: 600; }
.side-link { border-radius: 12px; transition: background .2s, color .2s, transform .2s; }
.side-link:hover { transform: translateX(2px); }
.side-link.is-active, .side-link.active {
  background: linear-gradient(120deg, rgba(123,97,255,.26), rgba(18,194,233,.10));
  box-shadow: inset 0 0 0 1px rgba(160,150,255,.22), 0 6px 20px rgba(91,77,255,.18);
}
.side-link.is-active::before, .side-link.active::before { background: var(--grad); width: 3px; left: -10px; box-shadow: 0 0 12px rgba(123,97,255,.9); }
.side-link.is-active .i, .side-link.active .i { color: #b9b0ff; }
.side-badge, .nav-badge, .bn-badge { background: var(--grad); color: #fff; box-shadow: 0 2px 10px rgba(91,77,255,.45); }
.side-stats { background: transparent; gap: 8px; }
.side-stats > button { border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--c-board-line); transition: border-color .2s, background .2s; }
.side-stats > button:hover { border-color: rgba(160,150,255,.4); background: rgba(123,97,255,.10); }
.side .av { background: var(--grad); color: #fff; box-shadow: none; }

/* Barra superior de vidrio */
.topbar { background: var(--c-glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); }
.topbar-title { font-family: var(--font-d); font-weight: 500; }

/* Botones */
.btn { border-radius: 12px; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, color .2s; position: relative; overflow: hidden; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { background: var(--grad); background-size: 160% 160%; background-position: 0% 50%; border: 0; color: #fff; box-shadow: 0 4px 14px rgba(91,77,255,.30); }
.btn-primary:hover { background: var(--grad); background-size: 160% 160%; background-position: 100% 50%; box-shadow: var(--glow); transform: translateY(-1px); }
.btn-outline { background: var(--c-surface); }
.btn-outline:hover { border-color: var(--c-brand); color: var(--c-brand-text); background: var(--c-surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-brand) 12%, transparent); }
.btn-ghost:hover { background: var(--c-brand-soft); color: var(--c-brand-text); }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .22; pointer-events: none; animation: ripple .55s ease-out forwards; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.theme-toggle-btn, .icon-btn { border-radius: 12px; background: var(--c-surface); transition: border-color .2s, color .2s, box-shadow .2s; }
.theme-toggle-btn:hover, .icon-btn:hover { border-color: var(--c-brand); color: var(--c-brand-text); }

/* Campos */
input, select, textarea { border-radius: 12px; background: var(--c-surface); }
input:focus, select:focus, textarea:focus { border-color: var(--c-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-brand) 18%, transparent); }

/* Superficies de vidrio con luz que sigue al cursor */
.card, .stats-grid, .stats-row, .subject-card, .mat-card, .tarea-card, .task-item, .banner, .det-header, .profile-head, .action-list,
.export-item, .quick, .grade-group, .nota-mat, .asistencia-top-bar, .asistencia-table-card, .anuncio-item, .ann-card, .pt-section, .info-box {
  border-radius: var(--rad-2);
  background-color: var(--c-surface);
  box-shadow: var(--sh-1);
}
:root[data-theme-efectivo="dark"] :is(.card, .stats-grid, .stats-row, .subject-card, .mat-card, .tarea-card, .task-item, .banner, .det-header, .profile-head, .action-list, .export-item, .quick, .grade-group, .nota-mat, .asistencia-top-bar, .asistencia-table-card, .anuncio-item, .ann-card, .pt-section) {
  background-color: var(--c-glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), var(--sh-1);
}
.spot { background-image: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c-brand) 11%, transparent), transparent 45%); }
.stat-card.spot, .stat.spot { background-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c-brand) 14%, transparent), transparent 55%); }
.subject-card, .mat-card, .export-item, .quick { transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, border-color .25s; }
.subject-card:hover, .mat-card:hover, .export-item:hover, .quick:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--c-brand) 35%, var(--c-line)); }

/* Resumen de cifras: hilo de luz arriba */
.stats-grid, .stats-row { position: relative; background-color: var(--c-line); }
.stats-grid::before, .stats-row::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); z-index: 2; opacity: .9; }
.stat-card, .stat { background-color: var(--c-surface); transition: background-color .2s; }
:root[data-theme-efectivo="dark"] .stat-card, :root[data-theme-efectivo="dark"] .stat { background-color: #0d1322; }
.stat-corner, .stat-icon { color: var(--c-brand-text) !important; opacity: .85; }

/* Pestañas */
.tab.active { border-bottom-color: transparent; position: relative; color: var(--c-ink); }
.tab.active::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 10px rgba(91,77,255,.6); }
.tab-badge { background: var(--c-brand-soft); color: var(--c-brand-text); }

/* Insignias */
.badge, .chip, .sc-state { border-radius: 8px; }

/* Marca de materia: gema con degradado */
.mat-mark, .sc-icon, .mc-icon, .det-icon, .ban-av.mat {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--mc, #5b4dff), color-mix(in srgb, var(--mc, #5b4dff) 55%, #0a0e1b)) !important;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--mc, #5b4dff) 35%, transparent) !important;
  font-family: var(--font-d); letter-spacing: .04em;
}
.subject-card::before, .mat-card::before, .banner::before, .det-header::before { width: 3px; background: linear-gradient(180deg, var(--mc, #5b4dff), transparent); }

/* Progreso */
.prog, .progress, .prog-bar { height: 7px; }
.prog-fill, .progress-bar { background: var(--grad); transform-origin: left center; animation: crecer .9s cubic-bezier(.2,.7,.3,1) both; }
@keyframes crecer { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Avatares */
.av { background: var(--grad-soft); color: var(--c-brand-text); }
.hello .av, .profile-head .av { background: var(--grad); color: #fff; box-shadow: var(--glow); }

/* Modales y diálogos */
.modal { border-radius: var(--rad-3); border: 1px solid var(--c-line-strong); background: var(--c-surface); }
:root[data-theme-efectivo="dark"] .modal { background: rgba(13,18,32,.92); backdrop-filter: blur(20px); box-shadow: 0 0 0 1px rgba(123,107,255,.18), var(--sh-pop); }
.modal-foot { background: transparent; }
.modal-bg, .modal-overlay { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Notificación de vidrio */
#toast, .toast { border-radius: 14px; background: rgba(12,16,30,.92); color: #eef1fb; backdrop-filter: blur(14px); box-shadow: 0 0 0 1px rgba(123,107,255,.25), var(--sh-pop); }
[data-theme="dark"] #toast, :root[data-theme-efectivo="dark"] #toast { background: rgba(238,241,251,.95); color: #0b1020; }

/* Entrada de cada vista */
.view-enter > * { animation: entrar .38s cubic-bezier(.2,.7,.3,1) both; }
.view-enter > *:nth-child(2) { animation-delay: .04s; }
.view-enter > *:nth-child(3) { animation-delay: .08s; }
.view-enter > *:nth-child(4) { animation-delay: .12s; }
.view-enter > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes entrar { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Asistencia: chips con brillo */
.asistencia-chip { border-radius: 12px; }
.asistencia-chip.presente.active { box-shadow: 0 4px 14px color-mix(in srgb, var(--c-ok) 45%, transparent); }
.asistencia-chip.ausente.active { box-shadow: 0 4px 14px color-mix(in srgb, var(--c-bad) 45%, transparent); }
.asistencia-chip.tarde.active { box-shadow: 0 4px 14px color-mix(in srgb, var(--c-warn) 45%, transparent); }

/* Acceso: aurora en movimiento */
.auth-board {
  background: var(--c-board);
  isolation: isolate;
}
.auth-board::before, .auth-board::after {
  content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .75; pointer-events: none;
}
.auth-board::before { width: 520px; height: 520px; left: -120px; top: -140px; background: radial-gradient(circle, #7b61ff, transparent 65%); animation: flotar 14s ease-in-out infinite alternate; }
.auth-board::after { inset: auto; width: 480px; height: 480px; right: -140px; bottom: -160px; background: radial-gradient(circle, #12c2e9, transparent 65%); animation: flotar 18s ease-in-out infinite alternate-reverse; height: 480px; }
@keyframes flotar { from { transform: translate(0,0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }
.auth-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); }
.auth-quote h1 { font-family: var(--font-d); font-weight: 600; letter-spacing: -0.035em; }
.auth-quote h1 .grad, .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-ledge { background: var(--grad); box-shadow: 0 0 18px rgba(123,97,255,.8); }
.auth-card { padding: 30px; border-radius: var(--rad-3); background: var(--c-glass); border: 1px solid var(--c-line); box-shadow: var(--sh-2); backdrop-filter: blur(14px); }
.auth-form .btn-primary { height: 48px; }
@media (max-width: 860px) { .auth-card { padding: 22px 18px; } }

/* Buscador rápido (Ctrl + K) */
.cmd-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border-radius: 12px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-3); font: inherit; font-size: 13.5px; cursor: pointer; transition: border-color .2s, color .2s; }
.cmd-btn:hover { border-color: var(--c-brand); color: var(--c-ink); }
.cmd-btn kbd { font-family: var(--font); font-size: 11.5px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--c-line-strong); color: var(--c-ink-3); background: var(--c-surface-2); }
@media (max-width: 900px) { .cmd-btn span, .cmd-btn kbd { display: none; } .cmd-btn { width: 36px; padding: 0; justify-content: center; } }
.cmd { position: fixed; inset: 0; z-index: 9600; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: var(--c-overlay); backdrop-filter: blur(6px); animation: aparecer .15s ease-out; }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
.cmd-box { width: 100%; max-width: 560px; border-radius: 20px; overflow: hidden; background: var(--c-surface); border: 1px solid var(--c-line-strong); box-shadow: 0 0 0 1px rgba(123,107,255,.2), var(--sh-pop); animation: modalIn .18s ease-out; }
:root[data-theme-efectivo="dark"] .cmd-box { background: rgba(13,18,32,.95); }
.cmd-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--c-line); }
.cmd-in .i { width: 20px; height: 20px; color: var(--c-brand-text); }
.cmd-in input { border: 0; box-shadow: none !important; background: transparent; font-size: 16px; padding: 4px 0; min-height: 0; }
.cmd-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmd-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--c-ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.cmd-item .i { width: 18px; height: 18px; color: var(--c-ink-3); }
.cmd-item small { margin-left: auto; color: var(--c-ink-3); font-size: 12.5px; }
.cmd-item.sel { background: linear-gradient(120deg, rgba(123,97,255,.16), rgba(18,194,233,.08)); }
.cmd-item.sel .i { color: var(--c-brand-text); }
.cmd-foot { padding: 9px 16px; border-top: 1px solid var(--c-line); font-size: 12.5px; color: var(--c-ink-3); display: flex; gap: 14px; }

@media (prefers-reduced-motion: reduce) {
  .auth-board::before, .auth-board::after, .prog-fill, .progress-bar, .view-enter > * { animation: none !important; }
}
