/* 企业法律风险测评系统 - 主样式 */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.navbar .logo { font-size: 20px; font-weight: 700; color: var(--primary); }
.navbar .nav-links { display: flex; gap: 24px; align-items: center; }
.navbar .nav-links a { color: var(--dark); font-weight: 500; }
.navbar .nav-links a:hover { color: var(--primary); }
.navbar .nav-links .btn { color: var(--white); }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-success { background: var(--success); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-warning { background: var(--warning); color: var(--white); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--dark); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 17px; }

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}
.hero h1 { font-size: 36px; margin-bottom: 16px; }
.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; }
.hero .btn { background: var(--white); color: var(--primary); }
.hero .btn:hover { background: var(--light); text-decoration: none; }

/* 特性区域 */
.features { padding: 60px 0; }
.features .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-card .icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--gray); font-size: 14px; }

/* 表单 */
.form-card {
    max-width: 480px;
    margin: 40px auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}
.form-card h2 { text-align: center; margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-card .btn { width: 100%; }
.form-footer { text-align: center; margin-top: 16px; font-size: 14px; color: var(--gray); }

/* 提示消息 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

/* 测评页面 */
.assessment-container { max-width: 900px; margin: 40px auto; }
.progress-bar {
    background: var(--border);
    border-radius: 20px;
    height: 8px;
    margin-bottom: 32px;
    overflow: hidden;
}
.progress-bar .fill {
    background: var(--primary);
    height: 100%;
    border-radius: 20px;
    transition: width 0.3s;
}
.category-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.category-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    color: var(--primary);
}
.question-item { margin-bottom: 24px; }
.question-item .q-title { font-weight: 600; margin-bottom: 12px; font-size: 15px; }
.question-item .q-desc { font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.option-list { list-style: none; }
.option-list li {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.option-list li:hover { border-color: var(--primary); background: var(--primary-light); }
.option-list li.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.option-list li input[type="radio"] { accent-color: var(--primary); }

/* 结果页面 */
.result-container { max-width: 900px; margin: 40px auto; }
.score-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.score-circle {
    width: 160px; height: 160px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    border: 8px solid;
}
.score-circle .score { font-size: 42px; font-weight: 700; }
.score-circle .label { font-size: 14px; }
.score-circle.low { border-color: var(--success); color: var(--success); }
.score-circle.medium { border-color: var(--warning); color: var(--warning); }
.score-circle.high { border-color: #f97316; color: #f97316; }
.score-circle.critical { border-color: var(--danger); color: var(--danger); }

.risk-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}
.risk-badge.low { background: #d1fae5; color: #065f46; }
.risk-badge.medium { background: #fef3c7; color: #92400e; }
.risk-badge.high { background: #fed7aa; color: #9a3412; }
.risk-badge.critical { background: #fee2e2; color: #991b1b; }

.category-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.cat-score-card {
    background: var(--white);
    border-radius: var(--shadow);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}
.cat-score-card .cat-name { font-size: 14px; color: var(--gray); margin-bottom: 8px; }
.cat-score-card .cat-score { font-size: 28px; font-weight: 700; }
.cat-score-card .cat-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}
.cat-score-card .cat-bar .fill { height: 100%; border-radius: 3px; }

.suggestion-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.suggestion-box h3 { margin-bottom: 16px; color: var(--primary); }
.suggestion-box p { color: var(--dark); margin-bottom: 12px; }
.suggestion-box ul { margin-left: 20px; }
.suggestion-box li { margin-bottom: 8px; color: var(--gray); }

/* 雷达图 */
.radar-chart-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    text-align: center;
}

/* 表格 */
.table-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}
.table-card .table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.table-card .table-header h3 { font-size: 18px; }
.table-card table { width: 100%; border-collapse: collapse; }
.table-card th, .table-card td { padding: 12px 24px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table-card th { background: var(--light); font-weight: 600; color: var(--gray); }
.table-card tr:hover { background: var(--light); }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination a {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--dark);
}
.pagination a.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* 后台管理布局 */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px;
    background: var(--dark);
    color: var(--white);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar .sidebar-header { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.admin-sidebar .sidebar-header h3 { font-size: 18px; }
.admin-sidebar a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.1); color: var(--white); text-decoration: none; }
.admin-content { margin-left: 240px; flex: 1; padding: 24px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.stat-card .stat-label { color: var(--gray); font-size: 14px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; }

/* 模态框 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.modal h3 { margin-bottom: 20px; }
.modal .modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 24px; }
.dash-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.dash-card h3 { margin-bottom: 16px; font-size: 16px; color: var(--gray); }

/* 响应式 */
@media (max-width: 768px) {
    .navbar .container { flex-direction: column; gap: 12px; }
    .navbar .nav-links { flex-wrap: wrap; justify-content: center; }
    .hero h1 { font-size: 28px; }
    .admin-sidebar { width: 100%; height: auto; position: relative; }
    .admin-content { margin-left: 0; }
    .category-scores { grid-template-columns: 1fr; }
}

/* === 新增样式 === */

/* 全宽按钮 */
.btn-block { width: 100%; display: block; text-align: center; }

/* VIP导航链接 */
.nav-vip { color: gold !important; font-weight: 600; }
.nav-vip:hover { color: #ffd700 !important; }

/* 我要测评导航按钮 */
.nav-assess {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff !important;
    padding: 7px 18px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.nav-assess:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-secondary { background: #f1f5f9; color: #475569; }
.badge-tester { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }

/* 导航栏用户信息 */
.nav-user-info { display: flex; align-items: center; gap: 8px; }

/* 通用网格 */
.grid { display: grid; gap: 24px; }

/* LLM报告内容样式 */
.llm-report-content h2, .llm-report-content h3 { margin-top: 20px; margin-bottom: 10px; color: var(--dark); }
.llm-report-content h2 { font-size: 20px; }
.llm-report-content h3 { font-size: 17px; }
.llm-report-content p { margin-bottom: 12px; }
.llm-report-content ul, .llm-report-content ol { margin-left: 24px; margin-bottom: 12px; }
.llm-report-content li { margin-bottom: 6px; }
.llm-report-content strong { color: var(--primary); }
.llm-report-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--gray);
    background: rgba(37,99,235,0.05);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}
.llm-report-content hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.llm-report-content code { background: var(--light); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* 律师工作台回复区 */
textarea { font-family: inherit; resize: vertical; }

/* 模态框 */
.modal-overlay { display: none; }
.modal-overlay.show { display: flex; }
