    /* ==================== 基础重置 ==================== */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    /* 与 22/style.css 项目中心色调一致（背景层） */
    :root {
      --ab-bg-page: #0f0f0f;
      --ab-bg-darker: #0a0a0a;
      --ab-bg-light: #1a1a1a;
      --ab-bg-card: #1e1e1e;
      /* 弹窗：遮罩与内容区完全不透明，避免半透明发灰、费眼 */
      --modal-overlay: #0b0d10;
      --modal-surface: #1a1d24;
      --modal-surface-2: #22262f;
    }

    html {
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100%;
    }

    body {
      font-family: 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
      background: var(--ab-bg-page);
      color: #e2e8f0;
      height: 100vh;
      width: 100%;
      margin: 0;
      padding: 0;
      overflow: hidden;
    }

    ::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: rgba(0, 208, 132, .2);
      border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: rgba(0, 208, 132, .4);
    }

    /* ==================== 布局 ==================== */
    .app {
      display: flex;

      height: 100vh;
      width: 100vw;
      margin: 0;
      padding: 0;
    }

    .sidebar {
      width: 300px;
      min-width: 220px;
      max-width: 520px;
      background: rgba(10, 10, 10, .92);
      backdrop-filter: blur(24px);
      border-right: 1px solid rgba(0, 208, 132, .12);
      display: flex;
      flex-direction: column;
      z-index: 10;
      position: relative;
    }

    .main {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      margin: 0;
      padding: 0;
    }

    .splitter {
      width: 6px;
      cursor: col-resize;
      flex-shrink: 0;
      background: linear-gradient(to right, transparent, rgba(0, 208, 132, .18), transparent);
      border-left: 1px solid rgba(0, 208, 132, .08);
      border-right: 1px solid rgba(0, 208, 132, .08);
    }

    .splitter:hover,
    .splitter.dragging {
      background: linear-gradient(to right, transparent, rgba(0, 208, 132, .35), transparent);
    }

    /* ==================== 侧边栏-分类区(上1/3) ==================== */
    .cat-section {
      height: 33.33%;
      border-bottom: 1px solid rgba(0, 208, 132, .12);
      display: flex;
      flex-direction: column;
      padding: 14px;
    }

    .sec-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
      flex-shrink: 0;
    }

    .sec-title {
      color: #00d084;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: .5px;
    }

    .btn-sm {
      background: linear-gradient(135deg, #00d084, #00b4d8);
      color: #0a0f1e;
      border: none;
      padding: 4px 10px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 11px;
      font-weight: 700;
      transition: all .2s;
    }

    .btn-sm:hover {
      transform: translateY(-1px);
      box-shadow: 0 3px 10px rgba(0, 208, 132, .3);
    }

    .cat-list {
      flex: 1;
      overflow-y: auto;
    }

    .cat-item {
      margin-bottom: 3px;
      user-select: none;
    }

    .cat-item-depth-0 {
      margin-left: 0;
    }

    .cat-item-depth-1 {
      margin-left: 0;
    }

    .cat-item-depth-2 {
      margin-left: 0;
    }

    .cat-item-depth-3 {
      margin-left: 0;
    }

    .cat-item-depth-4 {
      margin-left: 0;
    }

    .cat-item-depth-5 {
      margin-left: 0;
    }

    .cat-head {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 8px 10px;
      background: rgba(26, 26, 26, .5);
      border-radius: 7px;
      cursor: pointer;
      transition: all .2s;
      border: 1px solid transparent;
    }

    .cat-head:hover {
      background: rgba(0, 208, 132, .07);
      border-color: rgba(0, 208, 132, .15);
    }

    .cat-head.active {
      background: rgba(0, 208, 132, .1);
      border-color: rgba(0, 208, 132, .25);
    }

    .cat-head.drag-over {
      border-color: #00d084;
      background: rgba(0, 208, 132, .15);
    }

    .cat-arrow {
      font-size: 9px;
      color: #64748b;
      transition: transform .2s;
      flex-shrink: 0;
      transform: rotate(90deg);
    }

    .cat-arrow.collapsed {
      transform: rotate(0deg);
    }

    .cat-name {
      flex: 1;
      font-size: 12px;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }

    .cat-count {
      font-size: 10px;
      color: #00d084;
      background: rgba(0, 208, 132, .1);
      padding: 1px 7px;
      border-radius: 8px;
      font-weight: 600;
    }

    .cat-btns {
      display: none;
    }

    .cat-head:hover .cat-btns {
      opacity: 1;
    }

    .cat-btn {
      background: none;
      border: none;
      color: #64748b;
      cursor: pointer;
      font-size: 11px;
      padding: 1px 3px;
      border-radius: 3px;
      transition: all .2s;
    }

    .cat-btn:hover {
      color: #00d084;
      background: rgba(0, 208, 132, .1);
    }

    .cat-head.drop-target {
      border-top: 1px solid rgba(56, 189, 248, .9);
    }

    .cat-children {
      padding-left: 10px;
      margin-top: 3px;
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      transition: max-height .22s ease, opacity .18s ease;
    }

    .cat-children.show {
      max-height: 1200px;
      opacity: 1;
    }

    .cat-agent {
      padding: 5px 10px;
      font-size: 11px;
      color: #94a3b8;
      border-radius: 5px;
      cursor: pointer;
      transition: all .2s;
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 2px;
    }

    .cat-agent-name {
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .cat-agent-add {
      border: 1px solid rgba(0, 208, 132, .25);
      background: rgba(0, 208, 132, .12);
      color: #00d084;
      border-radius: 6px;
      font-size: 13px;
      line-height: 1;
      width: 20px;
      height: 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      cursor: pointer;
      flex-shrink: 0;
      font-weight: 700;
    }

    .cat-agent:hover {
      color: #e2e8f0;
      background: rgba(0, 208, 132, .06);
    }

    .cat-agent.active {
      color: #00d084;
      background: rgba(0, 208, 132, .1);
    }

    /* ==================== 侧边栏-智能体列表(下2/3) ==================== */
    .agent-section {
      height: 66.67%;
      display: flex;
      flex-direction: column;
      padding: 14px;
    }

    .agent-search {
      width: 100%;
      background: rgba(30, 30, 30, .6);
      border: 1px solid rgba(0, 208, 132, .15);
      border-radius: 8px;
      padding: 8px 12px 8px 32px;
      color: #fff;
      font-size: 12px;
      outline: none;
      margin-bottom: 10px;
      transition: border-color .2s;
    }

    .agent-search:focus {
      border-color: #00d084;
      box-shadow: 0 0 0 3px rgba(0, 208, 132, .08);
    }

    .search-wrap {
      position: relative;
      flex-shrink: 0;
    }

    .search-icon {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 13px;
      color: #64748b;
      pointer-events: none;
    }

    .list-toolbar {
      display: flex;
      gap: 5px;
      margin-bottom: 10px;
      flex-shrink: 0;
      flex-wrap: wrap;
      align-items: center;
    }

    .batch-bar {
      display: none;
      gap: 5px;
      align-items: center;
      flex-wrap: wrap;
    }

    .batch-bar.show {
      display: flex;
    }

    .batch-count {
      font-size: 11px;
      color: #00d084;
      font-weight: 600;
    }

    .agent-list {
      flex: 1;
      overflow-y: auto;
    }

    /* ==================== 智能体卡片 ==================== */
    /* ==================== 智能体卡片 ==================== */
    .agent-card {
      background: linear-gradient(135deg, rgba(26, 26, 26, .6), rgba(20, 20, 22, .7));
      border: 1px solid rgba(0, 208, 132, .06);
      border-radius: 14px;
      padding: 14px;
      margin-bottom: 10px;
      cursor: pointer;
      transition: all .2s ease;
      position: relative;
      overflow: hidden;
    }

    .agent-card:hover {
      border-color: rgba(0, 208, 132, .18);
      /* box-shadow: 0 8px 25px rgba(0, 208, 132, .15); */
    }

    .agent-card.active {
      border-color: #00d084;
      background: linear-gradient(135deg, rgba(0, 208, 132, .08), rgba(0, 180, 216, .05));
    }

    .agent-card.selected {
      border-color: rgba(0, 208, 132, .26);
      background: linear-gradient(135deg, rgba(0, 208, 132, .10), rgba(0, 180, 216, .04));
    }

    .card-top {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .card-icon {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      background: linear-gradient(135deg, #00d084, #00b4d8);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      flex-shrink: 0;
      box-shadow: 0 4px 12px rgba(0, 208, 132, .2);
    }

    .card-info {
      flex: 1;
      min-width: 0;
    }

    .card-name {
      font-size: 13px;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .card-name .highlight {
      background: rgba(0, 208, 132, .3);
      color: #fff;
      border-radius: 2px;
      padding: 0 1px;
    }

    .card-desc {
      font-size: 11px;
      color: #64748b;
      margin-top: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .card-status {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 10px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 8px;
      flex-shrink: 0;
    }

    .status-running {
      background: rgba(0, 208, 132, .12);
      color: #00d084;
    }

    .status-stopped {
      background: rgba(42, 42, 42, .12);
      color: #94a3b8;
    }

    .status-training {
      background: rgba(251, 191, 36, .12);
      color: #fbbf24;
    }

    /* ==================== 卡片右侧折叠操作图标 ==================== */
    .agent-card-menu {
      width: 30px;
      height: 30px;
      border-radius: 10px;
      border: none;
      cursor: pointer;
      flex-shrink: 0;
      background: linear-gradient(135deg, #ff5ea8, #7c3aed, #00b4d8);
      color: #0a0f1e;
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 12px 30px rgba(124, 58, 237, .18);
      transition: transform .16s, box-shadow .16s, opacity .16s;
    }

    .agent-card-menu:hover {
      transform: translateY(-1px);
      opacity: .98;
    }

    /* ==================== 智能体卡片操作弹窗 ==================== */
    .agent-action-popover {
      position: fixed;
      z-index: 500;
      width: 320px;
      max-width: calc(100vw - 30px);
      border-radius: 16px;
      border: 1px solid rgba(0, 208, 132, .28);
      background: var(--modal-surface);
      box-shadow: 0 35px 120px rgba(0, 0, 0, .62);
      display: none;
      overflow: hidden;
    }

    .agent-action-popover.show {
      display: block;
    }

    .agent-action-popover-head {
      padding: 12px 14px;
      border-bottom: 1px solid rgba(0, 208, 132, .12);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .agent-action-popover-title {
      color: #00d084;
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .agent-action-popover-close {
      background: rgba(239, 68, 68, .12);
      border: 1px solid rgba(239, 68, 68, .22);
      color: #ef4444;
      border-radius: 10px;
      width: 28px;
      height: 28px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      transition: transform .16s;
    }

    .agent-action-popover-close:hover {
      transform: translateY(-1px);
    }

    .agent-action-popover-body {
      padding: 12px 14px 14px;
    }

    .agent-action-subtitle {
      font-size: 11px;
      font-weight: 800;
      color: #94a3b8;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .agent-action-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .agent-action-btn {
      border: 1px solid rgba(0, 208, 132, .12);
      background: rgba(30, 30, 30, .55);
      color: #e2e8f0;
      border-radius: 12px;
      padding: 9px 10px;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
      transition: all .16s;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .agent-action-btn:hover {
      transform: translateY(-1px);
      border-color: rgba(0, 208, 132, .28);
      background: rgba(0, 208, 132, .07);
    }

    .agent-action-btn.run {
      border-color: rgba(0, 208, 132, .18);
      background: rgba(0, 208, 132, .10);
      color: #00d084;
    }

    .agent-action-btn.edit {
      border-color: rgba(59, 130, 246, .20);
      background: rgba(59, 130, 246, .12);
      color: #60a5fa;
    }

    .agent-action-btn.train {
      border-color: rgba(251, 191, 36, .22);
      background: rgba(251, 191, 36, .12);
      color: #fbbf24;
    }

    .agent-action-btn.del {
      border-color: rgba(239, 68, 68, .20);
      background: rgba(239, 68, 68, .12);
      color: #ef4444;
    }

    .card-actions {
      display: flex;
      gap: 5px;
      margin-top: 10px;
    }

    .card-act {
      flex: 1;
      padding: 6px 0;
      border: none;
      border-radius: 7px;
      font-size: 10px;
      cursor: pointer;
      font-weight: 700;
      transition: all .2s;
      text-align: center;
    }

    .card-act.run {
      background: rgba(0, 208, 132, .15);
      color: #00d084;
    }

    .card-act.run:hover {
      background: rgba(0, 208, 132, .25);
    }

    .card-act.edit {
      background: rgba(59, 130, 246, .15);
      color: #3b82f6;
    }

    .card-act.edit:hover {
      background: rgba(59, 130, 246, .25);
    }

    .card-act.train {
      background: rgba(251, 191, 36, .15);
      color: #fbbf24;
    }

    .card-act.train:hover {
      background: rgba(251, 191, 36, .25);
    }

    .card-act.del {
      background: rgba(239, 68, 68, .12);
      color: #ef4444;
    }

    .card-act.del:hover {
      background: rgba(239, 68, 68, .22);
    }

    /* ==================== 右侧主区域 ==================== */
    .main-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 15px;
      border-bottom: 1px solid rgba(0, 208, 132, .12);
      flex-shrink: 0;
    }

    .main-title {
      color: #00d084;
      font-size: 20px;
      font-weight: 700;
    }

    .header-btns {
      display: flex;
      gap: 8px;
    }

    .main-title-wrap {
      display: flex;
      align-items: baseline;
      gap: 12px;
      min-width: 0;
    }

    .module-pill {
      flex-shrink: 0;
      font-size: 12px;
      font-weight: 700;
      color: #00d084;
      background: rgba(0, 208, 132, .12);
      border: 1px solid rgba(0, 208, 132, .18);
      padding: 6px 10px;
      border-radius: 999px;
      white-space: nowrap;
    }

    button.module-pill.module-pill-btn {
      font: inherit;
      cursor: pointer;
      transition: background .15s, border-color .15s, box-shadow .15s;
    }

    button.module-pill.module-pill-btn:hover {
      background: rgba(0, 208, 132, .2);
      border-color: rgba(0, 208, 132, .35);
    }

    button.module-pill.module-pill-btn:focus-visible {
      outline: 2px solid rgba(0, 208, 132, .55);
      outline-offset: 2px;
    }

    .hdr-btn {
      padding: 7px 14px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
      transition: all .2s;
      text-decoration: none;
    }

    .hdr-btn.primary {
      background: rgba(0, 208, 132, .16);
      color: #00d084;
      border: 1px solid rgba(0, 208, 132, .28);
    }

    .hdr-btn.primary:hover {
      background: rgba(0, 208, 132, .26);
      border-color: rgba(0, 208, 132, .42);
    }

    .hdr-btn.secondary {
      background: rgba(0, 208, 132, .12);
      color: #00d084;
      border: 1px solid rgba(0, 208, 132, .15);
    }

    .hdr-btn.ghost {
      background: rgba(26, 26, 26, .5);
      color: #94a3b8;
      border: 1px solid rgba(100, 116, 139, .2);
    }

    /* ==================== 标签页 ==================== */
    .tabs {
      display: flex;
      gap: 3px;
      padding: 12px 15px 0;
      flex-shrink: 0;
    }

    .tab {
      padding: 9px 18px;
      border: none;
      border-radius: 8px 8px 0 0;
      background: transparent;
      color: #64748b;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all .2s;
    }

    .tab:hover {
      color: #94a3b8;
      background: rgba(26, 26, 26, .4);
    }

    .tab.active {
      background: rgba(0, 208, 132, .12);
      color: #00d084;
    }

    /* ==================== 内容面板 ==================== */
    .content {
      flex: 1;
      overflow: hidden;
      margin: 0 15px 20px;
      border-radius: 0 12px 12px 12px;
      background: rgba(30, 30, 30, .35);
      border: 1px solid rgba(0, 208, 132, .08);
    }

    .panel {
      display: none;
      height: 100%;
      overflow-y: auto;
      padding: 20px;
    }

    .panel.active {
      display: block;
    }

    /* ==================== 表单组件 ==================== */
    .fg {
      margin-bottom: 16px;
    }

    .fl {
      display: block;
      margin-bottom: 5px;
      color: #94a3b8;
      font-size: 12px;
      font-weight: 600;
    }

    .fi.fi--invalid,
    input.fi--invalid,
    textarea.fi--invalid,
    select.fi--invalid {
      border-color: rgba(239, 68, 68, 0.9) !important;
      box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.28);
    }

    .fi {
      width: 100%;
      background: rgba(10, 10, 10, .5);
      border: 1px solid rgba(0, 208, 132, .15);
      border-radius: 8px;
      padding: 9px 12px;
      color: #f1f5f9;
      font-size: 12px;
      outline: none;
      transition: border-color .2s, color .15s;
      caret-color: #00d084;
    }

    .fi::placeholder {
      color: #64748b;
      opacity: 1;
    }

    .fi::selection {
      background: rgba(0, 208, 132, .28);
      color: #f8fafc;
    }

    .fi:-webkit-autofill,
    .fi:-webkit-autofill:hover,
    .fi:-webkit-autofill:focus {
      -webkit-text-fill-color: #f1f5f9;
      box-shadow: 0 0 0 1000px rgba(14, 14, 16, .92) inset;
      transition: background-color 99999s ease-out 0s;
    }

    .fi:focus {
      border-color: #00d084;
      box-shadow: 0 0 0 3px rgba(0, 208, 132, .08);
    }

    /* 全页下拉框：收起态与展开列表（配置「当前模型/播报声音」、弹窗、权限、知识库日期等） */
    select.fi {
      cursor: pointer;
      color-scheme: dark;
      appearance: auto;
      background: linear-gradient(180deg, rgba(30, 30, 32, .98) 0%, rgba(18, 18, 20, 1) 100%);
      border: 1px solid rgba(0, 208, 132, .22);
      color: #f1f5f9;
      padding: 9px 32px 9px 12px;
      min-height: 38px;
      box-sizing: border-box;
    }

    select.fi:focus {
      border-color: #00d084;
      box-shadow: 0 0 0 3px rgba(0, 208, 132, .1);
      outline: none;
    }

    select.fi[multiple] {
      padding: 8px 10px;
      min-height: 120px;
      background: rgba(22, 22, 24, .98);
    }

    select.fi option {
      background-color: #222226;
      color: #ececf0;
    }

    select.fi option:hover {
      background-color: rgba(0, 208, 132, .18);
      color: #f8fafc;
    }

    select.fi option:checked,
    select.fi option:focus {
      background: linear-gradient(180deg, rgba(0, 208, 132, .28), rgba(0, 208, 132, .16));
      color: #f8fafc;
    }

    /* 弹窗卡片内：输入/多行（不含 select，下拉见上） */
    .modal .fi:not(select),
    .app-dialog-card .fi:not(select) {
      background: linear-gradient(180deg, rgba(34, 34, 36, .96) 0%, rgba(22, 22, 24, .99) 100%);
      border: 1px solid rgba(0, 208, 132, .22);
      color: #f8fafc;
    }

    .modal .fi:not(select)::placeholder,
    .app-dialog-card .fi:not(select)::placeholder {
      color: #64748b;
    }

    .modal .fi:not(select):focus,
    .app-dialog-card .fi:not(select):focus {
      border-color: #00d084;
      box-shadow: 0 0 0 3px rgba(0, 208, 132, .1);
    }

    .modal .fi:not(select):-webkit-autofill,
    .modal .fi:not(select):-webkit-autofill:hover,
    .modal .fi:not(select):-webkit-autofill:focus,
    .app-dialog-card .fi:not(select):-webkit-autofill,
    .app-dialog-card .fi:not(select):-webkit-autofill:hover,
    .app-dialog-card .fi:not(select):-webkit-autofill:focus {
      -webkit-text-fill-color: #f8fafc;
      box-shadow: 0 0 0 1000px rgba(26, 26, 28, .98) inset;
    }

    .ft {
      resize: vertical;
      min-height: 80px;
      font-family: inherit;
    }

    .fr {
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    .fr .fg {
      flex: 1;
    }

    .form-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      margin-top: 14px;
      padding-top: 10px;
      border-top: 1px dashed rgba(51, 65, 85, .45);
    }

    .btn-save {
      padding: 9px 22px;
      background: linear-gradient(135deg, #00d084, #00b4d8);
      border: none;
      border-radius: 8px;
      color: #0a0f1e;
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
      transition: all .2s;
    }

    .btn-save:hover {
      box-shadow: 0 4px 12px rgba(0, 208, 132, .3);
      transform: translateY(-1px);
    }
    .btn-save:focus-visible,
    .btn-cancel:focus-visible {
      outline: 2px solid rgba(0, 208, 132, .55);
      outline-offset: 1px;
    }

    .btn-cancel {
      padding: 9px 18px;
      background: rgba(42, 42, 42, .15);
      border: 1px solid rgba(100, 116, 139, .2);
      border-radius: 8px;
      color: #94a3b8;
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
    }

    /* ==================== 配置面板 ==================== */
    .config-section {
      background: rgba(26, 26, 26, .3);
      border: 1px solid rgba(0, 208, 132, .08);
      border-radius: 12px;
      padding: 14px 14px 12px;
      margin-bottom: 12px;
    }

    .config-title {
      font-size: 14px;
      font-weight: 700;
      color: #00d084;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    /* 技能配置页（仅布局与样式统一，不改功能） */
    .cfg-sk-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      align-items: start;
    }
    .cfg-sk-col {
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .cfg-sk-section {
      border: 1px solid rgba(51, 65, 85, .45);
      border-radius: 10px;
      padding: 10px;
      background: rgba(15, 23, 42, .18);
    }
    .cfg-sk-help {
      font-size: 12px;
      margin-top: 4px;
      line-height: 1.45;
    }
    .cfg-sk-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 8px;
    }
    .cfg-sk-hint {
      margin-top: 8px;
      font-size: 12px;
    }
    .cfg-sk-bottom-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 8px;
    }
    .cfg-sk-block-title {
      font-size: 12px;
      margin-bottom: 4px;
      color: #94a3b8;
    }
    .cfg-sk-list-wrap {
      border: 1px solid rgba(51, 65, 85, .45);
      border-radius: 8px;
      padding: 8px;
      max-height: 180px;
      overflow: auto;
      background: rgba(2, 6, 23, .22);
    }
    .cfg-sk-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 4px 2px;
      border-bottom: 1px dashed rgba(51, 65, 85, .35);
    }
    .cfg-sk-row:last-child {
      border-bottom: none;
    }
    .cfg-sk-row-left,
    .cfg-sk-row-right {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }
    .cfg-sk-idx,
    .cfg-sk-meta {
      font-size: 11px;
      color: #64748b;
    }
    .cfg-sk-op-btn {
      padding: 2px 8px;
    }

    /* 仅优化配置页：紧凑布局、分区层级、按钮统一 */
    #panel_config {
      padding: 14px 16px;
    }
    #panel_config .config-section {
      box-shadow: inset 0 1px 0 rgba(0, 208, 132, .06);
    }
    #panel_config .config-title {
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(51, 65, 85, .38);
      letter-spacing: .2px;
    }
    #panel_config .fg {
      margin-bottom: 10px;
    }
    #panel_config .fl {
      margin-bottom: 4px;
      font-size: 11px;
      color: #9fb2c7;
    }
    #panel_config .fi {
      min-height: 34px;
      padding: 8px 11px;
      border-radius: 7px;
    }
    #panel_config .ft {
      min-height: 70px;
    }
    #panel_config .btn-save,
    #panel_config .btn-cancel {
      min-height: 34px;
      padding: 7px 14px;
      border-radius: 7px;
      font-weight: 700;
    }
    #panel_config .btn-cancel {
      background: rgba(42, 42, 42, .2);
    }
    #panel_config .form-actions .btn-save {
      box-shadow: 0 4px 14px rgba(0, 208, 132, .2);
    }

    @media (max-width: 900px) {
      #panel_config {
        padding: 12px;
      }
      #panel_config .fr {
        flex-direction: column;
        gap: 8px;
      }
      .cfg-sk-layout,
      .cfg-sk-bottom-grid {
        grid-template-columns: 1fr;
      }
    }

    /* ==================== 提示词编辑 ==================== */
    .prompt-editor {
      /* 与 .content、.chat-panel 主背景一致 */
      background: rgba(30, 30, 30, .35);
      border: 1px solid rgba(0, 208, 132, .12);
      border-radius: 10px;
      padding: 14px;
      min-height: 160px;
      font-family: 'Fira Code', monospace, sans-serif;
      font-size: 12px;
      color: #e2e8f0;
      line-height: 1.6;
      outline: none;
      resize: vertical;
      width: 100%;
      white-space: pre-wrap;
    }

    .prompt-editor:focus {
      border-color: #00d084;
    }

    .prompt-history {
      margin-top: 12px;
    }

    .prompt-record {
      padding: 8px 12px;
      background: rgba(30, 30, 30, .4);
      border-radius: 6px;
      margin-bottom: 6px;
      font-size: 11px;
      color: #94a3b8;
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      transition: all .2s;
    }

    .prompt-record:hover {
      background: rgba(0, 208, 132, .06);
      color: #e2e8f0;
    }

    /* ==================== 知识库页：左训练素材 / 右记忆库 ==================== */
    .kb-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .kb-item {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 38px;
      padding: 8px 12px;
      background: rgba(30, 30, 30, .4);
      border: 1px solid rgba(0, 208, 132, .08);
      border-radius: 8px;
      transition: all .2s;
      cursor: pointer;
    }

    .kb-item:hover {
      border-color: rgba(0, 208, 132, .2);
      background: rgba(0, 208, 132, .06);
    }

    .kb-item.active {
      border-color: rgba(0, 208, 132, .45);
      background: rgba(0, 208, 132, .14);
      box-shadow: 0 10px 24px rgba(0, 208, 132, .1);
    }

    .kb-name {
      flex: 1;
      font-size: 12px;
      font-weight: 700;
    }

    .kb-count {
      font-size: 11px;
      color: #64748b;
    }

    .kb-cat-actions {
      display: inline-flex;
      gap: 4px;
      flex-shrink: 0;
    }

    .kb-cat-btn {
      border: 1px solid rgba(0, 208, 132, .14);
      background: rgba(30, 30, 30, .55);
      color: #94a3b8;
      border-radius: 6px;
      width: 24px;
      height: 24px;
      font-size: 12px;
      line-height: 1;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .kb-cat-btn:hover {
      color: #00d084;
      border-color: rgba(0, 208, 132, .32);
      background: rgba(0, 208, 132, .08);
    }

    /* 右侧：本地分层记忆库（与左侧训练素材区样式） */
    .pm-memory-panel .pm-toolbar {
      margin-bottom: 8px;
    }

    .pm-memory-date-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px 14px;
      margin-top: 10px;
      padding: 10px 12px;
      background: rgba(30, 30, 30, .35);
      border-radius: 10px;
      border: 1px solid rgba(0, 208, 132, .1);
    }

    .pm-memory-date-row label {
      font-size: 11px;
      color: #94a3b8;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .pm-memory-date-row .pm-date-row-title {
      font-size: 12px;
      color: #00d084;
      font-weight: 700;
      margin-right: 4px;
    }

    .pm-memory-date-row .pm-date-row-hint {
      font-size: 11px;
      color: #64748b;
      margin-right: 8px;
    }

    .pm-memory-date-row .pm-date-select {
      width: auto;
      min-width: 74px;
      padding: 6px 8px;
      font-size: 12px;
    }

    .pm-memory-date-row .pm-date-select#pm_year_r {
      min-width: 92px;
    }

    .pm-memory-date-row .pm-date-search-btn {
      padding: 6px 14px;
      font-size: 12px;
      margin-left: 4px;
    }

    .pm-range {
      width: 100px;
      accent-color: #00d084;
    }

    .pm-memory-scroll {
      max-height: 420px;
      overflow-y: auto;
      margin-top: 10px;
      padding-right: 4px;
    }

    .pm-memory-entry {
      padding: 8px 10px;
      margin-bottom: 6px;
      background: rgba(30, 30, 30, .45);
      border: 1px solid rgba(0, 208, 132, .1);
      border-radius: 8px;
      scroll-margin-top: 12px;
      position: relative;
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
      gap: 8px;
    }

    .pm-row-cb {
      margin-top: 2px;
      flex-shrink: 0;
      cursor: pointer;
      accent-color: #00d084;
    }

    .pm-memory-inner {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .pm-sec-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
      margin-bottom: 8px;
      padding: 4px 0;
      font-size: 12px;
      color: #94a3b8;
    }

    .pm-sec-toolbar label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      user-select: none;
    }

    .pm-memory-meta {
      font-size: 11px;
      color: #cbd5e1;
      margin: 0;
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .pm-memory-label {
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .pm-memory-highlight {
      background: rgba(251, 191, 36, .42);
      color: #fffbeb;
      padding: 0 3px;
      border-radius: 4px;
    }

    .pm-menu-btn {
      border: 1px solid rgba(0, 208, 132, .18);
      background: rgba(30, 30, 30, .6);
      color: #94a3b8;
      width: 24px;
      height: 24px;
      border-radius: 8px;
      cursor: pointer;
      line-height: 1;
      font-size: 14px;
      flex-shrink: 0;
    }

    .pm-menu-btn:hover {
      color: #00d084;
      border-color: rgba(0, 208, 132, .35);
    }

    .pm-menu {
      position: absolute;
      right: 10px;
      top: calc(100% - 2px);
      min-width: 96px;
      background: rgba(10, 10, 10, .98);
      border: 1px solid rgba(0, 208, 132, .2);
      border-radius: 8px;
      box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
      padding: 4px;
      z-index: 12;
      display: none;
    }

    .pm-menu.show {
      display: block;
    }

    .pm-menu-item {
      width: 100%;
      border: none;
      background: transparent;
      color: #e2e8f0;
      text-align: left;
      font-size: 11px;
      padding: 6px 8px;
      border-radius: 6px;
      cursor: pointer;
    }

    .pm-menu-item:hover {
      background: rgba(0, 208, 132, .1);
      color: #00d084;
    }

    .kb-page-wrap {
      display: flex;
      gap: 16px;
      align-items: stretch;
      flex-wrap: wrap;
    }

    .kb-col-left,
    .kb-col-right {
      flex: 1 1 320px;
      min-width: 280px;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }

    .kb-col-full {
      flex: 1 1 100%;
      width: 100%;
      min-width: 100%;
    }

    .kb-section-hint {
      font-size: 12px;
      color: #94a3b8;
      margin: 0 0 10px 0;
      line-height: 1.45;
    }

    .kb-tool-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-bottom: 10px;
    }

    .kb-backup-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      padding: 8px 0;
      margin-bottom: 8px;
      border-bottom: 1px solid rgba(148, 163, 184, .12);
      font-size: 11px;
      color: #64748b;
    }

    .kb-backup-row .btn-save,
    .kb-backup-row .btn-cancel {
      padding: 4px 10px;
      font-size: 11px;
    }

    .kb-vector-head {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .kb-vector-primary {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .kb-vector-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      margin-bottom: 10px;
    }

    .kb-source-chip {
      border: 1px solid rgba(148, 163, 184, .25);
      background: rgba(15, 23, 42, .4);
      color: #94a3b8;
      font-size: 11px;
      padding: 4px 10px;
      border-radius: 999px;
      cursor: pointer;
      line-height: 1.3;
    }

    .kb-source-chip:hover {
      border-color: rgba(0, 208, 132, .35);
      color: #cbd5e1;
    }

    .kb-source-chip.active {
      border-color: rgba(0, 208, 132, .5);
      background: rgba(0, 208, 132, .12);
      color: #00d084;
      font-weight: 600;
    }

    .kb-vector-chunk-row {
      font-size: 11px;
      padding: 8px 10px;
      border-radius: 8px;
      background: rgba(15, 23, 42, .45);
      border: 1px solid rgba(148, 163, 184, .15);
      margin-bottom: 8px;
      display: flex;
      gap: 10px;
      align-items: flex-start;
      justify-content: space-between;
    }

    .kb-vector-meta {
      color: #94a3b8;
      font-size: 10px;
      margin-top: 4px;
    }

    .kb-assoc-docs {
      margin-top: 12px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      max-height: 52vh;
      overflow-y: auto;
      padding-right: 4px;
    }

    .kb-file-group {
      border: 1px solid rgba(0, 208, 132, .12);
      border-radius: 10px;
      background: rgba(30, 30, 30, .35);
      overflow: hidden;
    }

    .kb-file-group-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border-bottom: 1px solid rgba(0, 208, 132, .1);
      font-size: 12px;
      font-weight: 700;
      color: #00d084;
    }

    .kb-file-group-body {
      padding: 6px 8px 8px;
    }

    .kb-file-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
      padding: 6px 4px;
      border-bottom: 1px solid rgba(148, 163, 184, .08);
      font-size: 11px;
    }

    .kb-file-row:last-child {
      border-bottom: none;
    }

    .kb-file-name {
      flex: 1;
      min-width: 0;
      color: #e2e8f0;
      cursor: pointer;
      word-break: break-all;
    }

    .kb-file-name:hover {
      color: #00d084;
      text-decoration: underline;
    }

    .kb-file-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      flex-shrink: 0;
    }

    .kb-file-menu-btn {
      border: 1px solid rgba(0, 208, 132, .18);
      background: rgba(30, 30, 30, .6);
      color: #94a3b8;
      width: 24px;
      height: 24px;
      border-radius: 8px;
      cursor: pointer;
      line-height: 1;
      font-size: 14px;
      flex-shrink: 0;
    }

    .kb-file-menu-btn:hover {
      color: #00d084;
      border-color: rgba(0, 208, 132, .35);
    }

    .kb-file-row {
      position: relative;
      align-items: center;
    }

    .kb-file-menu {
      position: absolute;
      right: 4px;
      top: calc(100% - 2px);
      min-width: 112px;
      background: rgba(10, 10, 10, .98);
      border: 1px solid rgba(0, 208, 132, .2);
      border-radius: 8px;
      box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
      padding: 4px;
      z-index: 18;
      display: none;
    }

    .kb-file-menu.show {
      display: block;
    }

    .kb-file-menu-item {
      width: 100%;
      border: none;
      background: transparent;
      color: #e2e8f0;
      text-align: left;
      font-size: 11px;
      padding: 6px 8px;
      border-radius: 6px;
      cursor: pointer;
    }

    .kb-file-menu-item:hover {
      background: rgba(0, 208, 132, .1);
      color: #00d084;
    }

    .kb-tree-wrap {
      margin-top: 8px;
      max-height: 44vh;
      overflow: auto;
      padding-right: 4px;
    }

    .kb-tree-node {
      display: flex;
      align-items: center;
      gap: 6px;
      min-height: 24px;
      padding: 2px 6px;
      border-radius: 6px;
      font-size: 12px;
      color: #cbd5e1;
      cursor: pointer;
      user-select: none;
    }

    .kb-tree-node:hover {
      background: rgba(0, 208, 132, .08);
      color: #e2e8f0;
    }

    .kb-tree-node.active-folder {
      border: 1px solid rgba(0, 208, 132, .2);
      background: rgba(0, 208, 132, .08);
    }

    .kb-tree-indent {
      margin-left: 16px;
    }

    .kb-tree-arrow {
      width: 14px;
      color: #64748b;
      text-align: center;
      flex-shrink: 0;
    }

    .kb-tree-name {
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    @media (max-width: 900px) {
      .kb-page-wrap {
        flex-direction: column;
      }
    }

    /* ==================== 训练面板 ==================== */
    .train-tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 16px;
    }

    .train-tab {
      padding: 8px 16px;
      border: none;
      border-radius: 6px;
      background: rgba(26, 26, 26, .5);
      color: #64748b;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all .2s;
    }

    .train-tab.active {
      background: rgba(0, 208, 132, .12);
      color: #00d084;
    }

    .train-panel {
      display: none;
    }

    .train-panel.active {
      display: block;
    }

    .corpus-item {
      display: flex;
      gap: 10px;
      padding: 10px 12px;
      background: rgba(30, 30, 30, .4);
      border-radius: 8px;
      margin-bottom: 8px;
      font-size: 12px;
      align-items: flex-start;
    }

    .corpus-q {
      flex: 1;
      color: #00d084;
      font-weight: 600;
    }

    .corpus-a {
      flex: 2;
      color: #94a3b8;
    }

    .corpus-del {
      background: none;
      border: none;
      color: #ef4444;
      cursor: pointer;
      font-size: 12px;
      flex-shrink: 0;
    }

    .train-log {
      padding: 8px 12px;
      background: rgba(30, 30, 30, .4);
      border-radius: 6px;
      margin-bottom: 6px;
      font-size: 11px;
      color: #94a3b8;
      border-left: 3px solid #00d084;
    }

    .train-log.warn {
      border-left-color: #fbbf24;
    }

    .train-log.error {
      border-left-color: #ef4444;
    }

    /* 自动训练：进度与状态（仅本模块使用） */
    .auto-train-progress-card {
      margin-top: 18px;
      padding: 14px 16px;
      border-radius: 12px;
      background: rgba(20, 28, 24, .55);
      border: 1px solid rgba(0, 208, 132, .18);
      box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
    }

    .auto-train-progress-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }

    .auto-train-status-text {
      font-size: 12px;
      color: #cbd5e1;
      line-height: 1.45;
      flex: 1;
      min-width: 0;
    }

    .auto-train-status-pct {
      font-size: 12px;
      font-weight: 700;
      color: #00d084;
      font-variant-numeric: tabular-nums;
    }

    .auto-train-bar-track {
      height: 8px;
      border-radius: 999px;
      background: rgba(30, 41, 36, .9);
      overflow: hidden;
      border: 1px solid rgba(0, 208, 132, .12);
    }

    .auto-train-bar-fill {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, #00a86b, #00d084);
      /* 宽度由脚本逐帧更新以实现平滑，不用 CSS transition，避免与插值叠加发涩 */
    }

    .auto-train-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 12px;
    }

    .btn-auto-stop {
      padding: 6px 14px;
      font-size: 12px;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 600;
      transition: background .2s, border-color .2s, color .2s, box-shadow .2s, opacity .2s;
    }

    .btn-auto-stop--idle {
      border: 1px solid rgba(71, 85, 105, .55);
      background: rgba(51, 65, 85, .28);
      color: #94a3b8;
    }

    .btn-auto-stop--idle:disabled {
      opacity: .55;
      cursor: not-allowed;
    }

    .btn-auto-stop--active {
      border: 1px solid rgba(0, 208, 132, .55);
      background: rgba(0, 208, 132, .2);
      color: #86efac;
      box-shadow: 0 0 0 1px rgba(0, 208, 132, .12);
    }

    .btn-auto-stop--active:hover:not(:disabled) {
      background: rgba(0, 208, 132, .32);
      border-color: rgba(0, 208, 132, .75);
    }

    .btn-auto-stop--stopping {
      border-color: rgba(251, 191, 36, .5);
      background: rgba(251, 191, 36, .14);
      color: #fcd34d;
      cursor: wait;
      box-shadow: 0 0 0 1px rgba(251, 191, 36, .12);
    }

    .btn-auto-stop__dot {
      display: inline-block;
      width: 5px;
      height: 5px;
      margin-left: 6px;
      border-radius: 50%;
      background: currentColor;
      vertical-align: middle;
      opacity: 0;
      pointer-events: none;
      transition: opacity .15s;
    }

    .btn-auto-stop--stopping .btn-auto-stop__dot {
      opacity: 1;
      animation: auto-train-stop-dot-pulse 0.65s ease-in-out infinite alternate;
    }

    @keyframes auto-train-stop-dot-pulse {
      from {
        opacity: 0.35;
        transform: scale(0.82);
      }

      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    .auto-train-status-pct--muted {
      color: #64748b;
      font-weight: 600;
    }

    .slider-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 12px;
    }

    .slider-label {
      width: 70px;
      font-size: 11px;
      color: #94a3b8;
      font-weight: 600;
      text-align: right;
    }

    .slider-input {
      flex: 1;
      accent-color: #00d084;
    }

    .slider-value {
      width: 35px;
      font-size: 11px;
      color: #00d084;
      font-weight: 700;
    }

    /* ==================== 模型管理 ==================== */
    .model-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 12px;
    }

    .model-card {
      background: linear-gradient(135deg, rgba(26, 26, 26, .5), rgba(20, 20, 22, .6));
      border: 1px solid rgba(0, 208, 132, .08);
      border-radius: 12px;
      padding: 14px;
      transition: all .25s;
    }

    .model-card:hover {
      border-color: rgba(0, 208, 132, .3);
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(0, 208, 132, .08);
    }

    .model-top {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
    }

    .model-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      flex-shrink: 0;
    }

    .model-icon.local {
      background: linear-gradient(135deg, #3b82f6, #6366f1);
    }

    .model-icon.cloud {
      background: linear-gradient(135deg, #00d084, #00b4d8);
    }

    .model-info {
      flex: 1;
      min-width: 0;
    }

    .model-name {
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .model-type {
      font-size: 10px;
      color: #64748b;
    }

    .model-status {
      font-size: 10px;
      padding: 2px 8px;
      border-radius: 8px;
      font-weight: 600;
    }

    .model-status.online {
      background: rgba(0, 208, 132, .12);
      color: #00d084;
    }

    .model-status.offline {
      background: rgba(42, 42, 42, .12);
      color: #94a3b8;
    }

    .model-status.error {
      background: rgba(239, 68, 68, .12);
      color: #ef4444;
    }

    .model-detail {
      font-size: 11px;
      color: #64748b;
      margin-bottom: 10px;
    }

    .model-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .model-btn {
      flex: 1;
      padding: 5px;
      border: none;
      border-radius: 5px;
      font-size: 10px;
      cursor: pointer;
      font-weight: 600;
      transition: all .2s;
      text-align: center;
    }

    .model-btn.test {
      background: rgba(0, 208, 132, .15);
      color: #00d084;
    }

    .model-btn.edit {
      background: rgba(59, 130, 246, .12);
      color: #3b82f6;
    }

    .model-btn.del {
      background: rgba(239, 68, 68, .12);
      color: #ef4444;
    }

    .model-btn.bind {
      background: rgba(168, 85, 247, .12);
      color: #a855f7;
    }

    .model-btn.probe {
      background: rgba(34, 211, 238, .12);
      color: #22d3ee;
      flex: 1 1 100%;
      min-width: 0;
    }

    .test-result {
      margin-top: 8px;
      padding: 6px 10px;
      border-radius: 6px;
      font-size: 10px;
      display: none;
    }

    .test-result.show {
      display: block;
    }

    .test-result.success {
      background: rgba(0, 208, 132, .1);
      color: #00d084;
    }

    .test-result.fail {
      background: rgba(239, 68, 68, .1);
      color: #ef4444;
    }

    /* ==================== 回答日志 ==================== */
    .log-item {
      padding: 12px;
      background: rgba(30, 30, 30, .4);
      border: 1px solid rgba(0, 208, 132, .06);
      border-radius: 8px;
      margin-bottom: 8px;
    }

    .log-q {
      font-size: 12px;
      color: #00d084;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .log-a {
      font-size: 12px;
      color: #94a3b8;
    }

    .log-time {
      font-size: 10px;
      color: #475569;
      margin-top: 4px;
    }

    .logs-date-picker {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      padding: 10px 12px;
      margin-bottom: 12px;
      border: 1px solid rgba(0, 208, 132, .12);
      border-radius: 10px;
      background: rgba(30, 30, 30, .35);
    }

    .logs-date-input-wrap {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: #94a3b8;
      font-size: 12px;
    }

    .logs-date-input {
      min-width: 180px;
      height: 34px;
      background: rgba(30, 30, 30, .55);
      color: #e2e8f0;
      border: 1px solid rgba(0, 208, 132, .16);
      border-radius: 8px;
      font-size: 12px;
      outline: none;
      padding: 0 10px;
    }

    .logs-date-input:focus {
      border-color: rgba(0, 208, 132, .45);
      box-shadow: 0 0 0 2px rgba(0, 208, 132, .12);
    }

    .logs-date-input::-webkit-calendar-picker-indicator {
      opacity: .95;
      cursor: pointer;
      filter: invert(72%) sepia(47%) saturate(742%) hue-rotate(108deg) brightness(98%) contrast(96%);
    }

    /* ==================== 聊天面板（嵌入右侧主区域底部） ==================== */
    .chat-panel {
      margin: 0;
      padding: 0;
      width: 100%;
      /* 默认高度显著提高，避免聊天区过矮 */
      min-height: 420px;
      height: calc(100vh - 210px);
      max-height: none;
      /* 与主内容区 .content、提示词编辑区背景一致 */
      background: rgba(30, 30, 30, .35);
      border: none;
      border-radius: 0;
      display: none;
      flex-direction: column;
      backdrop-filter: blur(24px);
      overflow: hidden;
      box-shadow: none;
    }

    .chat-panel.show {
      display: flex;
      /* 打开时占满主区域可用空间（除顶部区域） */
      flex: 1;
      min-height: 0;
    }

    .chat-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 14px 16px;
      border-bottom: 1px solid rgba(0, 208, 132, .12);
    }

    .chat-title {
      color: #00d084;
      font-size: 14px;
      font-weight: 700;
    }

    .chat-close {
      background: none;
      border: none;
      color: #64748b;
      font-size: 20px;
      cursor: pointer;
    }

    .chat-msgs {
      flex: 1;
      overflow-y: auto;
      padding: 14px;
      min-height: 0;
      max-height: none;
    }

    .msg {
      margin-bottom: 12px;
      display: flex;
      gap: 8px;
    }

    .msg.user {
      flex-direction: row-reverse;
    }

    .msg-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      flex-shrink: 0;
    }

    .msg.bot .msg-avatar {
      background: linear-gradient(135deg, #00d084, #00b4d8);
    }

    .msg.user .msg-avatar {
      background: linear-gradient(135deg, #3b82f6, #6366f1);
    }

    .msg-bubble {
      max-width: 75%;
      padding: 10px 14px;
      border-radius: 12px;
      font-size: 12px;
      line-height: 1.5;
    }

    .msg.bot .msg-bubble {
      background: rgba(26, 26, 26, .6);
      border: 1px solid rgba(0, 208, 132, .1);
    }

    .msg.user .msg-bubble {
      background: rgba(59, 130, 246, .15);
      border: 1px solid rgba(59, 130, 246, .15);
    }

    .msg-voice {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 10px 12px;
      border-radius: 18px;
      font-size: 11px;
      color: #94a3b8;
      cursor: pointer;
      max-width: 75%;
      border: 1px solid rgba(0, 208, 132, .10);
      background: rgba(30, 30, 30, .35);
    }

    .msg-voice .wave-bars {
      display: flex;
      gap: 2px;
      align-items: center;
      height: 20px;
    }

    .msg-voice .wave-bar {
      width: 3px;
      background: #00d084;
      border-radius: 2px;
      animation: none;
    }

    .msg-voice.live .wave-bar {
      animation: wave-anim .6s infinite alternate;
    }

    .msg.user .msg-voice {
      background: rgba(0, 208, 132, .15);
      border-color: rgba(0, 208, 132, .18);
      color: #00d084;
    }

    .msg.bot .msg-voice {
      background: rgba(26, 26, 26, .6);
      border-color: rgba(0, 208, 132, .10);
      color: #94a3b8;
    }

    .msg.bot .msg-voice .wave-bar {
      background: rgba(190, 190, 194, .88);
    }

    .msg-voice .voice-play {
      flex-shrink: 0;
      font-size: 12px;
      transform: translateY(1px);
    }

    .msg-voice .voice-time {
      flex-shrink: 0;
      font-size: 10px;
      font-weight: 900;
      color: inherit;
      opacity: .95;
    }

    .msg-voice .wave-bar:nth-child(2) {
      animation-delay: .1s;
    }

    .msg-voice .wave-bar:nth-child(3) {
      animation-delay: .2s;
    }

    .msg-voice .wave-bar:nth-child(4) {
      animation-delay: .3s;
    }

    .msg-voice .wave-bar:nth-child(5) {
      animation-delay: .4s;
    }

    @keyframes wave-anim {
      from {
        height: 4px;
      }

      to {
        height: 18px;
      }
    }

    .chat-input-area {
      border-top: 1px solid rgba(0, 208, 132, .12);
      padding: 10px 14px;
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .chat-mode-btn,
    .chat-upload-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: rgba(0, 208, 132, .15);
      color: #00d084;
      font-size: 16px;
      cursor: pointer;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all .2s;
    }

    .chat-mode-btn:hover,
    .chat-upload-btn:hover {
      background: rgba(0, 208, 132, .25);
    }

    .chat-upload-wrap {
      position: relative;
      flex-shrink: 0;
      width: 36px;
      height: 36px;
    }

    .chat-upload-menu {
      display: none;
      position: absolute;
      bottom: calc(100% + 10px);
      left: 0;
      min-width: 196px;
      padding: 8px;
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(34, 34, 36, .98) 0%, rgba(18, 18, 20, .99) 100%);
      border: 1px solid rgba(0, 208, 132, .22);
      box-shadow: 0 16px 44px rgba(0, 0, 0, .48);
      z-index: 80;
    }

    .chat-upload-menu.show {
      display: block;
    }

    .chat-upload-menu-item {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      margin: 0;
      border: none;
      border-radius: 8px;
      background: transparent;
      color: #e8e8ec;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      text-align: left;
      transition: background .15s, color .15s;
    }

    .chat-upload-menu-item:hover {
      background: rgba(0, 208, 132, .12);
      color: #00d084;
    }

    .chat-upload-menu-ico {
      font-size: 16px;
      line-height: 1;
      width: 22px;
      text-align: center;
      flex-shrink: 0;
    }

    /* 全局自动播报按钮：与现有输入区按钮保持同尺寸，避免破坏布局 */
    .chat-voice-toggle-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: rgba(0, 208, 132, .15);
      color: #00d084;
      font-size: 15px;
      cursor: pointer;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all .2s;
    }

    /* 开关 hover 态：只增加反馈，不改变结构 */
    .chat-voice-toggle-btn:hover {
      background: rgba(0, 208, 132, .25);
    }

    /* 静音状态：降低高亮，提示当前不自动播报 */
    .chat-voice-toggle-btn.off {
      background: rgba(42, 42, 42, .22);
      color: #94a3b8;
    }

    /* 电脑端不展示自动播报开关（与 isMobileLayout 一致，仅手机端自动播报） */
    @media (min-width: 769px) {
      #global_voice_toggle_btn {
        display: none !important;
      }
    }

    .chat-text-input {
      flex: 1;
      background: rgba(30, 30, 30, .6);
      border: 1px solid rgba(0, 208, 132, .15);
      border-radius: 20px;
      padding: 8px 14px;
      color: #fff;
      font-size: 12px;
      outline: none;
      resize: none;
      max-height: 80px;
      min-height: 36px;
      line-height: 1.4;
      font-family: inherit;
    }

    .chat-text-input:focus {
      border-color: #00d084;
    }

    .chat-send {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: linear-gradient(135deg, #00d084, #00b4d8);
      color: #0a0f1e;
      font-size: 14px;
      cursor: pointer;
      flex-shrink: 0;
      transition: all .2s;
    }

    .chat-send:hover {
      transform: scale(1.05);
    }

    .chat-send:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      transform: none;
    }

    .voice-record-area {
      display: none;
      flex: 1 1 auto;
      padding: 0;
      min-height: 36px;
      height: 100%;
      flex-direction: row;
      align-items: stretch;
      justify-content: center;
      text-align: center;
      gap: 0;
    }

    .voice-record-area.show {
      display: flex;
    }

    .voice-record-btn {
      width: 100%;
      height: 100%;
      min-height: 36px;
      padding: 8px 14px;
      border: none;
      border-radius: 20px;
      background: linear-gradient(135deg, #00d084, #00b4d8);
      color: #0a0f1e;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      user-select: none;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      transition: all .2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .voice-record-btn:active {
      transform: scale(.97);
      background: linear-gradient(135deg, #00b4d8, #00d084);
    }

    .voice-record-btn.recording {
      background: linear-gradient(135deg, #ef4444, #f87171);
    }

    .voice-timer,
    .voice-wave,
    .voice-wave .vbar,
    .voice-cancel-hint {
      display: none !important;
    }

    .voice-btn-icon {
      font-size: 16px;
      line-height: 1;
      transform: translateY(1px);
    }

    .voice-btn-text {
      font-weight: 800;
      letter-spacing: .2px;
    }

    /* ==================== 模态框 ==================== */
    .modal-bg {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: var(--modal-overlay);
      align-items: center;
      justify-content: center;
      z-index: 200;
    }

    .modal-bg.show {
      display: flex;
    }

    .app-dialog-bg {
      z-index: 11000;
    }

    .app-dialog-card {
      max-width: 420px;
      border-radius: 14px;
      border: 1px solid rgba(0, 208, 132, .22);
      background: var(--modal-surface);
      box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
    }

    .app-dialog-title {
      font-size: 15px;
      font-weight: 800;
      color: #00d084;
    }

    .app-dialog-message {
      font-size: 13px;
      color: #cbd5e1;
      line-height: 1.65;
      white-space: pre-wrap;
      min-height: 40px;
    }

    .modal {
      background: var(--modal-surface);
      border: 1px solid rgba(0, 208, 132, .22);
      border-radius: 16px;
      padding: 24px;
      max-width: 500px;
      width: 92%;
      max-height: 85vh;
      overflow-y: auto;
    }

    .modal-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }

    .modal-title {
      font-size: 16px;
      font-weight: 700;
      color: #00d084;
    }

    .modal-x {
      background: none;
      border: none;
      color: #64748b;
      font-size: 22px;
      cursor: pointer;
      width: 30px;
      height: 30px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .modal-x:hover {
      background: rgba(239, 68, 68, .1);
      color: #ef4444;
    }

    /* 权限：登录弹窗（高于设置层） */
    .perm-auth-modal-bg {
      z-index: 10050;
    }

    .perm-auth-card {
      max-width: 420px;
    }

    .perm-auth-tabs {
      display: flex;
      gap: 0;
      margin-bottom: 16px;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid rgba(148, 163, 184, .25);
    }

    .perm-auth-tab {
      flex: 1;
      padding: 10px 14px;
      font-size: 13px;
      font-weight: 600;
      border: none;
      background: var(--modal-surface-2);
      color: #94a3b8;
      cursor: pointer;
      transition: background .15s, color .15s;
    }

    .perm-auth-tab.active {
      background: #142922;
      color: #4ade80;
    }

    body.theme-light .perm-auth-tab {
      background: var(--modal-surface-2);
      color: #64748b;
    }

    body.theme-light .perm-auth-tab.active {
      background: #d1fae5;
      color: #047857;
    }

    .perm-wb-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 16px;
      padding-bottom: 14px;
      border-bottom: 1px solid rgba(0, 208, 132, .12);
    }

    .perm-wb-title {
      font-size: 20px;
      font-weight: 800;
      color: #e2e8f0;
      letter-spacing: .02em;
    }

    .perm-wb-sub {
      font-size: 12px;
      color: #64748b;
    }

    .perm-wb-card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 12px;
    }

    .perm-wb-card {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      min-height: 92px;
      padding: 14px 16px;
      border-radius: 12px;
      border: 1px solid rgba(148, 163, 184, .22);
      background: linear-gradient(145deg, rgba(26, 26, 26, .85), rgba(30, 30, 30, .65));
      color: #e2e8f0;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      text-align: left;
      transition: transform .12s, border-color .12s, box-shadow .12s;
    }

    .perm-wb-card:hover {
      border-color: rgba(0, 208, 132, .45);
      box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
      transform: translateY(-2px);
    }

    .perm-role-manage {
      margin-top: 20px;
      padding-top: 16px;
      border-top: 1px solid rgba(148, 163, 184, .15);
    }

    .perm-role-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .perm-role-table th,
    .perm-role-table td {
      padding: 8px 10px;
      text-align: left;
      border-bottom: 1px solid rgba(51, 65, 85, .5);
    }

    .perm-role-table th {
      color: #64748b;
      font-weight: 600;
    }

    .perm-role-actions {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .perm-role-actions button {
      font-size: 11px;
      padding: 4px 8px;
    }

    .perm-role-list-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
      gap: 8px;
    }

    .perm-role-card {
      border: 1px solid rgba(148, 163, 184, .22);
      border-radius: 10px;
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      background: linear-gradient(145deg, rgba(26, 26, 26, .38), rgba(30, 30, 30, .42));
      transition: border-color .12s, transform .12s;
    }

    .perm-role-card:hover {
      border-color: rgba(0, 208, 132, .32);
      transform: translateY(-1px);
    }

    .perm-role-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .perm-role-card-name {
      font-size: 13px;
      font-weight: 700;
      color: #e2e8f0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .perm-role-card-level {
      font-size: 11px;
      color: #94a3b8;
      background: rgba(30, 30, 30, .62);
      border: 1px solid rgba(148, 163, 184, .2);
      border-radius: 999px;
      padding: 1px 8px;
      line-height: 18px;
      flex-shrink: 0;
    }

    .perm-role-card-actions {
      display: flex;
      gap: 6px;
    }

    .perm-role-card-actions .btn-save,
    .perm-role-card-actions .btn-cancel {
      flex: 1;
      min-width: 0;
      height: 28px;
      padding: 0 6px;
      font-size: 11px;
      border-radius: 8px;
    }

    /* ==================== 空状态 ==================== */
    .empty {
      text-align: center;
      color: #64748b;
      padding: 60px 20px;
    }

    .empty-icon {
      font-size: 48px;
      margin-bottom: 16px;
    }

    /* ==================== 响应式 ==================== */
    @media(max-width:768px) {
      .model-grid {
        grid-template-columns: 1fr;
      }
    }

    /* ==================== 移动端底部导航 / 抽屉（默认隐藏，见下方 max-width 媒体查询） ==================== */
    .mobile-nav-backdrop,
    .mobile-bottom-nav {
      display: none;
    }

    /* ==================== 侧边栏底角：登录 / 个人设置坞 ==================== */
    .user-dock-wrap {
      position: absolute;
      left: 10px;
      bottom: 10px;
      z-index: 25;
      pointer-events: none;
    }

    .user-dock-fab,
    .user-dock-panel {
      pointer-events: auto;
    }

    .user-dock-fab {
      position: relative;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      border: 1px solid rgba(0, 208, 132, .35);
      background: linear-gradient(145deg, rgba(10, 22, 20, .95), rgba(8, 16, 24, .98));
      box-shadow: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform .2s cubic-bezier(.22, 1, .36, 1), border-color .2s;
    }

    .user-dock-fab:hover {
      transform: translateY(-2px);
      border-color: rgba(0, 208, 132, .45);
      box-shadow: none;
    }

    .user-dock-fab.is-open {
      border-color: rgba(0, 208, 132, .45);
      box-shadow: none;
    }

    .user-dock-fab-face {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      line-height: 1;
      background: rgba(0, 208, 132, .1);
      border: 1px solid rgba(0, 208, 132, .18);
      box-shadow: none;
    }

    .user-dock-fab-face img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .user-dock-fab-row {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 12px;
      pointer-events: none;
      max-width: min(100%, calc(100vw - 20px));
    }

    .user-dock-fab-row .user-dock-fab {
      flex-shrink: 0;
      pointer-events: auto;
    }

    .user-dock-fab-meta {
      pointer-events: none;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      min-width: 0;
      max-width: min(200px, calc(100vw - 88px));
      padding: 2px 0;
    }

    .user-dock-fab-meta[hidden] {
      display: none !important;
    }

    .user-dock-fab-meta-nick {
      font-size: clamp(16px, 2.1vw, 19px);
      font-weight: 800;
      letter-spacing: -0.03em;
      line-height: 1.12;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      color: #e8f5f0;
    }

    body.theme-light .user-dock-fab-meta-nick {
      color: #047857;
    }

    .user-dock-panel {
      position: absolute;
      left: 0;
      bottom: 58px;
      width: min(360px, calc(100vw - 24px));
      max-height: min(72vh, 520px);
      display: flex;
      flex-direction: column;
      z-index: 24;
      background: var(--modal-surface);
      border: 1px solid rgba(0, 208, 132, .35);
      border-radius: 14px;
      box-shadow:
        0 0 0 1px rgba(0, 180, 216, .1),
        0 0 40px rgba(0, 208, 132, .12),
        0 24px 64px rgba(0, 0, 0, .55);
      transform-origin: bottom left;
      opacity: 0;
      visibility: hidden;
      transform: translateY(10px) scale(.98);
      pointer-events: none;
      transition:
        opacity .22s cubic-bezier(.22, 1, .36, 1),
        transform .22s cubic-bezier(.22, 1, .36, 1),
        visibility .22s;
    }

    .user-dock-panel.is-open {
      opacity: 1;
      visibility: visible;
      transform: translateY(0) scale(1);
      pointer-events: auto;
    }

    .user-dock-tabs {
      display: flex;
      gap: 0;
      border-bottom: 1px solid rgba(0, 208, 132, .15);
      flex-shrink: 0;
    }

    .user-dock-tabs button {
      flex: 1;
      padding: 11px 10px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .3px;
      border: none;
      background: transparent;
      color: #64748b;
      cursor: pointer;
      transition: color .18s, background .18s;
      border-radius: 14px 14px 0 0;
    }

    .user-dock-tabs button:hover {
      color: #94a3b8;
      background: rgba(0, 208, 132, .05);
    }

    .user-dock-tabs button.active {
      color: #00d084;
      background: rgba(0, 208, 132, .08);
      box-shadow: inset 0 -2px 0 #00d084;
    }

    .user-dock-scroll {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      padding: 12px 14px 14px;
    }

    .user-dock-avatar-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .user-dock-avatar-big {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      overflow: hidden;
      flex-shrink: 0;
      border: 1px solid rgba(0, 208, 132, .35);
      box-shadow: 0 0 20px rgba(0, 208, 132, .15);
      background: rgba(0, 208, 132, .1);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
    }

    .user-dock-avatar-big img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .user-dock-avatar-hint {
      font-size: 11px;
      color: #64748b;
      margin: 0;
      line-height: 1.4;
      max-width: 220px;
    }

    .user-dock-avatar-big.user-dock-avatar--loading,
    #user_dock_fab_face.user-dock-avatar--loading {
      position: relative;
      animation: user-dock-avatar-pulse 0.9s ease-in-out infinite;
    }

    @keyframes user-dock-avatar-pulse {
      0% {
        opacity: 1;
      }

      50% {
        opacity: 0.55;
      }

      100% {
        opacity: 1;
      }
    }

    .user-dock-btn-neon {
      display: block;
      width: 100%;
      margin-top: 4px;
      padding: 10px 14px;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .4px;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      color: #06120e;
      background: linear-gradient(135deg, #00d084, #00b4d8);
      box-shadow: 0 4px 18px rgba(0, 208, 132, .28);
      transition: transform .16s, box-shadow .16s;
    }

    .user-dock-btn-neon:hover:not(:disabled) {
      transform: translateY(-1px);
      box-shadow: 0 6px 22px rgba(0, 208, 132, .38);
    }

    .user-dock-btn-neon:disabled {
      opacity: .45;
      cursor: not-allowed;
      transform: none;
    }

    .user-dock-row-split {
      display: flex;
      gap: 8px;
      align-items: stretch;
    }

    .user-dock-row-split .fi {
      flex: 1;
      min-width: 0;
    }

    .user-dock-email-code-btn {
      flex-shrink: 0;
      min-width: 108px;
      padding: 9px 10px;
      font-size: 11px;
      font-weight: 700;
      border-radius: 8px;
      border: 1px solid rgba(0, 208, 132, .35);
      background: rgba(0, 208, 132, .1);
      color: #00d084;
      cursor: pointer;
      transition: all .18s;
    }

    .user-dock-email-code-btn:hover:not(:disabled) {
      background: rgba(0, 208, 132, .16);
      border-color: rgba(0, 208, 132, .5);
    }

    .user-dock-email-code-btn:disabled {
      opacity: .55;
      cursor: not-allowed;
    }

    .user-dock-msg {
      font-size: 11px;
      min-height: 18px;
      margin: 2px 0 10px;
      color: #f87171;
      line-height: 1.4;
    }

    .user-dock-msg.user-dock-msg--info {
      color: #7dd3fc;
    }

    .user-dock-msg.user-dock-msg--ok {
      color: #4ade80;
    }

    .user-dock-msg:empty {
      display: none;
    }

    .user-dock-switch-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 0;
      border-bottom: 1px solid rgba(0, 208, 132, .1);
      font-size: 12px;
      color: #cbd5e1;
    }

    .user-dock-switch-row:last-child {
      border-bottom: none;
    }

    .user-dock-switch-row span:first-child {
      font-weight: 600;
      color: #94a3b8;
    }

    .user-dock-switch {
      position: relative;
      width: 44px;
      height: 24px;
      flex-shrink: 0;
    }

    .user-dock-switch input {
      opacity: 0;
      width: 0;
      height: 0;
      position: absolute;
    }

    .user-dock-switch-slider {
      position: absolute;
      inset: 0;
      border-radius: 999px;
      background: rgba(30, 30, 34, .9);
      border: 1px solid rgba(0, 208, 132, .2);
      cursor: pointer;
      transition: background .2s, border-color .2s;
    }

    .user-dock-switch-slider::after {
      content: '';
      position: absolute;
      width: 18px;
      height: 18px;
      left: 3px;
      top: 2px;
      border-radius: 50%;
      background: #64748b;
      transition: transform .2s cubic-bezier(.22, 1, .36, 1), background .2s;
    }

    .user-dock-switch input:checked+.user-dock-switch-slider {
      background: rgba(0, 208, 132, .2);
      border-color: rgba(0, 208, 132, .45);
    }

    .user-dock-switch input:checked+.user-dock-switch-slider::after {
      transform: translateX(20px);
      background: #00d084;
    }

    .user-dock-btn-ghost {
      width: 100%;
      margin-top: 8px;
      padding: 9px 12px;
      font-size: 12px;
      font-weight: 700;
      border-radius: 8px;
      border: 1px solid rgba(248, 113, 113, .35);
      background: rgba(248, 113, 113, .08);
      color: #f87171;
      cursor: pointer;
      transition: all .18s;
    }

    .user-dock-btn-ghost:hover {
      background: rgba(248, 113, 113, .14);
      border-color: rgba(248, 113, 113, .5);
    }

    .user-dock-hint {
      font-size: 11px;
      color: #64748b;
      line-height: 1.45;
      margin-top: 8px;
    }

    .user-dock-im-wrap {
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid rgba(148, 163, 184, .22);
    }

    .user-dock-im-title {
      font-size: 13px;
      font-weight: 800;
      color: #e2e8f0;
      letter-spacing: .02em;
    }

    .user-dock-im-plat {
      margin-bottom: 12px;
      padding: 10px 10px 8px;
      border-radius: 10px;
      background: rgba(15, 23, 42, .45);
      border: 1px solid rgba(148, 163, 184, .12);
    }

    .user-dock-im-plat-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
      font-size: 12px;
      font-weight: 700;
      color: #94a3b8;
    }

    .user-dock-im-mini {
      font-size: 11px;
      font-weight: 600;
      color: #cbd5e1;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
    }

    .user-dock-im-url {
      font-size: 10px;
      line-height: 1.4;
      color: #64748b;
      word-break: break-all;
      margin: 6px 0 4px;
      padding: 6px 8px;
      border-radius: 6px;
      background: rgba(0, 0, 0, .2);
    }

    .user-dock-im-dis {
      margin-top: 6px;
      width: 100%;
    }

    body.theme-light .user-dock-im-title {
      color: #0f172a;
    }

    body.theme-light .user-dock-im-plat {
      background: rgba(248, 250, 252, .92);
      border-color: rgba(148, 163, 184, .25);
    }

    body.theme-light {
      --modal-overlay: #64748b;
      --modal-surface: #f8fafc;
      --modal-surface-2: #f1f5f9;
      background: #eef2f7 !important;
      color: #0f172a;
      color-scheme: light;
    }

    body.theme-light .sidebar {
      background: rgba(252, 252, 254, .96);
      border-right-color: rgba(0, 208, 132, .2);
    }

    body.theme-light .sec-title {
      color: #059669;
    }

    body.theme-light .main-header {
      border-bottom-color: rgba(0, 208, 132, .14);
    }

    body.theme-light .main-title {
      color: #0f172a;
    }

    body.theme-light .content {
      background: rgba(255, 255, 255, .5);
    }

    body.theme-light .fi {
      background: rgba(255, 255, 255, .9);
      border-color: rgba(0, 208, 132, .22);
      color: #0f172a;
    }

    body.theme-light .fi::placeholder {
      color: #64748b;
    }

    body.theme-light .agent-search {
      background: rgba(255, 255, 255, .85);
      color: #0f172a;
    }

    body.theme-light .cat-head {
      background: rgba(241, 245, 249, .9);
    }

    body.theme-light .cat-agent {
      color: #475569;
    }

    body.theme-light .agent-card {
      background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .98));
      border-color: rgba(0, 208, 132, .1);
    }

    body.theme-light .chat-panel {
      background: rgba(255, 255, 255, .94);
      border: none;
      margin: 0;
      padding: 0;
    }

    body.theme-light .user-dock-panel {
      background: rgba(255, 255, 255, .96);
      border-color: rgba(0, 208, 132, .28);
      box-shadow: 0 0 40px rgba(0, 100, 80, .08), 0 20px 50px rgba(15, 23, 42, .12);
    }

    body.theme-light .user-dock-msg.user-dock-msg--info {
      color: #0369a1;
    }

    body.theme-light .user-dock-msg.user-dock-msg--ok {
      color: #15803d;
    }

    body.theme-light .user-dock-tabs button {
      color: #64748b;
    }

    body.theme-light .user-dock-tabs button.active {
      color: #059669;
      background: rgba(0, 208, 132, .1);
      box-shadow: inset 0 -2px 0 #059669;
    }

    body.theme-light .user-dock-switch-row span:first-child {
      color: #475569;
    }

    body.theme-light .user-dock-switch-row {
      color: #0f172a;
    }

    /* ==================== [新增] 全屏居中设置弹窗 ==================== */
    .settings-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 999;
      background: var(--modal-overlay);
      align-items: center;
      justify-content: center;
      padding: 24px 15px;
    }

    .settings-overlay.show {
      display: flex;
    }

    .settings-modal {
      width: min(980px, 100%);
      max-height: calc(100vh - 48px);
      overflow: auto;
      border-radius: 20px;
      border: 1px solid rgba(0, 208, 132, .22);
      background: var(--modal-surface);
      box-shadow: 0 40px 140px rgba(0, 0, 0, .72);
      transform-origin: center;
    }

    .settings-modal-head {
      padding: 16px 18px;
      border-bottom: 1px solid rgba(0, 208, 132, .12);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .settings-modal-title {
      font-size: 16px;
      font-weight: 900;
      color: #00d084;
      letter-spacing: .3px;
    }

    .settings-modal-close {
      background: rgba(239, 68, 68, .12);
      border: 1px solid rgba(239, 68, 68, .22);
      color: #ef4444;
      border-radius: 12px;
      width: 34px;
      height: 34px;
      cursor: pointer;
      font-size: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform .16s;
    }

    .settings-modal-close:hover {
      transform: translateY(-1px);
    }

    .settings-modal-body {
      padding: 14px 18px 18px;
    }

    @keyframes settings-in {
      from {
        transform: translateY(8px) scale(.98);
        opacity: .3;
      }

      to {
        transform: translateY(0) scale(1);
        opacity: 1;
      }
    }

    .settings-head {
      padding: 14px 16px;
      border-bottom: 1px solid rgba(0, 208, 132, .12);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .settings-title {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 14px;
      font-weight: 800;
      color: #00d084;
      letter-spacing: .3px;
    }

    .settings-close {
      background: none;
      border: none;
      color: #64748b;
      cursor: pointer;
      font-size: 22px;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      transition: all .16s;
    }

    .settings-close:hover {
      background: rgba(239, 68, 68, .12);
      color: #ef4444;
    }

    .settings-body {
      padding: 14px 16px 16px;
      overflow: auto;
    }

    .settings-section {
      margin-bottom: 14px;
      padding: 12px 12px;
      border-radius: 12px;
      border: 1px solid rgba(0, 208, 132, .08);
      background: rgba(26, 26, 26, .28);
    }

    .settings-section-title {
      font-size: 12px;
      font-weight: 800;
      color: #00d084;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .settings-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .settings-action {
      border: 1px solid rgba(0, 208, 132, .12);
      background: rgba(30, 30, 30, .5);
      color: #e2e8f0;
      cursor: pointer;
      border-radius: 12px;
      padding: 9px 10px;
      font-size: 12px;
      font-weight: 700;
      transition: all .16s;
      text-align: left;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .settings-action:hover {
      border-color: rgba(0, 208, 132, .28);
      background: rgba(0, 208, 132, .07);
      transform: translateY(-1px);
    }

    .settings-action.active {
      border-color: rgba(0, 208, 132, .45);
      background: rgba(0, 208, 132, .12);
      color: #00d084;
      box-shadow: 0 10px 30px rgba(0, 208, 132, .12);
    }

    .settings-note {
      color: #94a3b8;
      font-size: 12px;
      line-height: 1.5;
    }

    .settings-divider {
      height: 1px;
      background: rgba(0, 208, 132, .12);
      margin: 12px 0;
    }

    /* ==================== 紧凑布局（样式设置示例） ==================== */
    body.compact-layout .sidebar {
      width: 260px;
      min-width: 260px;
    }

    body.compact-layout .cat-section,
    body.compact-layout .agent-section {
      padding: 10px;
    }

    body.compact-layout .main {
      margin-left: 0;
    }

    /* 移动端：底部双按钮 + 自底部上滑抽屉（复用 #sidebar 内分类/列表 DOM，不重复 id） */
    @media (max-width: 768px) {

      .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        height: calc(52px + env(safe-area-inset-bottom, 0px));
        padding: 0 10px env(safe-area-inset-bottom, 0px);
        gap: 10px;
        align-items: flex-start;
        justify-content: center;
        padding-top: 8px;
        background: var(--modal-surface);
        border-top: 1px solid rgba(0, 208, 132, .22);
        box-shadow: 0 -8px 32px rgba(0, 0, 0, .35);
      }

      .mobile-nav-btn {
        flex: 1;
        max-width: 200px;
        height: 40px;
        border-radius: 12px;
        border: 1px solid rgba(0, 208, 132, .22);
        background: var(--modal-surface-2);
        color: #e2e8f0;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        transition: border-color .18s, background .18s, color .18s, transform .12s;
      }

      .mobile-nav-btn:active {
        transform: scale(.98);
      }

      .mobile-nav-btn.active {
        border-color: rgba(0, 208, 132, .5);
        background: rgba(0, 208, 132, .14);
        color: #00d084;
        box-shadow: 0 6px 20px rgba(0, 208, 132, .12);
      }

      .mobile-nav-backdrop {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        bottom: calc(52px + env(safe-area-inset-bottom, 0px));
        z-index: 198;
        background: var(--modal-overlay);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .22s ease, visibility .22s ease;
      }

      .mobile-nav-backdrop.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
      }

      #main_splitter {
        display: none !important;
      }

      .app .main {
        flex: 1;
        min-width: 0;
        min-height: 0;
        padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
      }

      /* 移动端聊天区：在保留顶部区域前提下尽量占满剩余高度 */
      .chat-panel {
        min-height: 55vh;
        height: calc(100vh - 170px - env(safe-area-inset-bottom, 0px));
      }

      #sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(52px + env(safe-area-inset-bottom, 0px));
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: min(72vh, 560px);
        max-height: 72vh;
        border-right: none;
        border-top: 1px solid rgba(0, 208, 132, .16);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -20px 60px rgba(0, 0, 0, .45);
        transform: translateY(calc(100% + 24px));
        transition: transform .3s cubic-bezier(.22, 1, .36, 1);
        z-index: 199;
        flex-direction: column;
        overscroll-behavior: contain;
        pointer-events: none;
      }

      #sidebar.mobile-drawer-open {
        transform: translateY(0);
        pointer-events: auto;
      }

      #sidebar.mobile-drawer-cats .agent-section {
        display: none !important;
      }

      #sidebar.mobile-drawer-agents .cat-section {
        display: none !important;
      }

      #sidebar.mobile-drawer-cats .cat-section,
      #sidebar.mobile-drawer-agents .agent-section {
        height: 100% !important;
        max-height: none !important;
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
      }

      #sidebar.mobile-drawer-cats .cat-list {
        flex: 1;
        min-height: 0;
      }

      #sidebar.mobile-drawer-agents .agent-list {
        flex: 1;
        min-height: 0;
      }

      body.mobile-nav-drawer-open {
        overflow: hidden;
      }

      /* 刘海/圆角屏安全区，避免顶栏贴边 */
      .main-header {
        flex-wrap: wrap;
        gap: 8px;
        padding-top: max(10px, env(safe-area-inset-top, 0px));
        padding-left: max(12px, env(safe-area-inset-left, 0px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
      }

      .main-title-wrap {
        flex: 1;
        min-width: 0;
      }

      .main-title {
        font-size: clamp(15px, 4.2vw, 20px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
      }

      /* iOS：输入框/下拉字号 <16px 时聚焦会强制整页缩放 */
      .agent-search,
      textarea.chat-text-input,
      input.fi,
      select.fi,
      textarea.fi {
        font-size: 16px;
      }

      /* 全屏设置内按钮单列更易点按 */
      .settings-grid {
        grid-template-columns: 1fr;
      }

      .settings-overlay {
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
      }
    }

    /* ==================== Skills 自动化模块 ==================== */
    .skills-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: var(--modal-overlay);
      align-items: center;
      justify-content: center;
      padding: 20px 14px;
    }

    .skills-overlay.show {
      display: flex;
    }

    .skills-modal {
      width: min(1280px, 98vw);
      height: calc(100vh - 12px);
      max-height: calc(100vh - 12px);
      display: flex;
      flex-direction: column;
      border-radius: 18px;
      border: 1px solid rgba(0, 208, 132, .22);
      background: var(--modal-surface);
      box-shadow: 0 32px 100px rgba(0, 0, 0, .65);
      overflow: hidden;
    }

    .skills-modal-head {
      padding: 14px 16px;
      border-bottom: 1px solid rgba(0, 208, 132, .12);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-shrink: 0;
    }

    .skills-modal-title {
      font-size: 17px;
      font-weight: 900;
      color: #00d084;
      letter-spacing: .2px;
    }

    .skills-modal-close {
      background: rgba(239, 68, 68, .12);
      border: 1px solid rgba(239, 68, 68, .22);
      color: #ef4444;
      border-radius: 10px;
      width: 34px;
      height: 34px;
      cursor: pointer;
      font-size: 22px;
      line-height: 1;
    }

    .skills-tab-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 10px 14px;
      border-bottom: 1px solid rgba(148, 163, 184, .15);
      flex-shrink: 0;
    }

    .skills-tab {
      border: 1px solid rgba(0, 208, 132, .2);
      background: var(--modal-surface-2);
      color: #cbd5e1;
      padding: 7px 12px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
    }

    .skills-tab.active {
      background: #0f3d2e;
      color: #f8fafc;
      border-color: rgba(0, 208, 132, .5);
    }

    .skills-modal-body {
      padding: 10px 14px 14px;
      overflow: auto;
      flex: 1;
      min-height: 0;
    }

    .skills-panel {
      display: none;
    }

    .skills-panel.active {
      display: block;
    }

    .skills-lead {
      font-size: 12px;
      color: #cbd5e1;
      line-height: 1.55;
      margin-bottom: 12px;
    }

    .skills-muted {
      color: #64748b;
      font-size: 13px;
    }

    .skills-scroll-box {
      max-height: min(62vh, 760px);
      overflow: auto;
      margin-bottom: 12px;
    }

    .skills-log-scroll {
      max-height: min(420px, 48vh);
    }

    .skills-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .skills-table th,
    .skills-table td {
      border-bottom: 1px solid rgba(51, 65, 85, .6);
      padding: 8px 6px;
      text-align: left;
    }

    .skills-table th {
      color: #00d084;
      font-weight: 800;
    }

    .skills-td-actions {
      white-space: nowrap;
    }

    .skills-td-flow,
    .skills-td-del {
      white-space: nowrap;
      vertical-align: middle;
    }

    .skills-flow-banner {
      font-size: 13px;
      line-height: 1.55;
      margin-bottom: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid rgba(51, 65, 85, 0.55);
      background: var(--modal-surface-2);
      color: #e2e8f0;
    }

    .skills-badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 800;
    }

    .skills-badge.on {
      background: rgba(0, 208, 132, .2);
      color: #4ade80;
    }

    .skills-badge.off {
      background: rgba(148, 163, 184, .15);
      color: #94a3b8;
    }

    .skills-inline-form {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .skills-template-hints {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      margin-top: 8px;
    }

    .skills-hint-label {
      font-size: 12px;
      color: #94a3b8;
      margin-right: 4px;
    }

    .skills-name-cell {
      font-weight: 600;
      color: #e2e8f0;
    }

    .skills-id-muted {
      font-size: 11px;
      color: #64748b;
      word-break: break-all;
    }

    .skills-desc-cell {
      font-size: 12px;
      color: #cbd5e1;
      max-width: 220px;
    }

    .skills-field {
      margin-bottom: 12px;
    }

    .skills-label {
      display: block;
      font-size: 12px;
      font-weight: 700;
      color: #cbd5e1;
      margin-bottom: 6px;
    }

    .skills-hr {
      border: none;
      border-top: 1px solid rgba(51, 65, 85, .55);
      margin: 16px 0;
    }

    .skills-check {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: #e2e8f0;
      cursor: pointer;
    }

    .skills-btn-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .skills-progress-wrap {
      height: 8px;
      background: rgba(51, 65, 85, .5);
      border-radius: 999px;
      margin-top: 12px;
      overflow: hidden;
    }

    .skills-progress-bar {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, #00d084, #00b4d8);
      transition: width .25s ease;
    }

    .skills-textarea {
      width: 100%;
      resize: vertical;
      min-height: 72px;
    }

    .skills-pre {
      margin-top: 12px;
      padding: 10px;
      background: rgba(10, 10, 12, .85);
      border: 1px solid rgba(51, 65, 85, .6);
      border-radius: 10px;
      font-size: 11px;
      color: #a5b4fc;
      overflow: auto;
      max-height: 200px;
    }

    .skills-flow-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .skills-flow-canvas {
      margin-top: 12px;
      padding: 10px;
      border-radius: 12px;
      border: 1px dashed rgba(0, 208, 132, .22);
      background: rgba(10, 10, 12, .35);
      min-height: 120px;
    }

    .skills-flow-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      padding: 8px;
      margin-bottom: 8px;
      border-radius: 10px;
      background: rgba(30, 30, 34, .75);
      border: 1px solid rgba(51, 65, 85, .45);
    }

    .skills-flow-handle {
      cursor: grab;
      color: #64748b;
      user-select: none;
      font-size: 14px;
    }

    .skills-flow-type {
      min-width: 140px;
    }

    .skills-flow-params {
      flex: 1 1 200px;
      min-width: 160px;
    }

    .skills-step-fields {
      flex: 1 1 260px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px 12px;
      align-items: flex-start;
    }

    .skills-step-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 12px;
      color: #cbd5e1;
      min-width: 140px;
    }

    .skills-step-field-block {
      flex: 1 1 100%;
      min-width: 200px;
    }

    .skills-step-inp {
      min-width: 180px;
    }

    .skills-flow-debug {
      margin-top: 12px;
    }

    .skills-debug-title {
      font-weight: 600;
      font-size: 14px;
      margin: 0 0 6px;
      color: #e2e8f0;
    }

    .skills-debug-hint {
      font-size: 12px;
      margin: 0 0 10px;
      line-height: 1.45;
    }

    .skills-log-line {
      font-size: 12px;
      padding: 6px 8px;
      border-radius: 8px;
      margin-bottom: 6px;
      border: 1px solid rgba(51, 65, 85, .5);
      background: var(--modal-surface-2);
    }

    .skills-log-ts {
      color: #64748b;
      margin-right: 6px;
    }

    .skills-log-msg {
      color: #e2e8f0;
    }

    .skills-log-error .skills-log-msg {
      color: #fca5a5;
    }

    .skills-log-warn .skills-log-msg {
      color: #fcd34d;
    }

    body.theme-light .skills-modal {
      background: var(--modal-surface);
      border-color: rgba(0, 208, 132, .28);
    }

    body.theme-light .skills-flow-banner {
      background: var(--modal-surface-2);
      color: #0f172a;
      border-color: rgba(148, 163, 184, 0.45);
    }

    body.theme-light .skills-lead {
      color: #475569;
    }

    body.theme-light .skills-name-cell {
      color: #0f172a;
    }

    body.theme-light .skills-id-muted {
      color: #64748b;
    }

    body.theme-light .skills-desc-cell {
      color: #334155;
    }

    body.theme-light .skills-hint-label {
      color: #64748b;
    }

    body.theme-light .skills-debug-title {
      color: #0f172a;
    }

    body.theme-light .skills-step-field {
      color: #475569;
    }

    body.theme-light .skills-log-line {
      background: var(--modal-surface-2);
      border-color: rgba(148, 163, 184, .45);
    }

    body.theme-light .skills-tab.active {
      background: #d1fae5;
      color: #065f46;
      border-color: rgba(5, 150, 105, .45);
    }

    body.theme-light .skills-log-msg {
      color: #0f172a;
    }

    body.theme-light .modal,
    body.theme-light .app-dialog-card {
      color: #0f172a;
    }

    body.theme-light .app-dialog-message {
      color: #334155;
    }

    body.theme-light .settings-modal-title {
      color: #059669;
    }
