:root{
    --system-night:#0f172a;
    --system-night-soft:#1e293b;
    --system-bg:#f1f5f9;
    --system-surface:#fff;
    --system-text:#1e293b;
    --system-muted:#64748b;
    --system-line:#e2e8f0;
    --system-cyan:#06b6d4;
    --system-cyan-dark:#0891b2;
    --system-green:#10b981;
    --system-yellow:#f59e0b;
    --system-pink:#ec4899;
}

/* Login administrativo */
body.system-login-page{background:var(--system-bg);font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.system-login-page .login-wrap{display:grid;grid-template-columns:minmax(360px,44%) minmax(420px,56%);min-height:100vh;padding:0;background:var(--system-bg)}
.system-login-page .login-presentation{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;padding:52px;color:#fff;background:linear-gradient(150deg,var(--system-night),#14243d 68%,#0e7490)}
.system-login-page .login-presentation:before,.system-login-page .login-presentation:after{position:absolute;border:1px solid rgba(255,255,255,.08);border-radius:50%;content:''}
.system-login-page .login-presentation:before{top:-120px;right:-130px;width:390px;height:390px}.system-login-page .login-presentation:after{bottom:-130px;left:-110px;width:300px;height:300px}
.system-login-page .login-presentation-mark{position:relative;z-index:1;display:flex;width:56px;height:56px;align-items:center;justify-content:center;border-radius:14px;background:linear-gradient(135deg,var(--system-cyan),var(--system-cyan-dark));font-weight:800;box-shadow:0 14px 34px rgba(6,182,212,.28)}
.system-login-page .login-presentation>div{position:relative;z-index:1}.system-login-page .login-presentation-kicker{color:#67e8f9;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.system-login-page .login-presentation h1{max-width:540px;margin:18px 0 14px;font-size:clamp(34px,4vw,54px);font-weight:750;line-height:1.04;letter-spacing:-.05em}
.system-login-page .login-presentation p{max-width:560px;margin:0;color:#cbd5e1;font-size:15px;line-height:1.7}
.system-login-page .login-presentation-pills{display:flex;gap:8px;flex-wrap:wrap}.system-login-page .login-presentation-pills span{padding:7px 10px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.06);color:#cbd5e1;font-size:10px;font-weight:650}
.system-login-page .login-card{align-self:center;justify-self:center;width:calc(100% - 40px);max-width:440px;margin:30px;border:1px solid var(--system-line);border-radius:20px;box-shadow:0 24px 60px rgba(15,23,42,.12)}
.system-login-page .login-card:before{background:linear-gradient(135deg,var(--system-cyan),var(--system-cyan-dark));box-shadow:0 8px 20px rgba(6,182,212,.25)}
.system-login-page .login-card .btn-primary{background:var(--system-cyan-dark);border-color:var(--system-cyan-dark)}
.system-login-page .login-card .btn-primary:hover{background:#0e7490;border-color:#0e7490}
.system-login-page .login-card .form-control:focus{border-color:var(--system-cyan);box-shadow:0 0 0 3px rgba(6,182,212,.13)}

/* Login e portal do colaborador */
body.system-portal-login{--primary:var(--system-cyan);--primary-dark:var(--system-night);--bg:var(--system-bg);--text:var(--system-text);--text-muted:var(--system-muted);min-height:100vh;background:radial-gradient(circle at 20% 10%,rgba(6,182,212,.16),transparent 28%),linear-gradient(145deg,var(--system-night) 0,var(--system-night) 32%,var(--system-bg) 32%)}
.system-portal-login .login-card{border-radius:20px;border-color:var(--system-line);box-shadow:0 24px 60px rgba(15,23,42,.16)}
.system-portal-login .login-logo{background:linear-gradient(135deg,var(--system-cyan),var(--system-cyan-dark));box-shadow:0 10px 24px rgba(6,182,212,.26)}
.system-portal-login .form-input:focus{border-color:var(--system-cyan);box-shadow:0 0 0 3px rgba(6,182,212,.13)}
.system-portal-login .btn-primary{background:var(--system-cyan-dark)}
body.system-portal-theme{--primary:var(--system-cyan);--primary-dark:var(--system-night);--bg-body:var(--system-bg);--bg-card:#fff;--text-main:var(--system-text);--text-muted:var(--system-muted);--border:var(--system-line)}
.system-portal-theme .portal-topbar{background:rgba(255,255,255,.94);border-bottom:1px solid var(--system-line)}
.system-portal-theme .portal-brand-mark{background:linear-gradient(135deg,var(--system-cyan),var(--system-cyan-dark))}
.system-portal-theme .portal-hero{background:linear-gradient(135deg,var(--system-night),#17324f 62%,var(--system-cyan-dark))}
.system-portal-theme .portal-card,.system-portal-theme .portal-function-sheet,.system-portal-theme .portal-access-item,.system-portal-theme .portal-presence-row{border-radius:12px;box-shadow:0 4px 9px rgba(15,23,42,.04)}
.system-portal-theme .portal-kpi{overflow:hidden;border:0;color:#fff;box-shadow:0 10px 22px -9px rgba(15,23,42,.35)}
.system-portal-theme .portal-kpi:nth-child(1){background:linear-gradient(135deg,var(--system-cyan),var(--system-cyan-dark))}
.system-portal-theme .portal-kpi:nth-child(2){background:linear-gradient(135deg,var(--system-green),#059669)}
.system-portal-theme .portal-kpi:nth-child(3){background:linear-gradient(135deg,var(--system-yellow),#d97706)}
.system-portal-theme .portal-kpi:nth-child(4){background:linear-gradient(135deg,var(--system-pink),#db2777)}
.system-portal-theme .portal-kpi span,.system-portal-theme .portal-kpi strong,.system-portal-theme .portal-kpi small{color:#fff}.system-portal-theme .portal-kpi small{opacity:.8}
.system-portal-theme .portal-button.primary{background:var(--system-cyan-dark);box-shadow:0 5px 14px rgba(8,145,178,.24)}
.system-portal-theme .portal-bottom-nav a.active{color:#0e7490;background:#ecfeff}

/* Cadastro público */
body.system-public-registration{--blue:var(--system-cyan-dark);--blue2:var(--system-night);--ink:var(--system-text);--muted:var(--system-muted);--line:var(--system-line);--bg:var(--system-bg);background:var(--system-bg)}
.system-public-registration .top{padding:26px;border-radius:16px;color:#fff;background:linear-gradient(135deg,var(--system-night),#17324f 68%,var(--system-cyan-dark));box-shadow:0 18px 45px rgba(15,23,42,.16)}
.system-public-registration .top-text p{color:#cbd5e1}.system-public-registration .logo{padding:8px;border-radius:12px;background:#fff}
.system-public-registration .card{border-color:var(--system-line);border-radius:14px;box-shadow:0 6px 18px rgba(15,23,42,.055)}
.system-public-registration input:focus,.system-public-registration select:focus,.system-public-registration textarea:focus{border-color:var(--system-cyan);box-shadow:0 0 0 3px rgba(6,182,212,.12)}
.system-public-registration .submit{background:linear-gradient(135deg,var(--system-cyan),var(--system-cyan-dark))}

/* Cadastro facial e telas auxiliares do portal */
body.system-face-registration{background:var(--system-bg);color:var(--system-text);font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.system-face-registration .page-card{border:1px solid var(--system-line);border-radius:14px;box-shadow:0 16px 40px rgba(15,23,42,.09)}
.system-face-registration .video-box,.system-face-registration .preview-box{border-radius:14px;background:var(--system-night)}
.system-face-registration .btn-primary{background:var(--system-cyan-dark);border-color:var(--system-cyan-dark)}
.system-face-registration .badge-soft{background:#ecfeff;color:#0e7490}
body.system-portal-sheet,body.system-portal-face{--primary:var(--system-cyan-dark);--bg:var(--system-bg);--text:var(--system-text);--text-muted:var(--system-muted);--white:#fff;--border:var(--system-line);background:var(--system-bg)}
.system-portal-sheet .app-header,.system-portal-face .app-header{color:#fff;background:var(--system-night);border-bottom:1px solid rgba(255,255,255,.08)}
.system-portal-sheet .app-header small,.system-portal-face .app-header small,.system-portal-sheet .back-btn,.system-portal-face .back-btn{color:#cbd5e1}
.system-portal-sheet .brand-mark,.system-portal-face .brand-mark{background:linear-gradient(135deg,var(--system-cyan),var(--system-cyan-dark))}
.system-portal-sheet .toolbar,.system-portal-sheet .sheet-card,.system-portal-face .card,.system-portal-face .grade-card{border-radius:12px;border-color:var(--system-line);box-shadow:0 5px 15px rgba(15,23,42,.05)}
.system-portal-sheet .btn-primary,.system-portal-face .btn-primary{background:var(--system-cyan-dark)}

body.system-diagnostic-page{min-height:100vh;margin:0;padding:32px 18px;background:linear-gradient(150deg,var(--system-night) 0 260px,var(--system-bg) 260px 100%);color:var(--system-text);font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
body.system-diagnostic-page .box{max-width:900px;margin:30px auto;padding:30px;border:1px solid var(--system-line);border-radius:22px;background:#fff;box-shadow:0 24px 60px rgba(15,23,42,.18)}
body.system-diagnostic-page h1{margin-top:0;color:var(--system-night);font-size:clamp(26px,4vw,40px);letter-spacing:-.04em}
body.system-diagnostic-page .row{border-color:#e7edf4}
body.system-diagnostic-page .btn{background:var(--system-cyan);color:#06263a;font-weight:800}

@media(max-width:820px){
    .system-login-page .login-wrap{grid-template-columns:1fr;padding:20px}.system-login-page .login-presentation{display:none}.system-login-page .login-card{width:100%;margin:auto}
    body.system-portal-login{background:radial-gradient(circle at 50% 0,rgba(6,182,212,.18),transparent 34%),var(--system-bg)}
}
@media(max-width:560px){.system-public-registration .top{align-items:flex-start;flex-direction:column;padding:20px}.system-public-registration .logo{max-width:150px}}
