/* Aula — panel, login y vistas del profesor. Tema "cuaderno": ver tokens en platform.css. */
body.app { min-height: 100vh; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- encabezado ---------- */
.topnav { background: var(--surface); border-bottom: 2px solid var(--ink); }
.topnav .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; grid-template-columns: repeat(2, 11px); gap: 3px; flex: none; }
.brand-mark i { width: 11px; height: 11px; border: 2px solid var(--ink); border-radius: 2px; }
.brand-mark i:nth-child(1), .brand-mark i:nth-child(4) { background: var(--sun); }
.brand-name { font: 800 23px var(--font-head); letter-spacing: -.03em; }
.topnav .spacer { flex: 1; }
.who { text-align: right; line-height: 1.25; font-size: 14px; }
.who b { display: block; font-size: 15px; }
.who span { color: var(--muted); font-family: var(--font-code); font-size: 13px; }
.btn-ghost {
  font: 700 14px var(--font-body); color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 6px; padding: 7px 12px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--ink); }
@media (max-width: 560px) { .who { display: none; } }

/* ---------- saludo ---------- */
.hero { padding: 40px 0 6px; max-width: 760px; }
.hero h1 { font-size: clamp(34px, 5.5vw, 54px); margin: 0 0 8px; font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
.hero p { margin: 0; color: var(--muted); font-size: 19px; }

/* ---------- la hoja "Lo siguiente" ---------- */
.sheet {
  position: relative; margin: 28px 0 8px;
  background: var(--surface);
  border: 1.5px solid var(--ink); border-radius: 4px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 26px 28px 26px 62px;
}
.sheet::before {               /* margen rojo del cuaderno */
  content: ""; position: absolute; top: 0; bottom: 0; left: 40px; width: 2px; background: var(--margin-line);
}
.sheet .where { color: var(--muted); font-size: 15px; margin: 0 0 4px; }
.sheet h2 { margin: 0; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.025em; }
.sheet .summary { margin: 8px 0 0; max-width: 62ch; font-size: 17px; }
.sheet .progress-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.sheet .count { font-weight: 700; }
.sheet .foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.due-text { font-weight: 700; }
.due-text.warn { color: var(--bad); }
.due-text.muted { color: var(--muted); font-weight: 400; }
.btn-go {
  display: inline-block; font: 700 17px var(--font-body); text-decoration: none;
  background: var(--accent); color: #fff; border: 1.5px solid var(--ink); border-radius: 6px;
  padding: 11px 20px; box-shadow: 3px 3px 0 var(--ink); transition: transform .08s ease, box-shadow .08s ease;
}
.btn-go:hover { background: #1942b8; }
.btn-go:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
@media (max-width: 560px) {
  .sheet { padding: 20px 18px 22px 40px; box-shadow: 4px 4px 0 var(--ink); }
  .sheet::before { left: 24px; }
  .btn-go { width: 100%; text-align: center; }
}

/* ---------- rejilla ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; margin: 36px 0 70px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; gap: 28px; } }

.course { margin-bottom: 40px; }
.course-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.course-head h2 { margin: 0; font-size: 25px; letter-spacing: -.02em; }
.course-head .meta { color: var(--muted); font-size: 15px; }
.course-head .total { margin-left: auto; font: 800 18px var(--font-head); color: var(--accent); white-space: nowrap; }
.course-head .total small { font: 400 14px var(--font-body); color: var(--muted); }
.course h3.sub-h { font-size: 17px; margin: 22px 0 6px; }

/* lista renglonada de pendientes */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-bottom: 1px solid var(--line); }
.rows a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  padding: 12px 6px; color: var(--ink); text-decoration: none;
}
.rows a:hover { background: var(--accent-soft); }
.rows .t { font-weight: 700; font-size: 17px; }
.rows .k { color: var(--muted); font-size: 14px; }
.rows .r { grid-row: span 2; text-align: right; font-size: 14px; }
.rows .r .squares { justify-content: flex-end; margin-bottom: 4px; display: flex; }

.empty { color: var(--muted); padding: 14px 6px; border-bottom: 1px solid var(--line); }

/* boleta de calificaciones */
.grades { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--surface); }
.grades th, .grades td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.grades th { font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 1.5px solid var(--ink); }
.grades td.n { text-align: right; font-family: var(--font-head); font-weight: 800; white-space: nowrap; color: var(--accent); }
.grades td.n small { font: 400 13px var(--font-body); color: var(--muted); }
.grades a { color: var(--ink); text-decoration: none; }
.grades a:hover { text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 4px; }
.state { font-size: 14px; color: var(--muted); white-space: nowrap; }
.state.ok { color: var(--ok); font-weight: 700; }
.state.bad { color: var(--bad); font-weight: 700; }

/* ---------- avisos ---------- */
.board { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 4px; padding: 18px 18px 6px; }
.board h2 { margin: 0 0 10px; font-size: 20px; }
.board article { padding: 10px 0 12px; border-top: 1px solid var(--line); }
.board h3 { margin: 0; font: 700 16px var(--font-body); }
.board p { margin: 4px 0 0; font-size: 15px; white-space: pre-line; }
.board time { font-size: 13px; color: var(--muted); }
.board .none { color: var(--muted); padding: 4px 0 12px; margin: 0; }

