:root {
    --brand-sky: #38bdf8;
    --brand-indigo: #6366f1;
    --brand-violet: #a855f7;
    --brand-cyan: #37d8ce;
    --brand-ink: #07101f;
    --brand-panel: #101c32;
    --brand-panel-strong: #14243e;
    --brand-line: rgba(134, 170, 220, .2);
    --brand-glow: 0 24px 70px rgba(1, 8, 22, .42);
}

html { color-scheme: dark; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(circle at 84% 5%, rgba(99, 102, 241, .19), transparent 34%),
        radial-gradient(circle at 18% 88%, rgba(56, 189, 248, .11), transparent 35%),
        linear-gradient(145deg, #050914, #071225 52%, #07182b);
}

.side-brand { height: 82px; padding: 0 20px; }
.side-brand img { display: block; width: 184px; max-width: 100%; height: auto; }
.sidebar {
    background: linear-gradient(180deg, rgba(25, 42, 68, .98), rgba(13, 25, 44, .99));
    box-shadow: 18px 0 55px rgba(0, 0, 0, .16);
}
.side-user { background: rgba(255, 255, 255, .015); }
.side-avatar {
    background: linear-gradient(135deg, var(--brand-sky), var(--brand-indigo) 58%, var(--brand-violet));
    color: #fff;
    box-shadow: 0 10px 24px rgba(56, 189, 248, .2);
}
.side-nav a.active {
    background: linear-gradient(90deg, rgba(56, 189, 248, .18), rgba(99, 102, 241, .1));
    box-shadow: inset 2px 0 var(--brand-sky);
}
.app-topbar { box-shadow: 0 15px 42px rgba(0, 0, 0, .13); }
.app-topbar::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, .38), rgba(168, 85, 247, .23), transparent);
}
.page-title h1 { max-width: 900px; }
.metric, .admin-card {
    border-color: var(--brand-line);
    box-shadow: var(--brand-glow);
}
.metric::after {
    content: "";
    position: absolute;
    width: 92px;
    height: 92px;
    right: -36px;
    bottom: -42px;
    border-radius: 50%;
    background: rgba(56, 189, 248, .08);
}
.card-heading {
    background: linear-gradient(90deg, rgba(56, 189, 248, .16), rgba(99, 102, 241, .11), rgba(168, 85, 247, .06));
}
.card-heading a, .table-action { color: #78d9ff !important; }
button {
    background: linear-gradient(135deg, var(--brand-sky), var(--brand-indigo)) !important;
    color: #fff !important;
}
.role-badge, .top-role { border: 1px solid rgba(56, 189, 248, .28); }
.sidebar-backdrop { display: none; }
.mobile-menu {
    width: 42px !important;
    height: 42px;
    border: 1px solid rgba(125, 171, 226, .2) !important;
    border-radius: 11px !important;
    place-content: center;
    gap: 4px;
}
.mobile-menu span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #dceaff; }

.auth-page {
    min-height: 100vh;
    padding: 36px;
    background: transparent !important;
}
.auth-layout {
    width: min(100%, 1030px);
    display: grid;
    grid-template-columns: minmax(300px, .92fr) minmax(390px, 1.08fr);
    border: 1px solid var(--brand-line);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(8, 17, 34, .72);
    box-shadow: 0 36px 100px rgba(0, 0, 0, .46);
    backdrop-filter: blur(20px);
}
.auth-showcase {
    position: relative;
    min-height: 610px;
    padding: 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 12%, rgba(56, 189, 248, .22), transparent 33%),
        radial-gradient(circle at 88% 78%, rgba(168, 85, 247, .2), transparent 36%),
        linear-gradient(155deg, #132541, #0a172c 65%, #0c1023);
}
.auth-showcase::before, .auth-showcase::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(107, 205, 255, .15);
    border-radius: 50%;
}
.auth-showcase::before { width: 340px; height: 340px; top: -170px; right: -140px; }
.auth-showcase::after { width: 240px; height: 240px; bottom: -125px; left: -100px; }
.auth-logo { position: relative; z-index: 1; width: min(100%, 270px); height: auto; }
.auth-copy { position: relative; z-index: 1; }
.auth-kicker { margin: 0 0 14px; color: #7ee7ff; font-size: 11px; font-weight: 850; letter-spacing: .17em; }
.auth-copy h2 { max-width: 420px; margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.03; letter-spacing: -.05em; }
.auth-copy p { max-width: 410px; margin: 19px 0 0; color: #a7bddc; line-height: 1.7; }
.security-points { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.security-points span { padding: 8px 10px; border: 1px solid rgba(125, 199, 255, .18); border-radius: 999px; background: rgba(7, 16, 33, .5); color: #bcd1ed; font-size: 11px; font-weight: 700; }
.auth-panel { display: grid; place-items: center; padding: 48px; }
.auth-panel .auth-card {
    width: min(100%, 430px);
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}
.auth-panel .auth-card::before { display: none; }
.auth-icon { width: 48px; height: 48px; filter: drop-shadow(0 13px 22px rgba(99, 102, 241, .28)); }
.auth-card h1 { margin-top: 22px; font-size: 31px; }
.auth-card > p { line-height: 1.6; }
.auth-card label { margin: 17px 0; }
.auth-card input { min-height: 50px; padding: 13px 14px; }
.auth-card button { min-height: 49px; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 19px !important; font-size: 13px; }
.auth-links a { color: #78d9ff; }
.auth-trust { color: #7890b3; font-size: 11px; }

@media (max-width: 840px) {
    .auth-page { padding: 18px; }
    .auth-layout { grid-template-columns: 1fr; max-width: 560px; }
    .auth-showcase { min-height: 235px; padding: 30px; }
    .auth-copy h2 { font-size: 31px; }
    .auth-copy p, .security-points { display: none; }
    .auth-panel { padding: 36px 30px 40px; }
}

@media (max-width: 760px) {
    .sidebar { transition: transform .24s ease, box-shadow .24s ease; }
    .menu-open .sidebar { transform: translateX(0); box-shadow: 25px 0 70px rgba(0, 0, 0, .48); }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 25;
        width: 100%;
        height: 100%;
        margin: 0;
        border: 0;
        border-radius: 0 !important;
        background: rgba(2, 7, 17, .68) !important;
        box-shadow: none;
        backdrop-filter: blur(3px);
    }
    .menu-open .sidebar-backdrop { display: block; }
    .mobile-menu { display: grid; }
    .app-topbar > div:nth-of-type(1) { flex: 1; margin-left: 12px; }
}

@media (max-width: 480px) {
    .auth-layout { border-radius: 20px; }
    .auth-showcase { min-height: 190px; padding: 25px; }
    .auth-logo { width: 220px; }
    .auth-copy h2 { font-size: 25px; }
    .auth-panel { padding: 30px 23px 34px; }
    .auth-card h1 { font-size: 27px; }
    .auth-links { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
