/* ============================================================
   顺丰智标AI助手 - 主样式
   品牌: 顺丰黑 #1B1B1B / 顺丰红 #E60012
   ============================================================ */
:root {
    --sf-black: #1B1B1B;
    --sf-black-2: #262626;
    --sf-black-3: #333333;
    --sf-red: #E60012;
    --sf-red-dark: #C50010;
    --sf-red-light: #FFF0F1;
    --bg: #F5F6F7;
    --card: #FFFFFF;
    --border: #E8E8E8;
    --text: #1B1B1B;
    --text-2: #666666;
    --text-3: #999999;
    --green: #16A34A;
    --orange: #F59E0B;
    --blue: #2563EB;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
    --sidebar-w: 236px;
    --font: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.6; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }
img { max-width: 100%; }

/* ============ 通用按钮 ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
    padding: 10px 20px; transition: all .18s ease; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--sf-red); color: #fff; }
.btn-solid:hover { background: var(--sf-red-dark); }
.btn-dark { background: var(--sf-black); color: #fff; }
.btn-dark:hover { background: var(--sf-black-3); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--sf-red); color: var(--sf-red); }
.btn-outline-red { background: transparent; color: var(--sf-red); border: 1px solid var(--sf-red); }
.btn-outline-red:hover { background: var(--sf-red-light); }
.btn-lg { padding: 14px 32px; font-size: 15px; border-radius: 10px; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============ 徽章/标签 ============ */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
    background: var(--bg); color: var(--text-2);
}
.badge-red { background: var(--sf-red-light); color: var(--sf-red); }
.badge-green { background: #E8F8EE; color: var(--green); }
.badge-orange { background: #FEF3E2; color: var(--orange); }
.badge-blue { background: #E8F0FE; color: var(--blue); }
.badge-dark { background: var(--sf-black); color: #fff; }

/* ============ 卡片 ============ */
.card {
    background: var(--card); border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow);
    padding: 20px;
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }

/* ============ Toast ============ */
.toast-wrap { position: fixed; top: 70px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: var(--sf-black); color: #fff; padding: 12px 18px; border-radius: 10px;
    font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: toast-in .25s ease;
    display: flex; align-items: center; gap: 8px; max-width: 360px;
}
.toast.err { background: var(--sf-red); }
.toast.ok { background: #1F7A3D; }
@keyframes toast-in { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ Modal ============ */
.modal-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9990;
    display: flex; align-items: center; justify-content: center; animation: fade-in .2s ease;
}
.modal {
    background: #fff; border-radius: 14px; width: 520px; max-width: 92vw; max-height: 86vh;
    overflow: auto; box-shadow: 0 24px 64px rgba(0,0,0,.22); animation: pop-in .22s ease;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-3); cursor: pointer; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { transform: scale(.95); opacity: 0; } }

/* ============ 表单 ============ */
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, .textarea, .select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; outline: none; transition: border-color .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--sf-red); }
.textarea { min-height: 100px; resize: vertical; }

/* ============ 登录页 ============ */
.login-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1200px 600px at 70% -10%, #2E2E2E 0%, var(--sf-black) 55%), var(--sf-black);
    padding: 24px;
}
.login-card {
    background: #fff; border-radius: 18px; width: 420px; max-width: 100%;
    padding: 40px 36px 32px; box-shadow: 0 32px 80px rgba(0,0,0,.5);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.login-brand .brand-logo { width: 44px; height: 44px; font-size: 15px; }
.login-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.login-sub { color: var(--text-2); font-size: 13px; margin-bottom: 28px; }
.login-demo {
    margin-top: 20px; padding: 14px 16px; background: var(--sf-red-light);
    border-radius: 10px; border: 1px dashed var(--sf-red);
}
.login-demo p { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.login-demo .demo-creds { font-weight: 700; color: var(--sf-red); font-family: "SF Mono", Consolas, monospace; font-size: 13px; }

/* ============ 主框架 ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); background: var(--sf-black); color: #fff;
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 100;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo {
    width: 34px; height: 34px; border-radius: 8px; background: var(--sf-red); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; letter-spacing: .5px;
}
.brand-name { font-weight: 800; font-size: 15px; }
.brand-ai { color: var(--sf-red); font-style: normal; }

.sidebar-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-group-label { font-size: 11px; color: rgba(255,255,255,.4); padding: 12px 12px 6px; font-weight: 600; letter-spacing: 1px; }
.nav-item {
    display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 8px;
    color: rgba(255,255,255,.72); font-size: 14px; cursor: pointer; transition: all .15s;
    border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--sf-red); color: #fff; font-weight: 600; }
.nav-item .nav-ico { font-size: 17px; width: 20px; text-align: center; }

.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: rgba(255,255,255,.5); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--sf-red); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.sidebar-user-name { font-weight: 600; color: #fff; font-size: 13px; line-height: 1.3; }
.sidebar-user-role { color: rgba(255,255,255,.5); font-size: 11px; }
.logout-btn {
    width: 100%; padding: 8px; border-radius: 7px; border: 1px solid rgba(255,255,255,.15);
    background: none; color: rgba(255,255,255,.65); font-size: 12px; transition: all .15s;
}
.logout-btn:hover { color: #fff; border-color: var(--sf-red); background: rgba(230,0,18,.15); }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
    height: 58px; background: #fff; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
    position: sticky; top: 0; z-index: 90;
}
.topbar-title { font-size: 16px; font-weight: 800; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.demo-flag {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
    color: var(--orange); background: #FEF3E2; padding: 4px 12px; border-radius: 20px;
}
.demo-flag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.content { flex: 1; padding: 26px 28px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-hidden { display: none; }

/* ============ 工作台 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; background: var(--sf-red-light); }
.stat-card .stat-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.stat-card .stat-value { font-size: 30px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -0.5px; }
.stat-card .stat-sub { font-size: 12px; color: var(--text-3); }
.stat-card.stat-accent { background: var(--sf-black); color: #fff; border-color: var(--sf-black); }
.stat-card.stat-accent::after { background: rgba(230,0,18,.22); }
.stat-card.stat-accent .stat-label, .stat-card.stat-accent .stat-sub { color: rgba(255,255,255,.55); }
.stat-card.stat-accent .stat-value { color: #fff; }
.stat-card .stat-value.red { color: var(--sf-red); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 17px; font-weight: 800; }
.section-head .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* 项目列表 */
.project-table { width: 100%; border-collapse: collapse; }
.project-table th {
    text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600;
    padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.project-table td { padding: 14px; border-bottom: 1px solid #F2F2F2; vertical-align: middle; }
.project-table tr:last-child td { border-bottom: none; }
.project-table tr:hover td { background: #FAFBFC; }
.project-title { font-weight: 700; font-size: 14px; max-width: 380px; }
.project-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.progress-bar { width: 90px; height: 6px; background: #EEE; border-radius: 4px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--sf-red); border-radius: 4px; }
.p-row-actions { display: flex; gap: 6px; }

/* ============ 智能拆解 ============ */
.upload-zone {
    border: 2px dashed #D8D8D8; border-radius: 14px; padding: 46px 24px; text-align: center;
    background: #FAFBFC; transition: all .2s; cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--sf-red); background: var(--sf-red-light); }
.upload-zone .uz-icon { font-size: 40px; margin-bottom: 12px; }
.upload-zone .uz-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.upload-zone .uz-sub { font-size: 13px; color: var(--text-3); }
.upload-zone input[type=file] { display: none; }

.demo-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.demo-pick-item {
    border: 1px solid var(--border); border-radius: 12px; padding: 16px; cursor: pointer; transition: all .18s;
    background: #fff;
}
.demo-pick-item:hover { border-color: var(--sf-red); box-shadow: var(--shadow); }
.demo-pick-item h4 { font-size: 14px; margin-bottom: 4px; }
.demo-pick-item p { font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* 拆解报告 */
.analysis-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 16px; }
.analysis-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.analysis-card h4 { font-size: 14px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.analysis-card h4 .ac-ico { width: 26px; height: 26px; border-radius: 7px; background: var(--sf-red-light); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.kv-list { display: flex; flex-direction: column; gap: 8px; }
.kv-row { display: flex; gap: 10px; font-size: 13px; }
.kv-row .k { color: var(--text-3); width: 92px; flex-shrink: 0; }
.kv-row .v { font-weight: 600; flex: 1; }

.risk-item { border-left: 3px solid var(--sf-red); background: #FFF8F8; padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 10px; }
.risk-item .risk-type { font-weight: 700; font-size: 13px; color: var(--sf-red); }
.risk-item .risk-desc { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.risk-item.sev-mid { border-color: var(--orange); background: #FFFBF0; }
.risk-item.sev-mid .risk-type { color: var(--orange); }

.score-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.score-table th { text-align: left; padding: 8px 10px; background: var(--bg); font-size: 12px; color: var(--text-2); border-radius: 6px; }
.score-table td { padding: 8px 10px; border-bottom: 1px solid #F2F2F2; }
.score-table .score-max { font-weight: 800; color: var(--sf-red); }

.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: #EEE; }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: -18px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--sf-red); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--sf-red-light); }
.tl-item .tl-date { font-size: 13px; font-weight: 700; }
.tl-item .tl-label { font-size: 12px; color: var(--text-3); }

/* 加载动画 */
.analyzing-overlay { text-align: center; padding: 60px 20px; }
.spinner { width: 46px; height: 46px; border: 4px solid #E8E8E8; border-top-color: var(--sf-red); border-radius: 50%; margin: 0 auto 18px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing-steps { display: flex; flex-direction: column; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); }
.analyzing-steps .step { display: flex; align-items: center; gap: 8px; }
.analyzing-steps .step.done { color: var(--green); }
.analyzing-steps .step.done::before { content: "✓"; }

/* ============ AI 编标 ============ */
.write-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.chapter-list { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chapter-list-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.chapter-list-head h3 { font-size: 14px; font-weight: 800; }
.chapter-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer;
    border-bottom: 1px solid #F5F5F5; transition: all .15s; font-size: 13px;
}
.chapter-item:last-child { border-bottom: none; }
.chapter-item:hover { background: #FAFBFC; }
.chapter-item.active { background: var(--sf-red-light); border-left: 3px solid var(--sf-red); }
.chapter-item .ch-num {
    width: 24px; height: 24px; border-radius: 6px; background: var(--bg); color: var(--text-2);
    display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.chapter-item.active .ch-num { background: var(--sf-red); color: #fff; }
.chapter-item .ch-title { flex: 1; font-weight: 600; }
.chapter-item .ch-w { font-size: 11px; color: var(--text-3); }
.ch-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ch-status-dot.pending { background: #D8D8D8; }
.ch-status-dot.done { background: var(--green); }
.ch-status-dot.generating { background: var(--orange); animation: pulse 1s infinite; }

/* ============ AI 编标：章节分组（三级写作计划） + 右侧概览 ============ */
.ch-group { padding: 4px 0; }
.ch-group-label { padding: 8px 16px; font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .5px; }
.ch-group-label.lv-high { color: #DC2626; }
.ch-group-label.lv-mid { color: #D97706; }
.ch-group-label.lv-low { color: #059669; }
.chapter-item.v2 { padding: 10px 12px 10px 16px; align-items: flex-start; }
.chapter-item.v2.done .ch-title { color: var(--text-2); }
.chapter-item.v2 .ch-main { flex: 1; min-width: 0; }
.chapter-item.v2 .ch-line1 { display: flex; align-items: center; gap: 8px; }
.chapter-item.v2 .ch-title { flex: 1; font-weight: 600; min-width: 0; }
.chapter-item.v2 .ch-done { font-size: 11px; color: var(--green); font-weight: 700; flex-shrink: 0; }
.chapter-item.v2 .ch-todo { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.chapter-item.v2 .ch-line2 { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--text-3); flex-wrap: wrap; }
.ch-method { padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.ch-method.template { background: #F0FDF4; color: #15803D; }
.ch-method.ai { background: #EFF6FF; color: #1D4ED8; }
.ch-owner { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-edited { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.write-aside-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.wa-h { font-size: 14px; font-weight: 800; margin: 0; }
.wa-progress { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; margin-top: 12px; }
.wa-progress-bar { height: 100%; background: linear-gradient(90deg, var(--sf-red), #FF4D55); transition: width .5s; }
.wa-num { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.wa-num b { font-size: 18px; color: var(--sf-black); }
.wa-feed { margin-top: 12px; }
.wa-feed-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #F0F0F0; }
.wa-feed-item:last-child { border-bottom: none; }
.wa-user { width: 28px; height: 28px; border-radius: 50%; background: var(--sf-black); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.wa-feed-text { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.wa-feed-text b { font-weight: 700; }
.wa-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.wa-empty { font-size: 12px; color: var(--text-3); padding: 12px 0; }
.wa-tip { margin-top: 20px; padding: 10px 12px; background: #FFFAF5; border: 1px solid #FFE5D0; border-radius: 8px; font-size: 12px; color: #9A5B2E; line-height: 1.7; }

/* ============ 章节编辑弹窗（WangEditor 富文本） ============ */
.write-editor-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; display: none; align-items: stretch; justify-content: center; padding: 4vh 6vw; backdrop-filter: blur(2px); }
.write-editor-overlay.show { display: flex; }
.write-editor-panel { background: #fff; border-radius: 12px; width: 100%; max-width: 1080px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.write-editor-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.we-head-info h3 { font-size: 16px; font-weight: 800; margin: 0; }
.we-collab { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.we-owner { padding: 2px 10px; background: var(--sf-black); color: #fff; border-radius: 12px; cursor: pointer; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.we-owner:hover { background: var(--sf-red); }
.we-owner-edit { opacity: .6; font-size: 10px; }
.we-ver { padding: 2px 8px; background: var(--bg); border-radius: 10px; font-size: 10px; color: var(--text-3); font-weight: 700; }
.we-lastedit { color: var(--text-3); }
.we-head-actions { display: flex; gap: 8px; flex-shrink: 0; }
#we-toolbar { border-bottom: 1px solid var(--border); background: #FAFAFA; min-height: 42px; }
.we-editor-area { flex: 1; position: relative; overflow: hidden; min-height: 320px; display: flex; }
#we-container { flex: 1; overflow-y: auto; padding: 0 8px; }
#we-container .w-e-text-container [data-slate-editor] { padding: 16px 20px; min-height: 100%; }
#we-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; z-index: 5; }
#we-loading p { margin-top: 12px; font-size: 13px; color: var(--text-3); }
.we-spinner { width: 34px; height: 34px; border: 3px solid #EEE; border-top-color: var(--sf-red); border-radius: 50%; animation: we-spin .7s linear infinite; }
@keyframes we-spin { to { transform: rotate(360deg); } }
.write-editor-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.we-save-status { font-size: 12px; color: var(--green); }

.owner-pick-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: all .15s; }
.owner-pick-item:hover { border-color: var(--sf-red); background: var(--sf-red-light); }

/* ============ 知识库 ============ */
.kb-search-row { display: flex; gap: 12px; margin-bottom: 18px; }
.kb-search-row .input { flex: 1; }
.kb-cats { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.kb-cat {
    padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border); background: #fff;
    font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .15s;
}
.kb-cat.active { background: var(--sf-black); color: #fff; border-color: var(--sf-black); }
.kb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kb-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: all .18s; }
.kb-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); transform: translateY(-2px); }
.kb-card .kb-cat-tag { margin-bottom: 10px; }
.kb-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.kb-card .kb-preview { font-size: 12px; color: var(--text-3); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kb-card .kb-meta { font-size: 11px; color: var(--text-3); margin-top: 12px; display: flex; justify-content: space-between; }

.hl { background: #FFE600; border-radius: 2px; padding: 0 1px; }

/* ============ 落地页 ============ */
.landing-body { background: #fff; }
.landing-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(27,27,27,.92); backdrop-filter: blur(10px); }
.landing-nav-inner { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.landing-nav .brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.landing-nav .brand-name { font-size: 17px; }
.landing-nav-links { display: flex; align-items: center; gap: 26px; color: rgba(255,255,255,.75); font-size: 14px; }
.landing-nav-links a:hover { color: #fff; }
.landing-nav-links .btn { color: #fff; }

.landing-hero {
    background: radial-gradient(1000px 500px at 75% -20%, #3A3A3A 0%, var(--sf-black) 60%), var(--sf-black);
    color: #fff; padding: 160px 24px 90px; text-align: center;
}
.landing-hero-inner { max-width: 900px; margin: 0 auto; }
.hero-eyebrow { display: inline-block; font-size: 12px; letter-spacing: 2px; color: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.18); padding: 6px 16px; border-radius: 30px; margin-bottom: 26px; }
.hero-title { font-size: 52px; font-weight: 900; letter-spacing: -1px; line-height: 1.2; margin-bottom: 18px; }
.hero-accent { color: var(--sf-red); }
.hero-sub { font-size: 18px; color: rgba(255,255,255,.75); margin-bottom: 36px; }
.hero-sub strong { color: #fff; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-bottom: 56px; }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.hero-actions .btn-ghost:hover { border-color: var(--sf-red); color: #fff; background: rgba(230,0,18,.12); }
.hero-metrics { display: flex; justify-content: center; gap: 0; }
.hm-item { flex: 1; max-width: 200px; padding: 18px 12px; border-left: 1px solid rgba(255,255,255,.1); }
.hm-item:first-child { border-left: none; }
.hm-item strong { display: block; font-size: 30px; font-weight: 900; color: var(--sf-red); }
.hm-item span { font-size: 12px; color: rgba(255,255,255,.55); }

.landing-section { padding: 88px 24px; }
.landing-section-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.section-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--sf-red); background: var(--sf-red-light); padding: 5px 16px; border-radius: 30px; margin-bottom: 16px; }
.section-title { font-size: 32px; font-weight: 900; margin-bottom: 12px; }
.section-desc { color: var(--text-2); font-size: 15px; margin-bottom: 44px; }

.scenario-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.flow-step { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px 18px; width: 180px; box-shadow: var(--shadow); text-align: left; transition: all .18s; }
.flow-step:hover { border-color: var(--sf-red); transform: translateY(-3px); }
.step-num { font-size: 11px; font-weight: 800; color: var(--sf-red); letter-spacing: 1px; }
.flow-step h3 { font-size: 15px; font-weight: 700; margin: 6px 0 4px; }
.flow-step p { font-size: 12px; color: var(--text-3); }
.flow-arrow { font-size: 22px; color: var(--sf-red); font-weight: 700; }

.landing-dark { background: var(--sf-black); color: #fff; }
.landing-dark .section-title { color: #fff; }
.landing-dark .section-desc { color: rgba(255,255,255,.6); }
.landing-dark .section-tag { background: rgba(230,0,18,.2); }
.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 36px; }
.module-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 26px 22px; text-align: left; transition: all .2s; }
.module-card:hover { background: rgba(255,255,255,.09); border-color: var(--sf-red); transform: translateY(-3px); }
.module-icon { font-size: 30px; margin-bottom: 14px; }
.module-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; color: #fff; }
.module-card p { font-size: 12.5px; color: rgba(255,255,255,.6); line-height: 1.7; }
.landing-security { font-size: 13px; color: rgba(255,255,255,.55); }

.value-grid { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.value-row { display: grid; grid-template-columns: 180px 1fr 150px; align-items: center; gap: 16px; text-align: left; font-size: 13px; }
.value-row > span { color: var(--text-2); }
.value-row strong { text-align: right; color: var(--sf-red); }
.value-bar { height: 10px; background: #EEE; border-radius: 6px; overflow: hidden; }
.value-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sf-red), #FF4D5E); border-radius: 6px; }

.landing-footer { padding: 30px 24px; text-align: center; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border); background: #fff; }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
    .module-grid { grid-template-columns: repeat(2, 1fr); }
    .kb-grid { grid-template-columns: repeat(2, 1fr); }
    .analysis-grid { grid-template-columns: 1fr; }
    .write-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .demo-pick { grid-template-columns: 1fr; }
    .sidebar { width: 64px; }
    .sidebar-brand .brand-name, .sidebar-brand .brand-ai, .nav-item span:not(.nav-ico), .nav-group-label, .sidebar-user-name, .sidebar-user-role, .logout-btn { display: none; }
    .main { margin-left: 64px; }
    .nav-item { justify-content: center; }
    .hero-title { font-size: 34px; }
    .hero-metrics { flex-wrap: wrap; }
    .hm-item { max-width: 50%; }
    .scenario-flow { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); }
}

/* 空状态 */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty-state .es-ico { font-size: 42px; margin-bottom: 12px; }
.empty-state p { font-size: 13px; }
