/* Design System: AI赋能测评 - Blue SaaS */
:root {
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --cta: #F97316;
    --bg: #F8FAFC;
    --text: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}

body {
    background-color: var(--bg);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    line-height: 1.6;
}

/* Navbar tweaks */
.navbar-brand { font-size: 1.15rem; letter-spacing: -0.01em; }
.navbar-brand img { transition: transform 0.2s; }
.navbar-brand:hover img { transform: scale(1.05); }

/* User dropdown */
.user-dropdown-toggle { cursor: pointer; }
.user-dropdown-toggle::after { margin-left: 4px; vertical-align: 0.15em; }
.dropdown-item-text { font-weight: 600; color: #1a5fb4; font-size: 0.9rem; }

/* Level selection cards */
.level-card {
    background: #fff; border-radius: var(--radius); padding: 2rem 1.5rem;
    text-align: center; cursor: pointer; transition: all 0.2s;
    box-shadow: var(--shadow); border: 2px solid transparent;
    height: 100%;
}
.level-card:hover {
    border-color: var(--primary); transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
}
.level-card .icon-circle {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; font-size: 28px;
}
.level-card h5 { font-weight: 600; margin-bottom: 0.5rem; }
.level-card p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* Tagline */
.tagline {
    font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em;
    color: var(--text); text-align: center; margin-bottom: 2rem;
}
.tagline .highlight { color: var(--cta); }

/* Score options — 测评等级选择 */
.score-options { display: flex; gap: 10px; flex-wrap: wrap; }
.score-option {
    flex: 1; min-width: 100px; padding: 12px 10px; border: 2px solid var(--border);
    border-radius: 10px; text-align: center; cursor: pointer; transition: all 0.2s;
    background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.score-option:hover {
    border-color: var(--primary-light); background: #F0F5FF;
    box-shadow: 0 4px 12px rgba(37,99,235,0.1); transform: translateY(-1px);
}
.score-option:has(input:checked),
.score-option.selected {
    border-color: var(--primary); background: #EEF2FF;
    box-shadow: 0 2px 8px rgba(37,99,235,0.15), inset 0 0 0 1px rgba(37,99,235,0.1);
    transform: translateY(-2px);
}
.score-option:has(input:checked) .score-badge,
.score-option.selected .score-badge {
    background: var(--primary); color: #fff;
    box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}
.score-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin: 0 auto 8px; border-radius: 50%;
    background: #F1F5F9; font-weight: 700; font-size: 13px; color: var(--text);
    transition: all 0.2s;
}
.score-desc { display: block; font-size: 13px; color: #475569; line-height: 1.4; }
.score-example { display: block; font-size: 11px; color: #94A3B8; margin-top: 3px; font-style: italic; }

/* Indicator card — 测评指标卡片 */
.indicator-card {
    border-left: 4px solid var(--primary); background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.02);
    border-radius: var(--radius); transition: box-shadow 0.3s;
}
.indicator-card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06), 0 16px 40px rgba(0,0,0,0.03);
}
.indicator-card .card-title { font-size: 1.05rem; font-weight: 700; color: #0F172A; }
.indicator-card .text-muted.small { font-size: 0.9rem !important; color: #64748B !important; }
.example-hint {
    font-size: 0.8rem; color: #94A3B8; margin-top: 0.5rem;
    padding-top: 0.5rem; border-top: 1px dashed #E2E8F0;
}

/* Score circle */
.score-circle {
    width: 200px; height: 200px; margin: 0 auto;
    border-radius: 50%; background: #EFF6FF; border: 6px solid var(--primary);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* ========== Article Reading Layout ========== */
.article-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    font-size: 18px;
    line-height: 1.8;
    color: #1A1A1A;
    background: #FFFFFF;
}

.article-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    font-size: 15px;
}

.article-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.article-header .report-header-logo {
    height: 42px;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: #1A1A1A;
}

.article-subtitle {
    font-size: 1.15rem;
    color: #4A5568;
    margin-bottom: 0.25rem;
}

.article-date {
    font-size: 0.85rem;
    color: #94A3B8;
}

/* Matrix chart wrapper */
.matrix-wrapper {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}
.matrix-wrapper canvas {
    max-width: 460px;
    max-height: 460px;
}
.chart-legend-text {
    text-align: center;
    color: #64748B;
    font-size: 13px;
    margin-bottom: 0.5rem;
}
.chart-note {
    text-align: center;
    color: #94A3B8;
    font-size: 12px;
    margin-top: 0.5rem;
}

/* Result list (测评结果) */
.result-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.result-summary {
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.7;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #EFF6FF, #F0FDF4);
    border-left: 4px solid #3B82F6;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.25rem;
}

.result-item {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.result-name {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}
.result-level {
    font-size: 14px;
    font-weight: 700;
    color: #2563EB;
    background: #EFF6FF;
    padding: 2px 10px;
    border-radius: 4px;
}

/* Analysis box (测评分析) */
.analysis-box {
    background: #F8FAFC;
    border-left: 4px solid #2563EB;
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    line-height: 1.85;
    color: #334155;
}
.analysis-box p { margin: 0; text-indent: 2em; }

/* Article paragraph indent */
.article-section p { text-indent: 2em; }
.article-section .chart-legend-text,
.article-section .chart-note { text-indent: 0; }

/* Score display */
.article-score {
    text-align: center;
    margin: 2rem 0 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
}

.score-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2563EB;
    letter-spacing: -0.03em;
}

.score-label {
    font-size: 1.1rem;
    color: #64748B;
    margin-left: 0.25rem;
}

/* Article sections */
.article-section {
    margin: 3rem 0;
}

.article-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #E2E8F0;
}

