/* 登录 / 找回密码 / 密码重置完成页 —— 白纸灰带 · 编辑风
   值与 register.css / policy.css / tag.css / search.css 保持一致；
   品牌绿、焦点环等语义与 dialog.css / upload_entry.css 同源。 */

:root {
    --auth-bg: #eeeeee;
    --auth-card-bg: #ffffff;
    --auth-soft: #f7f8f7;
    --auth-ink: #1f1f1f;
    --auth-text: #333333;
    --auth-muted: #666666;
    --auth-faint: #8a8f8c;
    --auth-border: #e0e0e0;
    --auth-accent: #98e0ac;
    --auth-on-accent: #173a22;
    --auth-accent-hover: #44c67d;
    --auth-focus-ring: 0 0 0 3px rgba(152, 224, 172, 0.45);
    --auth-danger: #8a2630;
    --auth-danger-bg: rgba(255, 226, 229, 0.92);
    --auth-danger-line: rgba(138, 38, 48, 0.14);
    --auth-warning: #8a5a00;
    --auth-warning-bg: #fff4e0;
    --auth-success: #195f2d;
    --auth-success-bg: rgba(152, 224, 172, 0.2);
    --auth-card-shadow: 0 1px 2px rgba(20, 40, 30, 0.04),
        0 24px 48px -36px rgba(20, 40, 30, 0.22);
    --auth-dur: 0.2s;
    --auth-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: var(--auth-text);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    color-scheme: light;
    overflow: hidden;
}

.wrapper {
    position: relative;
    max-width: 650px;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    background-color: var(--auth-bg);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
}

.navbar {
    width: 100%;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar h1 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    line-height: 1;
    color: var(--auth-ink);
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
}

.home-link {
    color: inherit;
    text-decoration: none;
}

@media (hover: hover) {
    .home-link:hover {
        color: #222;
    }
}

.center-container {
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: clamp(16px, 4vw, 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.login-box {
    width: min(100%, 420px);
    margin-block: auto;
    padding: clamp(24px, 5vw, 34px);
    border-radius: 16px;
    border: 1px solid var(--auth-border);
    background-color: var(--auth-card-bg);
    box-shadow: var(--auth-card-shadow);
    color: var(--auth-text);
    touch-action: pan-y;
}

.login-box h2 {
    margin: 0 0 6px;
    color: var(--auth-ink);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
}

.auth-subtitle {
    margin: 0 0 22px;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    overflow-wrap: anywhere;
}

.login-box form > label {
    display: block;
    margin: 16px 0 6px;
    color: var(--auth-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.login-box form > label:first-of-type {
    margin-top: 0;
}

.login-box input {
    width: 100%;
    min-height: 48px;
    margin-top: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--auth-border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--auth-card-bg);
    color: var(--auth-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    transition: border-color var(--auth-dur) var(--auth-ease),
        box-shadow var(--auth-dur) var(--auth-ease),
        background-color var(--auth-dur) var(--auth-ease);
}

.login-box input::placeholder {
    color: var(--auth-faint);
}

.login-box input:focus {
    border-color: var(--auth-accent);
    background-color: var(--auth-card-bg);
    box-shadow: var(--auth-focus-ring);
}

.login-box input[aria-invalid="true"] {
    border-color: rgba(138, 38, 48, 0.6);
}

.login-box input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(227, 62, 62, 0.18);
}

.login-box input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--auth-card-bg) inset;
    -webkit-text-fill-color: var(--auth-text);
}

.login-box .helptext {
    display: block;
    margin-top: 6px;
    color: var(--auth-muted);
    font-size: 12.5px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.login-note {
    margin: 14px 0 0;
    color: var(--auth-muted);
    font-size: 12.5px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.login-box .errorlist {
    list-style: none;
    margin: 8px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--auth-danger-line);
    background-color: var(--auth-danger-bg);
    color: var(--auth-danger);
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.login-box .errorlist li {
    margin: 0;
}

.error .errorlist {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* P60：`<button>` 不继承 font-family ⇒ 不声明就落 UA 的 Arial。
   本行与 dialog.css 的同名规则一致；这三页不加载 dialog.css，故各自补一行。
   只声明 family：字号/字重各有各的档，别在这里一并重置。 */
button {
    font-family: inherit;
}

.login-box button {
    width: 100%;
    min-height: 48px;
    margin-top: 24px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background-color: var(--auth-accent);
    color: var(--auth-on-accent);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color var(--auth-dur) var(--auth-ease),
        transform var(--auth-dur) var(--auth-ease);
}

@media (hover: hover) {
    .login-box button:hover {
        background-color: var(--auth-accent-hover);
    }
}

.login-box button:active {
    transform: scale(0.99);
}

.login-box button:focus-visible {
    outline: none;
    box-shadow: var(--auth-focus-ring);
}

.login-box button:disabled,
.login-box button.is-busy {
    cursor: default;
    opacity: 0.6;
    transform: none;
}

.auth-links-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-link-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #2f6b4f;
    text-decoration: none;
    transition: color 0.18s ease;
}

.auth-links-divider {
    color: #c9d2cc;
}

@media (hover: hover) {
    .auth-link-action:hover {
        color: #1f4f38;
    }
}

.auth-link-action:focus-visible {
    outline: none;
    box-shadow: var(--auth-focus-ring);
    border-radius: 6px;
}

.auth-status-icon {
    width: 48px;
    height: 48px;
    margin: 0 0 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--auth-success-bg);
    color: var(--auth-success);
}

.auth-status-icon--warning {
    background-color: var(--auth-warning-bg);
    color: var(--auth-warning);
}

.auth-status-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

@media only screen and (max-width: 640px) {
    .navbar {
        height: 44px;
    }

    .navbar h1 {
        font-size: 1.3em;
    }

    .center-container {
        padding: 12px;
    }

    .login-box {
        padding: 26px 22px 24px;
        border-radius: 14px;
    }

    .login-box input {
        font-size: 16px;
    }
}

@media only screen and (max-width: 420px) {
    .center-container {
        padding: 10px;
    }

    .login-box {
        padding: 24px 18px 22px;
    }

    .auth-links-bar {
        gap: 8px;
        font-size: 12.5px;
    }
}

@media only screen and (max-width: 360px) {
    .center-container {
        padding: 10px 8px 16px;
    }

    .login-box {
        padding: 18px 14px;
        border-radius: 12px;
    }

    .login-box h2 {
        font-size: 21px;
    }
}

@media only screen and (max-height: 480px) {
    .center-container {
        padding-top: 10px;
        padding-bottom: 16px;
    }

    .login-box {
        padding: 20px 18px 18px;
    }

    .login-box h2 {
        font-size: 21px;
    }

    .login-box form > label {
        margin-top: 12px;
    }

    .login-box button {
        margin-top: 18px;
    }

    .auth-status-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }
}

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

    .login-box button:active {
        transform: none;
    }
}

@media (forced-colors: active) {
    .login-box input:focus,
    .login-box button:focus-visible,
    .auth-link-action:focus-visible {
        outline: 2px solid CanvasText;
        box-shadow: none;
    }
}
