/* Portal de estudiantes · Profe Nadia */
:root {
  --navy: #2b1028; --navy-2: #3d1838; --ink: #3a1733; --ink-2: #5e3555; --muted: #8a687f;
  --bg: #fff6f3; --card: #fff; --line: #f6dcd8; --accent: #ff8a3d; --coral: #ff5c9a;
  --on-dark: #f2d4e3; --ok: #1f9d5c; --bad: #d23c56;
  --grad: linear-gradient(120deg, #ff8a3d 0%, #ff6f7d 50%, #ff5c9a 100%);
  --radius: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0 0 .4em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

/* barra superior */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 20px; background: var(--navy); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: Fraunces, serif; font-weight: 700; font-size: 1.15rem; }
.brand-mark { background: var(--grad); border-radius: 9px; padding: 2px 8px; font-size: .9rem; }
.brand-sub { font-family: Inter, sans-serif; font-weight: 600; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 2px 9px; }
.topnav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: .95rem; }
.topnav a { text-decoration: none; opacity: .8; }
.topnav a.active, .topnav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--accent); }
.who { color: var(--on-dark); font-size: .88rem; }
.link-btn { background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.link-btn:hover { border-color: #fff; }

main { max-width: 1080px; margin: 0 auto; padding: 32px 20px 80px; }
.loading { text-align: center; color: var(--muted); padding: 80px 0; }

/* tarjetas y formularios */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.auth { max-width: 440px; margin: 40px auto; }
.auth .card { padding: 32px; box-shadow: 0 30px 60px -36px rgba(43,16,40,.45); }
.auth p.sub { color: var(--muted); margin-top: 0; }
.form { display: grid; gap: 14px; }
.form label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-weight: 600; font-size: .9rem; min-width: 0; }
.form input, .form select, .form textarea { flex: 1 1 100%; width: 100%; min-width: 0; border: 2px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fff; color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,138,61,.15); }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.error { color: var(--bad); font-weight: 600; font-size: .92rem; margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 600; cursor: pointer; text-decoration: none; transition: filter .2s, transform .15s; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-primary { background: var(--grad); color: #fff; }
.btn-ghost { background: transparent; border: 2px solid var(--line); color: var(--ink); }
.btn-small { padding: 7px 14px; font-size: .85rem; }
.btn-danger { background: transparent; border: 2px solid #f3c4cd; color: var(--bad); }

/* encabezado de vista */
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.view-head p { margin: 0; color: var(--muted); }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); }

/* pestañas */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tab { text-decoration: none; border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 600; cursor: pointer; color: var(--ink); }
.tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* próxima clase */
.next-class { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 22px; padding: 24px 28px; margin-bottom: 26px; }
.next-class h2 { margin: 4px 0; }
.next-class p { margin: 0; color: var(--on-dark); }
.pill-live { display: inline-block; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; }

/* listas */
.week-group { margin-bottom: 26px; }
.week-group h3 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.week-group h3 .tag { font-family: Inter, sans-serif; font-size: .72rem; font-weight: 700; color: #fff; background: var(--grad); border-radius: 999px; padding: 3px 10px; text-transform: uppercase; letter-spacing: .06em; }
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.item-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); font-size: 1.3rem; }
.item-main { flex: 1; min-width: 0; }
.item-main strong { display: block; overflow-wrap: anywhere; }
.item-main small { color: var(--muted); }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.empty { color: var(--muted); background: #fff; border: 2px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.badge-ok { background: #e3f6ec; color: var(--ok); }
.badge-wait { background: #fff1e6; color: #b85a12; }
.badge-off { background: #f6e3e7; color: var(--bad); }

/* panel admin */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 22px; align-items: start; }
.invite-box { margin-top: 14px; background: var(--bg); border: 1px dashed var(--accent); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.invite-box code { display: block; overflow-wrap: anywhere; font-size: .85rem; background: #fff; border-radius: 8px; padding: 8px 10px; }
.progress { height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }

/* visor de video */
.player { width: min(960px, 94vw); border: 0; border-radius: 20px; padding: 0; background: #000; color: #fff; }
.player::backdrop { background: rgba(20,6,18,.8); }
.player-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--navy); }
.player-head h3 { margin: 0; font-size: 1.05rem; }
.player video { display: block; width: 100%; max-height: 75vh; background: #000; }
.icon-btn { background: none; border: 0; color: #fff; font-size: 1.2rem; cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); z-index: 50; max-width: 90vw; text-align: center; }

@media (max-width: 820px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .item { flex-wrap: wrap; }
  .item-actions { width: 100%; justify-content: flex-start; }
  .who { display: none; }
}
/* Publicación de grabaciones: confirmaciones legibles junto al formulario PDF. */
.content-divider { border: 0; border-top: 1px solid var(--line, #eadfe6); margin: 2rem 0; }
.form .check-row { display: flex; align-items: flex-start; gap: .7rem; font-weight: 400; line-height: 1.5; }
.form .check-row input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: #773853; }
