:root {
    --ink: #0b1220;
    --ink-soft: #152033;
    --panel: #f7f8fb;
    --card: #ffffff;
    --line: #e5e8ef;
    --muted: #6b7385;
    --text: #1c2434;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.12);
    --danger: #dc2626;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body.login-page {
    margin: 0;
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--ink);
}

.login-shell {
    min-height: 100%;
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(380px, 0.95fr);
}

.login-brand {
    position: relative;
    overflow: hidden;
    padding: 48px 56px;
    color: #e8eefc;
    background:
        radial-gradient(900px 480px at -10% -20%, rgba(37, 99, 235, 0.28), transparent 55%),
        radial-gradient(700px 420px at 110% 90%, rgba(14, 165, 233, 0.18), transparent 50%),
        linear-gradient(165deg, #0b1220 0%, #101a30 55%, #0d1628 100%);
}

.login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at 30% 20%, #000 20%, transparent 75%);
    pointer-events: none;
}

.brand-inner {
    position: relative;
    z-index: 1;
    max-width: 460px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9db0d4;
}

.brand-mark span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    color: #fff;
    font-size: 16px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.login-brand h1 {
    margin: 48px 0 12px;
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -0.04em;
    font-weight: 600;
}

.login-brand p.lead {
    margin: 0;
    max-width: 380px;
    font-size: 16px;
    line-height: 1.6;
    color: #b7c4dd;
}

.brand-points {
    display: grid;
    gap: 14px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}

.brand-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #d5def0;
}

.brand-points li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 0 5px rgba(96, 165, 250, 0.15);
}

.brand-foot {
    font-size: 12px;
    color: #7f8daf;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background: var(--panel);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 36px 32px 28px;
    box-shadow: var(--shadow);
}

.login-card h2 {
    margin: 0 0 6px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

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

.login-form .input-field {
    margin-bottom: 16px;
}

.login-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.login-form input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d7dce7;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.login-form button#login {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #3b82f6, var(--accent));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
    transition: transform 0.12s ease, filter 0.12s ease;
}

.login-form button#login:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

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

.progress {
    display: none;
    height: 3px;
    margin: 18px 0 4px;
    overflow: hidden;
    border-radius: 99px;
    background: #e8edf7;
}

.progress .indeterminate {
    width: 40%;
    height: 100%;
    background: var(--accent);
    animation: login-indet 1.1s ease-in-out infinite;
}

.login-note {
    margin: 18px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.toast-host {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-toast {
    min-width: 240px;
    max-width: 360px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    animation: toast-in 0.2s ease;
}

@keyframes login-indet {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

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

    .login-brand h1 {
        margin-top: 20px;
        font-size: 30px;
    }

    .brand-points,
    .brand-foot {
        display: none;
    }
}
