:root {
    color-scheme: light;
    --page-bg: #16233d;
    --surface: #ffffff;
    --text: #16213a;
    --muted: #69758b;
    --border: #dce5f1;
    --primary: #1d72f3;
    --primary-hover: #155dc9;
}

* { box-sizing: border-box; }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #16233d;
}

.login-page {
    position: relative;
    display: grid;
    overflow: hidden;
    min-height: 100vh;
    padding: 32px 20px;
    background:
        radial-gradient(circle at 18% 18%, rgba(74, 122, 225, .34) 0, transparent 23rem),
        radial-gradient(circle at 82% 78%, rgba(37, 166, 161, .22) 0, transparent 26rem),
        linear-gradient(135deg, #172845 0%, #101a30 52%, #152945 100%);
    place-items: center;
}

.login-page::before,
.login-page::after {
    position: absolute;
    width: 32rem;
    height: 32rem;
    content: "";
    filter: blur(12px);
    opacity: .94;
    pointer-events: none;
}

.login-page::before {
    top: -15rem;
    right: -10rem;
    background:
        radial-gradient(circle at 35% 35%, rgba(84, 151, 255, .62) 0, rgba(84, 151, 255, 0) 38%),
        radial-gradient(circle at 72% 64%, rgba(180, 101, 255, .43) 0, rgba(180, 101, 255, 0) 42%),
        radial-gradient(circle at 48% 88%, rgba(59, 210, 220, .32) 0, rgba(59, 210, 220, 0) 34%);
    animation: drift-one 16s ease-in-out infinite alternate;
}

.login-page::after {
    bottom: -17rem;
    left: -12rem;
    background:
        radial-gradient(circle at 38% 38%, rgba(52, 211, 153, .50) 0, rgba(52, 211, 153, 0) 37%),
        radial-gradient(circle at 74% 44%, rgba(54, 128, 255, .48) 0, rgba(54, 128, 255, 0) 39%),
        radial-gradient(circle at 52% 78%, rgba(234, 121, 188, .29) 0, rgba(234, 121, 188, 0) 38%);
    animation: drift-two 20s ease-in-out infinite alternate;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    padding: 48px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(26, 47, 83, .14);
}

@keyframes drift-one {
    from { transform: translate3d(-5%, -2%, 0) scale(.95); }
    to { transform: translate3d(9%, 12%, 0) scale(1.12); }
}

@keyframes drift-two {
    from { transform: translate3d(7%, 8%, 0) scale(1.08); }
    to { transform: translate3d(-8%, -11%, 0) scale(.92); }
}

.brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 26px;
    color: var(--primary);
    background: #e8f1ff;
    border-radius: 16px;
    place-items: center;
}

.brand-mark svg { width: 28px; height: 28px; }

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .1em;
}

h1 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.subtitle { margin: 12px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.65; }

.notice {
    margin: 0 0 20px;
    padding: 11px 12px;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.45;
}

.notice.error { color: #b42e43; background: #ffedf0; }
.notice.success { color: #137454; background: #e8f8f1; }

form { display: grid; gap: 9px; }
label { margin-top: 8px; color: #48556b; font-size: 14px; font-weight: 650; }

input {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    color: var(--text);
    font: inherit;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

input::placeholder { color: #a1acbc; }
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 114, 243, .14); }

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    margin-top: 16px;
    color: #fff;
    font: inherit;
    font-weight: 700;
    background: var(--primary);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

button svg { width: 17px; height: 17px; }
button:hover { background: var(--primary-hover); box-shadow: 0 8px 18px rgba(29, 114, 243, .25); transform: translateY(-1px); }
button:focus-visible { outline: 3px solid rgba(29, 114, 243, .3); outline-offset: 3px; }

@media (max-width: 480px) {
    .login-page { padding: 20px 16px; }
    .login-card { padding: 36px 28px; border-radius: 20px; }
    h1 { font-size: 29px; }
}

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