
      /* 历史任务列表按内容高度收缩，避免中间留白 */
      .session-sidebar__history-list { flex: 0 0 auto !important; }
      .lingee-storage-groups {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-top: 4px;
        padding-top: 0;
      }
      .lingee-storage-group {
        display: flex;
        flex-direction: column;
      }
      .lingee-storage-group__caret {
        display: inline-flex;
        width: 12px;
        height: 12px;
        flex-shrink: 0;
        transition: transform 0.15s;
      }
      .lingee-storage-group.is-collapsed .lingee-storage-group__caret {
        transform: rotate(-90deg);
      }
      .lingee-storage-group__items {
        display: flex;
        flex-direction: column;
        gap: 2px;
      }
      .lingee-storage-group.is-collapsed .lingee-storage-group__items { display: none; }
      .lingee-storage-item {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        border-radius: 8px;
        padding: 8px 10px;
        font-size: 14px;
        font-weight: 400;
        color: #000000d1;
        background: transparent;
        border: none;
        cursor: pointer;
        text-align: left;
        transition: background 0.2s;
      }
      .lingee-storage-item:hover { background: #0000000d; }
      .lingee-storage-item__icon {
        display: inline-flex;
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        color: #00000075;
      }
      .lingee-storage-item__label {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      /* Dark theme */
      [data-theme="dark"] .lingee-storage-item { color: #ffffffd1; }
      [data-theme="dark"] .lingee-storage-item:hover { background: #ffffff14; }
      [data-theme="dark"] .lingee-storage-item__icon { color: #ffffff75; }

      /* 文件夹内嵌历史任务 */
      .lingee-storage-folder {
        display: flex;
        flex-direction: column;
      }
      /* 文件夹项前面的展开箭头 */
      .lingee-storage-item .lingee-storage-group__caret {
        color: #00000059;
      }
      .lingee-storage-folder.is-collapsed .lingee-storage-group__caret {
        transform: rotate(-90deg);
      }
      .lingee-storage-folder__tasks {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding-left: 22px;
        margin: 2px 0 4px;
      }
      .lingee-storage-folder.is-collapsed .lingee-storage-folder__tasks {
        display: none;
      }
      .lingee-storage-task {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        border-radius: 8px;
        padding: 6px 10px;
        background: transparent;
        border: none;
        cursor: pointer;
        text-align: left;
        transition: background 0.2s;
      }
      .lingee-storage-task:hover { background: #0000000d; }
      .lingee-storage-task__icon {
        display: inline-flex;
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        color: #00000059;
      }
      .lingee-storage-task__text {
        display: flex;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
        flex: 1;
      }
      .lingee-storage-task__name {
        font-size: 13px;
        font-weight: 400;
        color: #000000c2;
        line-height: 18px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-storage-task__time {
        font-size: 11px;
        color: #00000059;
        line-height: 14px;
      }
      .lingee-storage-task--empty {
        padding: 6px 10px;
        font-size: 12px;
        color: #00000047;
        cursor: default;
      }
      .lingee-storage-task--empty:hover { background: transparent; }

      /* 「默认」分类：排在「置顶」之后、本地 / 云端文件夹之前，可展开 / 收起 */
      .lingee-storage-default {
        display: flex;
        flex-direction: column;
        margin: 0 0 6px;
      }
      .lingee-storage-default__label {
        display: flex;
        align-items: center;
        padding: 6px 10px 4px;
        font-size: 12px;
        font-weight: 600;
        color: #00000075;
        line-height: 18px;
        border-radius: 6px;
        cursor: pointer;
        user-select: none;
        transition: background 0.15s;
      }
      .lingee-storage-default__label:hover { background: #0000000a; }
      [data-theme="dark"] .lingee-storage-default__label:hover { background: #ffffff12; }
      .lingee-storage-default.is-collapsed > .lingee-storage-default__tasks { display: none; }
      .lingee-storage-default__tasks {
        display: flex;
        flex-direction: column;
        gap: 2px;
      }
      [data-theme="dark"] .lingee-storage-default__label { color: #ffffff75; }
      [data-theme="dark"] .lingee-storage-item .lingee-storage-group__caret { color: #ffffff59; }
      [data-theme="dark"] .lingee-storage-task:hover { background: #ffffff14; }
      [data-theme="dark"] .lingee-storage-task__icon { color: #ffffff59; }
      [data-theme="dark"] .lingee-storage-task__name { color: #ffffffc2; }
      [data-theme="dark"] .lingee-storage-task__time { color: #ffffff59; }
      [data-theme="dark"] .lingee-storage-task--empty { color: #ffffff47; }

      /* 历史任务列表：只展示「置顶」分组，其余原生会话分组（今天 / 昨天 / 更早…）全部隐藏 */
      .session-sidebar__history-list > [data-lingee-hidden-history="true"] {
        display: none !important;
      }

      /* 「置顶」不显示图标：列表项里的角标、以及早前注入到标题上的小图标都隐藏 */
      .chat-sidebar-pin-badge { display: none !important; }
      .lingee-pin-in-label { display: none !important; }
    
      /* ============ 历史任务：置顶 + 本地/云端文件夹树（改造） ============ */
      .lingee-storage-groups { gap: 2px; margin-top: 6px; }

      /* 折叠箭头：默认朝下，收起时朝右 */
      .lingee-storage-caret {
        display: inline-flex;
        width: 12px;
        height: 12px;
        flex-shrink: 0;
        margin-left: 2px;
        color: #00000059;
        transition: transform 0.15s ease;
      }
      .lingee-storage-caret svg { width: 12px; height: 12px; }
      .lingee-storage-group.is-collapsed > .lingee-storage-root .lingee-storage-caret,
      .lingee-storage-folder.is-collapsed > .lingee-storage-item .lingee-storage-caret,
      .lingee-storage-default.is-collapsed > .lingee-storage-default__label .lingee-storage-caret {
        transform: rotate(-90deg);
      }
      [data-theme="dark"] .lingee-storage-caret { color: #ffffff59; }

      /* 一级节点：本地文件夹 / 云端文件夹 */
      .lingee-storage-root {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        border-radius: 8px;
        padding: 8px 10px;
        font-family: inherit;
        font-size: 14px;
        font-weight: 500;
        color: #000000d1;
        background: transparent;
        border: none;
        cursor: pointer;
        text-align: left;
        transition: background 0.2s;
      }
      .lingee-storage-root:hover { background: #0000000d; }
      .lingee-storage-root__icon {
        display: inline-flex;
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        color: #00000080;
      }
      .lingee-storage-root__icon svg { width: 16px; height: 16px; }
      .lingee-storage-root__label {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      [data-theme="dark"] .lingee-storage-root { color: #ffffffd1; }
      [data-theme="dark"] .lingee-storage-root:hover { background: #ffffff14; }
      [data-theme="dark"] .lingee-storage-root__icon { color: #ffffff80; }

      /* 一级节点下的文件夹列表：缩进一级 */
      .lingee-storage-group > .lingee-storage-group__items {
        padding-left: 12px;
        margin: 2px 0;
      }
      .lingee-storage-group.is-collapsed > .lingee-storage-group__items { display: none; }

      /* 二级节点：文件夹 */
      .lingee-storage-item {
        padding: 7px 10px;
        font-family: inherit;
        font-size: 13.5px;
        color: #000000c9;
      }
      .lingee-storage-item__icon svg { width: 15px; height: 15px; }
      .lingee-storage-item__count {
        flex-shrink: 0;
        font-size: 11px;
        color: #00000047;
      }
      [data-theme="dark"] .lingee-storage-item { color: #ffffffc9; }
      [data-theme="dark"] .lingee-storage-item__count { color: #ffffff47; }

      /* 三级：文件夹里的文件
         文件行已去掉类型图标（见 buildFile），少了 15px 图标 + 8px gap，
         这里把缩进从 22px 加到 34px，保持文件名仍明显缩在文件夹名右侧 */
      .lingee-storage-folder__files {
        display: flex;
        flex-direction: column;
        gap: 1px;
        padding-left: 34px;
        margin: 1px 0 3px;
      }
      .lingee-storage-folder.is-collapsed > .lingee-storage-folder__files { display: none; }
      .lingee-storage-file {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        border-radius: 8px;
        padding: 5px 10px;
        font-family: inherit;
        background: transparent;
        border: none;
        cursor: pointer;
        text-align: left;
        transition: background 0.2s;
      }
      .lingee-storage-file:hover { background: #0000000d; }
      .lingee-storage-file__icon {
        display: inline-flex;
        width: 15px;
        height: 15px;
        flex-shrink: 0;
        color: #00000059;
      }
      .lingee-storage-file__icon svg { width: 15px; height: 15px; }
      .lingee-storage-file__text {
        display: flex;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
        flex: 1;
      }
      .lingee-storage-file__name {
        font-size: 13px;
        font-weight: 400;
        color: #000000c2;
        line-height: 18px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-storage-file__meta {
        font-size: 11px;
        color: #00000059;
        line-height: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-storage-file--empty {
        padding: 5px 10px;
        font-size: 12px;
        color: #00000047;
        cursor: default;
      }
      .lingee-storage-file--empty:hover { background: transparent; }
      [data-theme="dark"] .lingee-storage-file:hover { background: #ffffff14; }
      [data-theme="dark"] .lingee-storage-file__icon { color: #ffffff59; }
      [data-theme="dark"] .lingee-storage-file__name { color: #ffffffc2; }
      [data-theme="dark"] .lingee-storage-file__meta { color: #ffffff59; }
      [data-theme="dark"] .lingee-storage-file--empty { color: #ffffff47; }

      /* 分组标题左缩进统一：原生 .chat-sidebar-group-label 的 padding-left 是 0，
         比「默认」（10px）更靠左。以「默认」为基准补齐，保证「置顶」「默认」
         「本地文件夹」「云端文件夹」文案左缘在同一条线上 */
      .session-sidebar__history-list .chat-sidebar-group-label {
        padding-left: 10px;
      }
      /* 置顶展开后的会话行原生缩进 16px，同样对到 10px，
         让会话名与「默认」里的任务名左缘一致 */
      .session-sidebar__history-list .chat-sidebar-item-wrap {
        padding-left: 10px;
      }

      /* 「置顶」分组标题：整行可点击，文字右侧带展开 / 收起箭头 */
      .chat-sidebar-group[data-lingee-pin-group="true"] > .chat-sidebar-group-label {
        display: flex;
        align-items: center;
        cursor: pointer;
        user-select: none;
        border-radius: 6px;
        transition: background 0.15s;
      }
      .chat-sidebar-group[data-lingee-pin-group="true"] > .chat-sidebar-group-label:hover {
        background: #0000000a;
      }
      [data-theme="dark"] .chat-sidebar-group[data-lingee-pin-group="true"] > .chat-sidebar-group-label:hover {
        background: #ffffff12;
      }
      .lingee-pin-caret {
        display: inline-flex;
        align-items: center;
        width: 12px;
        height: 12px;
        margin-left: 4px;
        flex-shrink: 0;
        color: #00000059;
        transition: transform 0.15s ease;
      }
      .lingee-pin-caret svg { width: 12px; height: 12px; }
      [data-theme="dark"] .lingee-pin-caret { color: #ffffff59; }
      .chat-sidebar-group[data-lingee-collapsed="true"] .lingee-pin-caret {
        transform: rotate(-90deg);
      }
      .chat-sidebar-group[data-lingee-collapsed="true"] .chat-sidebar-item-wrap {
        display: none !important;
      }

      /* 会话列表兜底：切到「自动化任务」再切回时保持原来的列表 */
      .lingee-history-restore {
        display: flex;
        flex-direction: column;
      }
      .session-sidebar__history-section[data-lingee-restored="true"] .session-sidebar__empty-state {
        display: none !important;
      }
    