/* ---------- login ---------- */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.login-card {
  position: relative; width: min(430px, 100%); background: var(--surface);
  border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 8px 8px 0 var(--ink);
  padding: 30px 28px 26px 56px;
}
.login-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 34px; width: 2px; background: var(--margin-line); }
.login-card .brand { margin-bottom: 26px; }
.login-card h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -.03em; }
.login-card p.lead { margin: 0 0 22px; color: var(--muted); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 15px; }
.field input {
  font: 17px var(--font-body); padding: 11px 12px; border-radius: 6px; border: 1.5px solid #aebbd2; background: #fff; width: 100%;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.btn-primary {
  width: 100%; font: 700 17px var(--font-body); color: #fff; background: var(--accent);
  border: 1.5px solid var(--ink); border-radius: 6px; padding: 12px; cursor: pointer; margin-top: 6px;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-primary:hover { background: #1942b8; }
.btn-primary:active { transform: translate(3px, 3px); box-shadow: none; }
.error { background: var(--bad-soft); color: #8f1f1f; border-left: 4px solid var(--bad); padding: 10px 12px; margin-bottom: 16px; font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
@media (max-width: 480px) {
  .login-card { padding: 24px 18px 22px 38px; box-shadow: 5px 5px 0 var(--ink); }
  .login-card::before { left: 22px; }
}

/* ---------- profesor ---------- */
.t-head { padding: 30px 0 10px; }
.t-head h1 { margin: 0; font-size: 34px; letter-spacing: -.03em; }
.t-head p { margin: 4px 0 0; color: var(--muted); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 22px 0 50px; }
.course-card {
  display: block; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 18px; text-decoration: none; color: var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.course-card:hover { background: var(--sun-soft); }
.course-card h2 { margin: 0 0 4px; font-size: 21px; }
.course-card .stats { display: flex; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.course-card .stats b { color: var(--ink); font-size: 22px; display: block; font-family: var(--font-head); }
.scroll { overflow-x: auto; margin: 18px 0 40px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--surface); }
.book { border-collapse: collapse; width: 100%; font-size: 14px; }
.book th, .book td { padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.book th { background: var(--surface-2); text-align: left; font-size: 13px; color: var(--muted); position: sticky; top: 0; }
.book th a { color: var(--accent); text-decoration: none; font-size: 13px; }
.book td.c, .book th.c { text-align: center; }
.book td.n { text-align: right; font-weight: 700; }
.book tr:hover td { background: var(--sun-soft); }
.cell { display: inline-block; min-width: 40px; padding: 2px 8px; border-radius: 4px; font-weight: 700; text-align: center; }
.cell.s0 { color: #a3adbf; }
.cell.s1 { background: var(--bad-soft); color: var(--bad); }
.cell.s2 { background: var(--warn-soft); color: var(--warn); }
.cell.s3 { background: var(--ok-soft); color: var(--ok); }
.subs { display: grid; gap: 14px; margin: 10px 0 50px; }
.subm { background: var(--surface); border: 1.5px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.subm h3 { margin: 0 0 8px; font-size: 16px; font-family: var(--font-body); }
.subm pre { background: var(--code-bg); color: var(--code-ink); padding: 10px 12px; border-radius: 6px; overflow-x: auto; font-size: 13.5px; margin: 8px 0; }
.subm .fb { white-space: pre-wrap; color: var(--muted); font-size: 14px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ================================================================ área del profesor */
.tnav { display: flex; gap: 4px; margin-left: 18px; }
.tnav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 6px 10px; border-radius: 6px; }
.tnav a:hover { background: var(--sun-soft); }
.hero .refresh { font-size: 14px; margin-top: 6px; }
.h-sec { font-size: 23px; letter-spacing: -.02em; margin: 34px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.help { color: var(--muted); margin: -4px 0 14px; max-width: 72ch; }
.mat { color: var(--muted); font-size: 12.5px; font-family: var(--font-code); }
.flash { background: var(--ok-soft); border-left: 4px solid var(--ok); padding: 10px 14px; margin: 14px 0; font-weight: 700; }
.flash.pw { background: var(--sun-soft); border-color: #c9a800; font-weight: 400; }
.flash.pw code { font-size: 20px; font-weight: 700; background: #fff; border: 1.5px solid var(--ink); padding: 2px 10px; border-radius: 4px; color: var(--ink); }
.btn-sm {
  font: 700 15px var(--font-body); background: var(--accent); color: #fff; border: 1.5px solid var(--ink);
  border-radius: 6px; padding: 8px 14px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); white-space: nowrap;
}
.btn-sm:hover { background: #1942b8; }
.btn-sm:active { transform: translate(2px, 2px); box-shadow: none; }
.link-danger { background: none; border: 0; padding: 0; color: var(--bad); font: 700 14px var(--font-body); cursor: pointer; text-decoration: underline; }
.plain { list-style: none; padding: 0; margin: 8px 0; }
.plain li { padding: 4px 0; }
.plain.cols { columns: 2 280px; }
details summary { cursor: pointer; font-weight: 700; }

/* tarjetas de curso en el inicio */
.t-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 26px 0 0; }
.t-course {
  display: block; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink); padding: 18px 20px; color: var(--ink); text-decoration: none;
}
.t-course:hover { background: var(--sun-soft); }
.t-course h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.t-course .sec { margin: 2px 0 12px; color: var(--muted); }
.t-course .line { margin: 6px 0 0; font-size: 15px; }
.t-course .line b { font-family: var(--font-head); font-size: 17px; }
.squares.roster { gap: 3px; margin-bottom: 4px; }
.squares.roster i { width: 13px; height: 13px; }
.squares i.live { background: var(--accent); border-color: var(--accent); }
.live-t { color: var(--accent); }

/* feed de entregas */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.feed .who-l { font-weight: 700; color: var(--ink); text-decoration: none; }
.feed .who-l:hover { text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 4px; }
.feed .what { display: block; color: var(--muted); font-size: 15px; }
.feed time { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.late { color: var(--bad); }
.mk { display: inline-block; text-align: center; font: 800 14px var(--font-head); padding: 3px 0; border-radius: 4px; width: 54px; }
.mk.ok { background: var(--ok-soft); color: var(--ok); }
.mk.mid { background: var(--warn-soft); color: var(--warn); }
.mk.no { background: var(--bad-soft); color: var(--bad); }
.t-side { display: grid; gap: 18px; }
.t-side .board h3 a { color: var(--ink); }

/* página de curso */
.jump { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; align-items: center; }
.jump a { font-weight: 700; color: var(--accent); }
.jump a.dl { margin-left: auto; background: var(--sun); color: var(--ink); text-decoration: none; padding: 7px 12px; border: 1.5px solid var(--ink); border-radius: 6px; box-shadow: 2px 2px 0 var(--ink); }
.book a.st { color: var(--ink); font-weight: 700; text-decoration: none; }
.book a.st:hover { color: var(--accent); }
.book td.seen { color: var(--muted); }
.never { color: var(--bad); font-weight: 700; }
.acts { display: grid; gap: 10px; }
.act-row {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 6px; padding: 12px 14px;
}
.act-row.add { margin-top: 12px; border-style: dashed; border-color: #9fb0cc; }
.act-row label { display: grid; gap: 3px; font-size: 13px; font-weight: 700; color: var(--muted); }
.act-row label.chk { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; color: var(--ink); font-size: 15px; }
.act-row label.grow { flex: 1; min-width: 220px; }
.act-row input[type=datetime-local], .act-row select, .note-form input, .note-form textarea, .note-form select {
  font: 15px var(--font-body); padding: 7px 9px; border: 1.5px solid #aebbd2; border-radius: 6px; background: #fff; color: var(--ink);
}
.act-name { flex: 1; min-width: 220px; display: grid; }
.act-name a { font-weight: 700; color: var(--ink); font-size: 17px; }
.act-name span { color: var(--muted); font-size: 14px; }
.soon { color: var(--warn); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.note-form { display: grid; gap: 12px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 4px; padding: 16px; }
.note-form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.note-form .row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.note-form label.chk { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.note-form .btn-sm { justify-self: start; }
.note-list article { border-top: 1px solid var(--line); padding: 10px 0; }
.note-list article:first-child { border-top: 0; padding-top: 0; }
.note-list h3 { margin: 0; font: 700 17px var(--font-body); }
.note-list time { font-size: 13px; color: var(--muted); }
.note-list p { margin: 4px 0; white-space: pre-line; }

/* ficha del estudiante */
.st-act { margin: 18px 0 26px; }
.st-act-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.st-act-head h3 { margin: 0; font-size: 19px; }
.st-act-head h3 a { color: var(--ink); }
.st-act-head .total { margin-left: auto; font: 800 18px var(--font-head); color: var(--accent); }
.st-act-head .total small { font: 400 14px var(--font-body); color: var(--muted); }
.ex-table { background: var(--surface); border: 1.5px solid var(--line); }
.ex-table td { white-space: normal; vertical-align: top; }
.ex-table td.last { min-width: 260px; }
.attempt { border-top: 1px dashed var(--line); padding: 8px 0; }
.attempt .meta { font-size: 13px; color: var(--muted); }
.attempt pre { background: var(--code-bg); color: var(--code-ink); padding: 10px 12px; border-radius: 6px; overflow-x: auto; font-size: 13.5px; margin: 6px 0; white-space: pre; }
.attempt .fb { white-space: pre-wrap; font-size: 14px; color: var(--muted); }
.part { font-size: 12.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.part.fin { color: var(--ok); }
.book td.where { white-space: normal; min-width: 150px; }
.st-prog { margin: 0 0 10px; color: var(--muted); }
.st-prog b { color: var(--ink); }
