
:root{
  --navy:#0d2f46;--blue:#0d6b93;--gold:#c89d27;--bg:#eef3f7;--line:#d8e3eb;
  --ok:#178556;--danger:#b13b3b;--text:#263746;--muted:#6f8290;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit}
.top{background:linear-gradient(135deg,#0b2638,#104766);color:#fff;padding:18px 24px;box-shadow:0 4px 14px #0002}
.topin{max-width:1250px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:20px}
.brand strong{font-size:1.15rem}.brand small{display:block;color:#cfe4ef;margin-top:3px}
.userbox{font-size:.9rem;text-align:right}
.layout{max-width:1250px;margin:26px auto;padding:0 18px;display:grid;grid-template-columns:230px 1fr;gap:22px}
.side{background:#fff;border-radius:16px;padding:14px;box-shadow:0 6px 20px #10253610;height:max-content}
.side a{display:block;text-decoration:none;padding:11px 12px;border-radius:10px;margin:4px 0}
.side a:hover,.side a.active{background:#eaf4f8;color:#07587b;font-weight:700}
.main h1{margin-top:0;color:#15384e}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.stat,.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 6px 18px #1025360c}
.stat strong{display:block;font-size:2rem;color:#0c6489}.stat small{color:var(--muted)}
.teacher{border-top:6px solid var(--gold);background:linear-gradient(135deg,#fffaf0,#fff)}
.teacher h2{color:#755800;margin:4px 0 8px}.role{font-size:.78rem;font-weight:800;letter-spacing:.05em;color:#8b6c10}
.tablewrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px}
table{width:100%;border-collapse:collapse;min-width:760px}
th,td{padding:12px 14px;border-bottom:1px solid #e7eef3;text-align:left}
th{background:#f6f9fb;color:#496171;font-size:.84rem}
.badge{display:inline-block;padding:5px 9px;border-radius:999px;font-size:.78rem;font-weight:700}
.ok{background:#e5f5ed;color:#176342}.off{background:#f5e8e8;color:#8d3333}.wait{background:#fff4d8;color:#80600a}
.btn{display:inline-block;border:0;background:var(--blue);color:#fff;text-decoration:none;padding:10px 14px;border-radius:10px;cursor:pointer;font-weight:700}
.btn.alt{background:#e8f0f4;color:#17475d}.btn.danger{background:#a83b3b}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
label{font-weight:700;font-size:.9rem}input,select{width:100%;padding:11px;border:1px solid #cbd9e2;border-radius:10px;margin-top:6px;background:#fff}
.modules{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:12px 0}
.modcheck{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fbfdfe}
.modcheck input{width:auto;margin-top:4px}.modcheck strong{display:block}
.notice{padding:13px 15px;border-radius:12px;background:#fff7dc;border-left:5px solid #d8aa27;margin-bottom:16px}
.login{max-width:430px;margin:8vh auto;background:#fff;padding:28px;border-radius:18px;box-shadow:0 14px 35px #1025361d}
.login h1{margin-top:0;color:#15384e}.login .teacherline{border-left:5px solid var(--gold);padding-left:12px;margin:18px 0}
.progress{height:9px;background:#e8eef2;border-radius:999px;overflow:hidden}.progress span{display:block;height:100%;background:#118261}
@media(max-width:900px){.layout{grid-template-columns:1fr}.grid4{grid-template-columns:repeat(2,1fr)}.formgrid,.modules{grid-template-columns:1fr}.side{display:grid;grid-template-columns:repeat(2,1fr)}}
@media(max-width:540px){.grid4{grid-template-columns:1fr}.topin{align-items:flex-start;flex-direction:column}.userbox{text-align:left}}

/* ── Ampliación 2026 ── */
.main>h1,.main>.actions{margin-bottom:14px}.main h2{color:#15384e;margin:26px 0 10px;font-size:1.2rem}
.main>.card,.main>form.card,.main>section.card{margin-bottom:16px}
.grid4{margin:16px 0}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:16px 0}
.modgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}.modgrid.big{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.card.mini{padding:12px 14px}.card.mini .badge{margin-top:6px}
.small{font-size:.86rem;color:var(--muted)}
.notice.ok{background:#e9f7ef;border-left-color:#1f8a52}.notice.err{background:#fbeaea;border-left-color:#b13b3b}
.btn.sm{padding:6px 10px;font-size:.85rem}.btn.wide{width:100%;margin-top:14px;padding:13px}
.layout.wide{max-width:1500px}
.filters{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.filters label{flex:1 1 180px}.filters .btn{margin-bottom:1px}
label.inline{display:flex;gap:8px;align-items:center;flex:0 0 auto}label.inline input{width:auto;margin:0}
.bulkbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}.bulkbar select,.bulkbar input{width:auto;margin:0}
.chip{display:inline-block;width:22px;height:22px;line-height:22px;text-align:center;border-radius:6px;font-size:.75rem;font-weight:800;background:#eef2f5;color:#a4b3bd;margin:1px}.chip.on{background:#0d6b93;color:#fff}
table.matrix{min-width:0}table.matrix th,table.matrix td{text-align:center;padding:8px 6px}table.matrix td:first-child,table.matrix th:first-child{text-align:left}
table.matrix td.good{background:#dff3e7;color:#176342;font-weight:800}table.matrix td.bad{background:#fbe5e3;color:#8d3333;font-weight:800}table.matrix td.na{background:#f6f8fa}
table.matrix input{width:auto;margin:0}
textarea{width:100%;padding:11px;border:1px solid #cbd9e2;border-radius:10px;margin-top:6px;font:inherit}
form.inline{display:inline}td.actions{gap:6px}td.actions form{display:inline}
.tabs{display:flex;gap:6px;margin-bottom:-1px}.tab{border:1px solid var(--line);background:#e8f0f4;padding:10px 14px;border-radius:12px 12px 0 0;font-weight:700;cursor:pointer}.tab.on{background:#fff;border-bottom-color:#fff}
pre.code{background:#0d2f46;color:#e6f2f8;padding:12px;border-radius:10px;overflow:auto;font-size:.85rem}
.crumbs{font-size:.9rem;color:var(--muted)}.crumbs a{color:#0d6b93}
.vblock{padding:14px 16px}.vhead{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding-bottom:8px;margin-bottom:10px}
.vprev{max-height:260px;overflow:auto;font-size:.92rem;color:#334}.vprev img{max-width:220px;height:auto}.vprev iframe{max-width:100%;height:160px}
.vedit{min-height:180px;border:2px solid #0d6b93;border-radius:10px;padding:12px;background:#fff;outline:none}.vedit img{max-width:100%}
.vhtml{width:100%;min-height:260px;font-family:monospace;font-size:12px}
.tb{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}.tb button{border:1px solid var(--line);background:#f6f9fb;border-radius:8px;padding:6px 9px;cursor:pointer;font-weight:700}
details.card summary{cursor:pointer}
.loginbg{background:linear-gradient(135deg,#0b2638,#0d5268)}.login .kicker{font-size:.75rem;font-weight:800;letter-spacing:.08em;color:#8b6c10;margin:0}.login label{display:block;margin-top:12px}
.wrapstu{max-width:1150px;margin:26px auto;padding:0 18px}
.lessons{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}.les{width:30px;height:30px;display:grid;place-items:center;border-radius:8px;background:#eef2f5;text-decoration:none;font-weight:800;font-size:.85rem;color:#4b5f6c}.les.good{background:#d6f2df;color:#176342}.les.bad{background:#fbd9d6;color:#8d3333}
.CodeMirror{border:1px solid var(--line);border-radius:10px;font-size:13px}
@media(max-width:900px){.grid2,.grid3{grid-template-columns:1fr}}
