:root {
    --bg: #080b12;
    --bg-soft: #0c111b;
    --panel: rgba(17, 23, 36, 0.78);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #f4f7fb;
    --muted: #8d99aa;
    --accent: #6d7cff;
    --accent-2: #3bd7ff;
    --success: #38d996;
    --danger: #ff6376;
    --input: rgba(255, 255, 255, 0.045);
    --shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 20%, rgba(109, 124, 255, .16), transparent 28%),
        radial-gradient(circle at 82% 75%, rgba(59, 215, 255, .09), transparent 28%),
        linear-gradient(145deg, #070910 0%, #0a0e17 50%, #070a10 100%);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .32;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 38px;
}

.glow {
    position: fixed;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .12;
    pointer-events: none;
}

.glow-one {
    background: var(--accent);
    top: -220px;
    left: -180px;
}

.glow-two {
    background: var(--accent-2);
    right: -250px;
    bottom: -250px;
}

.login-shell {
    width: min(1180px, 100%);
    min-height: 680px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    border: 1px solid var(--panel-border);
    border-radius: 32px;
    overflow: hidden;
    background: rgba(8, 12, 20, .58);
    backdrop-filter: blur(28px);
    box-shadow: var(--shadow);
}

.login-brand {
    position: relative;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.login-brand::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -180px;
    top: 120px;
    border-radius: 50%;
    border: 1px solid rgba(109,124,255,.16);
    box-shadow:
        0 0 0 55px rgba(109,124,255,.025),
        0 0 0 110px rgba(109,124,255,.018);
}

.brand-top,
.brand-main,
.brand-bottom {
    position: relative;
    z-index: 2;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 35px rgba(109,124,255,.3);
}

.brand-main h1 {
    margin: 0;
    max-width: 620px;
    font-size: clamp(50px, 6vw, 82px);
    line-height: .95;
    letter-spacing: -.055em;
}

.brand-main h1 span {
    display: block;
    color: transparent;
    background: linear-gradient(90deg, #ffffff, #8fdfff);
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-main p {
    margin: 28px 0 0;
    max-width: 530px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 16px rgba(56,217,150,.8);
}

.login-side {
    padding: 34px;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.018);
    border-left: 1px solid var(--panel-border);
}

.login-card {
    width: 100%;
    padding: 42px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 26px;
    background: rgba(14, 19, 30, .72);
    box-shadow: 0 24px 70px rgba(0,0,0,.25);
}

.login-card h2 {
    margin: 0;
    font-size: 31px;
    letter-spacing: -.035em;
}

.login-card .subtitle {
    margin: 10px 0 34px;
    color: var(--muted);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin: 0 0 9px;
    color: #c8d0dc;
    font-size: 13px;
    font-weight: 600;
}

.input-wrap {
    position: relative;
}

.form-control {
    width: 100%;
    height: 54px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    outline: none;
    padding: 0 16px;
    color: var(--text);
    background: var(--input);
    font: inherit;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.form-control:hover {
    background: rgba(255,255,255,.06);
}

.form-control:focus {
    border-color: rgba(109,124,255,.7);
    box-shadow: 0 0 0 4px rgba(109,124,255,.10);
}

.password-input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

.password-toggle:hover {
    color: var(--text);
    background: rgba(255,255,255,.05);
}

.login-button {
    width: 100%;
    height: 55px;
    margin-top: 7px;
    border: 0;
    border-radius: 14px;
    color: white;
    background: linear-gradient(100deg, #6374ff, #4778ff);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(71,120,255,.22);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(71,120,255,.3);
    filter: brightness(1.06);
}

.login-button:active {
    transform: translateY(0);
}

.alert {
    margin: 0 0 24px;
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.alert-error {
    color: #ffc5cc;
    border: 1px solid rgba(255,99,118,.22);
    background: rgba(255,99,118,.09);
}

.login-meta {
    margin-top: 28px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: #667286;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

@media (max-width: 850px) {
    .login-page {
        padding: 18px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-brand {
        min-height: 300px;
        padding: 38px;
    }

    .brand-main h1 {
        margin-top: 50px;
        font-size: 50px;
    }

    .brand-main p {
        font-size: 15px;
    }

    .login-side {
        padding: 20px;
        border-left: 0;
        border-top: 1px solid var(--panel-border);
    }

    .login-card {
        padding: 28px;
    }
}

@media (max-width: 500px) {
    .login-page {
        padding: 0;
    }

    .login-shell {
        border: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .login-brand {
        min-height: 260px;
        padding: 28px;
    }

    .brand-main h1 {
        margin-top: 32px;
        font-size: 43px;
    }

    .brand-main p {
        margin-top: 18px;
    }

    .brand-bottom {
        margin-top: 35px;
    }

    .login-side {
        align-items: flex-start;
    }

    .login-card {
        border-radius: 20px;
    }
}
