:root {
  --navy-950:#04132d;
  --navy-900:#071a3a;
  --navy-800:#0b2853;
  --blue-700:#155a9d;
  --blue-600:#2078c7;
  --blue-100:#e9f3fb;
  --cyan:#4ac7df;
  --gold:#d9ae4d;
  --ink:#12233f;
  --muted:#607089;
  --line:#dbe3ed;
  --soft:#f4f7fb;
  --white:#fff;
  --success:#168467;
  --warning:#b97313;
  --danger:#b43d4b;
  --shadow:0 16px 42px rgba(8,29,59,.12);
  --radius:18px;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{font-size:16px;scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--soft);line-height:1.5}
button,input,select{font:inherit}
button,a{touch-action:manipulation}
button{cursor:pointer}
.eyebrow{font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.18em;color:var(--blue-700)}
.eyebrow.light{color:#91cee5}
.muted{color:var(--muted)}
.login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(420px,1.05fr) minmax(420px,.95fr);background:white}
.login-brand{position:relative;overflow:hidden;min-height:100vh;padding:54px 64px;color:white;background:radial-gradient(circle at 78% 28%,rgba(74,199,223,.28),transparent 28%),linear-gradient(145deg,#031128 0%,#092957 64%,#0b4471 100%);display:flex;flex-direction:column;justify-content:space-between}
.login-brand:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(to bottom,black,transparent 88%)}
.brand-lockup,.login-statement{position:relative;z-index:1}
.brand-lockup{display:flex;align-items:center;gap:24px}
.brand-seal{width:88px;height:88px;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(0,0,0,.25))}
.brand-lockup h1{font-size:clamp(3rem,5vw,5.6rem);line-height:.88;letter-spacing:-.055em;margin:12px 0 0;text-transform:uppercase}
.login-statement{max-width:610px;margin-bottom:44px}
.login-statement .lead{font-size:clamp(2rem,3vw,3.4rem);line-height:1.05;font-weight:750;letter-spacing:-.04em;margin:0 0 20px}
.login-statement p:last-child{max-width:520px;color:#c5d8ea;font-size:1.05rem}
.orbit-mark{position:absolute;width:520px;height:520px;right:-160px;bottom:-200px;border:1px solid rgba(255,255,255,.12);border-radius:50%}
.orbit-mark span{position:absolute;border:1px solid rgba(74,199,223,.22);border-radius:50%;inset:58px}.orbit-mark span:nth-child(2){inset:118px}.orbit-mark span:nth-child(3){inset:178px;background:rgba(74,199,223,.08)}
.login-panel{display:grid;place-items:center;padding:48px;background:linear-gradient(180deg,#fff,#f6f9fd)}
.login-card{width:min(420px,100%)}
.login-access-note{margin:16px 0;padding:12px 14px;border:1px solid #cbd7e5;border-radius:11px;background:var(--soft);font-size:.875rem;line-height:1.45}
.login-access-note strong{color:var(--blue-700)}
.login-access-note p{margin:4px 0 0}
.login-card h2{font-size:2rem;letter-spacing:-.03em;margin:8px 0 4px}.login-card>p{margin-top:0}.login-card label{display:block;font-size:.86rem;font-weight:750;margin:22px 0 8px}
.label-row{display:flex;justify-content:space-between;align-items:end}.label-row label{margin-bottom:8px}.text-button{border:0;background:none;color:var(--blue-700);font-weight:700;font-size:.82rem;padding:0 0 8px}
input,select{width:100%;border:1px solid #cbd7e5;background:white;color:var(--ink);border-radius:11px;padding:13px 14px;outline:none;min-height:48px}input:focus,select:focus{border-color:var(--blue-600);box-shadow:0 0 0 4px rgba(32,120,199,.12)}
.password-wrap{position:relative}.password-wrap input{padding-right:66px}.icon-button{position:absolute;right:7px;top:7px;border:0;background:var(--soft);height:34px;border-radius:8px;color:var(--blue-700);font-size:.7rem;font-weight:800;padding:0 10px}
.primary-button,.secondary-button{border-radius:11px;min-height:48px;padding:0 18px;font-weight:800;border:1px solid transparent}.primary-button{background:var(--blue-700);color:white;box-shadow:0 8px 22px rgba(21,90,157,.22)}.primary-button:hover{background:#0e4d8c}.secondary-button{background:white;color:var(--blue-700);border-color:#b9c9dc}.secondary-button:hover{background:var(--blue-100)}.danger-button{min-height:44px;border:1px solid #d55b68;border-radius:10px;padding:0 18px;background:#fff0f2;color:#a52535;font:inherit;font-size:.8rem;font-weight:800;cursor:pointer}.danger-button:hover{background:#a52535;color:#fff}.danger-button:disabled{opacity:.6;cursor:wait}.full{width:100%;margin-top:15px}.security-note{display:flex;gap:9px;justify-content:center;align-items:center!important;color:var(--muted);font-size:.75rem;margin-top:24px!important}.security-note span{width:8px;height:8px;background:var(--success);border-radius:50%}.mobile-brand{display:none}
.app-shell{min-height:100vh;display:grid;grid-template-columns:250px 1fr;grid-template-rows:76px 1fr}.sidebar{position:fixed;inset:0 auto 0 0;width:250px;background:var(--navy-950);color:white;padding:22px 16px;display:flex;flex-direction:column;z-index:20}.side-brand{display:flex;align-items:center;gap:12px;padding:2px 10px 24px;border-bottom:1px solid rgba(255,255,255,.1)}.side-brand img{width:44px;height:44px;object-fit:contain}.side-brand div{display:grid;line-height:1}.side-brand strong{font-size:1.15rem;letter-spacing:.11em}.side-brand span{font-size:.67rem;letter-spacing:.2em;color:#82b8dc;margin-top:6px}
.sidebar nav{display:grid;gap:5px;margin-top:22px}.sidebar nav a{display:flex;align-items:center;gap:11px;color:#b9c8d9;text-decoration:none;padding:10px;border-radius:10px;font-size:.88rem;font-weight:650}.sidebar nav a b{display:grid;place-items:center;width:29px;height:29px;border:1px solid rgba(255,255,255,.16);border-radius:8px;font-size:.62rem;color:#8ecce7}.sidebar nav a i{font-style:normal;font-size:.55rem;letter-spacing:.08em;margin-left:auto;background:rgba(217,174,77,.16);color:#f2cc76;border:1px solid rgba(217,174,77,.28);padding:3px 6px;border-radius:99px}.sidebar nav a:hover,.sidebar nav a.active{background:rgba(74,199,223,.12);color:#fff}.sidebar nav a.active b{background:var(--cyan);border-color:var(--cyan);color:var(--navy-950)}.nav-separator{height:1px;background:rgba(255,255,255,.08);margin:10px}
.side-footer{margin-top:auto;border-top:1px solid rgba(255,255,255,.1);padding:18px 10px 2px;display:grid;grid-template-columns:1fr auto;gap:8px;font-size:.72rem;color:#91a8c0}.mini-progress{grid-column:1/3;background:rgba(255,255,255,.12);height:5px;border-radius:9px;overflow:hidden}.mini-progress i{display:block;height:100%;background:var(--cyan)}.side-footer strong{color:white}
.topbar{grid-column:2;position:sticky;top:0;z-index:10;height:76px;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px}.top-title{display:grid}.top-title span{color:var(--muted);font-size:.7rem;text-transform:uppercase;letter-spacing:.12em;font-weight:750}.top-title strong{font-size:1.15rem}.top-actions{display:flex;align-items:center;gap:12px}.notification-button{width:36px;height:36px;border-radius:50%;border:1px solid var(--line);background:white;color:var(--danger);font-weight:850;font-size:.72rem}.profile-chip{display:flex;align-items:center;gap:10px;border:0;background:none;text-align:left;color:var(--ink)}.profile-chip>span:first-child{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--navy-900);color:white;font-weight:800}.profile-chip>span:last-child{display:grid}.profile-chip strong{font-size:.8rem}.profile-chip small{font-size:.68rem;color:var(--muted)}.menu-button{display:none}
main{grid-column:2;padding:30px;min-width:0}.page{max-width:1440px;margin:0 auto}.page-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:24px}.page-head h1{font-size:clamp(1.8rem,3vw,2.7rem);letter-spacing:-.045em;margin:4px 0}.page-head p{margin:0;max-width:680px;color:var(--muted)}
.hero-dashboard{position:relative;overflow:hidden;background:linear-gradient(120deg,var(--navy-950),var(--navy-800));color:white;border-radius:24px;padding:34px;display:grid;grid-template-columns:1.4fr .8fr;gap:28px;box-shadow:var(--shadow)}.hero-dashboard:after{content:"";position:absolute;width:380px;height:380px;border:1px solid rgba(74,199,223,.22);border-radius:50%;right:-120px;top:-190px;box-shadow:0 0 0 50px rgba(74,199,223,.035),0 0 0 100px rgba(74,199,223,.025)}.hero-copy,.mission-card{position:relative;z-index:1}.hero-copy h1{font-size:clamp(2rem,3vw,3.4rem);line-height:1;letter-spacing:-.05em;margin:10px 0 14px}.hero-copy p{color:#c7d8e9;max-width:650px}.hero-actions{display:flex;gap:10px;margin-top:24px}.hero-actions .secondary-button{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.24);color:white}.mission-card{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:20px;align-self:center}.mission-card header{display:flex;justify-content:space-between;font-size:.72rem;text-transform:uppercase;letter-spacing:.09em;color:#a8c7dc}.mission-score{font-size:3rem;line-height:1;font-weight:850;margin:18px 0 4px}.mission-card p{font-size:.8rem;color:#c7d8e9}.progress{height:8px;background:#dfe7f0;border-radius:99px;overflow:hidden}.progress i{display:block;height:100%;background:linear-gradient(90deg,var(--blue-600),var(--cyan));border-radius:99px}
.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:20px 0}.metric-card,.panel,.course-card,.news-card,.exam-card{background:white;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 6px 20px rgba(15,44,79,.045)}.metric-card{padding:18px}.metric-card span{font-size:.75rem;color:var(--muted);font-weight:700}.metric-card strong{display:block;font-size:1.65rem;letter-spacing:-.04em;margin:8px 0 2px}.metric-card small{font-size:.7rem;color:var(--success)}
.dashboard-grid{display:grid;grid-template-columns:1.45fr .8fr;gap:20px}.panel{padding:22px}.panel-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.panel-title h2{font-size:1.05rem;margin:0}.panel-title a,.link-button{border:0;background:none;color:var(--blue-700);font-weight:750;text-decoration:none;font-size:.8rem}.continue-item{display:grid;grid-template-columns:48px 1fr auto;gap:13px;align-items:center;padding:14px 0;border-top:1px solid var(--line)}.continue-item:first-of-type{border-top:0}.item-badge{display:grid;place-items:center;width:48px;height:48px;background:var(--blue-100);color:var(--blue-700);border-radius:12px;font-size:.7rem;font-weight:850}.continue-item h3{font-size:.9rem;margin:0 0 5px}.continue-item p{font-size:.73rem;color:var(--muted);margin:0}.continue-item button{border:0;border-radius:9px;background:var(--navy-900);color:white;padding:9px 12px;font-size:.72rem;font-weight:750}.rank-mini{display:grid;gap:8px}.rank-row{display:grid;grid-template-columns:28px 38px 1fr auto;align-items:center;gap:8px;padding:9px 0}.rank-row+.rank-row{border-top:1px solid var(--line)}.rank-row>span:first-child{font-size:.8rem;font-weight:850;color:var(--blue-700)}.avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--navy-900);color:white;font-size:.65rem;font-weight:850}.rank-row strong{font-size:.8rem}.rank-row small{display:block;color:var(--muted);font-size:.65rem}.rank-row em{font-style:normal;font-weight:850;font-size:.85rem}
.filter-row,.tab-row{display:flex;gap:8px;flex-wrap:wrap}.filter-button,.tab-button{border:1px solid var(--line);background:white;color:var(--muted);border-radius:99px;padding:8px 14px;font-size:.78rem;font-weight:750}.filter-button.active,.tab-button.active{background:var(--navy-900);color:white;border-color:var(--navy-900)}
.course-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.course-card{overflow:hidden}.course-top{height:128px;padding:20px;color:white;background:linear-gradient(135deg,var(--navy-900),var(--blue-700));display:flex;justify-content:space-between;align-items:start}.course-top.alt{background:linear-gradient(135deg,#173f66,#32849b)}.course-top.third{background:linear-gradient(135deg,#332952,#6e5b9f)}.course-code{font-size:.68rem;letter-spacing:.11em;font-weight:800}.course-level{border:1px solid rgba(255,255,255,.3);border-radius:99px;padding:4px 8px;font-size:.62rem}.course-body{padding:18px}.course-body h2{font-size:1.05rem;margin:0 0 8px}.course-body p{font-size:.76rem;color:var(--muted);min-height:50px}.course-meta{display:flex;justify-content:space-between;font-size:.7rem;color:var(--muted);margin:15px 0 9px}.course-actions{display:flex;gap:8px;margin-top:16px}.course-actions button{flex:1}
.path-panel{margin-top:22px;padding:24px;background:white;border:1px solid var(--line);border-radius:var(--radius)}.level-path{display:grid;grid-template-columns:repeat(5,1fr);gap:18px;margin-top:28px;position:relative}.level-path:before{content:"";position:absolute;height:3px;background:var(--line);left:8%;right:8%;top:27px}.level-node{position:relative;text-align:center}.level-dot{position:relative;z-index:1;margin:auto;display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:white;border:4px solid var(--line);font-weight:850;color:var(--muted)}.level-node.done .level-dot{background:var(--success);border-color:#bde5d9;color:white}.level-node.current .level-dot{background:var(--navy-900);border-color:#8fd6e8;color:white;box-shadow:0 0 0 8px var(--blue-100)}.level-node.locked{opacity:.55}.level-node h3{font-size:.78rem;margin:14px 0 3px}.level-node p{font-size:.65rem;color:var(--muted);margin:0}
.bellum-banner{background:linear-gradient(120deg,#101b37,#173f66 58%,#176c83);color:white;border-radius:24px;padding:30px;display:grid;grid-template-columns:1.3fr .7fr;gap:22px}.bellum-banner h1{font-size:2.4rem;line-height:1;margin:8px 0}.bellum-banner p{color:#c8dbe8}.score-gauge{display:grid;place-items:center;align-content:center;border-left:1px solid rgba(255,255,255,.16)}.gauge-ring{display:grid;place-items:center;width:126px;height:126px;border-radius:50%;background:conic-gradient(var(--cyan) 0 86%,rgba(255,255,255,.12) 86%);position:relative}.gauge-ring:after{content:"";position:absolute;inset:10px;background:var(--navy-800);border-radius:50%}.gauge-ring strong{position:relative;z-index:1;font-size:2rem}.gauge-ring small{position:relative;z-index:1;font-size:.65rem}.ranking-layout{display:grid;grid-template-columns:1fr 330px;gap:20px;margin-top:20px}.ranking-table{width:100%;border-collapse:collapse}.ranking-table th{text-align:left;font-size:.68rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;padding:10px;border-bottom:1px solid var(--line)}.ranking-table td{padding:13px 10px;border-bottom:1px solid #edf1f6;font-size:.8rem}.ranking-table tr.me{background:var(--blue-100)}.position-pill{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--soft);font-weight:850}.position-pill.top{background:#fff3cb;color:#9d6b00}.unlock-card{padding:22px;background:white;border:1px solid var(--line);border-radius:var(--radius)}.unlock-card h2{font-size:1rem}.attempt-list{display:grid;gap:8px;margin:16px 0}.attempt{display:flex;justify-content:space-between;background:var(--soft);border-radius:10px;padding:10px;font-size:.75rem}.attempt:first-child{border:1px solid #f0d894;background:#fffaf0}.rule-note{font-size:.72rem;color:var(--muted);border-left:3px solid var(--gold);padding-left:10px}
.exam-card{padding:26px;display:grid;grid-template-columns:1fr 260px;gap:28px}.exam-card h2{font-size:1.6rem;margin:5px 0}.exam-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:20px}.fact{background:var(--soft);border-radius:12px;padding:12px}.fact small{display:block;color:var(--muted)}.fact strong{font-size:.9rem}.exam-status{background:#edf7f4;border:1px solid #bde1d6;border-radius:15px;padding:20px;display:grid;align-content:center}.exam-status span{font-size:.72rem;color:var(--success);font-weight:800;text-transform:uppercase}.exam-status strong{font-size:2.5rem}.exam-status p{font-size:.72rem;color:var(--muted)}
.news-grid{display:grid;grid-template-columns:1.2fr .8fr .8fr;gap:18px}.news-card{overflow:hidden}.news-visual{height:155px;background:linear-gradient(135deg,var(--navy-900),#227ca0);display:flex;align-items:end;padding:18px;color:white}.news-visual.alt{background:linear-gradient(135deg,#273753,#675b90)}.news-visual.gold{background:linear-gradient(135deg,#6f4c13,#c28f35)}.news-card:first-child{grid-row:span 2}.news-card:first-child .news-visual{height:300px}.news-body{padding:18px}.news-body h2{font-size:1rem;margin:7px 0}.news-card:first-child h2{font-size:1.35rem}.news-body p{font-size:.75rem;color:var(--muted)}.tag{font-size:.63rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:var(--blue-700)}
.profile-grid,.admin-grid{display:grid;grid-template-columns:320px 1fr;gap:20px}.profile-card{text-align:center}.profile-avatar{display:grid;place-items:center;width:92px;height:92px;border-radius:28px;background:var(--navy-900);color:white;font-size:1.8rem;font-weight:850;margin:4px auto 16px}.badge-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.achievement{background:var(--soft);border-radius:12px;padding:14px 8px;text-align:center}.achievement b{display:block;font-size:1.2rem;color:var(--blue-700)}.achievement span{font-size:.63rem;color:var(--muted)}
.admin-nav{display:grid;gap:8px}.admin-nav button{text-align:left;border:1px solid var(--line);background:white;padding:12px;border-radius:10px;color:var(--ink);font-weight:700}.admin-nav button.active{background:var(--navy-900);color:white}.admin-table{width:100%;border-collapse:collapse}.admin-table th,.admin-table td{text-align:left;padding:12px;border-bottom:1px solid var(--line);font-size:.75rem}.status{display:inline-flex;align-items:center;gap:6px;border-radius:99px;padding:4px 8px;font-size:.65rem;font-weight:800}.status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.status.ok{background:#e8f6f1;color:var(--success)}.status.draft{background:#fff5dc;color:var(--warning)}.status.closed{background:#f2edf6;color:#72568b}
.modal-backdrop{position:fixed;inset:0;background:rgba(2,11,28,.62);backdrop-filter:blur(6px);z-index:100;display:grid;place-items:center;padding:20px}.modal-backdrop[hidden]{display:none!important}.modal{position:relative;background:white;border-radius:20px;width:min(540px,100%);max-height:85vh;overflow:auto;padding:28px;box-shadow:0 24px 70px rgba(0,0,0,.32)}.modal-close{position:absolute;right:16px;top:14px;border:0;background:var(--soft);border-radius:50%;width:34px;height:34px;font-size:1.4rem}.modal h2{margin-top:0}.modal-form{display:grid;gap:13px}.modal-form label{font-size:.75rem;font-weight:750}.toast-region{position:fixed;right:22px;bottom:22px;z-index:200;display:grid;gap:10px}.toast{background:var(--navy-950);color:white;border-radius:12px;padding:13px 16px;box-shadow:var(--shadow);font-size:.78rem;animation:toastIn .25s ease}.toast strong{display:block;margin-bottom:2px}@keyframes toastIn{from{transform:translateY(10px);opacity:0}}
.empty-state{text-align:center;padding:38px;color:var(--muted)}
@media(max-width:1050px){.metric-grid{grid-template-columns:repeat(2,1fr)}.course-grid{grid-template-columns:repeat(2,1fr)}.news-grid{grid-template-columns:1fr 1fr}.news-card:first-child{grid-row:auto;grid-column:1/3}.news-card:first-child .news-visual{height:230px}.ranking-layout,.dashboard-grid{grid-template-columns:1fr}.profile-grid,.admin-grid{grid-template-columns:260px 1fr}}
@media(max-width:760px){.login-shell{display:block}.login-brand{display:none}.login-panel{min-height:100vh;padding:28px 22px}.mobile-brand{display:flex;align-items:center;gap:12px;margin-bottom:40px;color:var(--navy-900)}.mobile-brand img{width:48px;height:48px;object-fit:contain}.app-shell{display:block}.sidebar{transform:translateX(-105%);transition:.25s}.sidebar.open{transform:none;box-shadow:20px 0 50px rgba(0,0,0,.25)}.topbar{grid-column:auto;padding:0 16px}.menu-button{display:block;border:0;background:var(--navy-900);color:white;border-radius:8px;padding:8px;font-size:.68rem;font-weight:800}.top-title{display:none}.profile-chip>span:last-child{display:none}main{padding:18px}.hero-dashboard,.bellum-banner,.exam-card{grid-template-columns:1fr;padding:24px}.mission-card,.score-gauge{border-left:0;border-top:1px solid rgba(255,255,255,.16);padding-top:18px}.metric-grid{grid-template-columns:1fr 1fr}.course-grid,.news-grid,.profile-grid,.admin-grid{grid-template-columns:1fr}.news-card:first-child{grid-column:auto}.level-path{grid-template-columns:1fr;gap:10px}.level-path:before{left:28px;right:auto;top:5%;bottom:5%;width:3px;height:auto}.level-node{display:grid;grid-template-columns:58px 1fr;text-align:left;gap:12px;align-items:center}.level-node h3{margin:0}.level-node p{grid-column:2}.exam-facts{grid-template-columns:1fr}.page-head{display:block}.page-head .filter-row{margin-top:14px}.ranking-table th:nth-child(4),.ranking-table td:nth-child(4){display:none}}
@media(max-width:440px){.metric-grid{grid-template-columns:1fr}.hero-actions{flex-direction:column}.profile-chip{padding:0}.continue-item{grid-template-columns:42px 1fr}.continue-item button{grid-column:2;width:max-content}.course-grid{grid-template-columns:1fr}}
.form-message{margin:14px 0 0!important;padding:11px 13px;border-radius:10px;background:#fff0f2;color:var(--danger);font-size:.8rem;font-weight:650}
.primary-button:disabled{opacity:.62;cursor:wait}
.profile-actions{display:flex;gap:10px;flex-wrap:wrap}
.loading-state{min-height:48vh;display:grid;place-items:center;align-content:center;gap:14px;color:var(--muted)}
.loading-state span{width:38px;height:38px;border:4px solid var(--line);border-top-color:var(--blue-600);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.empty-state{background:white;border:1px dashed #bdcbdc;border-radius:16px;padding:42px 24px;text-align:center}.empty-state strong{font-size:1.05rem;color:var(--ink)}.empty-state p{margin:7px auto 18px;max-width:560px}
.data-row,.record-card{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px 0;border-top:1px solid var(--line)}.data-row:first-of-type,.record-card:first-child{border-top:0}.data-row small,.record-card small{display:block;color:var(--muted);margin-top:3px;max-width:760px}
.library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.library-card{display:grid;grid-template-columns:74px 1fr;gap:18px;background:white;border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:0 6px 20px rgba(15,44,79,.045)}.library-card h2{margin:5px 0 2px;font-size:1.08rem}.library-card p{color:var(--muted);font-size:.84rem}.library-card small{color:var(--muted)}.library-icon{display:grid;place-items:center;width:68px;height:82px;background:linear-gradient(145deg,var(--navy-900),var(--blue-600));color:white;border-radius:10px 10px 18px 10px;font-size:.72rem;font-weight:850;letter-spacing:.08em}.resource-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;margin-top:8px;min-height:42px;padding:0 15px}
.exam-list{display:grid;gap:18px}.resource-box{margin-top:20px;border-top:1px solid var(--line);padding-top:16px}.resource-box>strong{display:block;margin-bottom:8px}.resource-box a{display:grid;text-decoration:none;color:var(--ink);background:var(--soft);border:1px solid var(--line);border-radius:11px;padding:11px 13px;margin-top:8px}.resource-box a:hover{border-color:var(--blue-600);background:var(--blue-100)}.resource-box a span{font-weight:750}.resource-box a small{color:var(--muted)}
.ranking-panel{margin-top:20px}.admin-workspace{display:grid;grid-template-columns:250px minmax(0,1fr);gap:20px;align-items:start}.admin-side{padding:14px;position:sticky;top:96px;max-height:calc(100vh - 120px);overflow:auto}.admin-content{min-width:0}.record-list{display:grid}.record-actions{display:flex;align-items:center;gap:10px}.compact{min-height:36px;padding:0 12px;font-size:.75rem}
.modal-wide{width:min(760px,100%)}.admin-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.admin-form label{display:grid;gap:7px;margin:0}.admin-form label:has(textarea),.admin-form .form-actions,.admin-form .form-message,.admin-form .check-field{grid-column:1/-1}.admin-form textarea{width:100%;min-height:105px;resize:vertical;border:1px solid #cbd7e5;border-radius:11px;padding:13px 14px;font:inherit}.admin-form textarea:focus{outline:none;border-color:var(--blue-600);box-shadow:0 0 0 4px rgba(32,120,199,.12)}.check-field{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center}.check-field input{width:20px;min-height:20px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}.form-hint{padding:10px 12px;background:#fff8e5;border-left:3px solid var(--gold);color:var(--muted);border-radius:8px;font-size:.8rem}
@media(max-width:900px){.library-grid{grid-template-columns:1fr}.admin-workspace{grid-template-columns:1fr}.admin-side{position:static;max-height:none}.admin-nav{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.admin-form{grid-template-columns:1fr}.admin-form label{grid-column:1}.record-card{align-items:flex-start;flex-direction:column}.record-actions{width:100%;justify-content:space-between}.library-card{grid-template-columns:52px 1fr}.library-icon{width:48px;height:62px}.admin-nav{grid-template-columns:1fr}}

/* Producción v8: evaluaciones, rankings, cursos y notificaciones */
.admin-confirmed i{background:#d8f4ea!important;color:#087052!important}
.ranking-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 24px}
.podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:12px;margin:4px auto 26px;max-width:760px}
.podium-place{display:grid;place-items:center;align-content:center;gap:6px;min-height:128px;padding:18px 12px;border:1px solid var(--line);border-radius:16px 16px 8px 8px;background:linear-gradient(180deg,#fff,#f6f9fc);text-align:center}
.podium-place span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--navy-900);color:#fff;font-weight:850}
.podium-place strong{font-size:.88rem;word-break:break-word}.podium-place b{font-size:.75rem;color:var(--blue-700)}
.podium-place.place-1{min-height:180px;grid-column:2;grid-row:1;background:linear-gradient(180deg,#fff9dd,#fff);border-color:#e6ca68}
.podium-place.place-1 span{background:#bd8614}.podium-place.place-2{grid-column:1;grid-row:1}.podium-place.place-3{grid-column:3;grid-row:1}
.table-scroll{overflow-x:auto}
.assessment-runner{display:grid;gap:18px}.assessment-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 15px;background:var(--navy-900);border-radius:12px;color:#fff;font-size:.78rem}
.question-card{margin:0;padding:20px;border:1px solid var(--line);border-radius:15px;background:#fff}.question-card legend{display:flex;align-items:flex-start;gap:10px;padding:0 8px;font-weight:760;line-height:1.4}.question-card legend span{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:9px;background:var(--blue-100);color:var(--blue-700);font-size:.75rem}
.answer-options{display:grid;gap:9px;margin-top:16px}.answer-options label{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--line);border-radius:11px;cursor:pointer;font-size:.84rem}.answer-options label:has(input:checked){border-color:var(--blue-600);background:var(--blue-100)}.answer-options input{width:auto;min-height:auto;margin-top:2px}
.question-card textarea{width:100%;min-height:100px;margin-top:14px;border:1px solid #cbd7e5;border-radius:11px;padding:12px;font:inherit}.question-image{display:block;max-width:min(100%,620px);max-height:340px;object-fit:contain;margin:16px auto;border-radius:12px}
.result-score{text-align:center;padding:24px 8px}.result-score span{display:block;color:var(--muted);font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;font-weight:750}.result-score strong{display:block;margin:10px 0;font-size:3.2rem;letter-spacing:-.05em;color:var(--navy-900)}
.module-list{display:grid;gap:14px}.module-card{border:1px solid var(--line);border-radius:14px;padding:16px}.module-card>header{display:flex;align-items:flex-start;gap:12px}.module-card>header>span{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:10px;background:var(--navy-900);color:#fff;font-weight:800}.module-card header strong,.module-card header small{display:block}.module-card header small{margin-top:3px;color:var(--muted)}
.content-list{display:grid;gap:8px;margin:14px 0 0 46px}.content-item{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px;background:var(--soft);border-radius:10px}.content-item b,.content-item small{display:block}.content-item small{color:var(--muted);margin-top:2px}.content-item p{margin:7px 0 0;white-space:pre-line;font-size:.78rem;color:var(--muted)}.content-item a{flex:0 0 auto;text-decoration:none;color:var(--blue-700);font-weight:800;font-size:.75rem}
.notification-list{display:grid;gap:10px}.notification-item{padding:15px;border:1px solid var(--line);border-radius:12px}.notification-item.unread{border-left:4px solid var(--cyan);background:#f3fbfd}.notification-item p{margin:6px 0;color:var(--muted);white-space:pre-line}.notification-item small{color:var(--muted)}
.history-panel{margin-top:20px}.history-list{display:grid}.history-list article{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;border-top:1px solid var(--line)}.history-list article:first-child{border-top:0}.history-list small{display:block;color:var(--muted);margin-top:3px}.history-list b{color:var(--blue-700)}
.builder-success h3{font-size:1.35rem;margin:14px 0 8px}.builder-success ol{display:grid;gap:8px;padding-left:22px;color:var(--muted)}.builder-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.delete-warning{padding-top:4px}.delete-warning>p:first-child{font-size:1.05rem}.delete-warning>p:nth-child(2){padding:12px;border-left:3px solid var(--danger);background:#fff5f6;color:var(--muted);border-radius:8px}.record-actions .danger-button.compact{min-height:36px;padding:0 12px}
.password-rules{display:grid;gap:5px;padding:12px 14px;border-radius:10px;background:var(--blue-100);color:var(--muted);font-size:.78rem}.password-rules strong{color:var(--ink)}.password-rules span:before{content:"✓";margin-right:7px;color:var(--success);font-weight:850}.callsign-hint{margin:0}.activation-note{margin:2px 0 0!important}
.question-resources{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0;padding:10px 12px;border-radius:10px;background:#f7f2df;font-size:.76rem}.question-resources a{padding:6px 9px;border-radius:8px;background:#fff;color:var(--blue-700);font-weight:750;text-decoration:none}.option-image{display:block;max-width:220px;max-height:150px;object-fit:contain;margin-top:8px;border-radius:8px}.embedded-game-shell{display:grid;gap:14px}.embedded-game{width:100%;height:min(72vh,760px);border:1px solid var(--line);border-radius:14px;background:#fff}
.matching-grid{display:grid;gap:10px;margin-top:16px}.matching-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.8fr);align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:11px}.matching-row select{width:100%;min-height:42px;border:1px solid #cbd7e5;border-radius:9px;padding:0 10px;background:#fff}
@media(max-width:600px){.podium{gap:6px}.podium-place{padding:12px 6px;min-height:115px}.podium-place.place-1{min-height:152px}.podium-place strong{font-size:.72rem}.assessment-toolbar{align-items:flex-start;flex-direction:column}.content-list{margin-left:0}.content-item{flex-direction:column}.matching-row{grid-template-columns:1fr}}

/* Games use the whole available viewport while preserving the authenticated host. */
body.game-open{overflow:hidden}
.game-backdrop{padding:0;backdrop-filter:none;background:#021014}
.modal.modal-game{width:100%;height:100vh;height:100dvh;max-height:none;border-radius:0;padding:0;overflow:hidden;display:flex;flex-direction:column}
.modal-game .modal-close{z-index:2;top:max(8px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));background:#e9f3fb;color:#071a3a}
.modal-game #modal-body{min-height:0;flex:1;display:flex;flex-direction:column}
.modal-game #modal-body>.eyebrow{display:none}
.modal-game #modal-title{flex:none;min-height:48px;font-size:.85rem;line-height:1.3;margin:0;padding:calc(14px + env(safe-area-inset-top)) 56px 12px max(12px,env(safe-area-inset-left));background:#071a3a;color:white}
.modal-game .embedded-game-shell{flex:1;min-height:0;display:flex;flex-direction:column;gap:0}
.modal-game .embedded-game{flex:1;min-height:0;height:100%;width:100%;border:0;border-radius:0}
.modal-game [data-game-message]{flex:none;margin:0;padding:10px 14px;background:#fff8e5;padding-bottom:max(10px,env(safe-area-inset-bottom))}
main,.card,.course-body,.news-body,.record-card>div,.library-card>div{min-width:0}
.record-card,.library-card,.notification-item,.module-card,.result-score{overflow-wrap:anywhere}
.filter-row,.tabs,.builder-actions,.form-actions,.hero-actions{flex-wrap:wrap}
@media(max-width:600px){
  input,select,textarea{font-size:16px}
  .modal-backdrop:not(.game-backdrop){padding:10px}
  .modal:not(.modal-game){max-height:calc(100dvh - 20px);padding:22px 16px}
  .modal:not(.modal-game) h2{padding-right:34px}
  .top-actions{gap:8px}
  .filter-row>*{max-width:100%}
  .form-actions>button,.builder-actions>button{flex:1;min-width:0;white-space:normal}
  .record-actions{flex-wrap:wrap}
  .hero-dashboard,.bellum-banner,.exam-card{padding:20px}
  .ranking-panel{overflow-x:auto}
}
@media(max-width:360px){main{padding:12px}.podium-place strong{overflow-wrap:anywhere}.login-panel{padding:24px 16px}}

.password-wrap input{padding-right:86px;min-width:0;width:100%}.password-wrap .icon-button{min-width:70px}.password-feedback{font-size:.8rem;margin:0;color:var(--muted);overflow-wrap:anywhere}

.import-validation{padding:1rem;background:#f4f7fc;border-radius:12px;margin-top:1rem}.import-errors{border:1px solid #ce4f4f}.import-errors ol{max-height:320px;overflow:auto;padding-left:1.4rem;overflow-wrap:anywhere}.import-errors li{margin:.5rem 0}

.bank-workspace-head{margin-bottom:24px;padding-bottom:20px;border-bottom:1px solid #dbe3ed}.bank-workspace-head p{line-height:1.6;color:#526179}.bank-workspace-head h2{margin-top:0}.record-actions{flex-wrap:wrap}


/* Official identity, motion and responsive navigation. */
@keyframes agora-reveal{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes agora-logo{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
.login-card,.brand-lockup{animation:agora-reveal .55s cubic-bezier(.2,.7,.3,1) both}
.brand-seal,.mobile-brand img{animation:agora-logo .65s ease-out both}
.brand-seal{width:112px;height:112px;flex:none}.side-brand img{width:54px;height:54px;flex:none}.mobile-brand img{width:68px;height:68px}
#app-view{animation:agora-shell-reveal .4s ease-out both;grid-template-rows:76px auto 1fr}
#main-content{grid-row:3}#main-content>.page{animation:agora-reveal .28s ease-out both}
.modal:not(.modal-game){animation:agora-reveal .2s ease-out both}
.primary-button,.secondary-button,.danger-button,.sidebar a{transition:background-color .18s,border-color .18s,box-shadow .18s,transform .18s}
.primary-button:active,.secondary-button:active{transform:translateY(1px)}
:focus-visible{outline:3px solid var(--cyan);outline-offset:3px}
.sidebar{height:100dvh;overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(22px,env(safe-area-inset-bottom));scrollbar-width:thin}
.sidebar nav{flex-shrink:0}.side-footer{flex-shrink:0}
.navigation-backdrop{display:none;position:fixed;inset:0;border:0;background:rgba(4,19,45,.5);z-index:19}
.preview-toggle{font-size:.76rem;min-height:40px;padding:8px 12px;max-width:180px;line-height:1.2}
.participant-preview-banner{grid-column:2;grid-row:2;background:#e9f3fb;border-bottom:1px solid #bad7ed;padding:10px 30px;display:flex;gap:12px;justify-content:space-between;align-items:center;font-size:.8rem}
.participant-preview-banner button{flex-shrink:0}
body.navigation-open{overflow:hidden}
.page-head>div,.record-card>div,.library-card>div,.profile-card,.course-card,.news-card,.metric-card,.panel-title>div{min-width:0}
.page-head,.panel-title,.record-actions,.profile-actions,.form-actions,.hero-actions{flex-wrap:wrap}
.record-actions{justify-content:flex-end}.record-actions button,.profile-actions button{white-space:normal;height:auto;min-height:44px;padding:8px 12px}
.course-grid,.library-grid,.news-grid{min-width:0}.course-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
h1,h2,h3,p,a,small,strong{overflow-wrap:break-word}
img{max-width:100%}.table-scroll{max-width:100%;overscroll-behavior-x:contain}
.modal-backdrop:not(.game-backdrop){overflow-y:auto;overscroll-behavior:contain}.modal:not(.modal-game){max-width:100%;max-height:calc(100dvh - 40px);overflow-y:auto}
.top-actions,.top-title{min-width:0}.profile-chip strong{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:761px) and (max-width:1050px){
 .login-shell{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.login-brand{padding:36px 28px}.login-panel{padding:32px 24px}.brand-lockup{gap:14px}.brand-lockup h1{font-size:3rem}.brand-seal{width:88px;height:88px}
 .topbar{padding:0 18px}.top-title strong{font-size:1rem}.profile-chip>span:last-child{display:none}
 .course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
 #app-view{display:block}.navigation-backdrop:not([hidden]){display:block}.sidebar{width:min(300px,calc(100vw - 48px));transition:transform .25s cubic-bezier(.2,.7,.3,1)}
 .topbar{height:auto;min-height:68px;gap:8px;padding:calc(8px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))}
 .top-actions{gap:8px}.menu-button,.notification-button,.profile-chip{min-width:44px;min-height:44px}.preview-toggle{font-size:.7rem;max-width:126px;padding:8px}
 .participant-preview-banner{padding:10px 14px;flex-wrap:wrap;gap:8px}.participant-preview-banner button{min-height:40px}
 .login-panel{min-height:100dvh;padding-top:max(28px,env(safe-area-inset-top));padding-bottom:max(28px,env(safe-area-inset-bottom))}
 .mobile-brand{margin-bottom:28px}.login-card input,.modal input,.modal select,.modal textarea{font-size:16px}
 .course-grid{grid-template-columns:1fr}.page-head .builder-actions,.profile-actions{margin-top:14px}
 .hero-actions{gap:10px}.hero-actions button{max-width:100%}
 .record-actions{justify-content:flex-start;width:100%}.record-actions button{flex:1 1 130px}
 .library-card{padding:16px;gap:12px}.library-card a{white-space:normal;text-align:center}
 .admin-side{padding:12px}.admin-nav button{text-align:left;min-height:44px;white-space:normal}
 .ranking-table{min-width:480px}.table-scroll .ranking-table th,.table-scroll .ranking-table td{display:table-cell!important}
 .exam-status{min-width:0}.form-actions button{flex:1;min-width:0}
 main{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){.top-actions{gap:5px}.preview-toggle{max-width:104px}.library-card{grid-template-columns:1fr}.empty-state{padding:24px 12px}.hero-dashboard,.bellum-banner,.exam-card{padding:18px}.brand-lockup{gap:12px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}

/* Opacity only: a transformed shell contains fixed navigation and makes it scroll. */
@keyframes agora-shell-reveal{from{opacity:0}to{opacity:1}}
.library-cover{width:68px;height:96px;object-fit:cover;border-radius:8px}.library-cover-link{display:block;font-size:.7rem;overflow-wrap:anywhere}.library-cover-fallback[hidden]{display:none!important}
@media(max-width:600px){.library-cover{width:48px;height:68px}}


.notification-button.streak-unread { position: relative; }
.notification-button.streak-unread::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #d51226;
  border: 2px solid #fff;
  border-radius: 50%;
}
[data-streak-push-panel]:not(:empty) { margin-top: 1rem; }

[data-streak-home]:not(:empty) { margin: 0 0 1rem; }
[data-action="install-agora"][hidden] { display: none; }
