
  :root{
    --bg:#f4f6fb; --card:#ffffff; --line:#e5e9f2;
    --ink:#1e2433; --sub:#6b7280;
    --accent:#4f46e5; --accent2:#0ea5a4;
    --sidebar:#0f172a; --side-ink:#94a3b8; --side-active:#ffffff;
    --ok:#16a34a; --warn:#d97706; --danger:#dc2626; --info:#2563eb;
    --radius:12px;
    --shadow:0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    /* 派生色:随主题 --accent/--accent2 自动变化 */
    --accent-soft: rgba(79,70,229,.08);
    --accent-line: rgba(79,70,229,.18);
    --accent-grad-a: #eef2ff;
    --accent-grad-b: #f5f3ff;
    --accent-glow: rgba(79,70,229,.35);
    --accent-active-a: rgba(79,70,229,.4);
    --accent-active-b: rgba(14,165,164,.28);
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html,body{height:100%;}
  body{
    font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
    background:var(--bg); color:var(--ink); font-size:14px; line-height:1.6;
  }

  /* ============ 侧边栏 ============ */
  .sidebar{
    position:fixed; inset:0 auto 0 0; width:220px; background:var(--sidebar);
    color:var(--side-ink); display:flex; flex-direction:column; padding:20px 12px; z-index:10;
  }
  .brand{ display:flex; align-items:center; gap:10px; padding:0 8px 18px; }
  .brand .logo{
    width:36px; height:36px; border-radius:10px; flex:none;
    background:linear-gradient(135deg,var(--accent),var(--accent2));
    display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:17px;
    box-shadow:0 4px 12px var(--accent-glow);
  }
  .brand b{ color:#fff; font-size:15px; letter-spacing:.5px; display:block; line-height:1.3;}
  .brand small{ font-size:11px; color:var(--side-ink); }
  /* 汉堡按钮:桌面端隐藏,移动端显示 */
  .hamburger{
    display:none; margin-left:auto; width:38px; height:38px; border:none; border-radius:9px;
    background:rgba(255,255,255,.08); cursor:pointer; flex-direction:column;
    align-items:center; justify-content:center; gap:5px; padding:0;
  }
  .hamburger span{ display:block; width:20px; height:2px; background:#e2e8f0; border-radius:2px; transition:.2s; }
  .hamburger.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2){ opacity:0; }
  .hamburger.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

  /* 移动端汉堡抽屉(默认隐藏) */
  .drawer-mask{
    position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:90; display:none;
  }
  .drawer-mask.show{ display:block; }
  .drawer{
    position:fixed; top:0; left:0; bottom:0; width:78vw; max-width:300px; z-index:95;
    background:var(--sidebar); color:var(--side-ink); display:flex; flex-direction:column;
    transform:translateX(-105%); transition:transform .22s ease; box-shadow:4px 0 24px rgba(0,0,0,.35);
  }
  .drawer.show{ transform:translateX(0); }
  .drawer-head{
    display:flex; align-items:center; justify-content:space-between;
    padding:18px 16px 12px; border-bottom:1px solid rgba(255,255,255,.08);
  }
  .drawer-head b{ color:#fff; font-size:16px; }
  .drawer-nav{ flex:1; overflow-y:auto; padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
  .drawer-nav a{
    display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:10px;
    color:var(--side-ink); text-decoration:none; font-size:14.5px; transition:.15s;
  }
  .drawer-nav a:hover{ color:#e2e8f0; background:rgba(255,255,255,.06); }
  .drawer-nav a.active{ color:#fff; background:linear-gradient(90deg,var(--accent-active-a),var(--accent-active-b)); font-weight:600; }
  .drawer-nav a .ico{ width:20px; height:20px; display:flex; align-items:center; justify-content:center; flex:none; }
  .drawer-nav a .ico svg{ width:19px; height:19px; }
  .drawer-foot{
    display:flex; align-items:center; gap:6px; padding:12px 14px; flex-wrap:wrap;
    border-top:1px solid rgba(255,255,255,.08);
  }
  .drawer-foot .ghost{ color:var(--side-ink); font-size:12px; }
  .nav{ display:flex; flex-direction:column; gap:2px; margin-top:6px; }
  .nav a{
    display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:9px;
    color:var(--side-ink); text-decoration:none; font-size:14px; transition:.15s;
  }
  .nav a:hover{ color:#e2e8f0; background:rgba(255,255,255,.06); }
  .nav a.active{ color:var(--side-active); background:linear-gradient(90deg,var(--accent-active-a),var(--accent-active-b)); font-weight:600;}
  .nav a .ico{ width:20px; height:20px; display:flex; align-items:center; justify-content:center; flex:none; }
  .nav a .ico svg{ width:18px; height:18px; }
  .nav a .lock{ margin-left:auto; font-size:10px; opacity:.6; }
  .nav a.locked{ opacity:.55; cursor:not-allowed; }
  .sidebar-foot{ margin-top:auto; font-size:11px; padding:10px 8px; color:#475569; line-height:1.7;}
  .sidebar-foot .dot{ display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--ok); margin-right:5px;}
  .sidebar-foot .dot.off{ background:#64748b; }

  /* ============ 主区 ============ */
  main{ margin-left:220px; height:100vh; display:flex; flex-direction:column; overflow:hidden; }
  main .top{
    flex:none; display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
    padding:20px 28px 14px; flex-wrap:wrap; position:sticky; top:0; z-index:20;
    background:var(--bg);
  }
  #viewWrap{ flex:1; overflow-y:auto; padding:0 28px 80px; }
  header.top h1{ font-size:22px; font-weight:700; }
  header.top p{ color:var(--sub); font-size:13px; margin-top:2px;}
  .actions{ display:flex; align-items:center; gap:8px; }
  .mode-chip{ font-size:11px; padding:2px 10px; border-radius:20px; background:rgba(100,116,139,.12); color:#475569; white-space:nowrap;}
  .mode-chip.cloud{ background:rgba(22,163,74,.12); color:var(--ok); }
  .mode-chip.local{ background:rgba(217,119,6,.12); color:var(--warn); }
  button{
    border:1px solid var(--line); background:#fff; color:var(--ink);
    padding:6px 14px; border-radius:9px; font-size:13px; cursor:pointer; transition:.15s;
    font-family:inherit;
  }
  button:hover{ border-color:var(--accent); color:var(--accent); }
  button.primary{ background:var(--accent); border-color:var(--accent); color:#fff; }
  button.primary:hover{ background:var(--accent); filter:brightness(.92); color:#fff; }
  button.danger{ color:var(--danger); }
  button.danger:hover{ border-color:var(--danger); }
  button.ghost{ background:transparent; border-color:transparent; color:var(--sub); padding:4px 8px;}
  button.ghost:hover{ color:var(--accent); }
  button.sm{ padding:3px 10px; font-size:12px; border-radius:7px;}

  /* 子标签:统一吸顶(所有页面) */
  .tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); margin:14px 0 18px; overflow-x:auto;
    position:sticky; top:0; z-index:12; background:var(--bg); padding-top:12px; }
  .tabs button{
    border:none; background:none; padding:8px 16px; font-size:14px; color:var(--sub);
    border-bottom:2px solid transparent; border-radius:0; cursor:pointer; white-space:nowrap;
  }
  .tabs button:hover{ color:var(--accent); }
  .tabs button.active{ color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }

  section.block{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:20px 22px; margin-bottom:20px; box-shadow:var(--shadow);}
  .block-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:12px;}

  /* 方案C:block 标题/筛选/按钮吸顶(吸附在二级导航下方),表头跟随 */
  section.block .block-head{
    position:sticky; top:var(--sticky-top,0px); z-index:11;
    background:var(--card); margin:-20px -22px 14px; padding:16px 22px;
    border-bottom:1px solid var(--line);
  }
  /* 表格外层包裹 div 不能成为滚动容器,否则 sticky 表头吸附在它内部(停在页面中间)。
     桌面端 overflow 可见使 sticky 相对 #viewWrap 生效;!important 覆盖内联 style="overflow-x:auto" */
  .block > div[style*="overflow-x"]{ overflow:visible !important; }
  .block > div[style*="overflow-x"] table{ min-width:max-content; }
  table.list thead th{ position:sticky; top:var(--sticky-top,0px); z-index:10; background:var(--card); }
  .ai-table-wrap thead th{ position:sticky; top:var(--sticky-top,0px); z-index:10; background:#fff; }
  .block-head h2{ font-size:16px; font-weight:700; display:flex; align-items:center; gap:8px;}
  .block-head h2 .tag{
    font-size:11px; font-weight:500; color:var(--accent); background:var(--accent-soft);
    border:1px solid var(--accent-line); padding:1px 8px; border-radius:20px;
  }
  .hint{ font-size:12px; color:var(--sub); }
  .empty{ text-align:center; color:var(--sub); font-size:13px; padding:26px 0; }

  /* ============ 业务定位 ============ */
  .pos-hero{
    background:#fbfcfe; border:1px solid var(--line);
    border-radius:12px; padding:18px 20px; margin-bottom:16px;
  }
  .pos-hero .label{ font-size:12px; color:var(--sub); margin-bottom:4px; }
  .pos-hero input.statement{
    width:100%; border:none; background:transparent; font-size:19px; font-weight:700;
    color:var(--ink); outline:none; line-height:1.4;
  }
  .pos-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px; }
  .pos-item{ display:flex; flex-direction:column; gap:6px; }
  .pos-item label{ font-size:12px; font-weight:600; color:var(--sub); }
  .pos-item textarea{ min-height:110px; font-size:14px; line-height:1.7; }
  .pos-item input{ font-size:14px; }
  .pos-item textarea, .pos-item input{
    width:100%; border:1px solid var(--line); border-radius:9px; padding:11px 13px;
    font-family:inherit; color:var(--ink); background:#fbfcfe; outline:none; resize:vertical;
    transition:border .15s;
  }
  .pos-item textarea:focus, .pos-item input:focus{ border-color:var(--accent); background:#fff; box-shadow:0 0 0 3px var(--accent-soft);}

  /* ============ 自我梳理 ============ */
  .self-grid{ grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); }
  .self-grid .pos-item textarea{ min-height:150px; }

  /* ============ 商业画布 ============ */
  .canvas{ display:grid; grid-template-columns:repeat(5,1fr); gap:10px; }
  .cbox{ border:1px solid var(--line); border-radius:10px; padding:14px 16px; background:#fbfcfe; display:flex; flex-direction:column; min-height:140px; }
  .cbox h4{ font-size:13px; font-weight:700; color:var(--accent); margin-bottom:8px; display:flex; align-items:center; gap:5px;}
  .cbox h4::before{ content:""; width:6px; height:6px; border-radius:2px; background:var(--accent);}
  .cbox textarea{
    flex:1; width:100%; border:none; background:transparent; outline:none; resize:none;
    font-size:13px; font-family:inherit; color:var(--ink); line-height:1.7; min-height:80px;
  }
  .cbox.vp{ background:#fbfcfe; border-color:var(--line); }
  .cbox.vp h4{ color:var(--accent); }
  .cbox.wide-3{ grid-column:span 3; }
  .cbox.wide-2{ grid-column:span 2; }
  .cbox.span2{ grid-row:span 2; }

  /* ============ 战略文档 ============ */
  .doc-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:12px; }
  .doc-card{
    border:1px solid var(--line); border-radius:10px; padding:14px 16px; background:#fbfcfe;
    cursor:pointer; transition:.15s; display:flex; flex-direction:column; gap:6px;
  }
  .doc-card:hover{ border-color:var(--accent-line); background:#fff; box-shadow:var(--shadow); }
  #libList .doc-card{ margin-bottom:10px; }
  .doc-card .d-ico{ font-size:20px; }
  .doc-card b{ font-size:14px; }
  .doc-card .d-meta{ font-size:12px; color:var(--sub); display:flex; gap:8px; align-items:center; flex-wrap:wrap;}
  .chip{ font-size:11px; padding:2px 9px; border-radius:20px; white-space:nowrap; }
  .chip.planning{ background:rgba(217,119,6,.1); color:var(--warn); }
  .chip.doing{ background:var(--accent-soft); color:var(--accent); }
  .chip.done{ background:rgba(22,163,74,.1); color:var(--ok); }
  .doc-card .d-prev{ font-size:12px; color:var(--sub); overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;}

  /* ============ 竞品分析 ============ */
  table.list{ width:100%; border-collapse:collapse; }
  table.list th{
    text-align:left; font-size:12px; color:var(--sub); font-weight:600; padding:9px 10px;
    border-bottom:1px solid var(--line); cursor:pointer; white-space:nowrap;
  }
  table.list th:hover{ color:var(--accent); }
  table.list td{ padding:10px; border-bottom:1px solid #f1f5f9; font-size:13px; vertical-align:top;}
  table.list tr:hover td{ background:#fafbfe; }
  table.list td.desc{ max-width:280px; }
  .row-actions{ display:flex; gap:4px; justify-content:flex-end; }
  /* ============ 右侧抽屉弹窗 ============ */
  .modal-mask{ position:fixed; inset:0; background:rgba(15,23,42,.45); display:none; align-items:stretch; justify-content:flex-end; z-index:100; backdrop-filter:blur(2px);}
  .modal-mask.show{ display:flex; }
  /* 系统确认弹窗:屏幕居中 */
  .modal-mask.confirm-mask{ align-items:center; justify-content:center; z-index:200; }
  .confirm-box{
    background:#fff; width:320px; max-width:88vw; border-radius:14px; padding:22px;
    box-shadow:0 18px 50px rgba(15,23,42,.3); animation:confirmPop .18s ease;
  }
  @keyframes confirmPop{ from{ transform:scale(.92); opacity:.5;} to{ transform:scale(1); opacity:1;} }
  .confirm-msg{ font-size:14px; color:var(--ink); line-height:1.7; margin-bottom:18px; word-break:break-word; }
  .confirm-actions{ display:flex; justify-content:flex-end; gap:8px; }
  .modal{
    background:#fff; width:100%; max-width:520px; height:100vh; display:flex; flex-direction:column;
    box-shadow:-12px 0 40px rgba(15,23,42,.25); animation:slideIn .22s ease;
  }
  @keyframes slideIn{ from{ transform:translateX(40px); opacity:.6;} to{ transform:translateX(0); opacity:1;} }
  /* 居中卡片弹窗(注册/欢迎引导等,仿登录框样式) */
  .modal-mask.modal-center{ align-items:center; justify-content:center; }
  .modal-center .modal{
    width:100%; max-width:380px; height:auto; max-height:88vh; border-radius:16px;
    box-shadow:0 24px 60px rgba(0,0,0,.35); animation:confirmPop .2s ease;
  }
  .modal-center .modal-head{ border-bottom:1px solid var(--line); }
  .modal-center .modal-body{ flex:none; }
  .modal-head{ padding:18px 22px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between;}
  .modal-head b{ font-size:15px;}
  .modal-body{ padding:20px 22px; overflow:auto; display:flex; flex-direction:column; gap:12px; flex:1;}
  .modal-body label{ font-size:12px; font-weight:600; color:var(--sub);}
  .modal-body input, .modal-body textarea{
    width:100%; border:1px solid var(--line); border-radius:9px; padding:9px 11px; font-size:13px;
    font-family:inherit; color:var(--ink); outline:none; background:#fbfcfe;
  }
  .modal-body input:focus, .modal-body textarea:focus{ border-color:var(--accent); background:#fff; box-shadow:0 0 0 3px var(--accent-soft);}
  /* select 完全继承全局统一样式(见下方 select{...}),只保证宽度 */
  .modal-body select{ width:100%; }
  .modal-body textarea{ min-height:140px; resize:vertical; }
  .modal-foot{ padding:14px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:8px; background:#fafbfe;}

  /* 统一下拉框样式(自定义箭头,全系统生效) */
  select{
    appearance:none; -webkit-appearance:none; -moz-appearance:none;
    border:1px solid var(--line); border-radius:8px; background-color:#fff; color:var(--ink);
    font-family:inherit; font-size:13px; padding:7px 34px 7px 11px; line-height:1.4;
    background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:right 12px center; background-size:14px;
    cursor:pointer; transition:border-color .15s;
  }
  select:hover{ border-color:var(--accent-line); }
  select:focus{ border-color:var(--accent); outline:none; box-shadow:0 0 0 3px var(--accent-soft); }

  /* toast */
  #toast{
    position:fixed; bottom:28px; left:50%; transform:translateX(-50%) translateY(80px);
    background:#1e293b; color:#fff; padding:10px 20px; border-radius:10px; font-size:13px;
    opacity:0; transition:.3s; z-index:200; box-shadow:0 10px 30px rgba(15,23,42,.3); pointer-events:none;
  }
  #toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

  @media (max-width: 1020px){
    .canvas{ grid-template-columns:repeat(2,1fr); }
    .cbox.wide-3,.cbox.wide-2{ grid-column:span 2; }
    .cbox.span2{ grid-row:auto; }
  }
  @media (max-width: 760px){
    .sidebar{
      position:sticky; top:0; z-index:60; width:100%; flex-direction:row; align-items:center;
      padding:8px 12px; box-shadow:0 2px 8px rgba(0,0,0,.25); min-height:50px;
    }
    .brand{ padding:0; flex:none; width:100%; }
    .brand .logo{ width:30px; height:30px; font-size:14px; }
    .brand b{ font-size:13px; }
    .brand small{ display:none; }
    .hamburger{ display:flex; }
    .nav{ display:none; } /* 桌面导航移动端隐藏,用汉堡抽屉 */
    .sidebar-foot{ display:none; }
    .sidebar-user{ display:none; }
    .plan-card-mini{ display:none; }
    main{ margin-left:0; height:100vh; display:flex; flex-direction:column; overflow:hidden; width:100%; }
    /* 一级 header 吸顶:贴汉堡导航下方(相对 viewWrap 滚动容器) */
    main .top{ padding:12px 16px 10px; position:sticky; top:0; z-index:55; background:var(--bg); }
    /* viewWrap 是移动端滚动容器,sticky 全部相对它 */
    #viewWrap{ flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; padding:0 16px 60px; }
    .canvas{ grid-template-columns:1fr; }
    .cbox.wide-3,.cbox.wide-2{ grid-column:span 1; }
    .pos-grid{ grid-template-columns:1fr; }
    .self-grid{ grid-template-columns:1fr; }
    .tier-grid{ grid-template-columns:1fr; }
    .dash-kpis{ grid-template-columns:repeat(2,1fr); }
    .prod-dash{ grid-template-columns:1fr; }
    .polar-hero-num{ font-size:34px; }
    .modal{ max-width:100%; }
    .modal-center .modal{ max-width:92vw; }
    .block{ padding:16px 14px; }
    header.top h1{ font-size:18px; }
    .tabs button{ padding:8px 12px; font-size:13px; }
    /* 移动端版本条(替代侧边栏卡片) */
    .plan-bar-mobile{
      display:flex; align-items:center; justify-content:space-between; gap:8px;
      margin:0 16px 10px; padding:10px 12px; border-radius:12px;
      background:linear-gradient(135deg, rgba(79,70,229,.12), rgba(14,165,164,.08));
      border:1px solid var(--accent-line); font-size:12px;
    }
    .plan-bar-mobile .pbm-ver{ font-weight:800; color:var(--accent); }
    .plan-bar-mobile .pbm-exp{ color:var(--muted); }
    .plan-bar-mobile .pbm-btn{ flex:none; padding:6px 12px; font-size:12px; }
    table.list{ font-size:12.5px; min-width:640px; }
    /* 移动端:主区不滚动,表格容器恢复横向滚动(表头 sticky 让步) */
    .block > div[style*="overflow-x"]{ overflow-x:auto !important; -webkit-overflow-scrolling:touch; }
    .block > div[style*="overflow-x"] table{ min-width:640px; }
    /* 二级导航条(tabs)链式吸顶:顶层与 block 内的 tabs 都贴 header.top 下方 */
    .tabs{ position:sticky; top:96px; z-index:52; background:var(--bg); padding-top:8px; }
    /* 三级表头:applyStickyHeaders 计算 --sticky-top */
    table.list thead th{ position:sticky; z-index:51; }
    .sub-tabs{ position:sticky; z-index:51; background:var(--bg); }
  }
    .brand{ padding:0; flex:none; }
    .brand .logo{ width:30px; height:30px; font-size:14px; }
    .brand b{ font-size:13px; }
    .brand small{ display:none; }
    .nav{ flex-direction:row; margin:0; flex:none; flex-wrap:nowrap; gap:2px;}
    .nav a{ flex:none; white-space:nowrap; padding:7px 9px; font-size:12.5px;}
    .nav a .lock{ display:none;}
    .nav a .ico{ width:auto; height:auto; margin-right:0;}
    .sidebar-foot{ display:none;}
    .sidebar-user{ display:none;}
    .plan-card-mini{ display:none; }
    main{ margin-left:0; height:auto; overflow:visible; display:block; width:100%; }
    main .top{ padding:14px 16px 10px; position:static; }
    #viewWrap{ padding:0 16px 60px; }
    .canvas{ grid-template-columns:1fr; }
    .cbox.wide-3,.cbox.wide-2{ grid-column:span 1; }
    .pos-grid{ grid-template-columns:1fr; }
    .self-grid{ grid-template-columns:1fr; }
    .tier-grid{ grid-template-columns:1fr; }
    .dash-kpis{ grid-template-columns:repeat(2,1fr); }
    .prod-dash{ grid-template-columns:1fr; }
    .polar-hero-num{ font-size:34px; }
    .modal{ max-width:100%; }
    .modal-center .modal{ max-width:92vw; }
    .block{ padding:16px 14px; }
    header.top h1{ font-size:19px; }
    .tabs button{ padding:8px 12px; font-size:13px; }
    /* 移动端版本条(替代侧边栏卡片) */
    .plan-bar-mobile{
      display:flex; align-items:center; justify-content:space-between; gap:8px;
      margin:0 16px 10px; padding:10px 12px; border-radius:12px;
      background:linear-gradient(135deg, rgba(79,70,229,.12), rgba(14,165,164,.08));
      border:1px solid var(--accent-line); font-size:12px;
    }
    .plan-bar-mobile .pbm-ver{ font-weight:800; color:var(--accent); }
    .plan-bar-mobile .pbm-exp{ color:var(--muted); }
    .plan-bar-mobile .pbm-btn{ flex:none; padding:6px 12px; font-size:12px; }
    table.list{ font-size:12.5px; min-width:640px; }
    /* 移动端:主区不滚动,表格容器恢复横向滚动(表头 sticky 让步) */
    .block > div[style*="overflow-x"]{ overflow-x:auto !important; -webkit-overflow-scrolling:touch; }
    .block > div[style*="overflow-x"] table{ min-width:640px; }
  }

/* ============ v4.0 新增组件: KPI / OKR卡片 / 任务行 / 跟进时间线 ============ */
.kpi-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-bottom:20px; }
.kpi-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 18px; box-shadow:var(--shadow); position:relative; overflow:hidden;
}
.kpi-card::before{ content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg,var(--accent),var(--accent2)); }
.kpi-label{ font-size:12px; color:var(--sub); margin-bottom:6px; }
.kpi-value{ font-size:24px; font-weight:700; line-height:1.2; }
.kpi-value small{ font-size:12px; font-weight:500; color:var(--sub); margin-left:4px; }

/* OKR 卡片 */
.okr-card{ border:1px solid var(--line); border-radius:10px; padding:16px 18px; margin-bottom:14px; background:#fbfcfe;}
.okr-head{ display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap;}
.o-badge{ font-size:11px; font-weight:700; color:#fff; background:linear-gradient(135deg,var(--accent),var(--accent2)); border-radius:6px; padding:2px 8px; flex:none;}
.okr-meta{ display:flex; align-items:center; gap:10px; margin:0 0 10px 34px; }
.okr-bar{ flex:1; height:8px; border-radius:6px; background:var(--line); overflow:hidden; max-width:360px;}
.okr-bar i{ display:block; height:100%; border-radius:6px; background:linear-gradient(90deg,var(--accent),var(--accent2)); transition:width .4s;}
.okr-pct{ font-size:12.5px; font-weight:700; color:var(--accent); min-width:40px;}
.kr{ display:flex; align-items:center; gap:10px; padding:7px 0 7px 34px; border-top:1px dashed var(--line); flex-wrap:wrap;}
.kr .k-dot{ width:7px; height:7px; border-radius:50%; background:var(--accent2); flex:none;}
.kr input.kr-desc{ flex:1; min-width:160px; border:none; background:transparent; font-size:13px; color:var(--ink); outline:none;}
.kr .num{ display:flex; align-items:center; gap:5px; font-size:12.5px; color:var(--sub);}
.kr .num input{ width:56px; border:1px solid var(--line); border-radius:6px; padding:3px 7px; font-size:12.5px; text-align:right; outline:none; background:#fff;}
.kr .num input:focus{ border-color:var(--accent);}
.mini-pct{ font-size:11.5px; color:var(--sub); min-width:34px; text-align:right;}

/* 任务行 */
.task-row{ display:flex; align-items:center; gap:12px; padding:11px 14px; border:1px solid var(--line); border-radius:9px; background:#fbfcfe; margin-bottom:8px; transition:.15s;}
.task-row:hover{ border-color:var(--accent-line); background:#fff;}
.task-main{ flex:1; min-width:0; }
.task-main b{ display:block; font-size:14px; }
.task-main.done b{ text-decoration:line-through; color:var(--sub); }
.task-meta{ font-size:12px; color:var(--sub); }
.task-check{ position:relative; flex:none; cursor:pointer; }
.task-check input{ position:absolute; opacity:0; }
.task-check span{
  display:block; width:20px; height:20px; border:2px solid #cbd5e1; border-radius:6px; transition:.15s;
}
.task-check input:checked + span{ background:var(--accent); border-color:var(--accent); position:relative;}
.task-check input:checked + span::after{
  content:""; position:absolute; left:5px; top:1px; width:5px; height:10px;
  border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg);
}

/* 跟进时间线 */
.fu-row{ display:flex; gap:14px; padding:12px 0; border-bottom:1px solid #f1f5f9; align-items:flex-start;}
.fu-row:last-child{ border-bottom:none; }
.fu-dot{ width:10px; height:10px; border-radius:50%; background:var(--accent2); flex:none; margin-top:6px; box-shadow:0 0 0 3px var(--accent-soft);}
.fu-body{ flex:1; min-width:0; }
.fu-head{ display:flex; gap:10px; align-items:baseline; flex-wrap:wrap;}
.fu-head b{ font-size:14px; }
.fu-head span{ font-size:12px; color:var(--sub); }
.fu-content{ font-size:13px; margin-top:4px; }
.fu-next{ font-size:12px; color:var(--accent); margin-top:4px; }

/* 排序表头可点 */
th[data-sort]{ cursor:pointer; user-select:none; }
th[data-sort]:hover{ color:var(--accent); }

/* ============ 文档编辑器 (Notion 风格块模式) ============ */
.doc-editor-mask{
  position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:200;
  display:flex; flex-direction:column; backdrop-filter:blur(3px);
}
.doc-editor-toolbar{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 18px; background:#fff; border-bottom:1px solid var(--line);
  flex:none;
}
.doc-tb-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.doc-tb-right{ display:flex; align-items:center; gap:6px; flex:none; }
.doc-tb-title{ font-size:13px; color:var(--sub); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:300px;}
.doc-tb-btn{
  border:1px solid var(--line); background:#fff; color:var(--ink);
  padding:5px 14px; border-radius:8px; font-size:13px; cursor:pointer;
}
.doc-tb-btn:hover{ border-color:var(--accent); color:var(--accent); }
.doc-tb-btn.primary{ background:var(--accent); border-color:var(--accent); color:#fff; }
.doc-tb-btn.primary:hover{ background:#4338ca; color:#fff; }
.doc-tb-add{
  width:30px; height:30px; border-radius:8px; border:1px solid var(--line);
  background:#fff; font-size:17px; cursor:pointer; color:var(--accent); line-height:1;
}
.doc-tb-add:hover{ background:var(--accent); color:#fff; }

.doc-editor-body{
  flex:1; overflow-y:auto; background:#fafbfc;
  padding:32px 20px 80px; display:flex; flex-direction:column; align-items:center;
}
.doc-title-input{
  width:100%; max-width:780px; border:none; background:transparent; outline:none;
  font-size:30px; font-weight:700; color:var(--ink); margin-bottom:14px; font-family:inherit;
}
.doc-blocks{ width:100%; max-width:780px; position:relative; }
.doc-preview-readonly{ width:100%; max-width:780px; }

/* 块行 */
.doc-block{
  position:relative; display:flex; align-items:flex-start; gap:8px;
  padding:3px 40px 3px 8px; border-radius:6px; margin-bottom:2px;
}
.doc-block:hover{ background:#fff; box-shadow:0 0 0 1px var(--line); }
.doc-block:hover .doc-block-type{ opacity:1; }
.doc-block-type{
  position:absolute; left:-86px; top:10px; font-size:11px; color:var(--sub);
  background:#fff; border:1px solid var(--line); border-radius:5px; padding:1px 7px;
  opacity:0; transition:.15s; white-space:nowrap; z-index:3;
}
.doc-block-del{
  position:absolute; right:8px; top:8px; border:none; background:none; color:var(--sub);
  font-size:13px; cursor:pointer; opacity:0; transition:.15s; padding:2px 6px; border-radius:5px;
}
.doc-block:hover .doc-block-del{ opacity:1; }
.doc-block-del:hover{ color:var(--danger); background:rgba(220,38,38,.08); }

/* 输入控件 */
.doc-input{
  width:100%; border:none; background:transparent; outline:none; resize:none;
  font-family:inherit; color:var(--ink); line-height:1.8; font-size:16px; padding:6px 0;
  overflow:hidden;
}
.doc-input-h1{ font-size:26px; font-weight:700; }
.doc-input-h2{ font-size:22px; font-weight:600; }
.doc-input-h3{ font-size:19px; font-weight:600; }
.doc-input-quote{
  border-left:3px solid var(--accent-line); padding-left:14px; color:#475569; font-style:italic;
}
.doc-input-code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:13.5px;
  background:#0f172a; color:#e2e8f0; border-radius:8px; padding:14px 16px; line-height:1.6;
  white-space:pre; overflow-x:auto;
}
.doc-divider-block{ height:1px; background:var(--line); margin:14px 0; width:100%; }

/* 添加菜单 */
.doc-add-menu{
  position:absolute; right:0; top:44px; background:#fff; border:1px solid var(--line);
  border-radius:10px; box-shadow:0 10px 30px rgba(15,23,42,.15); padding:6px; z-index:20; width:140px;
}
.doc-add-item{
  display:block; width:100%; text-align:left; border:none; background:none; padding:7px 12px;
  font-size:13px; cursor:pointer; border-radius:6px; color:var(--ink);
}
.doc-add-item:hover{ background:var(--accent-soft); color:var(--accent); }
.doc-end-add{
  display:block; width:100%; border:none; background:none; color:var(--sub); font-size:14px;
  padding:12px 8px; text-align:left; cursor:pointer; border-radius:8px; margin-top:6px;
}
.doc-end-add:hover{ color:var(--accent); background:var(--accent-soft); }

/* 预览(只读)样式 */
.doc-preview-readonly{ font-size:16px; line-height:1.9; color:var(--ink); }
.doc-preview-readonly .doc-h1{ font-size:28px; font-weight:700; margin:18px 0 10px; }
.doc-preview-readonly .doc-h2{ font-size:23px; font-weight:600; margin:16px 0 8px; }
.doc-preview-readonly .doc-h3{ font-size:19px; font-weight:600; margin:12px 0 6px; }
.doc-preview-readonly .doc-p{ margin:8px 0; }
.doc-preview-readonly .doc-quote{
  border-left:3px solid var(--accent); padding:8px 14px; margin:10px 0; color:#475569;
  background:var(--accent-soft); border-radius:0 8px 8px 0;
}
.doc-preview-readonly .doc-code{
  background:#0f172a; color:#e2e8f0; padding:14px 16px; border-radius:8px; font-size:13.5px;
  overflow-x:auto; margin:10px 0; font-family:ui-monospace,Menlo,monospace;
}
.doc-preview-readonly .doc-divider{ border:none; border-top:1px solid var(--line); margin:18px 0; }
.doc-preview-readonly .doc-bullet{ display:flex; gap:10px; padding:3px 0; }
.doc-bullet .bullet-mark{ color:var(--accent); flex:none; }
.doc-preview-readonly code{ background:rgba(15,23,42,.06); padding:1px 5px; border-radius:4px; font-size:14px; }
.doc-preview-readonly a{ color:var(--info); }

/* ============ 文档只读富文本视图(默认阅读模式) ============ */
.doc-readonly{
  width:100%; max-width:820px; font-size:16px; line-height:1.9; color:var(--ink);
  background:#fff; border:1px solid var(--line); border-radius:14px;
  padding:44px 56px 56px; box-shadow:var(--shadow);
}
.doc-readonly h1{ font-size:28px; font-weight:700; margin:22px 0 12px; line-height:1.4; }
.doc-readonly h1:first-child{ margin-top:0; }
.doc-readonly h2{ font-size:22px; font-weight:600; margin:20px 0 10px; line-height:1.4; }
.doc-readonly h3{ font-size:18px; font-weight:600; margin:16px 0 8px; }
.doc-readonly p{ margin:8px 0; }
.doc-readonly blockquote{
  border-left:4px solid var(--accent); padding:8px 16px; margin:12px 0; color:#475569;
  background:var(--accent-soft); border-radius:0 8px 8px 0;
}
.doc-readonly pre{
  background:#0f172a; color:#e2e8f0; padding:16px 18px; border-radius:10px; font-size:13.5px;
  overflow-x:auto; margin:12px 0; font-family:ui-monospace,Menlo,monospace; line-height:1.6;
}
.doc-readonly hr{ border:none; border-top:1px solid var(--line); margin:20px 0; }
.doc-readonly .doc-bullet{ display:flex; gap:10px; padding:3px 0; align-items:baseline; }
.doc-readonly .doc-bullet .bullet-mark{ color:var(--accent); flex:none; min-width:18px; }
.doc-readonly code{ background:rgba(15,23,42,.06); padding:1px 6px; border-radius:4px; font-size:14px; }
.doc-readonly a{ color:var(--info); }
.doc-readonly table{ border-collapse:collapse; width:100%; margin:12px 0; font-size:14px; }
.doc-readonly th, .doc-readonly td{ border:1px solid var(--line); padding:8px 12px; text-align:left; }
.doc-readonly th{ background:#f8fafc; font-weight:600; }

/* ============ 焦点 OKR 面板(单O + KR + 复盘) ============ */
.focus-okr{
  border:1px solid var(--line); border-radius:14px; overflow:hidden;
  background:#fff; box-shadow:var(--shadow); margin-bottom:16px;
}
.focus-o-head{
  display:flex; gap:14px; padding:14px 18px;
  background:linear-gradient(135deg,var(--accent-soft),rgba(14,165,164,.05));
  border-bottom:1px solid var(--line); align-items:flex-start;
}
.focus-o-badge{ flex:none; }
.focus-o-main{ flex:1; min-width:0; }
.focus-o-title{
  width:100%; border:none; background:transparent; outline:none;
  font-size:20px; font-weight:700; color:var(--ink); font-family:inherit; margin-bottom:4px;
}
.focus-o-meta{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.focus-o-content{
  font-size:14px; color:#475569; line-height:1.7; outline:none;
  border-radius:8px; padding:6px 8px; margin:-6px -8px; min-height:24px;
}
.focus-o-content:focus{ background:#fff; box-shadow:0 0 0 2px var(--accent-soft); }
.focus-o-side{ flex:none; text-align:right; width:120px; }
.focus-o-pct{ font-size:26px; font-weight:700; color:var(--accent); line-height:1.2; }
.focus-o-bar{ height:6px; background:var(--line); border-radius:4px; overflow:hidden; margin-top:6px; }
.focus-o-bar i{ display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--accent2)); }
.focus-o-actions{ margin-top:10px; display:flex; gap:4px; justify-content:flex-end; }

.focus-kr-list{ padding:14px 24px; }
.focus-kr{ display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px dashed var(--line); flex-wrap:wrap;}
.focus-kr:last-of-type{ border-bottom:none; }
.focus-kr-main{ flex:1; min-width:200px; }
.focus-kr-desc{
  width:100%; border:none; background:transparent; outline:none; font-size:14px; color:var(--ink);
  font-family:inherit; margin-bottom:6px;
}
.focus-kr-bar{ height:6px; background:var(--line); border-radius:4px; overflow:hidden; }
.focus-kr-bar i{ display:block; height:100%; background:linear-gradient(90deg,var(--accent2),var(--accent)); }
.focus-kr-num{ display:flex; align-items:center; gap:6px; }
.focus-kr-num .sep{ color:var(--sub); font-size:13px; }
.focus-kr-num input{
  width:64px; border:1px solid var(--line); border-radius:8px; padding:5px 8px;
  font-size:13px; text-align:right; outline:none; background:#fff;
}
.focus-kr-num input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.focus-kr-pct{ font-size:13px; font-weight:600; color:var(--accent); min-width:44px; text-align:right; }

.focus-review{ padding:16px 24px 20px; border-top:1px solid var(--line); background:#fbfcfe; }
.focus-review-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.focus-review-head span{ font-size:13px; font-weight:600; color:var(--sub); }
.focus-review-input{
  width:100%; border:1px solid var(--line); border-radius:10px; padding:12px 14px;
  font-size:13.5px; font-family:inherit; color:var(--ink); outline:none; resize:vertical;
  background:#fff; line-height:1.7; min-height:80px;
}
.focus-review-input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }

/* ============ 内容系统 v2:选题为中心 ============ */
.content-stats{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-bottom:14px; }
.cs-item{
  background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px 18px;
  box-shadow:var(--shadow); text-align:center;
}
.cs-item.star{ border-color:var(--accent-line); background:linear-gradient(135deg,var(--accent-soft),rgba(14,165,164,.06)); }
.cs-num{ font-size:24px; font-weight:700; color:var(--ink); }
.cs-item.star .cs-num{ color:var(--accent); }
.cs-label{ font-size:12px; color:var(--sub); margin-top:2px; }

.content-filter-bar{ display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
.cf-btn{
  border:1px solid var(--line); background:#fff; border-radius:20px; padding:5px 16px;
  font-size:13px; cursor:pointer; color:var(--sub);
}
.cf-btn:hover{ color:var(--accent); border-color:var(--accent-line); }
.cf-btn.active{ background:var(--accent); border-color:var(--accent); color:#fff; }

/* 选题行 */
.topic-row{
  display:flex; align-items:center; gap:14px; padding:13px 16px;
  border:1px solid var(--line); border-radius:10px; background:#fbfcfe; margin-bottom:8px;
  transition:.15s;
}
.topic-row:hover{ border-color:var(--accent-line); background:#fff; }
.topic-main{ flex:1; min-width:0; }
.topic-title-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.topic-title{ font-size:14.5px; }
.topic-week{ font-size:11px; color:var(--sub); background:rgba(100,116,139,.1); padding:1px 8px; border-radius:10px; }
.topic-meta{ font-size:12px; color:var(--sub); margin-top:5px; display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
.plat-chip{ font-size:11px; padding:1px 8px; border-radius:10px; background:rgba(100,116,139,.1); color:#475569; }
.plat-chip.pub{ background:rgba(22,163,74,.12); color:var(--ok); }
.plat-chip.rev{ background:rgba(217,119,6,.12); color:var(--warn); }
.plat-chip.empty{ background:transparent; border:1px dashed var(--line); }
.topic-side{ flex:none; text-align:right; }
.topic-actions{ display:flex; gap:4px; justify-content:flex-end; margin-bottom:4px; }
.topic-count{ font-size:11.5px; color:var(--sub); }
.btn-sm{
  border:1px solid var(--line); background:#fff; border-radius:7px; padding:3px 10px;
  font-size:12px; cursor:pointer; color:var(--ink);
}
.btn-sm:hover{ border-color:var(--accent); color:var(--accent); }
.btn-sm.ok{ background:rgba(22,163,74,.08); border-color:rgba(22,163,74,.25); color:var(--ok); }
.btn-sm.no{ background:rgba(220,38,38,.06); border-color:rgba(220,38,38,.2); color:var(--danger); }
.btn-sm.danger{ color:var(--danger); }

/* 选题详情抽屉 */
.tm-header{ margin-bottom:12px; }
.tm-title-input{
  width:100%; border:none; border-bottom:2px solid var(--accent); background:transparent;
  font-size:18px; font-weight:700; color:var(--ink); outline:none; padding:6px 2px; font-family:inherit;
}
.tm-meta-grid{ display:grid; grid-template-columns:1fr 1fr 1fr 1fr; gap:10px; margin-bottom:14px; }
.tm-meta-grid label{ font-size:11.5px; font-weight:600; color:var(--sub); display:block; margin-bottom:4px; }
.tm-meta-grid input, .tm-meta-grid select{ width:100%; }
.tm-sec{ border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:12px; background:#fbfcfe; }
.tm-sec-title{ font-size:13px; font-weight:600; margin-bottom:8px; color:var(--ink); }
.tm-content-row{ display:flex; gap:8px; align-items:center; margin-bottom:8px; flex-wrap:wrap; }
.tm-content-row .tm-c-platform{ width:90px; flex:none; }
.tm-content-row .tm-c-title{ flex:1; min-width:140px; }
.tm-content-row .tm-c-status{ width:90px; flex:none; }
.tm-metric-row{ font-size:13px; padding:6px 0; border-bottom:1px dashed var(--line); color:var(--ink); }
.tm-metric-row:last-child{ border-bottom:none; }

/* ============ 战略页 OKR 时间轴 ============ */
#strategyOkrList{ position:relative; }
.tl-item{
  display:flex; gap:16px; padding:6px 0 6px 4px; position:relative;
  border-left:2px solid var(--line); margin-left:9px;
}
.tl-item.done{ opacity:.65; }
.tl-item.done .tl-title{ color:var(--sub); text-decoration:line-through; }
.tl-marker{ flex:none; width:20px; position:relative; }
.tl-marker::before{
  content:""; position:absolute; left:6px; top:14px; width:8px; height:8px;
  border-radius:50%; background:var(--line);
}
.tl-item:not(.done) .tl-marker::before{ background:var(--accent); }
.tl-current-dot{
  position:absolute; left:0; top:6px; width:20px; height:20px; border-radius:50%;
  background:var(--accent-soft); border:2px solid var(--accent);
}
.tl-current-dot::after{
  content:""; position:absolute; left:5px; top:5px; width:6px; height:6px; border-radius:50%; background:var(--accent);
}
.tl-body{ flex:1; min-width:0; padding-bottom:20px; }
.tl-head{ cursor:pointer; border-radius:10px; padding:10px 12px; transition:.15s; }
.tl-head:hover{ background:#f8fafc; }
.tl-title-row{ display:flex; align-items:center; gap:10px; }
.tl-title{ font-size:15px; }
.tl-toggle{ color:var(--sub); font-size:12px; margin-left:auto; }
.tl-meta{ font-size:12px; color:var(--sub); margin-top:4px; display:flex; align-items:center; gap:8px; }
.tl-now{ font-size:10px; background:var(--accent); color:#fff; padding:1px 8px; border-radius:10px; }
.tl-progress{ display:flex; align-items:center; gap:10px; padding:4px 12px; }
.tl-bar{ flex:1; height:6px; background:var(--line); border-radius:4px; overflow:hidden; max-width:320px;}
.tl-bar i{ display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--accent2)); }
.tl-krs{ padding:6px 12px 0; }
.tl-kr{ display:flex; align-items:center; gap:10px; padding:6px 0; border-top:1px dashed var(--line); }
.tl-kr-text{ flex:1; font-size:13.5px; }
.tl-kr-num{ font-size:12px; color:var(--sub); min-width:80px; text-align:right; }
.tl-actions{ display:flex; gap:4px; padding:8px 12px 0; }

/* 目标任务页紧凑 OKR 卡片 */
.focus-okr.collapsed .focus-o-head{ cursor:pointer; }
.focus-okr.collapsed .focus-o-head:hover{ background:linear-gradient(135deg,var(--accent-soft),rgba(14,165,164,.04)); }
.focus-o-title-row{ display:flex; align-items:center; gap:10px; }
.focus-o-title-text{ font-size:15.5px; flex:1; }
.focus-o-toggle{ font-size:12px; color:var(--sub); }
.focus-okr-detail{ border-top:1px solid var(--line); }

/* ============ 产品模块:五层漏斗 ============ */
.tier-row{ display:flex; flex-direction:column; gap:16px; padding:6px 0; }
.funnel-note{ font-size:12px; color:var(--sub); margin:-6px 0 4px 82px; line-height:1.6; }
.tier-grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-top:6px; }
.tier-col{
  border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fbfcfe;
  display:flex; flex-direction:column; gap:8px; padding:12px;
}
.tier-col.main{ border-color:var(--accent-line); box-shadow:0 0 0 1px var(--accent-soft); }
.tier-col-head{ font-size:14px; font-weight:700; color:var(--accent); }
.tier-col.main .tier-col-head{ color:var(--accent); }
.tier-col-desc{ display:block; font-size:11px; font-weight:500; color:var(--sub); margin-top:3px; line-height:1.5; }
.tier-product{ border:1px solid var(--line); border-radius:8px; padding:9px 11px; background:#fff; }
.tier-product b{ display:block; font-size:12.5px; line-height:1.4; }
.tier-price{ font-size:13px; font-weight:700; color:var(--accent); margin-top:3px; }
.tier-price small{ font-size:11px; font-weight:500; color:var(--sub); }
.tier-status{ font-size:11px; margin-top:4px; color:var(--sub); }
.tier-status.pub{ color:var(--ok); }
.tier-status.dev{ color:var(--warn); }
.tier-empty{ color:var(--sub); font-size:12px; text-align:center; padding:12px 0; }

/* 渠道选择 chip */
.chk-chip{
  display:inline-flex; align-items:center; gap:4px; border:1px solid var(--line);
  border-radius:20px; padding:4px 12px; font-size:12px; cursor:pointer; margin:0 6px 6px 0;
  background:#fff; color:var(--sub);
}
.chk-chip input{ display:none; }
.chk-chip.on{ border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }

/* ============ 财务模块 ============ */
.fin-kpis{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-bottom:20px; }
.fin-kpi{
  background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px 18px;
  box-shadow:var(--shadow); border-top:3px solid var(--line);
}
.fin-kpi.income{ border-top-color:var(--ok); }
.fin-kpi.expense{ border-top-color:var(--danger); }
.fin-kpi-label{ font-size:12px; color:var(--sub); margin-bottom:6px; }
.fin-kpi-num{ font-size:24px; font-weight:700; }
.fin-kpi.income .fin-kpi-num{ color:var(--ok); }
.fin-kpi.expense .fin-kpi-num{ color:var(--danger); }

.fin-chart{ padding:8px 4px 0; }
.fin-chart-row{ display:flex; align-items:flex-end; gap:14px; height:180px; padding:0 8px; }
.fin-chart-col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; }
.fin-chart-bars{ flex:1; display:flex; align-items:flex-end; gap:6px; width:100%; justify-content:center; }
.fin-bar{ width:22px; border-radius:5px 5px 0 0; min-height:2px; transition:height .4s; }
.fin-bar.income{ background:linear-gradient(180deg,var(--ok),#4ade80); }
.fin-bar.expense{ background:linear-gradient(180deg,var(--danger),#f87171); }
.fin-chart-label{ font-size:12px; color:var(--sub); }
.fin-chart-legend{ display:flex; gap:16px; justify-content:center; padding:10px 0 4px; font-size:12px; color:var(--sub); }
.fin-chart-legend .lg{ display:inline-flex; align-items:center; gap:5px; }
.fin-chart-legend .lg::before{ content:""; width:10px; height:10px; border-radius:3px; display:inline-block; }
.fin-chart-legend .lg.income::before{ background:var(--ok); }
.fin-chart-legend .lg.expense::before{ background:var(--danger); }

/* ============ AI 自动化模块 ============ */
.ai-group{ margin-bottom:20px; }
.ai-group-title{
  font-size:13px; font-weight:700; color:var(--accent); margin-bottom:10px;
  display:flex; align-items:center; gap:8px;
}
.ai-group-title::before{ content:""; width:8px; height:8px; border-radius:2px; background:var(--accent); }
.ai-group-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; }
.ai-card{
  border:1px solid var(--line); border-radius:12px; padding:14px 16px; background:#fbfcfe;
  display:flex; flex-direction:column; gap:8px; transition:.15s;
}
.ai-card:hover{ border-color:var(--accent-line); background:#fff; box-shadow:var(--shadow); }
.ai-card-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ai-card-head b{ font-size:14px; }
.ai-card-meta{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12px; color:var(--sub); }
.ai-trigger{ background:rgba(100,116,139,.1); padding:1px 8px; border-radius:10px; }
.ai-use{ color:var(--sub); }
.ai-scene{ font-size:13px; color:var(--ink); }
.ai-desc{ font-size:12px; color:var(--sub); line-height:1.6; }
.ai-card-actions{ display:flex; gap:4px; justify-content:flex-end; border-top:1px dashed var(--line); padding-top:8px; }

/* ============ AI 对话面板 ============ */
.ai-chat-layout{ display:grid; grid-template-columns:1fr 300px; gap:16px; height:calc(100vh - 140px); }
.ai-chat-panel{
  background:var(--card); border:1px solid var(--line); border-radius:14px;
  display:flex; flex-direction:column; overflow:hidden; box-shadow:var(--shadow);
}
.ai-chat-head{
  display:flex; align-items:center; justify-content:space-between; padding:12px 18px;
  border-bottom:1px solid var(--line); background:linear-gradient(135deg,var(--accent-soft),rgba(14,165,164,.05));
}
.ai-chat-title{ font-size:15px; font-weight:700; }
.ai-chat-msgs{ flex:1; overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:12px; }
.ai-msg{ display:flex; }
.ai-msg.user{ justify-content:flex-end; }
.ai-msg-bubble{
  max-width:75%; padding:10px 15px; border-radius:14px; font-size:14px; line-height:1.7;
  white-space:pre-wrap; word-break:break-word;
}
.ai-msg.user .ai-msg-bubble{ background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; border-bottom-right-radius:4px; }
.ai-msg.ai .ai-msg-bubble{ background:#f1f5f9; color:var(--ink); border-bottom-left-radius:4px; }
.ai-msg-bubble.thinking{ display:flex; gap:4px; padding:14px 18px; }
.ai-msg-bubble.thinking .dot{
  width:7px; height:7px; border-radius:50%; background:var(--accent); animation:blink 1s infinite;
}
.ai-msg-bubble.thinking .dot:nth-child(2){ animation-delay:.2s; }
.ai-msg-bubble.thinking .dot:nth-child(3){ animation-delay:.4s; }
@keyframes blink{ 0%,80%,100%{opacity:.2} 40%{opacity:1} }
.ai-chat-input-row{ display:flex; gap:10px; padding:12px 16px; border-top:1px solid var(--line); align-items:flex-end;}
.ai-chat-input-row textarea{
  flex:1; border:1px solid var(--line); border-radius:10px; padding:10px 14px; font-size:14px;
  font-family:inherit; outline:none; resize:none; max-height:120px; line-height:1.5;
}
.ai-chat-input-row textarea:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.ai-chat-input-row button{ padding:10px 22px; }

.ai-config-panel{
  background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow);
  height:fit-content;
}
.ai-config-title{
  padding:12px 16px; border-bottom:1px solid var(--line); font-weight:700; font-size:14px;
  background:linear-gradient(135deg,var(--accent-soft),rgba(14,165,164,.05));
}
.ai-config-body{ padding:16px; }
.ai-config-status{ font-size:13px; }
.ai-config-status .ok{ color:var(--ok); }
.ai-config-status .warn{ color:var(--warn); }
.ai-config-body label{ font-size:12px; font-weight:600; color:var(--sub); display:block; margin-bottom:5px; }
.ai-config-body input, .ai-config-body select{
  width:100%; border:1px solid var(--line); border-radius:8px; padding:8px 11px; font-size:13px; outline:none;
}
.ai-config-body input:focus, .ai-config-body select:focus{ border-color:var(--accent); }
.ai-config-tip{ font-size:11.5px; color:var(--sub); margin-top:12px; line-height:1.6; }
.ai-config-tip b{ color:var(--ink); }
@media (max-width: 900px){
  .ai-chat-layout{ grid-template-columns:1fr; height:auto; }
  .ai-config-panel{ order:-1; }
  .ai-chat-panel{ height:60vh; }
}

/* ============ 任务面板 + 分页 ============ */
.task-head{ flex-wrap:wrap; gap:10px 12px; }
.task-head .task-panels{ margin:0; }
.task-panels{ display:flex; gap:6px; flex-wrap:wrap; }
.tp-btn{
  border:1px solid var(--line); background:#fff; border-radius:10px; padding:6px 13px;
  font-size:13px; cursor:pointer; color:var(--sub); transition:.15s;
  display:flex; align-items:center; gap:5px;
}
.tp-btn .tp-num{
  font-style:normal; font-size:11px; font-weight:700; min-width:18px; text-align:center;
  background:rgba(100,116,139,.12); color:var(--sub); border-radius:10px; padding:0 5px;
}
.tp-btn:hover{ color:var(--accent); border-color:var(--accent-line); }
.tp-btn.active{ background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; }
.tp-btn.active .tp-num{ background:rgba(255,255,255,.25); color:#fff; }

/* 帮助页微信二维码 */
.wechat-qr{ display:flex; justify-content:center; padding:10px 0 4px; }
.wechat-qr img{ width:150px; height:150px; border:1px solid var(--line); border-radius:12px; padding:8px; background:#fff; }
.wechat-qr-fallback{ font-size:12px; color:var(--sub); text-align:center; padding:12px; border:1px dashed var(--line); border-radius:10px; }

.task-title-line{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.task-type{ font-size:11px; color:var(--sub); background:rgba(100,116,139,.1); padding:1px 8px; border-radius:10px; }
.chip.pri{ font-size:11px; padding:1px 8px; border-radius:10px; }
.chip.pri-high{ background:rgba(220,38,38,.1); color:var(--danger); }
.chip.pri-mid{ background:rgba(217,119,6,.1); color:var(--warn); }
.chip.pri-low{ background:rgba(100,116,139,.1); color:#475569; }

.pager{ display:flex; align-items:center; justify-content:center; gap:14px; padding:16px 0 4px; }
.pager button[disabled]{ opacity:.4; cursor:not-allowed; }
.pager-info{ font-size:12.5px; color:var(--sub); }

/* ============ AI 助理悬浮按钮 + 弹窗 ============ */
.ai-fab{
  position:fixed; right:10px; bottom:96px; width:58px; height:58px; border-radius:50%;
  background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff;
  border:none; cursor:pointer; box-shadow:0 10px 28px rgba(79,70,229,.45); z-index:150;
  display:flex; align-items:center; justify-content:center; transition:.25s; overflow:hidden;
}
.ai-fab svg{ width:26px; height:26px; }
.ai-fab::after{
  content:""; position:absolute; inset:0; border-radius:50%;
  border:2px solid rgba(255,255,255,.3); animation:fabPulse 2.5s infinite;
}
@keyframes fabPulse{ 0%{transform:scale(1);opacity:.7} 70%{transform:scale(1.15);opacity:0} 100%{opacity:0} }
.ai-fab:hover{ transform:scale(1.08); }
.ai-fab.hidden{ opacity:0; pointer-events:none; transform:scale(.8); }

.ai-assistant{
  position:fixed; right:0; top:0; bottom:0; width:400px; max-width:92vw;
  background:#fff; box-shadow:-12px 0 40px rgba(15,23,42,.25); z-index:150;
  display:flex; flex-direction:column; overflow:hidden;
  opacity:0; pointer-events:none; transform:translateX(100%); transition:transform .28s ease, opacity .2s;
  border-left:1px solid var(--line);
}
.ai-assistant.show{ opacity:1; pointer-events:auto; transform:translateX(0); }
.ai-assist-head{
  display:flex; align-items:center; justify-content:space-between; padding:14px 18px;
  background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; font-weight:700; font-size:14px;
}
.ai-assist-title{ display:flex; align-items:center; gap:8px; }
.ai-assist-title svg{ width:20px; height:20px; }
.ai-assist-head-actions{ display:flex; gap:4px; }
.ai-assist-head-actions button{ color:#fff; border-color:rgba(255,255,255,.3); }
.ai-msgs{ flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; }
.ai-assist-config{
  display:flex; align-items:center; justify-content:space-between; padding:6px 14px;
  border-top:1px solid var(--line); font-size:12px; color:var(--sub); background:#fbfcfe;
}
.ai-assist-config .ok{ color:var(--ok); }
.ai-assist-config .warn{ color:var(--warn); }
.ai-assist-input{ display:flex; gap:8px; padding:10px 12px; border-top:1px solid var(--line); align-items:flex-end;}
.ai-assist-input textarea{
  flex:1; border:1px solid var(--line); border-radius:10px; padding:9px 13px; font-size:13.5px;
  font-family:inherit; outline:none; resize:none; max-height:90px; line-height:1.5;
}
.ai-assist-input textarea:focus{ border-color:var(--accent); }
.ai-assist-input button{ padding:9px 18px; }
.ai-settings{ padding:12px 14px; border-top:1px solid var(--line); background:#fbfcfe; }
.ai-settings label{ font-size:12px; font-weight:600; color:var(--sub); display:block; margin-bottom:4px; }
.ai-settings input, .ai-settings select{
  width:100%; border:1px solid var(--line); border-radius:8px; padding:7px 10px; font-size:13px; outline:none;
}
.ai-tip{ font-size:11px; color:var(--sub); margin-top:8px; }

/* ============ 登录 ============ */
.login-mask{
  position:fixed; inset:0; background:linear-gradient(135deg,#0f172a,#1e293b); z-index:300;
  display:none; align-items:center; justify-content:center;
}
.login-mask.show{ display:flex; }
.login-box{
  background:#fff; border-radius:18px; padding:36px 40px; width:100%; max-width:360px;
  box-shadow:0 24px 60px rgba(0,0,0,.4); text-align:center;
}
.login-logo{
  width:56px; height:56px; border-radius:16px; margin:0 auto 14px;
  background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff;
  font-size:26px; font-weight:700; display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 20px rgba(79,70,229,.4);
}
.login-box h2{ font-size:19px; margin-bottom:6px; }
.login-box p{ font-size:13px; color:var(--sub); margin-bottom:18px; }
.login-box input{
  width:100%; border:1px solid var(--line); border-radius:10px; padding:11px 14px; font-size:14px;
  outline:none; margin-bottom:8px;
}
.login-box input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.login-err{ color:var(--danger); font-size:12.5px; min-height:18px; margin-bottom:6px; }
.login-tip{ font-size:11.5px; color:var(--sub); margin-top:12px; }

/* ============ 侧边栏版本卡片(深色卡片 + 金色点缀,融入侧边栏,字清晰) ============ */
.plan-card-mini{
  margin:auto 10px 10px; /* margin-top:auto 紧贴底部操作栏上方 */
  padding:13px 14px; border-radius:14px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(251,191,36,.22);
  color:#f8fafc; position:relative; overflow:hidden;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  cursor:pointer; transition:.18s;
}
.plan-card-mini:hover{
  border-color:rgba(251,191,36,.45);
  background:rgba(251,191,36,.07);
  transform:translateY(-1px);
}
.plan-card-mini::before{
  content:""; position:absolute; right:-26px; top:-26px; width:80px; height:80px;
  background:rgba(251,191,36,.10); border-radius:50%;
}
.plan-card-mini::after{
  content:""; position:absolute; left:-14px; bottom:-28px; width:64px; height:64px;
  background:rgba(251,191,36,.06); border-radius:50%;
}
.plan-card-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; position:relative; z-index:1; }
.plan-card-label{
  font-size:10px; font-weight:800; letter-spacing:1px; color:#94a3b8;
}
.plan-card-btn{
  border:1px solid rgba(251,191,36,.5); cursor:pointer; border-radius:20px; padding:3px 12px;
  background:rgba(251,191,36,.12); color:#fbbf24; font-size:11px; font-weight:700;
  transition:.15s;
}
.plan-card-btn:hover{ background:rgba(251,191,36,.25); transform:translateY(-1px); }
.plan-card-version{ font-size:17px; font-weight:800; margin-top:4px; position:relative; z-index:1; color:#fbbf24; }
.plan-card-sub{ font-size:11px; color:#cbd5e1; margin-top:1px; position:relative; z-index:1; }

/* ============ 侧边栏用户区 ============ */
.sidebar-user{
  display:flex; align-items:center; justify-content:flex-start; gap:2px; padding:10px 8px 8px;
  border-top:1px solid rgba(255,255,255,.06);
}
.su-btn{
  display:flex; align-items:center; justify-content:center; width:30px; height:30px;
  border:none; background:transparent;
  color:var(--side-ink); cursor:pointer; border-radius:7px; transition:.15s;
}
.su-btn:hover{ background:rgba(255,255,255,.1); color:#fff; }
.su-btn .su-ico{ display:flex; width:18px; height:18px; }
.su-btn .su-ico svg{ width:17px; height:17px; }

/* ============ 帮助弹窗 ============ */
.help-section{ margin-bottom:16px; }
.help-section b{ font-size:14px; display:block; margin-bottom:6px; }
.help-section ul{ padding-left:18px; }
.help-section li{ font-size:13px; color:#475569; line-height:1.8; }

/* ============ 产品 tab + 详情 ============ */

/* 漏斗网格响应式 */
.tier-grid{ grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }

/* 产品名链接 */
.p-name-link{ cursor:pointer; color:var(--accent); }
.p-name-link:hover{ text-decoration:underline; }

/* 产品详情抽屉 */
.pd-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:14px; }
.pd-stat{ background:#f8fafc; border:1px solid var(--line); border-radius:10px; padding:10px; text-align:center; }
.pd-stat-num{ font-size:18px; font-weight:700; color:var(--accent); }
.pd-stat-label{ font-size:11px; color:var(--sub); margin-top:2px; }
.pd-sec{ border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:12px; }
.pd-sec-title{ font-size:13px; font-weight:600; margin-bottom:8px; }
.pd-doc-actions{ display:flex; gap:8px; margin-bottom:8px; }
.pd-doc-row{ display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px dashed var(--line); }
.pd-doc-row:last-child{ border-bottom:none; }
.pd-cust{ font-size:13px; padding:5px 0; border-bottom:1px dashed var(--line); }
.pd-cust:last-child{ border-bottom:none; }

/* ============ 转化漏斗 ============ */
.funnel{ display:flex; flex-direction:column; gap:10px; }
.funnel-row{ display:flex; align-items:center; gap:12px; }
.funnel-label{ width:70px; flex:none; font-size:13px; color:var(--sub); text-align:right; }
.funnel-track{
  flex:1; height:30px; background:#f1f5f9; border-radius:8px; overflow:hidden;
  display:flex; align-items:center; position:relative;
}
.funnel-fill{
  height:100%; background:linear-gradient(90deg,var(--accent),var(--accent2));
  border-radius:8px; min-width:8px; transition:width .4s; opacity:.85;
}
.funnel-fill.star{ background:linear-gradient(90deg,#f59e0b,#f97316); }
.funnel-val{
  position:absolute; left:12px; font-size:14px; font-weight:700; color:var(--ink);
  text-shadow:0 1px 2px rgba(255,255,255,.8);
}
.funnel-conv{ width:52px; flex:none; font-size:12px; color:var(--sub); text-align:left; }

/* ============ 转化漏斗独立页 + 爆款卡片 ============ */
.funnel-rate-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.fr-item{
  background:linear-gradient(135deg,var(--accent-soft),rgba(14,165,164,.05));
  border:1px solid var(--accent-line); border-radius:12px; padding:14px 16px; text-align:center;
}
.fr-num{ font-size:22px; font-weight:700; color:var(--accent); }
.fr-label{ font-size:12px; color:var(--sub); margin-top:2px; }

/* 爆款卡片 */
.viral-card{
  border:1px solid var(--line); border-radius:12px; padding:14px 16px; background:#fbfcfe;
  margin-bottom:10px; transition:.15s; display:flex; flex-direction:column; gap:8px;
}
.viral-card:hover{ border-color:var(--accent-line); background:#fff; box-shadow:var(--shadow); }
.viral-card-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.viral-card-head b{ font-size:14px; line-height:1.4; }
.viral-card-meta{ font-size:12px; color:var(--sub); }
.viral-metrics{ display:flex; gap:8px; flex-wrap:wrap; }
.vm{ font-size:12px; background:rgba(100,116,139,.08); padding:2px 9px; border-radius:10px; color:#475569; }
.viral-formula{ font-size:12.5px; color:var(--accent); }
.viral-angle{ font-size:12.5px; color:var(--sub); }

/* 二级状态 tab(爆款/选题/内容) */
.sub-tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); margin:0 0 14px; overflow-x:auto; position:sticky; top:var(--sticky-top,0px); z-index:11; background:var(--card); padding:10px 0 0; }
.sub-tabs button{
  border:none; background:none; padding:7px 14px; font-size:13px; color:var(--sub);
  border-bottom:2px solid transparent; cursor:pointer; white-space:nowrap; border-radius:0;
  display:flex; align-items:center; gap:6px;
}
.sub-tabs button:hover{ color:var(--accent); }
.sub-tabs button.active{ color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
.sub-tabs .st-num{ font-style:normal; font-size:11px; font-weight:700; background:rgba(100,116,139,.12); color:var(--sub); border-radius:10px; padding:0 6px; min-width:18px; text-align:center; }
.sub-tabs button.active .st-num{ background:var(--accent-soft); color:var(--accent); }

/* 内容库卡片 */
.content-card{
  border:1px solid var(--line); border-radius:12px; padding:13px 16px; background:#fbfcfe;
  margin-bottom:10px; transition:.15s; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}
.content-card:hover{ border-color:var(--accent-line); background:#fff; box-shadow:var(--shadow); }
.content-card-title{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.content-card-title b{ font-size:14px; line-height:1.4; }
.content-card-meta{ display:flex; gap:14px; font-size:12px; color:var(--sub); margin-top:5px; flex-wrap:wrap; }
.content-card-meta a{ color:var(--accent); }
.content-card-actions{ display:flex; gap:6px; flex:none; }

/* 选题采用:平台多选 */
.adopt-platforms{ display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
.adopt-p{ display:flex; align-items:center; gap:6px; border:1px solid var(--line); border-radius:10px; padding:9px 12px; font-size:13px; cursor:pointer; background:#fbfcfe; }
.adopt-p:hover{ border-color:var(--accent-line); }
.adopt-p input{ accent-color:var(--accent); }
.viral-card-actions{ display:flex; gap:6px; border-top:1px dashed var(--line); padding-top:10px; }

/* ============ AI 列表筛选栏 ============ */
.ai-filter-bar{ display:flex; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.ai-filter-bar select{ width:auto; min-width:130px; }
.ai-list td{ vertical-align:middle; }

/* ============ SOP 预览 ============ */
.sop-wrap{ max-width:820px; margin:0 auto; }
.sop-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.sop-head h3{ font-size:16px; font-weight:700; }

/* ============ AI 页固定表头 ============ */
.ai-fixed-head{
  position:sticky; top:0; z-index:15; background:var(--bg);
  padding:2px 0 12px; margin-bottom:4px;
}
.ai-fixed-head .ai-filter-bar{ margin-bottom:0; }
.ai-table-wrap thead th{ position:sticky; top:0; z-index:14; background:#fff; }

/* ============ 客户模块 v3 ============ */
.mini-progress{ width:60px; height:5px; background:var(--line); border-radius:3px; overflow:hidden; display:inline-block; vertical-align:middle; margin-right:5px; }
.mini-progress i{ display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--accent2)); }
.cd-info{ display:flex; gap:14px; flex-wrap:wrap; font-size:13px; color:#475569; }
.cd-item{ font-size:13px; padding:7px 0; border-bottom:1px dashed var(--line); line-height:1.6; }
.cd-item:last-child{ border-bottom:none; }
.cd-item.cd-pay{ color:var(--ok); font-weight:600; }
.cd-next{ color:var(--accent); font-size:12px; }
.dl-doc-sec{ border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-top:8px; background:#fbfcfe; }

/* ============ 数据概览 Dashboard ============ */
.polar-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; }
.polar-item{
  background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px 18px;
  text-align:center; box-shadow:var(--shadow);
}
.polar-item.star{ border-color:var(--accent-line); background:linear-gradient(135deg,var(--accent-soft),rgba(14,165,164,.06)); }
.polar-num{ font-size:26px; font-weight:700; color:var(--accent); }
.polar-item.star .polar-num{ color:var(--accent); }
.polar-label{ font-size:12px; color:var(--sub); margin-top:2px; }

.dash-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; }
.dash-card{
  background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px 16px;
  box-shadow:var(--shadow); transition:.15s;
}
.dash-card.clickable{ cursor:pointer; }
.dash-card.clickable:hover{ border-color:var(--accent-line); transform:translateY(-2px); box-shadow:0 6px 18px rgba(79,70,229,.12); }
.dash-card-label{ font-size:12px; color:var(--sub); margin-bottom:6px; }
.dash-card-value{ font-size:22px; font-weight:700; }
.dash-card-value small{ font-size:12px; color:var(--sub); margin-left:4px; }
.dash-card-desc{ font-size:11.5px; color:var(--sub); margin-top:4px; }

.dash-funnels{ display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:20px; }
.dash-funnel-title{ font-size:13px; font-weight:600; margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; }

/* 模块卡:指标行(固定一行4个) + 主体 */
.dash-kpis{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.dash-kpis .kpi-card{ box-shadow:none; padding:12px 14px; min-height:78px; display:flex; flex-direction:column; justify-content:center; }
.dash-kpis .kpi-value{ font-size:20px; }
.dash-body{ border-top:1px dashed var(--line); padding-top:14px; }
.dash-sub-title{ font-size:12.5px; font-weight:600; color:var(--sub); margin-bottom:10px; }

/* 产品模块:排行榜(领奖台) + 漏斗并排 */
.prod-dash{ display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:start; }
.prod-col{ min-width:0; }
.podium{ display:flex; align-items:flex-end; gap:10px; max-width:440px; }
.podium-col{ flex:1; display:flex; flex-direction:column; align-items:center; text-align:center; min-width:0; }
.podium-name{ font-size:11.5px; font-weight:600; color:var(--ink); max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:4px; }
.podium-rev{ font-size:12.5px; font-weight:700; color:var(--accent); margin-bottom:6px; }
.podium-box{ width:100%; border-radius:8px 8px 0 0; background:linear-gradient(180deg,var(--accent-soft),rgba(79,70,229,.25)); }
.podium-col.rank1 .podium-box{ height:110px; background:linear-gradient(180deg,#fbbf24,#f59e0b); }
.podium-col.rank2 .podium-box{ height:78px; background:linear-gradient(180deg,#cbd5e1,#94a3b8); }
.podium-col.rank3 .podium-box{ height:52px; background:linear-gradient(180deg,#fcd9b6,#f0a868); }
.podium-idx{ width:22px; height:22px; margin-top:6px; border-radius:6px; font-size:12px; font-weight:700;
  display:flex; align-items:center; justify-content:center; color:#475569; background:rgba(100,116,139,.12); }
.podium-col.rank1 .podium-idx{ background:linear-gradient(135deg,#f59e0b,#f97316); color:#fff; }
.podium-col.empty{ visibility:hidden; }

/* 客户详情 tab 切换 */
.cd-tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:12px; overflow-x:auto; }
.cd-tabs button{
  border:none; background:none; padding:7px 12px; font-size:12.5px; color:var(--sub);
  border-bottom:2px solid transparent; cursor:pointer; white-space:nowrap; border-radius:0;
}
.cd-tabs button:hover{ color:var(--accent); }
.cd-tabs button.active{ color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
.cd-panels{ min-height:120px; }

/* 北极星解读行 */
.polar-hero-row{ display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
.polar-hero-num{
  flex:none; font-size:44px; font-weight:800; line-height:1;
  background:linear-gradient(135deg,var(--accent),var(--accent2)); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.polar-hero-num small{ font-size:13px; font-weight:600; color:var(--sub); margin-left:6px; -webkit-text-fill-color:var(--sub); }
.polar-hero-text{ flex:1; min-width:260px; }
.ph-title{ font-size:15px; font-weight:700; margin-bottom:6px; }
.ph-interp{ font-size:13px; color:#475569; line-height:1.7; }

/* AI 化程度对比 */
.ai-bars{ display:flex; flex-direction:column; gap:8px; max-width:520px; }
.ai-bar-row{ display:flex; align-items:center; gap:10px; }
.ai-bar-label{ flex:none; width:44px; font-size:12.5px; color:var(--sub); text-align:right; }
.ai-bar-track{ flex:1; height:18px; background:#f1f5f9; border-radius:6px; overflow:hidden; }
.ai-bar-fill{ height:100%; background:linear-gradient(90deg,#7c3aed,#ec4899); border-radius:6px; min-width:2px; opacity:.85; }
.ai-bar-fill.empty{ background:#e2e8f0; }
.ai-bar-num{ flex:none; width:24px; font-size:12.5px; font-weight:700; color:var(--ink); }

/* ============ 收入测算 ============ */
.fc-summary{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin-bottom:14px; }
.fc-sum{
  border:1px solid var(--line); border-radius:12px; padding:14px 16px; background:#fbfcfe;
  display:flex; flex-direction:column; gap:4px;
}
.fc-sum.mid{ background:rgba(79,70,229,.05); border-color:var(--accent-line); }
.fc-sum.best{ background:linear-gradient(135deg,var(--accent-soft),rgba(14,165,164,.05)); border-color:var(--accent-line); }
.fc-sum-label{ font-size:12px; color:var(--sub); }
.fc-sum b{ font-size:20px; font-weight:800; color:var(--ink); }
.fc-sum.best b{ color:var(--accent); }
.fc-note{ font-size:12px; color:var(--sub); line-height:1.7; margin-bottom:14px; }
.fc-chart-wrap{ padding:10px 6px 6px; }
.fc-chart{ display:flex; align-items:flex-end; gap:14px; height:140px; }
.fc-col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; min-width:0; }
.fc-bars{ display:flex; align-items:flex-end; gap:3px; height:120px; width:100%; justify-content:center; }
.fc-bar{ width:16px; border-radius:4px 4px 0 0; min-height:3px; }
.fc-bar.poor{ background:#cbd5e1; }
.fc-bar.normal{ background:linear-gradient(180deg,#818cf8,#6366f1); }
.fc-bar.ideal{ background:linear-gradient(180deg,#34d399,#10b981); }
.fc-label{ font-size:11px; color:var(--sub); }
.fc-table td.fc-ideal{ color:var(--ok); font-weight:700; }
.fc-table td.fc-normal{ color:var(--accent); font-weight:600; }
.fc-table td.fc-poor{ color:var(--sub); }

.dash-dist{ display:flex; flex-direction:column; gap:10px; }
.dash-dist-row{ display:flex; align-items:center; gap:10px; }
.dd-label{ width:60px; font-size:13px; color:var(--sub); text-align:right; }
.dd-track{ flex:1; height:22px; background:#f1f5f9; border-radius:6px; overflow:hidden; }
.dd-fill{ height:100%; background:var(--line); border-radius:6px; min-width:4px; }
.dd-fill.done{ background:linear-gradient(90deg,#16a34a,#4ade80); }
.dd-fill.todo{ background:linear-gradient(90deg,var(--accent),var(--accent2)); }
.dd-num{ width:36px; font-weight:700; font-size:13px; }

/* ============ OKR 时间轴(矩形条版) ============ */
.tl-nav{ display:flex; align-items:center; gap:10px; }
.tl-track{
  position:relative; flex:1; height:44px; border-bottom:2px solid var(--line);
  margin:16px 2px 2px; min-width:0;
}
.tl-month{
  position:absolute; top:-16px; font-size:10.5px; color:var(--sub);
  transform:translateX(-50%); white-space:nowrap;
}
.tl-now-line{
  position:absolute; top:-10px; bottom:-6px; width:2px; background:var(--accent); opacity:.5;
}
.tl-bar{
  position:absolute; top:14px; height:22px; border-radius:6px; cursor:pointer;
  padding:0 8px; font-size:11.5px; font-weight:600; text-align:left;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; transition:.15s; min-width:24px;
  /* 默认线框(非选中态) */
  background:transparent; border:1.5px solid #cbd5e1; color:#64748b;
}
.tl-bar.active{ border-color:var(--accent); color:var(--accent); }
.tl-bar.planned{ border-color:#cbd5e1; color:#94a3b8; }
.tl-bar.done{ border-color:var(--ok); color:var(--ok); }
.tl-bar:hover{ filter:brightness(1.06); }
/* 选中态:实心填充 + 描边 + 箭头 */
.tl-bar.selected{
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  border-color:var(--accent); color:#fff; font-weight:700;
  box-shadow:0 0 0 3px var(--accent-soft);
  z-index:2;
}
.tl-bar.selected.done{ background:var(--ok); border-color:var(--ok); color:#fff; }
.tl-bar.selected.planned{ background:#94a3b8; border-color:#94a3b8; color:#fff; }
/* 选中目标下方伸出向下箭头,示意详情在下方 */
.tl-bar.selected::after{
  content:""; position:absolute; left:50%; top:calc(100% + 2px); transform:translateX(-50%);
  border:6px solid transparent; border-top-color:var(--accent);
}
.tl-arrow{
  flex:none; width:30px; height:30px; border-radius:50%; border:1px solid var(--line);
  background:#fff; color:var(--sub); font-size:16px; line-height:1; cursor:pointer; transition:.15s;
  display:flex; align-items:center; justify-content:center;
}
.tl-arrow:hover{ color:var(--accent); border-color:var(--accent-line); background:var(--accent-soft); }
.tl-range{ text-align:center; font-size:11.5px; color:var(--sub); margin-top:8px; }

/* OKR 详情:左目标信息 右 KR */
.okr-detail{
  display:grid; grid-template-columns:0.9fr 1.5fr; gap:16px; margin-top:14px;
  border:1px solid var(--line); border-radius:12px; padding:16px; background:linear-gradient(135deg,var(--accent-soft),rgba(14,165,164,.04));
}
/* 收起状态:KR 单行横排(能放多少放多少) */
.okr-detail-collapsed{
  display:flex; align-items:center; gap:10px; overflow:hidden;
  margin-top:12px; padding:8px 14px; white-space:nowrap;
  border:1px dashed var(--accent-line); border-radius:10px; background:var(--accent-soft);
}
.od-kr-collapsed{ flex:none; font-size:12.5px; color:var(--ink); }
.od-kr-collapsed b{ font-style:normal; font-size:11px; font-weight:700; color:var(--accent); background:var(--accent-soft); border-radius:5px; padding:0 5px; margin-right:3px; }
.od-kr-collapsed i{ font-style:normal; font-size:11px; color:var(--accent); margin-left:2px; }
.od-kr-collapsed + .od-kr-collapsed::before{ content:"·"; margin-right:10px; color:#94a3b8; }
.od-kr-collapsed .od-kr-text{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* 收起/展开按钮:详情面板底部中间,小体积 */
.od-toggle-bar{ display:flex; justify-content:center; padding:6px 0 0; }
.od-toggle{
  border:1px solid var(--line); background:#fff; color:var(--sub); font-size:12px;
  padding:3px 14px; border-radius:14px; cursor:pointer; transition:.15s; display:flex; align-items:center; gap:4px;
}
.od-toggle:hover{ color:var(--accent); border-color:var(--accent-line); background:var(--accent-soft); }
.od-left{ border-right:1px dashed var(--line); padding-right:16px; }
.od-o-title{ font-size:15px; font-weight:700; line-height:1.4; }
.od-o-meta{ font-size:12px; color:var(--sub); margin-top:4px; display:flex; align-items:center; gap:8px; }
.od-o-progress{ display:flex; align-items:center; gap:10px; margin-top:10px; }
.od-o-content{ font-size:12.5px; color:#475569; margin-top:8px; line-height:1.6; }
.od-actions{ display:flex; gap:6px; margin-top:12px; }
.od-right{ padding-left:4px; }
.od-kr-head{ font-size:12px; font-weight:600; color:var(--sub); margin-bottom:4px; }
.od-kr{ display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px dashed var(--line); }
.od-kr-desc{ flex:1; font-size:13px; }
.od-kr-num{ font-size:12px; color:var(--sub); }
/* KR 行内编辑 */
.od-kr-title{
  flex:1; min-width:0; border:1px solid transparent; background:transparent; border-radius:6px;
  font-size:13px; font-family:inherit; color:var(--ink); padding:2px 6px; outline:none; transition:.15s;
}
.od-kr-title:hover{ border-color:var(--line); }
.od-kr-title:focus{ border-color:var(--accent); background:#fff; box-shadow:0 0 0 3px var(--accent-soft); }
.od-kr-val{
  width:64px; border:1px solid transparent; background:transparent; border-radius:6px;
  font-size:12px; font-family:inherit; color:var(--ink); padding:1px 4px; outline:none; transition:.15s;
  -moz-appearance:textfield;
}
.od-kr-val::-webkit-outer-spin-button, .od-kr-val::-webkit-inner-spin-button{ -webkit-appearance:none; }
.od-kr-val:hover{ border-color:var(--line); }
.od-kr-val:focus{ border-color:var(--accent); background:#fff; box-shadow:0 0 0 3px var(--accent-soft); }
/* 复盘记录 */
.od-review{ padding:8px 0; border-bottom:1px dashed var(--line); }
.od-review:last-child{ border-bottom:none; }
.od-review-text{ font-size:13px; line-height:1.6; }
.od-review-meta{ display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--sub); margin-top:4px; }
.od-review-meta button{ margin-left:auto; }
/* 日历 */
.cal-head{ display:flex; align-items:center; justify-content:center; gap:16px; margin-bottom:10px; }
.cal-arrow{
  width:30px; height:30px; border-radius:50%; border:1px solid var(--line); background:#fff;
  color:var(--sub); font-size:16px; line-height:1; cursor:pointer; transition:.15s;
  display:flex; align-items:center; justify-content:center;
}
.cal-arrow:hover{ color:var(--accent); border-color:var(--accent-line); background:var(--accent-soft); }
.cal-title{ font-size:15px; font-weight:700; min-width:110px; text-align:center; }
.cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.cal-week{ display:contents; }
.cal-week span{
  text-align:center; font-size:11.5px; color:var(--sub); padding:4px 0;
  border-bottom:1px solid var(--line);
}
.cal-cell{
  border:1px solid var(--line); border-radius:8px; height:72px; padding:3px 5px;
  position:relative; cursor:pointer; background:#fbfcfe; transition:.15s; display:flex; flex-direction:column; gap:1px;
  overflow:hidden;
}
.cal-cell:hover{ border-color:var(--accent-line); box-shadow:0 0 0 1px var(--accent-soft); }
.cal-cell.blank{ border-color:transparent; background:transparent; cursor:default; }
.cal-cell.today{ border-color:var(--accent); box-shadow:0 0 0 1px var(--accent-soft); }
.cal-cell.sel{ background:var(--accent-soft); }
.cal-num{ font-size:11px; font-weight:700; color:var(--ink); line-height:1.2; }
.cal-cell.today .cal-num{ color:var(--accent); }
/* 格内任务:勾选框 + 标题 */
.cal-tasks{ display:flex; flex-direction:column; gap:1px; overflow:hidden; min-height:0; }
.cal-task{
  display:flex; align-items:center; gap:3px; font-size:10px; line-height:1.25; color:var(--ink);
  cursor:pointer; min-width:0;
}
.cal-task input{ flex:none; width:11px; height:11px; accent-color:var(--accent); cursor:pointer; margin:0; }
.cal-task span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.cal-task.done span{ text-decoration:line-through; color:var(--sub); }
.cal-more{ font-size:10px; color:var(--accent); font-weight:600; }
.cal-badge.todo{ background:var(--accent); color:#fff; }
.cal-badge.done{ background:rgba(22,163,74,.12); color:var(--ok); }
.cal-day-title{ font-size:13px; font-weight:600; color:var(--sub); margin:14px 0 8px; }

/* 任务行内编辑(标题与优先级/日期同行) */
.task-row.inline-edit{ align-items:center; }
.te-title-line{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.te-title{
  flex:1; min-width:180px; border:none; background:transparent; font-size:14px; font-weight:600; color:var(--ink);
  outline:none; font-family:inherit; padding:3px 0;
}
.te-title:focus{ border-bottom:1px dashed var(--accent); }
.te-type, .te-pri{ font-size:12px; padding:2px 8px; border-radius:8px; border:1px solid var(--line); background:#fff; cursor:pointer; }
.te-pri.high, .te-pri option[value="高"]{ color:var(--danger); }
.te-date{ font-size:12px; border:1px solid var(--line); border-radius:8px; padding:2px 8px; color:var(--sub); }
.te-detail{ font-size:12px; color:var(--sub); }
