/* ============================================================
   认证页样式(登录/注册)— 居中单卡,淡绿色主题(与工作区一致)
   依赖 css/style.css 的 :root 变量(--primary / --bg / --text 等)
   ============================================================ */

* { box-sizing: border-box; }

body.auth-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);            /* #f2f8f6 淡绿背景 */
    color: var(--text);               /* #173a36 深墨绿 */
    font-family: var(--font);
    padding: 24px;
}

/* 顶部 Logo(加大加粗,非斜体) */
.auth-logo {
    font-family: var(--font-display);
    font-style: normal;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);            /* #087a68 主品牌绿 */
    text-decoration: none;
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}
.auth-logo:hover { opacity: 0.8; }

/* 卡片容器 */
.auth-card {
    width: 100%;
    max-width: 384px;
    background: #fbfefd;              /* 极浅绿白,比纯白更柔和 */
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);  /* #d7e7e3 */
    overflow: hidden;
}
.auth-card-header {
    padding: 28px 28px 0;
    text-align: center;
    background: linear-gradient(90deg, #f3faf8, #fbfdfd);
}
.auth-card-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
.auth-card-header p {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--text-light);        /* #637a76 */
}
.auth-card-body {
    padding: 24px 28px 28px;
}

/* 表单 */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
}
.auth-field input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.auth-field input:focus {
    border-color: var(--accent);     /* #159aa6 */
    box-shadow: 0 0 0 3px rgba(21,154,166,.16);
}
.auth-field input::placeholder { color: var(--text-light); opacity: 0.6; }

/* 错误提示条 */
.auth-error {
    background: rgba(220,38,38,.1);
    color: #b91c1c;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 8px;
    line-height: 1.5;
    display: none;
}
.auth-error.show { display: block; }

/* 字段级错误 */
.auth-field-error {
    font-size: 12px;
    color: #b91c1c;
    min-height: 14px;
}

/* 提交按钮(primary 绿底白字,与工作区 .btn-primary 一致) */
.auth-submit {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: var(--primary);       /* #087a68 */
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, transform .1s;
    margin-top: 4px;
}
.auth-submit:hover {
    background: var(--primary-hover); /* #056353 */
    box-shadow: 0 6px 16px rgba(8,122,104,.17);
}
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* 底部跳转链接 */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 20px;
}
.auth-footer a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.auth-footer a:hover { opacity: 0.7; }
.auth-forgot-link { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--text-light); text-decoration: none; }
.auth-forgot-link:hover { color: var(--primary); }

/* 分隔线 */
.auth-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    color: var(--text-light);
    font-size: 12px;
}
.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* 验证码行 */
.auth-captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.auth-captcha-row input {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.auth-captcha-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(21,154,166,.16);
}
.auth-captcha-img {
    height: 40px;
    width: 120px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    object-fit: cover;
    background: #f7fbfa;
    transition: opacity .15s;
}
/* 邮箱验证码发送按钮 */
.auth-send-code-btn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
}
.auth-send-code-btn:hover { opacity: .88; }
.auth-send-code-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: .6;
}
}
.auth-captcha-img:hover { opacity: 0.8; }
.auth-captcha-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: -8px;
}
