/* DEMO Forex CRM 统一样式文件 */
/* 基于 VISUAL_CHANGES_SUMMARY.md 设计规范 */

/* ========================================
   全局配色方案
   ======================================== */

:root {
    /* 主要配色 */
    --primary-bg: #171635;        /* 深蓝紫主背景 */
    --secondary-bg: #00225D;      /* 深蓝次要背景 */
    --accent-gold: #E9A621;       /* 金黄色强调色 */
    --accent-purple: #763262;     /* 深紫红色 */
    --accent-orange: #CA7508;     /* 深橙色 */

    /* 渐变色 */
    --primary-gradient: linear-gradient(135deg, #763262, #CA7508);
    --hover-shadow: 0 15px 35px rgba(202, 117, 8, 0.4);

    /* 文字颜色 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);

    /* 边框和分割线 */
    --border-color: rgba(255, 255, 255, 0.1);
    --gold-border: rgba(233, 166, 33, 0.3);
}

/* ========================================
   基础页面样式
   ======================================== */

body {
    background: var(--primary-bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 登录/注册页面容器 */
.auth-container {
    min-height: 100vh;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(118, 50, 98, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(202, 117, 8, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* 认证卡片 */
.auth-card {
    background: var(--secondary-bg);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

/* ========================================
   统一按钮样式
   ======================================== */

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--gold-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(233, 166, 33, 0.1);
    border-color: var(--accent-gold);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* ========================================
   表单样式
   ======================================== */

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(233, 166, 33, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ========================================
   头像样式
   ======================================== */

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(202, 117, 8, 0.2);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 28px;
    box-shadow: 0 10px 30px rgba(202, 117, 8, 0.3);
    margin: 0 auto 24px;
}

.avatar-large {
    width: 120px;
    height: 120px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 42px;
    box-shadow: 0 15px 40px rgba(202, 117, 8, 0.4);
    margin: 0 auto 32px;
}

/* ========================================
   标题和文本样式
   ======================================== */

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    font-size: 16px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   链接样式
   ======================================== */

.auth-link {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

/* ========================================
   分割线样式
   ======================================== */

.divider {
    text-align: center;
    position: relative;
    margin: 32px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider-text {
    background: var(--secondary-bg);
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* ========================================
   Alert/消息样式
   ======================================== */

.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(233, 166, 33, 0.1);
    border-left-color: var(--accent-gold);
    color: var(--accent-gold);
}

.alert-error {
    background: rgba(118, 50, 98, 0.1);
    border-left-color: var(--accent-purple);
    color: var(--accent-purple);
}

.alert-info {
    background: rgba(0, 34, 93, 0.3);
    border-left-color: var(--accent-gold);
    color: var(--text-secondary);
}

/* ========================================
   动画效果
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 768px) {
    .auth-card {
        margin: 20px;
        padding: 32px 24px;
    }

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

    .page-title {
        font-size: 28px;
    }

    .avatar-large {
        width: 100px;
        height: 100px;
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }

    .auth-card {
        padding: 24px 20px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 20px;
        font-size: 16px;
    }

    .form-control {
        padding: 14px 16px;
        font-size: 16px;
    }
}

/* ========================================
   特殊元素样式
   ======================================== */

.back-to-login {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--accent-gold);
}

.checkbox-wrapper label {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-primary);
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

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

/* ==================== 全局按钮样式强制覆盖 ==================== */
/* 确保所有按钮都使用统一的紫金渐变色 */
.btn-primary,
button.btn-primary,
a.btn-primary,
input[type="submit"].btn-primary,
input[type="button"].btn-primary,
.btn.btn-primary,
button[class*="primary"] {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: var(--text-primary) !important;
    box-shadow: var(--hover-shadow) !important;
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover,
.btn.btn-primary:hover {
    background: linear-gradient(135deg, #8B4A76, #E89620) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(202, 117, 8, 0.5) !important;
}

.btn-primary:active,
.btn-primary:focus,
button.btn-primary:active,
button.btn-primary:focus {
    background: var(--primary-gradient) !important;
    outline: none !important;
    box-shadow: var(--hover-shadow) !important;
}