:root {
    --blue: #326dd0;
    --ink: #202a3a;
    --muted: #627086;
    --border: #dce3ed;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f4f6fa;
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    place-items: center;
    padding: 48px 24px;
    background: radial-gradient(ellipse at 50% 0%, #e6edfa 0, transparent 65%);
}

.login-main { width: 100%; max-width: 420px; }

.login-brand {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 10px;
    margin: 0 auto 30px;
    color: var(--ink);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
    text-decoration: none;
}

.login-brand:hover { color: var(--ink); }

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    line-height: 1;
    padding-bottom: 4px;
}

.login-card {
    padding: 36px;
    border: 1px solid #e3e8f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 48px #202a3a08, 0 2px 6px #202a3a03;
}

.login-card h1 {
    margin: 0 0 28px;
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -.8px;
}

.login-card form > label {
    display: block;
    margin: 20px 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.login-card form > label:first-of-type { margin-top: 0; }
.input-wrap { position: relative; }

.input-wrap > i {
    position: absolute;
    inset-inline-start: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 14px 0 43px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    transition: border-color .15s, box-shadow .15s;
}

.input-wrap input::placeholder { color: #738095; }
.input-wrap input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px #326dd020; }
.input-wrap input[aria-invalid="true"] { border-color: #ba4141; }

.login-card form > .remember-label {
    display: flex;
    width: fit-content;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
}

.remember-label input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }

.login-submit {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.login-submit:hover { background: #255bb7; }
.login-submit:active { background: #204e9c; }
.login-submit:focus-visible, .login-brand:focus-visible, .remember-label input:focus-visible { outline: 3px solid #326dd080; outline-offset: 4px; }
.account-help { margin: 24px 0 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.7; }

.login-error, .login-success {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid #efcece;
    border-radius: 10px;
    background: #fff4f4;
    color: #9f3030;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.login-success { border-color: #cce5d6; background: #f0f9f4; color: #286043; }

@media (max-width: 480px) {
    .login-shell { padding: 32px 16px; }
    .login-card { padding: 28px 24px; border-radius: 16px; }
    .login-brand { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
