/**
 * 统一认证页面样式 - 登录/注册/个人中心
 * EvalShare Auth Pages
 */

/* ===== 基础变量 ===== */
:root {
    --auth-primary: #ff6b35;
    --auth-primary-hover: #e55a2b;
    --auth-bg: #f8fafc;
    --auth-card-bg: #ffffff;
    --auth-text: #1e293b;
    --auth-text-secondary: #64748b;
    --auth-border: #e2e8f0;
    --auth-success: #10b981;
    --auth-error: #ef4444;
    --auth-radius: 12px;
    --auth-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --auth-shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ===== 认证页面基础 ===== */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    background: var(--auth-card-bg);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow-lg);
    overflow: hidden;
}

/* ===== 左侧品牌区 ===== */
.auth-brand {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 40px;
    text-decoration: none;
}

.auth-brand-logo img {
    height: 44px;
    width: auto;
    max-width: 200px;
}

.auth-brand-tagline {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.auth-brand-tagline span {
    color: var(--auth-primary);
}

.auth-brand-desc {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
    margin-bottom: 32px;
}

.auth-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 15px;
    color: rgba(255,255,255,0.9);
}

.auth-brand-features li::before {
    content: '✓';
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-primary);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

/* ===== 右侧表单区 ===== */
.auth-form-panel {
    padding: 60px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255,107,53,0.1);
    color: var(--auth-primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
}

.auth-form-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 12px;
}

.auth-form-sub {
    font-size: 15px;
    color: var(--auth-text-secondary);
}

.auth-form-sub a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

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

/* ===== 表单样式 ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    color: var(--auth-text-secondary);
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 12px 16px 12px 46px;
    font-size: 15px;
    color: var(--auth-text);
    background: var(--auth-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    background: white;
    border-color: var(--auth-primary);
}

.form-control::placeholder {
    color: #94a3b8;
}

/* 密码显示切换 */
.auth-toggle-pwd {
    position: absolute;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--auth-text-secondary);
    cursor: pointer;
    border-radius: 6px;
}

.auth-toggle-pwd:hover {
    background: rgba(0,0,0,0.05);
}

.auth-toggle-pwd svg {
    width: 18px;
    height: 18px;
}

/* 记住我 & 忘记密码 */
.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-text-secondary);
    cursor: pointer;
}

.auth-remember input {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
}

.auth-forgot {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-forgot:hover {
    text-decoration: underline;
}

/* 同意协议 */
.auth-agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--auth-text-secondary);
    cursor: pointer;
}

.auth-agree input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--auth-primary);
}

.auth-agree a {
    color: var(--auth-primary);
    text-decoration: none;
}

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

/* 密码强度 */
.password-strength {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    background: var(--auth-border);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0;
    background: var(--auth-error);
    border-radius: 2px;
    transition: all 0.3s;
}

.password-strength-fill.weak { background: var(--auth-error); width: 33%; }
.password-strength-fill.medium { background: #f59e0b; width: 66%; }
.password-strength-fill.strong { background: var(--auth-success); width: 100%; }

.password-strength-label {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--auth-text-secondary);
}

/* 提交按钮 */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--auth-primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.auth-submit-btn:hover {
    background: var(--auth-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-submit-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.auth-submit-btn.loading .spinner {
    display: block;
}

.auth-submit-btn.loading .btn-text {
    opacity: 0.7;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误提示 */
.auth-alert {
    display: none;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.auth-alert.show {
    display: block;
}

.auth-alert.error {
    background: rgba(239,68,68,0.1);
    color: var(--auth-error);
    border: 1px solid rgba(239,68,68,0.2);
}

.auth-alert.success {
    background: rgba(16,185,129,0.1);
    color: var(--auth-success);
    border: 1px solid rgba(16,185,129,0.2);
}

.auth-field-error {
    font-size: 12px;
    color: var(--auth-error);
    margin-top: 4px;
    min-height: 18px;
}

/* ===== 社交登录 ===== */
.auth-social {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-border);
}

.auth-social-title {
    text-align: center;
    font-size: 13px;
    color: var(--auth-text-secondary);
    margin-bottom: 16px;
    position: relative;
}

.auth-social-title::before,
.auth-social-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: var(--auth-border);
}

.auth-social-title::before { left: 0; }
.auth-social-title::after { right: 0; }

.auth-social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 14px;
    color: var(--auth-text);
    background: white;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-social-btn:hover {
    background: var(--auth-bg);
    border-color: #cbd5e1;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .auth-wrap {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    
    .auth-brand {
        display: none;
    }
    
    .auth-form-panel {
        padding: 40px 32px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 0;
    }
    
    .auth-wrap {
        border-radius: 0;
        min-height: 100vh;
    }
    
    .auth-form-panel {
        padding: 32px 24px;
    }
}
