/* ==========================================================================
   Aula Virtual · sistema de diseño
   Sin dependencias externas ni fuentes descargables: carga rápida con datos móviles.
   ========================================================================== */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --surface-3: #e9ecf5;
  --border: #e3e6ef;
  --text: #0f172a;
  --muted: #566074;
  --faint: #8a93a6;
  --primary: #4338ca;
  --primary-hover: #3730a3;
  --primary-soft: #eef0ff;
  --primary-ink: #ffffff;
  --live: #e11d48;
  --live-soft: #fff0f3;
  --success: #047857;
  --success-soft: #e7f8f0;
  --warning: #b45309;
  --warning-soft: #fff6e5;
  --danger: #dc2626;
  --danger-soft: #fdeeee;
  --info: #0369a1;
  --info-soft: #e8f5fd;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --sidebar-w: 252px;
  --topbar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --surface: #121a2e; --surface-2: #19223a; --surface-3: #222c47; --border: #26304a;
    --text: #e8ecf6; --muted: #a5aec4; --faint: #7c86a0; --primary: #8b93ff; --primary-hover: #a5abff;
    --primary-soft: #1f2450; --primary-ink: #0b1020; --live: #fb5a7a; --live-soft: #3a1622;
    --success: #34d399; --success-soft: #0f2e25; --warning: #fbbf24; --warning-soft: #33270e;
    --danger: #f87171; --danger-soft: #3a1717; --info: #38bdf8; --info-soft: #0c2a3d;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020; --surface: #121a2e; --surface-2: #19223a; --surface-3: #222c47; --border: #26304a;
  --text: #e8ecf6; --muted: #a5aec4; --faint: #7c86a0; --primary: #8b93ff; --primary-hover: #a5abff;
  --primary-soft: #1f2450; --primary-ink: #0b1020; --live: #fb5a7a; --live-soft: #3a1622;
  --success: #34d399; --success-soft: #0f2e25; --warning: #fbbf24; --warning-soft: #33270e;
  --danger: #f87171; --danger-soft: #3a1717; --info: #38bdf8; --info-soft: #0c2a3d;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 750; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code, kbd { font-family: var(--mono); font-size: .9em; }