.article-section p {
    font-size: 18px;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 1rem;
}

/* Indicator items */
.indicator-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dotted #E2E8F0;
}

.indicator-item:last-child {
    border-bottom: none;
}

.indicator-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 0.35rem;
}

.score-tag {
    display: inline-block;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 0.85rem;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 500;
}

/* Recommendation list */
.recommendation-list {
    padding-left: 1.5rem;
}

.recommendation-list li {
    font-size: 18px;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

/* Action plan */
.action-plan {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.action-phase {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.phase-period {
    font-size: 17px;
    font-weight: 700;
    color: #1E40AF;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #DBEAFE;
}
.phase-actions {
    padding-left: 1.25rem;
    margin: 0;
}
.phase-actions li {
    font-size: 17px;
    line-height: 1.75;
    color: #334155;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

/* Article footer */
.article-footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #E2E8F0;
}

.theory-text {
    font-size: 15px;
    color: #64748B;
    font-style: italic;
    line-height: 1.7;
    padding: 0.75rem 1rem;
    background: #F8FAFC;
    border-radius: 8px;
    border-left: 3px solid #2563EB;
}

.article-footer p {
    font-size: 14px;
    color: #94A3B8;
    margin-bottom: 1rem;
}

/* Cards */
.card { border: none; box-shadow: var(--shadow); border-radius: var(--radius); }
.card.border-primary { border: 1px solid var(--primary) !important; }

/* Buttons */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #1D4ED8; border-color: #1D4ED8; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-success { background: #10B981; border-color: #10B981; }

/* Report header logo */
.report-header-logo { height: 48px; margin-bottom: 1rem; }

/* Footer */
.app-footer {
    text-align: center; padding: 2rem 0; color: var(--text-muted);
    font-size: 0.8rem; margin-top: 3rem; border-top: 1px solid var(--border);
}

/* Mobile */
@media (max-width: 576px) {
    .score-options { flex-direction: column; }
    .score-option { flex-direction: row; display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
    .score-badge { margin: 0; }
    .score-desc { font-size: 12px; }
    .score-circle { width: 140px; height: 140px; }
    .display-1 { font-size: 3rem; }
    .tagline { font-size: 1.35rem; }
    .level-card { padding: 1.25rem 1rem; }
    .article-container { padding: 1rem 1rem 3rem; font-size: 16px; }
    .article-title { font-size: 1.35rem; }
    .article-section h2 { font-size: 1.2rem; }
    .article-section p, .recommendation-list li { font-size: 16px; line-height: 1.7; }
    .chart-wrapper canvas { max-width: 340px; max-height: 340px; }
    .score-value { font-size: 2.75rem; }
}

/* Diagnostic box (分析推理) */
.diagnostic-box {
    background: #F8FAFC;
    border-left: 4px solid #7C3AED;
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
}
.diagnostic-box p { margin: 0; }

/* Pricing box (费用说明) */
.pricing-box {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
.pricing-text {
    font-size: 13px;
    color: #92400E;
    line-height: 1.7;
    margin: 0;
}
.quota-text {
    font-size: 13px;
    color: #78350F;
    margin: 0.35rem 0 0;
}
.quota-info {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    text-align: center;
}
.usage-info {
    font-size: 12px;
    color: #6B7280;
    margin-top: 8px;
    font-weight: 500;
}
.quota-text strong { color: #B45309; }
.quota-error {
    color: #DC2626;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    background: #FEF2F2;
    border-radius: 6px;
}

/* Theory intro box (测评模型说明) */
.theory-intro-box {
    background: linear-gradient(135deg, #F8FAFC 0%, #F0F5FF 100%);
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(255,255,255,0.6);
}
.theory-intro-text {
    font-size: 14px;
    color: #1E293B;
    line-height: 1.75;
    margin: 0;
    text-indent: 2em;
}

/* Insight text (各指标一句话洞察) */
.insight-text {
    font-size: 14px;
    color: #7C3AED;
    font-weight: 500;
    margin-top: 0.35rem;
    padding-left: 0.5rem;
    border-left: 2px solid #C4B5FD;
}

/* Tiered recommendations (分层建议) */
.recommendation-tier { margin-bottom: 1.5rem; }
.tier-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}
.tier-badge.immediate { background: #FEF2F2; color: #DC2626; }
.tier-badge.medium_term { background: #FEF3C7; color: #D97706; }
.tier-badge.strategic { background: #EFF6FF; color: #2563EB; }

/* Form inputs */
.form-control, .form-select {
    font-size: 15px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

/* ========== Login Page (问卷星风格) ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E8F0FE 0%, #F5F7FA 50%, #E8F0FE 100%);
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2.5rem 2rem 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}
.login-header h1 { font-size: 1.4rem; font-weight: 700; color: #1A1A1A; margin-bottom: 0.25rem; }
.login-header p { font-size: 0.85rem; color: #999; }

/* Tabs */
.login-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #EEE;
}
.login-tab {
    flex: 1;
    padding: 0.6rem 0;
    border: none;
    background: none;
    font-size: 0.95rem;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.login-tab.active { color: #2563EB; font-weight: 600; }
.login-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 2rem;
    height: 2px;
    background: #2563EB;
    border-radius: 1px;
}

.login-panel { display: none; }
.login-panel.active { display: block; }

/* Fields */
.field { margin-bottom: 1rem; }
.input {
    width: 100%;
    padding: 0.7rem 0;
    border: none;
    border-bottom: 1px solid #E5E5E5;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    background: transparent;
}
.input:focus { border-bottom-color: #2563EB; }
.input::placeholder { color: #BFBFBF; }

.code-field { display: flex; gap: 0.75rem; align-items: flex-end; }
.code-field .input { flex: 1; }
.code-btn {
    white-space: nowrap;
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    background: none;
    border: 1px solid #2563EB;
    color: #2563EB;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}
.code-btn:disabled { color: #CCC; border-color: #E5E5E5; cursor: not-allowed; }

/* Submit */
.submit-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    background: #2563EB;
    color: #fff;
    transition: background 0.2s;
    font-family: inherit;
}
.submit-btn:hover { background: #1D4ED8; }

.hint {
    text-align: center;
    font-size: 0.75rem;
    color: #BFBFBF;
    margin-top: 0.75rem;
}

.pwd-links {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.8rem;
}
.pwd-links a { color: #2563EB; text-decoration: none; }
.pwd-links a:hover { color: #1D4ED8; }

/* Social */
.social-login { margin-top: 1.75rem; }
.divider {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #EEE;
}
.divider span {
    padding: 0 1rem;
    font-size: 0.8rem;
    color: #BFBFBF;
}
.social-icons { display: flex; justify-content: center; gap: 1.5rem; }
.social-btn {
    width: 44px; height: 44px;
    border: 1px solid #E5E5E5;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.social-btn:hover { border-color: #2563EB; transform: scale(1.05); }
.social-btn.wechat:hover { border-color: #07C160; }
.social-btn.qq:hover { border-color: #12B7F5; }

/* Agreement */
.agreement {
    text-align: center;
    font-size: 0.7rem;
    color: #BFBFBF;
    margin-top: 1.5rem;
}
.agreement a { color: #2563EB; text-decoration: none; }

.login-error {
    color: #DC2626;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

/* Register Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-card {
    width: 90%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    padding: 2rem 1.5rem;
}
.modal-card h3 { text-align: center; margin-bottom: 1.25rem; font-size: 1.1rem; }
.modal-close {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    background: none;
    border: none;
    color: #2563EB;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
}

@media (max-width: 576px) {
    .login-card { padding: 2rem 1.25rem; }
}
