/* ===== AutoPartsHub 全局样式 ===== */
:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F7FA;
    --bg-tertiary: #EEF2FF;
    --text-primary: #1A1D21;
    --text-secondary: #4A5568;
    --text-tertiary: #9CA3AF;
    --accent: #3B82F6;
    --accent-dark: #2563EB;
    --accent-light: #EFF6FF;
    --border: #E5E7EB;
    --border-light: #F0F0F0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --green: #10B981;
    --green-bg: #ECFDF5;
    --orange: #F59E0B;
    --orange-bg: #FFFBEB;
    --red: #EF4444;
    --red-bg: #FEF2F2;
    --blue: #3B82F6;
    --blue-bg: #EFF6FF;
    --purple: #8B5CF6;
    --purple-bg: #F5F3FF;
    --indigo: #6366F1;
    --indigo-bg: #EEF2FF;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1400px; margin: 0 auto; padding: 24px 20px; }

/* ===== 顶部导航 ===== */
.topbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}
.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand-link {
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}
.brand-link span { color: var(--accent); }
.topbar-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topbar-nav a, .topbar-nav button {
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); text-decoration: none;
    padding: 8px 14px; font-size: 0.88rem; border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.topbar-nav a:hover, .topbar-nav button:hover { background: var(--bg-secondary); color: var(--text-primary); }
.topbar-nav .btn-primary {
    background: var(--accent); color: #fff; padding: 8px 18px;
    border-radius: var(--radius-full); font-weight: 500;
}
.topbar-nav .btn-primary:hover { background: var(--accent-dark); color: #fff; }
.topbar-user {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-secondary); font-size: 0.86rem;
}
.topbar-user .user-email { font-weight: 500; }
.topbar-user .plan-badge {
    background: var(--accent-light); color: var(--accent);
    padding: 2px 10px; border-radius: var(--radius-full);
    font-size: 0.74rem; font-weight: 600;
}
.topbar-user .plan-badge.pro { background: var(--purple-bg); color: var(--purple); }
.topbar-user .plan-badge.starter { background: var(--green-bg); color: var(--green); }
.topbar-user .plan-badge.enterprise { background: linear-gradient(135deg, #FFD700, #FF8C00); color: #fff; }

/* ===== Auth 页面 ===== */
.auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.auth-card {
    background: var(--bg-primary);
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%; max-width: 420px;
}
.auth-card h1 {
    text-align: center; margin-bottom: 8px;
    font-size: 1.6rem; letter-spacing: -0.5px;
}
.auth-card h1 span { color: var(--accent); }
.auth-card .subtitle {
    text-align: center; color: var(--text-tertiary);
    font-size: 0.88rem; margin-bottom: 28px;
}
.form-group { margin-bottom: 16px; }
.form-label {
    display: block; margin-bottom: 6px;
    font-size: 0.84rem; font-weight: 500; color: var(--text-secondary);
}
.form-input {
    width: 100%; padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.92rem; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: var(--bg-primary);
    font-family: inherit;
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.btn {
    border: none; cursor: pointer;
    padding: 11px 22px; border-radius: var(--radius-full);
    font-size: 0.92rem; font-weight: 500;
    transition: all 0.15s;
    font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled {
    background: var(--text-tertiary); cursor: not-allowed; opacity: 0.6;
}
.btn-block { width: 100%; }
.btn-secondary {
    background: var(--bg-secondary); color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }
.auth-foot {
    text-align: center; margin-top: 18px;
    color: var(--text-tertiary); font-size: 0.86rem;
}
.auth-foot a { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }
.alert {
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 0.86rem; margin-bottom: 14px;
}
.alert-error { background: var(--red-bg); color: var(--red); border: 1px solid #FECACA; }
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid #A7F3D0; }
.alert-info { background: var(--blue-bg); color: var(--blue); border: 1px solid #BFDBFE; }
