@import url('/theme.css');
:root{font-family:system-ui,Segoe UI,sans-serif;color:#183044;background:#f2f5f8}*{box-sizing:border-box}body{margin:0}header{background:#10283e;color:white;padding:17px max(20px,calc((100vw - 1200px)/2));display:flex;justify-content:space-between;align-items:center}header small{display:block;color:#a5c3d8;margin-top:3px}main{max-width:1200px;margin:24px auto;padding:0 16px}.panel{background:white;border:1px solid #dce4eb;border-radius:12px;padding:24px;box-shadow:0 4px 18px #1122330a}#login{max-width:430px;margin:70px auto}h1,h2{margin-top:0}label{display:block;font-size:14px;font-weight:600}input:not([type=checkbox]),select{display:block;width:100%;padding:10px;margin-top:5px;border:1px solid #bacbd7;border-radius:7px;font:inherit}form label{margin:14px 0}button{border:0;border-radius:7px;background:#176caa;color:white;padding:11px 16px;cursor:pointer;font-weight:600}button.secondary{background:#e8eef3;color:#243d50}.toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:14px}.toolbar label{min-width:180px;flex:1}.layout{display:grid;grid-template-columns:1.25fr 1fr;gap:16px}.status{padding:12px;background:#e5eef5;border-radius:7px}.error{color:#b32121}.controls{margin-top:18px;display:flex;gap:16px;align-items:center;flex-wrap:wrap}.controls label{display:flex;align-items:center;gap:7px}.gauge{height:250px;max-width:260px;margin:15px auto;border:5px solid #648398;border-radius:12px;position:relative;overflow:hidden;background:#f0f7fc}.liquid{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(#61b4f0,#1875b8);transition:height .2s}.gauge .value{position:absolute;inset:0;display:grid;place-items:center;font-size:38px;font-weight:800;text-shadow:0 1px white;z-index:1}.metrics{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.metric{background:#f2f6f9;border-radius:9px;padding:16px}.metric b{display:block;font-size:22px;margin-top:5px}.led{display:inline-block;width:12px;height:12px;border-radius:50%;background:#aaa;margin-right:8px}.led.on{background:#20a268}table{border-collapse:collapse;width:100%}td,th{padding:9px;text-align:left;border-bottom:1px solid #e4ebf0;font-size:13px}pre{height:180px;overflow:auto;background:#11283c;color:#d7edf9;padding:13px;border-radius:7px;font-size:12px;white-space:pre-wrap}#scene{min-height:310px}@media(max-width:800px){.layout{grid-template-columns:1fr}}

#gestion form{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin:12px 0}#gestion form label{display:flex;flex-direction:column;gap:4px}#gestion table{width:100%;border-collapse:collapse}#gestion td,#gestion th{padding:8px;border-bottom:1px solid #bbb;text-align:left}#gestion td button{margin:2px}.table-scroll{overflow-x:auto}#gestionMessage{min-height:1.5em}

#gestion textarea{display:block;width:100%;padding:9px;font:inherit;border:1px solid #bacbd7;border-radius:7px}#gestion hr{border:0;border-top:1px solid #ccd6df;margin:25px 0}.assignment{padding:12px;border-bottom:1px solid #dce4eb}.assignment p{white-space:pre-wrap}#studentAssignments{margin-bottom:16px}

.trend{width:100%;max-width:720px;height:auto;border:1px solid #999;border-radius:6px;background:transparent}.delivery-json{white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto;padding:12px;border:1px solid #999}#deliveryCharts{margin:12px 0}#deliveryDetail{margin-top:18px}

/* v5.1: estética industrial común y panel de gestión compacto */

:root{color-scheme:dark;background:#0b1521;color:#e4eef8}
header{background:linear-gradient(105deg,#172b40,#203b50);border-bottom:1px solid #34506b;gap:18px;flex-wrap:wrap}
.panel{background:#142638;border-color:#34506b;color:#e4eef8;box-shadow:0 4px 18px #0003}
#login{margin:70px auto}input:not([type=checkbox]),select,#gestion textarea{background:#102235;color:#e4eef8;border-color:#486983}
button.secondary{background:#24425a;color:#e4eef8;border:1px solid #52738b}
#portalNav{display:flex;gap:12px;align-items:center}#portalNav a,.nav-primary{padding:10px 14px;display:inline-block;text-decoration:none}
#portal{max-width:850px;margin:20px auto}#workspace{display:none!important}
#gestion{max-width:1200px;margin:0 auto}.management-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0}.management-tabs button.selected{background:#206b55;border-color:#399a7a}.management-tab{min-height:280px}.management-tab[hidden]{display:none!important}
.table-scroll{max-height:400px;overflow:auto;border:1px solid #34506b;border-radius:8px}#gestion td,#gestion th{border-bottom-color:#34506b}#gestion th{background:#20394f;position:sticky;top:0}
#gestion hr{border-top-color:#34506b}.assignment{border-bottom-color:#34506b}.metric{background:#1b3247}.status{background:#20394f}.error{color:#ff9999}
