/* ================================================================
   auth.css — 认证页专用样式
   登录 / 注册 / 找回密码 / 重置密码 / OAuth 授权页使用
   ================================================================ */

/* ---------- 顶部导航 ---------- */
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
    padding: 7px 16px; color: var(--text-2); font-size: 14px;
    border-radius: var(--radius); transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.site-nav a.active { color: var(--brand); font-weight: 600; background: var(--brand-soft); }

/* ---------- 居中布局 ---------- */
body.auth-page { display: flex; flex-direction: column; }
.auth-wrap {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 48px 20px;
}
.auth-card {
    width: 100%; max-width: 400px;
    padding: 34px 32px 28px;
    background: var(--card); border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 14px 36px -26px rgba(16,24,40,.35);
}
.auth-card.wide { max-width: 468px; }
.auth-copyright {
    margin-top: 22px; color: var(--text-3); font-size: 12px;
    text-align: center; line-height: 1.7;
}
.auth-copyright p { margin: 0; }

/* ---------- 卡片头部 ---------- */
.form-head { margin-bottom: 22px; text-align: center; }
.form-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.form-logo img { height: 40px; width: auto; }
.form-head .eyebrow {
    display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px;
    color: var(--brand); font-size: 12px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
}
.form-head h1 { color: var(--ink); font-size: 21px; line-height: 1.3; font-weight: 700; }
.form-head p { margin-top: 8px; color: var(--text-2); font-size: 13px; line-height: 1.65; }
.step-icon {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; color: var(--brand);
    border-radius: var(--radius); background: var(--brand-soft);
}
.step-icon svg { width: 22px; height: 22px; }

/* ---------- 表单字段 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.field label .opt, .field-label-row > span { color: var(--text-3); font-size: 12px; font-weight: 400; }
.field-label-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 6px;
}
.field-label-row label { margin: 0; }
.field-label-row a { font-size: 12.5px; font-weight: 600; }
.field > label { margin-bottom: 6px; }
.input-box { position: relative; }
.input-box .lead {
    position: absolute; z-index: 1; left: 12px; top: 50%;
    display: flex; color: var(--text-3); transform: translateY(-50%); pointer-events: none;
}
.input-box .lead svg { width: 17px; height: 17px; }
.field input {
    width: 100%; height: 44px; padding: 0 13px;
    color: var(--ink); background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius);
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.input-box.has-lead input { padding-left: 40px; }
.input-box.has-toggle input { padding-right: 42px; }
.field input::placeholder { color: var(--text-3); }
.field input:hover { border-color: #c2c6cf; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,59,162,.13); }
.pw-toggle {
    position: absolute; right: 5px; top: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3); background: transparent;
    border: 0; border-radius: var(--radius);
    cursor: pointer; transform: translateY(-50%);
    transition: color .15s, background .15s;
}
.pw-toggle:hover { color: var(--text); background: var(--bg); }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle .eye-off { display: none; }
.pw-toggle.on .eye-on { display: none; }
.pw-toggle.on .eye-off { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-policy { margin: 2px 0 16px; color: var(--text-3); font-size: 12px; line-height: 1.6; }

/* ---------- 认证页按钮覆写 ---------- */
.auth-card .btn { width: 100%; }
.auth-card .btn-primary {
    min-height: 44px; width: 100%; padding: 0 18px;
    font-size: 14px; justify-content: center;
}

/* ---------- 密码强度 ---------- */
.pw-meter { display: flex; gap: 4px; margin-top: 8px; }
.pw-meter span {
    flex: 1; height: 4px; border-radius: 2px;
    background: var(--line-2); transition: background .2s;
}
.pw-meter[data-level="1"] span:nth-child(1) { background: var(--danger); }
.pw-meter[data-level="2"] span:nth-child(-n+2) { background: #d98c00; }
.pw-meter[data-level="3"] span:nth-child(-n+3) { background: #c2a300; }
.pw-meter[data-level="4"] span { background: var(--accent); }
.pw-strength-text { min-height: 17px; margin-top: 5px; color: var(--text-3); font-size: 12px; }

/* ---------- 验证码 ---------- */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row .input-box { flex: 1; }
.captcha-img {
    height: 44px; width: auto; flex-shrink: 0;
    border: 1px solid var(--line); border-radius: var(--radius);
    cursor: pointer; transition: border-color .15s;
}
.captcha-img:hover { border-color: var(--brand); }

/* ---------- 流程列表 ---------- */
.process-list {
    display: grid; gap: 9px; margin-top: 20px; padding: 15px;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfc;
}
.process-list > div { display: flex; align-items: center; gap: 11px; }
.process-list > div > span {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
    color: #fff; background: var(--brand); border-radius: 50%;
    font-size: 12px; font-weight: 700;
}
.process-list strong, .process-list small { display: block; }
.process-list strong { color: var(--text); font-size: 13px; }
.process-list small { margin-top: 1px; color: var(--text-3); font-size: 11px; }

/* ---------- 空状态（认证页风格） ---------- */
.auth-card .empty-state { padding: 22px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfc; }
.empty-state-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px; color: var(--danger);
    border-radius: 50%; background: var(--danger-bg);
}
.empty-state-icon svg { width: 21px; height: 21px; }
.empty-state h2 { color: var(--ink); font-size: 16px; }
.empty-state p { margin: 7px 0 16px; color: var(--text-2); font-size: 13px; line-height: 1.6; }

/* ---------- 安全提示 / 底部链接 ---------- */
.security-note {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    margin-top: 16px; color: var(--text-3); font-size: 12px;
}
.security-note svg { width: 14px; height: 14px; color: var(--accent); }
.links {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    margin-top: 20px; padding-top: 18px;
    border-top: 1px solid var(--line-2); color: var(--text-2); font-size: 13px;
}
.links a { font-weight: 600; }

/* ---------- OAuth 授权页 ---------- */
.app-info {
    display: flex; align-items: center; gap: 13px;
    margin-bottom: 18px; padding: 14px;
    background: var(--brand-soft); border: 1px solid #d6e2f6; border-radius: var(--radius);
}
.app-avatar {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
    color: #fff; background: linear-gradient(135deg, var(--brand), var(--accent));
    border-radius: var(--radius); font-size: 20px; font-weight: 700;
}
.app-info strong { display: block; color: var(--ink); font-size: 15px; }
.app-info small { display: block; margin-top: 2px; color: var(--text-2); font-size: 12.5px; }
.scope-title { color: var(--text-2); font-size: 13px; margin-bottom: 8px; }
.scope-list {
    list-style: none; margin: 0 0 22px; padding: 6px 14px;
    background: #fafbfc; border: 1px solid var(--line); border-radius: var(--radius);
}
.scope-list li {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 0; font-size: 13px; color: var(--text);
    border-bottom: 1px solid var(--line-2);
}
.scope-list li:last-child { border-bottom: 0; }
.scope-list li::before {
    content: ""; width: 16px; height: 16px; flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b9a3a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}
.btn-row { display: flex; gap: 12px; }
.btn-ghost {
    flex: 1; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 16px; color: var(--text-2); background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.btn-ghost:hover { border-color: #c2c6cf; color: var(--text); background: var(--bg); }
.btn-row .btn { flex: 1.6; }

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
    .auth-wrap { padding: 28px 16px; }
    .auth-card { padding: 28px 20px 24px; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
}
