/* ============================================================
   组件样式
   ============================================================ */

/* ---- 申报类型徽章 ---- */
.type-badge {
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 10px; border-radius:12px; font-size:11px; font-weight:700; white-space:nowrap;
}
.type-tech { background:#ede9fe; color:#5b21b6; }
.type-high { background:#fef9c3; color:#854d0e; }
.type-special { background:#d1fae5; color:#065f46; }
.type-giant { background:#fee2e2; color:#991b1b; }
.type-innovative { background:#dbeafe; color:#1e40af; }
.type-potential-unicorn { background:#d1fae5; color:#065f46; }
.type-unicorn { background:#fee2e2; color:#991b1b; }
.type-gazelle { background:#ccfbf1; color:#0d9488; }

/* ---- 申报进度流程条 ---- */
.flow-steps {
  display:flex; gap:0; align-items:center; padding:12px 0;
}
.flow-step {
  flex:1; text-align:center; position:relative;
}
.flow-step-inner {
  display:flex; flex-direction:column; align-items:center; gap:4px;
}
.flow-dot {
  width:28px; height:28px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; border:2px solid var(--border); background:#fff;
  color:var(--text-light); z-index:1; position:relative;
}
.flow-step.s-done .flow-dot { background:var(--success); border-color:var(--success); color:#fff; }
.flow-step.s-active .flow-dot { background:var(--primary); border-color:var(--primary); color:#fff; box-shadow:0 0 0 3px rgba(26,86,219,.2); }
.flow-step.s-warn .flow-dot { background:var(--warning); border-color:var(--warning); color:#fff; }
.flow-label { font-size:11px; color:var(--text-sub); }
.flow-step.s-done .flow-label { color:var(--success); font-weight:600; }
.flow-step.s-active .flow-label { color:var(--primary); font-weight:600; }
.flow-conn {
  flex:1; height:2px; background:var(--border); margin-bottom:18px;
}
.flow-conn.done { background:var(--success); }

/* ---- 企业梯度层级可视化 ---- */
.gradient-pyramid { text-align:center; padding:16px 0; }
.pyramid-layer {
  margin:0 auto; height:44px; display:flex; align-items:center;
  justify-content:center; border-radius:4px; margin-bottom:4px;
  color:#fff; font-weight:700; font-size:13px; cursor:pointer; transition:.2s;
}
.pyramid-layer:hover { opacity:.85; filter:brightness(1.05); }
.layer-l1 { background:linear-gradient(90deg,#b91c1c,#dc2626); width:30%; }
.layer-l2 { background:linear-gradient(90deg,#d97706,#f59e0b); width:50%; }
.layer-l3 { background:linear-gradient(90deg,#0e9f6e,#10b981); width:70%; }
.layer-l4 { background:linear-gradient(90deg,#1a56db,#3b82f6); width:90%; }
.layer-label-row { display:flex; justify-content:center; margin-bottom:16px; gap:12px; flex-wrap:wrap; }
.layer-label-item { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--text-sub); }
.layer-dot { width:10px; height:10px; border-radius:2px; }

/* ---- 预警卡片 ---- */
.warn-card {
  border-radius:8px; padding:14px 16px; margin-bottom:10px;
  border-left:4px solid transparent; display:flex; align-items:flex-start; gap:10px;
}
.warn-card.high { background:#fff5f5; border-left-color:var(--danger); }
.warn-card.mid { background:#fffbeb; border-left-color:var(--warning); }
.warn-card.low { background:#f0fdf4; border-left-color:var(--success); }
.warn-level {
  padding:2px 8px; border-radius:10px; font-size:11px; font-weight:700; white-space:nowrap;
}
.warn-level.high { background:var(--danger); color:#fff; }
.warn-level.mid { background:var(--warning); color:#fff; }
.warn-level.low { background:var(--success); color:#fff; }
.warn-body { flex:1; }
.warn-title { font-size:13px; font-weight:600; }
.warn-desc { font-size:12px; color:var(--text-sub); margin-top:2px; line-height:1.5; }
.warn-meta { font-size:11px; color:var(--text-light); margin-top:4px; }

/* ---- AI推荐服务卡片 ---- */
.service-card {
  border:1px solid var(--border); border-radius:10px; padding:14px 16px;
  margin-bottom:10px; cursor:pointer; transition:.2s; position:relative; overflow:hidden;
}
.service-card:hover { border-color:var(--primary); box-shadow:var(--shadow-md); }
.service-card::before {
  content:''; position:absolute; left:0; top:0; bottom:0;
  width:4px; background:var(--primary);
}
.service-card.orange::before { background:var(--warning); }
.service-card.green::before { background:var(--success); }
.service-card.purple::before { background:var(--purple); }
.sc-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.sc-title { font-weight:700; font-size:13px; }
.sc-match { font-size:11px; color:var(--success); font-weight:600; }
.sc-tags { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.sc-desc { font-size:12px; color:var(--text-sub); line-height:1.5; }
.sc-action { display:flex; justify-content:flex-end; margin-top:8px; }

/* ---- 企业画像雷达展示 ---- */
.portrait-header {
  display:flex; align-items:center; gap:12px; padding:16px;
  background:linear-gradient(135deg,#f0f4ff,#e8f0fe); border-radius:10px; margin-bottom:16px;
}
.portrait-avatar {
  width:56px; height:56px; border-radius:12px; background:var(--primary);
  color:#fff; display:flex; align-items:center; justify-content:center; font-size:22px;
}
.portrait-info h3 { font-size:16px; font-weight:700; }
.portrait-info p { font-size:12px; color:var(--text-sub); }
.portrait-tags { display:flex; gap:6px; margin-top:4px; flex-wrap:wrap; }

/* ---- 数据闭环图 ---- */
.loop-diagram {
  display:flex; align-items:center; justify-content:space-around; padding:20px 10px;
}
.loop-node {
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:12px 16px; border-radius:12px; min-width:90px; text-align:center;
}
.loop-node.n1 { background:#dbeafe; color:#1e40af; }
.loop-node.n2 { background:#d1fae5; color:#065f46; }
.loop-node.n3 { background:#fef9c3; color:#854d0e; }
.loop-node.n4 { background:#fce7f3; color:#9d174d; }
.loop-node.n5 { background:#ede9fe; color:#5b21b6; }
.loop-icon { font-size:24px; }
.loop-label { font-size:11px; font-weight:700; }
.loop-arrow { font-size:20px; color:var(--text-light); }

/* ---- 政策推送卡 ---- */
.policy-card {
  border:1px solid var(--border); border-radius:8px; padding:12px 14px;
  margin-bottom:8px; transition:.2s; cursor:pointer;
}
.policy-card:hover { border-color:var(--primary); background:var(--primary-light); }
.policy-header { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.policy-title { font-size:13px; font-weight:600; flex:1; }
.policy-date { font-size:11px; color:var(--text-light); white-space:nowrap; }
.policy-tags { display:flex; gap:6px; margin:6px 0; flex-wrap:wrap; }
.policy-brief { font-size:12px; color:var(--text-sub); line-height:1.5; }
.policy-match-score {
  display:inline-flex; align-items:center; gap:4px; font-size:11px; margin-top:6px; color:var(--success); font-weight:600;
}

/* ---- 动态监测 ---- */
.monitor-item {
  display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid #f3f4f6;
}
.monitor-item:last-child { border-bottom:none; }
.monitor-icon-wrap {
  width:38px; height:38px; border-radius:10px; display:flex; align-items:center;
  justify-content:center; font-size:18px; flex-shrink:0;
}
.monitor-info { flex:1; }
.monitor-title { font-size:13px; font-weight:600; }
.monitor-desc { font-size:12px; color:var(--text-sub); }
.monitor-value { font-size:15px; font-weight:800; }
.monitor-trend { font-size:11px; }

/* ---- 数字展示 ---- */
.num-highlight { font-size:28px; font-weight:900; color:var(--primary); }
.num-highlight.green { color:var(--success); }
.num-highlight.orange { color:var(--warning); }
.num-highlight.red { color:var(--danger); }

/* ---- 智能推荐标签 ---- */
.ai-recommend-tag {
  background:linear-gradient(90deg,#1a56db,#7e3af2);
  color:#fff; font-size:10px; font-weight:700;
  padding:1px 7px; border-radius:8px; margin-left:6px;
}

/* ---- 操作按钮组 ---- */
.action-btns { display:flex; gap:5px; }
.link-btn {
  background:none; border:none; color:var(--primary);
  cursor:pointer; font-size:12px; padding:2px 4px; transition:.15s;
}
.link-btn:hover { color:var(--primary-dark); text-decoration:underline; }
.link-btn.red { color:var(--danger); }
.link-btn.orange { color:var(--warning); }

/* ---- Empty state ---- */
.empty-state {
  text-align:center; padding:40px 20px; color:var(--text-sub);
}
.empty-icon { font-size:40px; margin-bottom:8px; }
.empty-text { font-size:14px; }

/* ---- Scroll top btn ---- */
.back-to-top {
  position:fixed; bottom:30px; right:30px;
  background:var(--primary); color:#fff; width:40px; height:40px;
  border-radius:50%; border:none; cursor:pointer; font-size:18px;
  box-shadow:var(--shadow-md); z-index:99; opacity:0.8;
}

/* ---- Tabs ---- */
.tabs { display:flex; border-bottom:1px solid var(--border); margin-bottom:16px; }
.tab {
  padding:9px 18px; cursor:pointer; font-size:13px; color:var(--text-sub);
  border-bottom:2px solid transparent; margin-bottom:-1px; transition:.15s;
}
.tab:hover { color:var(--primary); }
.tab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }

/* ---- 企业画像Tab导航 ---- */
.tab-list { display:flex; gap:0; border-bottom:2px solid #e5e7eb; background:#f9fafb; border-radius:8px 8px 0 0; padding:0 8px; }
.tab-item {
  padding:12px 20px; cursor:pointer; font-size:13px; color:#6b7280;
  border-bottom:2px solid transparent; margin-bottom:-2px; transition:.2s;
  display:flex; align-items:center; gap:6px; position:relative;
}
.tab-item:hover { color:#1a56db; background:rgba(26,86,219,.05); border-radius:6px 6px 0 0; }
.tab-item.active {
  color:#1a56db; border-bottom-color:#1a56db; font-weight:600; background:rgba(26,86,219,.08);
  border-radius:6px 6px 0 0;
}
.tab-item.active::after {
  content:''; position:absolute; bottom:-2px; left:0; right:0; height:2px; background:#1a56db;
}
.tab-count {
  background:#e5e7eb; color:#6b7280; font-size:10px; padding:2px 6px;
  border-radius:10px; font-weight:600;
}
.tab-item.active .tab-count { background:#1a56db; color:#fff; }

.tab:hover { color:var(--primary); }
.tab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }

/* ---- Info tip ---- */
.info-tip {
  background:var(--primary-light); border:1px solid #c3d3fa; border-radius:8px;
  padding:10px 14px; font-size:12px; color:var(--primary); margin-bottom:12px;
  display:flex; align-items:flex-start; gap:8px; line-height:1.6;
}

/* ---- 统一下拉选择框样式 ---- */
.filter-select {
  padding:7px 12px; border:1px solid var(--border); border-radius:7px;
  font-size:13px; outline:none; background:#fff; color:var(--text-main);
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  padding-right:32px;
}
.filter-select:focus { border-color:var(--primary); }
.filter-select:hover { border-color:var(--primary-light); }

/* ===== AI 问答助手对话 UI ===== */
.chat-container {
  display:flex; flex-direction:column;
  height:calc(100vh - 120px); min-height:500px;
  background:#f9fafb; border-radius:12px; overflow:hidden;
  box-shadow:0 1px 4px rgba(0,0,0,.08);
}
.chat-messages {
  flex:1; overflow-y:auto; padding:20px 24px;
  display:flex; flex-direction:column; gap:16px;
}
.chat-msg { display:flex; gap:10px; max-width:85%; }
.chat-msg-user { margin-left:auto; flex-direction:row-reverse; }
.chat-msg-ai  { margin-right:auto; }

.chat-avatar {
  width:36px; height:36px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:700; color:#fff;
}
.chat-avatar-user { background:var(--primary); }
.chat-avatar-ai   { background:#7e3af2; }

.chat-bubble {
  padding:10px 16px; border-radius:14px; font-size:13px;
  line-height:1.7; color:var(--text-main); word-break:break-word;
}
.chat-bubble-ai {
  background:#fff; border:1px solid #e5e7eb;
  border-top-left-radius:4px;
}
.chat-bubble-user {
  background:var(--primary); color:#fff;
  border-top-right-radius:4px;
}
.chat-bubble-ai .chart-in-chat {
  margin-top:10px; background:#f9fafb; border-radius:8px;
  padding:10px; border:1px solid #e5e7eb;
}
.chart-in-chat { width:100%; min-height:240px; }

/* AI 问答表格 */
.qa-table {
  width:100%; border-collapse:collapse; font-size:12px;
  background:#f9fafb; border-radius:8px; overflow:hidden;
  border:1px solid #e5e7eb;
}
.qa-table th {
  background:#f3f4f6; padding:8px 10px; text-align:left;
  font-weight:600; color:#374151; white-space:nowrap;
}
.qa-table td {
  padding:7px 10px; border-top:1px solid #e5e7eb;
  color:#4b5563; vertical-align:middle;
}
.qa-table tr:hover td { background:#eff6ff; }

/* 快捷提问芯片 */
.quick-questions {
  display:flex; flex-wrap:wrap; gap:8px;
  padding:16px 24px 0; justify-content:center;
}
.quick-q-chip {
  display:inline-block; padding:7px 16px; font-size:12px;
  background:#fff; border:1px solid #d1d5db; border-radius:20px;
  cursor:pointer; transition:.15s; color:var(--text-main);
  white-space:nowrap;
}
.quick-q-chip:hover {
  background:var(--primary-light); border-color:var(--primary);
  color:var(--primary);
}

/* 底部输入区 */
.chat-input-area {
  display:flex; align-items:center; gap:10px;
  padding:12px 20px; background:#fff;
  border-top:1px solid #e5e7eb;
}
.chat-input {
  flex:1; border:none; outline:none; font-size:14px;
  padding:10px 14px; background:#f3f4f6; border-radius:10px;
  color:var(--text-main);
}
.chat-input::placeholder { color:#9ca3af; }
.chat-send-btn {
  width:40px; height:40px; border-radius:50%; border:none;
  background:var(--primary); color:#fff; font-size:16px;
  cursor:pointer; transition:.15s; display:flex;
  align-items:center; justify-content:center; flex-shrink:0;
}
.chat-send-btn:hover { background:#1549c0; }
.chat-send-btn:disabled { background:#93c5fd; cursor:not-allowed; }

/* AI 正在输入动画 */
.typing-indicator { display:flex; gap:4px; padding:6px 0; }
.typing-indicator span {
  width:7px; height:7px; border-radius:50%; background:#9ca3af;
  animation:typing-bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay:.2s; }
.typing-indicator span:nth-child(3) { animation-delay:.4s; }
@keyframes typing-bounce {
  0%,60%,100% { transform:translateY(0); }
  30%          { transform:translateY(-6px); }
}

