
/* =========================================================
   麦穗智维 V1.9 - 全站公共样式
   作用：统一颜色、导航、卡片、表格、按钮、点云框和页面标题区。
   说明：功能逻辑仍保留在各页面原脚本中，避免破坏已跑通流程。
   ========================================================= */
:root {
  --wheat-green-900: #174b22;
  --wheat-green-800: #1f6b31;
  --wheat-green-700: #2e7d32;
  --wheat-green-600: #3f9b4b;
  --wheat-green-100: #e8f5e9;
  --wheat-green-50: #f4fbf4;
  --wheat-gold: #f4b942;
  --wheat-gold-soft: #fff6dc;
  --wheat-ink: #1f2d26;
  --wheat-muted: #64756b;
  --wheat-line: rgba(46,125,50,.14);
  --wheat-card: rgba(255,255,255,.94);
  --wheat-shadow: 0 16px 42px rgba(21, 80, 34, .10);
  --wheat-shadow-soft: 0 8px 24px rgba(21, 80, 34, .08);
  --wheat-radius-xl: 22px;
  --wheat-radius-lg: 16px;
  --wheat-radius-md: 12px;
}

html { scroll-behavior: smooth; }
body {
  color: var(--wheat-ink) !important;
  background:
    radial-gradient(circle at 8% 4%, rgba(244,185,66,.17), transparent 26%),
    radial-gradient(circle at 90% 0%, rgba(46,125,50,.12), transparent 30%),
    linear-gradient(180deg, #f7faf6 0%, #eef7ef 42%, #f5f7f4 100%) !important;
  min-height: 100vh;
}

/* 顶部导航 */
.navbar {
  background: linear-gradient(90deg, var(--wheat-green-900), var(--wheat-green-700)) !important;
  box-shadow: 0 10px 28px rgba(23,75,34,.20);
  padding: .78rem 1.1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-brand {
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.navbar-brand::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 7px 16px 7px 16px;
  background: linear-gradient(135deg, #ffe49a, #69bd68 60%, #2e7d32);
  box-shadow: 0 0 0 2px rgba(255,255,255,.18) inset;
  transform: rotate(-10deg);
}
.navbar-dark .navbar-nav .nav-link {
  color: rgba(255,255,255,.86) !important;
  border-radius: 999px;
  padding: .42rem .82rem !important;
  margin: .1rem .08rem;
  transition: all .18s ease;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .active > .nav-link,
.navbar-dark .navbar-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.15);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset;
}
.navbar .btn-warning {
  background: linear-gradient(135deg, #ffd875, var(--wheat-gold)) !important;
  border: 0 !important;
  color: #4c3700 !important;
  box-shadow: 0 8px 18px rgba(244,185,66,.24);
}
.navbar .btn-outline-light { border-color: rgba(255,255,255,.6) !important; }

/* 页面容器与标题区 */
.main-content {
  background: rgba(232,245,233,.68) !important;
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--wheat-shadow);
  border-radius: var(--wheat-radius-xl) !important;
  margin-top: 22px !important;
  margin-bottom: 28px !important;
  padding: 26px !important;
  backdrop-filter: blur(8px);
}
.main-content > .text-center.py-2,
.main-content > .text-center.py-3 {
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(242,250,242,.66));
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--wheat-radius-xl);
  box-shadow: var(--wheat-shadow-soft);
  padding: 30px 22px !important;
  position: relative;
  overflow: hidden;
}
.main-content > .text-center.py-2::before,
.main-content > .text-center.py-3::before {
  content: none;
  display: none;
}
.main-content h1,
.hero-box h1 {
  color: #173f20;
  letter-spacing: .02em;
}
.main-content .text-muted,
.hint,
.small-muted { color: var(--wheat-muted) !important; }
.w3d-version-chip {
  display: inline-flex;
  align-items: center;
  gap: .36rem;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
  color: var(--wheat-green-800);
  background: rgba(46,125,50,.10);
  border: 1px solid rgba(46,125,50,.16);
  margin: 0 0 9px 0;
}
.w3d-version-chip::before { content: none; }

