:root{--navy:#062c44;--blue:#087df0;--cyan:#08b9d5;--green:#35d58d;--ink:#0b2e45;--muted:#688295;--line:#d9e6ee;--page:#f2f8fc}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--page);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}a{color:var(--blue)}button,input,select,textarea{font:inherit}.auth{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 15% 20%,#087df044,transparent 30%),radial-gradient(circle at 85% 80%,#35d58d33,transparent 30%),linear-gradient(145deg,#02131e,#06344b)}.auth main{width:min(450px,100%);padding:34px;border-radius:24px;background:#fff;box-shadow:0 28px 90px #0005}.auth img,.brand img{display:block;width:170px;height:auto;margin:auto}.auth form,form{display:grid;gap:15px;margin:22px 0}.auth-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:4px}.auth-links a{display:grid;place-items:center;min-height:42px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;text-align:center;text-decoration:none;font-size:.88rem;font-weight:700}.auth-links a:hover{border-color:var(--cyan);background:#eefaff}label{display:grid;gap:6px;font-size:.78rem;font-weight:750}input,select,textarea{width:100%;padding:12px;border:1px solid var(--line);border-radius:11px}button,.button{display:inline-block;border:0;border-radius:11px;padding:12px 17px;color:#fff;background:linear-gradient(110deg,var(--blue),var(--cyan));font-weight:800;text-decoration:none;cursor:pointer}.tag{color:var(--blue);font-size:.68rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase}.alert,.success,.notice,.result{padding:14px;border-radius:11px;background:#eaf5fc}.alert{color:#931d2b;background:#ffe8eb}.success,.result{color:#075c40;background:#def7ea}aside{position:fixed;inset:0 auto 0 0;z-index:20;width:255px;display:flex;flex-direction:column;padding:22px 16px;color:#d8edf6;background:linear-gradient(180deg,#052e47,#041f31 65%,#063742)}.brand{padding:9px;border-radius:14px;background:#fff}.client{display:grid;gap:4px;margin:19px 4px;padding:12px;border:1px solid #ffffff22;border-radius:12px}.client small{color:#8fb5c5}aside nav{display:grid;gap:4px}aside nav a{display:flex;gap:11px;padding:10px 12px;border-radius:10px;color:#bed9e5;text-decoration:none;font-weight:680;font-size:.84rem}aside nav a span{width:20px;color:#5ee1ec}aside nav a:hover,aside nav a.active{color:#fff;background:linear-gradient(90deg,#087df04d,#08b9d522)}.logout{margin-top:auto;padding:12px;color:#a8cad6;text-decoration:none}.shell{margin-left:255px;min-height:100vh}.shell>header{height:86px;display:flex;align-items:center;justify-content:space-between;padding:0 30px;border-bottom:1px solid var(--line);background:#fff}.shell>header h1{margin:2px 0;font-size:1.25rem}.shell>header small,small,.empty{color:var(--muted)}[data-menu]{display:none;background:none;color:var(--ink);font-size:1.3rem}.person{display:flex;align-items:center;gap:10px}.person b,.guardian>b{display:grid;place-items:center;border-radius:12px;color:#fff;background:linear-gradient(135deg,var(--navy),var(--blue),var(--cyan));font-weight:850}.person b{width:40px;height:40px}.shell>main{max-width:1400px;margin:auto;padding:27px}.hero{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:20px;padding:27px;border-radius:19px;color:#fff;background:linear-gradient(120deg,var(--navy),#075b75)}.hero h2{margin:5px 0;font-size:1.9rem}.hero p:not(.tag){color:#c5e1eb}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:19px}.metrics article,.panel{border:1px solid var(--line);border-radius:17px;background:#fff;box-shadow:0 10px 32px #09364f0d}.metrics article{display:grid;gap:6px;padding:19px}.metrics strong{font-size:1.15rem}.metrics span{color:var(--muted);font-size:.74rem}.panel{padding:22px;margin-bottom:19px}.head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.head h2,.panel>h2{margin:0}.row{display:flex;align-items:center;gap:12px;padding:13px;border-top:1px solid #e7eef3}.row div{display:grid;gap:3px;flex:1}.row>strong{flex:1}.row span{color:var(--muted);font-size:.75rem}.row i{width:9px;height:9px;border-radius:50%;background:#799eaf}.row i.high{background:#ec9a28}.row i.critical{background:#df3850;box-shadow:0 0 0 5px #ffe8eb}.row i.low{background:#35b87e}.doc>b{padding:7px;border-radius:7px;color:#fff;background:var(--navy);font-size:.65rem}.grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.wide{grid-column:1/-1}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:17px}dl{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}dl div{padding:14px;border:1px solid var(--line);border-radius:11px}dt{color:var(--muted);font-size:.7rem}dd{margin:4px 0 0;font-weight:750}.survey fieldset{padding:15px;border:1px solid var(--line);border-radius:12px}.survey legend{font-weight:750}.survey fieldset label{display:inline-flex;margin:11px 20px 0 0;font-weight:500}.result{display:grid;gap:5px}.warn{color:#755000;background:#fff1cf}.guardian{display:flex;align-items:center;gap:20px}.guardian>b{width:72px;height:72px;font-size:1.3rem}.guardian div{display:grid;gap:5px}.guardian h2{margin:0}@media(max-width:980px){.metrics{grid-template-columns:1fr 1fr}dl{grid-template-columns:1fr 1fr}}@media(max-width:750px){aside{transform:translateX(-103%);transition:.2s}aside.open{transform:none}.shell{margin-left:0}.shell>header{padding:0 15px}[data-menu]{display:none}.person span{display:none}.shell>main{padding:15px}.hero{align-items:flex-start;flex-direction:column;padding:21px}.metrics,.twocol,.grid,dl{grid-template-columns:1fr}.wide{grid-column:auto}.panel{padding:17px}.survey fieldset label{display:flex}}@media(max-width:460px){.auth-links{grid-template-columns:1fr}}

/* Zwarty, skalowalny układ panelu klienta. */
body:not(.auth){min-height:100vh;overflow-x:hidden}
body:not(.auth) aside{width:220px;padding:15px 12px}
body:not(.auth) .brand{padding:7px}
body:not(.auth) .brand img{width:150px}
body:not(.auth) .client{margin:12px 3px;padding:10px}
body:not(.auth) aside nav{gap:2px}
body:not(.auth) aside nav a{gap:8px;padding:8px 10px;font-size:.73rem}
body:not(.auth) .shell{min-width:0;margin-left:220px}
body:not(.auth) .shell>header{height:72px;padding:0 20px}
body:not(.auth) .shell>main{width:100%;max-width:none;min-width:0;padding:18px}
body:not(.auth) .shell>main>*,body:not(.auth) .panel,body:not(.auth) .grid>*,body:not(.auth) .twocol>*{min-width:0;max-width:100%}
body:not(.auth) .hero{padding:20px}
body:not(.auth) .metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}
body:not(.auth) .metrics article{min-width:0;padding:15px}
body:not(.auth) .grid,body:not(.auth) .twocol{grid-template-columns:repeat(2,minmax(0,1fr))}
body:not(.auth) dl{grid-template-columns:repeat(3,minmax(0,1fr))}
body:not(.auth) .panel{padding:18px}
@media(min-width:751px) and (max-width:1200px){
 body:not(.auth) aside{width:190px}
 body:not(.auth) .shell{margin-left:190px}
 body:not(.auth) .shell>main{padding:14px}
 body:not(.auth) .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 body:not(.auth) .grid,body:not(.auth) .twocol,body:not(.auth) dl{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:750px){
 body:not(.auth) aside{width:min(280px,86vw);padding:14px 12px}
 body:not(.auth) .shell{margin-left:0}
 body:not(.auth) .shell>main{padding:12px}
 body:not(.auth) .metrics,body:not(.auth) .grid,body:not(.auth) .twocol,body:not(.auth) dl{grid-template-columns:1fr}
 body:not(.auth) .head,body:not(.auth) .row{align-items:flex-start;flex-wrap:wrap}
}
.skip-link{position:fixed;left:12px;top:8px;z-index:200;translate:0 -150%;padding:10px 14px;border-radius:9px;color:#fff;background:var(--navy);font-weight:800}.skip-link:focus{translate:0}.nav-group{display:grid;gap:2px;padding:7px 0;border-top:1px solid #ffffff17}.nav-group>small{padding:3px 12px;color:#7faabb;font-size:.58rem;font-weight:850;letter-spacing:.09em;text-transform:uppercase}aside nav a.nav-primary{margin:2px 0;color:#fff;background:linear-gradient(110deg,var(--blue),var(--cyan))}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #55ddea;outline-offset:3px}
@media(max-width:750px){[data-menu]{display:block}}

/* Samodzielny stan logowania: komunikaty i działania pomocnicze pozostają
   czytelne także wtedy, gdy magazyn sesji jest chwilowo niedostępny. */
.auth .alert{display:grid;gap:5px}
.auth .alert strong{font-size:.88rem;line-height:1.45}
.auth .alert small{font-size:.7rem}
.auth button:disabled{cursor:not-allowed;filter:grayscale(.4);opacity:.6}
.auth-retry{display:block;margin:-8px 0 13px;text-align:center;font-weight:750}
.auth-security-note{margin:18px 0 0;color:var(--muted);font-size:.7rem;line-height:1.55;text-align:center}

/* Kompaktowe i spójne widoki uwierzytelniania. */
.auth main{width:min(390px,100%);padding:28px;border-radius:21px}
.auth-logo{display:block;width:max-content;max-width:100%;margin:0 auto 14px;border-radius:12px}
.auth-logo img{width:148px}
.auth .tag{margin:0 0 17px;text-align:center}
.auth h1{margin:0 0 20px;text-align:center;font-size:clamp(1.65rem,7vw,2rem);letter-spacing:-.035em}
.auth form{gap:12px;margin:0}
.auth label{gap:5px}
.auth input{min-height:42px;padding:10px 12px}
.auth form>button{width:100%;min-height:43px}
.auth .alert,.auth .success{margin:0 0 13px;font-size:.8rem;line-height:1.45}
.auth-links{gap:8px;margin-top:13px}
.auth-links a{min-height:40px;padding:8px 9px;font-size:.8rem}
.auth-actions{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:8px}
.auth-actions button,.auth-actions .button{display:grid;place-items:center;min-height:43px;padding:9px 11px;text-align:center;font-size:.76rem}
.button.secondary{border:1px solid var(--line);color:var(--blue);background:#fff}
.button.secondary:hover{border-color:var(--cyan);background:#eefaff}
.auth-compact main{width:min(390px,100%);padding:24px}
.auth-compact .tag{margin-bottom:12px}
.auth-compact h1{margin-bottom:17px}
@media(max-width:430px){.auth{padding:12px}.auth main{padding:24px 18px}.auth-actions{grid-template-columns:1fr}.auth-links{grid-template-columns:1fr}}
