html, body {
    margin: 0;
    background: #0b0f14;
}

/* Slim dark scrollbars to match the SCADA skin */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0f14; }
::-webkit-scrollbar-thumb { background: #2a3340; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a465a; }

code {
    font-family: "Cascadia Mono", Consolas, monospace;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ============================ Roles page (modern) ============================ */
.roles-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px;
    background: linear-gradient(135deg, rgba(124,58,237,.16), rgba(79,70,229,.05));
    border: 1px solid rgba(255,255,255,.08); }
.roles-hero-badge { width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, #7c3aed, #4f46e5); box-shadow: 0 8px 20px rgba(79,70,229,.35); }
.roles-hero-badge .mud-icon-root { font-size: 1.6rem; }
.roles-hero-title { font-weight: 700; }

.stat-card { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px;
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); }
.stat-icon { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; }
.stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: .72rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; }

.role-card { border-radius: 18px; overflow: hidden; height: 100%; background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.role-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,.45); border-color: rgba(255,255,255,.16); }
.role-accent { position: relative; height: 62px; }
.role-avatar { position: absolute; left: 18px; bottom: -22px; width: 52px; height: 52px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: rgba(12,16,22,.9); border: 3px solid #10151d; box-shadow: 0 6px 16px rgba(0,0,0,.45); }
.role-avatar .mud-icon-root { font-size: 1.5rem; }
.role-menu { position: absolute; top: 8px; right: 6px; }
.role-menu .mud-icon-button { color: rgba(255,255,255,.92); }
.role-body { padding: 30px 18px 18px; }
.role-tag { font-size: .62rem; font-weight: 800; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px;
    color: #fbbf24; background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.35); }
.perm-pill { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }

/* ============================================================================
   Modern split-screen sign-in
   ============================================================================ */
.auth { position: fixed; inset: 0; z-index: 20; display: flex; overflow: auto;
    background: #0a1120; color: #e6edf6; font-family: 'Inter','Segoe UI',sans-serif; }

.auth-hero { position: relative; flex: 1.05; display: none; flex-direction: column; justify-content: space-between;
    padding: 52px 56px; overflow: hidden;
    background:
        radial-gradient(1100px 680px at 16% 6%, rgba(59,130,246,.24), transparent 60%),
        radial-gradient(920px 700px at 96% 100%, rgba(124,58,237,.30), transparent 55%),
        linear-gradient(140deg, #10233f 0%, #0a1120 66%); }
.auth-hero::after { content: ""; position: absolute; inset: 0; opacity: .5;
    background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(circle at 28% 26%, #000, transparent 72%);
            mask-image: radial-gradient(circle at 28% 26%, #000, transparent 72%); }
.auth-hero-in { position: relative; z-index: 1; max-width: 440px; }
.auth-eyebrow { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #7cb6ff; font-weight: 700; }
.auth-hero h1 { font-size: 42px; line-height: 1.08; font-weight: 800; letter-spacing: .4px; margin: 16px 0 12px; }
.auth-hero .lead { font-size: 16px; line-height: 1.65; color: #b6c2d4; margin: 0 0 32px; }
.auth-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 15px; }
.auth-feats li { display: flex; align-items: center; gap: 13px; font-size: 14.5px; color: #dbe4f0; }
.auth-feats .fic { width: 36px; height: 36px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center;
    background: rgba(59,130,246,.16); color: #7cb6ff; border: 1px solid rgba(59,130,246,.26); }
.auth-foot { position: relative; z-index: 1; align-self: flex-start;
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 12px; font-weight: 500; letter-spacing: .3px; color: #a7b6ca;
    padding: 8px 15px; border-radius: 999px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.11);
    -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
    box-shadow: 0 12px 28px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.06); }
.auth-foot::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
    background: #7cb6ff; box-shadow: 0 0 9px #7cb6ff; }

.auth-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 36px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-logo { width: 60px; height: 60px; border-radius: 18px; flex: none; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #6d28d9); color: #eaf2ff; box-shadow: 0 14px 34px rgba(59,130,246,.42); }
.auth-logo .mud-icon-root { font-size: 34px; }
.auth-brandline { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.auth-brandline .n { font-size: 20px; font-weight: 800; letter-spacing: .3px; line-height: 1.1; }
.auth-brandline .s { font-size: 12px; color: #8a97ab; }
.auth-card h2 { font-size: 27px; font-weight: 800; margin: 0 0 6px; }
.auth-card .sub { font-size: 14px; color: #8a97ab; margin: 0 0 28px; }
.auth-btn.mud-button-root { height: 52px; border-radius: 14px; font-size: 15px; font-weight: 700; text-transform: none;
    color: #ffffff; background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 12px 30px rgba(34,197,94,.34); }
.auth-btn.mud-button-root:hover { background: linear-gradient(135deg, #2fd06b, #15903f); box-shadow: 0 14px 34px rgba(34,197,94,.44); }
.auth-hint { display: flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; margin: 26px auto 0;
    font-size: 12px; font-weight: 500; letter-spacing: .2px; color: #8ea0b8;
    padding: 8px 16px; border-radius: 999px;
    background: rgba(34,197,94,.09); border: 1px solid rgba(34,197,94,.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.auth-hint .mud-icon-root { font-size: 16px; color: #22c55e; }
.auth-card .mud-input.mud-input-outlined .mud-input-outlined-border { border-radius: 13px; }

@media (min-width: 900px) { .auth-hero { display: flex; } .auth-brandline { display: none; } }
