  :root {
    /* 画布用暖灰而不是纯白：白色留给卡片，一眼分得开主次，
       也让密集数据区域久看不刺眼。 */
    --bg: #f7f4f1;
    --card: #ffffff;
    --card-solid: #ffffff;
    --sidebar-bg: #ffffff;
    --canvas: #f7f4f1;
    --text-primary: #2b1a10;
    --text-secondary: #8a7264;
    --text-tertiary: #b5a294;
    --blue: #e8590c;
    --green: #34c759;
    --orange: #f76707;
    --red: #ff3b30;
    --purple: #af52de;
    --indigo: #5856d6;
    --teal: #5ac8fa;
    /* 描边比原来更淡一档：暖棕的 8% 在灰底上已经足够，硬要加深反而脏 */
    --border: rgba(120,53,15,0.09);
    --border-strong: rgba(120,53,15,0.16);
    /* 悬停底色：原先靠 --bg-hover 定义，但 :root 里根本没声明过，
       4 处 hover 因此全是空值、点了没反应。统一改成中性暖灰。 */
    --bg-hover: rgba(120,53,15,0.045);
    --bg-secondary: rgba(120,53,15,0.035);
    /* 阴影只留给真正浮起来的东西（弹窗、下拉），卡片一律用描边区分。
       卡片带阴影会在灰底上显脏，且相邻卡片互相压边。 */
    --shadow-sm: 0 1px 2px rgba(120,53,15,0.04);
    --shadow-md: 0 3px 10px rgba(120,53,15,0.06);
    --shadow-lg: 0 16px 48px rgba(120,53,15,0.14), 0 2px 8px rgba(120,53,15,0.06);
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  /* 保证 hidden 属性始终生效（避免被 .xxx { display: flex } 之类的规则覆盖） */
  [hidden] { display: none !important; }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* ========== 侧边栏 ========== */
  .sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    padding: 0;
  }

  .sidebar-brand {
    padding: 24px 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .brand-copy { flex: 1; min-width: 0; }
  /* 通知铃铛移到侧边栏品牌行右侧（原顶部页头已移除） */
  .sidebar-notif {
    flex: 0 0 auto;
    position: relative;
    width: 32px; height: 32px;
    border-radius: 9px;
    color: var(--text-secondary);
  }
  .sidebar-notif:hover { background: rgba(0,0,0,0.06); color: var(--text-primary); }
  .sidebar-notif svg { width: 18px; height: 18px; }
  .sidebar-notif .dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #ff3b30;
    border: 1.5px solid var(--sidebar-bg);
  }

  .brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #FFB054, #F43F1B);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px; font-weight: 700;
  }

  .brand-text { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
  .brand-sub { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

  .sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }

  /* ========== 实用工具导航（锤子风格方格） ========== */
  .utility-nav {
    padding: 12px;
    border-top: 1px solid var(--border);
  }
  .utility-nav .nav-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    padding: 0 4px 8px;
    text-transform: uppercase;
  }
  .utility-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .utility-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: 12px;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 64px;
  }
  .utility-tile:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
  }
  .utility-tile:active {
    transform: scale(0.96);
  }
  .tile-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--tc, var(--blue));
    color: #fff;
    flex-shrink: 0;
  }
  .tile-icon svg {
    width: 16px;
    height: 16px;
  }
  .tile-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
  }
  .utility-tile:hover .tile-label {
    color: var(--text-primary);
  }

  /* ========== 实用工具：占位面板 ========== */
  .utility-panel {
    animation: fadeIn 0.2s ease;
  }
  .utility-panel.hidden {
    display: none;
  }
  .utility-empty {
    text-align: center;
    color: var(--text-tertiary);
    padding: 40px 0;
    font-size: 14px;
  }

  /* ============================================================
   * 工具广场：分组卡片 + 悬停反馈
   * 主次靠「淡暖橙画布 + 纯白卡片」的底色反差撑起来，
   * 跟商标检索独立页同一套视觉语言。
   * ========================================================== */
  .util-mall {
    /* 只铺到内容区，不铺到窗口最外层 —— 避免出现商标页那种白色外框 */
    min-height: calc(100vh - 130px);
    /* 负边距与 .content 的内边距抵消，让灰底铺满整个内容区。
       .content 现为 20px 24px 28px：上下取 20，下取 28，左右取 24。 */
    margin: -20px -24px -28px;
    padding: 22px 24px 28px;
    background: var(--canvas);
  }
  .util-mall-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }
  .util-mall-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
  }
  .util-mall-sub {
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--text-tertiary);
  }
  .util-mall-total {
    flex: 0 0 auto;
    font-size: 12.5px;
    color: var(--text-tertiary);
    padding-top: 4px;
  }
  .util-mall-body { display: flex; flex-direction: column; gap: 22px; }

  /* 分组标题：左侧一小段橙色竖条，替代原来的「图标 + 文字」 */
  .util-group-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 11px;
  }
  .util-group-bar {
    width: 3px;
    height: 13px;
    border-radius: 2px;
    background: var(--blue);
    flex: 0 0 auto;
  }

  /* 卡片网格：四列，窄屏自动降列 */
  .util-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  /* 单张工具卡 */
  .util-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 16px 16px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card-solid);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    overflow: hidden;
    /* 上浮 + 阴影加深 + 背景转暖 + 顶部橙线滑入，统一 0.22s */
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
  }
  /* 顶部橙线：scaleX(0) 藏在中间，悬停时从中间向两端展开 */
  .util-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.28s ease;
  }
  .util-card:hover {
    background: #fffbf8;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(120, 53, 15, 0.13), 0 2px 6px rgba(120, 53, 15, 0.06);
  }
  .util-card:hover::before { transform: scaleX(1); }
  .util-card:active { transform: translateY(0); }

  /* 图标：淡橙底橙图标 → 悬停实橙底白图标 */
  .util-card-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(232, 89, 12, 0.1);
    color: var(--blue);
    flex: 0 0 auto;
    margin-bottom: 11px;
    transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
  }
  .util-card-icon svg { width: 18px; height: 18px; display: block; }
  .util-card:hover .util-card-icon {
    background: var(--blue);
    color: #fff;
    transform: scale(1.05);
  }

  .util-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
  }
  .util-card-desc {
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--text-tertiary);
  }

  /* 辅助文案「打开 →」：默认隐藏，悬停时淡入。
     用绝对定位叠在描述下方，不占布局空间，卡片高度不会被撑动。 */
  .util-card-hint {
    position: absolute;
    left: 16px;
    bottom: 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--blue);
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
  }
  .util-card:hover .util-card-hint { opacity: 1; transform: translateY(0); }
  /* 悬停时描述淡出一点，给「打开 →」让位 */
  .util-card:hover .util-card-desc { opacity: 0.35; transition: opacity 0.22s ease; }
  .util-card-desc { transition: opacity 0.22s ease; }

  /* 窄屏降列 */
  @media (max-width: 1180px) { .util-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 820px)  { .util-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 560px)  { .util-grid { grid-template-columns: 1fr; } }

  /* ========== 商标快速搜索（实用工具页面内） ========== */
  .tm-quick-search {
    max-width: 600px;
    margin: 0 auto 32px;
    text-align: center;
  }
  .tm-qs-head {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
  }
  .tm-qs-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--purple, #8b5cf6);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .tm-qs-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
  }
  .tm-qs-hint {
    font-size: 12px;
    color: var(--text-tertiary);
  }
  .tm-qs-bar {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .tm-qs-input {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: all 0.15s ease;
  }
  .tm-qs-input:focus {
    border-color: var(--purple, #8b5cf6);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.12);
  }
  .tm-qs-result {
    margin-top: 16px;
    text-align: left;
    max-height: 320px;
    overflow-y: auto;
  }
  .tm-qs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
  }
  .tm-qs-item:hover {
    background: var(--bg-hover);
  }
  .tm-qs-thumb {
    width: 40px; height: 40px;
    border-radius: 8px;
    object-fit: contain;
    /* 缩略图垫底必须是白/浅色：--bg 现在是画布灰，垫灰会让透明 PNG 显脏 */
    background: var(--card-solid);
    border: 1px solid var(--border);
    flex-shrink: 0;
  }
  .tm-qs-thumb-empty {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 600; color: #fff;
    flex-shrink: 0;
  }
  .tm-qs-info { flex: 1; min-width: 0; }
  .tm-qs-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tm-qs-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
  }
  .tm-qs-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .tm-qs-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-tertiary);
    font-size: 13px;
  }

  /* ========== 实用工具折叠区 ========== */
  .nav-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
  }
  .nav-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  .nav-toggle svg:first-child {
    width: 16px;
    height: 16px;
    opacity: 0.7;
  }
  .toggle-arrow {
    width: 14px;
    height: 14px;
    margin-left: auto;
    transition: transform 0.2s ease;
    opacity: 0.5;
  }
  .nav-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
    opacity: 1;
  }
  .utility-panel {
    padding: 8px 0 4px;
  }
  .utility-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px 8px;
  }

  .nav-section { margin-bottom: 24px; }
  .nav-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 8px;
    margin-bottom: 6px;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.15s ease;
    margin-bottom: 2px;
    position: relative;
  }

  .nav-item:hover { background: rgba(0,0,0,0.04); }
  .nav-item.active { background: var(--blue); color: #fff; }
  .nav-item.active svg { opacity: 1; }
  .nav-item svg { width: 18px; height: 18px; opacity: 0.55; flex-shrink: 0; }
  .nav-item.active svg { opacity: 0.9; }

  .nav-badge {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
  }

  .nav-item.active .nav-badge { background: rgba(255,255,255,0.3); }

  /* 侧边栏计数角标默认不显示。
     数字本身仍在 JS 里照常计算（renderNavCounts），只是不画出来，
     这样要恢复时删掉这一段即可，不用回头改渲染逻辑。 */
  .nav-badge { display: none; }

  .sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9500, #ff3b30);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 13px; font-weight: 600;
  }

  .user-info { flex: 1; }
  .user-name { font-size: 13px; font-weight: 600; }
  .user-role { font-size: 11px; color: var(--text-secondary); }

  /* ========== 主内容区 ========== */
  /* 内容区铺灰底，侧边栏留白 —— 两个色块本身就构成层级，
     不需要额外描边或阴影去强调 */
  .main { flex: 1; margin-left: 240px; min-height: 100vh; min-width: 0; background: var(--canvas); }

  /* 原顶部页头（面包屑 / 全局搜索 / 通知）已移除：
     通知铃铛搬到侧边栏品牌行，其余信息在侧边栏高亮与页面内已有体现 */

  .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
    padding: 7px 12px;
    width: 220px;
    transition: all 0.2s;
  }
  .search-box:focus-within { background: #fff; box-shadow: 0 0 0 3px rgba(0,122,255,0.15); }
  .search-box svg { width: 15px; height: 15px; opacity: 0.4; flex-shrink: 0; }
  .search-box input {
    border: none; background: none; outline: none;
    font-size: 13px; color: var(--text-primary); width: 100%;
    font-family: inherit;
  }
  .search-box input::placeholder { color: var(--text-tertiary); }

  .icon-btn {
    width: 34px; height: 34px;
    border-radius: 8px;
    border: none;
    background: rgba(0,0,0,0.04);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
    position: relative;
  }
  .icon-btn:hover { background: rgba(0,0,0,0.08); }
  .icon-btn svg { width: 18px; height: 18px; color: var(--text-secondary); }
  .icon-btn .dot {
    position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--red);
    border-radius: 50%;
    /* 描边要跟所在表面同色，否则灰底上的红点会镶上一圈灰边 */
    border: 1.5px solid var(--sidebar-bg);
  }

  .content { padding: 20px 24px 28px; }

  /* ========== 页面 ========== */
  /* 页面统一最小高度：让所有页面占用同样的可视高度，切换时不再一大一小。
     48px = .content 的上下内边距合计（20 + 28）。 */
  .page { display: none; animation: fadeUp 0.35s ease; }
  .page.active { display: block; min-height: calc(100vh - 48px); }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
  }

  .page-head h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
  }
  .page-head .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
  }
  /* 页内标题（结算管理用的是 h3）：18px 足够，与统计卡拉开层级即可，
     不需要 h1 那种 28px 的大标题 */
  .page-head h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
  }
  .page-head .desc {
    font-size: 12.5px;
    color: var(--text-tertiary);
    margin-top: 4px;
  }

  /* ========== 按钮 ========== */
  .btn {
    padding: 9px 18px;
    border-radius: 980px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    letter-spacing: -0.01em;
  }
  .btn svg { width: 15px; height: 15px; }
  .btn-primary { background: var(--blue); color: #fff; }
  .btn-primary:hover { background: #0066d6; transform: scale(1.02); }
  /* 已结算的账单不能再确认，按钮置灰且不可点 */
  .btn:disabled,
  .btn-primary:disabled {
    background: rgba(0,0,0,0.07);
    color: var(--text-tertiary);
    cursor: default;
    transform: none;
  }
  .btn-secondary { background: rgba(0,0,0,0.06); color: var(--text-primary); }
  .btn-secondary:hover { background: rgba(0,0,0,0.1); }
  .btn-ghost { background: transparent; color: var(--blue); }
  .btn-ghost:hover { background: rgba(0,122,255,0.08); }
  .btn-danger-text { background: transparent; color: var(--red); }
  .btn-danger-text:hover { background: rgba(255,59,48,0.08); }

  /* ========== 统计卡片 ========== */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
  }
  /* 工作台五张卡：参考稿是一行五列，卡片窄一点，数字更紧凑 */
  .stats-grid.dash-stats {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 12px;
  }
  .dash-stats .stat-card { padding: 14px 16px; gap: 8px; }
  .dash-stats .stat-value { font-size: 26px; }
  /* 指标前的色点 */
  .stat-dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
  }
  .stat-dot.orange { background: var(--orange); }
  .stat-dot.blue   { background: var(--blue); }
  .stat-dot.green  { background: var(--green); }
  .stat-dot.red    { background: var(--red); }
  .stat-dot.indigo { background: var(--indigo); }

  /* 数据卡同样只描边不投影；悬停不再上浮，
     因为整屏都是这种卡，一起跳动反而吵 */
  .stat-card {
    background: var(--card-solid);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    cursor: default;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .stat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
  .stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
  .stat-change {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 980px;
    background: rgba(0,0,0,0.04);
    color: var(--text-secondary);
  }
  .stat-change.up { background: rgba(52,199,89,0.1); color: var(--green); }
  .stat-change.down { background: rgba(255,59,48,0.1); color: var(--red); }

  /* ========== 表格卡片 ========== */
  /* 卡片不投影，只描边。灰底 + 白卡已经是两级对比，
     再叠阴影会让相邻卡片边缘互相压、整体显脏。 */
  .card {
    background: var(--card-solid);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
  }

  .card-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .card-header h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .card-header-actions { display: flex; gap: 8px; align-items: center; }
  /* 详情页里「关联合同」卡片头部的按钮组靠右排 */
  #authDetailBody .card-header-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

  /* 筛选标签 */
  .filter-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
    padding: 3px;
  }
  /* 授权列表卡片头：页签 + 渠道下拉 靠左成组，搜索框靠右。
     三个直接子元素用 space-between 会把下拉甩到中间，所以改成
     「tabs 与下拉一组 + 搜索框顶到最右」。 */
  #authorizations > .card > .card-header { justify-content: flex-start; }
  #authorizations > .card > .card-header .card-header-actions { margin-left: auto; }
  .filter-tab {
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s;
    border: none;
    background: none;
    font-family: inherit;
  }
  .filter-tab:hover { color: var(--text-primary); }
  .filter-tab.active { background: #fff; color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
  /* 页签上的计数：小一号字、半透明，不抢标签本身的视觉重量 */
  .filter-tab-n { opacity: 0.5; font-variant-numeric: tabular-nums; }

  /* 平台页签：标签颜色点 + 「展开」按钮 */
  .filter-tab .chan-chip-dot {
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: 1px;
  }
  .filter-tab-more {
    height: 26px;
    padding: 0 9px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--orange);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
  }
  .filter-tab-more:hover { background: rgba(232, 89, 12, 0.08); }
  .filter-tab-more[hidden] { display: none; }

  /* ===== 授权列表：上方渠道快速筛选条 =====
     与左侧「生效中 / 已过期」状态页签叠加使用：
     状态页签决定哪些授权还活着，这里决定是哪个渠道的。 */
  /* ===== 授权列表：页签后方的渠道筛选下拉 =====
     原来是一整行渠道 chip，占掉一整行高度还放不下几个渠道。
     收成页签后面的一个下拉按钮，选项带计数。 */
  .chan-select { position: relative; flex: 0 0 auto; }
  .chan-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 10px 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-solid);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
  }
  .chan-select-btn:hover { background: rgba(0,0,0,0.035); }
  .chan-select-btn[aria-expanded="true"] {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.12);
  }
  .chan-select-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .chan-select-dot[hidden] { display: none; }
  .chan-select-caret {
    width: 12px;
    height: 12px;
    color: var(--text-tertiary);
    transition: transform 0.18s;
  }
  .chan-select-btn[aria-expanded="true"] .chan-select-caret { transform: rotate(180deg); }
  .chan-select-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    min-width: 180px;
    max-width: 260px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-solid);
    box-shadow: var(--shadow-lg);
  }
  .chan-select-panel[hidden] { display: none; }
  .chan-select-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: none;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
  }
  .chan-select-item:hover { background: rgba(0,0,0,0.05); }
  .chan-select-item.active {
    background: rgba(232, 89, 12, 0.1);
    color: var(--orange);
    font-weight: 700;
  }
  .chan-select-item-name { flex: 1 1 auto; }
  .chan-select-item-n {
    font-variant-numeric: tabular-nums;
    font-size: 11.5px;
    color: var(--text-tertiary);
    font-weight: 600;
  }
  .chan-select-item.active .chan-select-item-n { color: var(--orange); }
  /* 计数为 0 的渠道弱化显示：它确实存在，只是在当前页签下没有记录 */
  .chan-select-item-n.is-zero { opacity: 0.35; }
  .chan-select-item:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: -2px;
  }

  .chan-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
  }
  .chan-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: #fff;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
  }
  .chan-chip:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
  .chan-chip.active {
    color: #fff;
    background: var(--orange);
    border-color: var(--orange);
  }
  /* 渠道色点：选中时描一圈白边，避免和橙色底糊在一起 */
  .chan-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .chan-chip.active .chan-chip-dot { box-shadow: 0 0 0 1.5px rgba(255,255,255,0.85); }
  .chan-chip-num {
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
    font-size: 11px;
  }
  .chan-chip.active .chan-chip-num { opacity: 0.9; }
  /* 键盘可达：Tab 聚焦时要有可见焦点环，和其它交互元素保持一致 */
  .chan-chip:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
  }

  /* 表格 */
  .table-wrap { overflow-x: auto; }
  /* 列表统一不换行，超宽时横向滑动 */
  .table-wrap th,
  .table-wrap td { white-space: nowrap; }
  /* 长文本摘要单元格例外：允许换行并限宽 */
  .table-wrap td.cell-wrap { white-space: normal; min-width: 240px; max-width: 340px; }
  /* 附件单元格：文件名超长时省略 */
  .table-wrap td.cell-file { max-width: 220px; }
  table { width: 100%; border-collapse: collapse; }
  th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    /* 表头底色用「实色」而不是半透明 rgba(120,53,15,0.022)：
       那个 2.2% 的透明度在静态表格里看不出问题，但 thead 一旦吸顶，
       下面的行会直接透上来与列名叠在一起。#fcfbfa 就是那层 2.2% 暖棕
       叠在纯白卡片上的等效实色，肉眼几乎一致，但完全不透光。 */
    background: #fcfbfa;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }
  td {
    padding: 11px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
  }
  tr:last-child td { border-bottom: none; }
  tbody tr { transition: background 0.15s; }
  tbody tr:hover { background: rgba(232, 89, 12, 0.028); }

  /* 渠道标识 */
  .channel-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
  }
  .channel-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
  }
  .channel-icon.tm { background: #ff5000; color: #fff; font-size: 11px; font-weight: 700; }
  .channel-icon.jd { background: #e1251b; color: #fff; font-size: 11px; font-weight: 700; }
  .channel-icon.dy { background: #111; color: #fff; font-size: 11px; font-weight: 700; }
  .channel-icon.pdd { background: #e02e24; color: #fff; font-size: 11px; font-weight: 700; }
  .channel-icon.xhs { background: #fe2c55; color: #fff; font-size: 11px; font-weight: 700; }
  .channel-icon.amz { background: #ff9900; color: #fff; font-size: 11px; font-weight: 700; }
  .channel-icon.off { background: var(--indigo); color: #fff; }
  .channel-icon.kw { background: #ff4906; color: #fff; font-size: 11px; font-weight: 700; }

  .channel-info { display: flex; flex-direction: column; }
  .channel-name { font-weight: 600; font-size: 13px; }
  .channel-sub { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

  /* 授权方 */
  .auth-party { font-weight: 500; }
  .auth-party-sub { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

  /* 日期 */
  .date-range { font-size: 13px; font-variant-numeric: tabular-nums; }
  .date-remaining { font-size: 11px; margin-top: 2px; font-weight: 500; }
  .date-remaining.safe { color: var(--green); }
  .date-remaining.warn { color: var(--orange); }
  .date-remaining.danger { color: var(--red); }
  .date-remaining.expired { color: var(--text-tertiary); }

  /* 状态标签 */
  .status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 980px;
    font-size: 12px;
    font-weight: 500;
  }
  .status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
  }
  .status-active { background: rgba(52,199,89,0.1); color: #248a3d; }
  .status-active .status-dot { background: var(--green); }
  .status-pending { background: rgba(255,149,0,0.1); color: #c77800; }
  .status-pending .status-dot { background: var(--orange); }
  .status-expired { background: rgba(142,142,147,0.1); color: #636366; }
  .status-expired .status-dot { background: #8e8e93; }
  /* 商标有效期：不足一年分级提醒 */
  .status-warn { background: rgba(255,149,0,0.1); color: #c77800; }
  .status-warn .status-dot { background: var(--orange); }
  .status-soon { background: rgba(255,90,0,0.12); color: #c2410c; }
  .status-soon .status-dot { background: #ff5a00; }
  .status-critical { background: rgba(255,59,48,0.12); color: #d92d20; }
  .status-critical .status-dot { background: var(--red); animation: pulse-dot 2s infinite; }
  .status-revoked { background: rgba(255,59,48,0.1); color: #c41e3a; }
  .status-revoked .status-dot { background: var(--red); }
  .status-paused { background: rgba(142,142,147,0.1); color: #636366; }
  .status-paused .status-dot { background: #8e8e93; }
  .status-draft { background: rgba(0,122,255,0.1); color: #0055b3; }
  .status-draft .status-dot { background: var(--blue); }

  /* 操作 */
  .row-actions { display: flex; gap: 2px; }
  .row-action {
    width: 30px; height: 30px;
    border-radius: 6px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
    color: var(--text-secondary);
  }
  .row-action:hover { background: rgba(0,0,0,0.06); color: var(--text-primary); }
  .row-action.danger:hover { background: rgba(255,59,48,0.08); color: var(--red); }
  .row-action svg { width: 16px; height: 16px; }

  /* ===== 行内「更多」下拉菜单 =====
     把 查看详情 / 编辑（续期） / 删除（撤销） 收进一个 ⋯ 菜单里，
     行内只留一个按钮，表格末列不再被三个图标占满。 */
  .row-menu { position: relative; display: inline-block; }
  .row-menu > .row-action[aria-expanded="true"] {
    background: rgba(0,0,0,0.06);
    color: var(--text-primary);
  }
  .row-menu-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 30;
    min-width: 132px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-solid);
    box-shadow: var(--shadow-lg);
  }
  .row-menu-panel[hidden] { display: none; }
  /* 下方空间不足时改为向上展开，避免被表格容器裁掉 */
  .row-menu-panel.up {
    top: auto;
    bottom: calc(100% + 4px);
  }
  .row-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: none;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
  }
  .row-menu-item svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--text-tertiary); }
  .row-menu-item:hover { background: rgba(0,0,0,0.05); }
  .row-menu-item:hover svg { color: var(--text-primary); }
  .row-menu-item.danger { color: var(--red); }
  .row-menu-item.danger svg { color: var(--red); }
  .row-menu-item.danger:hover { background: rgba(255,59,48,0.08); }
  .row-menu-item:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
  }

  /* 进度条 */
  .progress-bar {
    width: 80px;
    height: 4px;
    background: rgba(0,0,0,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
  }
  .progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
  }
  .progress-fill.green { background: var(--green); }
  .progress-fill.orange { background: var(--orange); }
  .progress-fill.red { background: var(--red); }

  /* 分页 */
  .table-footer {
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
  }
  .table-footer-info { font-size: 12px; color: var(--text-secondary); }
  .page-btns { display: flex; gap: 4px; }
  .page-btn {
    min-width: 32px; height: 32px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
  }
  .page-btn:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); }
  .page-btn.active { background: var(--blue); color: #fff; }

  /* ========== 双列布局 ========== */
  .two-col {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    margin-top: 20px;
  }

  /* 工作台：左宽右窄，折线图占大列，排行榜占窄列 */
  .two-col.dash-cols {
    grid-template-columns: 1fr 400px;
    gap: 16px;
    margin-top: 16px;
  }
  .two-col.dash-lower { margin-top: 16px; }

  /* ---- 结算信息条：贴在统计卡下方，一行铺开 ---- */
  .dash-settle-note {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 9px 16px;
    margin-bottom: 2px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 12.5px;
    color: var(--text-secondary);
  }
  .dash-settle-note .dsn-item { display: inline-flex; align-items: center; gap: 6px; }
  .dash-settle-note .dsn-item b {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .dash-settle-note .dsn-hint { margin-left: auto; color: var(--text-tertiary); }
  .dash-settle-note .up { color: var(--green); }
  .dash-settle-note .down { color: var(--red); }
  .dsn-link {
    border: none; background: none; padding: 0;
    color: var(--blue); font-size: 12.5px; font-family: inherit;
    cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
  }
  .dsn-link:hover { opacity: 0.75; }
  /* ---- 折线图 ---- */
  .chart-box {
    position: relative;
    padding: 4px 8px 0;
  }
  /* 宽高由 SVG 的 width/height 属性按容器实测像素给出，
     这里不能写死 width:100% —— 那会覆盖属性值，viewBox 与像素不再 1:1，
     描边会被横向拉粗、圆点被压成椭圆。只留 max-width 防溢出。 */
  .dash-svg {
    display: block;
    max-width: 100%;
    overflow: visible;
  }
  .dash-dot { transition: r 0.12s ease; }
  .dash-hit { cursor: crosshair; }
  /* 悬停时圆点放大：由 JS 给对应圆点加 .is-active。
     不能用 .dash-hit:hover + .dash-dot —— SVG 里圆点画在热区矩形之前，
     兄弟选择器要求目标在后面，永远匹配不上。 */
  .dash-dot.is-active { r: 5.5; }
  /* 悬停提示气泡 */
  .chart-tip {
    position: absolute;
    transform: translate(-50%, -100%);
    background: var(--text-primary);
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11.5px;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  }
  .chart-tip b { display: block; font-weight: 600; opacity: 0.8; font-size: 11px; }
  .chart-tip span { font-variant-numeric: tabular-nums; }

  /* 图表底部三段指标 */
  .chart-foot {
    display: flex;
    gap: 28px;
    padding: 12px 16px 14px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
  }
  .cf-item { display: flex; flex-direction: column; gap: 3px; }
  .cf-label { font-size: 11.5px; color: var(--text-tertiary); }
  .cf-val { font-size: 15px; font-weight: 600; color: var(--text-primary); }
  .cf-val .cf-delta {
    font-size: 11.5px; font-weight: 500; margin-left: 4px;
    color: var(--text-tertiary);
  }
  .cf-val .cf-delta.up { color: var(--green); }
  .cf-val .cf-delta.down { color: var(--red); }

  /* ---- 渠道收入排行榜 ---- */
  .rank-list { padding: 6px 16px 14px; }
  .rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
  }
  .rank-row + .rank-row { border-top: 1px solid var(--border); }
  .rank-no {
    width: 18px; height: 18px;
    flex: 0 0 18px;
    border-radius: 5px;
    background: rgba(0,0,0,0.05);
    color: var(--text-secondary);
    font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
  }
  .rank-row:nth-child(1) .rank-no { background: var(--orange); color: #fff; }
  .rank-row:nth-child(2) .rank-no { background: rgba(247,103,7,0.55); color: #fff; }
  .rank-row:nth-child(3) .rank-no { background: rgba(247,103,7,0.3); color: var(--text-primary); }
  .rank-main { flex: 1 1 auto; min-width: 0; }
  .rank-name {
    font-size: 12.5px; color: var(--text-primary);
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .rank-type { font-size: 11px; color: var(--text-tertiary); font-weight: 400; }
  .rank-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(0,0,0,0.05);
    margin-top: 6px;
    overflow: hidden;
  }
  .rank-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
  }
  .rank-val { flex: 0 0 auto; text-align: right; }
  .rank-amount { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
  .rank-settle { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
  .rank-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12.5px;
  }

  /* 渠道分布卡片 */

  /* 最近动态 */

  /* ========== 弹窗 ========== */
  .modal-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }
  .modal-mask.show { display: flex; }

  .modal-box {
    background: var(--card-solid);
    border-radius: var(--radius-xl);
    width: 580px;
    max-height: 90vh;
    /* 关键：滚动交给内层 .modal-content，这里用 hidden 让圆角真正裁住内容，
       左右倒角才不会一边圆一边被滚动条压成直角 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
  }
  @keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }

  .modal-head {
    padding: 18px 22px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex: 0 0 auto;                /* 标题常驻，不随内容滚走 */
    background: var(--card-solid); /* 挡住从下方滚上来的内容 */
    position: relative;
    z-index: 1;
  }
  .modal-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
  .modal-head .desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
  .modal-close {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.06);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    transition: all 0.15s;
    flex-shrink: 0;
  }
  .modal-close:hover { background: rgba(0,0,0,0.1); }

  .modal-content {
    /* 右侧 14px 留给滚动条（12px），内容两边视觉留白都等于 22px */
    padding: 18px 14px 18px 22px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;   /* 滚到底不把背后的页面一起滚 */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
  }
  .modal-content::-webkit-scrollbar { width: 12px; }
  .modal-content::-webkit-scrollbar-track { background: transparent; }
  .modal-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.18);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
  }
  .modal-content::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3); background-clip: padding-box; }

  /* ===== 新增商标弹窗：注册号自动填充 ===== */
  .tm-lookup {
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(0,122,255,0.18);
    border-radius: 12px;
    background: rgba(0,122,255,0.035);
  }
  .tm-lookup-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .tm-lookup-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
  }
  .tm-lookup-title svg { width: 15px; height: 15px; }
  .tm-lookup-hint { font-size: 12px; color: var(--text-tertiary); }
  .tm-lookup-source {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
  }
  .tm-lookup-source select {
    font: inherit;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 3px 6px;
    cursor: pointer;
  }
  .tm-lookup-source select:focus { outline: none; border-color: var(--blue); }
  .tm-lookup-bar { display: flex; gap: 10px; align-items: center; }
  .tm-lookup-bar .form-input { flex: 1 1 auto; min-width: 0; }
  .tm-lookup-bar .btn { flex-shrink: 0; height: 42px; padding: 0 22px; }
  .tm-lookup-bar .btn[hidden] { display: none; }
  .tm-detail-panel {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(0,122,255,0.22);
    border-radius: 10px;
    background: var(--card-solid);
  }
  .tm-detail-panel-title { font-size: 12px; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
  .tm-detail-row { display: flex; gap: 10px; font-size: 12px; line-height: 1.7; padding: 2px 0; }
  .tm-detail-k { flex: 0 0 92px; color: var(--text-tertiary); }
  .tm-detail-v { flex: 1 1 auto; min-width: 0; color: var(--text-primary); word-break: break-all; }
  .tm-lookup-bar .btn[hidden] { display: none; }
  .tm-lookup-bar .btn-secondary { padding: 0 16px; font-size: 13px; }

  /* 官方详情面板：检索接口拿不到的字段 */
  .tm-lookup-detail[hidden] { display: none; }
  .tm-detail-panel {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-solid);
  }
  .tm-detail-panel-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
  }
  .tm-detail-row { display: flex; gap: 10px; padding: 3px 0; font-size: 12px; line-height: 1.6; }
  .tm-detail-k { flex: 0 0 76px; color: var(--text-tertiary); }
  .tm-detail-v { flex: 1 1 auto; min-width: 0; color: var(--text-primary); word-break: break-all; }
  .tm-detail-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
  }
  .tm-detail-step {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.04);
    border-radius: 6px;
    padding: 3px 8px;
  }
  .tm-lookup-status { font-size: 12px; margin-top: 10px; color: var(--text-tertiary); }
  .tm-lookup-status[data-kind="busy"] { color: var(--blue); }
  .tm-lookup-status[data-kind="ok"] { color: var(--green); }
  .tm-lookup-status[data-kind="warn"] { color: var(--orange); }
  .tm-lookup-status[data-kind="error"] { color: var(--red); }
  .tm-lookup-status:empty { display: none; }

  .tm-lookup-results { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
  .tm-cand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-solid);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color 0.16s, box-shadow 0.16s;
  }
  .tm-cand:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
  .tm-cand-main { flex: 1 1 auto; min-width: 0; }
  .tm-cand-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
  .tm-cand-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
  .tm-cand-pick { font-size: 12px; color: var(--blue); font-weight: 600; flex-shrink: 0; }

  /* ===== 新增商标弹窗：官方登记信息分区 ===== */
  .tm-official {
    margin: 4px 0 20px;
    padding: 16px 18px 0;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: rgba(0,0,0,0.012);
  }
  .tm-official-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
  }
  .tm-official-hint { font-size: 12px; font-weight: 400; color: var(--text-tertiary); }

  /* ===== 新增商标弹窗：商标图样 ===== */
  .tm-pic-row { display: flex; gap: 14px; align-items: flex-start; }
  .tm-pic-box {
    width: 118px;
    height: 118px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-solid);
    overflow: hidden;
  }
  .tm-pic-box img { width: 100%; height: 100%; object-fit: contain; }
  .tm-pic-link {
    font-size: 12px;
    color: var(--blue);
    text-decoration: none;
    text-align: center;
    padding: 0 6px;
    line-height: 1.5;
  }
  .tm-pic-link:hover { text-decoration: underline; }
  /* 混合内容被拦截 / 图片链接失效时的兜底入口 */
  .tm-pic-link {
    display: inline-block;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    color: var(--blue);
    text-decoration: none;
    word-break: break-all;
  }
  .tm-pic-link:hover { text-decoration: underline; }
  .tm-pic-empty { font-size: 12px; color: var(--text-tertiary); text-align: center; padding: 0 12px; }
  .tm-pic-link { font-size: 12px; color: var(--blue); text-align: center; padding: 0 10px; text-decoration: none; }
  .tm-pic-link:hover { text-decoration: underline; }
  .tm-pic-side { flex: 1 1 auto; min-width: 0; }


  .form-group { margin-bottom: 20px; }
  .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
  }
  .form-label .req { color: var(--red); margin-left: 2px; }

  .form-input, .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    outline: none;
    transition: border-color 0.16s, box-shadow 0.16s;
  }
  /* 聚焦环用主题橙。原来写死 rgba(0,122,255) 蓝，
     在橙色主题里会突兀 —— 变量名沿用 --blue 指的是品牌主色。 */
  .form-input:focus, .form-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.12);
  }
  .form-input::placeholder { color: var(--text-tertiary); }

  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

  /* ============================================================
   * 渠道管理弹窗：新增表单 + 现有清单（只有增删两种操作）
   * ========================================================== */
  .ch-add-form {
    padding: 16px 16px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(120, 53, 15, 0.02);
  }
  .ch-add-form .form-group { margin-bottom: 14px; }
  .ch-add-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .ch-add-hint {
    font-size: 11.5px;
    color: var(--text-tertiary);
    line-height: 1.5;
  }

  .ch-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 18px 0 10px;
  }
  .ch-list-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
  .ch-list-count { font-size: 12px; color: var(--text-tertiary); }

  .ch-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .ch-list-empty {
    padding: 34px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
  }
  .ch-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
  }
  .ch-row:last-child { border-bottom: none; }
  .ch-row:hover { background: rgba(120, 53, 15, 0.03); }
  .ch-row-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
  }
  .ch-row-icon svg { width: 15px; height: 15px; }
  .ch-row-main { flex: 1 1 auto; min-width: 0; }
  .ch-row-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
  }
  .ch-row-meta {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--text-tertiary);
  }
  .ch-row-used { color: var(--orange); }
  /* 有授权在用时不给删：删除会让历史授权失去渠道归属 */
  .ch-row-locked {
    flex: 0 0 auto;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(247, 103, 7, 0.1);
    color: var(--orange);
    font-size: 11px;
    font-weight: 600;
  }
  .ch-row-del {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .ch-row-del svg { width: 15px; height: 15px; }
  .ch-row-del:hover { background: rgba(255, 59, 48, 0.1); color: var(--red); }

  .form-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; }

  .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    outline: none;
    resize: vertical;
    min-height: 72px;
    transition: all 0.2s;
  }
  .form-textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.12);
  }

  .modal-foot {
    padding: 14px 22px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;                /* 底部按钮常驻，不随内容滚走 */
    background: var(--card-solid);
    position: relative;
    z-index: 1;
  }

  /* ========== 详情弹窗 ========== */
  .detail-section { margin-bottom: 24px; }
  .detail-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .detail-field {}
  .detail-field .df-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 3px; font-weight: 500; }
  .detail-field .df-value { font-size: 14px; font-weight: 500; }

  .detail-timeline { padding-left: 2px; }
  .tl-item { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: -4px;
    width: 1px;
    background: var(--border);
  }
  .tl-item:last-child::before { display: none; }
  .tl-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 2px solid var(--blue);
    background: #fff;
    flex-shrink: 0;
    margin-top: 3px;
    z-index: 1;
  }
  .tl-dot.done { background: var(--blue); }
  .tl-text { font-size: 13px; }
  .tl-time { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

  /* 授权书预览 */
  .cert-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    background: linear-gradient(135deg, #fafafa, #f5f5f7);
    position: relative;
    overflow: hidden;
  }
  .cert-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--purple));
  }
  .cert-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; letter-spacing: 0.06em; }
  .cert-sub { font-size: 11px; color: var(--text-tertiary); margin-bottom: 16px; }
  .cert-body { font-size: 13px; line-height: 2; text-align: left; color: var(--text-secondary); }
  .cert-body strong { color: var(--text-primary); }

  /* ========== 风控中心专属样式 ========== */
  /* 注：.risk-top-grid / .risk-stats-row 的布局规则见下方「浅色数据大屏」区块 */

  .score-card {
    position: relative;
    background: var(--card-solid);
    border-radius: var(--radius-lg);
    padding: 22px 20px 20px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
  }
  /* 顶部扫描光条：整张卡的"仪表盘"暗示 */
  .score-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--score-color, var(--green)), transparent);
    opacity: 0.85;
  }

  .score-ring {
    width: 172px; height: 172px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 18px;
    transition: filter 0.4s;
  }
  /* 主环：进度弧 */
  .score-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
      var(--score-color, var(--green)) 0deg var(--score-deg, 306deg),
      rgba(0,0,0,0.07) var(--score-deg, 306deg) 360deg
    );
  }
  /* 外圈刻度：每 6 度一道细线，强化仪表感 */
  .score-ring::after {
    content: '';
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    background: repeating-conic-gradient(
      from 0deg,
      rgba(0,0,0,0.16) 0deg 0.7deg,
      transparent 0.7deg 6deg
    );
    -webkit-mask: radial-gradient(circle, transparent 0 76%, #000 76.5% 79%, transparent 79.5%);
    mask: radial-gradient(circle, transparent 0 76%, #000 76.5% 79%, transparent 79.5%);
    opacity: 0.5;
  }
  .score-ring-inner {
    width: 132px; height: 132px;
    background: var(--card-solid);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  }
  .score-num {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--green);
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  }
  .score-unit { font-size: 12px; color: var(--text-secondary); font-weight: 600; margin-top: 6px; letter-spacing: 0.08em; }
  .score-title { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; }
  .score-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
  .score-desc strong { font-size: 14px; }
  .score-update { font-size: 11px; color: var(--text-tertiary); margin-top: 14px; font-variant-numeric: tabular-nums; }

  /* 分数越低，整卡越"告警" */
  .score-card[data-tone="red"] .score-ring { filter: drop-shadow(0 0 14px rgba(255,59,48,0.28)); }
  .score-card[data-tone="orange"] .score-ring { filter: drop-shadow(0 0 14px rgba(255,149,0,0.24)); }
  .score-card[data-tone="green"] .score-ring { filter: drop-shadow(0 0 14px rgba(16,185,129,0.22)); }

  /* 注：.risk-stats-row 布局见下方「浅色数据大屏」区块 */

  .risk-stat-card {
    background: var(--card-solid);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    border: 1px solid var(--border);
    transition: all 0.25s;
    cursor: default;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }
  .risk-stat-card:hover { transform: translateY(-2px); }
  
  .risk-stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
  }
  .risk-stat-card.high::after { background: var(--red); }
  .risk-stat-card.medium::after { background: var(--orange); }
  .risk-stat-card.low::after { background: var(--purple); }

  .risk-stat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }

  .risk-stat-title {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.06em;
  }
  .risk-stat-val {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  }
  .risk-stat-val.high { color: var(--red); text-shadow: 0 0 18px rgba(255,59,48,0.22); }
  .risk-stat-val.medium { color: var(--orange); text-shadow: 0 0 18px rgba(255,149,0,0.2); }
  .risk-stat-val.low { color: var(--purple); text-shadow: 0 0 18px rgba(88,86,214,0.2); }
  .risk-stat-footer { font-size: 11.5px; color: var(--text-tertiary); white-space: nowrap; }

  /* 风险数据源标签 */
  .data-source {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(0,0,0,0.04);
    color: var(--text-secondary);
    letter-spacing: 0.02em;
  }
  .data-source svg { width: 10px; height: 10px; }
  .data-source.court { background: rgba(255,59,48,0.08); color: #c41e3a; }
  .data-source.platform { background: rgba(255,149,0,0.08); color: #c77800; }
  .data-source.ip { background: rgba(88,86,214,0.08); color: var(--indigo); }

  /* 风险等级标签 */
  .risk-level {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
  }
  .risk-level.high { background: rgba(255,59,48,0.1); color: #c41e3a; }
  .risk-level.medium { background: rgba(255,149,0,0.1); color: #c77800; }
  .risk-level.low { background: rgba(175,82,222,0.08); color: #8944ab; }
  .risk-level.safe { background: rgba(52,199,89,0.1); color: #248a3d; }

  .risk-level-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
  }
  .risk-level.high .risk-level-dot { background: var(--red); }
  .risk-level.medium .risk-level-dot { background: var(--orange); }
  .risk-level.low .risk-level-dot { background: var(--purple); }
  .risk-level.safe .risk-level-dot { background: var(--green); }

  /* 风控模块卡片 */
  .risk-module { margin-bottom: 20px; }
  .risk-module .card-header h3 svg { width: 18px; height: 18px; }
  .risk-module-note { font-size: 12px; color: var(--text-tertiary); }

  /* ===================== 定时扫描计划面板 ===================== */
  .scan-plan-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(0,122,255,0.05), rgba(88,86,214,0.05));
  }
  .scan-plan-main { flex: 1 1 420px; min-width: 0; }
  .scan-plan-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
  }
  .scan-plan-hint { font-size: 12px; font-weight: 400; color: var(--text-tertiary); }
  .scan-plan-info { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
  .scan-when {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 7px;
    font-size: 12px; font-weight: 700;
    background: rgba(0,0,0,0.05); color: var(--text-secondary);
  }
  .scan-when.on { background: rgba(52,199,89,0.12); color: #248a3d; }
  .scan-meta { font-size: 12px; color: var(--text-secondary); }
  .scan-meta strong { color: var(--text-primary); }
  .scan-warn { font-size: 12px; color: #c77800; }
  .scan-plan-side { display: flex; gap: 10px; flex: 0 0 auto; }
  .scan-progress { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
  .scan-progress-bar {
    flex: 1 1 auto; height: 5px; border-radius: 3px;
    background: rgba(0,0,0,0.08); overflow: hidden;
  }
  .scan-progress-fill { height: 100%; background: var(--blue); transition: width 0.3s; }
  .scan-progress-text { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }

  /* 扫描计划设置弹窗 */
  .scan-switch {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .scan-switch input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
  .scan-form-row { margin-bottom: 16px; }
  .scan-tasks { display: flex; flex-direction: column; gap: 10px; }
  .scan-task {
    display: flex; gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
  }
  .scan-task:hover { border-color: var(--blue); background: rgba(0,122,255,0.03); }
  .scan-task input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }
  .scan-task-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
  .scan-task-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-top: 3px; }
  .scan-cost {
    font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 5px;
    background: rgba(255,149,0,0.12); color: #c77800;
  }
  .scan-cost.free { background: rgba(52,199,89,0.12); color: #248a3d; }
  .scan-estimate {
    margin-top: 8px; padding: 14px 16px;
    border-radius: 10px; background: rgba(0,0,0,0.03);
    display: flex; flex-direction: column; gap: 7px;
  }
  .scan-estimate-row { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
  .scan-estimate-row span:first-child { min-width: 68px; color: var(--text-tertiary); }
  .scan-estimate-row strong { color: var(--text-primary); font-size: 13px; }
  .scan-estimate-sub { font-size: 11.5px; color: var(--text-tertiary); }
  .scan-estimate-warn { font-size: 12px; color: var(--red); }

  /* 线索上的小标签 */
  .risk-new, .risk-oppo, .risk-new-apply,
  .risk-pending, .risk-granted, .risk-dead {
    display: inline-block; margin-left: 6px; margin-top: 3px; padding: 1px 7px;
    border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap;
  }
  .risk-new { background: rgba(0,122,255,0.12); color: #0055b3; }
  .risk-oppo { background: rgba(255,59,48,0.12); color: #c41e3a; }
  .risk-new-apply { background: rgba(255,149,0,0.14); color: #c77800; }
  /* 处置窗口：还拦得住 → 橙色提醒；已经拦不住 → 灰色沉底 */
  .risk-pending { background: rgba(255,149,0,0.16); color: #b36600; }
  .risk-granted { background: rgba(0,0,0,0.055); color: #6b7280; }
  .risk-dead    { background: rgba(0,0,0,0.04);  color: #9ca3af; }

  /* 抢注线索的阶段筛选条 */
  .clue-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0 0 12px;
  }
  .clue-filter:empty { display: none; }
  .clue-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-solid);
    cursor: pointer;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.18s;
  }
  .clue-filter-tab:hover { background: rgba(0,0,0,0.04); }
  .clue-filter-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
  .clue-filter-n {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(0,0,0,0.07);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
  }
  .clue-filter-tab.active .clue-filter-n { background: rgba(255,255,255,0.28); color: #fff; }
  .clue-filter-hint { margin-left: 4px; font-size: 11.5px; color: var(--text-tertiary); }

  /* ===================== 风控中心：浅色数据大屏 ===================== */
  .cc-console {
    --ds-bg: #ffffff;
    --ds-card: #ffffff;
    --ds-line: rgba(120,53,15,0.09);
    --ds-line-2: rgba(15,23,42,0.12);
    --ds-t1: #0f172a;
    --ds-t2: #5b6b83;
    --ds-t3: #94a3b8;
    --ds-blue: #e8590c;
    --ds-green: #10b981;
    --ds-orange: #f59e0b;
    --ds-red: #ef4444;
    --ds-purple: #8b5cf6;
    position: relative;
    margin: -28px -32px -40px;
    padding: 20px 32px 36px;
    min-height: calc(100vh - 60px);
    /* 竖向弹性容器：顶部条固定高度，下面的风险面板自动撑满剩余空间，
       这样不管视口多高，卡片都正好铺到屏幕底部，不会多出一截空白 */
    display: flex; flex-direction: column;
    color: var(--ds-t1);
    background:
      radial-gradient(1000px 420px at 10% -6%, rgba(22,119,255,0.10), transparent 60%),
      radial-gradient(880px 400px at 92% -4%, rgba(139,92,246,0.09), transparent 58%),
      linear-gradient(rgba(15,23,42,0.028) 1px, transparent 1px),
      linear-gradient(90deg, rgba(15,23,42,0.028) 1px, transparent 1px),
      var(--ds-bg);
    background-size: auto, auto, 32px 32px, 32px 32px, auto;
    background-attachment: fixed;
  }

  /* ---- 顶部标题条：干净的白，标题本身就是"大屏" ---- */
  .cmd-stat {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; color: var(--ds-t2);
  }
  .cmd-stat b { color: var(--ds-t1); font-weight: 700; }
  .cmd-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ds-t3); }
  .cmd-dot.ok { background: var(--ds-green); box-shadow: 0 0 0 3px rgba(16,185,129,0.16); animation: pulse-dot 2s infinite; }
  .cmd-clock {
    font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
    font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
    color: var(--ds-t1);
    font-variant-numeric: tabular-nums;
  }
  .cc-console .btn-secondary {
    background: var(--ds-card);
    border-color: var(--ds-line-2);
    color: var(--ds-t1);
  }
  .cc-console .btn-secondary:hover { border-color: var(--ds-blue); color: var(--ds-blue); }
  .cc-console .btn-primary { background: var(--ds-blue); border-color: var(--ds-blue); color: #fff; }

  /* ---- 面板：白底 + 极轻投影 + 顶部彩条（简约的来源） ---- */
  .cc-panel {
    position: relative;
    background: var(--ds-card);
    border: 1px solid var(--ds-line);
    border-radius: 14px;
    box-shadow: none;
  }

  /* ---- 扫描计划卡 ---- */
  .cc-console .scan-plan-card {
    background: var(--ds-card);
    border: 1px solid var(--ds-line);
    border-radius: 14px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
  }
  .cc-console .scan-plan-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--ds-blue), var(--ds-purple), transparent 85%);
  }
  .cc-console .scan-plan-title { color: var(--ds-t1); }
  .cc-console .scan-plan-hint { color: var(--ds-t3); }
  .cc-console .scan-plan-info { color: var(--ds-t2); }
  /* ---- 评分卡：大号环 + 柔和辉光 ---- */
  .cc-console .score-card {
    background: var(--ds-card);
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
  }
  .cc-console .score-ring::before {
    background: conic-gradient(
      var(--score-color, var(--ds-green)) 0deg var(--score-deg, 306deg),
      rgba(15,23,42,0.08) var(--score-deg, 306deg) 360deg
    );
  }
  .cc-console .score-ring::after {
    background: repeating-conic-gradient(from 0deg, rgba(15,23,42,0.22) 0deg 0.7deg, transparent 0.7deg 6deg);
    -webkit-mask: radial-gradient(circle, transparent 0 76%, #000 76.5% 79%, transparent 79.5%);
    mask: radial-gradient(circle, transparent 0 76%, #000 76.5% 79%, transparent 79.5%);
  }
  .cc-console .score-ring-inner { background: var(--ds-card); box-shadow: none; }
  .cc-console .score-num { color: var(--score-color, var(--ds-green)); }
  .cc-console .score-unit { color: var(--ds-t3); }
  .cc-console .score-title { color: var(--ds-t1); }
  .cc-console .score-desc { color: var(--ds-t2); }
  .cc-console .score-update { color: var(--ds-t3); }
  .cc-console .score-card[data-tone="red"] .score-ring { filter: drop-shadow(0 0 12px rgba(239,68,68,0.30)); }
  .cc-console .score-card[data-tone="orange"] .score-ring { filter: drop-shadow(0 0 12px rgba(245,158,11,0.28)); }
  .cc-console .score-card[data-tone="green"] .score-ring { filter: drop-shadow(0 0 12px rgba(16,185,129,0.26)); }

  /* ---- 三档统计：横条仪表 + 占比 ---- */
  .cc-console .risk-stat-card {
    background: var(--ds-card);
    border: 1px solid var(--ds-line);
    border-radius: 14px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
  }
  .stat-ch { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
  .risk-stat-card.high .stat-ch { background: linear-gradient(90deg, var(--ds-red), rgba(239,68,68,0.15)); }
  .risk-stat-card.medium .stat-ch { background: linear-gradient(90deg, var(--ds-orange), rgba(245,158,11,0.15)); }
  .risk-stat-card.low .stat-ch { background: linear-gradient(90deg, var(--ds-purple), rgba(139,92,246,0.15)); }
  .cc-console .risk-stat-title { color: var(--ds-t2); }
  .cc-console .risk-stat-footer { color: var(--ds-t3); }
  .cc-console .risk-stat-val { color: var(--ds-t1); }
  .cc-console .risk-stat-val.high { color: var(--ds-red); }
  .cc-console .risk-stat-val.medium { color: #b45309; }
  .cc-console .risk-stat-val.low { color: var(--ds-purple); }
  .risk-stat-bar {
    margin-top: 12px; height: 5px; border-radius: 999px;
    background: rgba(15,23,42,0.06); overflow: hidden;
  }
  .risk-stat-bar i { display: block; height: 100%; border-radius: 999px; transition: width 0.5s ease; }
  .risk-stat-bar i.high { background: var(--ds-red); }
  .risk-stat-bar i.medium { background: var(--ds-orange); }
  .risk-stat-bar i.low { background: var(--ds-purple); }
  .risk-stat-pct { margin-top: 8px; font-size: 10px; letter-spacing: 0.12em; color: var(--ds-t3); }

  /* ---- 监控条 ---- */
  .cc-console .monitor-strip {
    background: var(--ds-card);
    border: 1px solid var(--ds-line);
    border-radius: 14px;
    color: var(--ds-t1);
    box-shadow: none;
  }
  .cc-console .monitor-strip .monitor-title { color: var(--ds-t1); }
  .cc-console .monitor-strip .monitor-sub { color: var(--ds-t2); }
  .cc-console .monitor-strip .monitor-sub strong { color: var(--ds-orange); }
  .cc-console .monitor-strip .btn-secondary {
    background: rgba(15,23,42,0.04);
    border-color: var(--ds-line-2);
    color: var(--ds-t1);
  }
  .cc-console .monitor-strip .btn-secondary:hover { background: rgba(22,119,255,0.08); border-color: var(--ds-blue); color: var(--ds-blue); }
  .cc-console .monitor-strip .monitor-dot { background: var(--ds-green); }

  /* ---- 监控卡 ---- */
  .mon-card {
    background: var(--ds-card);
    border: 1px solid var(--ds-line);
    color: var(--ds-t1);
    border-radius: 14px;
    box-shadow: none;
    transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
  }
  .mon-card.is-idle { background: var(--ds-card); }
  .cc-console .mon-card:hover {
    transform: translateY(-2px);
    border-color: rgba(22,119,255,0.28);
  }
  /* 左侧细色条 = 板块身份，简约的分类手段 */
  .mon-card::before { box-shadow: none; }
  .mon-card.tone-red::before    { background: var(--ds-red); }
  .mon-card.tone-orange::before { background: var(--ds-orange); }
  .mon-card.tone-purple::before { background: var(--ds-purple); }
  .mon-card.tone-blue::before   { background: var(--ds-blue); }
  .cc-console .mon-title { color: var(--ds-t1); }
  .cc-console .mon-sub { color: var(--ds-t2); }
  .cc-console .mon-src { color: var(--ds-t3); border-top-color: var(--ds-line); }
  .cc-console .mon-hero { background: rgba(15,23,42,0.03); }
  .cc-console .mon-hero.is-alert {
    background: linear-gradient(90deg, rgba(239,68,68,0.08), rgba(239,68,68,0.015));
    border-color: rgba(239,68,68,0.22);
  }
  .cc-console .mon-hero.is-alert .mon-hero-n { color: var(--ds-red); }
  .cc-console .mon-hero.is-clear {
    background: linear-gradient(90deg, rgba(16,185,129,0.08), rgba(16,185,129,0.015));
    border-color: rgba(16,185,129,0.22);
  }
  .cc-console .mon-hero.is-clear .mon-hero-n { color: var(--ds-green); }
  .cc-console .mon-hero-l { color: var(--ds-t1); }
  .cc-console .mon-hero-hint { color: var(--ds-t3); }
  .cc-console .mon-chip { border-color: var(--ds-line); color: var(--ds-t2); background: rgba(255,255,255,0.7); }
  .cc-console .mon-chip b { color: var(--ds-t1); }
  .cc-console .mon-chip:hover { border-color: var(--ds-blue); background: rgba(22,119,255,0.06); }
  .cc-console .mon-chip.is-zero { background: rgba(15,23,42,0.03); border-color: transparent; color: var(--ds-t3); }
  .cc-console .mon-chip.is-zero b { color: var(--ds-t3); }
  .cc-console .mon-badge.is-live { background: rgba(16,185,129,0.13); color: #047857; }
  .cc-console .mon-badge.is-idle { background: rgba(15,23,42,0.05); color: var(--ds-t3); }
  .cc-console .mon-badge.is-manual,
  .cc-console .mon-badge.is-demo { background: rgba(139,92,246,0.10); color: #6d28d9; }
  .cc-console .mon-card.tone-red .mon-icon    { background: rgba(239,68,68,0.10);  color: var(--ds-red); }
  .cc-console .mon-card.tone-orange .mon-icon { background: rgba(245,158,11,0.12); color: #b45309; }
  .cc-console .mon-card.tone-purple .mon-icon { background: rgba(139,92,246,0.10); color: var(--ds-purple); }
  .cc-console .mon-card.tone-blue .mon-icon   { background: rgba(22,119,255,0.10); color: var(--ds-blue); }
  .cc-console .mon-more { color: var(--ds-t3); }
  .cc-console .mon-more:hover { background: rgba(22,119,255,0.08); color: var(--ds-blue); }
  .cc-channel {
    color: var(--ds-t3);
    background: rgba(15,23,42,0.03);
    border-color: var(--ds-line);
  }

  /* ---- 底部：连续监测 + 日志 ---- */
@keyframes log-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

  /* ---- 滚动数据带 ---- */
  /* ---- 商标监测复合面板：收拢三个商标类板块 ---- */
  .tm-watch {
    display: flex;
    flex-direction: column;
    padding: 16px 18px 8px;
    background: var(--ds-card);
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
  }
  .tm-watch::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--ds-blue), var(--ds-purple), transparent 85%);
  }
  .tmw-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 10px;
  }
  .tmw-head-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .tmw-mark {
    width: 4px; height: 30px; border-radius: 3px; flex: 0 0 auto;
    background: linear-gradient(180deg, var(--ds-blue), var(--ds-purple));
  }
  .tmw-head h3 { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
  .tmw-head p { font-size: 11.5px; color: var(--ds-t3); margin-top: 2px; }
  .tmw-sum {
    font-size: 11.5px; color: var(--ds-t2);
    padding: 4px 10px; border-radius: 999px;
    background: rgba(15,23,42,0.04);
    border: 1px solid var(--ds-line);
    white-space: nowrap;
  }
  .tmw-sum b { color: var(--ds-t1); font-weight: 800; font-size: 13px; }

  .tmw-list { display: flex; flex-direction: column; }
  .tmw-row {
    display: flex; align-items: center; gap: 11px;
    width: 100%; padding: 11px 4px;
    background: none; border: none; border-top: 1px solid var(--ds-line);
    cursor: pointer; font: inherit; text-align: left;
    transition: background 0.16s;
  }
  .tmw-row:first-child { border-top: none; }
  .tmw-row:hover { background: rgba(22,119,255,0.045); }
  .tmw-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  }
  .tmw-icon.tm-purple { background: rgba(139,92,246,0.11); color: var(--ds-purple); }
  .tmw-icon.tm-red    { background: rgba(239,68,68,0.10);  color: var(--ds-red); }
  .tmw-icon.tm-orange { background: rgba(245,158,11,0.12); color: #b45309; }
  .tmw-icon.tm-blue   { background: rgba(22,119,255,0.10); color: var(--ds-blue); }

  .tmw-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
  .tmw-name { font-size: 13.5px; font-weight: 700; color: var(--ds-t1); }
  .tmw-desc {
    font-size: 11.5px; color: var(--ds-t3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .tmw-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 999px;
    font-size: 10.5px; font-weight: 700; white-space: nowrap; flex: 0 0 auto;
  }
  .tmw-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
  .tmw-badge.is-live { background: rgba(16,185,129,0.13); color: #047857; }
  .tmw-badge.is-live i { animation: pulse-dot 2s infinite; }
  .tmw-badge.is-idle { background: rgba(15,23,42,0.05); color: var(--ds-t3); }

  .tmw-num {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 1px; min-width: 76px; flex: 0 0 auto;
  }
  .tmw-num b {
    font-size: 22px; font-weight: 800; line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  }
  .tmw-num em {
    font-style: normal; font-size: 10.5px; color: var(--ds-t3);
    white-space: nowrap;
  }
  .tmw-num.alert b { color: var(--ds-red); }
  .tmw-num.clear b { color: var(--ds-green); }
  .tmw-num.idle  b { color: var(--ds-t3); }
  .tmw-arrow { color: var(--ds-t3); flex: 0 0 auto; }
  .tmw-row:hover .tmw-arrow { color: var(--ds-blue); }

  .tmw-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }

  /* 右侧竖排：商标监测 + 公司主体监测 同宽相邻，视觉上是一套 */
  .risk-side-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

  /* ---- 风险监控 ----
     参考大屏设计语言，用浅色实现：
       · 数字巨大、标签极小，靠留白分隔而不是画框
       · 只用左色条表达严重度，不给整行铺底色
       · 不放徽章 / 标签框 / 来源小方块 —— 颜色只出现在真正需要处理的地方
     ---------------------------------------------------------------- */
  /* ---- 风控中心新布局：左「评分 + 数据 + 清单」，右「球体分布」 ---- */
  .risk-viz-grid {
    display: grid; grid-template-columns: 344px minmax(0, 1fr);
    gap: 16px; align-items: start;
  }
  .risk-viz-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .rc-bubble-card { padding: 18px 22px 12px; }
  .rc-bubbles { position: relative; height: 432px; }

  /* 通用：光点 / 中心核的标题文字 */
  .rcb-cap { font-size: 10.5px; }

  /* ---- 三区分栏：信息区（左） / 球体区（右） / 设置区（下）----
     靠一条竖线和一条横线分区，不再额外套卡片。 */
  .risk-stage {
    display: grid;
    /* 左栏宽度：能容纳类目名 + 描述不折行即可。
       440px 偏宽、雷达被挤小；330px 是「表格四列不挤 + 雷达够大」的平衡点。 */
    grid-template-columns: 330px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 0;
    /* 撑满可视区，否则卡片只按内容高度收缩，下方留一大片空白 */
    min-height: calc(100vh - 150px);
  }
  /* 信息区：竖线必须贯通整栏高度，所以让这一格撑满（不能用 align-self 收缩） */
  .rs-info {
    display: flex; flex-direction: column; gap: 14px;
    padding: 14px 16px 10px;
    border-right: 1px solid var(--ds-line);   /* 竖线 */
    min-width: 0; min-height: 0;
    align-self: stretch;
  }
  .score-card.score-inline {
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
    padding: 0; background: none; border: none; box-shadow: none;
  }
  /* 评分环恢复正常尺寸，不再被压成小饼 */
  /* 外环缩小后，内圈必须同步等比缩放。
     .score-ring-inner 是写死的 132px，如果外环缩到 108 而内圈不变，
     内圈会反过来把外环「撑」成椭圆 —— 这就是评分环变形的真正原因。
     这里用 scale 整体等比缩放，比例 = 108 / 132。 */
  .score-card.score-inline .score-ring { width: 108px; height: 108px; flex: 0 0 auto; }
  .score-card.score-inline .score-ring-inner {
    transform: scale(0.818);
  }
  .score-card.score-inline .score-ring-inner .score-num,
  .score-card.score-inline .score-ring-inner .score-unit {
    transform: none;                 /* 数字不再二次缩放，保持清晰 */
  }
  .score-card.score-inline .score-num { font-size: 30px; }
  .score-card.score-inline .score-unit { font-size: 10.5px; }
  .score-card.score-inline .score-title { margin-top: 0; font-size: 14px; line-height: 1.35; }
  .score-card.score-inline .score-desc { font-size: 11.5px; line-height: 1.55; }
  .score-card.score-inline .score-update { font-size: 10px; }
  .score-meta { min-width: 0; }
  .rs-info .rc-kpis { flex-direction: column; gap: 4px; }
  .rs-info .rc-kpi { display: flex; align-items: baseline; gap: 8px; }
  .rs-info .rc-kpi-n { font-size: 22px; min-width: 30px; }
  .rs-info .rc-kpi-l { font-size: 11.5px; }
  .rs-info .rc-kpi-h { display: none; }
  /* 清单已删：信息区内容顶部对齐，「全部明细」贴着它下方，不再撑满高度 */
  .rs-info { justify-content: flex-start; }
  .rs-more { align-self: flex-start; }

  /* 球体区 */
  .rs-cloud { position: relative; min-width: 0; min-height: 0; }
  /* ---- 扫描雷达 ----
     三个部件：底盘（同心圆 + 十字线） / 旋转光束 / 数据光点。
     光点高亮不用 JS 同步，而是用「负延迟」对齐扫描周期：
     角度 θ 的光点延迟 -θ/360 × 周期，光束扫到它时刚好亮起。 */
  .rs-cloud .rc-bubbles {
    position: relative;
    height: 100%; min-height: 300px;
    overflow: hidden;
    --sweep: 3.6s;                /* 扫描一周 */
    --tilt: 0deg;                 /* 保留变量占位 */
    --orbit: 4.2s;
  }
  /* 底盘：与 scan-monitor.html 完全一致的圆盘 + 十字准线 + 三道环 */
  .rc-radar {
    position: absolute; left: 50%; top: 50%;
    translate: -50% -50%;
    width: var(--D, 340px); height: var(--D, 340px);
    border-radius: 50%;
  }
  /* 外圈实线盘面 */
  .rc-radar .rc-disc {
    position: absolute; inset: 0; border-radius: 50%;
    border: 1.5px solid rgba(22,119,255,0.5);
    background: radial-gradient(circle, rgba(22,119,255,0.05), rgba(22,119,255,0.02) 55%, transparent 62%);
  }
  /* 十字准线 */
  .rc-radar .rc-cross::before, .rc-radar .rc-cross::after {
    content: ""; position: absolute; background: rgba(22,119,255,0.22);
  }
  .rc-radar .rc-cross::before { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }
  .rc-radar .rc-cross::after  { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
  /* 三道环：r1 25%、r2 47%、r3 虚线 7% —— 与案例一致 */
  .rc-radar .rc-ring { position: absolute; border: 1px solid rgba(22,119,255,0.28); border-radius: 50%; }
  .rc-radar .rc-ring.r1 { inset: 25%; }
  .rc-radar .rc-ring.r2 { inset: 47%; }
  .rc-radar .rc-ring.r3 { inset: 7%; border-style: dashed; border-color: rgba(22,119,255,0.35); }
  /* 扫描层：锥形渐变 + 一根亮线，两层各自旋转 */
  .rc-radar .rc-sweep { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
  .rc-radar .rc-sweep::before {
    content: ""; position: absolute; inset: 0;
    background: conic-gradient(from 355deg,
      transparent 0deg, rgba(22,119,255,0.05) 24deg, rgba(22,119,255,0.16) 56deg,
      rgba(22,119,255,0.45) 92deg, transparent 96deg);
    animation: rcSpin var(--sweep) linear infinite;
  }
  .rc-radar .rc-sweep::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 50%; height: 2px; transform-origin: left center;
    background: linear-gradient(90deg, var(--ds-blue), transparent);
    border-radius: 2px; animation: rcSpin var(--sweep) linear infinite;
  }
  @keyframes rcSpin { to { transform: rotate(360deg); } }
  /* 数据目标球：与案例 .target 一致 —— 实心单色、常驻半透明、扫到时整体点亮 */
  .rc-target {
    position: absolute;
    left: var(--x); top: var(--y);
    translate: -50% -50%;
    width: var(--d, 64px); height: var(--d, 64px);
    border-radius: 50%; border: none; padding: 0; cursor: pointer; font: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; opacity: .32;
    background: var(--tc, #0FA968);
    box-shadow: 0 0 22px rgba(15,169,104,.45);
    animation: rcTarget var(--sweep) linear infinite;
    animation-delay: var(--delay, 0s);
    transition: scale .2s cubic-bezier(.34,1.4,.64,1);
  }
  @keyframes rcTarget {
    0%   { opacity: .32; } 5%   { opacity: .32; }
    18%  { opacity: 1; } 32%  { opacity: .55; }
    45%  { opacity: .32; } 100% { opacity: .32; }
  }
  /* 按严重度换球色，其余（实心、不加渐变、发光圈）与案例一致 */
  /* 所有目标球统一用一种颜色。
     原本按严重度分橙/蓝/绿三色，但球内的类目名和数字已经说明是什么，
     再用颜色编码只是多加一层，反而让人误以为颜色有额外含义。 */
  .rc-target { --tc: #0FA968; }
  .rc-target b { line-height: 1; letter-spacing: 2px; }
  .rc-target i { font-style: normal; margin-top: 4px; opacity: .92; line-height: 1; }
  /* 点缀小点：与案例 .dot 一致 */
  .rc-dot {
    position: absolute;
    left: var(--x); top: var(--y); translate: -50% -50%;
    border-radius: 50%; background: var(--tc, #0FA968); opacity: .55;
    box-shadow: 0 0 8px rgba(15,169,104,.5);
    width: var(--d, 6px); height: var(--d, 6px);
    animation: rcBlink 2.6s ease-in-out infinite;
    animation-delay: var(--delay, 0s); pointer-events: none;
  }
  @keyframes rcBlink { 0%,100% { opacity: .55; } 50% { opacity: .15; } }
  /* 中心核：案例是 12px 小圆点，这里按总数略放大以便显示数字 */
  .rc-core {
    position: absolute; left: 50%; top: 50%;
    translate: -50% -50%;
    width: var(--cd, 62px); height: var(--cd, 62px); border-radius: 50%;
    border: none; padding: 0; cursor: pointer; font: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; background: var(--ds-blue);
    box-shadow: 0 0 16px rgba(22,119,255,.55);
  }
  .rc-core b { font-size: 15px; font-weight: 800; line-height: 1; }
  .rc-core .rcb-cap { font-size: 9px; opacity: .92; margin-top: 2px; }

  /* ===== 风险预警列表（左栏）=====
     参照案例的「表格式列表」：来源 / 事项 / 级别三列，
     行可点开对应来源明细。表格撑满剩余高度，滚动交给容器。 */
  .rc-logs-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; flex: 0 0 auto;
  }
  .rc-logs-title { font-size: 16px; font-weight: 700; color: var(--ds-t1); letter-spacing: -0.01em; }
  .rc-logs-badge {
    font-size: 13px; font-weight: 600; color: var(--ds-blue);
    border: 1px solid rgba(22,119,255,0.35); background: rgba(22,119,255,0.07);
    border-radius: 8px; padding: 3px 11px; min-width: 36px; text-align: center;
    font-variant-numeric: tabular-nums;
  }
  .rc-tabs {
    display: flex; gap: 14px; border-bottom: 1px solid var(--ds-line);
    flex: 0 0 auto;
    /* 类目变多后必须换行，否则每个 tab 被挤成竖排单字 */
    flex-wrap: wrap; row-gap: 0;
  }
  .rc-tabs button {
    position: relative; background: none; border: 0; padding: 8px 2px;
    font: inherit; font-size: 13.5px; color: var(--ds-t3); cursor: pointer;
    white-space: nowrap; flex: 0 0 auto;
  }
  .rc-tabs button.on { color: var(--ds-blue); font-weight: 600; }
  .rc-tabs button.on::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
    height: 2px; background: var(--ds-blue); border-radius: 2px;
  }
  /* 列表可滚动，且留出底部渐隐提示「下面还有」 */
  .rc-table-wrap { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .rc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .rc-table th {
    position: sticky; top: 0; z-index: 1;
    background: var(--ds-card); text-align: left; font-weight: 400;
    font-size: 11.5px; color: var(--ds-t3); letter-spacing: 0.05em;
    padding: 9px 6px; border-bottom: 1px solid var(--ds-line);
  }
  .rc-table td { padding: 11px 6px; border-bottom: 1px solid rgba(15,23,42,0.07); vertical-align: top; }
  .rc-row { cursor: pointer; transition: background 0.14s; }
  .rc-row:hover { background: rgba(22,119,255,0.05); }
  .rc-row-src { color: var(--ds-t3); font-size: 11.5px; white-space: nowrap; width: 1%; }
  /* 类目名加粗，副标题说明这一类在盯什么 */
  .rc-row-op b { font-weight: 700; color: var(--ds-t1); font-size: 13px; }
  .rc-row-n, .rc-row-time {
    color: var(--ds-t2); font-size: 12px; white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .rc-row-time { color: var(--ds-t3); font-size: 11.5px; }
  .rc-row-op { line-height: 1.45; }
  .rc-row-name { display: block; color: var(--ds-t1); }
  .rc-row-sub {
    display: block; color: var(--ds-t3); font-size: 11.5px; margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px;
  }
  .rc-row-st { white-space: nowrap; font-size: 12px; text-align: right; }
  .rc-row-st.st-bad { color: var(--ds-red); font-weight: 600; }
  .rc-row-st.st-norm { color: #b45309; }
  .rc-row-st.st-ok { color: var(--ds-green); }
  .rc-empty { padding: 26px 0; text-align: center; font-size: 12.5px; color: var(--ds-t3); }
  /* 底栏：在监计数 + 全部明细按钮 */
  .rc-logs-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--ds-line); flex: 0 0 auto;
  }
  .rc-selc { font-size: 13px; color: var(--ds-t2); font-variant-numeric: tabular-nums; }

  /* ===== 雷达扫描区（右栏）===== */
  .rp-head {
    display: flex; align-items: center; justify-content: space-between;
    flex: 0 0 auto; margin-bottom: 4px;
  }
  .rp-title { font-size: 13.5px; font-weight: 600; color: var(--ds-t2); letter-spacing: 0.04em; }
  .rp-tag {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11.5px; font-weight: 600; color: var(--ds-blue);
    border: 1px solid rgba(22,119,255,0.3); background: rgba(22,119,255,0.07);
    padding: 3px 11px; border-radius: 7px;
  }
  .rp-tag::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--ds-blue); animation: rcTagBlink 1.4s ease-in-out infinite;
  }
  @keyframes rcTagBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
  /* 雷达容器必须撑满右栏。
     之前写成 min-height:0 是个致命错误：父级 .risk-stage 首行是
     minmax(0,1fr)，零基准 + 零最小值 会把高度直接压成 0，
     JS 量到 clientHeight=0 就走放弃分支，雷达整个不渲染。 */
  .rs-cloud .rc-bubbles {
    flex: 1 1 auto;
    height: 100%;
    min-height: 320px;            /* 兜底：无论 flex 怎么算都不会塌成 0 */
    overflow: hidden;
    --sweep: 3.6s;                /* 扫描一周 */
    --tilt: 0deg;                 /* 保留变量占位 */
    --orbit: 4.2s;
  }

  /* 设置区：横线分隔，通栏，吸在页面底部 */
  .rs-set {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 14px;
    padding: 10px 18px;
    border-top: 1px solid var(--ds-line);      /* 横线 */
    position: sticky; bottom: 0; z-index: 5;
    background: var(--ds-card);
    border-radius: 0 0 16px 16px;
  }
  .rs-set .scan-progress { flex-basis: 100%; }

  @media (max-width: 1080px) {
    .risk-stage { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
    .rs-info { border-right: none; border-bottom: 1px solid var(--ds-line); }
    .rs-info .rc-kpis { flex-direction: row; }
    .rs-set { grid-column: 1; flex-wrap: wrap; }
  }

  .rcb-empty {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--ds-t3); font-size: 13px;
  }
  @media (max-width: 1080px) {
    .risk-viz-grid { grid-template-columns: 1fr; }
    .rc-bubbles { height: 360px; }
  }

  .rc-panel { padding: 18px 22px 12px; }
  .rc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
  .rc-head h3 { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
  .rc-more {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 2px;
    background: none; border: none; padding: 0; cursor: pointer; font: inherit;
    font-size: 11.5px; color: var(--ds-t3); white-space: nowrap;
  }
  .rc-more:hover { color: var(--ds-blue); }

  /* 三个大数字：横向排布，靠留白分隔，没有方框和底色 */
  .rc-kpis {
    display: flex; align-items: flex-start; gap: 30px;
    padding: 10px 0 20px; margin-bottom: 4px;
    border-bottom: 1px solid var(--ds-line);
  }
  .rc-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .rc-kpi-n {
    font-size: 46px; font-weight: 800; line-height: 1;
    letter-spacing: -0.035em; color: var(--ds-t1);
    font-variant-numeric: tabular-nums;
  }
  /* 数字带一层极淡的光晕，呼应大屏的「发光」质感，但仍保持浅色底 */
  .rc-kpi.is-high .rc-kpi-n   { color: var(--ds-red); text-shadow: 0 0 22px rgba(239,68,68,0.16); }
  .rc-kpi.is-mid .rc-kpi-n    { color: #b45309;         text-shadow: 0 0 22px rgba(245,158,11,0.16); }
  .rc-kpi.is-total .rc-kpi-n  { color: var(--ds-t1);     text-shadow: 0 0 22px rgba(22,119,255,0.10); }
  .rc-kpi.is-clear .rc-kpi-n  { color: var(--ds-t3);     text-shadow: none; }
  .rc-kpi-l {
    font-size: 11.5px; color: var(--ds-t3);
    letter-spacing: 0.02em; white-space: nowrap;
  }

  /* 清单：左色条 = 严重度。没有边框框、没有底色块 */
  .rc-list { display: flex; flex-direction: column; }
  .rc-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 11px 12px 11px 14px; text-align: left;
    background: none; border: none; border-top: 1px solid var(--ds-line);
    border-left: 3px solid transparent;
    cursor: pointer; font: inherit;
    transition: background 0.14s, border-left-color 0.14s;
  }
  .rc-item:first-child { border-top: none; }
  .rc-item:hover { background: rgba(15,23,42,0.026); }
  /* 高危：红条；需关注：橙条。只用 3px 色条，不铺整行底色 */
  .rc-item.sev-2 { border-left-color: var(--ds-red); }
  .rc-item.sev-2:hover { background: rgba(239,68,68,0.05); }
  .rc-item.sev-1 { border-left-color: #f59e0b; }
  .rc-item.sev-1:hover { background: rgba(245,158,11,0.05); }
  .rc-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
  .rc-item-name {
    font-size: 13.5px; font-weight: 600; color: var(--ds-t1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .rc-item.sev-2 .rc-item-name { font-weight: 700; }
  .rc-item-sub {
    font-size: 12px; color: var(--ds-t3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .rc-ok {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 2px; font-size: 12.5px; color: var(--ds-t3);
  }
  .rc-more {
    padding: 9px 2px; font-size: 11.5px; color: var(--ds-t3);
  }
  .rc-more button {
    background: none; border: none; padding: 0; cursor: pointer; font: inherit;
    font-size: 11.5px; font-weight: 700; color: var(--ds-blue);
    text-decoration: underline; text-underline-offset: 2px;
  }
  @media (max-width: 900px) {
    .rc-kpis { gap: 20px; }
    .rc-kpi-n { font-size: 34px; }
  }

  /* ---- 公司主体监测 ----
     直接复用 .tmw-head / .tmw-mark / .tmw-sum 保证顶栏完全一致，
     只有内容区换成「指标块 + 重点清单」，与商标监测的行式排版区分开。 */
  .ent-watch {
    position: relative; overflow: hidden;
    padding: 16px 18px 14px;
    background: var(--ds-card);
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    box-shadow: none;
  }
  .ent-watch::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--ds-blue), var(--ds-purple), transparent 85%);
  }

  /* 零状态：全部正常时收成一行，不铺四个「— 0」 */
  .entw-ok {
    display: flex; align-items: center; gap: 9px;
    padding: 13px 14px; font-size: 13px; color: var(--ds-t2);
    border: 1px solid rgba(13,148,136,0.22); border-radius: 12px;
    background: rgba(13,148,136,0.05); color: #0f766e;
  }
  .entw-ok b { font-weight: 800; }
  .entw-ok-more {
    margin-left: auto; background: none; border: none; cursor: pointer;
    font: inherit; font-size: 12px; font-weight: 700; color: var(--ds-blue);
    text-decoration: underline; text-underline-offset: 2px;
  }

  /* 一级：大数字 + 一句话结论。这是这块面板真正要说的事 */
  .entw-hero {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 14px 16px; margin-bottom: 12px;
    border-radius: 12px; border: 1px solid var(--ds-line);
    background: rgba(15,23,42,0.022);
  }
  .entw-hero.tone-high { background: rgba(239,68,68,0.055);  border-color: rgba(239,68,68,0.24); }
  .entw-hero.tone-biz  { background: rgba(239,68,68,0.035);  border-color: rgba(239,68,68,0.18); }
  .entw-hero.tone-mid  { background: rgba(245,158,11,0.06);  border-color: rgba(245,158,11,0.26); }
  .entw-hero-lft { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1 1 260px; }
  /* 48px：让数字成为主角，而不是和旁边 12px 的文字一个量级 */
  .entw-hero-n {
    font-size: 48px; font-weight: 800; line-height: 1;
    letter-spacing: -0.03em; color: var(--ds-red); font-variant-numeric: tabular-nums;
  }
  .entw-hero.tone-mid .entw-hero-n { color: #b45309; }
  .entw-hero-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .entw-hero-t1 { font-size: 14.5px; font-weight: 700; color: var(--ds-t1); }
  .entw-hero-t2 { font-size: 12px; color: var(--ds-t3); }
  .entw-hero-rgt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  /* 次级：只做「跳转到明细」的入口，数字小、不抢主视觉 */
  .entw-jump {
    display: inline-flex; align-items: baseline; gap: 5px;
    padding: 5px 10px; cursor: pointer; font: inherit; font-size: 11.5px;
    color: var(--ds-t2); background: var(--ds-card);
    border: 1px solid var(--ds-line); border-radius: 999px;
    transition: border-color 0.16s, color 0.16s;
  }
  .entw-jump:hover { color: var(--ds-blue); border-color: rgba(22,119,255,0.35); }
  .entw-jump b { font-size: 13px; font-weight: 800; color: var(--ds-t1); font-variant-numeric: tabular-nums; }
  .entw-total { font-size: 11.5px; color: var(--ds-t3); white-space: nowrap; }
  .entw-total b { font-weight: 700; color: var(--ds-t2); }

  /* 重点主体清单：按严重度着色，不读字也能判断哪行要紧 */
  .entw-list {
    display: flex; flex-direction: column;
    border: 1px solid var(--ds-line); border-radius: 12px; overflow: hidden;
  }
  .entw-item {
    display: flex; align-items: center; gap: 11px;
    width: 100%; padding: 11px 14px;
    background: none; border: none; border-top: 1px solid var(--ds-line);
    cursor: pointer; font: inherit; text-align: left;
    transition: background 0.16s;
  }
  .entw-item:first-child { border-top: none; }
  .entw-item:hover { filter: brightness(0.985); }
  .entw-item.lv-high { background: rgba(239,68,68,0.045); }
  .entw-item.lv-high:hover { background: rgba(239,68,68,0.075); }
  .entw-item.lv-biz  { background: rgba(239,68,68,0.022); }
  .entw-item.lv-biz:hover { background: rgba(239,68,68,0.05); }
  .entw-item.lv-medium { background: rgba(245,158,11,0.035); }
  .entw-item.lv-medium:hover { background: rgba(245,158,11,0.065); }
  .entw-item-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--ds-t3); }
  .entw-item.lv-high .entw-item-dot   { background: var(--ds-red); box-shadow: 0 0 0 3px rgba(239,68,68,0.16); }
  .entw-item.lv-biz .entw-item-dot    { background: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,0.14); }
  .entw-item.lv-medium .entw-item-dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.16); }
  .entw-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
  .entw-item-name { font-size: 13.5px; font-weight: 700; color: var(--ds-t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .entw-item-sig  { font-size: 11.5px; color: var(--ds-t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .entw-item-tags { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; flex-wrap: nowrap; white-space: nowrap; }
  .entw-tag { padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; }
  .entw-tag.t-high { color: var(--ds-red);  background: rgba(239,68,68,0.11); }
  .entw-tag.t-biz  { color: #b91c1c;       background: rgba(239,68,68,0.08); }
  .entw-tag.t-mid  { color: #b45309;       background: rgba(245,158,11,0.14); }
  .entw-arrow { color: var(--ds-t3); flex: 0 0 auto; }
  .entw-item:hover .entw-arrow { color: var(--ds-blue); }
  .entw-more {
    padding: 8px 14px; font-size: 11.5px; color: var(--ds-t3);
    border-top: 1px solid var(--ds-line); background: rgba(15,23,42,0.014);
  }
  .entw-more button {
    background: none; border: none; padding: 0; cursor: pointer; font: inherit;
    font-size: 11.5px; font-weight: 700; color: var(--ds-blue);
    text-decoration: underline; text-underline-offset: 2px;
  }
  @media (max-width: 900px) {
    .entw-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
    .entw-hero-rgt { width: 100%; }
  }

  /* ---- 消息中心：下拉面板 ---- */
  .notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 328px;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(15,23,42,0.1);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(15,23,42,0.14);
    z-index: 60;
    overflow: hidden;
  }
  .nav-item-hidden { display: none !important; }
  .notif-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(15,23,42,0.07);
    background: rgba(15,23,42,0.02);
  }
  .notif-head strong { font-size: 13px; font-weight: 700; color: #0f172a; }
  .notif-clear {
    background: none; border: none; cursor: pointer; font: inherit;
    font-size: 11.5px; color: #94a3b8;
  }
  .notif-clear:hover { color: #e8590c; }
  .notif-list { overflow-y: auto; padding: 6px; }
  .notif-item {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
  }
  .notif-item:hover { background: rgba(15,23,42,0.03); }
  .notif-lv {
    flex: 0 0 auto;
    margin-top: 1px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  }
  .notif-item.warn .notif-lv { background: rgba(245,158,11,0.14); color: #b45309; }
  .notif-item.danger .notif-lv { background: rgba(239,68,68,0.12); color: #ef4444; }
  .notif-item.ok .notif-lv { background: rgba(16,185,129,0.13); color: #047857; }
  .notif-item.info .notif-lv { background: rgba(232,89,12,0.11); color: #e8590c; }
  .notif-main { min-width: 0; }
  .notif-msg { font-size: 12.5px; color: #334155; line-height: 1.5; }
  .notif-t {
    font-size: 10.5px; color: #94a3b8; margin-top: 3px;
    font-variant-numeric: tabular-nums;
  }
  .notif-empty { padding: 26px 0; text-align: center; font-size: 12.5px; color: #94a3b8; }
  .sidebar-brand { position: relative; }

  /* ---- 页面底部提示条 ---- */
  /* 页头条「监测动态」滚动条与时间栏已移除，时间移入雷达区右上角 */

  /* 商标列表：序号列 + 图样独立列（无边框） */
  #trademarks tbody td {
    padding: 9px 12px;
    vertical-align: middle;
  }
  #trademarks thead th { vertical-align: middle; }
  /* 只有序号和图样列居中，其余保持左对齐以匹配内容 */
  #trademarks thead th:nth-child(1),
  #trademarks thead th:nth-child(3) { text-align: center; }
  #trademarks tbody td.tm-idx { text-align: center; }
  #trademarks tbody td.tm-pic-cell { text-align: center; }
  #trademarks tbody td .auth-party-sub { margin-top: 1px; }
  .tm-idx {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    text-align: center;
    vertical-align: middle;
    font-size: 12.5px;
    color: var(--text-tertiary, #94a3b8);
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    white-space: nowrap;
  }
  .tm-expand-btn {
    border: none; background: none; cursor: pointer; font-size: 10px;
    color: var(--text-secondary); padding: 0 2px; line-height: 1;
    display: inline-block; width: 12px; text-align: center;
  }
  .tm-expand-btn:hover { color: var(--blue); }
  .tm-pic-cell { width: 96px; min-width: 96px; max-width: 96px; text-align: center; vertical-align: middle; }
  .tm-thumb-l {
    width: 58px; height: 58px;
    display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden;
    vertical-align: middle;
    border: 0;
    background: none;
  }
  .tm-thumb-l img { width: 100%; height: 100%; object-fit: contain; display: block; }
  .tm-thumb-l.is-empty {
    border-radius: 9px;
    color: #fff; font-size: 23px; font-weight: 700;
  }
  .tm-cell-title {
    font-weight: 600; color: var(--text-primary, #0f172a);
  }
  /* ---- 公司主体管理 ---- */
  .ent-name { display: flex; align-items: flex-start; gap: 8px; }
  .ent-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
  .ent-name-t { font-weight: 600; color: var(--text-primary, #0f172a); }
  .ent-role { padding: 2px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; }
  /* 企业类型（小规模 / 个体工商户等） */
  .ent-enttype {
    display: inline-block; padding: 2px 8px; border-radius: 5px;
    font-size: 11.5px; font-weight: 600;
    color: #0f766e; background: rgba(13, 148, 136, 0.1);
  }
  .ent-enttype.is-empty { color: var(--text-tertiary, #94a3b8); background: rgba(148, 163, 184, 0.14); font-weight: 400; }
  /* 类型 + 登记状态：同一行内并排，不换行 */
  /* 「类型 / 状态」列：类型标签与工商登记状态同行并排 */
  .ent-tagcol { display: flex; flex-direction: row; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
  .ent-biz { font-size: 12px; color: var(--text-secondary, #64748b); }
  .ent-biz.danger { color: var(--red, #ef4444); font-weight: 600; }
  .ent-biz.ok { color: #047857; }
  .ent-biz.muted { color: var(--text-tertiary, #94a3b8); }
  .ent-n { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
  /* 序号列：与商标检索页同款窄列，方便一眼数到第几家 */
  .ent-seq-col { width: 52px; }
  .ent-seq {
    display: block;
    width: 52px;
    text-align: center;
    color: var(--text-tertiary, #94a3b8);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
  }
  .ent-risk { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; }
  .ent-risk.high { background: rgba(239,68,68,0.12); color: #ef4444; }
  .ent-risk.medium { background: rgba(245,158,11,0.14); color: #b45309; }
  .ent-risk-none { font-size: 12px; color: var(--text-tertiary, #94a3b8); }
  .ent-risk-tip {
    display: block; margin-top: 3px; font-size: 11px; color: var(--text-tertiary, #94a3b8);
    max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .ent-detail-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px;
    padding: 14px 0; border-bottom: 1px solid var(--border, rgba(15,23,42,0.07));
  }
  .ent-kv { display: flex; gap: 10px; font-size: 13px; }
  .ent-kv-k { color: var(--text-tertiary, #94a3b8); width: 88px; flex: 0 0 auto; }
  .ent-kv-v { color: var(--text-primary, #0f172a); }
  .ent-sig { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; font-size: 12.5px; }
  .ent-sig-lv { padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; flex: 0 0 auto; }
  .ent-sig-lv.high { background: rgba(239,68,68,0.12); color: #ef4444; }
  .ent-sig-lv.medium { background: rgba(245,158,11,0.14); color: #b45309; }
  /* ---- 企业数据模块（五类各自独立）---- */
  .biz-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
  .biz-block {
    border: 1px solid var(--border, rgba(15,23,42,0.07));
    border-radius: 10px;
    overflow: hidden;
  }
  .biz-head {
    display: flex; align-items: baseline; gap: 10px;
    padding: 9px 12px;
    background: rgba(15,23,42,0.025);
    border-bottom: 1px solid var(--border, rgba(15,23,42,0.07));
  }
  .biz-name { font-size: 13px; font-weight: 700; color: var(--text-primary, #0f172a); flex: 0 0 auto; }
  .biz-desc { font-size: 11.5px; color: var(--text-tertiary, #94a3b8); flex: 1 1 auto; }
  .biz-badge {
    flex: 0 0 auto;
    padding: 1px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
  }
  .biz-badge.is-idle  { background: rgba(148,163,184,0.16); color: #64748b; }
  .biz-badge.is-ok    { background: rgba(16,185,129,0.13); color: #047857; }
  .biz-badge.is-warn  { background: rgba(245,158,11,0.15); color: #b45309; }
  .biz-badge.is-err   { background: rgba(239,68,68,0.12); color: #ef4444; }
  /* 每类独立的「查询」按钮：必须一眼可见，避免误以为只有全局查询 */
  .biz-refresh {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 46px; height: 22px;
    padding: 0 10px;
    border: 1px solid rgba(22,119,255,0.35);
    border-radius: 5px;
    background: rgba(22,119,255,0.06);
    color: var(--blue, #1677ff);
    font-size: 11.5px; font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
  }
  .biz-refresh:hover {
    background: rgba(22,119,255,0.13);
    border-color: var(--blue, #1677ff);
  }
  .biz-refresh:disabled { opacity: 0.45; cursor: not-allowed; }
  .biz-refresh.is-busy { color: var(--text-tertiary, #94a3b8); border-color: var(--border, rgba(15,23,42,0.12)); background: none; }
  .biz-body { padding: 4px 12px 10px; max-height: 260px; overflow-y: auto; }
  .biz-empty { padding: 12px 0; font-size: 12px; color: var(--text-tertiary, #94a3b8); }
  /* 商标库筛选栏 */
  .tm-filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

  /* ===== 商标库：锁定视口高度，表格区内部滚动 =====
     和风控中心同一套做法：外层 flex 链贯通到视口，高度由布局算出来，
     不用 min-height: calc(100vh - 猜的数) —— 一旦页头高度变了就会多出滚动条。
     48px = .content 的上下内边距合计（20 + 28）。
     卡片自己撑满这一屏，表格区拿到剩余空间后独立滚动，
     页头（页签/筛选）和底部工具栏（操作/翻页）始终可见。 */
  #trademarks[data-tm-view="library"] {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 48px);
    overflow: hidden;
  }
  #trademarks[data-tm-view="library"]:not(.active) { display: none; }
  #trademarks[data-tm-view="library"] > [data-tm-panel="library"] {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }
  #trademarks[data-tm-view="library"] .tm-library-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }
  /* 页头与底部工具栏固定占位，只有中间的表格滚动 */
  #trademarks[data-tm-view="library"] .tm-library-card .card-header,
  #trademarks[data-tm-view="library"] .tm-library-footer {
    flex: 0 0 auto;
  }
  #trademarks[data-tm-view="library"] .tm-library-card .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  /* 滚动条压在表格区右缘，不让整页出现第二条滚动条 */
  #trademarks[data-tm-view="library"] .tm-library-card .table-wrap {
    scrollbar-width: thin;
    scrollbar-color: rgba(120,53,15,0.22) transparent;
  }
  #trademarks[data-tm-view="library"] .tm-library-card .table-wrap::-webkit-scrollbar { width: 10px; }
  #trademarks[data-tm-view="library"] .tm-library-card .table-wrap::-webkit-scrollbar-thumb {
    background: rgba(120,53,15,0.20);
    border: 3px solid var(--card-solid);
    border-radius: 6px;
  }
  #trademarks[data-tm-view="library"] .tm-library-card .table-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(120,53,15,0.32);
  }
  /* 表头吸顶：141 件商标翻页时，列名始终可见 */
  #trademarks[data-tm-view="library"] .tm-library-card .table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    /* border-collapse:collapse 下sticky 元素的边框会被合并掉，
       滚动时列名与内容之间就没有分隔线了。用一条极淡的投影补回来。 */
    box-shadow: 0 1px 0 var(--border);
  }
  /* 商标库页头：左边状态页签、右边筛选器。窄屏时页签独占一行，不与下拉挤在一起 */
  #trademarks .card-header { flex-wrap: wrap; row-gap: 10px; }
  #trademarks .card-header-actions { margin-left: auto; }
  @media (max-width: 900px) {
    #trademarks .card-header-actions { margin-left: 0; width: 100%; }
  }
  /* 汇总行与成员行的层级区分：汇总行是入口，成员行是明细。
       底色同样用实色 —— 吸顶表头下面滚动的是这些行，
       半透明会让上下行互相透出，深色边框下尤其明显。 */
  .tm-group-row { cursor: default; }
  .tm-group-row > td { background: #fdfcfb; }
  .tm-group-row:hover > td { background: #f9f6f3; }
  .tm-member-row > td { font-size: 12.5px; background: var(--card-solid); }
  .tm-filter-select {
    width: auto; min-width: 132px; max-width: 200px;
    height: 34px; padding: 0 26px 0 10px;
    font-size: 12.5px; color: var(--text-primary, #0f172a);
    background-color: #fff; cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 14px;
  }

  /* 详情区标题里的可点击计数 */
  .detail-title-link {
    background: none; border: 0; padding: 0;
    font: inherit; color: var(--blue, #1677ff);
    cursor: pointer; text-decoration: underline;
    text-underline-offset: 2px;
  }
  .detail-title-link:hover { opacity: 0.8; }

  /* 弹窗标题栏右侧操作区 */
  .modal-head-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; margin-right: 12px; }
  .modal-head-hint { font-size: 11.5px; color: var(--text-tertiary, #94a3b8); white-space: nowrap; }

  /* 主体详情顶部：完整工商档案 */
  .ent-profile-card {
    margin-top: 10px;
    padding: 12px 14px 14px;
    background: rgba(15,23,42,0.02);
    border: 1px solid var(--border, rgba(15,23,42,0.07));
    border-radius: 10px;
  }
  .entp-head {
    display: flex; align-items: baseline; gap: 10px;
    padding-bottom: 9px; margin-bottom: 10px;
    border-bottom: 1px solid var(--border, rgba(15,23,42,0.07));
  }
  .entp-title { font-size: 12.5px; font-weight: 700; color: var(--text-primary, #0f172a); }
  .entp-meta  { font-size: 11px; color: var(--text-tertiary, #94a3b8); }

  .entp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 20px;
  }
  .entp-grid.is-wide { grid-template-columns: 1fr; margin-top: 4px; }

  .entp-cell { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; min-width: 0; }
  .entp-cell.is-wide { align-items: flex-start; padding: 6px 0; }
  .entp-k {
    flex: 0 0 96px;
    font-size: 12px; color: var(--text-tertiary, #94a3b8);
    white-space: nowrap;
  }
  .entp-v {
    flex: 1 1 auto; min-width: 0;
    font-size: 12.5px; color: var(--text-primary, #0f172a);
    word-break: break-word;
  }
  .entp-cell.is-wide .entp-v { line-height: 1.6; }
  .entp-main { flex: 1 1 auto; min-width: 0; }
  /* 超长文本（经营范围等）：默认 3 行，点「更多」展开 */
  .entp-cell.is-long .entp-v {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .entp-cell.is-long.is-open .entp-v { -webkit-line-clamp: unset; display: block; }
  .entp-more {
    margin-top: 4px; padding: 1px 0;
    background: none; border: 0; padding-left: 0;
    color: var(--blue, #1677ff);
    font-size: 11.5px; cursor: pointer;
  }
  .entp-more:hover { text-decoration: underline; }

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

  /* 工商档案字段清单 */
  .biz-profile { padding: 4px 0; }
  .prof-row {
    display: flex; gap: 10px; align-items: baseline;
    padding: 5px 0; border-bottom: 1px dashed rgba(15,23,42,0.06);
    font-size: 12.5px;
  }
  .prof-row:last-child { border-bottom: none; }
  .prof-k {
    flex: 0 0 108px; color: var(--text-secondary, #475569); font-weight: 500;
  }
  .prof-v {
    flex: 1 1 auto; color: var(--text-primary, #0f172a); word-break: break-all;
  }
  /* 经营范围这类长文本：默认截断，点击展开 */
  .prof-row.is-long .prof-v {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .prof-row.is-long:hover .prof-v { -webkit-line-clamp: unset; }
  .prof-divider {
    margin: 10px 0 4px; font-size: 11px; color: var(--text-tertiary, #94a3b8);
    text-transform: uppercase; letter-spacing: 0.04em;
  }

  .biz-item { padding: 8px 0; border-bottom: 1px dashed rgba(15,23,42,0.07); }
  .biz-item:last-child { border-bottom: none; }
  .biz-item-h {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 600; color: var(--text-primary, #0f172a);
  }
  .biz-item-d { margin-top: 3px; font-size: 12px; color: var(--text-secondary, #475569); line-height: 1.5; }
  .biz-item-m { margin-top: 3px; font-size: 11px; color: var(--text-tertiary, #94a3b8); }
  .biz-g { padding: 0 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
  .biz-g.high   { background: rgba(239,68,68,0.12);  color: #ef4444; }
  .biz-g.medium { background: rgba(245,158,11,0.15); color: #b45309; }
  .biz-g.low    { background: rgba(148,163,184,0.16); color: #64748b; }
  .biz-g.info   { background: rgba(232,89,12,0.10); color: #e8590c; }
  .biz-item.g-low { opacity: 0.72; }

  /* 新增主体：查工商信息 */
  .ent-lookup { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
  .ent-lookup-hint { font-size: 12px; color: var(--text-tertiary, #94a3b8); }
  .ent-profile-meta { font-size: 11px; color: var(--text-tertiary, #94a3b8); font-weight: 400; margin-left: 6px; }
  .ent-profile {
    margin-top: 6px; padding: 10px 12px;
    background: rgba(15,23,42,0.02);
    border: 1px solid var(--border, rgba(15,23,42,0.07));
    border-radius: 8px;
    max-height: 300px; overflow-y: auto;
  }
  .ent-profile-row {
    display: flex; gap: 10px; align-items: baseline;
    padding: 4px 0; font-size: 12.5px;
    border-bottom: 1px dashed rgba(15,23,42,0.06);
  }
  .ent-profile-row:last-child { border-bottom: none; }
  .ent-profile-k { flex: 0 0 112px; color: var(--text-secondary, #475569); }
  .ent-profile-v { flex: 1 1 auto; color: var(--text-primary, #0f172a); word-break: break-all; }
  .ent-profile-sep {
    margin: 8px 0 2px; font-size: 11px; color: var(--text-tertiary, #94a3b8);
    text-transform: uppercase; letter-spacing: 0.04em;
  }

  .ent-query-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--border, rgba(15,23,42,0.07));
  }
  .ent-query-hint { font-size: 11.5px; color: var(--text-tertiary, #94a3b8); }
  .ent-rel-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .ent-chip {
    padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
    background: rgba(15,23,42,0.05); color: var(--text-secondary, #475569);
  }
  @media (max-width: 900px) {
    .ent-detail-grid { grid-template-columns: 1fr; }
  }

  /* ========== 定时刷新设置 ========== */
  .sched-card { margin-bottom: 16px; }
  .sched-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 20px;
  }
  .sched-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--text-primary, #0f172a); }
  .sched-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--text-tertiary, #94a3b8); }
  .sched-sub.is-pending { color: var(--orange, #f59e0b); }

  /* 开关 */
  .switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
  .switch input { position: absolute; opacity: 0; width: 0; height: 0; }
  .switch-track {
    position: relative; display: inline-block;
    width: 40px; height: 22px; border-radius: 11px;
    background: #d4d9e0; transition: background .2s; flex: 0 0 auto;
  }
  .switch-track::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .2s;
  }
  .switch input:checked + .switch-track { background: var(--blue, #1677ff); }
  .switch input:checked + .switch-track::after { transform: translateX(18px); }
  .switch-text { font-size: 12.5px; font-weight: 600; color: var(--text-secondary, #475569); min-width: 34px; }

  .sched-body { padding: 0 20px 18px; border-top: 1px solid var(--border, rgba(15,23,42,0.07)); }
  .sched-field { padding: 14px 0 0; }
  .sched-label {
    display: block; margin-bottom: 7px;
    font-size: 12.5px; font-weight: 600; color: var(--text-primary, #0f172a);
  }
  .sched-hint { font-size: 12px; color: var(--text-tertiary, #94a3b8); }
  .sched-select, .sched-input {
    height: 32px; padding: 0 10px;
    border: 1px solid var(--border, rgba(15,23,42,0.12));
    border-radius: 7px; background: #fff;
    font-size: 12.5px; color: var(--text-primary, #0f172a);
  }
  .sched-select { min-width: 110px; }
  .sched-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

  /* 后续需要配置什么：清单式提示 */
  .sched-todo {
    margin-top: 14px; padding: 12px 14px;
    border: 1px dashed rgba(245,158,11,0.45);
    border-radius: 9px; background: rgba(245,158,11,0.05);
  }
  .sched-todo-h {
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 700; color: #b45309; margin-bottom: 8px;
  }
  .sched-todo ol { margin: 0; padding-left: 18px; }
  .sched-todo li { font-size: 12px; color: #78350f; line-height: 1.85; }
  .sched-todo code {
    padding: 1px 5px; border-radius: 4px;
    background: rgba(180,83,9,0.10); font-size: 11.5px;
  }

  .sched-cron {
    margin-top: 16px; padding: 12px 14px;
    border: 1px solid var(--border, rgba(15,23,42,0.08));
    border-radius: 9px; background: rgba(15,23,42,0.02);
  }
  .sched-cron-label { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
  .sched-cron-row { display: flex; align-items: center; gap: 8px; }
  .sched-cron-url {
    flex: 1 1 auto; min-width: 0;
    padding: 7px 10px; border-radius: 6px;
    background: #fff; border: 1px solid var(--border, rgba(15,23,42,0.08));
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px; color: var(--text-secondary, #475569);
    overflow-x: auto; white-space: nowrap;
  }
  .sched-note { margin-top: 8px; font-size: 11.5px; color: var(--text-tertiary, #94a3b8); }
  .sched-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--border, rgba(15,23,42,0.07));
  }
  .btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }

  /* 消息中心独立页面 ---- */
  .msg-page {
    background: #fff;
    border: 1px solid var(--border, rgba(15,23,42,0.07));
    border-radius: 14px;
    overflow: hidden;
  }
  .msg-page-head {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    padding: 16px 20px 14px;
    border-bottom: 1px solid rgba(15,23,42,0.07);
    background: rgba(15,23,42,0.02);
  }
  .msg-page-head h3 { font-size: 15px; font-weight: 700; color: #0f172a; }
  .msg-page-sub { font-size: 12px; color: #94a3b8; }
  .msg-page-list { padding: 6px; max-height: 62vh; overflow-y: auto; }
  .msg-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px;
    border-radius: 9px;
  }
  .msg-row:hover { background: rgba(15,23,42,0.03); }
  .msg-lv {
    flex: 0 0 auto; margin-top: 2px;
    padding: 2px 7px; border-radius: 5px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  }
  .msg-row.warn .msg-lv { background: rgba(245,158,11,0.14); color: #b45309; }
  .msg-row.danger .msg-lv { background: rgba(239,68,68,0.12); color: #ef4444; }
  .msg-row.ok .msg-lv { background: rgba(16,185,129,0.13); color: #047857; }
  .msg-row.info .msg-lv { background: rgba(232,89,12,0.11); color: #e8590c; }
  .msg-main { min-width: 0; }
  .msg-text { font-size: 13px; color: #334155; line-height: 1.55; }
  .msg-t {
    font-size: 11px; color: #94a3b8; margin-top: 4px;
    font-variant-numeric: tabular-nums;
  }
  .notif-empty { padding: 40px 0; text-align: center; font-size: 13px; color: #94a3b8; }

  /* 底栏：简化后的扫描计划 + 提醒 + 操作 */
  .tmw-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 2px;
    padding: 11px 4px 2px;
    border-top: 1px solid var(--ds-line);
  }
  .tmw-plan {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
  }
  .tmw-plan-txt {
    font-size: 11.5px;
    color: var(--ds-t2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tmw-remind {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--ds-t2);
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .tmw-remind-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--ds-orange);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.16);
  }
  .tmw-remind-dot.ok {
    background: var(--ds-green);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.16);
  }
  .tmw-acts { display: flex; gap: 8px; flex: 0 0 auto; }
  .tmw-acts .btn { height: 30px; padding: 0 13px; font-size: 12.5px; }
  .cc-console .scan-progress {
    margin-top: 10px;
    padding: 0 4px;
  }
  .cc-console .scan-progress-bar {
    height: 5px;
    border-radius: 999px;
    background: rgba(15,23,42,0.06);
    overflow: hidden;
  }
  .cc-console .scan-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ds-blue), var(--ds-purple));
    transition: width 0.3s ease;
  }
  .cc-console .scan-progress-text {
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--ds-t2);
  }

  /* 布局：评分 | 商标监测（占满右侧整块） */
  .risk-top-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    align-items: stretch;
  }
  @media (max-width: 900px) {
    .risk-top-grid { grid-template-columns: 1fr; }
  }


  @media (max-width: 1100px) { .monitor-grid { grid-template-columns: 1fr; } }
  /* 工作台：窄屏时统计卡与图表列数逐级降下来，别把图表压扁 */
  @media (max-width: 1400px) {
    .stats-grid.dash-stats { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 1180px) {
    .two-col.dash-cols { grid-template-columns: 1fr; }
  }
  @media (max-width: 900px) {
    .stats-grid.dash-stats { grid-template-columns: repeat(2, 1fr); }
    .chart-foot { flex-wrap: wrap; gap: 16px 24px; }
    .dash-settle-note .dsn-hint { margin-left: 0; }
  }
  @media (max-width: 900px) {
    .cc-console { margin: -64px -16px -40px; padding: 16px 16px 30px; }
    .risk-top-grid { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) {
    .cc-dot.ok, .cc-console .monitor-strip .monitor-dot { animation: none; }
  }

  /* ===================== 监控板块：数据卡（一卡一重点） ===================== */
  .monitor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
  }
  .monitor-grid > .monitor-strip { grid-column: 1 / -1; margin: 0; }

  /* 顶部监控条：深色控制台 */
  .monitor-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #1c1c22 0%, #26262f 100%);
    color: #f2f2f7;
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
  }
  .monitor-strip::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,122,255,0.7), rgba(48,209,88,0.7), transparent);
    animation: scan-x 3.6s linear infinite;
  }
  .monitor-strip-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .monitor-strip .monitor-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(16,185,129,0.6);
    animation: pulse-dot 2s infinite;
    flex: 0 0 auto;
  }
  @keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
  }
  .monitor-strip .monitor-title { font-size: 13.5px; font-weight: 600; color: #f2f2f7; }
  .monitor-strip .monitor-sub { font-size: 11.5px; color: rgba(242,242,247,0.62); margin-top: 3px; }
  .monitor-strip .monitor-sub strong { color: #ffb340; }
  .monitor-strip .btn-secondary {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.16);
    color: #f2f2f7;
  }
  .monitor-strip .btn-secondary:hover { background: rgba(255,255,255,0.18); }

  /* ---- 单张监控卡 ---- */
  .mon-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px 14px 20px;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  }
  .mon-card:hover { transform: translateY(-1px); }
  /* 左侧色条：板块身份 */
  .mon-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
  }
  .mon-card.tone-red::before    { background: #ff6b60; }
  .mon-card.tone-orange::before { background: #ffb340; }
  .mon-card.tone-purple::before { background: #c88cff; }
  .mon-card.tone-blue::before   { background: #4da3ff; }
  /* 未扫描的板块打斜纹底：视觉上"还没上岗" */

  .mon-top { display: flex; align-items: center; gap: 8px; }
  .mon-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  }
  .mon-card.tone-red .mon-icon    { background: rgba(255,59,48,0.16);  color: #ff6b60; }
  .mon-card.tone-orange .mon-icon { background: rgba(255,149,0,0.16);  color: #ffb340; }
  .mon-card.tone-purple .mon-icon { background: rgba(175,82,222,0.16); color: #c88cff; }
  .mon-card.tone-blue .mon-icon   { background: rgba(22,119,255,0.10);  color: var(--ds-blue); }

  .mon-title { font-size: 14.5px; font-weight: 700; letter-spacing: 0.01em; }

  /* 运行状态徽标：绿点=在监控，灰点=还没扫 */
  .mon-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 999px;
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
    white-space: nowrap;
  }
  .mon-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
  .mon-badge.is-live i { animation: pulse-dot 2s infinite; }

  .mon-more {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 1px;
    padding: 3px 6px 3px 9px;
    border-radius: 7px; border: none; background: none;
    font: inherit; font-size: 12px; font-weight: 600;
    cursor: pointer;
  }

  .mon-sub { font-size: 12px; line-height: 1.5; margin-top: 2px; }

  /* 主数字：整张卡唯一的重点 */
  .mon-hero {
    display: flex; align-items: center; gap: 14px;
    margin: 10px 0 2px;
    padding: 10px 14px;
    border-radius: 11px;
    border: 1px solid transparent;
    cursor: pointer; font: inherit; text-align: left; width: 100%;
    transition: all 0.18s;
  }
  .mon-hero:hover { filter: brightness(1.06); }
  .mon-hero-n {
    font-size: 40px; font-weight: 800; line-height: 1;
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
    letter-spacing: -0.04em;
    min-width: 44px;
  }
  .mon-hero-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .mon-hero-l { font-size: 13px; font-weight: 700; }
  .mon-hero-hint { font-size: 11.5px; }

  /* 其余分组降级成小标签：数字 0 的直接淡化 */
  .mon-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .mon-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 7px;
    cursor: pointer; font: inherit;
    font-size: 11.5px;
    transition: all 0.16s;
  }
  .mon-chip b {
    font-size: 12px; font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .mon-chip.is-zero b { font-weight: 600; }

  .mon-src {
    margin-top: 10px; padding-top: 9px;
    font-size: 11px; letter-spacing: 0.02em;
  }

  .monitor-list-actions { margin-left: auto; }

  @media (max-width: 1100px) {
    .monitor-grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 900px) {
    .risk-top-grid { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) {
    .monitor-strip::before, .monitor-strip .monitor-dot,
    .mon-badge.is-live i {
      animation: none;
    }
  }

  /* ===================== 抢注线索明细弹窗 ===================== */
  .clue-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 12px;
  }
  .clue-search-row .form-input { max-width: 340px; }
  .clue-search-n { font-size: 12px; color: var(--text-tertiary); }
  .clue-table-wrap { max-height: 56vh; overflow: auto; }
  .clue-table { min-width: 1060px; }

  /* 判定依据列表 */
  .reason-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.9; color: var(--text-secondary); }
  .reason-weight {
    display: inline-block; margin-left: 6px; padding: 0 6px;
    border-radius: 5px; font-size: 11px; font-weight: 700;
    background: rgba(0,0,0,0.06); color: var(--text-secondary);
  }

  .risk-event-title { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
  .risk-event-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

  .risk-action-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    color: var(--text-primary);
  }
  .risk-action-btn:hover { border-color: var(--blue); color: var(--blue); }
  .risk-action-btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
  .risk-action-btn.primary:hover { background: #0066d6; }
  .risk-action-btn.danger { color: var(--red); border-color: rgba(255,59,48,0.3); }
  .risk-action-btn.danger:hover { background: rgba(255,59,48,0.06); }

  /* 实时雷达脉冲动画 */
  .radar-pulse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--green);
  }
  .pulse-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    position: relative;
  }
  .pulse-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--green);
    animation: pulse 2s ease-out infinite;
  }
  @keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
  }

  /* 风险详情弹窗特殊样式 */
  .risk-detail-banner {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .risk-detail-banner.high { background: rgba(255,59,48,0.06); border: 1px solid rgba(255,59,48,0.15); }
  .risk-detail-banner.medium { background: rgba(255,149,0,0.06); border: 1px solid rgba(255,149,0,0.15); }
  .risk-detail-banner.low { background: rgba(175,82,222,0.06); border: 1px solid rgba(175,82,222,0.15); }
  
  .risk-detail-banner-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .risk-detail-banner-icon.high { background: rgba(255,59,48,0.15); color: var(--red); }
  .risk-detail-banner-icon.medium { background: rgba(255,149,0,0.15); color: var(--orange); }
  .risk-detail-banner-icon.low { background: rgba(175,82,222,0.15); color: var(--purple); }
  .risk-detail-banner-icon svg { width: 20px; height: 20px; }

  .risk-detail-banner-text h4 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
  .risk-detail-banner-text p { font-size: 12px; color: var(--text-secondary); }

  .suggestion-box {
    background: rgba(0,122,255,0.04);
    border: 1px solid rgba(0,122,255,0.12);
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 20px;
  }
  .suggestion-box h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .suggestion-box h5 svg { width: 14px; height: 14px; }
  .suggestion-box ul { padding-left: 18px; }
  .suggestion-box li { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

  /* ========== 响应式 ========== */
  @media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .two-col { grid-template-columns: 1fr; }
    .risk-top-grid { grid-template-columns: 1fr; }
    .risk-stats-row { grid-template-columns: 1fr; }
  }

  /* ========== 移动端侧边栏 ========== */
  /* 顶栏移除后，汉堡按钮改成移动端的浮动按钮（侧栏收起时仍可点） */
  .sidebar-toggle {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 101;
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-solid);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
  }
  .sidebar-toggle svg { width: 20px; height: 20px; }
  .sidebar-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    z-index: 99;
  }
  .sidebar-mask.show { display: block; }

  @media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .content { padding: 64px 16px 20px; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-value { font-size: 26px; }
    .risk-stats-row { grid-template-columns: 1fr; }
    .modal-box { width: calc(100vw - 32px) !important; max-height: 92vh; }
    .detail-grid, .form-row { grid-template-columns: 1fr; }
  }

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

  /* ========== 可访问性 & 工具类 ========== */
  .nav-item:focus-visible,
  .btn:focus-visible,
  .icon-btn:focus-visible,
  .filter-tab:focus-visible,
  .row-action:focus-visible,
  .page-btn:focus-visible,
  .risk-action-btn:focus-visible,
  .nav-item { user-select: none; }
  button.nav-item {
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
    text-align: left;
  }
  button.nav-item.active { background: var(--blue); color: #fff; }

  .sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }

  .toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-80px);
    background: #1d1d1f;
    color: #fff;
    padding: 12px 24px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), opacity 0.3s;
    pointer-events: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    opacity: 0;
    max-width: calc(100vw - 32px);
  }
  .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
  .toast.error { background: var(--red); }
  .toast.success { background: #1d1d1f; }

  .empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
  }
  .empty-state svg { width: 36px; height: 36px; opacity: 0.3; margin-bottom: 12px; }

  .badge-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    margin-right: 6px;
  }

  .settings-actions { margin-top: 24px; display: flex; gap: 10px; align-items: center; }
  .settings-saved { font-size: 12px; color: var(--green); font-weight: 500; }

  /* ========== 品牌标签 & 授权详情页 ========== */
  .brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0,0,0,0.04);
    color: var(--text-primary);
    white-space: nowrap;
  }
  .brand-tag .brand-dot {
    width: 8px; height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
  }
  .brand-tag.lg { font-size: 13px; padding: 5px 14px; }

  tbody tr[data-row-id] { cursor: pointer; }

  /* 商标类别数字标签（多类别并排、间距 6px） */
  .class-tags {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  .class-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: rgba(175,82,222,0.08);
    color: #8944ab;
    white-space: nowrap;
    line-height: 1.6;
  }
  .class-tag.lg { font-size: 13px; min-width: 32px; padding: 3px 10px; }

  /* 品牌 + 商标类别 双排单元格（列表内不换行） */
  .cell-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    white-space: nowrap;
  }
  .cell-stack .brand-tag,
  .cell-stack .class-tag { white-space: nowrap; }

  /* 授权列表：单元格内容一律不换行，保证观感，必要时横向滚动 */
  #authorizations tbody td { white-space: nowrap; }

  .page-head-left { display: flex; align-items: center; gap: 16px; }
  .page-head-left h1 { line-height: 1.1; }
  .page-head-left .btn { flex-shrink: 0; }

  /* 去掉页头标题后的操作条（右对齐） */
  .page-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
  }
  @media (max-width: 900px) {
    .page-toolbar { justify-content: flex-start; }
  }

  .detail-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(0,122,255,0.06), rgba(88,86,214,0.06));
    border: 1px solid var(--border);
    margin-bottom: 20px;
  }
  .detail-hero-main { flex: 1; min-width: 0; }
  .detail-hero-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .detail-hero-sub { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
  .detail-hero-meta { display: flex; gap: 28px; margin-top: 14px; flex-wrap: wrap; }
  .detail-hero-meta .m-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 2px; }
  .detail-hero-meta .m-value { font-size: 15px; font-weight: 600; }
  .detail-card-pad { padding: 22px 24px; }
  .detail-wide-bar { width: 100%; height: 6px; margin-top: 10px; }

  @media (max-width: 900px) {
    .detail-hero { flex-direction: column; align-items: flex-start; }
    .page-head-left { flex-wrap: wrap; }
  }

  /* ========== 商标管理 ========== */
  .mono { font-family: 'SF Mono', monospace; font-size: 12px; color: var(--text-secondary); }
  .tm-link {
    background: none; border: none; padding: 0; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 600; color: var(--blue);
  }
  .tm-link:hover { text-decoration: underline; }
  .alert-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--orange); color: #fff; font-size: 11px; font-weight: 700;
    vertical-align: middle;
  }

  .form-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
  .swatch-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
  .swatch {
    width: 30px; height: 30px; border-radius: 8px; padding: 0; cursor: pointer;
    border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
    transition: transform 0.15s, border-color 0.15s;
  }
  .swatch:hover { transform: translateY(-1px); }
  .swatch.active { border-color: var(--text-primary); }
  .check-row {
    display: flex; align-items: center; gap: 10px; margin-top: 18px;
    font-size: 13px; color: var(--text-secondary); cursor: pointer;
  }
  .check-row input { width: 16px; height: 16px; accent-color: var(--blue); }

  .monitor-strip {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 20px; border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(52,199,89,0.07), rgba(52,199,89,0));
  }
  .monitor-strip-left { display: flex; align-items: center; gap: 12px; }
  .monitor-dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 0 4px rgba(52,199,89,0.16); flex-shrink: 0;
  }
  .monitor-title { font-size: 13px; font-weight: 600; }
  .monitor-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

  .tm-detail-icon {
    width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
  }
  .detail-section { margin-top: 22px; }
  .detail-section-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
  .tm-alert-list { display: flex; flex-direction: column; gap: 10px; }
  .tm-alert-item { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: rgba(0,0,0,0.015); }
  .tm-alert-head { display: flex; align-items: center; gap: 10px; font-size: 13px; }
  .tm-alert-date { margin-left: auto; font-size: 12px; color: var(--text-tertiary); }
  .tm-alert-desc { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

  /* ========== 合同附件 ========== */
  .attach-link {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
    background: none; border: none; padding: 0; cursor: pointer;
    font: inherit; font-size: 13px; color: var(--blue);
  }
  .attach-link:hover { text-decoration: underline; }
  .attach-link svg { width: 14px; height: 14px; flex-shrink: 0; }
  .attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

  .file-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border);
    background: rgba(0,0,0,0.015);
  }
  .file-badge {
    width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
    background: rgba(0,122,255,0.1); color: #0055b3;
  }
  .file-info { flex: 1; min-width: 0; }
  .file-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .file-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
  .file-card .btn { flex-shrink: 0; }

  #conAttachment { padding: 8px 10px; }
  .upload-hint { font-size: 12px; color: var(--text-tertiary); }

  /* ========== 页面视图切换（Tab） ========== */
  .page-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(0,0,0,0.045);
    margin-bottom: 20px;
  }
  /* 标签 + 右侧操作按钮同一行（原来各占一行，很空） */
  .page-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .page-head-row .page-tabs { margin-bottom: 0; flex: 0 0 auto; }
  .page-head-row .page-toolbar { margin-bottom: 0; margin-left: auto; }
  .page-head-row .page-toolbar[hidden] { display: none; }
  /* 检索表单宿主：跟标签同一行，占满右侧剩余空间 */
  .page-search-host {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .page-search-host[hidden] { display: none; }
  .page-search-host .tm-search-form { flex: 1 1 auto; min-width: 0; padding-bottom: 0; }
  /* 检索状态：跟在检索栏右边同一行，过长省略且可悬停看全文 */
  .page-search-host .tm-search-status {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 260px;
    padding: 0;
    font-size: 12px;
    white-space: nowrap;
  }
  .page-search-host .tm-search-status > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .page-search-host .tm-search-status .tm-hint { display: inline; }
  /* 页头只有一行空间：下拉框自身已显示「全部分类 / 商标名」，label 收起省 100px */
  .page-search-host .tm-searchbar { flex-wrap: nowrap; }
  .page-search-host .tm-searchbar-field { min-width: 130px; }
  .page-search-host .tm-searchbar-btn { padding: 0 18px; }
  .page-tab {
    border: none;
    background: none;
    cursor: pointer;
    /* 固定 34px：配合 .page-tabs 的 3px 内边距 = 40px，与检索栏等高（切换不跳动） */
    height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.18s;
    white-space: nowrap;
  }
  .page-tab:hover { color: var(--text-primary); }
  .page-tab.active { background: var(--card-solid); color: var(--text-primary); box-shadow: var(--shadow-sm); }

  /* ========== 商标搜索模块 ========== */
  /* 独立检索页：整页锁定视口高度，只有列表容器滚动。
     页面底色刻意压成浅灰（--tm-canvas），让下方三块白卡浮起来 ——
     之前 --bg 本身就是纯白，卡片和背景同色，所有区块糊成一片，
     边框再细也分不出主次。层级靠底色反差，不靠描边。 */
  .tm-search {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px 20px 0;
    gap: 12px;
    --tm-canvas: var(--canvas);
  }

  /* 检索卡片 + 结果卡片：统一的白色面板（同样只描边不投影） */
  .tm-search-card,
  .tm-result-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }

  /* ---- 检索卡片：把检索栏 + 状态提示收成一块白底面板 ---- */
  .tm-search-card {
    flex: 0 0 auto;
    padding: 14px 16px;
  }
  .tm-search-card .tm-search-form { padding-bottom: 0; }
  /* 状态提示跟在检索栏下方，仅在有内容时占位 */
  .tm-search-card .tm-search-status { padding-top: 9px; }

  /* ---- 结果卡片：吃掉剩余高度，内部只有列表滚动 ---- */
  .tm-result-card {
    flex: 1 1 auto;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* 底部只留一点灰，卡片圆角才不会贴死屏幕边缘 */
    margin-bottom: 18px;
  }
  .tm-result-card .tm-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
  .tm-result-card .tm-search-footer {
    flex: 0 0 auto;
    position: static;
    background: var(--card-solid);
    box-shadow: 0 -1px 0 var(--border);
  }

  /* 主检索栏：输入框 + 「商标检索」按钮 */
  /* 搜索栏：分类 + 检索字段 + 输入框 + 按钮，全部同一行
     高度必须等于 .page-tabs（3px 内边距 + 34px 标签 = 40px），切换视图才不会跳动 */
  .tm-searchbar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 4px 0 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-solid);
    transition: border-color 0.18s, box-shadow 0.18s;
  }
  .tm-searchbar:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.12);
  }
  /* 输入框区域：撑满中间剩余空间，左侧一条细分隔线把筛选条件与输入分开 */
  .tm-searchbar-field {
    flex: 1 1 auto;
    min-width: 130px;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding-left: 8px;
    border-left: 1px solid var(--border);
  }
  .tm-searchbar-icon { display: flex; flex-shrink: 0; color: var(--text-tertiary); }
  .tm-searchbar-icon svg { width: 16px; height: 16px; }
  .tm-searchbar-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 34px;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-primary);
  }
  .tm-searchbar-input::placeholder { color: var(--text-tertiary); }
  .tm-searchbar-btn { flex-shrink: 0; height: 32px; padding: 0 16px; border-radius: 8px; font-size: 13px; }

  /* 搜索栏内的筛选条件：无边框无底色，箭头紧贴文字 */
  .tm-extra-field {
    display: inline-flex;
    align-items: center;
    font-size: 12.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .tm-extra-field .form-select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background-color: transparent;
    height: 32px;
    min-width: 0;
    width: auto;
    max-width: 132px;
    padding: 0 15px 0 6px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 7px;
    /* 下拉箭头：紧贴文字右侧 */
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8e' stroke-width='3' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1px center;
    background-size: 10px 10px;
  }
  .tm-extra-field .form-select:hover { background-color: rgba(0,0,0,0.05); }
  .tm-extra-field .form-select:focus { outline: 0; box-shadow: 0 0 0 2px rgba(0,122,255,0.18); }
  .tm-extra-label { display: none; }
  .tm-opt { font-size: 11px; color: var(--text-tertiary); font-weight: 400; }

  .tm-search-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid var(--border);
  }
  .tm-search-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .tm-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .tm-source select {
    border: 1px solid var(--border);
    background: var(--card-solid);
    border-radius: 7px;
    padding: 4px 8px;
    font: inherit;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
  }

  .tm-search-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    min-height: 20px;
    color: var(--text-secondary);
  }
  .tm-search-status[data-kind="busy"] { color: var(--blue); }
  .tm-search-status[data-kind="ok"] { color: var(--green); }
  .tm-search-status[data-kind="warn"] { color: #c77800; }
  .tm-search-status[data-kind="error"] { color: var(--red); }
  .tm-hint { color: var(--text-tertiary); font-size: 12px; }
  .tm-spinner {
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    display: inline-block;
    animation: tmSpin 0.7s linear infinite;
    flex-shrink: 0;
  }
  @keyframes tmSpin { to { transform: rotate(360deg); } }

  .filter-count { margin-left: 5px; opacity: 0.65; font-weight: 500; }
  .filter-tab.active .filter-count { opacity: 0.9; }

  /* ===================== 搜索结果：整页锁定视口，只让列表容器滚动 ===================== */
  /* 搜索视图下把商标管理页锁成视口高度 → 页面滚动条消失，列表内部滚动
     （顶部页头已移除，只剩 .content 的上下 28px 内边距） */
  #trademarks.tm-fixed-view {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
    overflow: hidden;
  }
  #trademarks.tm-fixed-view .page-head-row { flex: 0 0 auto; }
  #trademarks.tm-fixed-view [data-tm-panel="search"] {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  /* 把 flex 链一路贯通到 .tm-search，否则列表容器拿不到可分配高度 */
  #trademarks.tm-fixed-view [data-tm-panel="search"] > .card,
  #trademarks.tm-fixed-view #trademarkSearchRoot {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  #trademarks.tm-fixed-view .tm-search-form { flex: 0 0 auto; }
  #trademarks.tm-fixed-view .tm-search-meta { flex: 0 0 auto; }
  #trademarks.tm-fixed-view .tm-filter-row { flex: 0 0 auto; }
  /* 内嵌时把「商标管理页白色外壳」压成同样的灰底，白卡才有对比 */
  #trademarks.tm-fixed-view [data-tm-panel="search"] > .card,
  #trademarks.tm-fixed-view #trademarkSearchRoot > .tm-search {
    background: var(--canvas);
    padding: 14px 16px 0;
    border-radius: var(--radius-lg);
  }
  #trademarks.tm-fixed-view .tm-result-card {
    flex: 1 1 auto;
    min-height: 200px;
  }
  #trademarks.tm-fixed-view .tm-table-wrap { flex: 1 1 auto; min-height: 140px; max-height: none; }
  #trademarks.tm-fixed-view .tm-search-footer { flex: 0 0 auto; }

  /* 表格自身滚动（横向 + 纵向），滚动条与「加载更多」都留在可视区内 */
  .tm-table-wrap {
    max-height: max(320px, calc(100vh - 430px));
    overflow: auto;
  }
  .tm-result-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    /* 表头一层极浅的暖灰，和白色内容区分开一档，
       不用描边也能看出「这一行是列名」 */
    background: #faf8f6;
    box-shadow: inset 0 -1px 0 var(--border);
  }
  /* 操作列吸附在右侧：横向滚动时「加入商标库」始终可见，不会被右边界切掉 */
  .tm-result-table th:last-child,
  .tm-result-table td:last-child {
    position: sticky;
    right: 0;
    background: var(--card-solid);
    box-shadow: -10px 0 10px -10px rgba(0,0,0,0.14);
  }
  /* 表头那一格要跟其他表头同色，否则吸附位会露出一条白缝 */
  .tm-result-table th:last-child { background: #faf8f6; }
  .tm-result-table td:last-child { text-align: right; }
  .tm-search-footer {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: var(--card-solid);
    box-shadow: 0 -1px 0 var(--border);
  }
  /* 状态筛选标签上的语义色圆点 */
  .tm-stat-tab { position: relative; padding-left: 20px; }
  .tm-stat-tab::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 50%;
    margin-top: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
  }
  .tm-stat-dot-ok::before    { background: #10b981; opacity: 1; }
  .tm-stat-dot-wait::before  { background: #e8590c; opacity: 1; }
  .tm-stat-dot-bad::before   { background: #ef4444; opacity: 1; }
  .tm-stat-dot-other::before { background: #f59e0b; opacity: 1; }
  .tm-stat-dot-muted::before { background: #9ca3af; opacity: 1; }
  .tm-status-filter .filter-tab,
  .tm-class-filter .filter-tab { white-space: nowrap; }

  /* ===== 分类筛选：收成一个下拉，点开列出每个类别及数量 ===== */
  .tm-dd { position: relative; flex: 0 0 auto; }
  .tm-dd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-solid);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
  }
  .tm-dd-btn:hover { background: rgba(0,0,0,0.035); }
  .tm-dd.open .tm-dd-btn { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.12); }
  .tm-dd-count {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(0,122,255,0.1);
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
  }
  .tm-dd-caret { width: 12px; height: 12px; color: var(--text-tertiary); transition: transform 0.18s; }
  .tm-dd.open .tm-dd-caret { transform: rotate(180deg); }
  .tm-dd-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    min-width: 172px;
    max-width: 280px;
    max-height: 300px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-solid);
    box-shadow: var(--shadow-lg);
  }
  .tm-dd-panel[hidden] { display: none; }
  .tm-dd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: none;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
  }
  .tm-dd-item:hover { background: rgba(0,0,0,0.05); }
  .tm-dd-item.active { background: rgba(232,89,12,0.1); color: var(--blue); font-weight: 700; }
  .tm-dd-item-n { font-size: 11.5px; color: var(--text-tertiary); font-weight: 600; }
  .tm-dd-item.active .tm-dd-item-n { color: var(--blue); }
  /* 状态条目左侧的语义色圆点，位置靠内缩进，不挤文字 */
  .tm-dd-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: 0 0 auto;
    margin-right: -6px;
    background: #9ca3af;
  }
  .tm-dd-dot.tm-stat-dot-ok    { background: #10b981; }
  .tm-dd-dot.tm-stat-dot-wait  { background: #e8590c; }
  .tm-dd-dot.tm-stat-dot-bad   { background: #ef4444; }
  .tm-dd-dot.tm-stat-dot-other { background: #f59e0b; }
  .tm-dd-dot.tm-stat-dot-muted { background: #9ca3af; }
  .tm-thumb {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
  }
  .tm-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
  .tm-thumb:empty::after,
  .tm-thumb-failed::after { content: '—'; color: var(--text-tertiary); font-size: 12px; }
  a.tm-thumb:hover { border-color: var(--blue); }

  .tm-result-table { min-width: 1140px; }

  /* ---- 空状态：图标 + 主副文案，垂直居中占满列表区 ----
     空时不再是一条扁扁的灰字，而是列表区正中间的一组提示，
     和截图一致：留白撑满，文案不挤在顶部。 */
  .tm-empty-row td { padding: 0 !important; }
  .tm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 420px;
    padding: 48px 24px;
    text-align: center;
  }
  .tm-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(232, 89, 12, 0.08);
    color: var(--blue);
  }
  .tm-empty-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
  }
  .tm-empty-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    max-width: 420px;
    line-height: 1.7;
  }
  /* 序号列：窄、居中、等宽数字，方便一眼数到第几条 */
  .tm-seq-col { width: 52px; }
  .tm-seq {
    width: 52px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
  }
  .tm-name { font-weight: 600; }
  .tm-agency { font-size: 12px; color: var(--text-secondary); }

  /* ===== 状态彩色标签：一眼区分已注册 / 注册中 / 已驳回 / 未收录 ===== */
  .tm-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    border: 1px solid transparent;
  }
  .tm-stat-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
  .tm-stat-ok     { color: #0a8f4d; background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.25); }
  .tm-stat-wait   { color: #0a6ecb; background: rgba(0,122,255,0.11);  border-color: rgba(0,122,255,0.24); }
  .tm-stat-bad    { color: #c62828; background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.25); }
  .tm-stat-muted  { color: #6b7280; background: rgba(0,0,0,0.055);     border-color: rgba(0,0,0,0.09); }
  .tm-stat-other  { color: #a1600a; background: rgba(245,158,11,0.13); border-color: rgba(245,158,11,0.26); }

  /* ===== 快速筛选：左侧研判等级，右侧状态下拉 + 分类下拉 ===== */
  /* 筛选行也做成白卡，与检索卡 / 结果卡同一套语言，
     三张白卡浮在灰底上，层级一眼分得开 */
  .tm-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
    flex: 0 0 auto;
    padding: 9px 14px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
  /* 等级标签组：去掉原来的灰底药丸，改为「激活项橙底、其余透明」 */
  .tm-filter-row .filter-tabs {
    background: none;
    padding: 0;
    gap: 6px;
    border-radius: 0;
  }
  .tm-filter-row .filter-tab {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .tm-filter-row .filter-tab:hover {
    background: rgba(0, 0, 0, 0.045);
    color: var(--text-primary);
  }
  /* 激活项：主题橙淡底 + 橙字，和右侧「商标检索」主按钮同色系，
     主次一眼可辨（之前是纯白底 + 黑字，跟旁边按钮不搭） */
  .tm-filter-row .filter-tab.active {
    background: rgba(232, 89, 12, 0.1);
    color: var(--blue);
    font-weight: 600;
    box-shadow: none;
  }
  .tm-filter-row .filter-tab.active .filter-count { color: var(--blue); opacity: 0.75; }
  /* 右侧两个下拉靠右并排，间距固定，不被左侧标签数量挤走 */
  .tm-filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
  }
  .tm-filter-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
    flex: 0 0 auto;
    margin: 0 2px;
  }
  .tm-status-filter { flex-wrap: wrap; }
  .tm-stat-tab { white-space: nowrap; }
  .tm-more-btn {
    width: auto;
    min-width: 0;
    height: 32px;
    padding: 0 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--blue);
    background: rgba(0,122,255,0.08);
    border: 1px solid rgba(0,122,255,0.22);
    border-radius: 999px;
    white-space: nowrap;
  }
  .tm-more-btn:hover { background: rgba(0,122,255,0.15); }
  .tm-more-btn:disabled { opacity: 0.55; cursor: default; }
  .tm-in-lib { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; }
  .tm-add-btn { padding: 5px 12px; font-size: 12px; white-space: nowrap; }

  .class-chips { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
  .class-chip {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; padding: 1px 6px; border-radius: 6px;
    background: rgba(0,122,255,0.08); color: #0055b3;
    font-size: 11px; font-weight: 600;
  }

  .tm-lv { display: inline-flex; gap: 6px; margin-left: 6px; align-items: center; }
  .tm-lv-label { font-size: 11px; color: var(--text-tertiary); }
  .tm-page-text { font-size: 12px; color: var(--text-secondary); padding: 0 6px; }

  /* 疑似抢注标签 */
  .susp-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 980px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
    cursor: help;
  }
  .susp-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
  .susp-score { font-weight: 700; opacity: 0.85; }
  .susp-high { background: rgba(255,59,48,0.1); color: #c41e3a; }
  .susp-medium { background: rgba(255,149,0,0.12); color: #c77800; }
  .susp-low { background: rgba(175,82,222,0.1); color: #8944ab; }
  .susp-normal { background: rgba(52,199,89,0.1); color: #248a3d; }
  .susp-normal .susp-score { display: none; }

  @media (max-width: 900px) {
    .tm-search { padding: 16px 16px 0; }
    .tm-searchbar { flex-wrap: wrap; height: auto; padding: 10px; }
    .tm-searchbar-field {
      flex: 1 1 100%;
      min-width: 0;
      padding: 8px 0 0;
      border-left: 0;
      border-top: 1px solid var(--border);
    }
    .tm-searchbar-btn { flex: 1 1 100%; }
    .page-search-host { flex: 1 1 100%; }
    .page-search-host .tm-search-status { max-width: none; }
    /* 窄屏恢复整页滚动，避免小屏只剩一小条列表 */
    #trademarks.tm-fixed-view { height: auto; overflow: visible; }
    #trademarks.tm-fixed-view .tm-table-wrap { max-height: 70vh; min-height: 0; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
    }
  }

  /* ==========================================================================
     账号 / 登录
     ========================================================================*/

  /* ---- 通用加载指示 ---- */
  .spinner {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid var(--blue);
    border-top-color: transparent;
    display: inline-block; flex-shrink: 0;
    animation: brandSpin 0.7s linear infinite;
  }
  .spinner-lg { width: 26px; height: 26px; border-width: 3px; }
  @keyframes brandSpin { to { transform: rotate(360deg); } }

  .auth-form-error {
    background: rgba(255,59,48,0.08);
    color: #c41e3a;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 12px;
  }

  /* ---- 启动门禁：校验通过前不渲染应用外壳，避免内容闪现 ---- */
  body[data-auth="pending"] .sidebar,
  body[data-auth="pending"] .main,
  body[data-auth="pending"] .sidebar-mask { visibility: hidden; }

  .auth-splash {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    padding: 24px;
  }
  body[data-auth="ready"] .auth-splash { display: none; }

  .auth-splash-card {
    max-width: 520px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 28px 30px;
    text-align: center;
  }
  .auth-splash-card > p { font-size: 13px; color: var(--text-secondary); margin: 12px 0 0; }
  .auth-splash-icon {
    width: 38px; height: 38px; margin: 0 auto;
    border-radius: 50%;
    background: rgba(255,59,48,0.1); color: var(--red);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700;
  }
  .auth-splash-card h2 { font-size: 17px; font-weight: 700; margin-top: 12px; }
  .auth-splash-msg { font-size: 13px !important; color: var(--text-secondary); margin-top: 8px !important; text-align: left; }
  .auth-splash-tips { text-align: left; margin: 12px 0 18px; padding-left: 18px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.9; }
  .auth-splash-card code,
  .login-foot code {
    background: rgba(0,0,0,0.05);
    padding: 1px 5px; border-radius: 5px;
    font-size: 11.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  }

  /* ---- 登录页 ---- */
  .login-body {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background:
      radial-gradient(1100px 560px at 12% -10%, rgba(0,122,255,0.10), transparent 60%),
      radial-gradient(900px 520px at 92% 108%, rgba(88,86,214,0.10), transparent 60%),
      var(--bg);
  }
  .login-wrap { width: 100%; max-width: 430px; }
  .login-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 32px;
  }
  .login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
  .login-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
  .login-sub { font-size: 13px; color: var(--text-secondary); margin: 6px 0 22px; line-height: 1.6; }
  .login-submit { width: 100%; height: 44px; margin-top: 4px; }
  .login-foot {
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 12px; color: var(--text-tertiary); line-height: 1.9;
  }
  .login-loading { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
  .login-fatal { text-align: center; }
  .login-fatal h2 { font-size: 17px; font-weight: 700; margin-top: 12px; }
  .login-fatal > p { font-size: 13px; color: var(--text-secondary); margin-top: 8px; text-align: left; line-height: 1.7; }
  .login-copy { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-tertiary); }

  /* ---- 侧边栏用户菜单 ---- */
  .sidebar-footer {
    position: relative;
    display: block;
    padding: 12px;
  }
  .user-menu-note {
    font-size: 11.5px;
    color: var(--text-tertiary);
    padding: 8px 12px 9px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
  }
  .user-menu-note[data-kind="ok"] { color: var(--green); }
  .user-menu-note[data-kind="warn"] { color: #c77800; }
  .user-menu-note[data-kind="error"] { color: var(--red); }
  .app-version {
    font-size: 11px;
    color: var(--text-tertiary);
    padding: 0 2px 6px;
    letter-spacing: 0.02em;
  }
  .sidebar-user {    width: 100%;
    display: flex; align-items: center; gap: 10px;
    background: none; border: none; cursor: pointer;
    font: inherit; text-align: left;
    padding: 8px 10px; border-radius: 10px;
    transition: background 0.18s;
  }
  .sidebar-user:hover { background: rgba(0,0,0,0.045); }
  .sidebar-user .user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .user-caret { width: 14px; height: 14px; color: var(--text-tertiary); flex-shrink: 0; }

  .user-menu {
    position: absolute;
    left: 12px; right: 12px;
    bottom: calc(100% - 4px);
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 200;
    animation: fadeUp 0.16s ease;
  }
  .user-menu-item {
    display: block; width: 100%;
    background: none; border: none; cursor: pointer;
    font: inherit; font-size: 13px;
    text-align: left;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-primary);
  }
  .user-menu-item:hover { background: rgba(0,0,0,0.045); }
  .user-menu-item.danger { color: var(--red); }

  /* 悬停：只放大并点亮，不暂停任何动画。
     雷达必须始终在转 —— 悬停是为了看清/点开，不是为了「定格」，
     一旦暂停扫描就失去了雷达的语义。 */
  .rc-target:hover { scale: 1.08; opacity: 1; }
  .rc-core:hover { scale: 1.06; }
/* ===== 开庭公告：卡片列表 =====
   手机端那种「一条一卡」样式，案号做成主标题，下方逐行展示案由/原告/被告/法院/开庭时间。
   卡片渲染在 table 外的独立容器里，不能塞进 tbody。 */
.monitor-cards { display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.monitor-cards[hidden] { display: none; }
.mon-card {
  position: relative; display: block; width: 100%; text-align: left;
  background: var(--ds-card); border: 1px solid var(--ds-line);
  border-radius: 10px; padding: 12px 34px 12px 14px;
  cursor: pointer; font: inherit; transition: border-color .15s, background .15s;
}
.mon-card:hover { border-color: var(--ds-blue); background: rgba(22,119,255,.04); }
.mon-card::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--ds-blue);
}
.mon-card.sev-high::before { background: var(--ds-red); }
.mon-card.sev-medium::before { background: var(--ds-orange); }
.mon-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.mon-card-no {
  font-size: 13.5px; font-weight: 700; color: var(--ds-blue);
  font-family: var(--mono); letter-spacing: -.01em;
}
.mon-card-arrow { position: absolute; right: 13px; top: 50%; translate: 0 -50%; font-size: 18px; color: var(--ds-t3); }
.mon-card-row { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.65; }
.mon-card-k { color: var(--ds-t3); flex: 0 0 62px; }
.mon-card-v {
  color: var(--ds-t2); flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 庭次时间线：详情里按时间排开，同案号多个庭次都能看到 */
.hearing-timeline { display: flex; flex-direction: column; gap: 0; padding-left: 6px; }
.hearing-tl-item {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 8px 0 8px 18px; font-size: 12.5px;
}
.hearing-tl-item::before {
  content: ""; position: absolute; left: 4px; top: 0; bottom: 0;
  width: 1px; background: var(--ds-line);
}
.hearing-tl-item:first-child::before { top: 50%; }
.hearing-tl-item:last-child::before { bottom: 50%; }
.hearing-tl-dot {
  position: absolute; left: 0; top: 50%; translate: 0 -50%;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ds-card); border: 2px solid var(--ds-t3);
}
.hearing-tl-item.is-current .hearing-tl-dot { border-color: var(--ds-blue); background: var(--ds-blue); }
.hearing-tl-time { font-family: var(--mono); color: var(--ds-t2); font-variant-numeric: tabular-nums; }
.hearing-tl-label { color: var(--ds-t3); }
.hearing-tl-room { color: var(--ds-t3); font-size: 11.5px; }

/* 开庭公告数据来源标识：让用户一眼分清「实时接口」还是「未配置」，
   避免把演示数据当成真实风险看。 */
.rc-live {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ds-t3);
  margin: -8px 0 8px; flex: 0 0 auto;
}
.rc-live[hidden] { display: none; }
.rc-live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ds-t3); flex: 0 0 auto;
}
.rc-live.is-live { color: var(--ds-green); }
.rc-live.is-live::before { background: var(--ds-green); box-shadow: 0 0 6px var(--ds-green); }
.rc-live.is-off { color: var(--ds-orange); }
.rc-live.is-off::before { background: var(--ds-orange); }

/* 独占显示：仅「公司主体详情」弹窗打开时生效，隐藏页面与导航。
   ★ 不能用 modal-open —— 那会让「公司主体监测」等普通弹窗打开时
     也把导航和底层页面一起藏掉，那是错的。只有详情弹窗才需要独占。 */
body.modal-exclusive .page { visibility: hidden; }

/* 下层弹窗在详情页独占时不可见 */
body.modal-exclusive .modal-mask.show:not(.is-top) { visibility: hidden; }

body.modal-exclusive .sidebar,
body.modal-exclusive .sidebar-mask,
body.modal-exclusive .sidebar-toggle { visibility: hidden; }


/* 弹窗声明式隐藏底层指定区块。
   「公司主体监测」弹窗（monitorListModal，index.html 里标了 data-hide-behind="rs-set"）
   打开时，风控中心底部的扫描计划条（未启用 / 覆盖93件 / 设置计划 / 立即扫描）
   会从遮罩后面透出来，很像残留状态。这里按声明精确隐藏，不影响导航和其他区块。 */
body.hide-rs-set .rs-set { visibility: hidden; }

/* 详情弹窗独占时，底层元素淡出而不是瞬间消失。
   原来只有 visibility:hidden，元素「啪」一下就没了，看着像卡顿/出错。
   做法：给这些元素加 opacity+visibility 过渡，隐藏态同时降透明度，
   visibility 在过渡结束后才真正生效（否则元素立即失去命中，动画被截断）。 */
.sidebar,
.sidebar-mask,
.sidebar-toggle,
.page { transition: opacity .2s ease, visibility .2s ease; }

body.modal-exclusive .page,
body.modal-exclusive .sidebar,
body.modal-exclusive .sidebar-mask,
body.modal-exclusive .sidebar-toggle {
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
}

/* 淡出后再淡入回来，关闭详情时不留残影 */
body:not(.modal-exclusive) .page.active { transition: opacity .2s ease, visibility 0s; }

/* ===== 商标检索：全屏独立模式 =====
   标记由 head 内联脚本在首帧前打到 <html> 上（见 index.html），
   所以侧边栏从第一帧起就不参与布局，不会出现「先显示再消失」。
   挂在 html 上是为了盖住 body[data-auth] 那条规则的同级覆盖。 */
html[data-tm-standalone="1"] .sidebar,
html[data-tm-standalone="1"] .sidebar-mask,
html[data-tm-standalone="1"] .sidebar-toggle { display: none !important; }
html[data-tm-standalone="1"] .main { margin-left: 0 !important; width: 100% !important; }
/* 独立模式下检索页就是主内容：默认显示，不等 switchPage 补 class */
html[data-tm-standalone="1"] #tm-search {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 100vh;
  padding: 20px 20px 0;
}
/* 灰底必须铺到最外层：#tm-search 的背景只覆盖自己的盒子，
   外层 .content 的内边距区若仍是别的颜色，会在四周留下一圈色差。 */
html[data-tm-standalone="1"] body,
html[data-tm-standalone="1"] .main,
html[data-tm-standalone="1"] .content {
  background: var(--canvas);
}
/* .content 的内边距由 #tm-search 自己接管，避免两层内边距叠成更宽的白圈 */
html[data-tm-standalone="1"] .content { padding: 0; }
/* 页面本身不滚动：结果卡吃掉剩余高度，只有内部列表滚 */
html[data-tm-standalone="1"] body,
html[data-tm-standalone="1"] .main { overflow: hidden; }
/* 把 flex 链一路贯通到结果卡片，表格才能吃掉剩余高度（截图里表格一直撑到屏幕底部） */
html[data-tm-standalone="1"] #tmSearchRoot {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
html[data-tm-standalone="1"] .tm-search { flex: 1 1 auto; min-height: 0; }
html[data-tm-standalone="1"] .tm-result-card {
  flex: 1 1 auto;
  min-height: 320px;
  max-height: none;
}
/* 内嵌模式仍然要靠 .active 才显示，这里显式还原，避免上面的规则泄漏 */
html:not([data-tm-standalone="1"]) #tm-search { display: none; }
html:not([data-tm-standalone="1"]) #tm-search.active { display: block; }

/* ===== 风控中心：锁定视口高度，消除右侧滚动条 =====
   原先 .risk-stage 写的是 min-height: calc(100vh - 150px)，
   150 是估算的页头高度，页头滚动条移除后与实际内边距对不上，
   于是总高度比视口多出几十像素 → 出现右侧滚动条。
   这里改成 flex 链贯通到视口，高度由布局算出来，不再靠猜。
   切换到主体 / 诉讼等页面时，各页容器高度一致，雷达不会跳。 */
#risk-radar {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  overflow: hidden;
}
#risk-radar .cc-console {
  /* 原来这里有负边距 margin:-28px -32px -40px，是当初配合页头条做的出血布局。
     页头条移除后没人抵消它，内容被推出视口上下边界之外，被 overflow:hidden 裁掉。
     改成 margin:0 取消负边距；留白统一交给外层 .content(28px 32px)，
     这里不再额外加 padding，否则两层叠加会多出 48px/64px 的空白带。 */
  margin: 0;
  padding: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
/* 覆盖上面那条 min-height: calc(100vh - 150px)，改由 flex 分配 */
#risk-radar .risk-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
#risk-radar .rs-info,
#risk-radar .rs-cloud { min-height: 0; }
/* 雷达区跟着容器伸缩，不再是写死的 432px */
#risk-radar .rs-cloud { display: flex; flex-direction: column; }
#risk-radar .rs-cloud .rc-bubbles {
  flex: 1 1 auto;
  height: auto;
  min-height: 260px;
}
#risk-radar .rp-head,
#risk-radar .rs-set { flex: 0 0 auto; }

/* ===== 修复：ID 选择器压过了 .page 的隐藏规则 =====
   .page 的隐藏靠 `.page { display:none }`，特异性只有 (0,1,0)；
   而上一轮加的 `#risk-radar { display:flex }` 是 (1,0,0)，直接压过它。
   结果：不管有没有 .active 类，风控中心都常驻显示，
   于是串到「授权合同」等页面下方，出现两个页面同时可见。
   这里补一条同特异性的排除规则，把非激活态重新藏回去。 */
#risk-radar:not(.active) { display: none; }

/* 双保险：页面切换期间若存在多个 .page.active，同样只显示当前 state.page */
.page:not(.active) { display: none !important; }


/* 雷达区头部右侧：原页头条移除后，时间与系统状态移到这里。
   排版要点：标题在左，右侧三件套靠右对齐，中间用 margin-left:auto 顶开；
   时间用等宽数字（tabular-nums），秒数跳动时不会左右抖动。 */
.rp-head-right {
  display: inline-flex; align-items: center; gap: 14px;
  margin-left: auto;
}
.rp-head-right .cmd-stat { font-size: 11.5px; color: var(--ds-t2); }
.rp-head-right .cmd-clock {
  font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .04em;
  color: var(--ds-t1); font-variant-numeric: tabular-nums;
}
.rp-head-right .cmd-dot.ok {
  background: var(--ds-green);
  box-shadow: 0 0 0 3px rgba(16,185,129,.16);
  animation: pulse-dot 2s infinite;
}
.rp-head-right .rp-tag { flex: 0 0 auto; }

/* 窄屏：右侧三件套换行，避免和标题挤在一起 */
@media (max-width: 900px) {
  .rp-head { flex-wrap: wrap; gap: 8px; }
  .rp-head-right { margin-left: 0; width: 100%; justify-content: flex-start; gap: 10px; }
}

/* 定时刷新弹窗内的排版：原来是页面上的卡片，搬进弹窗后需要收敛留白 */
#schedModal .sched-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
#schedModal .sched-title { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
#schedModal .sched-body { display: flex; flex-direction: column; gap: 16px; }
#schedModal .sched-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
#schedModal .modal-content { max-height: 66vh; overflow-y: auto; }

/* 定时刷新开关关闭时，配置区仍可见但整体降透明度，
   表达「当前未启用」而不是「这里没有设置」。 */
#schedModal .sched-body.is-off > *:not(.sched-todo):not(.sched-cron) { opacity: .55; }
#schedModal .sched-body.is-off { opacity: 1; }

/* ===== 公司主体页：表格撑满剩余高度，分页器固定在底部 =====
   之前主体页没有 table-footer，列表一次性铺开、卡片按内容收缩，
   下方留一大片空白。现在补齐分页器并让卡片占满页面剩余高度。 */
#entities > .card:last-of-type {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
#entities > .card:last-of-type .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
/* 分页器固定在卡片底部，不随表格滚动 */
#entities > .card:last-of-type .table-footer {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
}

/* ===== 公司主体页：撑满视口高度，分页器固定底部（修正） =====
   上一版只给卡片写了 flex:1，但 #entities 自身是 display:block，
   卡片根本没有可分配的高度，规则等于没写 —— 所以卡片仍按内容收缩、下方留白。
   这里把 #entities 本身改成纵向 flex 容器并锁定视口高度，
   内部的页头、统计卡固定高，表格卡片吃掉全部剩余高度。 */
#entities {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  min-height: 0;
  overflow: hidden;
}
#entities > .page-head-row,
/* 覆盖上一版的选择器：直接锁定表格卡片 */
#entities > .card:last-of-type {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#entities > .card:last-of-type .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#entities > .card:last-of-type .table-footer {
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid var(--border);
}

/* ===== 授权合同页：撑满视口高度，分页器固定底部 =====
   与公司主体页同一套结构。#entities 的写法不能直接复用，
   因为这里的表格卡片外面还包了一层 .card-header，
   所以要用 > .card 而不是 :last-of-type 之外的选择器。 */
#contracts {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  min-height: 0;
  overflow: hidden;
}
#contracts > .page-toolbar,
#contracts > .stats-grid { flex: 0 0 auto; }
#contracts > .card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#contracts > .card .card-header { flex: 0 0 auto; }
#contracts > .card .table-wrap { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
#contracts > .card .table-footer {
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid var(--border);
}

/* 授权列表：合同附件单元格。有合同显示文件名可点开预览，无合同显示上传入口 */
/* 附件列：纯图标按钮。
   文件名「授权合同-AUTH-2026-012.pdf」又长又占宽，缩成图标后
   整行能多留出空间给内容列；完整文件名放在 title 上悬停可见。 */
.ent-attach {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
  border: none; background: none; color: var(--text-secondary);
  transition: all .15s;
}
.ent-attach svg { width: 16px; height: 16px; }
.ent-attach:hover { background: rgba(0,0,0,0.06); color: var(--blue); }
.ent-upload {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
  border: 1px dashed var(--border); background: transparent; color: var(--text-tertiary);
  transition: all .15s;
}
.ent-upload svg { width: 15px; height: 15px; }
.ent-upload:hover { border-color: var(--blue); color: var(--blue); background: rgba(0,0,0,0.03); }
/* 键盘可达：图标按钮没有文字，必须给出可见焦点环 */
.ent-attach:focus-visible,
.ent-upload:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

/* 合同附件预览弹窗 */
.cp-meta { display: flex; flex-direction: column; gap: 9px; }
.cp-row { display: flex; align-items: baseline; gap: 12px; font-size: 13px; }
.cp-row span { flex: 0 0 68px; color: var(--text-tertiary); }
.cp-row b { font-weight: 600; color: var(--text-primary); }
.cp-img { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cp-img img { display: block; width: 100%; max-height: 52vh; object-fit: contain; }
.cp-tip {
  margin-top: 14px; padding: 22px; text-align: center; font-size: 12.5px;
  color: var(--text-tertiary); background: rgba(0,0,0,0.03); border-radius: 10px;
}
.cp-acts { margin-top: 16px; display: flex; gap: 10px; justify-content: flex-end; }

/* ===== 表格紧凑化 + 附件列修复 =====
   1) 附件列改为纯图标按钮，尺寸约束已写在 .ent-attach / .ent-upload 里。
   2) 各表格单元格左右内边距 24px 太宽，13 列并排时横向不够用，
      统一收紧到 12px，行高也从 16px 收到 13px，一屏能多看几行。 */

table th, table td { padding-left: 12px; padding-right: 12px; }
table th { padding-left: 12px; padding-right: 12px; }
table td { padding-top: 9px; padding-bottom: 9px; }

/* 列宽收紧：把宽度让给内容列，减少无谓换行。
   授权列表现在是 10 列：
   1 授权编号 / 2 授权渠道 / 3 品牌·商标类别 / 4 被授权方 / 5 授权类型
   6 授权期限 / 7 剩余时间 / 8 状态 / 9 附件 / 10 操作 */
.table-wrap table { width: 100%; }
#authorizations th:nth-child(1) { white-space: nowrap; }
#authorizations th:nth-child(2) { width: 108px; }
#authorizations th:nth-child(5) { width: 88px; }
#authorizations th:nth-child(7) { width: 118px; }
#authorizations th:nth-child(8) { width: 76px; }
/* 附件列改成图标后不需要 104px，给内容列腾出来 */
#authorizations th:nth-child(9) { width: 52px; }
/* 操作列收进「更多」菜单后只剩一个按钮 */
#authorizations th:nth-child(10) { width: 56px; }

/* ===== 授权列表：撑满视口高度，分页器固定底部 =====
   与公司主体页、合同页同一套结构。
   ★ 长期规则：外框高度是锁定项。改表格内容（增删列、收紧间距、
     换字体）只允许在框内调整，不允许让外框变矮。
     任何列表页都必须把剩余高度吃满，分页器贴在底部。 */
#authorizations {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  min-height: 0;
  overflow: hidden;
}
#authorizations > .page-toolbar { flex: 0 0 auto; }
#authorizations > .card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#authorizations > .card .card-header { flex: 0 0 auto; }
#authorizations > .card .table-wrap { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
/* 分页器固定在卡片底部，不随表格滚动 */
#authorizations > .card .table-footer {
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid var(--border);
}

/* 雷达区标题「全域扫描区」已移除，rp-head 变成纯右侧状态条，
   补左内边距并让右侧三件套与雷达图保持边距，不再贴边。 */
#risk-radar .rp-head {
  justify-content: flex-end;
  padding-right: 10px;
  margin-bottom: 2px;
}

/* 主体页分页条：左操作按钮 + 「共 N 家」合计 + 翻页器，整体靠右一行排开。
   合计文字在翻页器【前面】。按钮用 btn-sm 缩小，避免和翻页器挤在右侧把分页条撑高。 */
#entities .table-footer-aside {
  display: flex;
  align-items: center;
  /* ★ 必须显式覆盖 .table-footer 的 space-between：
     继承下来会把「合计」均分到中间，不与翻页器相邻。 */
  justify-content: flex-start;
  gap: 16px;
  /* 翻页器不要贴右边框，留出内边距 */
  padding-right: 16px;
}
#entities .table-footer-aside .ent-actions {
  order: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  /* auto 外边距把按钮簇顶到最左，剩余空间自动让给右侧的合计与翻页器 */
  margin-right: auto;
}
#entities .table-footer-aside .table-footer-info {
  order: 2;
  margin: 0;
  white-space: nowrap;
}
#entities .table-footer-aside .page-btns { order: 3; }
/* 按钮缩小：图标 + 小字号，适配分页条高度 */
#entities .ent-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
  gap: 4px;
}
#entities .ent-actions .btn svg { width: 13px; height: 13px; vertical-align: -2px; }

/* 授权列表分页条与公司主体页同一套形式：
   左侧操作按钮（靠左）、中间自动留白、右侧「共 N 条」合计 + 翻页器（距边框 16px）。 */
#authorizations .table-footer-aside {
  justify-content: flex-start;   /* 同上，覆盖 space-between */
  gap: 16px;
  padding-right: 16px;
}
#authorizations .table-footer-aside .table-footer-info {
  order: 2; margin: 0; white-space: nowrap;
}
#authorizations .table-footer-aside .page-btns { order: 3; }

/* ============================================================
   * 结算管理
   * ========================================================== */
#settlement .page-head { margin-bottom: 16px; }
.set-stats { margin-bottom: 16px; }
.set-stats .stat-card { gap: 8px; }
.set-stats .stat-value { font-size: 25px; }

/* ===== 历史待收汇总条（结算页，卡片与表格之间）=====
   复用工作台的 .dash-settle-note 视觉，额外加可点击态。 */
.set-due-note {
  cursor: pointer;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(232, 89, 12, 0.04);
  transition: background 0.15s, border-color 0.15s;
}
.set-due-note:hover { background: rgba(232, 89, 12, 0.08); border-color: var(--orange); }
.set-due-note.is-empty { background: rgba(0,0,0,0.02); cursor: default; }
.set-due-note.is-empty:hover { background: rgba(0,0,0,0.02); border-color: var(--border); }
.set-due-note:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ===== 待收明细弹窗：按账期分组 ===== */
.due-groups { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.due-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.due-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(120, 53, 15, 0.03);
  border-bottom: 1px solid var(--border);
}
.due-group-period { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.due-group-total {
  font-weight: 700; font-size: 13px; color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.due-row {
  display: grid;
  grid-template-columns: 1fr 90px 110px;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-top: 1px solid rgba(0,0,0,0.04);
}
.due-row:first-of-type { border-top: 0; }
.due-row-qty {
  text-align: right; font-size: 12.5px; color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.due-row-amt {
  text-align: right; font-weight: 600; font-size: 13px; color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.set-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}
.set-dot.orange { background: var(--orange); }
.set-dot.blue   { background: var(--blue); }
.set-dot.green  { background: var(--green); }
.set-dot.indigo { background: var(--indigo); }
.set-dot.gray   { background: #8a8a8e; }

/* ===== 合同管理页 ===== */
/* 卡片头部动作区：筛选窄、搜索宽、新增按钮不被 flex 压缩
   （否则「新增合同」会被挤成两行或文字溢出）。
   空间不够时整组动作换行到下一行，而不是把按钮挤扁。 */
#contracts .card-header { flex-wrap: wrap; row-gap: 10px; }
#contracts .card-header-actions { margin-left: auto; flex-wrap: nowrap; }
#contracts .filter-tabs { flex-wrap: wrap; }
#contracts #conStatusFilter { min-width: 0; width: 96px; flex: 0 0 auto; }
#contracts .search-box { flex: 0 0 auto; }
#contracts #conNewBtn { flex-shrink: 0; white-space: nowrap; }

/* 合同表格：序号居中、金额列右对齐（表头同步） */
.con-table th:nth-child(7) { text-align: right; }
.con-table th:nth-child(1) { text-align: center; }
.con-seq {
  text-align: center;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* 「到期计时」表头右上角：30 天内到期的合计角标 */
.con-th-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 980px;
  background: rgba(232,89,12,0.12);
  color: var(--orange);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}

.con-type-cell { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

/* ===== 合同附件粘贴区 ===== */
.con-paste-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  background: rgba(120,53,15,0.015);
  outline: none;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.con-paste-zone:hover,
.con-paste-zone:focus-visible {
  border-color: var(--blue);
  background: rgba(232,89,12,0.04);
  box-shadow: 0 0 0 3px rgba(232,89,12,0.10);
}
.con-paste-zone.has-file {
  border-style: solid;
  border-color: var(--border-strong);
  background: #fff;
  cursor: default;
  box-shadow: none;
}

.con-paste-empty { text-align: center; color: var(--text-tertiary); }
.con-paste-empty svg { width: 26px; height: 26px; opacity: .45; margin-bottom: 5px; }
.con-paste-title { font-size: 12.5px; color: var(--text-secondary); }
.con-paste-title kbd {
  font-family: inherit; font-size: 11px;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(120,53,15,0.06);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.con-paste-sub { font-size: 11.5px; margin-top: 4px; opacity: .85; }

/* ===== 附件缩略图网格（最多 3 张） ===== */
.con-paste-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.con-thumb {
  position: relative;
  width: 92px; height: 92px;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
  background: #f5f5f7;
  flex-shrink: 0;
  cursor: zoom-in;
}
.con-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .2s;
}
.con-thumb:hover img { transform: scale(1.05); }

/* 删除叉：压在图片右上角 */
.con-thumb-del {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px;
  border: none; border-radius: 50%; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s, background .15s;
}
.con-thumb:hover .con-thumb-del,
.con-thumb-del:focus-visible { opacity: 1; }
.con-thumb-del:hover { background: var(--orange); }

.con-thumb-file {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}

/* 添加入口 */
.con-thumb-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  border: 1.5px dashed var(--border-strong);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
}
.con-thumb-add:hover { border-color: var(--blue); color: var(--blue); }
.con-thumb-add-icon { font-size: 20px; line-height: 1; }
.con-thumb-add-text { font-size: 11px; }

/* 附件计数（2/3） */
.con-att-count {
  font-size: 11.5px; font-weight: 400;
  color: var(--text-tertiary);
  margin-left: 4px;
}
.con-att-count:empty { display: none; }

/* 列表里的附件数量 */
.con-file-n { font-style: normal; font-size: 11px; margin-left: 1px; }

/* ===== 附件大图预览 ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.86);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-body {
  max-width: 94vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.lightbox-body img {
  max-width: 94vw; max-height: 82vh;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-cap { color: rgba(255,255,255,.75); font-size: 12.5px; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff;
  font-size: 24px; line-height: 1;
  transition: background .15s;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

/* ===== 详情弹窗里的附件列表 ===== */
.con-att-list { display: flex; flex-direction: column; gap: 8px; }
.con-att-item { display: flex; align-items: center; gap: 10px; }
.con-att-thumb {
  width: 56px; height: 56px; border-radius: 7px; overflow: hidden;
  border: 1px solid var(--border); background: #f5f5f7;
  flex-shrink: 0; cursor: zoom-in;
  display: flex; align-items: center; justify-content: center;
}
.con-att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.con-att-doc { font-size: 22px; }
.con-att-meta { flex: 1; min-width: 0; }
.con-att-name {
  font-size: 12.5px; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.con-att-sub { font-size: 11.5px; color: var(--text-tertiary); }
.con-att-dl {
  border: none; background: none; padding: 0; cursor: pointer;
  font-size: 12px; color: var(--blue); font-family: inherit;
}
.con-att-dl:hover { text-decoration: underline; }
.con-att-empty { font-size: 12.5px; color: var(--text-tertiary); }

/* ===== 新增合同弹窗：上传区 + 识别预览区 ===== */
.cn-block-head {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 8px;
}
.cn-block-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.cn-upload-block { margin-bottom: 14px; }

/* 识别按钮：无附件时置灰，识别中显示转圈 */
.cn-ocr-btn {
  width: 100%;
  margin-top: 10px;
  justify-content: center;
}
.cn-ocr-btn:disabled { opacity: .45; cursor: not-allowed; }
.cn-ocr-btn.is-loading { position: relative; padding-left: 36px; }
.cn-ocr-btn.is-loading::before {
  content: '';
  position: absolute; left: 15px; top: 50%;
  width: 13px; height: 13px; margin-top: -7px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cnSpin .7s linear infinite;
}
@keyframes cnSpin { to { transform: rotate(360deg); } }

/* 识别结果预览：浅灰底 + 文档式分行，和上传区/表单区分开 */
.cn-ocr-block {
  background: #f6f4f2;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
/* 列表备注列：单行截断，悬停看全文 */
.con-note {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cn-ocr-preview { min-height: 104px; }

.cn-ocr-empty {
  display: flex; align-items: center; justify-content: center;
  min-height: 104px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}

/* 识别中：进度面板（转圈 + 阶段文案 + 秒表） */
.cn-ocr-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  gap: 10px;
}
.cn-ocr-spinner {
  width: 26px; height: 26px;
  border: 3px solid rgba(232,89,12,0.18);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: cnSpin .8s linear infinite;
}
.cn-ocr-progress-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.cn-ocr-progress-sub {
  font-size: 12px;
  color: var(--text-tertiary);
}

.cn-ocr-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 5px 0;
  font-size: 13px; line-height: 1.6;
  border-bottom: 1px dashed rgba(120,53,15,0.08);
}
.cn-ocr-row:last-child { border-bottom: none; }
.cn-ocr-k {
  flex: 0 0 96px;
  color: var(--text-secondary);
  font-size: 12.5px;
}
.cn-ocr-v {
  flex: 1; min-width: 0;
  color: var(--text-primary);
  word-break: break-all;
}
.cn-ocr-v.is-empty { color: var(--text-tertiary); }

/* 备注输入框：位于识别结果下方，可手动补充 */
.cn-ocr-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(120,53,15,0.12);
}
.cn-ocr-note .cn-ocr-k { flex: 0 0 96px; }
.cn-ocr-note-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  font-size: 13px;
}

.cn-ocr-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 12px;
}

/* 原有业务表单：默认隐藏，只用于承接 OCR 回填 */
.cn-form-original[hidden] { display: none !important; }

/* 识别失败 / 未接接口的提示条 */
.cn-ocr-notice {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(232,89,12,0.08);
  border: 1px solid rgba(232,89,12,0.18);
  color: #a34700;
  font-size: 12.5px;
  line-height: 1.6;
}
.cn-ocr-notice::before {
  content: '!';
  flex-shrink: 0;
  width: 16px; height: 16px; margin-top: 1px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cn-ocr-notice[hidden] { display: none; }

/* 原文内容：白底文档面板，与识别结果的灰底区分 */
.cn-raw-block { margin-top: 12px; }
.cn-raw-doc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}
.cn-raw-empty {
  display: flex; align-items: center; justify-content: center;
  min-height: 72px;
  color: var(--text-tertiary);
  font-size: 12.5px;
}

/* 合同类型标签 */
.con-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11px; font-weight: 600; line-height: 1.6;
  white-space: nowrap;
}
.con-tag-blue   { background: rgba(0,122,255,0.08);  color: var(--blue); }
.con-tag-indigo { background: rgba(88,86,214,0.08);  color: var(--indigo); }
.con-tag-orange { background: rgba(232,89,12,0.09);  color: var(--orange); }
.con-tag-green  { background: rgba(52,199,89,0.10);  color: #1a7f37; }
.con-tag-gray   { background: rgba(0,0,0,0.05);      color: var(--text-secondary); }

/* 「自动带入」标记：提示该行来自授权台账、尚未补全合同信息 */
.con-auto {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10.5px; font-weight: 600;
  background: rgba(88,86,214,0.10); color: var(--indigo);
  font-family: inherit;
}

.con-brand { font-weight: 500; }
.con-sub { font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }

/* 渠道/项目：超长截断，鼠标悬停时向左滚动显示全文 */
.con-sub.marquee {
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: default;
}
.con-sub.marquee > span {
  display: inline-block;
  white-space: nowrap;
}
.con-sub.marquee:hover {
  text-overflow: clip;
}
.con-sub.marquee:hover > span {
  animation: conMarquee 6s linear infinite alternate;
}
@keyframes conMarquee {
  0%, 12%   { transform: translateX(0); }
  88%, 100% { transform: translateX(calc(-100% + 150px)); }
}
/* 内容不够长时不动画 */
.con-sub.marquee.is-short:hover > span {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .con-sub.marquee:hover > span { animation: none; }
}

/* 收付方向 */
.con-dir {
  display: inline-block;
  min-width: 18px; padding: 0 4px;
  border-radius: 4px;
  font-size: 11px; font-weight: 600; text-align: center;
}
.con-dir.in  { background: rgba(52,199,89,0.12); color: #1a7f37; }
.con-dir.out { background: rgba(232,89,12,0.12); color: var(--orange); }

.con-file { font-size: 15px; cursor: default; }

/* 列表里的附件图标：做成可点击按钮，点了直接看附件 */
.con-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.con-file-btn:hover {
  background: rgba(232,89,12,0.08);
  border-color: rgba(232,89,12,0.22);
}
.con-file-btn:active { transform: scale(0.96); }

/* 列表附件：图片缩略图 */
.con-thumb-btn {
  position: relative;
  display: inline-flex;
  padding: 0;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color .15s, transform .15s;
}
.con-thumb-btn img {
  display: block;
  width: 44px;
  height: 32px;
  object-fit: cover;
  object-position: top center;
}
.con-thumb-btn:hover {
  border-color: var(--orange);
  transform: translateY(-1px);
}
.con-thumb-btn .con-file-n {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0 3px;
  border-radius: 4px 0 0 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  line-height: 14px;
}

/* 列表附件：表格 / 文档图标 */
.con-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  background: rgba(0,0,0,0.02);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.con-icon-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--text-secondary);
}
.con-icon-btn.is-sheet .con-icon-badge { color: #1f7a3d; }
.con-icon-btn.is-doc  .con-icon-badge { color: #b25000; }
.con-icon-btn:hover {
  border-color: var(--orange);
  background: rgba(232,89,12,0.06);
  transform: translateY(-1px);
}
.con-icon-btn .con-file-n {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: var(--orange);
  color: #fff;
  font-size: 9.5px;
  line-height: 14px;
  text-align: center;
}

/* 筛选下拉：与卡片头部的控件对齐 */
.set-year, .set-status {
  height: 32px;
  padding: 0 26px 0 10px;
  font-size: 12.5px;
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--card-solid);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a7264' stroke-width='3' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 9px 9px;
}
.set-year { min-width: 96px; }
.set-status { min-width: 108px; }
/* 工作台图表右上角的年度 / 月份下拉，与结算页同一套外观 */
.dash-year { min-width: 104px; }

/* 金额列：右对齐 + 加粗，扫一眼就能比大小 */
.set-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-primary);
}
.set-time { color: var(--text-secondary); font-size: 12px; }
.set-time-none { color: var(--text-tertiary); }

.set-detail-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.set-detail-btn:hover { background: rgba(232, 89, 12, 0.09); }

/* 回收站行操作：恢复 / 彻底删除 */
.con-acts-trash {
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}
.set-detail-btn.is-danger { color: #d92c20; }
.set-detail-btn.is-danger:hover { background: rgba(217, 44, 32, 0.1); }

/* 详情弹窗里的「删除」按钮（次要按钮的危险色变体） */
.btn.btn-secondary.is-danger {
  color: #d92c20;
  border-color: rgba(217, 44, 32, 0.28);
}
.btn.btn-secondary.is-danger:hover {
  background: rgba(217, 44, 32, 0.07);
  border-color: rgba(217, 44, 32, 0.45);
}

/* ★ 结算页主表的数字列对齐：表头默认左对齐，但「授权件数」用 .ent-n 居中、
   「应收金额」用 .set-amount 右对齐，导致表头和数字看着错位。
   这里把三列数字（授权件数 / 单价 / 应收金额）的表头和数据统一成右对齐，
   与账单弹窗里的 .bill-table 保持一致。 */
#settlement .table-wrap th:nth-child(2),
#settlement .table-wrap th:nth-child(3),
#settlement .table-wrap th:nth-child(4) { text-align: right; }
#settlement .table-wrap td:nth-child(2),
#settlement .table-wrap td:nth-child(3),
#settlement .table-wrap td:nth-child(4) { text-align: right; }
/* 授权件数原本 .ent-n 居中，覆盖成右对齐 */
#settlement .table-wrap td.ent-n { text-align: right; }

#settlement .table-footer-aside {
  justify-content: flex-start;
  gap: 16px;
  padding-right: 16px;
}
#settlement .table-footer-aside .table-footer-info {
  order: 2; margin: 0; white-space: nowrap;
}

/* ---- 账单详情弹窗 ---- */
.bill-head { align-items: flex-start; }
.bill-crumb {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.bill-crumb span { color: var(--text-secondary); }
.bill-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bill-title-row .status { flex: 0 0 auto; }
.bill-stats { margin-bottom: 18px; gap: 12px; }
.bill-stats .stat-card { padding: 14px 16px; gap: 10px; }
.bill-stats .stat-value { font-size: 22px; }
/* 待收明细弹窗只有 3 张统计卡，单独排成 3 列，避免第 4 格空着 */
#dueStats { grid-template-columns: repeat(3, 1fr); }
.set-accent { color: var(--blue); }
.set-unit {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: 4px;
  letter-spacing: 0;
}
.bill-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.bill-table { width: 100%; table-layout: fixed; }
/* 固定列宽：表头和数据共用同一套栅格，内容长短再也不会把某列撑歪。
   渠道列最宽（含图标 + 店名 + 渠道名），数字列等宽便于纵向对齐。 */
.bill-table col, .bill-table th, .bill-table td { overflow-wrap: anywhere; }
.bill-table th:nth-child(1) { width: 40%; }
.bill-table th:nth-child(2) { width: 15%; }
.bill-table th:nth-child(3) { width: 15%; }
.bill-table th:nth-child(4) { width: 15%; }
.bill-table th:nth-child(5) { width: 15%; }
.bill-table th {
  background: rgba(120, 53, 15, 0.025);
  font-size: 12px;
}
/* ★ 表头与单元格必须同一套对齐方式，否则「授权件数 / 单价 / 金额」三列
   表头左对齐、数字右对齐，看着就像整体错了一格。
   这里把「数字三列」的表头、数据行、合计行统一成右对齐。 */
.bill-table th:nth-child(2),
.bill-table th:nth-child(3),
.bill-table th:nth-child(4) { text-align: right; }
.bill-table td:nth-child(2),
.bill-table td:nth-child(3),
.bill-table td:nth-child(4) { text-align: right; }
/* 「授权件数」列原本用 .ent-n（居中对齐），在账单里要跟着表头走右对齐，
   否则这一列又单独错位。 */
.bill-table td.ent-n { text-align: right; }
.bill-table tfoot td {
  background: rgba(120, 53, 15, 0.035);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
}
.bill-table tfoot td:nth-child(2),
.bill-table tfoot td:nth-child(3),
.bill-table tfoot td:nth-child(4) { text-align: right; }
#authorizations .table-footer-aside .ent-actions {
  order: 1; display: flex; align-items: center; gap: 8px; margin-right: auto;
}
#authorizations .ent-actions .btn svg { width: 13px; height: 13px; vertical-align: -2px; }

/* ===== 商标列表分组折叠样式 =====
   折叠行与普通行样式完全一致，没有视觉区分，只通过▶/▼箭头和「共 N 条」提示可展开。 */
/* ===== 授权列表分组折叠样式 =====
   折叠行与普通行样式完全一致，没有视觉区分。 */
