:root {
    color-scheme: dark;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-synthesis: none;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --text: #0f172a;
    --muted: #64748b;
    --line: #d8e0ea;
    --control-height: 34px;
    --control-radius: 6px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: #061426;
}

button, input { font: inherit; }

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(440px, .65fr);
    background:
        linear-gradient(90deg, rgba(3, 14, 30, .12), rgba(3, 14, 30, .4)),
        url('/images/admin-login-background.png') center / cover no-repeat;
}

.login-context {
    min-width: 0;
    padding: clamp(32px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
}

.context-brand, .mobile-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.brand-symbol {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 13px;
    background: rgba(255, 255, 255, .11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
    backdrop-filter: blur(14px);
}

.brand-symbol svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.brand-symbol svg path:last-child { stroke: #56c9ff; }

.context-copy { max-width: 650px; margin: auto 0 10vh; text-shadow: 0 2px 20px rgba(0, 0, 0, .28); }
.eyebrow, .login-kicker { font-size: 12px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { color: #7dd3fc; }
.context-copy h2 { margin: 18px 0; font-size: clamp(42px, 4.8vw, 72px); line-height: 1.08; letter-spacing: -.045em; }
.context-copy p { width: 100%; margin: 0; color: rgba(226, 240, 255, .78); font-size: 17px; line-height: 1.75; }

.login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px clamp(28px, 4vw, 64px);
    background: rgba(5, 16, 33, .48);
    border-left: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(24px) saturate(115%);
}

.login-card {
    width: min(100%, 460px);
    padding: clamp(32px, 4vw, 48px);
    color: var(--text);
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 8, 26, .36), 0 2px 8px rgba(0, 8, 26, .1);
}

.mobile-brand { display: none; margin-bottom: 30px; color: #0f2745; }
.mobile-brand .brand-symbol { color: #0f5bd7; background: #eef5ff; border-color: #d9e9ff; }
.login-kicker { display: block; margin-bottom: 11px; color: #2774db; }
.login-card h1 { margin: 0; font-size: 34px; line-height: 1.2; letter-spacing: -.04em; }
.login-description { min-height: 50px; margin: 13px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.75; }

.login-form { display: grid; gap: 18px; }
.form-field { display: grid; gap: 6px; }
.form-field label { color: #334155; font-size: 13px; font-weight: 500; }
.password-control { position: relative; }
.password-control > svg {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 17px;
    transform: translateY(-50%);
    fill: none;
    stroke: #94a3b8;
    stroke-width: 1.7;
    pointer-events: none;
}

.password-control input {
    width: 100%;
    height: var(--control-height);
    padding: 0 38px 0 36px;
    color: #0f172a;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    outline: none;
    font-size: 13px;
    transition: border-color .15s, box-shadow .15s;
}

.password-control input:hover { border-color: #cbd5e1; }
.password-control input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.password-control input::placeholder { color: #a3afbf; }
.password-toggle {
    position: absolute;
    right: 2px;
    top: 50%;
    width: 30px;
    height: 30px;
    padding: 6px;
    transform: translateY(-50%);
    color: #7b8ba1;
    background: transparent;
    border: 0;
    border-radius: var(--control-radius);
    cursor: pointer;
}
.password-toggle:hover { color: #2563eb; background: #edf4ff; }
.password-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.field-hint, .field-validation { color: #7b8ba1; font-size: 12px; }
.field-validation:not(:empty) { color: #c2413b; }

.validation-summary:empty, .validation-summary.validation-summary-valid { display: none; }
.validation-summary {
    padding: 11px 13px;
    color: #a9322c;
    background: #fff1f0;
    border: 1px solid #ffd7d4;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.validation-summary ul { margin: 0; padding-left: 18px; }

.login-submit {
    height: var(--control-height);
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--control-radius);
    box-shadow: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background-color .15s, border-color .15s;
}
.login-submit:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: none; transform: none; filter: none; }
.login-submit:active { background: #1d4ed8; border-color: #1d4ed8; transform: none; }
.login-submit svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; }

.security-note { margin-top: 28px; padding-top: 22px; display: flex; gap: 10px; color: #748296; border-top: 1px solid #e8edf3; font-size: 12px; line-height: 1.65; }
.security-note svg { width: 19px; min-width: 19px; fill: none; stroke: #4285df; stroke-width: 1.7; }

@media (max-width: 900px) {
    .login-shell { display: block; padding: 24px; background-position: 35% center; }
    .login-context { display: none; }
    .login-panel { min-height: calc(100vh - 48px); padding: 24px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 24px; }
    .mobile-brand { display: flex; }
}

@media (max-width: 540px) {
    .login-shell { padding: 0; background: #f4f7fb; }
    .login-panel { min-height: 100vh; padding: 20px; background: #f4f7fb; border: 0; border-radius: 0; }
    .login-card { padding: 32px 24px; border-radius: 20px; box-shadow: 0 16px 50px rgba(15, 35, 60, .12); }
    .login-card h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
