/* ============================================================
   AI Business OS · Design System
   背景 #F7F8FA · 卡片 #FFFFFF · 主文字 #111827 · 次级 #6B7280
   Primary #14B8A6 · 辅助蓝 #3B82F6 · 成功 #22C55E · 警告 #F59E0B · 风险 #EF4444
   radius 16px(卡片)/20px(重要卡片) · 阴影 0 4px 20px rgba(0,0,0,0.04)
   ============================================================ */
:root {
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --text: #111827;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --primary: #14B8A6;
  --primary-soft: #E6F7F4;
  --blue: #3B82F6;
  --blue-soft: #EFF6FF;
  --success: #22C55E;
  --success-soft: #EAFBF0;
  --warning: #F59E0B;
  --warning-soft: #FEF5E7;
  --danger: #EF4444;
  --danger-soft: #FDECEC;
  --border: #EEF0F4;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.07);
  --sidebar-w: 224px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --font-num: 'Inter', 'SF Pro Display', -apple-system, 'DIN Alternate', 'Roboto', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
h1,h2,h3,h4 { font-weight: 600; line-height: 1.3; }
.muted { color: var(--text-2); }
button { font-family: var(--font); cursor: pointer; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 12px; padding: 10px 18px;
  font-size: 14px; font-weight: 500; transition: all .18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(20,184,166,.28); }
.btn-primary:hover { background: #0FA392; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #F3F4F6; }
.btn-soft { background: var(--primary-soft); color: #0D9488; }
.btn-soft:hover { background: #D9F2EC; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover { background: #FADBD9; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn {
  border: none; background: transparent; color: var(--text-2);
  width: 34px; height: 34px; border-radius: 10px; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.icon-btn:hover { background: #F3F4F6; color: var(--text); }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field input, .field select {
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px;
  font-size: 14px; font-family: var(--font); background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,184,166,.12); }
.form-stack { display: flex; flex-direction: column; gap: 4px; }
.form-error { color: var(--danger); font-size: 13px; margin: 4px 0 8px; background: var(--danger-soft); padding: 8px 12px; border-radius: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- 认证 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background:
    radial-gradient(1200px 600px at 80% -10%, rgba(20,184,166,.08), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(59,130,246,.06), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 36px 32px;
}
.brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center;
  letter-spacing: .5px; position: relative;
}
.brand-mark.small { width: 38px; height: 38px; border-radius: 12px; font-size: 14px; }
.brand-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: .85;
  position: absolute; top: 9px; right: 9px; box-shadow: 0 0 0 3px rgba(255,255,255,.25);
}
.brand-mark.small .brand-dot { width: 5px; height: 5px; top: 7px; right: 7px; }
.brand-name { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 12px; color: var(--text-2); }
.auth-title { font-size: 22px; margin-bottom: 6px; }
.auth-sub { color: var(--text-2); font-size: 13px; margin-bottom: 24px; }
.auth-note { margin-top: 18px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.7; }

/* ---- 手机号 + 验证码车道 ---- */
.phone-ipt { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-md); background: #FAFBFC; transition: all .15s; }
.phone-ipt:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,184,166,.12); background: #fff; }
.phone-prefix { padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--text-2); border-right: 1px solid var(--border); line-height: 22px; margin: 9px 0; }
.phone-ipt input { border: none; background: transparent; box-shadow: none; padding-left: 12px; }
.phone-ipt input:focus { box-shadow: none; }
.code-ipt { display: flex; gap: 10px; align-items: center; }
.code-ipt input { flex: 1; }
.sms-btn { flex-shrink: 0; height: 44px; line-height: 44px; padding: 0 16px; border-radius: var(--radius-md); border: 1px solid var(--primary); background: var(--primary-soft); color: #0D9488; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.sms-btn:hover:not(:disabled) { background: #CCFBF1; }
.sms-btn:disabled { border-color: var(--border); background: #F3F4F6; color: var(--text-3); cursor: not-allowed; }
.sms-btn.disabled { border-color: var(--border); background: #F3F4F6; color: var(--text-3); }
.sms-hint { margin-top: 8px; font-size: 12px; color: var(--t2, var(--text-2)); }
.sms-hint.ok { color: #0D9488; }
.auth-agree { margin-top: 14px; font-size: 11.5px; color: var(--text-3); text-align: center; line-height: 1.6; }
.auth-agree a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.auth-switch { margin-top: 10px; }
#auth-phone-lane input, #auth-email-lane input { letter-spacing: .2px; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--card); border-right: 1px solid var(--border);
  padding: 20px 14px; display: flex; flex-direction: column; position: fixed;
  top: 0; bottom: 0; left: 0; z-index: 40; transition: transform .25s ease;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.side-brand-name { font-weight: 700; font-size: 15px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-sep { height: 1px; background: var(--border); margin: 8px 10px; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 500; transition: all .15s;
}
.side-link:hover { background: #F3F4F6; color: var(--text); }
.side-link.active { background: var(--primary-soft); color: #0D9488; font-weight: 600; }
.nav-ico { width: 18px; height: 18px; border-radius: 6px; background: #EEF0F4; display: inline-block; position: relative; flex-shrink: 0; }
.side-link.active .nav-ico { background: #14B8A6; }
.nav-ico.ico-dash::after { content:''; position:absolute; inset:4px 5px; border-radius:3px; background:#9CA3AF; }
.side-link.active .nav-ico.ico-dash::after { background:#fff; }
.nav-ico.ico-import::after { content:''; position:absolute; inset:4px 6px; border:2px solid #9CA3AF; border-top:0; border-radius:0 0 3px 3px; }
.side-link.active .nav-ico.ico-import::after { border-color:#fff; }
.nav-ico.ico-connectors::after { content:''; position:absolute; inset:5px 6px; border:2px solid #9CA3AF; border-radius:50% 0 0 50%; width:7px; height:7px; }
.side-link.active .nav-ico.ico-connectors::after { border-color:#fff; }
.nav-ico.ico-action::after { content:''; position:absolute; inset:4px 6px; width:7px; height:7px; border:2px solid #9CA3AF; border-radius:50%; }
.side-link.active .nav-ico.ico-action::after { border-color:#fff; }
.nav-ico.ico-value::after { content:''; position:absolute; inset:5px 6px; border-left:2px solid #9CA3AF; border-bottom:2px solid #9CA3AF; width:8px; height:8px; transform:rotate(-45deg) translate(1px,-1px); }
.side-link.active .nav-ico.ico-value::after { border-color:#fff; }
.side-foot { padding: 12px 8px 4px; }
.trial-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2);
  background: var(--primary-soft); padding: 6px 12px; border-radius: 999px; font-weight: 500;
}
.trial-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 64px; display: flex; align-items: center; gap: 14px;
  padding: 0 28px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30;
}
.menu-btn { display: none; }
.top-org { display: flex; flex-direction: column; line-height: 1.25; }
.org-name { font-weight: 600; font-size: 15px; }
.org-meta { font-size: 12px; color: var(--text-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.data-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.data-status.ok .status-dot { background: var(--success); }
.data-status.warn .status-dot { background: var(--warning); }
.top-date { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ai-chat-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500; color: var(--text);
  transition: all .15s;
}
.ai-chat-btn:hover { border-color: var(--primary); color: #0D9488; }
.spark { color: var(--primary); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #14B8A6, #3B82F6);
  color: #fff; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.side-backdrop { display: none; }

.content { padding: 26px 28px 48px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page { display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-title { font-size: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500;
  background: #F3F4F6; color: var(--text-2); padding: 4px 10px; border-radius: 999px;
}
.badge-teal { background: var(--primary-soft); color: #0D9488; }
.badge-blue { background: var(--blue-soft); color: #2563EB; }
.badge-warn { background: var(--warning-soft); color: #B45309; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-success { background: var(--success-soft); color: #15803D; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; border: 1px solid rgba(0,0,0,.02);
}
.section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 84px; }
.welcome-row { scroll-margin-top: 84px; }
.section-head { display: flex; align-items: center; justify-content: space-between; }
.section-head h3 { font-size: 16px; }
.link { font-size: 13px; font-weight: 500; }

/* ---------- 欢迎区 ---------- */
.welcome-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(120deg, #fff, #F0FDFA); border-radius: var(--radius-lg);
  padding: 26px 30px; box-shadow: var(--shadow);
}
.welcome-title { font-size: 26px; letter-spacing: -.3px; }
.score-card { text-align: right; }
.score-label { font-size: 13px; color: var(--text-2); }
.score-value { font-family: var(--font-num); font-size: 48px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.score-value.excellent { color: var(--success); }
.score-value.good { color: var(--primary); }
.score-value.fair { color: var(--warning); }
.score-value.warn { color: var(--danger); }
.score-grade { font-size: 13px; font-weight: 600; color: var(--text-2); }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.kpi-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 18px 16px; transition: transform .18s ease, box-shadow .18s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.kpi-label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.kpi-dot.blue { background: var(--blue); }
.kpi-dot.warn { background: var(--warning); }
.kpi-value { font-family: var(--font-num); font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-unit { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 2px; }
.kpi-delta { font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 3px; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }
.kpi-delta.flat { color: var(--text-3); }

/* ---------- 发现 ---------- */
.findings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.finding-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border-top: 3px solid transparent; }
.finding-card.risk { border-top-color: var(--danger); }
.finding-card.opportunity { border-top-color: var(--success); }
.finding-card.anomaly { border-top-color: var(--warning); }
.finding-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.finding-tag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }
.finding-tag.risk { background: var(--danger-soft); color: var(--danger); }
.finding-tag.opportunity { background: var(--success-soft); color: #15803D; }
.finding-tag.anomaly { background: var(--warning-soft); color: #B45309; }
.finding-title { font-size: 14px; font-weight: 600; line-height: 1.4; }
.finding-detail { font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* ---------- 建议 ---------- */
.suggestions-list { display: flex; flex-direction: column; gap: 12px; }
.suggestion-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; align-items: center; gap: 16px;
}
.sug-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--primary-soft); color: #0D9488; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.sug-icon.cost { background: var(--blue-soft); color: #2563EB; }
.sug-icon.loss { background: var(--danger-soft); color: var(--danger); }
.sug-body { flex: 1; min-width: 0; }
.sug-title { font-weight: 600; font-size: 15px; }
.sug-detail { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.sug-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.sug-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- 图表 ---------- */
.chart-card { padding: 20px; }
.chart-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.chart-tab {
  border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 6px 14px;
  font-size: 13px; font-weight: 500; color: var(--text-2); transition: all .15s;
}
.chart-tab.active { background: var(--primary-soft); border-color: transparent; color: #0D9488; font-weight: 600; }
.chart-wrap { position: relative; height: 260px; }
.chart-wrap svg { width: 100%; height: 100%; display: block; }

/* ---------- 行动中心 ---------- */
.action-preview { display: flex; flex-direction: column; gap: 10px; }
.action-item {
  display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px;
  box-shadow: var(--shadow); padding: 14px 16px;
}
.action-status { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.action-status.pending { background: var(--warning); }
.action-status.approved { background: var(--blue); }
.action-status.executing { background: var(--primary); }
.action-status.done { background: var(--success); }
.action-status.rejected { background: var(--text-3); }
.action-item-title { font-weight: 500; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-item-meta { font-size: 12px; color: var(--text-2); }
.action-value-chip { font-size: 12px; font-weight: 600; color: var(--primary); background: var(--primary-soft); padding: 3px 9px; border-radius: 999px; flex-shrink: 0; }

/* ---------- 商业价值 ---------- */
.value-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.value-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.value-card.highlight { background: linear-gradient(135deg, #14B8A6, #0D9488); color: #fff; }
.value-label { font-size: 12.5px; opacity: .85; }
.value-card.highlight .value-label { opacity: .85; }
.value-num { font-family: var(--font-num); font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.value-num.small { font-size: 19px; }

/* ---------- 看板 ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.kanban-col { display: flex; flex-direction: column; gap: 10px; }
.kanban-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 2px 4px; }
.kdot { width: 9px; height: 9px; border-radius: 50%; }
.kdot-pending { background: var(--warning); }
.kdot-approved { background: var(--primary); }
.kdot-done { background: var(--success); }
.kcount { font-size: 12px; color: var(--text-2); background: #F3F4F6; border-radius: 999px; padding: 1px 9px; }
.kanban-list { display: flex; flex-direction: column; gap: 10px; }
.k-card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; }
.k-card-title { font-weight: 600; font-size: 14px; }
.k-card-detail { font-size: 12.5px; color: var(--text-2); margin: 6px 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.k-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.k-card-meta { font-size: 11.5px; color: var(--text-3); margin-top: 8px; }
.k-impact { font-size: 12px; color: #0D9488; font-weight: 600; margin-bottom: 8px; }

/* ---------- 导入 ---------- */
.step-block { display: flex; flex-direction: column; gap: 16px; }
.dropzone {
  border: 2px dashed #D8DCE3; border-radius: var(--radius-lg); background: #fff;
  padding: 52px 24px; text-align: center; transition: all .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dz-icon { font-size: 34px; color: var(--primary); margin-bottom: 8px; }
.upload-status { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.sample-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sample-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.step-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mode-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.mode-tab { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 7px 14px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.mode-tab.active { background: var(--primary-soft); border-color: transparent; color: #0D9488; font-weight: 600; }
.mapping-table { overflow-x: auto; }
.mapping-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mapping-table th, .mapping-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); }
.mapping-table th { color: var(--text-2); font-weight: 500; font-size: 12.5px; background: #FAFBFC; }
.mapping-table select { border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; font-size: 13px; background: #fff; color: var(--text); outline: none; }
.mapping-table select:focus { border-color: var(--primary); }
.mapping-detect { font-size: 11.5px; margin-left: 6px; }
.mapping-detect.yes { color: var(--success); }
.mapping-detect.no { color: var(--text-3); }
.step-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.processing-card { text-align: center; padding: 46px 24px; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 16px;
  border: 3px solid var(--primary-soft); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pipeline { list-style: none; text-align: left; max-width: 420px; margin: 18px auto 0; display: flex; flex-direction: column; gap: 8px; }
.pipeline li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.pipeline li.done { color: var(--text); }
.pipeline li .p-ico { width: 20px; height: 20px; border-radius: 50%; background: #EEF0F4; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.pipeline li.done .p-ico { background: var(--success); color: #fff; }
.result-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.result-check { width: 44px; height: 44px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 22px; display: flex; align-items: center; justify-content: center; }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ---------- 空状态 ---------- */
.empty-card { text-align: center; padding: 56px 24px; }
.empty-ico { font-size: 40px; margin-bottom: 10px; }

/* ---------- 弹窗 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(17,24,39,.4); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(0,0,0,.16);
  width: 100%; max-width: 560px; max-height: 86vh; overflow: auto;
  animation: pop .2s ease;
}
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.plan-box { background: #FAFBFC; border-radius: 12px; padding: 14px 16px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; margin: 12px 0; }
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.impact-item { background: var(--primary-soft); border-radius: 12px; padding: 12px; text-align: center; }
.impact-item.cost { background: var(--blue-soft); }
.impact-item.loss { background: var(--danger-soft); }
.impact-num { font-family: var(--font-num); font-weight: 700; font-size: 18px; color: #0D9488; }
.impact-item.cost .impact-num { color: #2563EB; }
.impact-item.loss .impact-num { color: var(--danger); }
.impact-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.result-form .field input { width: 100%; }

/* ---------- AI 助手 ---------- */
.ai-assistant-card {
  display: flex; align-items: center; gap: 16px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #fff, #F0FDFA);
}
.aa-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--primary-soft); color: #0D9488; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.ai-assistant-card .btn { margin-left: auto; }
.ai-modal { max-width: 520px; }
.ai-chat { display: flex; flex-direction: column; gap: 12px; max-height: 46vh; overflow-y: auto; margin-bottom: 14px; }
.ai-msg { max-width: 84%; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; }
.ai-bot { background: #F3F4F6; color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-input-row { display: flex; gap: 8px; }
.ai-input-row input { flex: 1; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; font-size: 14px; outline: none; font-family: var(--font); }
.ai-input-row input:focus { border-color: var(--primary); }
.ai-feedback { display: flex; gap: 8px; justify-content: flex-end; margin-top: 2px; }
.ai-feedback .fb { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 3px 12px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.ai-feedback .fb:hover { border-color: var(--primary); color: #0D9488; }
.ai-feedback .fb:disabled { opacity: .5; cursor: default; }

/* ---------- 引导 ---------- */
.onboard { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 64px); padding: 24px; }
.onboard-card { width: 100%; max-width: 460px; padding: 32px; }
.onboard-step { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.pill-select { display: flex; gap: 8px; }
.pill { border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; font-size: 13px; color: var(--text-2); }
.pill.active { background: var(--primary-soft); border-color: transparent; color: #0D9488; font-weight: 600; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .value-grid { grid-template-columns: repeat(3, 1fr); }
  .findings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.12); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .side-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.3); z-index: 35; }
  .side-backdrop.show { display: block; }
}
@media (max-width: 768px) {
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .top-date { display: none; }
  .data-status span:last-child { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ai-chat-btn span { display: none; }
  .ai-chat-btn { padding: 7px 10px; }
  .welcome-row { flex-direction: column; align-items: flex-start; padding: 22px; }
  .score-card { text-align: left; }
  .score-value { font-size: 40px; }
  .findings-grid { grid-template-columns: 1fr; }
  .suggestion-card { flex-direction: column; align-items: stretch; }
  .sug-actions { width: 100%; }
  .sug-actions .btn { flex: 1; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: 1fr; }
  .chart-wrap { height: 220px; }
  .ai-assistant-card { flex-direction: column; align-items: flex-start; }
  .ai-assistant-card .btn { margin-left: 0; width: 100%; }
  .result-stats { grid-template-columns: repeat(2, 1fr); }
  .impact-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .mode-tabs { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: 1fr; }
  .top-org .org-meta { display: none; }
  .welcome-title { font-size: 22px; }
  .modal { max-height: 92vh; }
}

/* ============================================================
   Sprint 2 · AI店长 页面（参考 UI 风格）
   ============================================================ */
.side-ver { font-size: 10px; color: var(--text-3); font-weight: 500; margin-left: 4px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px; border-top: 1px solid var(--border); margin-bottom: 10px; }
.side-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #0D9488, #3B82F6);
  color: #fff; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.side-user-name { font-size: 13px; font-weight: 600; }
.role-tag { font-size: 10px; color: var(--primary); background: var(--primary-soft); padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.nav-ico.ico-ai::after { content:''; position:absolute; inset:4px 5px; border-radius:50%; background:#9CA3AF; box-shadow: 0 0 0 3px rgba(156,163,175,.25); }
.side-link.active .nav-ico.ico-ai::after { background:#fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.nav-ico.ico-analysis::after { content:''; position:absolute; inset:5px 6px; border-top:2px solid #9CA3AF; border-right:2px solid #9CA3AF; width:7px; height:7px; transform:rotate(45deg); }
.side-link.active .nav-ico.ico-analysis::after { border-color:#fff; }
.nav-ico.ico-report::after { content:''; position:absolute; inset:4px 6px; border:2px solid #9CA3AF; border-radius:2px; width:7px; height:9px; }
.side-link.active .nav-ico.ico-report::after { border-color:#fff; }
.nav-ico.ico-health::after { content:''; position:absolute; inset:5px 6px; background:#9CA3AF; border-radius:50%; width:7px; height:7px; box-shadow:0 0 0 2px #EEF0F4; }
.side-link.active .nav-ico.ico-health::after { background:#fff; box-shadow:0 0 0 2px rgba(255,255,255,.4); }
.nav-ico.ico-orders::after { content:''; position:absolute; inset:4px 5px; border:2px solid #9CA3AF; border-radius:3px; width:8px; height:9px; }
.side-link.active .nav-ico.ico-orders::after { border-color:#fff; }
.nav-ico.ico-products::after { content:''; position:absolute; inset:4px 6px; border-radius:50% 50% 45% 45%; background:#9CA3AF; width:7px; height:8px; }
.side-link.active .nav-ico.ico-products::after { background:#fff; }
.nav-ico.ico-customers::after { content:''; position:absolute; inset:4px 6px; border:2px solid #9CA3AF; border-radius:50%; width:6px; height:6px; box-shadow:0 5px 0 -1.5px #fff, 0 5px 0 -1.5px #9CA3AF; }
.side-link.active .nav-ico.ico-customers::after { border-color:#fff; box-shadow:0 5px 0 -1.5px #fff, 0 5px 0 -1.5px #fff; }
.nav-ico.ico-inventory::after { content:''; position:absolute; inset:4px 6px; border:2px solid #9CA3AF; border-top:4px solid #9CA3AF; border-radius:2px; width:7px; height:6px; }
.side-link.active .nav-ico.ico-inventory::after { border-color:#fff; border-top-color:#fff; }
.nav-ico.ico-employees::after { content:''; position:absolute; inset:5px 7px; border:2px solid #9CA3AF; border-radius:50% 50% 0 0; width:6px; height:5px; }
.side-link.active .nav-ico.ico-employees::after { border-color:#fff; }
.nav-ico.ico-marketing::after { content:''; position:absolute; inset:5px 6px; border:2px solid #9CA3AF; border-radius:50%; width:7px; height:7px; }
.side-link.active .nav-ico.ico-marketing::after { border-color:#fff; }
.nav-ico.ico-billing::after { content:''; position:absolute; inset:4px 6px; border:2px solid #9CA3AF; border-radius:3px; width:7px; height:8px; }
.side-link.active .nav-ico.ico-billing::after { border-color:#fff; }
.nav-ico.ico-usage::after { content:''; position:absolute; inset:4px 5px; border:2px solid #9CA3AF; border-radius:50%; width:9px; height:9px; border-top-color:transparent; }
.side-link.active .nav-ico.ico-usage::after { border-color:#fff; border-top-color:#fff; }
.nav-ico.ico-admin::after { content:''; position:absolute; inset:5px 6px; border:2px solid #9CA3AF; width:8px; height:8px; transform:rotate(45deg); }
.side-link.active .nav-ico.ico-admin::after { border-color:#fff; }

.top-title-wrap { display: flex; flex-direction: column; line-height: 1.25; }
.top-title { font-weight: 700; font-size: 17px; }
.top-sub { font-size: 12px; color: var(--text-2); }
.guide-link { font-size: 13px; color: var(--text-2); font-weight: 500; }
.guide-link:hover { color: var(--primary); }
.bell-btn { position: relative; }
.bell-ico { font-size: 16px; }
.bell-dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }

/* ---- 筛选栏 ---- */
.filter-bar { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-radius: 14px; }
.filter-item { display: flex; align-items: center; gap: 8px; }
.f-label { font-size: 12.5px; color: var(--text-2); }
.f-value { font-size: 13px; font-weight: 600; }
.f-caret { font-size: 10px; color: var(--text-3); }
.filter-sep { width: 1px; height: 18px; background: var(--border); }
.filter-spacer { flex: 1; }
.filter-updated { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.ok-dot { background: var(--success); }

/* ---- Hero AI 诊断卡 ---- */
.hero-ai {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-radius: var(--radius-lg); padding: 26px 30px;
  background: linear-gradient(120deg, #F0FDFA 0%, #CCFBF1 55%, #FFFFFF 100%);
  position: relative; overflow: hidden;
}
.hero-ai-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.ai-avatar-ring {
  width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(from 0deg, #0D9488, #3B82F6, #14B8A6, #0D9488);
  padding: 3px; animation: rotate-halo 8s linear infinite;
}
@keyframes rotate-halo { to { transform: rotate(360deg); } }
.ai-avatar-core {
  width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, #0D9488, #0F766E);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.hero-ai-status { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.status-chip { background: var(--success); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.status-chip.warn { background: var(--warning); }
.status-chip.danger { background: var(--danger); }
.status-chip.info { background: var(--blue); }
.hero-ai-title { font-size: 17px; font-weight: 600; line-height: 1.5; }
.hero-ai-meta { font-size: 12px; margin-top: 6px; }
.hero-ai-right { display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.hero-bar {
  width: 14px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #14B8A6, #5EEAD4);
  opacity: .85; transition: height .4s ease;
}
.hero-bar:nth-child(3n) { background: linear-gradient(180deg, #3B82F6, #93C5FD); }

/* ---- KPI 矩阵 ---- */
.kpi-matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi-m-card {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px 12px;
  display: flex; flex-direction: column; gap: 6px; transition: transform .18s, box-shadow .18s;
}
.kpi-m-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.kpi-m-head { display: flex; align-items: center; justify-content: space-between; }
.kpi-m-label { font-size: 12.5px; color: var(--text-2); }
.kpi-m-delta { font-size: 12px; font-weight: 600; }
.kpi-m-delta.up { color: var(--success); }
.kpi-m-delta.down { color: var(--danger); }
.kpi-m-delta.flat { color: var(--text-3); }
.kpi-m-value { font-family: var(--font-num); font-size: 26px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi-m-value .unit { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 2px; }
.kpi-m-foot { display: flex; align-items: flex-end; justify-content: space-between; }
.kpi-m-note { font-size: 11.5px; color: var(--text-3); }
.kpi-m-spark { width: 76px; height: 28px; }

/* ---- 双栏布局 ---- */
.ai-two-col { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.ai-main-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ai-side-col { display: flex; flex-direction: column; gap: 18px; }

/* ---- AI 简报 Q&A ---- */
.brief-card { padding: 6px 4px; }
.brief-item { display: flex; gap: 14px; padding: 14px 18px; }
.brief-item + .brief-item { border-top: 1px solid var(--border); }
.brief-ico { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.brief-ico.g { background: var(--success-soft); }
.brief-ico.b { background: var(--blue-soft); }
.brief-ico.o { background: var(--warning-soft); }
.brief-ico.t { background: var(--primary-soft); }
.brief-q { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.brief-a { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.brief-a b { color: var(--text); font-weight: 600; }

/* ---- TOP1 行动建议 ---- */
.top-action-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(120deg, #FFFFFF, #F0FDFA);
  display: flex; align-items: center; gap: 18px; padding: 20px 24px;
}
.top-action-left { flex-shrink: 0; }
.top-badge { background: var(--warning); color: #fff; font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 8px; letter-spacing: .5px; }
.top-action-body { flex: 1; min-width: 0; }
.top-action-title { font-size: 16px; font-weight: 600; }
.top-action-impact { margin-top: 4px; }
.top-action-impact .impact-num { color: var(--success); }
.top-action-desc { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.top-action-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---- 快捷提问 ---- */
.quick-ask-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-ask-chip {
  border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 9px 16px; font-size: 13px; color: var(--text); font-weight: 500;
  transition: all .15s; cursor: pointer;
}
.quick-ask-chip:hover { border-color: var(--primary); color: #0D9488; background: var(--primary-soft); }

/* ---- 预警列表 ---- */
.alert-card { padding: 6px 0; }
.alert-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 18px; }
.alert-item + .alert-item { border-top: 1px solid var(--border); }
.alert-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.alert-dot.risk { background: var(--danger); }
.alert-dot.warn { background: var(--warning); }
.alert-dot.info { background: var(--blue); }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-size: 13.5px; font-weight: 600; }
.alert-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }
.alert-tag { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.alert-tag.high { background: var(--danger-soft); color: var(--danger); }
.alert-tag.mid { background: var(--warning-soft); color: #B45309; }
.alert-tag.low { background: var(--blue-soft); color: #2563EB; }

/* ---- 任务清单 ---- */
.task-card { padding: 6px 0; }
.task-item { display: flex; align-items: center; gap: 11px; padding: 12px 18px; }
.task-item + .task-item { border-top: 1px solid var(--border); }
.task-check {
  width: 18px; height: 18px; border-radius: 6px; border: 2px solid #D8DCE3; flex-shrink: 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.task-check:hover { border-color: var(--primary); }
.task-check.done { background: var(--primary); border-color: var(--primary); }
.task-check.done::after { content:'✓'; color: #fff; font-size: 11px; font-weight: 700; }
.task-title { font-size: 13px; font-weight: 500; flex: 1; min-width: 0; }
.task-title.done-text { color: var(--text-3); text-decoration: line-through; }
.task-state { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.task-state.IN_PROGRESS { background: var(--blue-soft); color: #2563EB; }
.task-state.NEW { background: #F3F4F6; color: var(--text-2); }
.task-state.WAITING_APPROVAL { background: var(--warning-soft); color: #B45309; }
.task-state.COMPLETED { background: var(--success-soft); color: #15803D; }

/* ---- 健康度雷达 ---- */
.health-card { position: relative; text-align: center; padding: 16px 16px 18px; }
.radar-wrap { width: 100%; height: 220px; position: relative; }
.radar-wrap svg { width: 100%; height: 100%; }
.health-center {
  position: absolute; top: 96px; left: 50%; transform: translateX(-50%);
  text-align: center; pointer-events: none;
}
.health-score { font-family: var(--font-num); font-size: 34px; font-weight: 700; color: var(--primary); line-height: 1; }
.health-center .muted { font-size: 11px; }
.health-grade { font-size: 13px; font-weight: 600; margin-top: 6px; color: var(--text); }

/* ---- 维度拆解组件 ---- */
.an-bd-row { margin-bottom: 16px; }
.an-bd-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.an-bd-bars { display: flex; flex-direction: column; gap: 10px; }
.bd-bar .bd-bar-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.bd-bar .bd-bar-val { color: var(--text-2); font-variant-numeric: tabular-nums; }
.bd-track { height: 8px; background: #F1F5F9; border-radius: 999px; overflow: hidden; }
.bd-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #14B8A6, #5EEAD4); }
.bd-bar .up { color: var(--success); } .bd-bar .down { color: var(--danger); }
.an-bd-hours { margin-top: 4px; }
.bcg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.bcg-box { background: #FAFBFC; border-radius: 12px; padding: 14px; }
.bcg-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.bcg-title::before { content:''; display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; background: var(--primary); }
.bcg-box:nth-child(2) .bcg-title::before { background: var(--blue); }
.bcg-box:nth-child(3) .bcg-title::before { background: var(--warning); }
.bcg-box:nth-child(4) .bcg-title::before { background: var(--danger); }
.bcg-item { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.bcg-item:last-child { border-bottom: none; }
.bcg-name { font-weight: 500; }
.bcg-meta { color: var(--text-2); font-size: 11.5px; }

@media (max-width: 768px) { .bcg-grid { grid-template-columns: 1fr; } }

/* ---- Sprint 3 · 业务中心 ---- */
.top3-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.top3-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--primary); }
.top3-card.p0 { border-left-color: var(--danger); }
.top3-card.p1 { border-left-color: var(--warning); }
.top3-card.p2 { border-left-color: var(--blue); }
.top3-head { display: flex; align-items: center; justify-content: space-between; }
.top3-pri { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.top3-pri.p0 { background: var(--danger-soft); color: var(--danger); }
.top3-pri.p1 { background: var(--warning-soft); color: #B45309; }
.top3-pri.p2 { background: var(--blue-soft); color: #2563EB; }
.top3-pri.p3 { background: #F3F4F6; color: var(--text-2); }
.top3-title { font-size: 14px; font-weight: 600; line-height: 1.4; }
.top3-evidence { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.top3-value { font-size: 12.5px; font-weight: 700; color: var(--primary); }
.top3-metrics { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.top3-metrics b { color: var(--text); font-weight: 700; }

.biz-filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.biz-filter-row input, .biz-filter-row select {
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-family: var(--font);
  background: #fff; color: var(--text); outline: none; min-width: 120px;
}
.biz-filter-row input:focus, .biz-filter-row select:focus { border-color: var(--primary); }
.biz-search { flex: 1; min-width: 160px; }
.biz-list { overflow-x: auto; }
.biz-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.biz-table th { text-align: left; padding: 12px 12px; color: var(--text-2); font-weight: 500; font-size: 12.5px; border-bottom: 1px solid var(--border); background: #FAFBFC; white-space: nowrap; }
.biz-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.biz-table tbody tr { transition: background .12s; }
.biz-table tbody tr:hover { background: #FAFBFC; }
.biz-table .rowlink { cursor: pointer; }
.biz-table .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; }
.biz-table .main { font-weight: 600; color: var(--primary); }
.bs {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
.bs.ok { background: var(--success-soft); color: #15803D; }
.bs.warn { background: var(--warning-soft); color: #B45309; }
.bs.danger { background: var(--danger-soft); color: var(--danger); }
.bs.info { background: var(--blue-soft); color: #2563EB; }
.bs.gray { background: #F3F4F6; color: var(--text-2); }
.biz-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 14px; }
.biz-pager .pg-btn { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.biz-pager .pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.biz-pager .pg-info { font-size: 12.5px; color: var(--text-2); }
.biz-detail-section { margin-bottom: 14px; }
.biz-detail-section h4 { font-size: 13px; margin-bottom: 8px; color: var(--text-2); }
.biz-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; font-size: 13px; }
.biz-detail-grid .dk { color: var(--text-2); }
.biz-detail-grid .dv { font-weight: 500; }
.biz-action-btn { display: inline-flex; gap: 6px; align-items: center; }

@media (max-width: 768px) {
  .top3-grid { grid-template-columns: 1fr; }
  .biz-table { min-width: 560px; }
  .biz-detail-grid { grid-template-columns: 1fr; }
}

/* ---- Sprint 5 · 连接中心 ---- */
.cn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cn-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.cn-head { display: flex; align-items: center; justify-content: space-between; }
.cn-cat { font-size: 11px; font-weight: 600; color: var(--text-2); background: #F3F4F6; padding: 2px 9px; border-radius: 999px; }
.cn-name { font-size: 14.5px; font-weight: 600; }
.cn-meta { font-size: 11.5px; }
.cn-actions { display: flex; gap: 8px; margin-top: 4px; }
@media (max-width: 900px) { .cn-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cn-grid { grid-template-columns: 1fr; } }

/* ---- Sprint 8 · Onboarding 向导 ---- */
.ob-wrap { max-width: 640px; margin: 0 auto; padding: 24px 0 60px; }
.ob-top { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.ob-progress { flex: 1; display: flex; gap: 6px; }
.ob-progress .seg { flex: 1; height: 6px; border-radius: 99px; background: #E5E7EB; }
.ob-progress .seg.on { background: var(--primary); }
.ob-step-card { background: #fff; border-radius: var(--radius-lg); box-shadow: 0 8px 30px rgba(0,0,0,.06); padding: 36px 34px; }
.ob-step-num { font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: 1px; margin-bottom: 10px; }
.ob-title { font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.ob-sub { color: var(--t2); margin: 10px 0 24px; line-height: 1.7; }
.ob-industries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ob-ind { border: 2px solid var(--border); border-radius: 16px; padding: 18px; cursor: pointer; transition: all .15s; position: relative; }
.ob-ind:hover { border-color: #CBD5E1; }
.ob-ind.selected { border-color: var(--primary); background: var(--primary-soft); }
.ob-ind .in { font-size: 22px; }
.ob-ind .nm { font-weight: 700; margin-top: 6px; }
.ob-ind .ds { font-size: 12px; color: var(--t2); margin-top: 2px; }
.ob-ind .tag { position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.ob-ind .tag.hot { background: var(--primary); color: #fff; }
.ob-ind .tag.soon { background: #F3F4F6; color: var(--t2); }
.ob-btn-row { display: flex; gap: 10px; justify-content: space-between; margin-top: 26px; }
.ob-actions { display: flex; gap: 10px; }
.ob-findings .ob-f { border-left: 3px solid var(--border); padding: 12px 14px; border-radius: 8px; background: #FAFBFC; margin-bottom: 10px; }
.ob-f .p { font-weight: 700; }
.ob-f .e, .ob-f .i, .ob-f .s { font-size: 13px; color: var(--t2); margin-top: 3px; }
.ob-f .s b { color: #0D9488; }
@media (max-width: 520px) { .ob-industries { grid-template-columns: 1fr; } .ob-step-card { padding: 26px 20px; } }

/* ---- 登录/注册 · 密码显隐 + 自动填充 ---- */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 15px; opacity: .55; padding: 6px; line-height: 1; }
.pw-toggle:hover { opacity: .9; }
/* 浏览器自动填充底色修复（蓝紫色 → 白） */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #111827 !important;
  caret-color: #111827;
  transition: background-color 999999s ease-in-out 0s;
}
input:-webkit-autofill { -webkit-text-fill-color: #111827 !important; }

/* ---- Sprint 7 · 套餐卡片 ---- */
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 6px; border: 1px solid transparent; }
.plan-card.active { border-color: var(--primary); box-shadow: 0 8px 30px rgba(20,184,166,.12); }
.plan-name { font-size: 15px; font-weight: 700; }
.plan-price { font-family: var(--font-num); font-size: 26px; font-weight: 700; }
.plan-desc { font-size: 12px; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .plan-grid { grid-template-columns: 1fr; } }

/* ---- 经营分析中心入口 ---- */
.analysis-home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.an-home-card {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 18px;
  display: flex; align-items: center; gap: 14px; transition: all .18s; cursor: pointer;
}
.an-home-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.an-home-ico { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.an-home-title { font-size: 14.5px; font-weight: 600; }
.an-home-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* 分析页面通用 */
.an-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.range-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.range-tab { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 7px 14px; font-size: 13px; color: var(--text-2); font-weight: 500; cursor: pointer; transition: all .15s; }
.range-tab.active { background: var(--primary-soft); border-color: transparent; color: #0D9488; font-weight: 600; }
.ai-explain-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: #0D9488; background: var(--primary-soft); border: none; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.ai-explain-btn:hover { background: #D9F2EC; }
.an-chart-card { padding: 18px 20px; }
.an-chart-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.ai-note { font-size: 12px; color: var(--text-2); background: #FAFBFC; border-radius: 10px; padding: 10px 14px; margin-top: 10px; line-height: 1.7; border-left: 3px solid var(--primary); }

@media (max-width: 1280px) {
  .kpi-matrix { grid-template-columns: repeat(2, 1fr); }
  .ai-two-col { grid-template-columns: 1fr; }
  .analysis-home-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero-ai { flex-direction: column; align-items: flex-start; padding: 20px; }
  .hero-ai-right { display: none; }
  .filter-bar { flex-wrap: wrap; gap: 8px; }
  .filter-sep { display: none; }
  .filter-spacer { display: none; }
  .top-action-card { flex-direction: column; align-items: stretch; }
  .top-action-actions { width: 100%; }
  .top-action-actions .btn { flex: 1; }
  .analysis-home-grid { grid-template-columns: 1fr; }
  .kpi-matrix { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* S11 · Proactive TOP3 */
.proactive-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.proactive-card{background:#fff;border:1px solid #e8edf2;border-radius:16px;padding:16px 18px;position:relative;overflow:hidden;transition:box-shadow .2s}
.proactive-card:hover{box-shadow:0 6px 18px rgba(20,184,166,.12)}
.proactive-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px}
.proactive-card.p0:before{background:#e5484d}.proactive-card.p1:before{background:#f5a623}.proactive-card.p2:before{background:#14B8A6}
.proactive-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.proactive-badge{font-size:11px;font-weight:700;padding:2px 8px;border-radius:99px}
.proactive-badge.p0{background:#fdecec;color:#d33}.proactive-badge.p1{background:#fef3e2;color:#c2740a}.proactive-badge.p2{background:#e7f8f3;color:#0e9384}
.proactive-type{font-size:11px;color:#6b7a90}
.proactive-title{font-size:14.5px;font-weight:600;line-height:1.45;margin-bottom:6px}
.proactive-why{font-size:12.5px;color:#6b7a90;line-height:1.55;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:10px}
.proactive-meta{display:flex;gap:10px;font-size:11.5px;color:#6b7a90;margin-bottom:12px;flex-wrap:wrap}
.proactive-meta b{color:#1a2332}
.proactive-actions{display:flex;gap:8px;flex-wrap:wrap}
.proactive-btn{font-size:12px;padding:5px 12px;border-radius:99px;border:1px solid #e0e6ec;background:#fff;color:#334155;cursor:pointer;transition:all .15s}
.proactive-btn:hover{border-color:#14B8A6;color:#0e9384}
.proactive-btn.primary{background:#14B8A6;border-color:#14B8A6;color:#fff}
.proactive-btn.primary:hover{background:#0f9d8f}
.proactive-btn:disabled{opacity:.5;cursor:default}
.proactive-detail{margin-top:12px;padding-top:12px;border-top:1px dashed #e8edf2;font-size:12.5px;color:#475569;line-height:1.6;display:none}
.proactive-detail.open{display:block}
.proactive-ev{font-size:11.5px;color:#6b7a90;margin-top:6px}
.proactive-empty{background:#fff;border:1px dashed #e8edf2;border-radius:16px;padding:22px;text-align:center;color:#6b7a90;font-size:13.5px}
@media(max-width:720px){.proactive-grid{grid-template-columns:1fr}}

/* ===== S11-M · 移动端 AI 店长（按设计稿 8/29） ===== */
.mm-wrap{max-width:430px;margin:0 auto;padding:14px 16px calc(84px + env(safe-area-inset-bottom));min-height:100vh;background:var(--bg)}
.mm-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.mm-store{font-size:13px;font-weight:600;color:var(--ink-2);background:var(--card);border:1px solid var(--line);border-radius:99px;padding:6px 14px}
.mm-user{font-size:13px;font-weight:600;color:var(--teal-deep);background:var(--teal-soft);border-radius:99px;padding:6px 14px}
.mm-date{font-size:21px;font-weight:800;letter-spacing:-.3px;margin-bottom:14px}
.mm-score{background:linear-gradient(135deg,#0F766E,#14B8A6);border-radius:18px;padding:18px 20px;color:#fff;margin-bottom:16px}
.mm-score-head{font-size:12.5px;opacity:.85}
.mm-score-body{display:flex;align-items:center;gap:14px;margin-top:6px}
.mm-score-num{font-size:44px;font-weight:800;font-family:var(--num);line-height:1}
.mm-score-txt{font-size:13px;line-height:1.5;opacity:.95}
.mm-score-link{color:#fff;font-size:12.5px;font-weight:600;margin-top:10px;opacity:.9}
.mm-sec-title{font-size:14px;font-weight:700;margin:18px 0 10px;display:flex;align-items:center;gap:8px}
.mm-count{font-size:11px;color:var(--faint)}
.mm-count.green{color:var(--green)}
.mm-kpis{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mm-kpi{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.mm-kpi .l{font-size:11.5px;color:var(--muted)}
.mm-kpi .v{font-size:19px;font-weight:800;font-family:var(--num);margin:2px 0}
.mm-kpi .d{font-size:11px;font-weight:600}
.mm-kpi .d.up{color:var(--green)}.mm-kpi .d.down{color:var(--red)}
.mm-issue{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:13px 15px;margin-bottom:10px;border-left:3px solid var(--red)}
.mm-issue.opp{border-left-color:var(--green)}
.mm-issue h4{font-size:13.5px;font-weight:700;margin-bottom:3px}
.mm-issue p{font-size:12.5px;color:var(--ink-2);line-height:1.5}
.mm-issue .meta{font-size:11.5px;color:var(--faint);margin-top:6px}
.mm-advice{background:linear-gradient(135deg,#0F766E,#14B8A6);border-radius:16px;padding:16px 18px;color:#fff;margin-top:16px}
.mm-advice-head{font-size:12.5px;opacity:.85}
.mm-advice-txt{font-size:13.5px;font-weight:600;line-height:1.55;margin-top:6px}
.mm-advice-meta{font-size:12px;opacity:.9;margin-top:8px}
.mm-advice-actions{display:flex;gap:10px;margin-top:14px}
.mm-btn{flex:1;padding:10px 0;border-radius:99px;font-size:13px;font-weight:600}
.mm-btn.light{background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.3)}
.mm-btn.solid{background:#fff;color:#0F766E}
.mm-action{display:flex;align-items:center;gap:12px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:11px 13px;margin-bottom:8px}
.mm-action .st{font-size:10.5px;font-weight:700;padding:3px 9px;border-radius:99px;flex-shrink:0}
.mm-action .st.warm{background:var(--amber-soft);color:var(--amber)}
.mm-action .st.done{background:var(--green-soft);color:var(--green)}
.mm-action .st.cold{background:var(--teal-soft);color:var(--teal-deep)}
.mm-action .t{font-size:13px;font-weight:600;flex:1}
.mm-action .tm{font-size:11px;color:var(--faint)}
.mm-new-action{width:100%;padding:11px;border-radius:12px;border:1px dashed var(--line);color:var(--teal-deep);font-size:13px;font-weight:600;background:var(--card);margin-top:4px}
.mm-ask{display:flex;gap:8px;margin-top:20px}
.mm-ask input{flex:1;border:1px solid var(--line);border-radius:99px;padding:11px 16px;font-size:13.5px;outline:none;background:var(--card)}
.mm-ask button{background:var(--teal);color:#fff;border-radius:99px;padding:0 18px;font-weight:600;font-size:13px}
.mm-chips{display:flex;gap:8px;overflow-x:auto;padding:12px 0 4px;-webkit-overflow-scrolling:touch}
.mm-chip{flex-shrink:0;font-size:12px;color:var(--ink-2);background:var(--card);border:1px solid var(--line);border-radius:99px;padding:7px 13px}
.mm-answer{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin-top:12px;font-size:13.5px;line-height:1.65;white-space:pre-wrap}
.mm-tab{position:fixed;bottom:0;left:0;right:0;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-top:1px solid var(--line);display:flex;z-index:50;padding:8px 4px calc(6px + env(safe-area-inset-bottom))}
.mm-tab-i{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;color:var(--faint);font-size:10.5px;text-decoration:none}
.mm-tab-i i{font-style:normal;font-size:18px}
.mm-tab-i.active{color:var(--teal-deep);font-weight:600}

/* ===== 智盈 V2 · 认证页（按设计稿：#FF6A00 主色 / 手机号+密码 / 4 视图） ===== */
.z-auth{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:linear-gradient(160deg,#FFF7F0 0%,#FFFFFF 42%,#FFF3E8 100%)}
.z-auth-card{width:100%;max-width:420px;background:#fff;border-radius:20px;padding:36px 34px;box-shadow:0 12px 40px rgba(255,106,0,.08),0 2px 8px rgba(15,23,42,.05);border:1px solid #FCE8D8;animation:zFade .3s ease}
@keyframes zFade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.z-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}
.z-brand-mark{width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,#FF6A00,#FF8A3D);color:#fff;font-size:21px;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(255,106,0,.3)}
.z-brand-name{font-size:16px;font-weight:800;color:#1A1A2E}
.z-brand-sub{font-size:11.5px;color:#8A8AA0}
.z-title{font-size:23px;font-weight:800;letter-spacing:-.4px;color:#1A1A2E}
.z-sub{font-size:13px;color:#8A8AA0;margin:4px 0 22px}
.z-form{display:flex;flex-direction:column;gap:14px}
.z-field label{display:block;font-size:12.5px;font-weight:600;color:#4A4A66;margin-bottom:6px}
.z-field input{width:100%;border:1.5px solid #E6E6F0;border-radius:12px;padding:12px 14px;font-size:14.5px;outline:none;transition:border-color .18s,box-shadow .18s;background:#FBFAFE}
.z-field input:focus{border-color:#FF6A00;box-shadow:0 0 0 4px rgba(255,106,0,.14);background:#fff}
.z-err{font-size:12px;color:#E5484D;margin-top:5px;min-height:0}
.z-row{display:flex;justify-content:flex-end;margin-top:-6px}
.z-link{color:#8A8AA0;font-size:12.5px;text-decoration:none}
.z-link.strong{color:#FF6A00;font-weight:700}
.z-link:hover{color:#FF6A00}
.z-btn{width:100%;padding:13px;border-radius:12px;background:linear-gradient(135deg,#FF6A00,#FF8A3D);color:#fff;font-size:15px;font-weight:700;border:none;cursor:pointer;transition:transform .15s,box-shadow .15s;box-shadow:0 4px 14px rgba(255,106,0,.25)}
.z-btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(255,106,0,.35)}
.z-btn:active{transform:translateY(0)}
.z-btn:disabled{opacity:.6;cursor:default}
.z-foot{text-align:center;font-size:13px;color:#8A8AA0;margin-top:18px}
.z-divider{display:flex;align-items:center;gap:12px;margin:20px 0 14px;color:#C6C6D8;font-size:12px}
.z-divider::before,.z-divider::after{content:"";flex:1;height:1px;background:#EFEFF6}
.z-alt{display:flex;gap:10px}
.z-alt-btn{flex:1;padding:10px 0;border-radius:12px;border:1.5px solid #E6E6F0;background:#fff;font-size:13px;color:#4A4A66;cursor:pointer;transition:border-color .15s,color .15s}
.z-alt-btn:hover{border-color:#FF6A00;color:#FF6A00}
.z-agree{font-size:12px;color:#8A8AA0;display:flex;align-items:center;gap:8px}
.z-agree input{width:15px;height:15px;accent-color:#FF6A00}
.z-code-row{display:flex;gap:8px}
.z-code-row input{flex:1}
.z-code-btn{flex-shrink:0;padding:0 16px;border-radius:12px;border:1.5px solid #FF6A00;color:#FF6A00;background:#fff;font-size:12.5px;font-weight:600;cursor:pointer}
.z-code-btn:disabled{opacity:.5}
.z-success-ico{width:64px;height:64px;border-radius:50%;background:linear-gradient(135deg,#FF6A00,#FF8A3D);color:#fff;font-size:30px;font-weight:800;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;box-shadow:0 8px 24px rgba(255,106,0,.3)}
@media (max-width:768px){.z-auth-card{padding:28px 22px;border-radius:16px;box-shadow:none;border:1px solid #FCE8D8}}