.icon { flex-shrink: 0; vertical-align: middle; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Utilidades ---------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .86rem; }
.tiny { font-size: .76rem; }
.bold { font-weight: 650; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.grow { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt-lg { margin-top: 28px; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.layout-main-side { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1100px) { .layout-main-side { grid-template-columns: minmax(0, 1fr); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer; text-decoration: none !important;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-live { background: var(--live); border-color: var(--live); color: #fff; box-shadow: 0 2px 10px color-mix(in srgb, var(--live) 35%, transparent); }
.btn-live:hover { background: color-mix(in srgb, var(--live) 88%, black); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1fb457; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.link-btn.danger { color: var(--danger); }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h2, .card-header h3 { margin: 0; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); }
.card-link { display: block; color: inherit; text-decoration: none !important; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title h2 { margin: 0; display: flex; align-items: center; gap: 8px; }

/* ---------- Badges y chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: .75rem; font-weight: 650; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-live { background: var(--live); color: #fff; letter-spacing: .03em; }
.badge-live-soft { background: var(--live-soft); color: var(--live); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; display: inline-block; }
.badge-live .live-dot { background: #fff; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: currentColor; opacity: .5; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } * { scroll-behavior: auto !important; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .85rem; font-weight: 550; text-decoration: none !important; }
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.grade { display: inline-grid; place-items: center; min-width: 36px; height: 30px; padding: 0 8px; border-radius: 8px; font-weight: 750; font-variant-numeric: tabular-nums; background: var(--surface-2); }
.grade.ok { background: var(--success-soft); color: var(--success); }
.grade.low { background: var(--danger-soft); color: var(--danger); }
.grade.AD { background: #e0f2fe; color: #075985; } .grade.A { background: var(--success-soft); color: var(--success); }
.grade.B { background: var(--warning-soft); color: var(--warning); } .grade.C { background: var(--danger-soft); color: var(--danger); }

/* ---------- Progreso ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #22d3ee)); transition: width .4s; }
.progress.success > span { background: var(--success); }
.progress-thin { height: 4px; }
.ring { display: block; }
.ring circle { fill: none; stroke-width: 4.5; }
.ring .ring-track { stroke: var(--surface-3); }
.ring .ring-bar { stroke: var(--primary); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .5s; }
.ring text { font-size: 10.5px; font-weight: 700; fill: var(--text); font-family: var(--font); }

/* ---------- Avatares ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar-md { width: 40px; height: 40px; font-size: .85rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--text); font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; text-decoration: none !important; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #4338ca 0%, #7c3aed 55%, #e11d48 100%); box-shadow: 0 4px 12px rgba(67, 56, 202, .35); }
.brand small { display: block; font-weight: 550; font-size: .72rem; color: var(--faint); letter-spacing: 0; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; padding: 14px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 580; text-decoration: none !important; position: relative; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary); }
.nav-link .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--live); color: #fff; font-size: .72rem; display: grid; place-items: center; font-weight: 700; }
.sidebar-foot { margin-top: auto; padding-top: 14px; }
.saver-card { border: 1px dashed var(--border); border-radius: 12px; padding: 12px; font-size: .82rem; color: var(--muted); }
.saver-card.on { border-style: solid; border-color: color-mix(in srgb, var(--success) 40%, var(--border)); background: var(--success-soft); color: var(--success); }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 24px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 700; display: none; }
.search { flex: 1; max-width: 460px; position: relative; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--live); color: #fff; font-size: .66rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.main { padding: 26px 28px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--faint); margin-bottom: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }

.bottom-nav { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { padding: 0 14px; }
  .topbar-title { display: flex; align-items: center; gap: 8px; }
  .search { display: none; }
  .main { padding: 18px 16px 96px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: .68rem; font-weight: 600; color: var(--faint); text-decoration: none; border-radius: 10px; position: relative; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav a .count { position: absolute; top: 2px; right: calc(50% - 20px); background: var(--live); color: #fff; font-size: .6rem; min-width: 16px; height: 16px; border-radius: 99px; display: grid; place-items: center; padding: 0 3px; }
}

/* ---------- Menú desplegable ---------- */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 240px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; font-size: .9rem; text-align: left; cursor: pointer; text-decoration: none; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-head { padding: 8px 10px 10px; display: flex; gap: 10px; align-items: center; }

/* ---------- Mensajes ---------- */
.toasts { position: fixed; z-index: 90; top: 76px; right: 20px; display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .9rem; animation: slidein .25s ease-out; }
.toast.success { border-left: 4px solid var(--success); } .toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); } .toast.info { border-left: 4px solid var(--info); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--faint); cursor: pointer; padding: 0; }
@keyframes slidein { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 960px) { .toasts { top: auto; bottom: 84px; right: 16px; } }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); color: var(--info); font-size: .9rem; }
.alert > div { color: var(--text); }
.alert.warning { background: var(--warning-soft); color: var(--warning); }
.alert.success { background: var(--success-soft); color: var(--success); }
.alert.danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- Banner en vivo ---------- */
.live-banner {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #ff4d6d 0%, #e11d48 45%, #9f1239 100%);
  box-shadow: 0 10px 30px rgba(225, 29, 72, .28); margin-bottom: 20px;
}
.live-banner .grow > * { margin: 0; }
.live-banner .btn { background: #fff; color: #be123c; border-color: #fff; }
.live-banner .live-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.18); }
@media (max-width: 600px) { .live-banner { flex-wrap: wrap; } .live-banner .btn { width: 100%; } }

/* ---------- Hero / bienvenida ---------- */
.welcome { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.welcome h1 { margin: 0; }
.stat { padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.stat-icon.live { background: var(--live-soft); color: var(--live); }
.stat-icon.success { background: var(--success-soft); color: var(--success); }
.stat-icon.warning { background: var(--warning-soft); color: var(--warning); }
.stat-value { font-size: 1.45rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .8rem; color: var(--muted); }

/* ---------- Portadas de curso ---------- */
.cover { position: relative; height: 112px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; display: flex; align-items: flex-end; padding: 14px 16px; color: #fff; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.35)); }
.cover > * { position: relative; z-index: 1; }
.cover .cover-art { position: absolute; right: -10px; top: -14px; opacity: .22; z-index: 0; }
.cover-indigo { background: linear-gradient(135deg, #4338ca, #6366f1 60%, #818cf8); }
.cover-rojo { background: linear-gradient(135deg, #be123c, #e11d48 60%, #fb7185); }
.cover-verde { background: linear-gradient(135deg, #047857, #10b981 60%, #6ee7b7); }
.cover-ambar { background: linear-gradient(135deg, #b45309, #f59e0b 60%, #fcd34d); }
.cover-cielo { background: linear-gradient(135deg, #0369a1, #0ea5e9 60%, #7dd3fc); }
.cover-violeta { background: linear-gradient(135deg, #6d28d9, #8b5cf6 60%, #c4b5fd); }
.cover-rosa { background: linear-gradient(135deg, #be185d, #ec4899 60%, #f9a8d4); }
.cover-pizarra { background: linear-gradient(135deg, #1e293b, #475569 60%, #94a3b8); }
.course-card .card-body { padding: 14px 16px 16px; }
.course-card h3 { margin: 0 0 4px; font-size: 1rem; }
.course-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); }
.course-meta span { display: inline-flex; align-items: center; gap: 4px; }

.course-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.course-hero .cover { height: auto; min-height: 150px; padding: 22px 24px; border-radius: 0; align-items: flex-end; }
.course-hero h1 { color: #fff; margin: 4px 0; }
.course-hero .hero-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; opacity: .95; }
.course-hero .hero-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-self: center; }
.course-hero .hero-actions .btn { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: #fff; backdrop-filter: blur(6px); }
.course-hero .hero-actions .btn:hover { background: rgba(255,255,255,.28); }
.hero-row { display: flex; gap: 16px; align-items: flex-end; width: 100%; flex-wrap: wrap; }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 22px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 11px 14px; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Listas de clases ---------- */
.module { margin-bottom: 18px; }
.module-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; }
.module-head h3 { margin: 0; }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-item { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--border); color: inherit; text-decoration: none !important; }
a.lesson-item:hover { background: var(--surface-2); }
.lesson-item.current { background: var(--primary-soft); }
.lesson-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex-shrink: 0; }
.lesson-icon.live { background: var(--live-soft); color: var(--live); }
.lesson-icon.rec { background: var(--primary-soft); color: var(--primary); }
.lesson-icon.read { background: var(--warning-soft); color: var(--warning); }
.lesson-icon.done { background: var(--success-soft); color: var(--success); }
.lesson-title { font-weight: 620; line-height: 1.3; }
.lesson-sub { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.lesson-end { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); color: inherit; text-decoration: none !important; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--surface-2); }
.date-pill { width: 50px; flex-shrink: 0; border-radius: 12px; overflow: hidden; text-align: center; border: 1px solid var(--border); background: var(--surface); }
.date-pill .m { display: block; font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--live); color: #fff; padding: 2px 0; }
.date-pill .d { display: block; font-size: 1.15rem; font-weight: 800; padding: 3px 0 4px; }
.date-pill.task .m { background: var(--warning); }

/* ---------- Reproductor y clase ---------- */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .lesson-layout { grid-template-columns: minmax(0, 1fr); } .outline-panel { order: 3; } }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.player video, .player iframe, .player .player-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.speed { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.speed button { border: 0; background: transparent; padding: 7px 10px; font: inherit; font-size: .8rem; font-weight: 650; color: var(--muted); cursor: pointer; }
.speed button.active { background: var(--primary-soft); color: var(--primary); }
.audio-player { width: 100%; margin-top: 8px; }
.stage {
  position: relative; border-radius: var(--radius); padding: 34px 28px; min-height: 300px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 10px; color: #fff; overflow: hidden;
  background: radial-gradient(140% 120% at 0% 0%, #312e81 0%, #1e1b4b 50%, #0f172a 100%);
}
.stage.is-live { background: radial-gradient(140% 120% at 0% 0%, #be123c 0%, #881337 55%, #3f0a1d 100%); }
.stage h2 { font-size: 1.5rem; margin: 6px 0 2px; color: #fff; }
.stage p { color: rgba(255,255,255,.8); margin: 0; }
.stage .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.stage .btn-ghost:hover { background: rgba(255,255,255,.12); }
.countdown { display: flex; gap: 10px; margin: 12px 0 6px; }
.countdown div { min-width: 64px; padding: 10px 8px; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); }
.countdown strong { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown span { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.outline-panel { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); overflow: auto; }
.outline-panel .lesson-item { padding: 10px 14px; gap: 10px; }
.outline-panel .lesson-icon { width: 30px; height: 30px; border-radius: 8px; }
.outline-panel .lesson-title { font-size: .86rem; }
.outline-module { padding: 10px 14px 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 750; color: var(--faint); border-top: 1px solid var(--border); }
.prose { font-size: 1rem; line-height: 1.7; }
.prose p { white-space: pre-line; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; color: inherit; text-decoration: none !important; background: var(--surface); }
.file-row:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); background: var(--surface-2); }
.file-ext { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: .65rem; font-weight: 800; background: var(--danger-soft); color: var(--danger); flex-shrink: 0; }
.file-ext.ENLACE { background: var(--info-soft); color: var(--info); }

/* ---------- Sala en vivo ---------- */
.room-page { margin: 0; background: #0b0f1a; color: #fff; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.room-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #111827; border-bottom: 1px solid #1f2937; min-height: 58px; }
.room-bar a { color: #cbd5e1; }
.room-bar .btn { height: 36px; background: #1f2937; border-color: #374151; color: #fff; }
.room-bar .btn:hover { background: #374151; }
.room-bar .btn-live { background: var(--live); border-color: var(--live); }
.room-title { font-weight: 700; line-height: 1.2; }
.room-title small { display: block; font-weight: 500; color: #94a3b8; font-size: .78rem; }
.room-stage { flex: 1; position: relative; }
#jitsi { position: absolute; inset: 0; z-index: 1; }
/* El aviso queda detrás: se ve hasta que el iframe de la sala termina de pintarse. */
.room-notice { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: #cbd5e1; }
@media (max-width: 640px) { .room-bar .hide-sm { display: none; } }

/* ---------- Formularios ---------- */
.form-card { max-width: 760px; }
.form-grid { display: grid; gap: 16px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field label.label { display: block; font-weight: 620; font-size: .88rem; margin-bottom: 6px; }
.field .help { font-size: .78rem; color: var(--faint); margin-top: 5px; }
.field .errors { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger); font-size: .82rem; font-weight: 550; }
.field.has-error .input { border-color: var(--danger); }
.req { color: var(--live); }
.input {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px; /* evita zoom en iOS */
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input.file { padding: 9px; font-size: .9rem; }
.code-input { text-transform: uppercase; letter-spacing: .35em; font-family: var(--mono); font-size: 1.5rem !important; text-align: center; font-weight: 700; }
.check-row { display: flex; gap: 10px; align-items: flex-start; }
.check-row input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.choice-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.choice-cards > div, .choice-cards label { position: relative; }
.choice-cards input[type=radio] { position: absolute; opacity: 0; }
.choice-cards label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 600; background: var(--surface); }
.choice-cards input:checked + label, .choice-cards label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.choice-cards input:focus-visible + label, .choice-cards label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--primary) 40%, transparent); }
.color-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.color-choices label { width: 40px; height: 40px; border-radius: 12px; cursor: pointer; border: 3px solid transparent; position: relative; font-size: 0; }
.color-choices input { position: absolute; opacity: 0; }
.color-choices label:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.fieldset { border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin: 0; }
.fieldset legend { padding: 0 8px; font-weight: 700; font-size: .92rem; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
[hidden] { display: none !important; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; padding: 12px 14px; background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.table .sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.table th.sticky-col { background: var(--surface-2); }
.att { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-size: .74rem; font-weight: 800; }
.att.presente { background: var(--success-soft); color: var(--success); }
.att.tardanza { background: var(--warning-soft); color: var(--warning); }
.att.falta { background: var(--danger-soft); color: var(--danger); }
.att.justificada { background: var(--info-soft); color: var(--info); }
.att.none { background: var(--surface-2); color: var(--faint); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 7px 11px; font-size: .8rem; font-weight: 650; cursor: pointer; color: var(--muted); border-left: 1px solid var(--border); }
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--primary); color: var(--primary-ink); }

/* ---------- Estados vacíos ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .empty-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--primary-soft); color: var(--primary); }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* ---------- Comentarios ---------- */
.comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.comment:first-child { border-top: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .82rem; color: var(--faint); }
.comment-meta strong { color: var(--text); font-size: .88rem; }
.comment p { margin: 4px 0 6px; white-space: pre-line; }
.replies { margin-top: 6px; padding-left: 14px; border-left: 2px solid var(--border); }
.replies .comment { padding: 10px 0; }
.ts-link { font-family: var(--mono); font-size: .78rem; background: var(--primary-soft); color: var(--primary); padding: 1px 6px; border-radius: 6px; border: 0; cursor: pointer; }
details.reply summary { cursor: pointer; font-size: .82rem; color: var(--primary); font-weight: 600; list-style: none; }

/* ---------- Agenda ---------- */
.day { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.day:first-child { border-top: 0; }
.day-label { font-weight: 700; }
.day-label small { display: block; color: var(--faint); font-weight: 500; }
.day.today .day-label { color: var(--primary); }
.event { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none !important; margin-bottom: 8px; }
.event:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.event-time { font-weight: 750; font-variant-numeric: tabular-nums; min-width: 78px; font-size: .88rem; }
.event.live { border-left: 4px solid var(--live); }
.event.task { border-left: 4px solid var(--warning); }
@media (max-width: 640px) { .day { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* ---------- Público ---------- */
.public-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; max-width: 1200px; margin: 0 auto; }
.public-header nav { display: flex; gap: 6px; align-items: center; }
.hero { max-width: 1200px; margin: 0 auto; padding: 40px 24px 30px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 850; margin-bottom: 16px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #4338ca, #7c3aed 50%, #e11d48); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero-card { padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: rotate(1.2deg); }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: .9rem; }
.hero-points span { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .icon { color: var(--success); }
.section { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }
.section h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.02em; }
.feature { padding: 22px; }
.feature .stat-icon { margin-bottom: 12px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: .93rem; }
.public-footer { border-top: 1px solid var(--border); margin-top: 30px; padding: 26px 24px; color: var(--faint); font-size: .86rem; }
.public-footer > div { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 18px; } .hero-card { transform: none; } .public-header nav .hide-sm { display: none; } }

.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { padding: 48px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(120% 120% at 0% 0%, #4f46e5 0%, #4338ca 40%, #1e1b4b 100%); position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; bottom: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(225,29,72,.55), transparent 65%); }
.auth-side h2 { font-size: 2rem; letter-spacing: -.02em; max-width: 440px; }
.auth-side .brand { color: #fff; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.auth-side li { display: flex; gap: 10px; align-items: center; opacity: .95; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 440px; }
.auth-box.wide { max-width: 620px; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Certificado ---------- */
.certificate {
  position: relative; max-width: 960px; margin: 0 auto; aspect-ratio: 1.414 / 1; background: #fff; color: #1e1b4b;
  border-radius: 6px; box-shadow: var(--shadow-lg); padding: 5% 7%; display: flex; flex-direction: column; text-align: center; overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
}
.certificate::before { content: ""; position: absolute; inset: 14px; border: 2px solid #c7a24a; border-radius: 4px; pointer-events: none; }
.certificate::after { content: ""; position: absolute; inset: 20px; border: 1px solid #e7d6a6; border-radius: 2px; pointer-events: none; }
.cert-ribbon { position: absolute; top: 0; left: 0; right: 0; height: 10px; background: linear-gradient(90deg, #d91023 0 33.3%, #fff 33.3% 66.6%, #d91023 66.6%); }
.certificate .kicker { font-family: var(--font); letter-spacing: .3em; text-transform: uppercase; font-size: .8rem; color: #8a6d1f; font-weight: 700; margin-top: 2%; }
.certificate h1 { font-size: clamp(1.4rem, 4vw, 2.7rem); margin: 2% 0 1%; color: #1e1b4b; font-weight: 700; }
.certificate .name { font-size: clamp(1.4rem, 4.2vw, 2.8rem); font-style: italic; color: #312e81; border-bottom: 1px solid #c7a24a; display: inline-block; padding: 0 30px 4px; margin: 1% auto 2%; }
.certificate .body { font-size: clamp(.8rem, 1.6vw, 1.08rem); color: #334155; max-width: 640px; margin: 0 auto; line-height: 1.6; }
.cert-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; font-family: var(--font); font-size: .78rem; color: #475569; text-align: left; }
.cert-sign { text-align: center; min-width: 180px; }
.cert-sign .line { border-top: 1px solid #94a3b8; padding-top: 6px; margin-top: 30px; font-weight: 600; color: #1e293b; }
.cert-qr svg { width: 92px; height: 92px; display: block; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff !important; }
  .no-print, .sidebar, .topbar, .bottom-nav, .toasts { display: none !important; }
  .app { display: block; }
  .main { padding: 0; max-width: none; }
  .certificate { box-shadow: none; max-width: none; width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
}

/* ---------- Pagos ---------- */
.pay-methods { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pay-card { padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.pay-card .number { font-family: var(--mono); font-size: 1.25rem; font-weight: 800; letter-spacing: .04em; }
.pay-logo { display: inline-grid; place-items: center; height: 26px; padding: 0 10px; border-radius: 7px; font-weight: 900; font-size: .8rem; color: #fff; letter-spacing: .02em; }
.pay-logo.yape { background: #742284; }
.pay-logo.plin { background: linear-gradient(90deg, #00b5e2, #6b3fa0); }
.pay-logo.banco { background: #1e3a8a; }
.pay-logo.mp { background: #009ee3; text-transform: lowercase; }
.pay-online { border: 2px solid color-mix(in srgb, var(--primary) 45%, var(--border)); background: linear-gradient(160deg, var(--primary-soft), var(--surface) 55%); }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .85rem; font-weight: 600; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.voucher-online { width: 54px; height: 54px; border-radius: 8px; display: grid; place-items: center; background: #009ee3; color: #fff; }
.qr-img { max-width: 200px; border-radius: 12px; border: 1px solid var(--border); background: #fff; padding: 6px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.voucher-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* ---------- Ahorro de datos ---------- */
.data-saver img.cover-img { display: none; }
.data-saver .hero-card img { display: none; }

/* ---------- Ajustes finales ---------- */
.app-body { min-width: 0; display: flex; flex-direction: column; }
@media (max-width: 640px) { .hide-sm { display: none !important; } }

/* ---------- Administración ---------- */
.brand-mark.has-logo { background: var(--surface); box-shadow: none; border: 1px solid var(--border); overflow: hidden; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: cover; }
.check-item { align-items: center; }
.check-state { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.check-item.ok .check-state { background: var(--success-soft); color: var(--success); }
.check-item.warn .check-state { background: var(--warning-soft); color: var(--warning); }
.check-item.todo .check-state { background: var(--surface-2); color: var(--muted); border: 1.5px dashed var(--border); }
.check-item.ok strong { color: var(--muted); }
