/* =====================================================================
   Escuela Hassabeh — sistema visual
   Marca: verde bosque #3F714C · lima #C7EA46 · gris de la tipografía
   ===================================================================== */
:root {
  --verde: #3F714C;
  --verde-600: #356140;
  --verde-700: #2B5034;
  --verde-800: #1F3B27;
  --verde-50: #EEF4EF;
  --verde-100: #DCE9DF;
  --lima: #C7EA46;
  --lima-200: #E3F49F;
  --lima-50: #F6FBE4;

  --bg: #F5F4EE;
  --surface: #FFFFFF;
  --surface-2: #FAFAF6;
  --surface-3: #F0EFE7;
  --line: #E4E2D8;
  --line-2: #D5D3C7;
  --text: #1E2921;
  --text-2: #4E5A52;
  --muted: #7D857F;
  --on-verde: #FFFFFF;

  --ok: #2E7D4F;   --ok-bg: #E5F3EA;
  --warn: #9A6412; --warn-bg: #FBF1DC;
  --bad: #B23A2E;  --bad-bg: #FBE7E4;
  --info: #2B66A0; --info-bg: #E4EEF8;
  --morado: #6B5B95; --morado-bg: #EEEAF6;

  --serie-1: #2E8B57;   /* estudiante */
  --serie-2: #7B61C9;   /* promedio del grupo */
  --sidebar-bg: #1F3B27;
  --sidebar-text: #DDE8DF;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(30, 41, 33, .06), 0 1px 1px rgba(30, 41, 33, .04);
  --shadow-2: 0 2px 6px rgba(30, 41, 33, .06), 0 10px 30px rgba(30, 41, 33, .08);
  --shadow-3: 0 20px 60px rgba(15, 30, 20, .25);
  --font: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Marcellus', 'Cormorant Garamond', Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121814; --surface: #19211B; --surface-2: #1D2620; --surface-3: #232D26; --line: #2C3830; --line-2: #3A483E;
    --text: #E7EDE8; --text-2: #B3BFB6; --muted: #86928A;
    --verde-50: #1E2C22; --verde-100: #24382A; --lima-50: #262E17;
    --ok: #6CC48D; --ok-bg: #1B3123; --warn: #E2B25A; --warn-bg: #352A14; --bad: #EE8B80; --bad-bg: #3A1F1C; --info: #7EB3E6; --info-bg: #182A3B; --morado: #B3A4E0; --morado-bg: #2A2540;
    --serie-1: #3FA060; --serie-2: #8E7BDE;
    --sidebar-bg: #0E1A12; --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 30px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121814; --surface: #19211B; --surface-2: #1D2620; --surface-3: #232D26; --line: #2C3830; --line-2: #3A483E;
  --text: #E7EDE8; --text-2: #B3BFB6; --muted: #86928A;
  --verde-50: #1E2C22; --verde-100: #24382A; --lima-50: #262E17;
  --ok: #6CC48D; --ok-bg: #1B3123; --warn: #E2B25A; --warn-bg: #352A14; --bad: #EE8B80; --bad-bg: #3A1F1C; --info: #7EB3E6; --info-bg: #182A3B; --morado: #B3A4E0; --morado-bg: #2A2540;
  --serie-1: #3FA060; --serie-2: #8E7BDE;
  --sidebar-bg: #0E1A12; --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--verde); text-decoration: none; }
:root[data-theme="dark"] a, :root:not([data-theme="light"]) a { }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; color: var(--text); }
h1 { font-family: var(--font-display); font-weight: 400; font-size: 30px; letter-spacing: .01em; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
h3 { font-size: 16px; font-weight: 800; }
h4 { font-size: 14px; font-weight: 800; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.svg-ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.bold { font-weight: 800; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----------------------------------------------------------- botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; background: var(--verde); color: var(--on-verde); transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--verde-700); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible, .tab:focus-visible, .chip:focus-visible { outline: 3px solid color-mix(in srgb, var(--lima) 70%, transparent); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.lima { background: var(--lima); color: var(--verde-800); }
.btn.lima:hover { background: #B7DB34; }
.btn.sec { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn.sec:hover { background: var(--surface-3); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger:hover { filter: brightness(.92); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.xs { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--verde); font-weight: 700; cursor: pointer; }
:root[data-theme="dark"] .link-btn, :root[data-theme="dark"] a { color: #8FCB9F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .link-btn, :root:not([data-theme="light"]) a { color: #8FCB9F; } }

/* ----------------------------------------------------------- formularios */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 800; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; transition: border .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 3px color-mix(in srgb, var(--verde) 18%, transparent); }
.input.sm { height: 34px; font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--verde); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; cursor: pointer; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked { background: var(--verde); }
.switch input:checked::after { transform: translateX(18px); }
.segmented { display: inline-flex; background: var(--surface-3); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--text-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.colores { display: flex; gap: 8px; flex-wrap: wrap; }
.colores button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.colores button.on { box-shadow: 0 0 0 2px var(--text); }

/* ----------------------------------------------------------- tarjetas y piezas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card.pad { padding: 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-h h3 { margin: 0; }
.card-b { padding: 16px 20px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; gap: 10px; }
.section-title h2 { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge .svg-ico { width: 13px; height: 13px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.verde { background: var(--verde-50); color: var(--verde); }
.badge.morado { background: var(--morado-bg); color: var(--morado); }
.badge.lima { background: var(--lima); color: var(--verde-800); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 700; font-size: 13px; color: var(--text-2); }
.chip.on { background: var(--verde); border-color: var(--verde); color: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.xl { width: 88px; height: 88px; font-size: 30px; }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--verde), #6FA35A); border-radius: 99px; transition: width .4s; }
.progress.lima > span { background: var(--lima); }
.progress.thin { height: 5px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .svg-ico { width: 40px; height: 40px; stroke-width: 1.5; color: var(--line-2); margin-bottom: 8px; }
.empty h3 { color: var(--text-2); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list > li.click { cursor: pointer; }
.list > li.click:hover { background: var(--surface-2); }
.ico-box { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--verde-50); color: var(--verde); flex: none; }
.ico-box.tarea { background: var(--info-bg); color: var(--info); }
.ico-box.taller { background: var(--warn-bg); color: var(--warn); }
.ico-box.examen { background: var(--morado-bg); color: var(--morado); }
.ico-box.proyecto { background: var(--bad-bg); color: var(--bad); }
.ico-box.envivo { background: var(--bad-bg); color: var(--bad); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.kpi .k-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .k-val { font-family: var(--font-display); font-size: 34px; line-height: 1.1; margin-top: 6px; color: var(--text); }
.kpi .k-val small { font-family: var(--font); font-size: 14px; color: var(--muted); font-weight: 700; }
.kpi .k-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.kpi.destacado { background: linear-gradient(135deg, var(--verde) 0%, var(--verde-800) 100%); border-color: transparent; }
.kpi.destacado .k-label, .kpi.destacado .k-sub { color: rgba(255,255,255,.75); }
.kpi.destacado .k-val { color: #fff; }
.kpi.destacado .k-val small { color: var(--lima); }
.nota { font-weight: 800; font-variant-numeric: tabular-nums; }
.nota.ok { color: var(--ok); }
.nota.bad { color: var(--bad); }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 800; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
table.t td.num, table.t th.num { text-align: center; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- estructura */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 14px; overflow-y: auto; z-index: 40; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; color: #fff; text-decoration: none !important; }
.sidebar .brand img { width: 46px; height: 46px; background: #F6FBE4; border-radius: 14px; padding: 5px; flex: none; }
.sidebar .brand .wm { display: flex; flex-direction: column; line-height: 1.05; }
.sidebar .brand .wm svg { width: 128px; height: auto; color: #fff; }
.sidebar .brand .wm span { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--lima); margin-top: 4px; font-weight: 800; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--sidebar-text); font-weight: 700; font-size: 14.5px; text-decoration: none !important; position: relative; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.on { background: rgba(199, 234, 70, .14); color: #fff; }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--lima); }
.nav a .cnt { margin-left: auto; background: var(--lima); color: var(--verde-800); font-size: 11px; font-weight: 800; border-radius: 99px; padding: 1px 7px; }
.nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: rgba(221, 232, 223, .5); margin: 18px 12px 6px; font-weight: 800; }
.nav .curso-link .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.nav .curso-link span.truncate { font-weight: 600; font-size: 13.5px; }
.sidebar .user-box { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; }
.sidebar .user-box .n { font-weight: 800; color: #fff; font-size: 14px; }
.sidebar .user-box .r { font-size: 12px; color: var(--lima); font-weight: 700; text-transform: capitalize; }
.sidebar .user-box button { margin-left: auto; color: var(--sidebar-text); background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px; }
.sidebar .user-box button:hover { background: rgba(255,255,255,.08); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .menu-btn { display: none; }
.topbar .crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); min-width: 0; }
.topbar .crumbs a { color: var(--text-2); font-weight: 700; }
.topbar .crumbs b { color: var(--text); font-weight: 800; }
.topbar .acciones { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.bell { position: relative; }
.bell .pt { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.content { padding: 28px; max-width: 1280px; width: 100%; margin: 0 auto; }
.content.wide { max-width: 1500px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.layout-2 > aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.scrim { display: none; }

/* ----------------------------------------------------------- login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.auth-hero { background: radial-gradient(circle at 20% 15%, #4D8A5C 0%, var(--verde) 30%, var(--verde-800) 100%); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-hero .iso-bg { position: absolute; right: -120px; bottom: -110px; width: 560px; opacity: .13; filter: brightness(3) saturate(0); pointer-events: none; }
.auth-hero .logo-claro { width: 230px; }
.auth-hero h1 { color: #fff; font-size: 44px; margin-top: auto; max-width: 560px; line-height: 1.12; }
.auth-hero h1 em { color: var(--lima); font-style: normal; }
.auth-hero p { color: rgba(255,255,255,.82); font-size: 17px; max-width: 520px; }
.auth-hero ul { list-style: none; padding: 0; margin: 22px 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; max-width: 560px; }
.auth-hero li { display: flex; align-items: center; gap: 10px; font-weight: 700; color: rgba(255,255,255,.92); font-size: 14.5px; }
.auth-hero li .svg-ico { color: var(--lima); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .logo-m { display: none; }
.auth-card .logo-m img { width: 100%; display: block; }
.solo-oscuro { display: none !important; }
:root[data-theme="dark"] .solo-claro { display: none !important; }
:root[data-theme="dark"] .solo-oscuro { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .solo-claro { display: none !important; }
  :root:not([data-theme="light"]) .solo-oscuro { display: block !important; }
}
.auth-card h2 { font-size: 28px; }
.demo-box { margin-top: 22px; padding: 18px; border-radius: var(--radius); background: var(--lima-50); border: 1px dashed color-mix(in srgb, var(--verde) 40%, transparent); }
.demo-box h4 { margin: 0 0 4px; display: flex; gap: 8px; align-items: center; color: var(--verde); }
.demo-box .row .btn { flex: 1; }

/* ----------------------------------------------------------- cursos */
.cursos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.curso-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-1); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; cursor: pointer; text-decoration: none !important; color: inherit; }
.curso-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.curso-cover { height: 132px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 14px 16px; }
.curso-cover .iso { position: absolute; right: -24px; top: -18px; width: 150px; opacity: .22; filter: brightness(4) saturate(0); }
.curso-cover img.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.curso-cover .cat { position: relative; background: rgba(255,255,255,.92); color: #1E2921; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.curso-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.curso-body h3 { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin: 0; color: var(--text); }
.curso-body p { font-size: 13.5px; color: var(--text-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.curso-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.curso-meta span { display: inline-flex; align-items: center; gap: 5px; }
.curso-meta .svg-ico { width: 14px; height: 14px; }
.banner { border-radius: 22px; padding: 28px 30px 0; color: #fff; position: relative; overflow: hidden; margin-bottom: 0; }
.banner .iso { position: absolute; right: 20px; top: -40px; width: 260px; opacity: .16; filter: brightness(4) saturate(0); pointer-events: none; }
.banner img.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.banner > * { position: relative; }
.banner h1 { color: #fff; font-size: 34px; margin: 6px 0 6px; }
.banner p { color: rgba(255,255,255,.86); max-width: 720px; }
.banner .meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; color: rgba(255,255,255,.9); align-items: center; }
.banner .meta .svg-ico { width: 15px; height: 15px; }
.banner .codigo { background: rgba(0,0,0,.22); padding: 6px 12px; border-radius: 99px; font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; cursor: pointer; border: 0; color: #fff; font-weight: 800; }
.banner .prog-box { background: rgba(0,0,0,.2); padding: 12px 16px; border-radius: 14px; min-width: 220px; }
.banner .prog-box .progress { background: rgba(255,255,255,.25); }
.tabs { display: flex; gap: 2px; margin-top: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 12px 16px; font-weight: 800; font-size: 14px; color: rgba(255,255,255,.78); border-radius: 12px 12px 0 0; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; text-decoration: none !important; }
.tab:hover { color: #fff; background: rgba(255,255,255,.08); }
.tab.on { background: var(--bg); color: var(--text); }
.tab .cnt { background: var(--lima); color: var(--verde-800); border-radius: 99px; font-size: 11px; padding: 0 7px; }
.tab-body { padding-top: 24px; }

/* ----------------------------------------------------------- contenido / módulos */
.modulo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow-1); }
.modulo-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; user-select: none; }
.modulo-h .num { width: 34px; height: 34px; border-radius: 10px; background: var(--verde); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 17px; flex: none; }
.modulo-h h3 { margin: 0; font-size: 16px; }
.modulo-h .chev { transition: transform .2s; color: var(--muted); }
.modulo.closed .chev { transform: rotate(-90deg); }
.modulo.closed .modulo-b { display: none; }
.modulo-b { border-top: 1px solid var(--line); }
.lec { display: flex; align-items: center; gap: 12px; padding: 11px 18px 11px 22px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lec:last-child { border-bottom: 0; }
.lec:hover { background: var(--surface-2); }
.lec .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.lec .tick.done { background: var(--ok); border-color: var(--ok); }
.lec .tick .svg-ico { width: 13px; height: 13px; stroke-width: 3; }
.lec .t-ico { color: var(--muted); }
.lec .lt { font-weight: 700; font-size: 14.5px; }
.lec .ls { font-size: 12.5px; color: var(--muted); }
.lec .tools { display: flex; gap: 2px; opacity: .55; }
.lec:hover .tools { opacity: 1; }
.borrador { opacity: .6; }

/* ----------------------------------------------------------- lección */
.leccion-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.player { background: #000; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-2); }
.player video, .player iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player.vacio { background: linear-gradient(135deg, var(--verde-800), var(--verde)); color: #fff; flex-direction: column; gap: 10px; text-align: center; padding: 20px; }
.player.vacio .svg-ico { width: 46px; height: 46px; color: var(--lima); stroke-width: 1.5; }
.outline { max-height: calc(100vh - 110px); overflow-y: auto; }
.outline .om { padding: 12px 16px 6px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.outline a { display: flex; gap: 10px; padding: 9px 16px; color: var(--text-2); font-size: 13.5px; font-weight: 600; align-items: center; text-decoration: none !important; }
.outline a:hover { background: var(--surface-2); }
.outline a.on { background: var(--verde-50); color: var(--verde); font-weight: 800; }
.outline a .tick { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.outline a .tick.done { background: var(--ok); border-color: var(--ok); }
.outline a .tick .svg-ico { width: 11px; height: 11px; stroke-width: 3.5; }
.envivo-box { border-radius: 18px; padding: 26px; background: linear-gradient(135deg, var(--verde-800), var(--verde)); color: #fff; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.envivo-box .fecha-big { background: rgba(255,255,255,.12); border-radius: 14px; padding: 12px 18px; text-align: center; min-width: 96px; }
.envivo-box .fecha-big b { display: block; font-family: var(--font-display); font-size: 36px; font-weight: 400; line-height: 1; }
.envivo-box .fecha-big span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--lima); font-weight: 800; }
.envivo-box h2 { color: #fff; margin: 0 0 4px; }
.archivo-box { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.pdf-frame { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

/* contenido enriquecido */
.prosa { font-size: 15.5px; line-height: 1.7; color: var(--text); }
.prosa h2 { font-size: 24px; margin: 1.2em 0 .5em; }
.prosa h3 { font-size: 17px; margin: 1.2em 0 .4em; }
.prosa > :first-child { margin-top: 0; }
.prosa ul, .prosa ol { padding-left: 1.4em; margin: 0 0 1em; }
.prosa li { margin-bottom: .3em; }
.prosa blockquote { margin: 1.2em 0; padding: 14px 18px; border-left: 4px solid var(--lima); background: var(--lima-50); border-radius: 0 12px 12px 0; color: var(--text); font-style: italic; }
.prosa table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 14px; }
.prosa th, .prosa td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prosa th { background: var(--verde-50); font-weight: 800; }
.prosa img { border-radius: 12px; }
.prosa a { text-decoration: underline; }

/* editor de texto */
.rte { border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.rte:focus-within { border-color: var(--verde); box-shadow: 0 0 0 3px color-mix(in srgb, var(--verde) 18%, transparent); }
.rte-bar { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.rte-bar button { border: 0; background: transparent; min-width: 30px; height: 30px; border-radius: 7px; cursor: pointer; font-weight: 800; font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.rte-bar button:hover { background: var(--surface-3); color: var(--text); }
.rte-area { min-height: 160px; max-height: 420px; overflow-y: auto; padding: 14px 16px; outline: none; }
.rte-area:empty::before { content: attr(data-ph); color: var(--muted); }

/* subida de archivos */
.drop { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 22px; text-align: center; background: var(--surface-2); cursor: pointer; transition: border .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--verde); background: var(--verde-50); }
.drop .svg-ico { width: 30px; height: 30px; color: var(--verde); margin-bottom: 6px; }
.drop b { display: block; }
.up-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; background: var(--surface); }
.up-item .progress { flex: 1; }
.files { display: flex; flex-direction: column; gap: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none !important; max-width: 100%; }
.file-chip:hover { border-color: var(--verde); }
.file-chip .ico-box { width: 34px; height: 34px; }
.media-prev { margin-top: 8px; border-radius: 12px; overflow: hidden; max-width: 520px; border: 1px solid var(--line); }
.media-prev img, .media-prev video { display: block; width: 100%; }

/* ----------------------------------------------------------- muro */
.composer { padding: 16px; }
.composer textarea { border: 0; padding: 4px 0; min-height: 60px; resize: vertical; width: 100%; font: inherit; background: transparent; color: var(--text); outline: none; }
.post { padding: 18px 20px; }
.post + .post { border-top: 1px solid var(--line); }
.post .p-h { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.post .p-h b { font-size: 14.5px; }
.post .p-txt { white-space: pre-wrap; word-wrap: break-word; }
.post.anuncio { background: linear-gradient(0deg, var(--surface), var(--lima-50)); }
.comentarios { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; }
.cmt { display: flex; gap: 10px; align-items: flex-start; }
.cmt .bub { background: var(--surface-3); padding: 8px 12px; border-radius: 4px 14px 14px 14px; font-size: 14px; max-width: 100%; }
.cmt .bub b { font-size: 13px; }
.cmt .bub .txt { white-space: pre-wrap; word-wrap: break-word; }
.cmt-form { display: flex; gap: 8px; align-items: center; }
.cmt-form .input { height: 38px; border-radius: 99px; }

/* ----------------------------------------------------------- actividades */
.act-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.act-row:hover { background: var(--surface-2); }
.act-row:last-child { border-bottom: 0; }
.act-row .at { font-weight: 800; font-size: 15px; }
.act-row .as { font-size: 12.5px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.rubrica { width: 100%; border-collapse: collapse; font-size: 14px; }
.rubrica th, .rubrica td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rubrica th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rubrica td.pts { white-space: nowrap; text-align: right; font-weight: 800; }
.nota-grande { font-family: var(--font-display); font-size: 54px; line-height: 1; }
.nota-grande small { font-family: var(--font); font-size: 16px; color: var(--muted); font-weight: 700; }
.retro { background: var(--verde-50); border-left: 4px solid var(--verde); border-radius: 0 12px 12px 0; padding: 12px 16px; white-space: pre-wrap; }

/* constructor de preguntas */
.q-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px; margin-bottom: 12px; }
.q-card .q-h { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.q-card .q-n { width: 28px; height: 28px; border-radius: 8px; background: var(--morado-bg); color: var(--morado); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.opt-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.opt-row input[type=radio], .opt-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ok); flex: none; }

/* examen */
.examen-wrap { max-width: 820px; margin: 0 auto; }
.examen-top { position: sticky; top: 64px; z-index: 20; background: var(--bg); padding: 12px 0; display: flex; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.timer { font-family: ui-monospace, Consolas, monospace; font-size: 20px; font-weight: 800; padding: 6px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: inline-flex; gap: 8px; align-items: center; }
.timer.poco { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.q-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.q-nav a { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; border: 1px solid var(--line-2); color: var(--text-2); text-decoration: none !important; background: var(--surface); }
.q-nav a.resp { background: var(--verde); color: #fff; border-color: var(--verde); }
.pregunta { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-1); scroll-margin-top: 140px; }
.pregunta .enun { font-size: 17px; font-weight: 700; margin-bottom: 14px; white-space: pre-wrap; }
.opcion { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 8px; cursor: pointer; transition: border .12s, background .12s; }
.opcion:hover { border-color: var(--line-2); background: var(--surface-2); }
.opcion.sel { border-color: var(--verde); background: var(--verde-50); }
.opcion input { width: 18px; height: 18px; accent-color: var(--verde); }
.opcion.correcta { border-color: var(--ok); background: var(--ok-bg); }
.opcion.incorrecta { border-color: var(--bad); background: var(--bad-bg); }
.res-mark { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; }
.res-mark.ok { color: var(--ok); }
.res-mark.bad { color: var(--bad); }
.res-mark.pend { color: var(--warn); }

/* calificador */
.grader { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.grader .lista { max-height: calc(100vh - 120px); overflow-y: auto; position: sticky; top: 84px; }
.grader .lista li.on { background: var(--verde-50); }
.rub-input { width: 80px; }

/* libro de notas */
.gradebook { overflow: auto; max-height: calc(100vh - 220px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.gradebook table { border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 100%; }
.gradebook th, .gradebook td { padding: 10px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; white-space: nowrap; background: var(--surface); }
.gradebook thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-size: 12px; vertical-align: bottom; }
.gradebook thead th .act-h { max-width: 140px; white-space: normal; font-weight: 800; color: var(--text); text-align: left; line-height: 1.25; }
.gradebook thead th .act-p { font-size: 11px; color: var(--muted); font-weight: 700; text-align: left; margin-top: 4px; }
.gradebook th:first-child, .gradebook td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 220px; }
.gradebook thead th:first-child { z-index: 3; }
.gradebook td.cell { cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 700; }
.gradebook td.cell:hover { background: var(--verde-50); }
.gradebook td.def { font-weight: 800; background: var(--surface-2); }
.cell-ico { color: var(--muted); }
.cell-ico.warn { color: var(--warn); }
.cell-ico.bad { color: var(--bad); }

/* asistencia */
.asis-btns { display: inline-flex; gap: 4px; }
.asis-btns button { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 800; font-size: 12px; cursor: pointer; color: var(--text-2); }
.asis-btns button.on.presente { background: var(--ok); border-color: var(--ok); color: #fff; }
.asis-btns button.on.tarde { background: var(--warn); border-color: var(--warn); color: #fff; }
.asis-btns button.on.ausente { background: var(--bad); border-color: var(--bad); color: #fff; }
.asis-btns button.on.excusa { background: var(--info); border-color: var(--info); color: #fff; }
.asis-cell { display: inline-flex; width: 28px; height: 26px; border-radius: 7px; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; cursor: pointer; border: 0; }
.asis-cell.presente { background: var(--ok-bg); color: var(--ok); }
.asis-cell.tarde { background: var(--warn-bg); color: var(--warn); }
.asis-cell.ausente { background: var(--bad-bg); color: var(--bad); }
.asis-cell.excusa { background: var(--info-bg); color: var(--info); }
.asis-cell.none { background: var(--surface-3); color: var(--muted); }

/* evolución */
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-box .grid line { stroke: var(--line); stroke-width: 1; }
.chart-box .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; box-shadow: var(--shadow-2); font-size: 13px; min-width: 170px; opacity: 0; transition: opacity .1s; z-index: 5; }
.chart-tip.on { opacity: 1; }
.chart-tip .tt { font-weight: 800; margin-bottom: 4px; }
.chart-tip .tr { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.leyenda { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); font-weight: 700; }
.leyenda span { display: inline-flex; align-items: center; gap: 8px; }
.leyenda i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--verde); }
.tl-item.logro::before { border-color: var(--ok); }
.tl-item.mejora::before { border-color: var(--warn); }
.tl-item.academica::before { border-color: var(--info); }
.tl-item.convivencia::before { border-color: var(--morado); }
.tl-item .tl-txt { white-space: pre-wrap; margin-top: 4px; }
.asis-strip { display: flex; gap: 6px; flex-wrap: wrap; }

/* calendario */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dow { padding: 8px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); text-align: center; }
.cal .day { min-height: 112px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); cursor: pointer; overflow: hidden; }
.cal .day.out { background: var(--surface-2); color: var(--muted); }
.cal .day .dn { font-size: 13px; font-weight: 800; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal .day.hoy .dn { background: var(--verde); color: #fff; }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--verde); }
.cal .ev { display: block; font-size: 11.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); background: var(--surface-3); border-left: 3px solid var(--verde); }

/* notificaciones */
.notif.no-leida { background: var(--lima-50); }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); flex: none; }

/* ----------------------------------------------------------- modal / toast / menú */
.modal-bg { position: fixed; inset: 0; background: rgba(12, 22, 15, .5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 560px; box-shadow: var(--shadow-3); animation: pop .18s; }
.modal.lg { max-width: 820px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h2 { margin: 0; font-size: 21px; }
.modal-b { padding: 20px 22px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 20px 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--verde-800); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-3); font-weight: 700; font-size: 14px; display: flex; gap: 10px; align-items: center; animation: pop .2s; max-width: 90vw; }
.toast.error { background: var(--bad); }
.toast .svg-ico { color: var(--lima); }
.toast.error .svg-ico { color: #fff; }
.menu-pop { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); padding: 6px; min-width: 200px; }
.menu-pop button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 14px; text-align: left; color: var(--text); }
.menu-pop button:hover { background: var(--surface-3); }
.loader { display: flex; align-items: center; justify-content: center; padding: 60px; }
.loader::after { content: ''; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--verde-100); border-top-color: var(--verde); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.alerta { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--info-bg); color: var(--text); align-items: flex-start; }
.alerta .svg-ico { color: var(--info); margin-top: 2px; }
.alerta.warn { background: var(--warn-bg); } .alerta.warn .svg-ico { color: var(--warn); }
.alerta.ok { background: var(--ok-bg); } .alerta.ok .svg-ico { color: var(--ok); }
.alerta.bad { background: var(--bad-bg); } .alerta.bad .svg-ico { color: var(--bad); }

/* ----------------------------------------------------------- certificado */
.certificado { background: #FFFDF6; color: #1E2921; max-width: 1000px; margin: 0 auto; aspect-ratio: 1.414 / 1; border-radius: 6px; box-shadow: var(--shadow-2); padding: 40px; position: relative; overflow: hidden; }
.certificado .marco { position: absolute; inset: 18px; border: 2px solid #3F714C; border-radius: 4px; }
.certificado .marco::after { content: ''; position: absolute; inset: 6px; border: 1px solid #C7EA46; }
.certificado .in { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 60px; gap: 6px; }
.certificado .iso-fondo { position: absolute; width: 460px; opacity: .06; right: -60px; bottom: -80px; }
.certificado .logo { width: 210px; margin-bottom: 8px; }
.certificado .t1 { font-size: 13px; letter-spacing: .4em; text-transform: uppercase; color: #3F714C; font-weight: 800; }
.certificado .nombre { font-family: var(--font-display); font-size: 54px; color: #1F3B27; line-height: 1.1; margin: 10px 0; border-bottom: 2px solid #C7EA46; padding: 0 30px 8px; }
.certificado .curso { font-family: var(--font-display); font-size: 26px; color: #3F714C; }
.certificado .firmas { display: flex; gap: 80px; margin-top: 26px; font-size: 13px; }
.certificado .firmas div { border-top: 1px solid #7D857F; padding-top: 6px; min-width: 200px; }
.certificado .folio { position: absolute; bottom: 8px; left: 0; right: 0; font-size: 11px; color: #7D857F; letter-spacing: .1em; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .layout-2, .leccion-grid { grid-template-columns: 1fr; }
  .layout-2 > aside { position: static; }
  .grader { grid-template-columns: 1fr; }
  .grader .lista { position: static; max-height: 300px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .25s; }
  .app.menu-open .sidebar { transform: none; box-shadow: var(--shadow-3); }
  .app.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 18px 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-card .logo-m { display: block; width: 190px; margin: 0 auto 18px; }
  .modulo-h [data-mover-mod], .lec .tools [data-mover-lec] { display: none; }
  .modulo-h { padding: 14px; gap: 10px; }
  .lec { padding: 11px 14px; }
  .lec .tools { opacity: 1; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 25px; }
  .banner { padding: 20px 18px 0; border-radius: 18px; }
  .banner h1 { font-size: 26px; }
  .kpi .k-val { font-size: 28px; }
  .cal .day { min-height: 64px; }
  .cal .ev { font-size: 0; height: 6px; padding: 0; border-left-width: 0; }
  .certificado { aspect-ratio: auto; padding: 20px; }
  .certificado .in { padding: 30px 10px; }
  .certificado .nombre { font-size: 34px; }
  .certificado .firmas { gap: 20px; flex-wrap: wrap; justify-content: center; }
}
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .certificado { box-shadow: none; width: 100%; }
  @page { size: landscape; margin: 0; }
}