/* 卡片与模块 */
.card {
  border: 1px solid rgba(46,125,50,.10) !important;
  border-radius: var(--wheat-radius-lg) !important;
  background: var(--wheat-card) !important;
  box-shadow: var(--wheat-shadow-soft) !important;
}
.card:hover { transform: none !important; }
.card.p-4 { padding: 1.65rem !important; }
.section-title {
  color: #173f20;
  font-weight: 800 !important;
  display: flex;
  align-items: center;
  gap: .52rem;
}
.section-title::before {
  content: "";
  width: 8px;
  height: 22px;
  display: inline-block;
  border-radius: 999px;
  background: var(--wheat-green-700);
}
.hero-box {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(232,245,233,.72)),
    radial-gradient(circle at 10% 10%, rgba(244,185,66,.22), transparent 34%) !important;
  border: 1px solid rgba(255,255,255,.88);
  box-shadow: var(--wheat-shadow-soft);
  border-radius: var(--wheat-radius-xl) !important;
}
.recommend-box,
.demo-box,
.growth-box,
.preview-box {
  background: rgba(255,255,255,.78) !important;
  border: 1px solid rgba(46,125,50,.12) !important;
  box-shadow: 0 6px 18px rgba(21,80,34,.05);
}

/* 标签 */
.badge-soft,
.feature-tag,
.pill,
.mode-pill,
.quality-pill {
  border-radius: 999px !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(21,80,34,.05);
}
.badge-soft {
  background: rgba(46,125,50,.10) !important;
  color: var(--wheat-green-800) !important;
  border: 1px solid rgba(46,125,50,.16);
}
.feature-tag,
.pill-green,
.mode-pill,
.q-ok {
  background: rgba(46,125,50,.11) !important;
  color: var(--wheat-green-800) !important;
  border: 1px solid rgba(46,125,50,.14);
}
.pill-blue { background: rgba(28,117,188,.10) !important; color: #21639b !important; border: 1px solid rgba(28,117,188,.12); }
.pill-amber,.q-warn { background: rgba(244,185,66,.18) !important; color: #7a5600 !important; border: 1px solid rgba(244,185,66,.22); }
.q-bad { background: rgba(211,47,47,.10) !important; color: #a92222 !important; border: 1px solid rgba(211,47,47,.14); }

/* 按钮与表单 */
.btn { border-radius: 999px !important; font-weight: 800 !important; }
.btn-primary {
  background: linear-gradient(135deg, var(--wheat-green-700), var(--wheat-green-800)) !important;
  border-color: transparent !important;
  box-shadow: 0 9px 18px rgba(46,125,50,.18);
}
.btn-primary:hover { filter: brightness(.97); transform: translateY(-1px); }
.btn-outline-primary {
  color: var(--wheat-green-800) !important;
  border-color: rgba(46,125,50,.40) !important;
  background: rgba(255,255,255,.62) !important;
}
.btn-outline-primary:hover {
  color: #fff !important;
  background: var(--wheat-green-700) !important;
  border-color: var(--wheat-green-700) !important;
}
.btn-demo {
  background: var(--wheat-gold-soft) !important;
  border-color: rgba(244,185,66,.35) !important;
}
.form-control,
.custom-file-label {
  border-radius: 12px !important;
  border-color: rgba(46,125,50,.18) !important;
  box-shadow: none !important;
}
.form-control:focus {
  border-color: rgba(46,125,50,.55) !important;
  box-shadow: 0 0 0 .16rem rgba(46,125,50,.12) !important;
}

/* 摘要与流程 */
.summary-item {
  border-bottom: 1px dashed rgba(46,125,50,.18) !important;
}
.summary-label { color: #375243 !important; }
.summary-value { color: #192d20 !important; }
.mini-step,
.checkout-step {
  background: rgba(46,125,50,.08) !important;
  border: 1px solid rgba(46,125,50,.12);
}
.mini-step .num,
.checkout-step .num {
  background: var(--wheat-green-700) !important;
  color: #fff !important;
}

/* 点云可视化区域 */
.viewer-box {
  background:
    radial-gradient(circle at 50% 48%, rgba(103,186,105,.10), transparent 38%),
    linear-gradient(180deg, #fbfffb 0%, #f1f8f1 100%) !important;
  border: 1px solid rgba(46,125,50,.18) !important;
  border-radius: 18px !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.88), 0 10px 24px rgba(21,80,34,.08);
}
.viewer-title {
  background: rgba(255,255,255,.86) !important;
  color: var(--wheat-green-800) !important;
  border: 1px solid rgba(46,125,50,.16);
  box-shadow: 0 6px 14px rgba(21,80,34,.08);
}
.viewer-placeholder b { color: var(--wheat-green-800) !important; }
canvas { border-radius: 18px; }
.alert-strong,
.alert-warning {
  border-radius: 16px !important;
  border: 1px solid rgba(244,185,66,.38) !important;
  background: linear-gradient(135deg, rgba(255,246,220,.86), rgba(255,255,255,.72)) !important;
}

/* 数据卡片 */
.metric-card {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.metric-value,
.kpi-number {
  color: #173f20 !important;
  letter-spacing: -.02em;
}
.metric-name,
.kpi-label { color: #44574b !important; }
.metric-sub { color: var(--wheat-muted) !important; }
.progress { background-color: rgba(46,125,50,.10) !important; }
.progress-bar { background: linear-gradient(90deg, var(--wheat-green-600), var(--wheat-green-800)) !important; }

/* 表格 */
.table-responsive {
  border-radius: var(--wheat-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(46,125,50,.10);
  background: rgba(255,255,255,.86);
}
.table { margin-bottom: 0 !important; }
.table thead th {
  background: linear-gradient(180deg, #f4fbf4, #e8f5e9) !important;
  color: #173f20;
  border-bottom: 1px solid rgba(46,125,50,.16) !important;
  font-weight: 800;
  white-space: nowrap;
}
.table tbody td {
  border-top: 1px solid rgba(46,125,50,.09) !important;
  vertical-align: middle !important;
}
.table tbody tr:hover { background: rgba(46,125,50,.035); }

/* 多样本对比柱状图 */
.bar-wrap,
.compare-bar-wrap {
  background: rgba(46,125,50,.08) !important;
  border-radius: 999px;
  overflow: hidden;
}
.bar,
.compare-bar {
  background: linear-gradient(90deg, var(--wheat-green-600), var(--wheat-green-800)) !important;
  border-radius: 999px;
}

/* 页脚 */
.footer {
  background: linear-gradient(90deg, var(--wheat-green-900), var(--wheat-green-700)) !important;
  color: rgba(255,255,255,.82);
}
.w3d-page-ready .fade-in { opacity: 1 !important; }


/* 首页快速入口：五个入口一行显示，减少 4+1 布局造成的大块留白 */
.quick-entry-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.quick-entry-grid .card {
  height: 100%;
  min-height: 168px;
}
.quick-entry-grid .btn {
  width: 100%;
}
.task-compare-panel {
  background: rgba(255,255,255,.82) !important;
  border: 1px solid rgba(46,125,50,.14) !important;
  border-radius: var(--wheat-radius-md) !important;
  padding: 14px 16px;
  margin-bottom: 14px;
}
@media (max-width: 1199.98px) {
  .quick-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .quick-entry-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .main-content { padding: 18px !important; margin-top: 14px !important; }
  .navbar-dark .navbar-nav .nav-link { margin: 2px 0; }
  .card.p-4 { padding: 1.25rem !important; }
}

/* V1.9.3 后端接入准备组件 */
.w3d-loading-btn{pointer-events:none;opacity:.8;}
.w3d-loading-btn::after{content:"";display:inline-block;width:13px;height:13px;margin-left:8px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:w3dSpin .8s linear infinite;vertical-align:-2px;}
@keyframes w3dSpin{to{transform:rotate(360deg)}}
.w3d-status-flow{display:flex;gap:10px;flex-wrap:wrap;align-items:center;background:rgba(255,255,255,.82);border:1px solid rgba(46,125,50,.12);border-radius:16px;padding:14px 18px;}
.w3d-status-step{padding:8px 14px;border-radius:999px;background:rgba(46,125,50,.08);font-size:13px;font-weight:700;color:#49604f;}
.w3d-status-step.active{background:#2e7d32;color:white;}
.w3d-status-arrow{color:#90a48f;font-weight:700;}

/* V1.9.4 AI 助手悬浮组件 */
.w3d-ai-fab{
  position:fixed;right:24px;bottom:24px;z-index:1080;
  display:inline-flex;align-items:center;gap:8px;
  border:none;border-radius:999px;padding:13px 18px;
  background:linear-gradient(135deg,#2e7d32,#14532d);
  color:#fff;font-weight:800;letter-spacing:.02em;
  box-shadow:0 14px 34px rgba(20,83,45,.28);
  cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;
}
.w3d-ai-fab:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(20,83,45,.34);}
.w3d-ai-fab .w3d-ai-icon{font-size:19px;line-height:1;}
.w3d-ai-panel{
  position:fixed;right:24px;bottom:86px;z-index:1081;
  width:min(390px,calc(100vw - 32px));height:min(610px,calc(100vh - 120px));
  display:none;flex-direction:column;overflow:hidden;
  background:rgba(255,255,255,.96);border:1px solid rgba(46,125,50,.18);
  border-radius:22px;box-shadow:0 24px 70px rgba(15,45,24,.22);
  backdrop-filter:blur(10px);
}
.w3d-ai-panel.open{display:flex;}
.w3d-ai-head{
  padding:16px 18px;background:linear-gradient(135deg,#e8f5e9,#ffffff);
  border-bottom:1px solid rgba(46,125,50,.12);display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.w3d-ai-title{display:flex;align-items:center;gap:10px;font-weight:900;color:#173f20;font-size:17px;}
.w3d-ai-avatar{
  width:36px;height:36px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#2e7d32,#6fbf73);color:#fff;box-shadow:0 8px 18px rgba(46,125,50,.20);
}
.w3d-ai-sub{font-size:12px;color:#6b7f70;margin-top:2px;font-weight:600;}
.w3d-ai-close{border:none;background:rgba(46,125,50,.08);color:#2e7d32;border-radius:999px;width:32px;height:32px;font-weight:900;cursor:pointer;}
.w3d-ai-body{flex:1;overflow-y:auto;padding:16px;background:linear-gradient(180deg,#fbfffb,#f7fbf7);}
.w3d-ai-msg{display:flex;margin-bottom:12px;}
.w3d-ai-msg.user{justify-content:flex-end;}
.w3d-ai-bubble{
  max-width:86%;padding:11px 13px;border-radius:16px;line-height:1.65;font-size:14px;word-break:break-word;
}
.w3d-ai-msg.bot .w3d-ai-bubble{background:#fff;border:1px solid rgba(46,125,50,.12);color:#243428;box-shadow:0 8px 18px rgba(46,125,50,.06);border-top-left-radius:6px;}
.w3d-ai-msg.user .w3d-ai-bubble{background:#2e7d32;color:white;border-top-right-radius:6px;}
.w3d-ai-quick{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px;}
.w3d-ai-chip{
  border:1px solid rgba(46,125,50,.18);background:#fff;color:#2e7d32;border-radius:999px;
  padding:7px 10px;font-size:12px;font-weight:800;cursor:pointer;transition:background .16s ease,transform .16s ease;
}
.w3d-ai-chip:hover{background:#e8f5e9;transform:translateY(-1px);}
.w3d-ai-foot{padding:12px;border-top:1px solid rgba(46,125,50,.12);background:#fff;}
.w3d-ai-input-row{display:flex;gap:8px;align-items:flex-end;}
.w3d-ai-input{
  flex:1;min-height:42px;max-height:94px;resize:none;border:1px solid rgba(46,125,50,.22);border-radius:14px;
  padding:10px 12px;font-size:14px;outline:none;background:#fbfffb;
}
.w3d-ai-input:focus{border-color:#2e7d32;box-shadow:0 0 0 3px rgba(46,125,50,.10);}
.w3d-ai-send{border:none;border-radius:14px;background:#2e7d32;color:#fff;font-weight:900;padding:11px 14px;cursor:pointer;}
.w3d-ai-send:hover{background:#256628;}
.w3d-ai-note{font-size:11px;color:#8aa08d;margin-top:8px;text-align:center;}
@media(max-width:767.98px){
  .w3d-ai-fab{right:16px;bottom:16px;padding:12px 15px;}
  .w3d-ai-panel{right:12px;bottom:76px;width:calc(100vw - 24px);height:min(620px,calc(100vh - 96px));}
}

/* V2.1.2 当前任务感知 AI 助手增强 */
.w3d-ai-context{
  display:flex;align-items:center;gap:10px;padding:10px 16px;
  background:linear-gradient(90deg,rgba(46,125,50,.055),rgba(255,255,255,.92));
  border-bottom:1px solid rgba(46,125,50,.10);color:#405146;font-size:12px;line-height:1.45;
}
.w3d-ai-context b{display:block;color:#173f20;font-size:12px;margin-bottom:1px;max-width:290px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.w3d-ai-status-dot{width:9px;height:9px;border-radius:50%;flex:0 0 9px;box-shadow:0 0 0 4px rgba(124,145,128,.10);background:#98a89b;}
.w3d-ai-status-dot.online{background:#2e7d32;box-shadow:0 0 0 4px rgba(46,125,50,.12);}
.w3d-ai-status-dot.loading{background:#e0a82e;box-shadow:0 0 0 4px rgba(224,168,46,.13);animation:w3dAiPulse 1.1s ease-in-out infinite;}
.w3d-ai-status-dot.offline{background:#c45b50;box-shadow:0 0 0 4px rgba(196,91,80,.10);}
.w3d-ai-status-dot.idle{background:#8aa08d;}
@keyframes w3dAiPulse{50%{transform:scale(.72);opacity:.55}}
.w3d-ai-action-title{font-size:11px;font-weight:900;color:#6b7f70;letter-spacing:.08em;margin:4px 0 7px;text-transform:uppercase;}
.w3d-ai-thinking{display:inline-flex;align-items:center;gap:7px;color:#637567;}
.w3d-ai-thinking::after{content:'•••';letter-spacing:2px;animation:w3dAiThinking 1.2s steps(4,end) infinite;overflow:hidden;width:25px;display:inline-block;}
@keyframes w3dAiThinking{0%{width:4px}100%{width:25px}}
.w3d-ai-fallback-tip{margin-top:8px;padding-top:7px;border-top:1px dashed rgba(46,125,50,.15);font-size:11px;color:#8a6e30;}
.w3d-ai-send:disabled,.w3d-ai-input:disabled{opacity:.62;cursor:not-allowed;}
.w3d-ai-panel .w3d-ai-body{padding-top:13px;}

/* V2.3 真实大模型状态与回答来源 */
.w3d-ai-modebar{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 16px;
  background:#fffdf6;border-bottom:1px solid rgba(224,168,46,.16);
  color:#6f6550;font-size:11px;line-height:1.4;
}
.w3d-ai-mode-pill{
  display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;
  font-size:10px;font-weight:900;letter-spacing:.02em;white-space:nowrap;
  background:#f0f4f0;color:#607064;border:1px solid rgba(96,112,100,.12);
}
.w3d-ai-mode-pill.live{background:#e8f5e9;color:#24672a;border-color:rgba(46,125,50,.18);}
.w3d-ai-mode-pill.fallback{background:#fff7e5;color:#8a6e30;border-color:rgba(224,168,46,.22);}
.w3d-ai-answer-meta{
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:9px;padding-top:7px;
  border-top:1px dashed rgba(46,125,50,.13);font-size:10px;color:#8a9a8d;
}


/* Competition Showcase UI
   隐藏开发实现信息，只保留产品级任务与分析状态。 */
.w3d-ai-answer-meta,
.w3d-ai-fallback-tip { display:none !important; }
