/* 光说不练 · 登录 / 注册页样式
   依赖 nav.css 的设计变量（--nav-accent 等），只补充认证页专用布局与表单。
   禁止在 HTML 里写内联 style，所有视觉都在本文件。 */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--nav-glow), var(--nav-bg);
    transition: background-color .2s ease, color .2s ease;
}

/* 顶部条：沿用 nav.css 的 .nav-topbar，只去掉吸顶，避免表单聚焦时跳动 */
.auth-topbar {
    position: relative;
    flex: 0 0 auto;
}

.auth-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px 20px 64px;
}

.auth-stack {
    width: 100%;
    max-width: 436px;
}

.auth-stack-wide {
    max-width: 478px;
}

/* ── 卡片 ───────────────────────────────── */
.auth-card {
    position: relative;
    width: 100%;
    background: var(--nav-surface);
    border: 1px solid var(--nav-line);
    border-radius: 20px;
    box-shadow: var(--nav-shadow-auth);
    padding: 32px 32px 26px;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: var(--nav-grad);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 22px;
}

.auth-brand .nav-logo {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 19px;
}

.auth-brand-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .3px;
    line-height: 1.3;
}

.auth-brand-name small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.4px;
    color: var(--nav-ink-faint);
}

.auth-title {
    margin: 0 0 6px;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--nav-ink);
}

.auth-sub {
    margin: 0 0 22px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--nav-ink-soft);
}

/* ── 表单字段 ───────────────────────────── */
.auth-field {
    margin-bottom: 15px;
}

.auth-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--nav-ink-soft);
}

.auth-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--nav-ink);
    background: var(--nav-input-bg);
    border: 1px solid var(--nav-line);
    border-radius: 11px;
    transition: border-color .16s, box-shadow .16s, background .16s;
}

.auth-input::placeholder {
    color: var(--nav-ink-faint);
}

.auth-input:hover {
    border-color: var(--nav-hover-line);
}

.auth-input:focus {
    outline: none;
    border-color: var(--nav-accent);
    background: var(--nav-elev);
    box-shadow: 0 0 0 3px var(--nav-accent-soft);
}

.auth-input.is-invalid {
    border-color: var(--nav-danger);
    box-shadow: 0 0 0 3px rgba(229, 72, 77, .12);
}

.auth-input.is-invalid:focus {
    border-color: var(--nav-danger);
    box-shadow: 0 0 0 3px rgba(229, 72, 77, .16);
}

/* 密码框 + 显示/隐藏按钮 */
.auth-pwd {
    position: relative;
}

.auth-pwd .auth-input {
    padding-right: 60px;
}

.auth-pwd-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    padding: 8px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--nav-accent);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
}

.auth-pwd-toggle:hover {
    background: var(--nav-accent-soft);
}

.auth-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.55;
    color: var(--nav-ink-faint);
}

.auth-err {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--nav-danger);
}

.auth-err:empty {
    display: none;
}

/* ── 记住我 / 链接行 ─────────────────────── */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 17px 0 18px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--nav-ink-soft);
    cursor: pointer;
    user-select: none;
}

.auth-check input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--nav-accent);
    cursor: pointer;
}

.auth-row-link {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--nav-accent);
    white-space: nowrap;
}

.auth-row-link:hover {
    text-decoration: underline;
}

/* ── 条款勾选 ───────────────────────────── */
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 18px 0 4px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--nav-ink-soft);
    cursor: pointer;
}

.auth-terms input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    accent-color: var(--nav-accent);
    cursor: pointer;
}

.auth-terms a {
    color: var(--nav-accent);
    font-weight: 600;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* ── 提交按钮 / 提示 ─────────────────────── */
.auth-submit {
    display: block;
    width: 100%;
    height: 47px;
    margin-top: 4px;
    border: 0;
    border-radius: 12px;
    background: var(--nav-grad-btn);
    color: #fff;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .6px;
    box-shadow: var(--nav-shadow-btn);
    transition: filter .16s, transform .1s, opacity .16s, box-shadow .16s;
}

.auth-submit:hover {
    filter: brightness(1.06);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:disabled {
    opacity: .6;
    cursor: default;
    box-shadow: none;
}

.auth-msg {
    min-height: 20px;
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    color: var(--nav-ink-soft);
}

.auth-msg.is-err {
    color: var(--nav-danger);
}

.auth-msg.is-ok {
    color: var(--nav-ok);
}

/* ── 底部切换 / 说明 ─────────────────────── */
.auth-alt {
    margin: 20px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--nav-line);
    text-align: center;
    font-size: 13.5px;
    color: var(--nav-ink-soft);
}

.auth-alt a {
    color: var(--nav-accent);
    font-weight: 600;
}

.auth-alt a:hover {
    text-decoration: underline;
}

.auth-foot {
    margin: 18px 0 0;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--nav-ink-faint);
}

.auth-foot a {
    color: var(--nav-ink-soft);
}

.auth-foot a:hover {
    color: var(--nav-accent);
}

.auth-foot-copy {
    margin-top: 2px;
    color: var(--nav-ink-faint);
}

.auth-foot .auth-foot-links a {
    margin-left: 3px;
    font-weight: 600;
}

/* ── 移动端 ─────────────────────────────── */
@media (max-width: 900px) {
    .auth-main {
        padding: 30px 18px 48px;
    }
}

@media (max-width: 560px) {
    .auth-topbar {
        padding: 0 14px;
        gap: 12px;
    }

    .auth-main {
        align-items: flex-start;
        padding: 22px 14px 40px;
    }

    .auth-card {
        padding: 26px 20px 22px;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 21px;
    }

    .auth-sub {
        margin-bottom: 18px;
    }

    .auth-input {
        height: 45px;
        font-size: 16px; /* iOS 聚焦不放大 */
    }
}

@media (max-width: 380px) {
    .auth-topbar .nav-btn {
        padding: 0 12px;
        font-size: 13px;
    }

    .auth-card {
        padding: 22px 16px 20px;
    }
}