:root {
    --bg: #f4f5f7;
    --panel: #ffffff;
    --line: #dfe3e8;
    --text: #172033;
    --text-muted: #667085;
    --blue: #1d4ed8;
    --blue-strong: #173fb2;
}

* { box-sizing: border-box; }

html,
body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
    letter-spacing: 0;
}

.auth-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
}

.auth-shell { width: min(100%, 460px); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 60px rgba(23, 32, 51, 0.09);
}

.auth-login { padding: 38px 42px 30px; }

.auth-brand {
    display: inline-grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    width: fit-content;
    margin-bottom: 42px;
    color: var(--text);
    text-decoration: none;
}

.auth-brand img {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.auth-brand-copy {
    display: grid;
    gap: 2px;
}

.auth-brand-copy strong {
    font-size: 17px;
    font-weight: 780;
    line-height: 1.1;
}

.auth-brand-copy span {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.2;
}

.auth-header { margin-bottom: 26px; }

.auth-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 720;
}

.auth-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 760;
    line-height: 1.25;
}

.auth-header p {
    margin: 9px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.auth-alert {
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid #efc2bc;
    border-radius: 6px;
    background: #fff2f0;
    color: #a33c31;
    font-size: 13px;
}

.auth-form {
    display: grid;
    gap: 17px;
}

.field {
    display: grid;
    gap: 7px;
}

.field span {
    color: #475467;
    font-size: 13px;
    font-weight: 680;
}

.field input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #cfd5dd;
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.10);
    outline: 0;
}

.auth-submit {
    min-height: 46px;
    margin-top: 2px;
    border: 1px solid var(--blue);
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    font-size: 14px;
    font-weight: 720;
    cursor: pointer;
}

.auth-submit:hover { background: var(--blue-strong); }

.auth-submit:focus-visible,
.auth-back:focus-visible,
.auth-brand:focus-visible {
    outline: 3px solid rgba(29, 78, 216, 0.18);
    outline-offset: 3px;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #eceff2;
    color: #8a94a5;
    font-size: 11px;
}

.auth-back {
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: none;
}

.auth-back:hover { color: var(--blue); }

@media (max-width: 520px) {
    .auth-body {
        align-items: start;
        padding: 16px;
    }

    .auth-shell { margin-top: 7vh; }
    .auth-login { padding: 30px 24px 24px; }

    .auth-brand { margin-bottom: 34px; }

    .auth-header h1 { font-size: 23px; }

    .auth-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
}
