  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #F6F2E8; color: #333; line-height: 1.6;
  }
  .container { width: 100%; padding: 0; }
  header { margin-bottom: 18px; }
  h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }

  /* ============ 侧边栏（云白浅色方案）+ 全宽自适应布局 ============ */
  .app { display: flex; gap: 0; align-items: flex-start; min-height: 100vh; }
  .sidebar {
    width: 240px; flex: 0 0 240px; position: sticky; top: 0; height: 100vh;
    background: #F1EBDE; color: #5F594C;
    display: flex; flex-direction: column;
    border-right: 1px solid #E1DAC7;
    transition: width .22s cubic-bezier(.4,0,.2,1), flex-basis .22s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
  }
  body.sidebar-collapsed .sidebar { width: 68px; flex: 0 0 68px; }

  /* 品牌区 */
  .brand { display: flex; align-items: center; gap: 11px; padding: 18px 16px; border-bottom: 1px solid #E1DAC7; }
  .brand-mark {
    flex: 0 0 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(160deg, #4b5563, #20242b);
    display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff;
    box-shadow: 0 6px 14px -6px rgba(16,24,40,.65);
  }
  .brand-text { min-width: 0; overflow: hidden; white-space: nowrap; }
  .brand-name { color: #3A362E; font-weight: 600; font-size: 14px; }
  .brand-sub { color: #A79F8B; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }

  /* 收起按钮 */
  .sidebar-toggle {
    position: absolute; top: 24px; right: -11px; width: 22px; height: 22px; border-radius: 50%;
    background: #E8E1D1; border: 1px solid #E1DAC7; color: #5F594C;
    display: grid; place-items: center; cursor: pointer; z-index: 5;
    transition: background .15s, color .15s, border-color .15s;
  }
  .sidebar-toggle:hover { background: #4b5563; color: #fff; border-color: #4b5563; }
  body.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }

  /* 导航滚动区 */
  .sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 10px 8px; scrollbar-width: thin; }
  .sidebar-nav::-webkit-scrollbar { width: 6px; }
  .sidebar-nav::-webkit-scrollbar-thumb { background: #E1DAC7; border-radius: 3px; }

  /* 分组 */
  .nav-group { margin-bottom: 6px; }
  .nav-group-title {
    display: flex; align-items: center; gap: 6px; padding: 8px 10px; margin: 0;
    color: #A79F8B; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
    cursor: pointer; user-select: none; border-radius: 7px; white-space: nowrap;
  }
  .nav-group-title:hover { color: #5F594C; }
  .nav-group-title .grp-en { font-size: 9px; opacity: .75; }
  .nav-group-title .grp-arrow { margin-left: auto; transition: transform .2s; font-size: 10px; }
  .nav-group.collapsed .grp-arrow { transform: rotate(-90deg); }
  /* 收起动画：grid-rows 0fr <-> 1fr */
  .nav-group-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .22s ease; }
  .nav-group.collapsed .nav-group-items { grid-template-rows: 0fr; }
  .nav-group-inner { overflow: hidden; min-height: 0; }

  /* 导航项 */
  .nav-item {
    position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 10px; margin: 1px 0; font-size: 13px; color: #5F594C;
    background: none; border: none; border-radius: 8px; cursor: pointer; white-space: nowrap;
    transition: background .15s, color .15s;
  }
  .nav-item:hover { background: #E8E1D1; color: #3A362E; }
  .nav-item .nav-ico { flex: 0 0 18px; height: 18px; opacity: .72; }
  .nav-item:hover .nav-ico { opacity: 1; }
  .nav-item .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
  .nav-item.active { background: #DFD4BB; color: #3A362E; font-weight: 500; }
  .nav-item.active .nav-ico { opacity: 1; color: #4b5563; }
  .nav-item.active::before {
    content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: #4b5563;
  }

  /* 底部用户卡片 */
  .who { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid #E1DAC7; }
  .who-ava {
    flex: 0 0 32px; height: 32px; border-radius: 8px; background: #E8E1D1; color: #3A362E;
    display: grid; place-items: center; font-size: 12px; font-weight: 700;
    border: 1px solid #E1DAC7;
  }
  .who-ava img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
  .who-txt { min-width: 0; overflow: hidden; white-space: nowrap; }
  .who-name { display: block; color: #3A362E; font-size: 13px; font-weight: 500; }
  .who-role { display: block; color: #A79F8B; font-size: 11px; }
  .who-out {
    flex: 0 0 auto; color: #A79F8B; padding: 5px; border-radius: 6px; cursor: pointer;
    background: none; border: none; display: grid; place-items: center;
  }
  .who-out:hover { color: #DC2626; background: rgba(220,38,38,.14); }

  /* 收起态：只留图标，悬停显示 tooltip */
  body.sidebar-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  body.sidebar-collapsed .brand-text,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .nav-group-title span,
  body.sidebar-collapsed .grp-arrow,
  body.sidebar-collapsed .who-txt,
  body.sidebar-collapsed .who-out { display: none; }
  body.sidebar-collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
  body.sidebar-collapsed .who { justify-content: center; padding-left: 0; padding-right: 0; }
  body.sidebar-collapsed .nav-group-title { justify-content: center; padding: 10px 0 6px; }
  body.sidebar-collapsed .nav-group-title::after { content: ""; width: 14px; height: 1px; background: #E1DAC7; }
  /* 收起态下已折叠的分组自动展开（显示图标） */
  body.sidebar-collapsed .nav-group.collapsed .nav-group-items { grid-template-rows: 1fr; }
  body.sidebar-collapsed .nav-item::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
    background: #3A362E; color: #F5F1E4; border: 1px solid #57513F;
    padding: 5px 9px; border-radius: 6px; font-size: 12px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .14s; z-index: 40;
  }
  body.sidebar-collapsed .nav-item:hover::after { opacity: 1; }

  /* 主区：占满侧边栏右侧剩余宽度，内容自适应 */
  .main { flex: 1; min-width: 0; padding: 24px 28px 60px; }

  @media (max-width: 768px) {
    .app { flex-direction: column; gap: 12px; }
    .sidebar { width: 100%; flex: auto; position: static; height: auto; overflow: visible; margin-top: 0; }
    body.sidebar-collapsed .sidebar { width: 100%; flex: auto; }
    .sidebar-toggle { display: none; }
    .sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px; overflow: visible; padding: 8px; }
    .nav-group { margin-bottom: 0; }
    .nav-group-title { width: 100%; }
    .nav-group-items { display: contents; } /* 移动端始终展开 */
    .nav-item { width: auto; }
    .brand, .who { border: none; }
    .main { padding: 16px; }
    body.sidebar-collapsed .brand-text { display: block; }
    body.sidebar-collapsed .nav-label { display: block; }
    body.sidebar-collapsed .who-txt { display: block; }
    body.sidebar-collapsed .who-out { display: grid; }
    body.sidebar-collapsed .nav-group-title span { display: inline; }
    body.sidebar-collapsed .nav-group-title::after { content: none; }
    body.sidebar-collapsed .nav-item::after { content: none; }
  }

  /* 登录 / 初始化卡片 */
  .auth-wrap { max-width: 380px; margin: 80px auto 0; }
  .auth-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 28px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
  }
  .auth-card h2 { font-size: 17px; font-weight: 600; margin-bottom: 6px; text-align: center; }
  .auth-card .sub { font-size: 12px; color: #999; text-align: center; margin-bottom: 18px; }
  .auth-card label { display: block; font-size: 13px; color: #555; margin: 12px 0 4px; }
  .auth-card input {
    width: 100%; padding: 9px 12px; font-size: 14px; border: 1px solid #d1d5db;
    border-radius: 6px; outline: none;
  }
  .auth-card input:focus { border-color: #4b5563; }
  .auth-card button {
    width: 100%; margin-top: 18px; padding: 10px; font-size: 15px;
    background: #4b5563; color: #fff; border: none; border-radius: 6px; cursor: pointer;
  }
  .auth-card button:hover { background: #20242b; }
  .auth-error {
    background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 6px;
    padding: 8px 12px; font-size: 13px; margin-bottom: 14px;
  }
  .auth-db-error {
    background: #fffbeb; color: #92400e; border: 1px solid #fde68a; border-radius: 8px;
    padding: 14px 16px; font-size: 13px; margin-bottom: 16px; white-space: pre-wrap;
  }

  /* 页面切换 */
  .tab-page { display: none; }
  .tab-page.active { display: block; }

  /* 卡片 */
  .card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 16px; margin-bottom: 20px;
  }
  .card h2 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
  .page-title { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
  .row { display: flex; gap: 10px; margin-bottom: 10px; }
  .row > * { flex: 1; min-width: 0; }
  .row input, .row .sel select {
    width: 100%; padding: 8px 30px 8px 10px; font-size: 14px;
    border: 1px solid #d1d5db; border-radius: 6px; outline: none;
  }
  .row input:focus, .row .sel select:focus { border-color: #4b5563; }
  textarea {
    width: 100%; padding: 8px 10px; font-size: 14px;
    border: 1px solid #d1d5db; border-radius: 6px; outline: none;
    resize: vertical; min-height: 60px; font-family: inherit;
  }
  textarea:focus { border-color: #4b5563; }
  button {
    padding: 8px 18px; font-size: 14px; border: none; border-radius: 6px;
    cursor: pointer; background: #4b5563; color: #fff;
  }
  button:hover { background: #20242b; }
  button.secondary {
    background: transparent; border: 1px solid #d1d5db; color: #555;
    padding: 4px 10px; font-size: 12px;
  }
  button.secondary:hover { border-color: #4b5563; color: #4b5563; background: transparent; }
  .btn-row { margin-top: 10px; display: flex; justify-content: flex-end; gap: 8px; }
  /* 表单区（btn-row / row 内）的次要按钮与主按钮同尺寸，仅颜色区分 */
  .btn-row button.secondary, .row button.secondary {
    padding: 8px 18px;
    font-size: 14px;
  }

  /* 数据备份页：每行 = 方式说明（左）+ 等宽按钮组（右） */
  .backup-note { font-size: 12px; color: #999; margin: 0 0 14px; }
  /* 数据规模概览 */
  .backup-overview {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #FAF7EF; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 10px 14px; margin: 0 0 12px;
  }
  .backup-overview .bk-overview-text { font-size: 13px; color: #555; }
  .badge.bk-tiny   { background: #dcfce7; color: #166534; }
  .badge.bk-medium { background: #e5e7eb; color: #343a45; }
  .badge.bk-large  { background: #fef3c7; color: #92400e; }
  .badge.bk-huge   { background: #fee2e2; color: #b91c1c; }
  .backup-row {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 14px 0; border-top: 1px solid #f0f0f0;
  }
  .backup-row:last-child { border-bottom: 1px solid #f0f0f0; }
  .backup-method { min-width: 0; }
  .backup-name { font-size: 14px; font-weight: 600; color: #333; }
  .backup-desc { font-size: 12px; color: #999; margin-top: 3px; }
  .backup-actions { display: flex; gap: 10px; flex-shrink: 0; }
  /* 两组按钮等宽，导出/导入分别对齐 */
  .backup-actions button {
    min-width: 100px; padding: 8px 14px; font-size: 13px;
  }
  .backup-actions button.secondary {
    padding: 8px 14px; font-size: 13px;
  }

  /* 数据字典 */
  .dict-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
  .dict-table th, .dict-table td {
    border: 1px solid #e5e7eb; padding: 6px 10px; text-align: left; word-break: break-all;
  }
  .dict-table th { background: #FAF7EF; font-weight: 600; color: #555; white-space: nowrap; }
  .dict-table td:first-child { font-family: Consolas, monospace; color: #343a45; white-space: nowrap; }
  .dict-enum {
    display: inline-block; background: #f3f4f6; border: 1px solid #e5e7eb; color: #343a45;
    border-radius: 4px; padding: 0 6px; margin: 0 2px; font-size: 12px;
  }

  /* 服务器体检 */
  .health-conclusion { display: flex; align-items: center; gap: 12px; }
  .health-conclusion .badge { font-size: 14px; padding: 4px 14px; }
  .health-conclusion .hc-text { font-size: 13px; color: #555; }
  .health-risk-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; font-size: 13px; }
  .health-risk-item:last-child { border-bottom: none; }
  .health-risk-item .hr-name { width: 110px; font-weight: 600; color: #333; flex-shrink: 0; }
  .health-risk-item .hr-desc { color: #777; flex: 1; }
  .health-suggest { margin: 0; padding-left: 20px; font-size: 13px; color: #555; }
  .health-suggest li { margin-bottom: 6px; }
  .cfg-ok { color: #166534; font-weight: 600; }
  .cfg-bad { color: #b91c1c; font-weight: 600; }
  /* 下拉框统一风格 */
  select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 30px;
    background-color: #fff;
    cursor: pointer;
  }
  select:focus { border-color: #4b5563; }
  .sel { position: relative; display: inline-block; vertical-align: middle; }
  .sel::after {
    content: '';
    position: absolute; right: 10px; top: 50%;
    width: 13px; height: 13px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-size: contain;
    transform: translateY(-50%);
    transition: transform .25s ease;
    pointer-events: none;
  }
  .sel.open::after { transform: translateY(-50%) rotate(180deg); }

  /* 工具栏 */
  .toolbar { display: flex; gap: 10px; margin-bottom: 10px; }
  .toolbar input[type="search"] {
    flex: 1; padding: 8px 12px; font-size: 14px;
    border: 1px solid #d1d5db; border-radius: 6px; outline: none; min-width: 0;
  }
  .toolbar input[type="search"]:focus { border-color: #4b5563; }
  .toolbar select {
    padding: 8px 32px 8px 12px; font-size: 14px; border: 1px solid #d1d5db; border-radius: 6px;
    outline: none; background-color: #fff;
  }
  .toolbar button {
    padding: 8px 12px; font-size: 13px; background: #fff; border: 1px solid #d1d5db;
    color: #555; border-radius: 6px; cursor: pointer; white-space: nowrap;
  }
  .toolbar button:hover { border-color: #4b5563; color: #4b5563; background: #f3f4f6; }
  .stats-line { font-size: 12px; color: #999; margin: 0 0 12px; }
  .hint-text { font-size: 12px; color: #999; margin-top: 8px; }

  /* 筛选区固定：滚动时钉在视口顶部，工单列表从下方滚过 */
  .filter-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #F6F2E8; /* 与页面背景一致，遮住滚动上来的内容 */
    padding: 12px 0 10px;
    margin: -12px 0 6px;
    border-bottom: 1px solid transparent;
    box-shadow: 0 6px 10px -8px rgba(0,0,0,.25);
  }

  /* 日期筛选行 */
  .date-row { align-items: center; margin-top: -4px; }
  .date-label { font-size: 13px; color: #666; }
  .date-sep { color: #999; font-size: 13px; }
  .date-hint { font-size: 12px; color: #b45309; }
  .toolbar input[type="date"] {
    padding: 7px 10px; font-size: 13px; border: 1px solid #d1d5db;
    border-radius: 6px; outline: none; background: #fff;
  }
  .toolbar input[type="date"]:focus { border-color: #4b5563; }

  /* 编辑提示 */
  .edit-hint {
    font-size: 12px; color: #343a45; background: #f3f4f6; border-radius: 6px;
    padding: 6px 10px; margin-bottom: 10px; display: none;
  }
  .edit-hint.show { display: block; }

  /* 分类管理 */
  details.card summary { cursor: pointer; font-size: 14px; font-weight: 600; color: #555; }
  details.card[open] summary { margin-bottom: 10px; }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  .chip {
    display: inline-flex; align-items: center; gap: 6px; background: #f3f4f6;
    border: 1px solid #e5e7eb; border-radius: 999px; padding: 2px 10px;
    font-size: 12px; color: #555;
  }
  .chip button { background: none; border: none; color: #999; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
  .chip button:hover { color: #ef4444; }

  /* 列表 */
  .ticket {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 14px 16px; margin-bottom: 10px;
  }
  .ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .ticket-title { font-size: 15px; font-weight: 600; word-break: break-all; }
  .badge {
    flex-shrink: 0; font-size: 12px; padding: 2px 10px; border-radius: 999px;
    white-space: nowrap;
  }
  .badge.pending { background: #fef3c7; color: #92400e; }
  .badge.processing { background: #e5e7eb; color: #343a45; }
  .badge.done { background: #dcfce7; color: #166534; }
  .badge.admin { background: #e5e7eb; color: #343a45; }
  .badge.member { background: #f3f4f6; color: #374151; }
  .badge.guest { background: #dcfce7; color: #166534; }
  .badge.active-user { background: #dcfce7; color: #166534; }
  .badge.disabled { background: #fee2e2; color: #b91c1c; }
  .badge.grp-admin { background: #e5e7eb; color: #343a45; }
  .badge.grp-user { background: #f3f4f6; color: #374151; }
  .badge.grp-guest { background: #dcfce7; color: #166534; }
  .ticket-meta { font-size: 12px; color: #999; margin-top: 4px; }
  .ticket-desc {
    font-size: 13px; color: #666; margin: 8px 0;
    background: #FAF7EF; border-radius: 6px; padding: 8px 10px;
    white-space: pre-wrap; word-break: break-all; display: none;
  }
  .ticket-desc.show { display: block; }
  .ticket-actions { margin-top: 8px; display: flex; gap: 8px; }
  select.status {
    padding: 3px 24px 3px 8px; font-size: 12px; border: 1px solid #d1d5db;
    border-radius: 6px; outline: none; background-color: #fff;
  }
  .status-sel { margin-right: auto; }
  .status-sel::after { right: 8px; }

  .user {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 12px 16px; margin-bottom: 10px;
  }
  .user-main { display: flex; align-items: center; gap: 8px; }
  .user-name { font-size: 15px; font-weight: 600; margin-right: auto; word-break: break-all; }
  .user-meta { font-size: 12px; color: #999; margin-top: 4px; }

  .file-row {
    display: flex; align-items: center; gap: 12px; background: #fff;
    border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; margin-bottom: 8px;
  }
  .file-icon { font-size: 18px; }
  .file-info { flex: 1; min-width: 0; }
  .file-name { font-size: 14px; font-weight: 600; word-break: break-all; }
  .file-meta { font-size: 12px; color: #999; margin-top: 2px; }
  .file-actions { display: flex; gap: 8px; align-items: center; }
  .btn-link {
    font-size: 12px; color: #4b5563; text-decoration: none; padding: 4px 10px;
    border: 1px solid #d1d5db; border-radius: 6px; white-space: nowrap;
  }
  .btn-link:hover { border-color: #4b5563; background: #f3f4f6; }
  input[type="file"] { font-size: 13px; color: #555; }

  /* 提交页附件 */
  .attach-bar { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; }
  .attach-hint { font-size: 12px; color: #999; }
  .attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
  .attach-item {
    display: inline-flex; align-items: center; gap: 8px; background: #FAF7EF;
    border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 8px; font-size: 12px; color: #555;
    max-width: 260px;
  }
  .attach-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; cursor: zoom-in; flex-shrink: 0; }
  .attach-item .attach-info { min-width: 0; }
  .attach-item .attach-name { font-weight: 600; word-break: break-all; }
  .attach-item .attach-size { color: #999; }
  .attach-item .attach-rm { background: none; border: none; color: #999; cursor: pointer; font-size: 15px; padding: 0 2px; line-height: 1; }
  .attach-item .attach-rm:hover { color: #ef4444; }

  /* 工单卡片附件 */
  .ticket-attach { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .ticket-attach .thumb {
    width: 44px; height: 44px; object-fit: cover; border-radius: 6px; cursor: zoom-in;
    border: 1px solid #e5e7eb;
  }
  .attach-chip {
    display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #4b5563;
    text-decoration: none; background: #f3f4f6; border: 1px solid #e5e7eb;
    border-radius: 6px; padding: 4px 8px; max-width: 240px;
  }
  .attach-chip:hover { background: #e5e7eb; }

  /* 图片预览灯箱 */
  .lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
  .lightbox-mask { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
  .lightbox-body { position: relative; max-width: 90vw; max-height: 90vh; text-align: center; }
  .lightbox-body img { max-width: 90vw; max-height: 85vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
  /* 关闭按钮：固定视口右上角，玻璃质感，不随图片大小变化 */
  .lightbox-close {
    position: fixed; top: 18px; right: 18px; width: 38px; height: 38px;
    border-radius: 50%; border: 1px solid rgba(255,255,255,.35); cursor: pointer;
    background: rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff; display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, transform .2s ease, box-shadow .15s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,.35);
  }
  .lightbox-close:hover { background: rgba(255,255,255,.35); transform: rotate(90deg); box-shadow: 0 4px 14px rgba(0,0,0,.45); }
  .lightbox-close:active { transform: rotate(90deg) scale(.92); }
  .lightbox-name { color: #eee; font-size: 12px; margin-top: 8px; }

  /* 居中弹窗（替代原生 alert/confirm） */
  .modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
  .modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
  .modal-body {
    position: relative; background: #fff; border-radius: 10px; padding: 20px 22px;
    width: 400px; max-width: 88vw; box-shadow: 0 12px 40px rgba(0,0,0,.25);
    animation: modal-pop .18s ease-out;
  }
  @keyframes modal-pop {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: scale(1); }
  }
  .modal-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 10px; }
  .modal-msg { font-size: 13px; color: #555; line-height: 1.7; word-break: break-all; }
  .modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
  .modal-btns button { min-width: 84px; padding: 8px 14px; font-size: 13px; }
  .modal-btns button.danger { background: #ef4444; }
  .modal-btns button.danger:hover { background: #dc2626; }

  /* 统计看板 */
  .stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px; margin-bottom: 20px;
  }
  .stat-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px 16px;
  }
  .stat-card .num { font-size: 26px; font-weight: 600; }
  .stat-card .num.pending { color: #92400e; }
  .stat-card .num.processing { color: #343a45; }
  .stat-card .num.done { color: #166534; }
  .stat-card .label { font-size: 12px; color: #888; }

  .empty { text-align: center; color: #aaa; font-size: 14px; padding: 40px 0; }

  /* 分页条固定在视口底部，工单列表在中间滚动 */
  .pager {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: #F6F2E8; /* 与页面背景一致，遮住下方内容 */
    padding: 12px 0;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    flex-wrap: wrap; font-size: 13px; color: #666;
  }
  /* 列表底部预留空间，避免最后一条工单被固定分页条遮住 */
  #list { padding-bottom: 70px; }
  .pager button {
    padding: 4px 10px; font-size: 13px; background: #fff; border: 1px solid #d1d5db;
    color: #555; border-radius: 6px; cursor: pointer;
  }
  .pager button:hover:not(:disabled) { border-color: #4b5563; color: #4b5563; }
  .pager button:disabled { opacity: .4; cursor: not-allowed; }
  .pager .pg-num.active { background: #4b5563; border-color: #4b5563; color: #fff; }
  .pager .pg-ellipsis { padding: 0 2px; color: #999; }
  .pager select {
    padding: 4px 26px 4px 8px; font-size: 13px; border: 1px solid #d1d5db;
    border-radius: 6px; outline: none; background-color: #fff;
  }
  .pager input[type="number"] {
    width: 56px; padding: 4px 8px; font-size: 13px; border: 1px solid #d1d5db;
    border-radius: 6px; outline: none;
  }
  .pager input[type="number"]:focus { border-color: #4b5563; }
  .pager .pg-info { margin: 0 4px; }
  footer { text-align: center; font-size: 12px; color: #bbb; margin-top: 30px; padding: 0 16px 40px; }

  /* ======================================================================
     2026 UI REFRESH · 仅视觉/布局层，不修改任何接口、数据结构与业务逻辑
     ====================================================================== */
  :root {
    --ui-bg: #fbfaf8;           /* 主体背景：与侧边栏 --sb-bg 完全一致（暖白） */
    --ui-surface: #ffffff;      /* 卡片：纯白，比背景略亮，靠边框/阴影区分 */
    --ui-surface-soft: #F3EFE4; /* 控件辅助底（输入框/描述区/表头）：比背景深一档 */
    --ui-border: #E5DED0;       /* 常规边框：暖灰，比背景深 */
    --ui-border-strong: #D8CFBC;/* 控件边框：更深，轮廓清晰 */
    --ui-text: #172033;
    --ui-text-2: #5f6b7c;
    --ui-text-3: #98a2b3;
    --ui-primary: #20242b;
    --ui-primary-hover: #343a45;
    --ui-primary-soft: #f1f3f5;
    --ui-danger: #dc2626;
    --ui-sidebar: #111827;
    --ui-sidebar-2: #182132;
    --ui-sidebar-text: #cbd5e1;
    --ui-sidebar-muted: #758196;
    --ui-sidebar-line: rgba(255,255,255,.075);
    --ui-radius: 12px;
    --ui-radius-sm: 9px;
    --ui-shadow: 0 8px 28px rgba(16,24,40,.045);
  }

  html { background: var(--ui-bg); }
  body {
    background: var(--ui-bg);
    color: var(--ui-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  body::selection { background: #e5e7eb; color: #20242b; }

  /* ---------- 主框架 ---------- */
  .app { min-height: 100vh; align-items: stretch; }
  .main {
    padding: 34px clamp(24px, 3vw, 54px) 76px;
    background: var(--ui-bg); /* 与侧边栏同色，无渐变叠加 */
  }
  .tab-page { max-width: 1480px; margin: 0 auto; }
  .tab-page.active { animation: ui-page-in .24s cubic-bezier(.2,.7,.2,1); }
  @keyframes ui-page-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .page-title,
  .card > h2 {
    color: var(--ui-text);
    letter-spacing: -.015em;
  }
  .page-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.3;
  }

  /* ---------- 侧边栏：大菜单 + 子菜单 ---------- */
  .sidebar {
    width: 278px;
    flex: 0 0 278px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: var(--ui-sidebar);
    color: var(--ui-sidebar-text);
    border-right: 0;
    box-shadow: 10px 0 30px rgba(15,23,42,.045);
    overflow: visible;
    z-index: 30;
    transition: width .28s cubic-bezier(.22,1,.36,1), flex-basis .28s cubic-bezier(.22,1,.36,1);
  }
  body.sidebar-collapsed .sidebar { width: 78px; flex: 0 0 78px; }

  .brand {
    height: 82px;
    padding: 0 20px;
    gap: 12px;
    border-bottom: 1px solid var(--ui-sidebar-line);
    background: rgba(255,255,255,.012);
  }
  .brand-mark {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 11px;
    background: #20242b;
    box-shadow: none;
    font-size: 15px;
  }
  .brand-name { color: #f8fafc; font-size: 15px; font-weight: 680; letter-spacing: -.01em; }
  .brand-sub { color: #64748b; font-size: 9px; letter-spacing: .16em; margin-top: 1px; }

  .sidebar-toggle {
    top: 30px;
    right: -14px;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    border: 1px solid #dfe5ed;
    background: #fff;
    color: #667085;
    box-shadow: 0 4px 12px rgba(15,23,42,.09);
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
  }
  .sidebar-toggle:hover {
    background: #fff;
    color: var(--ui-primary);
    border-color: #e5e7eb;
    transform: translateX(1px);
  }
  .sidebar-toggle svg { transition: transform .28s cubic-bezier(.22,1,.36,1); }

  .sidebar-nav {
    padding: 18px 12px 16px;
    scrollbar-color: rgba(255,255,255,.13) transparent;
  }
  .sidebar-nav::-webkit-scrollbar { width: 4px; }
  .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 99px; }

  .nav-group {
    position: relative;
    margin: 0 0 10px;
    border-radius: 12px;
  }

  /* 父级 = 大菜单 */
  .nav-group-title {
    min-height: 48px;
    padding: 0 12px;
    gap: 9px;
    margin: 0;
    border-radius: 10px;
    color: #d5dce7;
    font-size: 13px;
    font-weight: 620;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
  }
  .nav-group-title:hover { color: #fff; background: rgba(255,255,255,.055); }
  .nav-group:has(.nav-item.active) > .nav-group-title {
    color: #fff;
    background: rgba(255,255,255,.04);
  }
  .nav-group-title::before {
    content: "";
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px;
    opacity: .86;
  }
  .nav-group[data-group="tickets"] > .nav-group-title::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4.5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M7.5 9h9M7.5 13h6'/%3E%3C/svg%3E");
  }
  .nav-group[data-group="admin"] > .nav-group-title::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l7 3v5.2c0 4.2-2.7 7.3-7 8.8-4.3-1.5-7-4.6-7-8.8V6.5z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
  }
  .nav-group[data-group="data"] > .nav-group-title::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-7M22 19H2'/%3E%3C/svg%3E");
  }
  .nav-group[data-group="account"] > .nav-group-title::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 20c.8-3.8 3.3-5.8 7-5.8s6.2 2 7 5.8'/%3E%3C/svg%3E");
  }
  .nav-group[data-group="unfiled"] > .nav-group-title::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16a1 1 0 011 1v12a1 1 0 01-1 1H4a1 1 0 01-1-1V6a1 1 0 011-1z'/%3E%3Cpath d='M3 10h5l2 2.5h4L16 10h5'/%3E%3C/svg%3E");
  }
  .nav-group-title .grp-en {
    margin-left: 1px;
    color: var(--ui-sidebar-muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: none;
    opacity: 1;
  }
  .nav-group-title .grp-arrow {
    position: relative;
    width: 20px;
    height: 20px;
    margin-left: auto;
    color: transparent;
    font-size: 0;
    transition: transform .3s cubic-bezier(.22,1,.36,1);
  }
  .nav-group-title .grp-arrow::before,
  .nav-group-title .grp-arrow::after {
    content: "";
    position: absolute;
    top: 9px;
    width: 6px;
    height: 1.5px;
    border-radius: 2px;
    background: #778399;
  }
  .nav-group-title .grp-arrow::before { left: 4px; transform: rotate(45deg); }
  .nav-group-title .grp-arrow::after { right: 4px; transform: rotate(-45deg); }
  .nav-group.collapsed .grp-arrow { transform: rotate(-90deg); }

  /* 子菜单动画：高度 + 透明度 + 位移 */
  .nav-group-items {
    grid-template-rows: 1fr;
    transition: grid-template-rows .32s cubic-bezier(.22,1,.36,1);
  }
  .nav-group-inner {
    position: relative;
    min-height: 0;
    overflow: hidden;
    padding: 5px 0 2px 16px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .20s ease .04s, transform .30s cubic-bezier(.22,1,.36,1), padding .30s cubic-bezier(.22,1,.36,1);
  }
  .nav-group-inner::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: rgba(255,255,255,.075);
  }
  .nav-group.collapsed .nav-group-items { grid-template-rows: 0fr; }
  .nav-group.collapsed .nav-group-inner {
    opacity: 0;
    transform: translateY(-5px);
    padding-top: 0;
    padding-bottom: 0;
    transition: opacity .13s ease, transform .22s ease, padding .25s ease;
  }

  .nav-item {
    min-height: 38px;
    padding: 0 11px 0 14px;
    margin: 2px 0;
    gap: 10px;
    border-radius: 8px;
    color: #8f9caf;
    font-size: 13px;
    font-weight: 480;
    transition: color .16s ease, background .16s ease, transform .16s ease;
  }
  .nav-item:hover {
    background: rgba(255,255,255,.045);
    color: #e7edf6;
    transform: translateX(2px);
  }
  .nav-item .nav-ico { width: 17px; height: 17px; flex-basis: 17px; opacity: .68; transition: opacity .16s ease, color .16s ease; }
  .nav-item.active {
    background: rgba(16,24,40,.16);
    color: #f8fbff;
    font-weight: 560;
  }
  .nav-item.active .nav-ico { color: #6b7280; opacity: 1; }
  .nav-item.active::before {
    left: -5px;
    top: 50%;
    width: 3px;
    height: 17px;
    border-radius: 99px;
    background: #6b7280;
  }

  .who {
    min-height: 70px;
    padding: 12px 16px;
    gap: 10px;
    border-top: 1px solid var(--ui-sidebar-line);
    background: rgba(255,255,255,.015);
  }
  .who-ava {
    flex: 0 0 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.075);
    color: #f8fafc;
    font-size: 13px;
  }
  .who-name { color: #edf2f8; font-size: 13px; font-weight: 600; }
  .who-role { color: #718096; font-size: 11px; }
  .who-out { margin-left: auto; color: #768399; padding: 7px; border-radius: 8px; }
  .who-out:hover { color: #fecaca; background: rgba(239,68,68,.10); }

  /* 收起状态 */
  body.sidebar-collapsed .brand { padding: 0; justify-content: center; }
  body.sidebar-collapsed .nav-group { margin-bottom: 6px; }
  body.sidebar-collapsed .nav-group-title {
    width: 48px;
    min-height: 42px;
    margin: 0 auto 3px;
    padding: 0;
    justify-content: center;
    background: transparent;
  }
  body.sidebar-collapsed .nav-group-title::before { width: 20px; height: 20px; background-size: 19px; }
  body.sidebar-collapsed .nav-group-title::after { display: none; }
  body.sidebar-collapsed .nav-group-items,
  body.sidebar-collapsed .nav-group.collapsed .nav-group-items { grid-template-rows: 1fr; }
  body.sidebar-collapsed .nav-group-inner {
    padding: 0;
    opacity: 1;
    transform: none;
  }
  body.sidebar-collapsed .nav-group-inner::before { display: none; }
  body.sidebar-collapsed .nav-item {
    width: 46px;
    min-height: 40px;
    margin: 2px auto;
    padding: 0;
    justify-content: center;
    transform: none;
  }
  body.sidebar-collapsed .nav-item.active::before { left: -3px; }
  body.sidebar-collapsed .nav-item::after {
    left: calc(100% + 13px);
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: #0b1220;
    color: #f8fafc;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
  }
  body.sidebar-collapsed .who { padding: 12px 0; justify-content: center; }

  /* ---------- 通用卡片 / 内容容器 ---------- */
  .card,
  .ticket,
  .user,
  .file-row,
  .stat-card {
    border: 1px solid var(--ui-border);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
  }
  .card {
    border-radius: var(--ui-radius);
    padding: 22px;
    margin-bottom: 18px;
  }
  .card h2 { font-size: 16px; font-weight: 680; margin-bottom: 17px; }
  .hint-text, .stats-line, .backup-note { color: var(--ui-text-3); }
  .hint-text { line-height: 1.7; }

  /* ---------- 表单 ---------- */
  input[type="text"], input[type="password"], input[type="search"], input[type="date"], input[type="number"], textarea, select,
  .row input, .row .sel select, .toolbar input[type="search"], .toolbar input[type="date"], .toolbar select {
    border: 1px solid var(--ui-border-strong);
    background: #fff;
    color: var(--ui-text);
    border-radius: var(--ui-radius-sm);
    outline: none;
    box-shadow: 0 1px 1px rgba(16,24,40,.01);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  }
  .row input, .row .sel select, .toolbar input[type="search"], .toolbar select {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  textarea { min-height: 112px; padding: 11px 12px; line-height: 1.7; }
  input::placeholder, textarea::placeholder { color: #a6afbd; }
  input:focus, textarea:focus, select:focus,
  .row input:focus, .row .sel select:focus, .toolbar input[type="search"]:focus, .toolbar input[type="date"]:focus {
    border-color: #c8ced8;
    box-shadow: 0 0 0 3px rgba(16,24,40,.10);
  }
  .sel::after { right: 12px; opacity: .72; }
  .row { gap: 12px; margin-bottom: 12px; }

  button {
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 9px;
    background: var(--ui-primary);
    font-weight: 560;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease, box-shadow .16s ease;
  }
  button:hover { background: var(--ui-primary-hover); }
  button:active { transform: translateY(1px); }
  button.secondary,
  .toolbar button,
  .pager button {
    background: #fff;
    border: 1px solid var(--ui-border-strong);
    color: var(--ui-text-2);
  }
  button.secondary:hover,
  .toolbar button:hover,
  .pager button:hover:not(:disabled) {
    background: var(--ui-primary-soft);
    border-color: #d6dbe2;
    color: var(--ui-primary);
  }
  .btn-row { margin-top: 16px; gap: 9px; }

  /* ---------- 筛选 / 工具栏 ---------- */
  .filter-bar {
    top: 0;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: rgba(250,248,242,.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 20px rgba(16,24,40,.035);
  }
  .toolbar { gap: 10px; margin-bottom: 10px; }
  .filter-bar .toolbar:last-child { margin-bottom: 0; }
  .date-row { margin-top: 0; }
  .date-label { color: var(--ui-text-2); font-weight: 540; }
  .stats-line {
    margin: 0 2px 14px;
    font-size: 12px;
    color: #7e8999;
  }
  .stats-line span { color: #455266; font-weight: 650; }

  /* ---------- 工单列表 ---------- */
  .ticket {
    border-radius: 12px;
    padding: 18px 19px;
    margin-bottom: 11px;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  }
  .ticket:hover {
    transform: translateY(-1px);
    border-color: #dce3ec;
    box-shadow: 0 10px 28px rgba(16,24,40,.06);
  }
  .ticket-head { gap: 14px; }
  .ticket-title { font-size: 15px; font-weight: 670; color: var(--ui-text); line-height: 1.45; }
  .ticket-meta { margin-top: 6px; color: #8a95a5; line-height: 1.6; }
  .ticket-desc {
    margin: 13px 0 4px;
    padding: 11px 13px;
    border: 1px solid var(--ui-border);
    border-radius: 9px;
    background: var(--ui-surface-soft);
    color: #596579;
    line-height: 1.75;
  }
  .ticket-desc.show { animation: ui-detail-in .18s ease; }
  @keyframes ui-detail-in {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .ticket-actions { margin-top: 13px; gap: 7px; align-items: center; flex-wrap: wrap; }
  .ticket-actions button.secondary { min-height: 32px; padding: 5px 11px; font-size: 12px; }
  select.status { min-height: 32px; border-color: var(--ui-border-strong); }
  .ticket-attach { margin-top: 11px; gap: 7px; }
  .ticket-attach .thumb { width: 48px; height: 48px; border-radius: 8px; border-color: var(--ui-border); }
  .attach-chip { border-radius: 8px; background: #f7faff; border-color: #e2e5e9; }

  /* ---------- 用户 / 文件列表 ---------- */
  .user {
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 10px;
    transition: border-color .16s ease, box-shadow .16s ease;
  }
  .user:hover { border-color: #dae2ec; box-shadow: 0 8px 24px rgba(16,24,40,.055); }
  .user-name { color: var(--ui-text); font-weight: 660; }
  .user-meta { margin-top: 6px; color: #8c97a7; }
  /* ---------- 固定用户组 ---------- */
  .group-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 24px 26px;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: var(--ui-surface);
    box-shadow: 0 8px 24px rgba(16,24,40,.035);
  }
  .group-overview-copy { min-width: 0; }
  .group-overview-kicker {
    margin-bottom: 6px;
    color: var(--ui-text-3);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .06em;
  }
  .group-overview h2 {
    margin: 0;
    color: var(--ui-text);
    font-size: 22px;
    font-weight: 720;
    text-wrap: balance;
  }
  .group-overview p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--ui-text-3);
    font-size: 13px;
    line-height: 1.7;
    text-wrap: pretty;
  }
  .group-overview-count {
    display: grid;
    flex: 0 0 96px;
    place-items: center;
    min-height: 76px;
    border-left: 1px solid var(--ui-border);
    color: var(--ui-text-3);
  }
  .group-overview-count strong {
    color: var(--ui-text);
    font-size: 30px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .group-overview-count span { margin-top: 6px; font-size: 12px; }
  .group-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
  .group-card {
    margin-bottom: 0;
    padding: 20px 22px;
    cursor: default;
    transition: border-color .16s ease, box-shadow .16s ease;
  }
  .group-card:hover { border-color: var(--ui-border); box-shadow: 0 8px 24px rgba(16,24,40,.035); }
  .group-card-head { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; }
  .group-card-title { display: flex; min-width: 0; align-items: center; gap: 10px; }
  .group-card-icon {
    display: inline-grid;
    flex: 0 0 34px;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 720;
  }
  .group-card-icon.grp-admin { background: #f1f3f5; color: #343a45; }
  .group-card-icon.grp-user { background: #f4f6f8; color: #596579; }
  .group-card-icon.grp-guest { background: #eefaf2; color: #217a45; }
  .group-card-title-text { min-width: 0; }
  .group-card-subtitle { display: block; margin-top: 3px; color: var(--ui-text-3); font-size: 11px; line-height: 1.3; }
  .group-fixed-badge {
    margin-left: auto;
    padding: 4px 9px;
    border: 1px solid var(--ui-border);
    border-radius: 999px;
    color: var(--ui-text-3);
    font-size: 11px;
    white-space: nowrap;
  }
  .group-member-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin-top: 22px;
    padding: 11px 12px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: var(--ui-surface-soft);
  }
  .group-member-label { display: inline-flex; align-items: center; gap: 7px; color: var(--ui-text-3); font-size: 12px; }
  .group-member-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .group-member-value { color: var(--ui-text-2); font-size: 12px; font-weight: 680; font-variant-numeric: tabular-nums; }
  .group-permissions { margin-top: 20px; }
  .group-permissions-label { display: block; margin-bottom: 9px; color: var(--ui-text-3); font-size: 11px; font-weight: 620; }
  .group-permission-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .group-permission-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid var(--ui-border);
    border-radius: 7px;
    background: var(--ui-surface-soft);
    color: var(--ui-text-2);
    font-size: 11px;
    line-height: 1.3;
  }
  @media (max-width: 1060px) {
    .group-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 700px) {
    .group-overview { align-items: flex-start; flex-direction: column; gap: 16px; }
    .group-overview-count { grid-template-columns: auto auto; gap: 9px; width: 100%; min-height: 0; padding-top: 14px; border-top: 1px solid var(--ui-border); border-left: 0; justify-content: start; }
    .group-overview-count span { margin-top: 0; align-self: center; }
    .group-list { grid-template-columns: 1fr; }
  }
  .file-row { border-radius: 11px; padding: 13px 15px; }
  .file-name { color: var(--ui-text); }
  .btn-link { border-radius: 8px; border-color: var(--ui-border-strong); }

  /* ---------- Badge ---------- */
  .badge { padding: 3px 9px; border-radius: 999px; font-weight: 560; border: 1px solid transparent; }
  .badge.submitted { background: #f1f3f5; color: #5a6a7a; border-color: #e2e6ea; }
  .badge.pending { background: #fff8e6; color: #9a6700; border-color: #fde8ae; }
  .badge.processing { background: #f1f3f5; color: #343a45; border-color: #e2e5e9; }
  .badge.done { background: #eefaf2; color: #217a45; border-color: #d7f0df; }
  .badge.returned { background: #fff1f1; color: #b83b3b; border-color: #ffdada; }
  /* 优先级 / 危险程度 */
  .badge.p-low, .badge.d-low { background: #f1f3f5; color: #5a6a7a; border-color: #e2e6ea; }
  .badge.p-medium, .badge.d-medium { background: #fff8e6; color: #9a6700; border-color: #fde8ae; }
  .badge.p-high, .badge.d-high { background: #fff1e6; color: #b8531c; border-color: #ffd9b3; }
  .badge.p-urgent { background: #fff1f1; color: #b83b3b; border-color: #ffdada; }
  .badge.active-user { background: #eefaf2; color: #217a45; border-color: #d7f0df; }
  .badge.disabled { background: #fff1f1; color: #b83b3b; border-color: #ffdada; }
  .badge.grp-admin { background: #f1f3f5; color: #343a45; border-color: #e2e5e9; }

  /* 工单详情 */
  .detail-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
  .detail-title-row h2 { font-size: 18px; font-weight: 650; margin: 0; word-break: break-all; }
  .detail-meta { font-size: 12.5px; color: #98a2b3; margin-top: 6px; }
  .detail-desc {
    white-space: pre-wrap; word-break: break-all; font-size: 13.5px; color: #333;
    background: var(--ui-surface-soft); border: 1px solid var(--ui-border); border-radius: 9px; padding: 12px 14px; line-height: 1.75;
  }
  .detail-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .detail-actions .sel select { min-width: 130px; }
  .detail-actions input[type="text"] { min-width: 220px; }
  .detail-empty { color: #98a2b3; font-size: 13px; padding: 6px 0; }

  /* 时间线（现代卡片式） */
  .timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 0;
  }
  .timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, #e2e5e9 0%, #e9edf4 100%);
  }
  .tl-item {
    position: relative;
    padding-left: 52px;
    min-height: 42px;
  }
  .tl-dot {
    position: absolute;
    left: 8px;
    top: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #64748b;
    box-shadow: 0 0 0 1px #e2e5e9, 0 4px 14px rgba(15,23,42,.18);
    z-index: 1;
  }
  .tl-card {
    position: relative;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 12px 15px;
    box-shadow: 0 10px 24px rgba(15,23,42,.035);
    transition: box-shadow .16s ease, border-color .16s ease;
  }
  .tl-card:hover {
    border-color: #e2e5e9;
    box-shadow: 0 12px 28px rgba(15,23,42,.06);
  }
  .tl-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }
  .tl-sentence {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #475467;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tl-time {
    flex-shrink: 0;
    font-size: 12px;
    color: #98a2b3;
    white-space: nowrap;
  }
  .tl-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #fff4f4;
    border: 1px solid #ffdede;
    color: #c24141;
    font-size: 12px;
    line-height: 1.5;
    word-break: break-all;
  }
  .tl-item.is-submit .tl-dot { background: #22c55e; box-shadow: 0 0 0 1px #d7f0df, 0 4px 14px rgba(34,197,94,.18); }
  .tl-item.is-receive .tl-dot { background: #f59e0b; box-shadow: 0 0 0 1px #fde8ae, 0 4px 14px rgba(245,158,11,.18); }
  .tl-item.is-assign .tl-dot,
  .tl-item.is-transfer .tl-dot { background: #8b5cf6; box-shadow: 0 0 0 1px #e8ddff, 0 4px 14px rgba(139,92,246,.18); }
  .tl-item.is-start .tl-dot { background: #4b5563; }
  .tl-item.is-complete .tl-dot { background: #10b981; box-shadow: 0 0 0 1px #d7f0df, 0 4px 14px rgba(16,185,129,.18); }
  .tl-item.is-return .tl-dot { background: #ef4444; box-shadow: 0 0 0 1px #ffdada, 0 4px 14px rgba(239,68,68,.18); }
  .tl-item.is-edit .tl-dot,
  .tl-item.is-update .tl-dot { background: #64748b; box-shadow: 0 0 0 1px #e2e8f0, 0 4px 14px rgba(100,116,139,.16); }
  .badge.grp-user { background: #f4f6f8; color: #596579; border-color: #e5e9ef; }

  /* ---------- 统计 ---------- */
  /* 8 个指标固定 4 列 → 永远是 2 行满格，不会出现落单卡片 */
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
  .stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 18px 19px;
    min-height: 105px;
  }
  .stat-card::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -32px;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(16,24,40,.045);
  }
  .stat-card .num { position: relative; z-index: 1; font-size: 29px; font-weight: 720; letter-spacing: -.035em; color: #27364d; }
  .stat-card .label { position: relative; z-index: 1; margin-top: 6px; color: #8a95a5; }

  /* ECharts 图表区 */
  /* 趋势是时间序列，横向越长可读性越好 → 独占一行；
     下面一行按内容密度分配：状态环 4 / 分类条 5 / 附件仪表 3 */
  .stats-chart-grid {
    display: grid;
    grid-template-columns: 4fr 5fr 3fr;
    gap: 18px;
    align-items: start;
  }
  .stats-chart-grid .card { margin-bottom: 0; min-width: 0; }
  .stats-chart-grid .chart-span { grid-column: 1 / -1; }
  .chart-box { width: 100%; height: 284px; }
  .chart-box-trend { height: 252px; }

  @media (max-width: 1240px) {
    .stats-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 1024px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* ---------- 表格 ---------- */
  .dict-table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: #fff;
  }
  .dict-table th, .dict-table td { border: 0; border-bottom: 1px solid var(--ui-border); border-right: 1px solid var(--ui-border); padding: 9px 12px; }
  .dict-table tr:last-child td { border-bottom: 0; }
  .dict-table th:last-child, .dict-table td:last-child { border-right: 0; }
  .dict-table th { background: var(--ui-surface-soft); color: #5a6678; font-weight: 640; }

  /* 服务器体检的配置项只是说明文字，不使用数据字典的蓝色字段样式 */
  #healthConfig td:first-child,
  #healthCompare td:first-child {
    font-family: inherit;
    color: var(--ui-text-2);
  }
  #healthConfig,
  #healthCompare {
    border: 2px solid #b8c2cf;
    box-shadow: 0 0 0 1px rgba(184, 194, 207, .18);
  }
  #healthConfig th, #healthConfig td,
  #healthCompare th, #healthCompare td {
    border-color: #d8dee7;
  }

  /* ---------- 备份 ---------- */
  .backup-overview { background: var(--ui-surface-soft); border-color: var(--ui-border); border-radius: 10px; padding: 12px 14px; }
  .backup-row { padding: 17px 1px; border-top-color: var(--ui-border); }
  .backup-row:last-child { border-bottom-color: var(--ui-border); }
  .backup-name { color: var(--ui-text); font-weight: 650; }
  .backup-desc { color: #8c97a7; }

  /* ---------- 分页 ---------- */
  .pager {
    bottom: 10px;
    margin-top: 18px;
    padding: 10px 12px;
    border: 1px solid var(--ui-border);
    border-radius: 11px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 28px rgba(16,24,40,.065);
  }
  .pager button { min-height: 31px; padding: 4px 9px; border-radius: 8px; }
  .pager .pg-num.active { background: var(--ui-primary); border-color: var(--ui-primary); color: #fff; }
  .pager select, .pager input[type="number"] { min-height: 31px; border-radius: 8px; }
  #list { padding-bottom: 24px; }

  /* ---------- 弹窗 ---------- */
  .modal-mask { background: rgba(15,23,42,.42); }
  .modal-body {
    width: 420px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 14px;
    padding: 22px 23px;
    box-shadow: 0 24px 70px rgba(15,23,42,.22);
    animation: ui-modal-in .22s cubic-bezier(.22,1,.36,1);
  }
  @keyframes ui-modal-in {
    from { opacity: 0; transform: translateY(7px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  .modal-title { color: var(--ui-text); font-size: 16px; font-weight: 680; }
  .modal-msg { color: var(--ui-text-2); }

  /* ---------- 登录 / 初始化 ---------- */
  body:has(.auth-wrap) {
    min-height: 100vh;
    background: var(--ui-bg); /* 与主应用同色，无渐变 */
  }
  .auth-wrap { max-width: 410px; margin: 0 auto; padding: max(9vh, 60px) 18px 36px; }
  .auth-card {
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 18px 50px rgba(16,24,40,.075);
  }
  .auth-card::before {
    content: "问";
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 17px;
    border-radius: 12px;
    background: var(--ui-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
  }
  .auth-card h2 { color: var(--ui-text); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
  .auth-card .sub { color: #8b95a5; margin-bottom: 22px; }
  .auth-card label { color: #596579; font-size: 12px; font-weight: 570; margin: 14px 0 6px; }
  .auth-card input { min-height: 43px; border-radius: 9px; padding: 9px 12px; }
  .auth-card button { min-height: 43px; border-radius: 9px; margin-top: 20px; }
  .auth-error, .auth-db-error { border-radius: 9px; }

  footer { color: #a3adbb; margin-top: 0; padding: 22px 16px 32px; }

  /* ---------- 响应式 ---------- */
  @media (max-width: 1024px) {
    .sidebar { width: 242px; flex-basis: 242px; }
    .main { padding: 28px 24px 64px; }
  }

  @media (max-width: 768px) {
    .app { display: block; min-height: 100vh; }
    .sidebar,
    body.sidebar-collapsed .sidebar {
      position: relative;
      width: 100%;
      height: auto;
      min-height: 0;
      overflow: visible;
      box-shadow: none;
    }
    .brand,
    body.sidebar-collapsed .brand { height: 68px; padding: 0 16px; justify-content: flex-start; border-bottom: 1px solid var(--ui-sidebar-line); }
    .brand-mark { flex-basis: 36px; height: 36px; }
    .sidebar-toggle { display: none; }
    .sidebar-nav {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      padding: 12px;
      overflow: visible;
    }
    .nav-group,
    body.sidebar-collapsed .nav-group { margin: 0; border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.018); }
    .nav-group-title,
    body.sidebar-collapsed .nav-group-title {
      width: auto;
      min-height: 44px;
      margin: 0;
      padding: 0 11px;
      justify-content: flex-start;
    }
    body.sidebar-collapsed .nav-group-title span,
    body.sidebar-collapsed .nav-label { display: inline; }
    body.sidebar-collapsed .grp-arrow { display: inline-block; }
    .nav-group-items,
    body.sidebar-collapsed .nav-group-items,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-items { display: grid; }
    .nav-group.collapsed .nav-group-items,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-items { grid-template-rows: 0fr; }
    .nav-group-inner,
    body.sidebar-collapsed .nav-group-inner { padding: 4px 7px 7px 14px; }
    .nav-group.collapsed .nav-group-inner,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-inner { opacity: 0; transform: translateY(-4px); padding-top: 0; padding-bottom: 0; }
    .nav-group-inner::before { left: 10px; }
    .nav-item,
    body.sidebar-collapsed .nav-item {
      width: 100%;
      min-height: 37px;
      margin: 2px 0;
      padding: 0 10px 0 13px;
      justify-content: flex-start;
    }
    body.sidebar-collapsed .nav-item::after { display: none; }
    .who,
    body.sidebar-collapsed .who { padding: 11px 16px; justify-content: flex-start; }
    body.sidebar-collapsed .who-txt { display: block; }
    body.sidebar-collapsed .who-out { display: grid; margin-left: auto; }
    .main { padding: 22px 15px 50px; }
    .tab-page { max-width: none; }
    .filter-bar { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
    .toolbar { flex-wrap: wrap; }
    .toolbar > input[type="search"] { flex: 1 1 100%; }
    .toolbar .sel { flex: 1 1 140px; }
    .date-row input[type="date"] { flex: 1 1 130px; }
    .row { flex-direction: column; }
    .backup-row { align-items: flex-start; flex-direction: column; gap: 12px; }
    .backup-actions { width: 100%; }
    .backup-actions button { flex: 1; }
    .pager { position: static; }
  }

  @media (max-width: 520px) {
    .sidebar-nav { grid-template-columns: 1fr; }
    .main { padding-left: 12px; padding-right: 12px; }
    .card { padding: 17px; }
    .page-title { font-size: 20px; }
    .ticket { padding: 15px; }
    .ticket-head { align-items: flex-start; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card { min-height: 94px; padding: 15px; }
    .stat-card .num { font-size: 25px; }
    .stats-chart-grid { grid-template-columns: 1fr; }
    .filter-bar { padding: 11px; }
    .date-label, .date-sep { display: none; }
  }



  /* ======================================================================
     2026 SIDEBAR REWORK · 参考用户示例图（浅色分组卡片 + 内嵌子菜单）
     仅覆盖侧边栏视觉，不修改接口、HTML结构与业务逻辑
     ====================================================================== */
  :root {
    --sb-bg: #fbfaf8;
    --sb-surface: #f3f0ea;
    --sb-surface-2: #f7f5f1;
    --sb-line: #ebe7df;
    --sb-line-2: #e7e2d8;
    --sb-text: #2d2b28;
    --sb-text-2: #6e685f;
    --sb-text-3: #b4aea4;
    --sb-accent: #efeae1;
    --sb-accent-2: #f4f1eb;
  }

  .sidebar {
    width: 250px;
    flex: 0 0 250px;
    background: var(--sb-bg);
    color: var(--sb-text);
    border-right: 1px solid var(--sb-line);
    box-shadow: none;
  }
  body.sidebar-collapsed .sidebar { width: 84px; flex-basis: 84px; }

  .brand {
    height: 76px;
    padding: 0 18px;
    background: transparent;
    border-bottom: 1px solid var(--sb-line);
  }
  .brand-mark {
    background: #171717;
    color: #fff;
    border-radius: 12px;
  }
  .brand-logo {
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }
  .brand-name { color: var(--sb-text); font-weight: 700; }
  .brand-sub { color: #b3ada4; }

  .sidebar-toggle {
    top: 24px;
    right: -14px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--sb-line-2);
    background: #fff;
    color: #7b746b;
    box-shadow: 0 8px 20px rgba(32,25,15,.08);
  }
  .sidebar-toggle:hover {
    background: #fff;
    color: var(--sb-text);
    border-color: #ddd6ca;
    transform: none;
  }

  .sidebar-nav {
    padding: 18px 12px 14px;
    scrollbar-color: #dfd8cc transparent;
  }
  .sidebar-nav::-webkit-scrollbar-thumb { background: #dfd8cc; }

  .nav-group {
    margin: 0 0 16px;
    border-radius: 18px;
  }

  .nav-group-title {
    min-height: 56px;
    padding: 0 16px;
    border-radius: 18px;
    background: transparent;
    color: var(--sb-text);
    font-size: 15px;
    font-weight: 680;
    gap: 12px;
  }
  .nav-group-title:hover,
  .nav-group:has(.nav-item.active) > .nav-group-title {
    background: var(--sb-surface);
    color: var(--sb-text);
  }
  .nav-group-title::before {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
    opacity: .85;
    background-size: 19px;
    filter: grayscale(1) brightness(.36);
  }
  .nav-group-title .grp-en {
    display: none;
  }
  .nav-group-title .grp-arrow {
    width: 18px;
    height: 18px;
  }
  .nav-group-title .grp-arrow::before,
  .nav-group-title .grp-arrow::after {
    top: 8px;
    width: 5px;
    background: #847d74;
  }

  .nav-group-items {
    transition: grid-template-rows .34s cubic-bezier(.22,1,.36,1);
  }
  .nav-group-inner {
    padding: 10px 0 0 20px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .22s ease .04s, transform .28s cubic-bezier(.22,1,.36,1), padding .28s cubic-bezier(.22,1,.36,1);
  }
  .nav-group-inner::before {
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: var(--sb-line-2);
  }
  .nav-group.collapsed .nav-group-inner {
    opacity: 0;
    transform: translateY(-4px);
    padding-top: 0;
  }

  .nav-item {
    min-height: 40px;
    margin: 1px 0;
    padding: 0 14px 0 18px;
    gap: 10px;
    border-radius: 14px;
    color: var(--sb-text-2);
    font-size: 14px;
    font-weight: 560;
    transition: background .16s ease, color .16s ease, transform .16s ease;
  }
  .nav-item .nav-ico {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
    opacity: .72;
    color: inherit;
  }
  .nav-item:hover {
    background: rgba(239,234,225,.62);
    color: var(--sb-text);
    transform: translateX(1px);
  }
  .nav-item.active {
    background: var(--sb-accent-2);
    color: #151515;
    font-weight: 680;
    box-shadow: inset 0 0 0 1px rgba(228,222,212,.52);
  }
  .nav-item.active .nav-ico {
    color: #5a544c;
    opacity: .9;
  }
  .nav-item.active::before {
    display: none;
  }

  .who {
    min-height: 68px;
    padding: 12px 14px;
    border-top: 1px solid var(--sb-line);
    background: transparent;
  }
  .who-ava {
    border: 1px solid var(--sb-line-2);
    background: #fff;
    color: var(--sb-text);
  }
  .who-name { color: var(--sb-text); }
  .who-role { color: var(--sb-text-3); }
  .who-out { color: #9d968a; }
  .who-out:hover { color: #8c2f2f; background: #f6eaea; }

  body.sidebar-collapsed .brand {
    padding: 0;
    justify-content: center;
  }
  body.sidebar-collapsed .nav-group {
    margin-bottom: 10px;
  }
  body.sidebar-collapsed .nav-group-title {
    width: 52px;
    min-height: 50px;
    margin: 0 auto 4px;
    padding: 0;
    justify-content: center;
    border-radius: 16px;
  }
  body.sidebar-collapsed .nav-group-title:hover,
  body.sidebar-collapsed .nav-group:has(.nav-item.active) > .nav-group-title {
    background: var(--sb-surface);
  }
  body.sidebar-collapsed .nav-group-title::before {
    width: 20px;
    height: 20px;
    background-size: 18px;
  }
  body.sidebar-collapsed .nav-group-items,
  body.sidebar-collapsed .nav-group.collapsed .nav-group-items {
    grid-template-rows: 1fr;
  }
  body.sidebar-collapsed .nav-group-inner {
    padding: 0;
    opacity: 1;
    transform: none;
  }
  body.sidebar-collapsed .nav-group-inner::before { display: none; }
  body.sidebar-collapsed .nav-item {
    width: 50px;
    min-height: 40px;
    margin: 2px auto;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
  }
  body.sidebar-collapsed .nav-item::after {
    left: calc(100% + 12px);
    background: #1d1c1a;
    color: #fff;
    border: none;
    box-shadow: 0 10px 24px rgba(27,23,19,.16);
  }
  body.sidebar-collapsed .who {
    padding: 12px 0;
    justify-content: center;
  }

  @media (max-width: 768px) {
    .sidebar,
    body.sidebar-collapsed .sidebar {
      width: 100%;
      flex-basis: auto;
      height: auto;
      position: static;
    }
    .brand,
    body.sidebar-collapsed .brand {
      justify-content: flex-start;
      padding: 0 16px;
    }
    .sidebar-nav {
      display: block;
      padding: 12px;
    }
    .nav-group,
    body.sidebar-collapsed .nav-group {
      margin: 0 0 12px;
      border-radius: 18px;
      background: transparent;
      border: none;
    }
    .nav-group-title,
    body.sidebar-collapsed .nav-group-title {
      width: auto;
      min-height: 54px;
      margin: 0;
      padding: 0 16px;
      justify-content: flex-start;
      border-radius: 18px;
      background: var(--sb-surface);
    }
    body.sidebar-collapsed .nav-group-title span,
    body.sidebar-collapsed .nav-label {
      display: inline;
    }
    body.sidebar-collapsed .grp-arrow { display: inline-block; }
    .nav-group-items,
    body.sidebar-collapsed .nav-group-items,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-items {
      display: grid;
    }
    .nav-group.collapsed .nav-group-items,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-items {
      grid-template-rows: 0fr;
    }
    .nav-group-inner,
    body.sidebar-collapsed .nav-group-inner {
      padding: 10px 0 0 18px;
    }
    .nav-group.collapsed .nav-group-inner,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-inner {
      opacity: 0;
      transform: translateY(-4px);
      padding-top: 0;
      padding-bottom: 0;
    }
    .nav-item,
    body.sidebar-collapsed .nav-item {
      width: 100%;
      min-height: 40px;
      margin: 2px 0;
      padding: 0 14px 0 18px;
      justify-content: flex-start;
    }
    body.sidebar-collapsed .nav-item::after { display: none; }
    .who,
    body.sidebar-collapsed .who {
      padding: 12px 16px;
      justify-content: flex-start;
    }
    body.sidebar-collapsed .who-txt { display: block; }
    body.sidebar-collapsed .who-out { display: grid; margin-left: auto; }
  }


  /* ======================================================================
     2026 SIDEBAR TIGHTEN · 缩小菜单卡片和分组间距
     仅覆盖侧边栏尺寸节奏，不修改接口与逻辑
     ====================================================================== */
  .sidebar {
    width: 238px;
    flex: 0 0 238px;
  }
  body.sidebar-collapsed .sidebar {
    width: 76px;
    flex-basis: 76px;
  }

  .sidebar-nav {
    padding: 14px 10px 12px;
  }

  .nav-group {
    margin: 0 0 10px;
  }

  .nav-group-title {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    gap: 10px;
    font-size: 14px;
  }
  .nav-group-title::before {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
    background-size: 17px;
  }
  .nav-group-title .grp-arrow {
    width: 16px;
    height: 16px;
  }
  .nav-group-title .grp-arrow::before,
  .nav-group-title .grp-arrow::after {
    top: 7px;
    width: 5px;
  }

  .nav-group-inner {
    padding: 6px 0 0 16px;
  }
  .nav-group-inner::before {
    left: 7px;
    top: 8px;
    bottom: 8px;
  }
  .nav-group.collapsed .nav-group-inner {
    padding-top: 0;
  }

  .nav-item {
    min-height: 34px;
    margin: 0;
    padding: 0 12px 0 15px;
    border-radius: 11px;
    font-size: 13px;
    gap: 9px;
  }
  .nav-item .nav-ico {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .brand {
    height: 72px;
    padding: 0 16px;
  }
  .who {
    min-height: 62px;
    padding: 10px 12px;
  }

  body.sidebar-collapsed .nav-group {
    margin-bottom: 8px;
  }
  body.sidebar-collapsed .nav-group-title {
    width: 46px;
    min-height: 44px;
    margin-bottom: 2px;
    border-radius: 14px;
  }
  body.sidebar-collapsed .nav-item {
    width: 44px;
    min-height: 36px;
    border-radius: 12px;
  }

  @media (max-width: 768px) {
    .sidebar-nav {
      padding: 10px;
    }
    .nav-group,
    body.sidebar-collapsed .nav-group {
      margin: 0 0 10px;
    }
    .nav-group-title,
    body.sidebar-collapsed .nav-group-title {
      min-height: 46px;
      padding: 0 14px;
      border-radius: 14px;
    }
    .nav-group-inner,
    body.sidebar-collapsed .nav-group-inner {
      padding: 6px 0 0 16px;
    }
    .nav-item,
    body.sidebar-collapsed .nav-item {
      min-height: 36px;
      padding: 0 12px 0 15px;
      border-radius: 11px;
    }
  }


  /* ======================================================================
     2026 SIDEBAR SLIM V4 · 进一步收窄侧边栏与菜单横向空间
     仅覆盖侧边栏视觉尺寸，不修改接口、数据与业务逻辑
     ====================================================================== */
  .sidebar {
    width: 205px;
    flex: 0 0 205px;
  }
  body.sidebar-collapsed .sidebar {
    width: 68px;
    flex: 0 0 68px;
  }

  .brand {
    height: 66px;
    padding: 0 12px;
    gap: 9px;
  }
  .brand-mark {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 13px;
  }
  .brand-name {
    font-size: 13px;
  }
  .brand-sub {
    font-size: 8px;
    letter-spacing: .13em;
  }

  .sidebar-toggle {
    top: 20px;
    right: -13px;
    width: 26px;
    height: 26px;
  }

  .sidebar-nav {
    padding: 12px 8px 10px;
  }

  .nav-group {
    margin: 0 0 8px;
  }

  .nav-group-title {
    min-height: 42px;
    padding: 0 11px;
    border-radius: 12px;
    gap: 8px;
    font-size: 13px;
  }
  .nav-group-title::before {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
    background-size: 16px;
  }
  .nav-group-title .grp-arrow {
    width: 14px;
    height: 14px;
  }
  .nav-group-title .grp-arrow::before,
  .nav-group-title .grp-arrow::after {
    top: 6px;
    width: 4px;
  }
  .nav-group-title .grp-arrow::before { left: 3px; }
  .nav-group-title .grp-arrow::after { right: 3px; }

  .nav-group-inner {
    padding: 5px 0 0 13px;
  }
  .nav-group-inner::before {
    left: 5px;
    top: 7px;
    bottom: 7px;
  }

  .nav-item {
    min-height: 32px;
    padding: 0 10px 0 12px;
    gap: 7px;
    border-radius: 10px;
    font-size: 12.5px;
  }
  .nav-item .nav-ico {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  .who {
    min-height: 58px;
    padding: 8px 10px;
    gap: 8px;
  }
  .who-ava {
    flex: 0 0 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 12px;
  }
  .who-name { font-size: 12px; }
  .who-role { font-size: 10px; }
  .who-out { padding: 5px; }

  body.sidebar-collapsed .brand {
    padding: 0;
  }
  body.sidebar-collapsed .nav-group {
    margin-bottom: 6px;
  }
  body.sidebar-collapsed .nav-group-title {
    width: 42px;
    min-height: 40px;
    border-radius: 12px;
  }
  body.sidebar-collapsed .nav-group-title::before {
    width: 18px;
    height: 18px;
    background-size: 17px;
  }
  body.sidebar-collapsed .nav-item {
    width: 40px;
    min-height: 34px;
    border-radius: 10px;
  }

  @media (max-width: 768px) {
    .sidebar,
    body.sidebar-collapsed .sidebar {
      width: 100%;
      flex-basis: auto;
    }
    .brand,
    body.sidebar-collapsed .brand {
      height: 64px;
      padding: 0 14px;
    }
    .sidebar-nav {
      padding: 9px;
    }
    .nav-group-title,
    body.sidebar-collapsed .nav-group-title {
      min-height: 42px;
      padding: 0 12px;
      border-radius: 12px;
    }
    .nav-group-inner,
    body.sidebar-collapsed .nav-group-inner {
      padding: 5px 0 0 13px;
    }
    .nav-item,
    body.sidebar-collapsed .nav-item {
      min-height: 34px;
      padding: 0 10px 0 12px;
      border-radius: 10px;
    }
  }


  /* ======================================================================
     2026 SIDEBAR POLISH V5
     1) 收缩按钮强制正圆
     2) 修复收缩状态下 collapsed 分组子项图标透明/缺失
     3) 子项 hover 增加呼吸感，同时压缩一级菜单之间的间距
     仅覆盖视觉状态，不修改接口与业务逻辑
     ====================================================================== */

  /* 1. 收缩按钮：全局 button 有 min-height，必须显式清掉，否则会被撑成椭圆 */
  .sidebar-toggle {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    top: 18px;
    right: -15px;
    display: grid;
    place-items: center;
    line-height: 1;
  }
  .sidebar-toggle svg {
    width: 11px;
    height: 11px;
    flex: none;
  }

  /* 3. 一级菜单之间更紧凑 */
  .nav-group {
    margin-bottom: 3px;
  }
  .nav-group-title {
    min-height: 40px;
  }

  /* 子菜单本身稍微舒展，hover 不再上下黏在一起 */
  .nav-group-inner {
    padding-top: 6px;
    padding-bottom: 4px;
  }
  .nav-item {
    min-height: 34px;
    margin: 2px 0;
    padding-left: 12px;
    padding-right: 10px;
    border-radius: 9px;
  }
  .nav-item:hover {
    transform: none;
  }

  /* 父菜单收起时，不额外保留大块下边距 */
  .nav-group.collapsed .nav-group-inner {
    padding-top: 0;
    padding-bottom: 0;
  }

  /* 2. 修复收缩后的空白：
     .nav-group.collapsed .nav-group-inner 的 specificity 更高，
     之前虽把 grid 展开了，但 opacity 仍为 0。这里明确覆盖。 */
  body.sidebar-collapsed .nav-group,
  body.sidebar-collapsed .nav-group.collapsed {
    margin-bottom: 3px;
  }
  body.sidebar-collapsed .nav-group-items,
  body.sidebar-collapsed .nav-group.collapsed .nav-group-items {
    grid-template-rows: 1fr;
  }
  body.sidebar-collapsed .nav-group-inner,
  body.sidebar-collapsed .nav-group.collapsed .nav-group-inner {
    padding: 2px 0 3px;
    opacity: 1;
    transform: none;
    visibility: visible;
  }
  body.sidebar-collapsed .nav-group-inner::before,
  body.sidebar-collapsed .nav-group.collapsed .nav-group-inner::before {
    display: none;
  }
  body.sidebar-collapsed .nav-item {
    width: 40px;
    min-height: 34px;
    margin: 1px auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #746e65;
  }
  body.sidebar-collapsed .nav-item .nav-ico {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    opacity: .82;
    color: currentColor;
    visibility: visible;
  }
  body.sidebar-collapsed .nav-item:hover .nav-ico,
  body.sidebar-collapsed .nav-item.active .nav-ico {
    opacity: 1;
  }

  /* 收缩态的父级按钮也再紧一点，避免图标列显得松散 */
  body.sidebar-collapsed .nav-group-title {
    width: 40px;
    min-height: 38px;
    margin: 0 auto;
  }

  @media (max-width: 768px) {
    .nav-group,
    body.sidebar-collapsed .nav-group,
    body.sidebar-collapsed .nav-group.collapsed {
      margin-bottom: 4px;
    }
    .nav-group-title,
    body.sidebar-collapsed .nav-group-title {
      min-height: 40px;
    }
    .nav-group-inner,
    body.sidebar-collapsed .nav-group-inner {
      padding-top: 6px;
      padding-bottom: 4px;
    }
    .nav-group.collapsed .nav-group-inner,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-inner {
      opacity: 0;
      transform: translateY(-4px);
      padding-top: 0;
      padding-bottom: 0;
    }
    .nav-item,
    body.sidebar-collapsed .nav-item {
      min-height: 34px;
      margin: 2px 0;
    }
  }


  /* ======================================================================
     2026 SIDEBAR COLLAPSED FLAT V6
     收缩状态取消父级菜单，只保留真正可点击的叶子菜单图标。
     分组之间使用轻分隔线，不再显示无意义的父级图标。
     仅修改视觉层，不修改接口、data-tab 与页面切换逻辑。
     ====================================================================== */
  @media (min-width: 769px) {
    /* 收缩后父级标题完全退出布局，避免“父图标 + 子图标”重复 */
    body.sidebar-collapsed .nav-group-title,
    body.sidebar-collapsed .nav-group > .nav-group-title {
      display: none !important;
    }

    /* 所有分组在收缩态都强制展开叶子项；collapsed 只影响展开态 */
    body.sidebar-collapsed .nav-group-items,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-items {
      display: grid !important;
      grid-template-rows: 1fr !important;
    }
    body.sidebar-collapsed .nav-group-inner,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-inner {
      min-height: 0;
      padding: 0 !important;
      opacity: 1 !important;
      visibility: visible !important;
      transform: none !important;
      overflow: visible;
    }
    body.sidebar-collapsed .nav-group-inner::before,
    body.sidebar-collapsed .nav-group.collapsed .nav-group-inner::before {
      display: none !important;
    }

    /* 父分组本身不再占菜单高度，只负责把叶子项归组 */
    body.sidebar-collapsed .nav-group,
    body.sidebar-collapsed .nav-group.collapsed {
      position: relative;
      margin: 0 !important;
      padding: 0;
      border: 0;
      background: transparent;
      border-radius: 0;
    }

    /* 分组之间只留一条很轻的分隔线 */
    body.sidebar-collapsed .nav-group + .nav-group {
      margin-top: 7px !important;
      padding-top: 8px;
    }
    body.sidebar-collapsed .nav-group + .nav-group::before {
      content: "";
      position: absolute;
      top: 0;
      left: 50%;
      width: 22px;
      height: 1px;
      transform: translateX(-50%);
      background: #ece8e1;
      border-radius: 999px;
    }

    /* 只保留真正能切换页面的菜单项 */
    body.sidebar-collapsed .nav-item {
      width: 40px;
      height: 38px;
      min-height: 38px;
      margin: 2px auto;
      padding: 0;
      border-radius: 11px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #777168;
      background: transparent;
      box-shadow: none;
      transform: none;
    }
    body.sidebar-collapsed .nav-item:hover {
      background: #f2eee8;
      color: #24211e;
    }
    body.sidebar-collapsed .nav-item.active {
      background: #eee9e1;
      color: #1b1917;
      box-shadow: inset 0 0 0 1px rgba(220,213,202,.55);
    }
    body.sidebar-collapsed .nav-item.active::before {
      display: none;
    }
    body.sidebar-collapsed .nav-item .nav-ico {
      display: block !important;
      width: 16px;
      height: 16px;
      flex: 0 0 16px;
      opacity: .78 !important;
      visibility: visible !important;
      color: currentColor;
    }
    body.sidebar-collapsed .nav-item:hover .nav-ico,
    body.sidebar-collapsed .nav-item.active .nav-ico {
      opacity: 1 !important;
    }

    /* tooltip 与真实叶子菜单对应 */
    body.sidebar-collapsed .nav-item::after {
      left: calc(100% + 11px);
      top: 50%;
      transform: translateY(-50%) translateX(-3px);
      padding: 6px 9px;
      border-radius: 7px;
      background: #22201d;
      color: #fff;
      border: 0;
      box-shadow: 0 8px 22px rgba(38,31,23,.16);
      opacity: 0;
      transition: opacity .14s ease, transform .14s ease;
      z-index: 80;
    }
    body.sidebar-collapsed .nav-item:hover::after {
      opacity: 1;
      transform: translateY(-50%) translateX(0);
    }

    /* 收缩后的导航整体稍微向上靠，避免顶部产生父菜单空区 */
    body.sidebar-collapsed .sidebar-nav {
      padding-top: 10px;
      padding-left: 0;
      padding-right: 0;
    }
  }

  /* ======================================================================
     2026 TOPBAR PASS V1
     登录后的账户入口统一放到主区顶部；复用现有头像/退出按钮逻辑。
     ====================================================================== */
  .app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: -24px -28px 22px;
    padding: 12px 28px;
    background: rgba(247, 248, 250, .94);
    border-bottom: 1px solid #e5e7eb;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .app-topbar-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
  }
  .app-topbar-kicker {
    color: #20242c;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
  }
  .app-topbar-divider {
    width: 1px;
    height: 18px;
    background: #d9dde4;
  }
  .app-topbar-current {
    overflow: hidden;
    color: #7b8798;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 覆盖旧侧边栏用户卡样式，保留 .who-* 选择器供现有鉴权脚本更新。 */
  .app-topbar-account.who {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .app-topbar-account.who .who-ava {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid #d9dde4;
    background: #ffffff;
  }
  .app-topbar-account.who .who-txt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 72px;
    line-height: 1.35;
  }
  .app-topbar-account.who .who-name {
    color: #20242c;
    font-size: 13px;
    font-weight: 600;
  }
  .app-topbar-account.who .who-role {
    color: #8b95a3;
    font-size: 11px;
  }
  .app-topbar-account.who .who-out {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-left: 4px;
    padding: 0 11px;
    border: 1px solid #d9dde4;
    border-radius: 9px;
    background: #ffffff;
    color: #626b78;
    font-size: 13px;
    line-height: 1;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
  }
  .app-topbar-account.who .who-out:hover {
    border-color: #cbd1da;
    background: #f5f6f8;
    color: #20242c;
  }
  .app-topbar-account.who .who-out:focus-visible,
  .app-topbar-account.who .who-ava:focus-visible {
    outline: 2px solid #b3bcc6;
    outline-offset: 2px;
  }

  /* 顶部账户区不应受侧边栏收起状态影响。 */
  body.sidebar-collapsed .app-topbar-account.who {
    justify-content: flex-start;
    padding: 0;
  }
  body.sidebar-collapsed .app-topbar-account.who .who-txt,
  body.sidebar-collapsed .app-topbar-account.who .who-out {
    display: inline-flex;
  }

  @media (max-width: 768px) {
    .app-topbar {
      position: static;
      min-height: 60px;
      gap: 12px;
      margin: -18px -16px 18px;
      padding: 10px 16px;
    }
    .app-topbar-current,
    .app-topbar-account.who .who-role {
      display: none;
    }
    .app-topbar-account.who .who-txt {
      min-width: 0;
    }
    .app-topbar-account.who .who-out {
      padding: 0 9px;
    }
    .app-topbar-account.who .who-out span {
      display: none;
    }
  }

  /* 数据字典表格与服务器体检表格使用一致的清晰边界 */
  #dictList .dict-table {
    border: 2px solid #b8c2cf;
    box-shadow: 0 0 0 1px rgba(184, 194, 207, .18);
  }
  #dictList .dict-table th,
  #dictList .dict-table td {
    border-bottom-color: #d8dee7;
    border-right-color: #d8dee7;
  }


  /* ======================================================================
     2026 TICKET LIST REFRESH V7
     中性浅灰白背景 + 紧凑筛选区 + 更克制的工单列表
     仅覆盖视觉/布局，不修改接口、字段 ID、data-tab 或业务逻辑
     ====================================================================== */
  :root {
    --ui-bg: #f7f8fa;
    --ui-surface: #ffffff;
    --ui-surface-soft: #f5f6f8;
    --ui-border: #e7e9ed;
    --ui-border-strong: #dfe3e8;
    --ui-text: #20242c;
    --ui-text-2: #626b78;
    --ui-text-3: #9aa2ad;
    --ui-primary: #20242b;
    --ui-primary-hover: #343a45;
    --ui-primary-soft: #f1f3f5;
    --ui-shadow: 0 8px 24px rgba(29, 38, 53, .035);

    --sb-bg: #f7f8fa;
    --sb-surface: #eef0f3;
    --sb-surface-2: #f3f4f6;
    --sb-line: #e6e8eb;
    --sb-line-2: #e1e4e8;
    --sb-text: #292d33;
    --sb-text-2: #666d77;
    --sb-text-3: #a5abb3;
    --sb-accent: #eceef1;
    --sb-accent-2: #eef0f3;
  }

  html,
  body,
  .main,
  .sidebar {
    background: var(--ui-bg) !important;
  }
  .sidebar {
    border-right-color: var(--sb-line) !important;
  }
  .brand {
    border-bottom-color: var(--sb-line) !important;
  }
  .who {
    border-top-color: var(--sb-line) !important;
  }

  /* 侧边栏暖米色改成中性灰白，同时保留既有结构 */
  .nav-group-title:hover,
  .nav-group:has(.nav-item.active) > .nav-group-title {
    background: var(--sb-surface) !important;
  }
  .nav-item:hover {
    background: #f0f1f3 !important;
  }
  .nav-item.active {
    background: #eceef1 !important;
    box-shadow: inset 0 0 0 1px rgba(219,223,228,.72) !important;
  }
  .nav-group-inner::before {
    background: #e2e5e9 !important;
  }
  body.sidebar-collapsed .nav-group + .nav-group::before {
    background: #e4e7eb !important;
  }
  body.sidebar-collapsed .nav-item:hover {
    background: #eef0f2 !important;
  }
  body.sidebar-collapsed .nav-item.active {
    background: #e9ebee !important;
    box-shadow: inset 0 0 0 1px rgba(216,220,225,.8) !important;
  }

  /* 工单页单独限制内容宽度，避免超宽屏横向铺满 */
  #tab-list {
    max-width: 1180px;
    margin-left: 0;
    margin-right: auto;
  }
  #tab-list .page-title {
    margin-bottom: 16px;
  }

  /* 筛选区：从整条横幅改成紧凑条件卡片 */
  #tab-list .filter-bar {
    width: min(100%, 900px);
    margin: 0 0 14px;
    padding: 14px 15px 13px;
    border: 1px solid var(--ui-border);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(27, 36, 49, .035);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* 第一行：搜索框保持合理长度，状态/分类固定宽度 */
  #tab-list .filter-bar > .toolbar:first-child {
    display: grid;
    grid-template-columns: minmax(280px, 430px) 118px 118px 68px;
    align-items: center;
    justify-content: start;
    gap: 9px;
    margin-bottom: 11px;
  }
  #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
    width: 240px;
    min-width: 0;
    flex: 0 0 240px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 9px;
    border-color: var(--ui-border-strong);
    background: #fafbfc;
    font-size: 13px;
  }
  #tab-list .filter-bar > .toolbar:first-child .sel {
    width: 118px;
    flex: none;
  }
  #tab-list .filter-bar > .toolbar:first-child select {
    width: 100%;
    min-height: 38px;
    padding-top: 7px;
    padding-bottom: 7px;
    border-radius: 9px;
    border-color: var(--ui-border-strong);
    background-color: #fff;
    font-size: 13px;
  }
  #tab-list #clearFilter {
    width: 68px;
    min-width: 68px;
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 9px;
    background: #fff;
    color: #6f7782;
    border-color: var(--ui-border-strong);
  }
  #tab-list #clearFilter:hover {
    background: #f5f6f8;
    color: #343a43;
    border-color: #d4d9df;
  }

  /* 第二行：日期作为次级条件，不再撑满一整行 */
  #tab-list .date-row {
    display: flex;
    width: auto;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    margin: 0;
    min-height: 34px;
  }
  #tab-list .date-label {
    flex: 0 0 auto;
    margin-right: 2px;
    color: #7d8590;
    font-size: 12px;
    font-weight: 500;
  }
  #tab-list .date-sep {
    flex: 0 0 auto;
    color: #a4abb4;
    font-size: 12px;
  }
  #tab-list .date-row input[type="date"] {
    flex: 0 0 142px;
    width: 142px;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 8px;
    border-color: var(--ui-border-strong);
    background: #fafbfc;
    color: #626b76;
    font-size: 12px;
  }
  #tab-list .date-hint {
    margin-left: 5px;
    font-size: 11px;
  }

  /* 输入控件 focus 改为更克制的蓝灰，不出现亮蓝大光圈 */
  #tab-list .filter-bar input:focus,
  #tab-list .filter-bar select:focus {
    border-color: #c6ccd6 !important;
    box-shadow: 0 0 0 3px rgba(16, 24, 40, .07) !important;
    background: #fff;
  }

  /* 工单列表本体：宽度与页面节奏统一 */
  #tab-list #list,
  #tab-list #pager {
    width: min(100%, 1080px);
  }
  #tab-list #list {
    padding-bottom: 20px;
  }

  /* ===== 工单列表表格 ===== */
  #tab-list .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(31,40,54,.025);
  }
  #tab-list .ticket-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
  }
  #tab-list .ticket-table th,
  #tab-list .ticket-table td {
    border: 0;
    border-bottom: 1px solid var(--ui-border);
    padding: 11px 14px;
    text-align: left;
    vertical-align: middle;
  }
  #tab-list .ticket-table thead th {
    background: var(--ui-surface-soft, #fafbfc);
    color: #5a6678;
    font-weight: 640;
    font-size: 12.5px;
    white-space: nowrap;
  }
  #tab-list .ticket-table tbody tr { cursor: pointer; transition: background .14s ease; }
  #tab-list .ticket-table tbody tr:hover { background: #fafbfc; }
  #tab-list .ticket-table tbody tr:last-child td { border-bottom: 0; }

  /* 列宽：工单号/提交人/时间稍宽，状态/优先/操作收窄 */
  #tab-list .ticket-table th:nth-child(1) { width: 172px; }
  #tab-list .ticket-table th:nth-child(3) { width: 150px; }
  #tab-list .ticket-table th:nth-child(5) { width: 108px; }
  #tab-list .ticket-table th:nth-child(6) { width: 96px; }
  #tab-list .ticket-table th:nth-child(7) { width: 150px; }
  #tab-list .ticket-table th:nth-child(8) { width: 116px; }

  /* 单元格内部 */
  #tab-list .ticket-table td.tb-no {
    font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
    color: #2b323c;
    font-weight: 600;
    white-space: nowrap;
  }
  #tab-list .ticket-table td.tb-brief {
    min-width: 220px;
    color: #20242b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #tab-list .tb-brief-title {
    color: #20242b; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px;
  }
  #tab-list .tb-brief-desc {
    color: #9aa1aa; font-size: 12px; margin-top: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px;
  }
  #tab-list .ticket-table td.tb-user { white-space: nowrap; }
  #tab-list .tb-user { display: flex; align-items: center; gap: 9px; }
  #tab-list .tb-avatar {
    width: 28px; height: 28px; flex: 0 0 auto;
    border-radius: 50%;
    display: grid; place-items: center;
    background: #eceff3; color: #4a5568;
    font-size: 12px; font-weight: 650;
  }
  #tab-list .tb-user-info { display: flex; flex-direction: column; min-width: 0; }
  #tab-list .tb-user-name { color: #2b323c; font-weight: 620; }
  #tab-list .tb-user-group { color: #9aa1aa; font-size: 11px; margin-top: 2px; }
  #tab-list .ticket-table td.tb-cat { color: #47515d; white-space: nowrap; }
  #tab-list .ticket-table td.tb-status,
  #tab-list .ticket-table td.tb-priority { white-space: nowrap; }
  #tab-list .ticket-table td.tb-time .tb-time-abs { color: #47515d; font-weight: 550; white-space: nowrap; }
  #tab-list .ticket-table td.tb-time .tb-time-rel { color: #9aa1aa; font-size: 11px; margin-top: 3px; white-space: nowrap; }
  #tab-list .ticket-table td.tb-ops { white-space: nowrap; }
  #tab-list .tb-op {
    height: 28px; padding: 0 12px; border: 1px solid var(--ui-border-strong);
    border-radius: 8px; background: #fff; color: #56606d; font-size: 12.5px; font-weight: 600;
    margin-right: 6px; cursor: pointer; transition: .14s ease;
  }
  #tab-list .tb-op:hover { background: #f5f6f8; color: #20242b; border-color: #d4d9df; }
  #tab-list .tb-op:last-child { margin-right: 0; }
  #tab-list .ticket {
    margin-bottom: 9px;
    padding: 16px 17px;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(31, 40, 54, .025);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  }
  #tab-list .ticket:hover {
    border-color: #dce0e5;
    box-shadow: 0 8px 22px rgba(31, 40, 54, .045);
    transform: translateY(-1px);
  }
  #tab-list .ticket-title {
    color: #252a31;
    font-size: 14px;
    font-weight: 650;
  }
  #tab-list .ticket-meta {
    color: #969da6;
    margin-top: 5px;
  }
  #tab-list .ticket-desc {
    margin: 10px 0;
    padding: 9px 11px;
    border: 1px solid #eceef1;
    border-radius: 9px;
    background: #f7f8fa;
    color: #606975;
  }

  /* 空状态不再裸露在大面积背景中央 */
  #tab-list .empty {
    min-height: 132px;
    display: grid;
    place-items: center;
    padding: 24px;
    border: 1px dashed #dde1e6;
    border-radius: 13px;
    background: rgba(255,255,255,.62);
    color: #a0a7b0;
    text-align: center;
  }

  #tab-list .pager {
    background: transparent;
    padding: 10px 0 4px;
  }

  @media (max-width: 1120px) {
    #tab-list .filter-bar {
      width: 100%;
    }
    #tab-list .filter-bar > .toolbar:first-child {
      grid-template-columns: minmax(240px, 1fr) 116px 116px 66px;
    }
    #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
      max-width: none;
    }
    #tab-list #list,
    #tab-list #pager {
      width: 100%;
    }
  }

  @media (max-width: 820px) {
    #tab-list .filter-bar > .toolbar:first-child {
      grid-template-columns: minmax(0, 1fr) 1fr;
      gap: 8px;
    }
    #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
      grid-column: 1 / -1;
    }
    #tab-list .filter-bar > .toolbar:first-child .sel {
      width: 100%;
    }
    #tab-list #clearFilter {
      width: 100%;
      min-width: 0;
    }
    #tab-list .date-row {
      flex-wrap: wrap;
    }
  }

  @media (max-width: 520px) {
    #tab-list .filter-bar {
      padding: 11px;
    }
    #tab-list .filter-bar > .toolbar:first-child {
      grid-template-columns: 1fr;
    }
    #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
      grid-column: auto;
    }
    #tab-list .date-label {
      display: block;
      width: 100%;
    }
    #tab-list .date-sep {
      display: inline;
    }
    #tab-list .date-row input[type="date"] {
      flex: 1 1 120px;
      width: auto;
    }
  }


  /* ======================================================================
     2026 TICKET FILTER V8 · 单行紧凑筛选栏
     只调整工单列表筛选布局，不修改任何筛选逻辑/API
     ====================================================================== */
  #tab-list .filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    padding: 11px 12px;
    margin-bottom: 12px;
    /* 自定义下拉菜单需要越过筛选条向下展开，不能被自身裁切。 */
    overflow: visible;
    scrollbar-width: thin;
  }
  #tab-list .filter-bar:has(.custom-select.is-open) { z-index: 40; }

  /* 两个原 toolbar 只保留语义，不再各占一行 */
  #tab-list .filter-bar > .toolbar,
  #tab-list .filter-bar > .toolbar:first-child,
  #tab-list .filter-bar > .date-row {
    display: contents;
  }

  /* 搜索框固定短宽，不再抢占剩余空间 */
  #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
    flex: 0 0 300px;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    min-height: 36px;
    padding: 7px 11px;
  }

  #tab-list .filter-bar > .toolbar:first-child .sel {
    flex: 0 0 106px;
    width: 106px;
  }
  #tab-list .filter-bar > .toolbar:first-child select {
    min-height: 36px;
    font-size: 12px;
  }

  #tab-list .date-label {
    flex: 0 0 auto;
    margin: 0 1px 0 3px;
    white-space: nowrap;
  }
  #tab-list .date-sep {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  #tab-list .date-row input[type="date"] {
    flex: 0 0 122px;
    width: 122px;
    min-width: 122px;
    min-height: 36px;
    padding: 6px 8px;
  }
  #tab-list .date-hint {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-left: 0;
  }

  /* 清空始终放最右边 */
  #tab-list #clearFilter {
    order: 99;
    flex: 0 0 60px;
    width: 60px;
    min-width: 60px;
    min-height: 36px;
    padding: 6px 8px;
  }
  #tab-list #queryFilter,
  #tab-list #newTicketBtn {
    order: 100;
    flex: 0 0 60px;
    width: 60px;
    min-width: 60px;
    min-height: 36px;
    padding: 6px 8px;
  }
  #tab-list #newTicketBtn {
    order: 101;
    border-color: var(--ui-primary);
    background: var(--ui-primary);
    color: #fff;
  }
  #tab-list #newTicketBtn:hover { border-color: var(--ui-primary-hover); background: var(--ui-primary-hover); color: #fff; }
  #tab-list.mine-view #queryFilter,
  #tab-list.mine-view #newTicketBtn { display: none; }

  #tab-submit .submit-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
    padding: 0 2px;
  }
  #tab-submit .submit-page-head-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
  }
  #tab-submit .submit-page-head h2 {
    margin: 0;
    color: var(--ui-text);
    font-size: 25px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -.02em;
  }
  #tab-submit .submit-page-head-main span {
    color: var(--ui-text-3);
    font-size: 13px;
    white-space: nowrap;
  }
  #tab-submit .submit-page-back {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 13px;
    border: 1px solid var(--ui-border-strong);
    border-radius: 9px;
    background: var(--ui-surface);
    color: var(--ui-text-2);
    font-size: 12.5px;
    cursor: pointer;
  }
  #tab-submit .submit-page-back:hover {
    border-color: var(--ui-border-strong);
    background: var(--ui-surface-soft);
    color: var(--ui-text);
  }

  /* 无论窗口多窄都不自动折到第二行；小屏时横向滚动 */
  @media (max-width: 1120px) {
    #tab-list .filter-bar {
      width: max-content;
      max-width: 100%;
    }
    #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
      flex-basis: 260px;
      width: 260px;
      min-width: 260px;
      max-width: 260px;
    }
  }

  @media (max-width: 820px) {
    #tab-list .filter-bar,
    #tab-list .filter-bar > .toolbar:first-child {
      grid-template-columns: none;
    }
    #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
      grid-column: auto;
      flex-basis: 230px;
      width: 230px;
      min-width: 230px;
      max-width: 230px;
    }
    #tab-list .filter-bar > .toolbar:first-child .sel,
    #tab-list #clearFilter {
      width: auto;
    }
    #tab-list .date-label {
      display: inline;
      width: auto;
    }
  }

  @media (max-width: 520px) {
    #tab-list .filter-bar {
      padding: 9px 10px;
    }
    #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
      flex-basis: 210px;
      width: 210px;
      min-width: 210px;
      max-width: 210px;
    }
    #tab-list .date-label,
    #tab-list .date-sep {
      display: inline;
      width: auto;
    }
    #tab-list .date-row input[type="date"] {
      flex: 0 0 118px;
      width: 118px;
      min-width: 118px;
    }
  }


  /* ======================================================================
     2026 DATE PICKER V9 · 自定义日期选择器
     替代浏览器原生 date 弹层，仅改变日期输入 UI，不修改筛选/API 逻辑
     ====================================================================== */
  #tab-list .date-row .date-picker-input {
    flex: 0 0 122px;
    width: 122px;
    min-width: 122px;
    min-height: 36px;
    padding: 6px 31px 6px 10px;
    border: 1px solid #dfe4ea;
    border-radius: 9px;
    background-color: #fff;
    color: #344054;
    font-size: 12px;
    cursor: pointer;
    caret-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2377808f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M8 3.5V7M16 3.5V7M3.5 9.5h17'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 15px 15px;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
  }
  #tab-list .date-row .date-picker-input:hover {
    border-color: #cbd3dd;
    background-color: #fcfcfd;
  }
  #tab-list .date-row .date-picker-input:focus,
  #tab-list .date-row .date-picker-input.is-open {
    outline: none;
    border-color: #aab7c6;
    box-shadow: 0 0 0 3px rgba(71,84,103,.08);
  }
  #tab-list .date-row .date-picker-input::placeholder { color: #a5adba; }

  .date-picker-popover {
    position: fixed;
    z-index: 1200;
    width: 292px;
    max-width: calc(100vw - 24px);
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(16,24,40,.15), 0 3px 12px rgba(16,24,40,.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px) scale(.985);
    transform-origin: top left;
    transition: opacity .14s ease, transform .16s cubic-bezier(.2,.7,.2,1), visibility .14s;
    user-select: none;
  }
  .date-picker-popover.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  .date-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 34px;
    margin-bottom: 7px;
  }
  .date-picker-title {
    padding-left: 4px;
    color: #20252d;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.01em;
  }
  .date-picker-navs { display: flex; align-items: center; gap: 3px; }
  .date-picker-nav {
    display: grid;
    place-items: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #667085;
    box-shadow: none;
  }
  .date-picker-nav:hover {
    background: #f2f4f7;
    color: #101828;
  }
  .date-picker-nav:active { transform: scale(.96); }
  .date-picker-nav svg { width: 15px; height: 15px; pointer-events: none; }

  .date-picker-week,
  .date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }
  .date-picker-week { margin-bottom: 3px; }
  .date-picker-week span {
    display: grid;
    place-items: center;
    height: 28px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 550;
  }
  .date-picker-day {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #344054;
    font-size: 12px;
    font-weight: 500;
    box-shadow: none;
  }
  .date-picker-day:hover {
    background: #f2f4f7;
    color: #101828;
  }
  .date-picker-day.outside { color: #c1c7d0; }
  .date-picker-day.today::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #667085;
    transform: translateX(-50%);
  }
  .date-picker-day.selected,
  .date-picker-day.selected:hover {
    background: #252a31;
    color: #fff;
    font-weight: 700;
  }
  .date-picker-day.selected.today::after { background: #fff; }

  .date-picker-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 9px;
    border-top: 1px solid #f0f1f3;
  }
  .date-picker-action {
    width: auto;
    min-width: 0;
    min-height: 30px;
    height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #667085;
    font-size: 12px;
    font-weight: 550;
    box-shadow: none;
  }
  .date-picker-action:hover {
    background: #f2f4f7;
    color: #101828;
  }
  .date-picker-action.today-action { color: #344054; font-weight: 650; }

  @media (max-width: 520px) {
    #tab-list .date-row .date-picker-input {
      flex: 0 0 118px;
      width: 118px;
      min-width: 118px;
    }
    .date-picker-popover { width: 280px; padding: 10px; }
    .date-picker-day { height: 31px; min-height: 31px; }
  }


  /* ======================================================================
     CATEGORY CHIP REFRESH · 真正的标签样式 + 干净删除交互
     仅调整分类标签视觉，不修改分类增删接口与业务逻辑
     ====================================================================== */
  #catChips.chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
  }

  #catChips .chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 6px 0 10px;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    background: #f7f8fa;
    color: #4b5563;
    font-size: 12px;
    font-weight: 520;
    line-height: 1;
    box-shadow: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
  }

  #catChips .chip::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: #a8b0bb;
  }

  #catChips .chip:hover {
    background: #fff;
    border-color: #cfd5dd;
    color: #303846;
  }

  #catChips .chip-label {
    display: block;
    white-space: nowrap;
  }

  #catChips .chip .chip-remove {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-grid !important;
    place-items: center;
    flex: 0 0 20px;
    border: 0 !important;
    border-radius: 5px !important;
    outline: none;
    background: transparent !important;
    background-image: none !important;
    color: #a0a7b1 !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    transform: none !important;
    transition: color .14s ease, opacity .14s ease !important;
  }

  #catChips .chip .chip-remove:hover {
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    color: #c75151 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #catChips .chip .chip-remove:active {
    background: transparent !important;
    color: #a83f3f !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #catChips .chip .chip-remove:focus,
  #catChips .chip .chip-remove:focus-visible {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
  }


  /* ======================================================================
     2026 TICKET LIST + DETAIL V10
     列表信息集中、分页去大底框；详情顶部两栏化，流转操作提升到首屏右侧。
     仅调整前端展示与操作层级，沿用原有工单 API / 状态流转接口。
     ====================================================================== */

  /* 列表：筛选、工单、分页统一右边界 */
  #tab-list {
    max-width: 1120px;
  }
  #tab-list .filter-bar,
  #tab-list #list,
  #tab-list #pager {
    width: 100%;
    max-width: 1120px;
  }
  #tab-list .filter-bar {
    justify-content: flex-start;
    /* 覆盖旧的横向滚动规则，避免下拉菜单被裁成一条。 */
    overflow: visible;
  }

  /* 工单列表：单一容器承载紧凑行，条目之间仅用横线分隔。 */
  #tab-list #list.is-ticket-list {
    overflow: hidden;
    padding-bottom: 0;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(31, 40, 54, .025);
  }
  #tab-list #list.is-ticket-list .ticket {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 6px 16px;
    border: 0;
    border-bottom: 1px solid var(--ui-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: background-color .14s ease;
  }
  #tab-list #list.is-ticket-list .ticket:last-child {
    border-bottom: 0;
  }
  #tab-list #list.is-ticket-list .ticket:hover {
    border-color: transparent;
    background: #fafbfc;
    box-shadow: none;
    transform: none;
  }
  #tab-list #list.is-ticket-list .ticket-head {
    width: 100%;
    align-items: center;
    flex-wrap: nowrap;
  }
  #tab-list #list.is-ticket-list .ticket-main {
    overflow: hidden;
  }
  #tab-list #list.is-ticket-list .ticket-summary {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #626d7a;
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
  }
  #tab-list #list.is-ticket-list .ticket-badges {
    padding-top: 0;
  }
  #tab-list .ticket-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
  }
  #tab-list .ticket-main {
    min-width: 0;
    flex: 1 1 auto;
  }
  #tab-list .ticket-title {
    line-height: 1.35;
  }
  #tab-list .ticket-meta {
    margin-top: 3px;
    line-height: 1.4;
  }
  #tab-list .ticket-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 6px;
    padding-top: 1px;
    white-space: nowrap;
  }
  #tab-list .ticket-badges .badge {
    padding: 3px 8px;
    font-size: 11px;
  }
  #tab-list .ticket-badges .ticket-status {
    padding-left: 10px;
    padding-right: 10px;
    font-weight: 700;
  }
  #tab-list .ticket-badges .ticket-level {
    background: #f7f8fa;
    border-color: #e6e9ee;
  }
  #tab-list .ticket-badges .p-high,
  #tab-list .ticket-badges .p-urgent,
  #tab-list .ticket-badges .d-high {
    background: inherit;
  }

  /* 分页：保留控件，移除横跨整行的大卡片底 */
  #tab-list .pager {
    position: static;
    justify-content: flex-end;
    margin-top: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  /* 详情统一成与列表相同的阅读宽度 */
  #tab-detail {
    max-width: 1120px;
    margin-left: 0;
    margin-right: auto;
  }
  #tab-detail .card {
    margin-bottom: 14px;
  }

  /* 顶部：单栏结构 —— 上半「这是什么工单 / 走到哪一步」，下半是固定高度的操作条 */
  #tab-detail .detail-hero {
    display: block;
    padding: 0;
    overflow: visible;
  }
  #tab-detail .detail-hero-top {
    padding: 18px 22px 0;
  }
  #tab-detail .detail-back {
    margin-bottom: 10px;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 8px;
  }
  #tab-detail .detail-title-row {
    align-items: flex-start;
    gap: 10px;
    margin-top: 0;
  }
  #tab-detail .detail-title-row h2 {
    flex: 1 1 260px;
    min-width: 0;
    font-size: 20px;
    line-height: 1.35;
    word-break: break-word;
  }
  #tab-detail .detail-level-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 4px;
  }
  #tab-detail .detail-level-badges .badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* 状态从操作面板的角落提到标题行，作为工单的第一身份 */
  #tab-detail .detail-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    padding: 4px 11px 4px 9px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 680;
    white-space: nowrap;
  }
  #tab-detail .detail-status-pill .pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
  }
  #tab-detail .detail-status-pill.processing .pill-dot {
    animation: pillPulse 1.9s ease-in-out infinite;
  }
  @keyframes pillPulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

  #tab-detail .detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    max-width: none;
    margin-top: 9px;
    line-height: 1.9;
  }
  #tab-detail .detail-meta .m-k { color: #aab1bb; margin-right: 4px; }
  #tab-detail .detail-meta .m-v { color: #6b7480; }
  #tab-detail .detail-meta .m-dot { color: #dce0e6; }
  #tab-detail .detail-sn {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    letter-spacing: .01em;
    color: #59616d;
  }
  #tab-detail .detail-copy {
    min-height: 0;
    margin-left: 3px;
    padding: 2px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #b6bcc5;
    line-height: 0;
    box-shadow: none;
  }
  #tab-detail .detail-copy:hover { background: var(--ui-primary-soft); color: var(--ui-primary); }
  #tab-detail .detail-copy svg { display: block; width: 12px; height: 12px; }

  /* 生命周期轨道：提交 → 受理 → 处理中 → 完成；退回时切成红色分支 */
  #tab-detail .detail-rail {
    display: flex;
    margin: 18px 0 0;
    padding: 0 0 18px;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #tab-detail .detail-rail::-webkit-scrollbar { display: none; }
  #tab-detail .detail-rail li {
    position: relative;
    flex: 1 1 0;
    min-width: 106px;
    padding-right: 8px;
  }
  #tab-detail .detail-rail li::before {
    content: "";
    position: absolute;
    left: 30px;
    right: 8px;
    top: 9px;
    height: 2px;
    border-radius: 2px;
    background: #e4e8ed;
  }
  #tab-detail .detail-rail li:last-child::before { display: none; }
  #tab-detail .detail-rail li.ln-done::before { background: var(--ui-primary); }
  #tab-detail .detail-rail li.ln-reject::before { background: #c0483f; }
  #tab-detail .detail-rail li.ln-todo::before {
    background: repeating-linear-gradient(90deg, #dfe3e9 0 4px, transparent 4px 8px);
  }
  #tab-detail .rl-mark {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #dfe3e9;
    border-radius: 999px;
    background: #fff;
    color: #aab1bb;
    font-size: 10.5px;
    font-weight: 700;
  }
  #tab-detail .rl-mark svg { width: 10px; height: 10px; }
  #tab-detail .detail-rail li.is-done .rl-mark {
    background: var(--ui-primary);
    border-color: var(--ui-primary);
    color: #fff;
  }
  #tab-detail .detail-rail li.is-current .rl-mark {
    border-color: var(--ui-primary);
    color: var(--ui-primary);
    box-shadow: 0 0 0 4px var(--ui-primary-soft);
  }
  #tab-detail .detail-rail li.is-reject-node .rl-mark {
    background: #c0483f;
    border-color: #c0483f;
    color: #fff;
  }
  #tab-detail .rl-name {
    display: block;
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 650;
    color: #aab1bb;
  }
  #tab-detail .detail-rail li.is-done .rl-name { color: var(--ui-text); }
  #tab-detail .detail-rail li.is-current .rl-name { color: var(--ui-primary); }
  #tab-detail .detail-rail li.is-reject-node .rl-name { color: #b5433a; }
  #tab-detail .rl-who { display: block; margin-top: 2px; font-size: 11px; color: #7d8693; }
  #tab-detail .rl-stamp {
    display: block;
    margin-top: 1px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 10.5px;
    color: #b6bcc5;
  }

  /* 操作条：主操作位置恒定，高度固定，切换状态时卡片不跳动 */
  #tab-detail .detail-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    min-height: 62px;
    padding: 11px 22px;
    border-top: 1px solid var(--ui-border);
    background: #fbfcfd;
    border-radius: 0 0 var(--ui-radius) var(--ui-radius);
  }
  #tab-detail .detail-bar button { min-height: 36px; }
  #tab-detail .detail-primary-btn {
    padding: 7px 18px;
    border-radius: 9px;
    background: var(--ui-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
  }
  #tab-detail .detail-primary-btn:hover { background: var(--ui-primary-hover); }
  #tab-detail .detail-secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border: 1px solid var(--ui-border-strong);
    border-radius: 9px;
    background: #fff;
    color: #56606d;
    font-size: 12.5px;
    font-weight: 600;
  }
  #tab-detail .detail-secondary-btn:hover {
    background: #f4f6f8;
    border-color: #d1d6dc;
    color: var(--ui-text);
  }
  #tab-detail .detail-secondary-btn .caret { font-size: 9px; opacity: .5; }
  #tab-detail .detail-danger-link {
    padding: 7px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #b04b45;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: none;
  }
  #tab-detail .detail-danger-link:hover { background: #fdf0ef; color: #9a3b35; }
  #tab-detail .detail-bar-note {
    max-width: 400px;
    margin-left: auto;
    color: #8b94a1;
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
  }
  #tab-detail .detail-bar-note b { color: #58616d; font-weight: 650; }
  #tab-detail .detail-bar-result {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    color: #217a45;
    font-size: 12.5px;
    font-weight: 650;
  }
  #tab-detail .detail-bar-result.is-return { color: #b5433a; }
  #tab-detail .detail-bar-result svg { display: block; width: 15px; height: 15px; }

  /* 指派 / 转交浮层：开合不影响卡片高度 */
  #tab-detail .detail-pop-wrap { position: relative; }
  #tab-detail .detail-pop {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 40;
    display: none;
    width: 288px;
    padding: 12px;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px -14px rgba(29, 38, 53, .3), 0 2px 6px rgba(29, 38, 53, .05);
  }
  #tab-detail .detail-pop.open { display: block; }
  #tab-detail .detail-pop-title { color: var(--ui-text); font-size: 13px; font-weight: 680; }
  #tab-detail .detail-pop-desc { margin: 2px 0 9px; color: #98a2b0; font-size: 11.5px; }
  #tab-detail .detail-pop input[type="search"] { width: 100%; height: 32px; font-size: 12.5px; }
  #tab-detail .detail-pop-list {
    max-height: 176px;
    margin: 8px 0 10px;
    padding: 0;
    list-style: none;
    overflow-y: auto;
  }
  #tab-detail .detail-pop-list li { margin-bottom: 2px; }
  #tab-detail .detail-pop-list button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ui-text);
    text-align: left;
    box-shadow: none;
  }
  #tab-detail .detail-pop-list button:hover { background: #f4f6f9; }
  #tab-detail .detail-pop-list button[aria-pressed="true"] { background: var(--ui-primary-soft); }
  #tab-detail .pop-avatar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e8ebf2;
    color: #5b6474;
    font-size: 11px;
    font-weight: 700;
  }
  #tab-detail .pop-name { display: block; font-size: 12.5px; font-weight: 620; line-height: 1.35; }
  #tab-detail .pop-group { display: block; color: #98a2b0; font-size: 11px; }
  #tab-detail .detail-pop-empty { padding: 10px 4px; color: #a8b0bb; font-size: 12px; }
  #tab-detail .detail-pop-foot { display: flex; gap: 7px; }
  #tab-detail .detail-pop-foot button {
    flex: 1;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12.5px;
  }

  /* 弹窗里的输入项：退回原因等必填说明走这里 */
  .modal-field { margin-top: 14px; text-align: left; }
  .modal-field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--ui-text-2);
    font-size: 12.5px;
    font-weight: 650;
  }
  .modal-field textarea {
    width: 100%;
    min-height: 82px;
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
  }
  .modal-field-err {
    display: none;
    margin-top: 6px;
    color: #c0483f;
    font-size: 11.5px;
  }

  #tab-detail .detail-content-card {
    padding: 18px 20px;
  }
  #tab-detail .detail-content-card > h2 {
    margin-bottom: 10px;
  }

  @media (max-width: 920px) {
    #tab-list .ticket-head {
      gap: 10px;
      flex-wrap: wrap;
    }
    #tab-list .ticket-badges {
      width: 100%;
      justify-content: flex-start;
      padding-top: 2px;
    }
    #tab-detail .detail-rail li { min-width: 96px; }
  }

  @media (max-width: 620px) {
    #tab-list .pager {
      justify-content: center;
    }
    #tab-detail .detail-hero-top { padding: 15px 15px 0; }
    #tab-detail .detail-content-card { padding: 15px; }
    #tab-detail .detail-title-row { align-items: flex-start; }
    #tab-detail .detail-level-badges { width: 100%; }
    #tab-detail .detail-bar { padding: 11px 15px; }
    #tab-detail .detail-bar .detail-primary-btn { flex: 1 1 100%; }
    #tab-detail .detail-bar .detail-danger-link { flex: 1 1 100%; }
    #tab-detail .detail-bar-note {
      flex: 1 1 100%;
      max-width: none;
      margin-left: 0;
      text-align: left;
    }
    #tab-detail .detail-pop { width: min(288px, calc(100vw - 46px)); }
  }

  /* ======================================================================
     2026 UI UNIFY · 浅色卡片风统一
     侧边栏导航/用户卡与主区卡片统一为「白卡 + 灰边 + 轻阴影」语言
     ====================================================================== */
  .nav-item {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    border-radius: 10px;
  }
  .nav-item:hover {
    background: #ffffff !important;
    border-color: #E7E9ED !important;
    box-shadow: 0 2px 8px rgba(27,36,49,.06) !important;
  }
  .nav-item.active {
    background: #ffffff !important;
    border-color: #e2e5e9 !important;
    color: #343a45 !important;
    box-shadow: 0 2px 8px rgba(16,24,40,.10) !important;
  }
  .nav-group-title:hover,
  .nav-group:has(.nav-item.active) > .nav-group-title {
    background: transparent !important;
  }
  .nav-group-inner::before {
    background: #e2e5e9;
  }
  /* 用户卡：白卡 */
  .who {
    margin: 10px;
    padding: 10px 12px;
    border: 1px solid #E7E9ED !important;
    border-top: none !important;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(27,36,49,.05);
  }
  body.sidebar-collapsed .who { margin: 8px; padding: 10px 0; }
  /* 次要按钮圆角与卡片体系统一 */
  button.secondary, .btn-link { border-radius: 9px; }

  /* ---------- 分类管理：添加行紧凑（按钮不拉伸、输入框限宽） ---------- */
  #tab-cats .row > button { flex: 0 0 auto; padding: 0 20px; }
  #tab-cats .row > input { flex: 0 0 auto; width: 320px; max-width: 100%; }
  @media (max-width: 520px) {
    #tab-cats .row > input { width: 100%; }
  }

  /* ======================================================================
     ISSUE FORM DEMO ADAPTATION · 单列任务流 + 紧凑分段选项 + 最近提交
     ====================================================================== */
  #tab-submit {
    width: 100%;
    max-width: 920px;
    margin-left: 0;
    margin-right: auto;
  }

  #tab-submit .submit-card {
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 14px;
  }
  #tab-submit .submit-card.is-dragging {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 3px rgba(16,24,40,.10), var(--ui-shadow);
  }

  #tab-submit .submit-section {
    padding: 0 0 22px;
    border-bottom: 1px solid var(--ui-border);
  }
  #tab-submit .submit-section + .submit-section { padding-top: 22px; }
  #tab-submit .submit-section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  #tab-submit .submit-section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ui-border);
  }

  #tab-submit .submit-section-head h3 {
    flex: 0 0 auto;
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
  }

  #tab-submit .submit-section-head span {
    color: var(--ui-text-3);
    font-size: 12px;
    line-height: 1.5;
  }

  #tab-submit .edit-hint:empty { display: none; }
  #tab-submit .edit-hint.show { margin-bottom: 12px; }

  #tab-submit .submit-title-field { margin-bottom: 14px; }
  #tab-submit .submit-title-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--ui-text-2);
    font-size: 12px;
    line-height: 1.4;
  }
  #tab-submit .submit-title-field label em {
    margin-left: 5px;
    color: var(--ui-danger);
    font-size: 11px;
    font-style: normal;
  }
  #tab-submit .submit-title-field input {
    width: 100%;
    height: 38px;
    min-height: 38px;
    padding: 8px 11px;
  }

  #tab-submit .submit-options-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 10px;
  }
  #tab-submit .submit-impact-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 10px;
  }
  #tab-submit .submit-impact-field {
    max-width: 420px;
  }

  #tab-submit .submit-field { min-width: 0; }
  #tab-submit .submit-field > label,
  #tab-submit .submit-field-label {
    display: block;
    margin-bottom: 5px;
    color: var(--ui-text-2);
    font-size: 12px;
    line-height: 1.4;
  }

  #tab-submit .submit-field > .sel,
  #tab-submit .submit-field > .sel select {
    width: 100%;
    min-width: 0;
  }

  #tab-submit .submit-field > .sel select {
    height: 38px;
    min-height: 38px;
    padding: 7px 36px 7px 12px;
    line-height: 22px;
  }

  #tab-submit .submit-native-select { display: none !important; }

  #tab-submit .submit-segmented {
    display: flex;
    width: 100%;
    height: 38px;
    overflow: hidden;
    border: 1px solid var(--ui-border-strong);
    border-radius: 9px;
    background: #fff;
  }

  #tab-submit .submit-segmented button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 36px;
    height: 36px;
    padding: 0 7px;
    border: 0;
    border-left: 1px solid var(--ui-border);
    border-radius: 0;
    background: transparent;
    color: var(--ui-text-2);
    font-size: 12px;
    font-weight: 500;
    box-shadow: none;
    transform: none;
  }

  #tab-submit .submit-segmented button:first-child { border-left: 0; }
  #tab-submit .submit-segmented button:hover {
    background: #f7f8fa;
    color: var(--ui-text);
  }
  #tab-submit .submit-segmented button[aria-pressed="true"] {
    background: var(--ui-primary-soft);
    color: var(--ui-primary);
    font-weight: 680;
  }
  #tab-submit .submit-risk-segmented button[data-tone="ok"][aria-pressed="true"] {
    background: #ecfdf5;
    color: #05845f;
  }
  #tab-submit .submit-risk-segmented button[data-tone="warn"][aria-pressed="true"] {
    background: #fffbeb;
    color: #a65b08;
  }
  #tab-submit .submit-risk-segmented button[data-tone="danger"][aria-pressed="true"] {
    background: #fef2f2;
    color: #c83a3a;
  }
  #tab-submit .submit-segmented button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid var(--ui-primary);
    outline-offset: -2px;
  }

  #tab-submit textarea {
    display: block;
    width: 100%;
    min-height: 132px;
    padding: 9px 11px;
    line-height: 1.6;
    resize: vertical;
  }

  #tab-submit .submit-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
  }

  #tab-submit .submit-attachment-zone {
    min-width: 0;
    flex: 1 1 auto;
  }

  #tab-submit .attach-bar {
    min-height: 38px;
    margin: 0;
    gap: 8px;
  }

  #tab-submit .attach-bar button {
    min-height: 36px;
    padding: 7px 13px;
  }

  #tab-submit .attach-hint {
    overflow: hidden;
    color: var(--ui-text-3);
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #tab-submit .attach-list { margin: 10px 0 0; }
  #tab-submit .btn-row {
    flex: 0 0 auto;
    margin: 0;
  }
  #tab-submit #addBtn {
    min-width: 76px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .draft-modal { width: min(560px, calc(100vw - 32px)); }
  .draft-modal-note {
    margin: 0 0 14px;
    color: var(--ui-text-3);
    font-size: 12px;
    line-height: 1.6;
  }
  .draft-list {
    display: grid;
    gap: 8px;
  }
  .draft-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: var(--ui-surface-soft);
  }
  .draft-list-copy {
    min-width: 0;
    flex: 1 1 auto;
  }
  .draft-list-copy strong,
  .draft-list-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .draft-list-copy strong {
    color: var(--ui-text);
    font-size: 13px;
    font-weight: 650;
  }
  .draft-list-copy span {
    margin-top: 4px;
    color: var(--ui-text-3);
    font-size: 11px;
  }
  .draft-list-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
  }
  .draft-list-actions button {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 12px;
  }
  .draft-delete-btn {
    min-height: 30px;
    padding: 4px 5px;
    border: 0;
    background: transparent;
    color: var(--ui-text-3);
    font-size: 12px;
    cursor: pointer;
  }
  .draft-delete-btn:hover { color: var(--ui-danger); }
  .draft-list-empty {
    padding: 28px 12px;
    border: 1px dashed var(--ui-border-strong);
    border-radius: 10px;
    color: var(--ui-text-3);
    font-size: 13px;
    text-align: center;
  }

  #tab-list .submit-recent {
    width: min(100%, 780px);
    margin: 0 0 18px;
  }
  #tab-list .submit-recent-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 2px 8px;
  }
  #tab-list .submit-recent-head > span {
    color: var(--ui-text-2);
    font-size: 13px;
  }
  #tab-list .submit-recent-list {
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--ui-shadow);
  }
  #tab-list .submit-recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-top: 1px solid var(--ui-border);
    border-radius: 0;
    background: #fff;
    color: var(--ui-text);
    text-align: left;
    box-shadow: none;
    transform: none;
  }
  #tab-list .submit-recent-item:first-child { border-top: 0; }
  #tab-list .submit-recent-item:hover { background: #fafbfc; }
  #tab-list .submit-recent-status {
    flex: 0 0 auto;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.6;
    white-space: nowrap;
  }
  #tab-list .submit-recent-status.submitted { background: var(--ui-primary-soft); color: var(--ui-primary); }
  #tab-list .submit-recent-status.pending,
  #tab-list .submit-recent-status.processing { background: #fffbeb; color: #a65b08; }
  #tab-list .submit-recent-status.done { background: #ecfdf5; color: #05845f; }
  #tab-list .submit-recent-status.returned { background: #fef2f2; color: #c83a3a; }
  #tab-list .submit-recent-title {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #tab-list .submit-recent-time {
    flex: 0 0 auto;
    color: var(--ui-text-3);
    font-size: 12px;
    white-space: nowrap;
  }
  #tab-list .submit-recent-empty {
    padding: 18px 14px;
    color: var(--ui-text-3);
    font-size: 12px;
    text-align: center;
  }

  @media (max-width: 900px) {
    #tab-submit .submit-options-row,
    #tab-submit .submit-impact-row {
      grid-template-columns: 1fr 1fr;
    }
  }

  @media (max-width: 620px) {
    #tab-submit .submit-card { padding: 18px; }
    #tab-submit .submit-section-head { display: block; }
    #tab-submit .submit-section-head span {
      display: block;
      margin-top: 3px;
    }
    #tab-submit .submit-options-row,
    #tab-submit .submit-impact-row { grid-template-columns: 1fr; }
    #tab-submit .submit-impact-field { max-width: none; }
    #tab-submit textarea { min-height: 112px; }
    #tab-submit .submit-actions {
      flex-direction: column;
      align-items: stretch;
    }
    #tab-submit .attach-bar { flex-wrap: wrap; }
    #tab-submit .attach-hint { white-space: normal; }
    #tab-submit .btn-row { width: 100%; }
    #tab-submit .btn-row { flex-wrap: wrap; }
    #tab-submit .btn-row #addBtn { flex: 1 1 100%; }
    .draft-list-item { align-items: flex-start; flex-direction: column; }
    .draft-list-actions { width: 100%; }
    .draft-list-actions button { flex: 1 1 0; }
    #tab-list .submit-recent-item { padding: 10px 12px; }
  }

  /* ======================================================================
     MY TICKETS WORKSPACE V11
     参考高密度工单工作台：仅作用于「我提交的」，普通管理列表保持原布局。
     ====================================================================== */
  .mine-only { display: none; }
  #tab-list .list-page-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
  }

  #tab-list.mine-view {
    width: min(100%, 1280px);
    max-width: 1280px;
    margin-left: 0;
    margin-right: auto;
  }
  #tab-list.mine-view .mine-only { display: flex; }
  #tab-list.mine-view .list-page-head { margin-bottom: 18px; }
  #tab-list.mine-view .mine-submit-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 9px 19px;
    border: 0;
    border-radius: 10px;
    background: var(--ui-primary);
    color: #fff;
    box-shadow: 0 7px 16px rgba(16,24,40,.14);
  }
  #tab-list.mine-view .mine-submit-btn:hover { background: var(--ui-primary-hover); }

  #tab-list.mine-view .mine-status-tabs {
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #tab-list.mine-view .mine-status-tabs::-webkit-scrollbar { display: none; }
  #tab-list.mine-view .mine-status-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 7px 15px;
    border: 1px solid var(--ui-border-strong);
    border-radius: 999px;
    background: #fff;
    color: #657084;
    font-size: 13px;
    font-weight: 520;
    box-shadow: none;
  }
  #tab-list.mine-view .mine-status-tabs button:hover {
    border-color: #cbd3df;
    background: #f8f9fb;
    color: var(--ui-text);
  }
  #tab-list.mine-view .mine-status-tabs button.active {
    border-color: #172133;
    background: #172133;
    color: #fff;
  }
  #tab-list.mine-view .mine-status-tabs button.active span { color: #ffcdc9; }

  #tab-list.mine-view .filter-bar {
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  #tab-list.mine-view .filter-bar > .toolbar:first-child {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    margin: 0;
  }
  #tab-list.mine-view .filter-bar > .toolbar:first-child > input[type="search"] {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
  }
  #tab-list.mine-view .filter-bar > .toolbar:first-child .sel,
  #tab-list.mine-view .filter-bar #clearFilter,
  #tab-list.mine-view .date-row { display: none; }
  #tab-list.mine-view .mine-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 44px;
    margin: 0;
    padding: 9px 15px;
    border-radius: 10px;
    background: #fff;
  }
  #tab-list.mine-view.mine-filters-open .filter-bar > .toolbar:first-child {
    grid-template-columns: minmax(220px, 1fr) minmax(130px, 170px) minmax(130px, 170px) auto auto;
  }
  #tab-list.mine-view.mine-filters-open .filter-bar > .toolbar:first-child .sel,
  #tab-list.mine-view.mine-filters-open .filter-bar #clearFilter { display: inline-flex; }
  #tab-list.mine-view.mine-filters-open .date-row {
    display: flex;
    align-items: center;
    margin: 10px 0 0;
    padding: 10px 12px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: #fff;
  }
  #tab-list.mine-view #list {
    width: 100%;
    max-width: none;
    overflow: hidden;
    border: 1px solid var(--ui-border-strong);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(16,24,40,.025);
  }
  #tab-list.mine-view #list > .empty {
    margin: 0;
    padding: 56px 20px;
    border: 0;
    background: #fff;
  }
  #tab-list.mine-view .mine-ticket-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    min-height: 86px;
    padding: 15px 21px;
    border-top: 1px solid var(--ui-border);
    background: #fff;
    cursor: pointer;
    transition: background .15s ease;
  }
  #tab-list.mine-view .mine-ticket-row:first-child { border-top: 0; }
  #tab-list.mine-view .mine-ticket-row:hover { background: #fafbfc; }
  #tab-list.mine-view .mine-ticket-row:focus-visible {
    z-index: 1;
    outline: 2px solid var(--ui-primary);
    outline-offset: -2px;
  }
  #tab-list.mine-view .mine-ticket-row.is-returned {
    min-height: 106px;
    padding-left: 22px;
  }
  #tab-list.mine-view .mine-ticket-row.is-returned::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #e5484d;
  }
  #tab-list.mine-view .mine-ticket-content { min-width: 0; }
  #tab-list.mine-view .mine-ticket-title-line {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
  }
  #tab-list.mine-view .mine-ticket-title-line h3 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #162338;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #tab-list.mine-view .mine-ticket-status {
    flex: 0 0 auto;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.65;
    white-space: nowrap;
  }
  #tab-list.mine-view .mine-ticket-status.submitted { background: #eef2ff; color: #343a45; }
  #tab-list.mine-view .mine-ticket-status.pending { background: #f2f4f7; color: #697386; }
  #tab-list.mine-view .mine-ticket-status.processing { background: #fff7e7; color: #b66a08; }
  #tab-list.mine-view .mine-ticket-status.done { background: #ebfbf3; color: #15966b; }
  #tab-list.mine-view .mine-ticket-status.returned { background: #fff1f1; color: #dc4545; }
  #tab-list.mine-view .mine-ticket-alert {
    flex: 0 0 auto;
    color: #df2f35;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }
  #tab-list.mine-view .mine-ticket-meta {
    margin-top: 5px;
    overflow: hidden;
    color: #7b8798;
    font-size: 12px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #tab-list.mine-view .mine-ticket-return-reason {
    margin-top: 7px;
    overflow: hidden;
    color: #df2f35;
    font-size: 12px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #tab-list.mine-view .mine-ticket-action {
    min-width: 68px;
    min-height: 38px;
    padding: 7px 14px;
    border-radius: 9px;
    background: #fff;
    color: #243247;
  }
  #tab-list.mine-view .mine-ticket-action.resubmit {
    min-width: 92px;
    border-color: #f2b9ba;
    color: #dc353a;
  }
  #tab-list.mine-view .mine-ticket-action.resubmit:hover {
    border-color: #e98689;
    background: #fff7f7;
    color: #c7292f;
  }
  #tab-list.mine-view #pager {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    margin: 14px 0 0;
  }
  #tab-list.mine-view #pager .pg-info { color: #748096; }

  @media (max-width: 900px) {
    #tab-list.mine-view.mine-filters-open .filter-bar > .toolbar:first-child {
      grid-template-columns: minmax(180px, 1fr) auto;
    }
    #tab-list.mine-view.mine-filters-open .filter-bar > .toolbar:first-child .sel,
    #tab-list.mine-view.mine-filters-open .filter-bar #clearFilter { display: none; }
  }
  @media (max-width: 620px) {
    #tab-list.mine-view .list-page-head { margin-bottom: 14px; }
    #tab-list.mine-view .mine-submit-btn { min-height: 40px; padding: 7px 12px; }
    #tab-list.mine-view .mine-status-tabs { margin-right: -12px; padding-right: 12px; }
    #tab-list.mine-view .mine-status-tabs button { min-height: 36px; padding: 6px 12px; }
    #tab-list.mine-view .mine-ticket-row,
    #tab-list.mine-view .mine-ticket-row.is-returned {
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
      min-height: 0;
      padding: 14px 15px;
    }
    #tab-list.mine-view .mine-ticket-title-line { flex-wrap: wrap; gap: 6px 8px; }
    #tab-list.mine-view .mine-ticket-title-line h3 {
      flex: 1 1 calc(100% - 70px);
      white-space: normal;
    }
    #tab-list.mine-view .mine-ticket-meta,
    #tab-list.mine-view .mine-ticket-return-reason { white-space: normal; }
    #tab-list.mine-view .mine-ticket-action { justify-self: end; }
    #tab-list.mine-view #pager { flex-wrap: wrap; }
  }


  /* 用户头像在侧边栏展开、收起状态保持圆形。 */
  .who-ava {
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    overflow: hidden;
  }
  .who-ava > img,
  .who-ava > .who-avatar-image { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
  .who-ava:hover { border-color: #cfc7ba; box-shadow: 0 2px 8px rgba(32,25,15,.08); }
  .who-ava:focus-visible { outline: 2px solid #8c8579; outline-offset: 2px; }

  /* ======================================================================
     2026 RESPONSIVE PASS V12
     统一覆盖后续桌面紧凑布局，避免固定宽度和 nowrap 阻断窄屏适配。
     只调整布局，不修改页面结构、字段或业务逻辑。
     ====================================================================== */
  /* clip 不会创建新的滚动容器，避免破坏顶部栏和侧边栏的 sticky 定位。 */
  html, body { max-width: 100%; overflow-x: clip; }
  .main, .tab-page, .card, .panel, .profile { min-width: 0; }

  /* 宽屏保留阅读宽度，内容不再被旧的 1120px/1180px 规则过早截断。 */
  #tab-list,
  #tab-detail,
  #tab-submit {
    width: 100%;
    max-width: 1440px;
    margin-left: 0;
    margin-right: auto;
    box-sizing: border-box;
  }
  #tab-list.mine-view {
    width: 100%;
    max-width: 1440px;
  }
  #tab-list .filter-bar,
  #tab-list #list,
  #tab-list #pager {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  /* 工单筛选：桌面端紧凑排列，空间不足时自然换行。 */
  #tab-list .filter-bar {
    display: block;
    width: 100%;
    max-width: none;
    padding: 13px 14px;
    overflow: visible;
  }
  #tab-list .filter-bar > .toolbar:first-child {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(108px, 126px)) auto auto auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 10px;
  }
  #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
  }
  #tab-list .filter-bar > .toolbar:first-child .sel {
    width: 100%;
    min-width: 0;
    flex: none;
  }
  #tab-list .filter-bar > .toolbar:first-child select {
    width: 100%;
    min-width: 0;
  }
  #tab-list #clearFilter,
  #tab-list #queryFilter,
  #tab-list #newTicketBtn {
    width: auto;
    min-width: 64px;
    flex: none;
    white-space: nowrap;
  }
  #tab-list .filter-bar > .date-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
    margin: 0;
  }
  #tab-list .date-row input[type="text"] {
    flex: 0 1 142px;
    width: 142px;
    min-width: 0;
    max-width: 100%;
  }
  #tab-list .date-label,
  #tab-list .date-sep,
  #tab-list .date-hint { white-space: nowrap; }

  /* 工单内容允许按单词和编号断行，徽标在窄屏也能换行。 */
  #tab-list .ticket-head {
    align-items: flex-start;
    min-width: 0;
  }
  #tab-list .ticket-main,
  #tab-list .ticket-title,
  #tab-list .ticket-meta {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  #tab-list .ticket-meta { white-space: normal; }
  #tab-list .ticket-badges {
    flex-wrap: wrap;
    white-space: normal;
  }
  #tab-list .pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* 后台表格只在自己的容器内横向滚动，不把整个页面撑宽。 */
  #tab-health .card { min-width: 0; overflow-x: auto; }
  #tab-health .dict-table { min-width: 620px; }
  .table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }

  @media (max-width: 1180px) {
    #tab-list, #tab-detail, #tab-submit { max-width: none; }
    #tab-list .filter-bar > .toolbar:first-child {
      grid-template-columns: minmax(0, 1fr) repeat(2, minmax(104px, 124px)) auto auto auto;
    }
  }

  @media (max-width: 900px) {
    #tab-list .filter-bar > .toolbar:first-child {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
      grid-column: 1 / -1;
    }
    #tab-list #clearFilter,
    #tab-list #queryFilter,
    #tab-list #newTicketBtn {
      width: 100%;
      min-width: 0;
    }
    #tab-list .date-row input[type="text"] {
      flex: 1 1 120px;
      width: auto;
    }
    #tab-submit .submit-page-head {
      flex-wrap: wrap;
      align-items: flex-start;
    }
    #tab-submit .submit-page-head-main { flex-wrap: wrap; }
  }

  @media (max-width: 620px) {
    #tab-list .list-page-head {
      align-items: flex-start;
      flex-wrap: wrap;
      gap: 10px;
    }
    #tab-list .filter-bar { padding: 11px; }
    #tab-list .filter-bar > .toolbar:first-child {
      grid-template-columns: 1fr;
    }
    #tab-list .filter-bar > .toolbar:first-child > input[type="search"] {
      grid-column: auto;
    }
    #tab-list .filter-bar > .toolbar:first-child .sel,
    #tab-list #clearFilter,
    #tab-list #queryFilter,
    #tab-list #newTicketBtn { width: 100%; }
    #tab-list .date-row { align-items: stretch; }
    #tab-list .date-label {
      flex: 0 0 100%;
      width: 100%;
    }
    #tab-list .date-row input[type="text"] {
      flex: 1 1 0;
      width: 0;
      min-width: 0;
    }
    #tab-list .ticket { padding: 14px; }
    #tab-list .ticket-head {
      display: block;
    }
    #tab-list .ticket-badges {
      justify-content: flex-start;
      margin-top: 9px;
    }
    #tab-submit .submit-page-head {
      gap: 10px;
      margin-bottom: 14px;
    }
    #tab-submit .submit-page-head-main {
      width: 100%;
      gap: 7px;
    }
    #tab-submit .submit-page-head h2 { font-size: 22px; }
    #tab-submit .submit-page-head-main span {
      white-space: normal;
      line-height: 1.4;
    }
    #tab-submit .submit-page-back { width: 100%; }
    #tab-health .dict-table { min-width: 560px; }
  }

  @media (max-width: 420px) {
    #tab-list .date-row .date-sep { display: none; }
    #tab-list .date-row input[type="text"] { flex-basis: 100%; width: 100%; }
    #tab-list .pager { justify-content: flex-start; }
    #tab-submit .submit-card { padding: 16px; }
  }

  /* 桌面端筛选保持一行：日期属于主筛选工具栏，不单独占第二行。 */
  @media (min-width: 1181px) {
    #tab-list:not(.mine-view) .filter-bar {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 10px;
    }
    #tab-list:not(.mine-view) .filter-bar > .toolbar:first-child {
      display: grid;
      grid-template-columns: minmax(300px, 1fr) repeat(2, minmax(108px, 126px)) auto auto auto;
      align-items: center;
      flex: 1 1 auto;
      width: auto;
      min-width: 0;
      margin: 0;
    }
    #tab-list:not(.mine-view) .filter-bar > .date-row {
      display: flex;
      align-items: center;
      flex: 0 0 auto;
      width: auto;
      min-width: 0;
      margin: 0;
      gap: 6px;
    }
    #tab-list:not(.mine-view) .date-row input[type="text"] {
      flex: 0 1 120px;
      width: 120px;
    }
  }

  /* ======================================================================
     2026 SIDEBAR FIX V13
     桌面端侧边栏脱离主文档流固定在视口左侧，菜单独立滚动；移动端仍恢复为普通流布局。
     ====================================================================== */
  @media (min-width: 769px) {
    .app {
      display: block;
      min-height: 100vh;
    }
    .sidebar {
      position: fixed;
      inset: 0 auto 0 0;
      width: 250px;
      flex: none;
      height: 100vh;
      min-height: 0;
      z-index: 50;
    }
    body.sidebar-collapsed .sidebar {
      width: 84px;
      flex-basis: auto;
    }
    .sidebar-nav {
      min-height: 0;
      overscroll-behavior: contain;
    }
    .main {
      width: auto;
      min-height: 100vh;
      margin-left: 250px;
    }
    body.sidebar-collapsed .main {
      margin-left: 84px;
    }

    /* 提示层脱离 sidebar-nav，避免被滚动容器的 overflow 裁剪 */
    body.sidebar-collapsed .nav-item::after {
      content: none !important;
    }
    .sidebar-tooltip {
      position: fixed;
      z-index: 200;
      max-width: 220px;
      padding: 7px 10px;
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 7px;
      background: #22201d;
      color: #fff;
      box-shadow: 0 8px 22px rgba(38,31,23,.16);
      font-size: 12px;
      line-height: 1.35;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      transform: translateY(-50%) translateX(-3px);
      transition: opacity .14s ease, transform .14s ease;
    }
    .sidebar-tooltip.is-visible {
      opacity: 1;
      transform: translateY(-50%) translateX(0);
    }
  }

  /* 顶部账户菜单：点击用户信息后显示个人中心与退出登录。 */
  .app-topbar-account.who {
    position: relative;
  }
  .topbar-account-trigger {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 2px 8px 2px 4px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #626b78;
    cursor: pointer;
    text-align: left;
    transition: background-color .15s ease, border-color .15s ease;
  }
  .topbar-account-trigger:hover,
  .topbar-account-trigger[aria-expanded="true"] {
    border-color: #e1e5eb;
    background: #ffffff;
  }
  .topbar-account-trigger:focus-visible {
    outline: 2px solid #b3bcc6;
    outline-offset: 2px;
  }
  .topbar-account-trigger .who-ava,
  .topbar-account-trigger .who-txt,
  .topbar-account-trigger .topbar-account-chevron {
    pointer-events: none;
  }
  .topbar-account-trigger .who-ava:hover {
    border-color: #d9dde4;
    box-shadow: none;
  }
  .topbar-account-chevron {
    flex: 0 0 auto;
    color: #8b95a3;
    transition: transform .15s ease, color .15s ease;
  }
  .topbar-account-trigger:hover .topbar-account-chevron,
  .topbar-account-trigger[aria-expanded="true"] .topbar-account-chevron {
    color: #626b78;
  }
  .topbar-account-trigger[aria-expanded="true"] .topbar-account-chevron {
    transform: rotate(180deg);
  }
  .account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    display: grid;
    gap: 3px;
    width: 164px;
    padding: 6px;
    border: 1px solid #e1e5eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(27, 36, 49, .12);
  }
  .account-menu[hidden] {
    display: none;
  }
  .account-menu-item {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 0 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #3f4855;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
  }
  .account-menu-item:hover,
  .account-menu-item:focus-visible {
    outline: none;
    background: #f5f6f8;
    color: #20242c;
  }
  .account-menu-item:active {
    background: #eef0f3;
  }
  .account-menu-item svg {
    flex: 0 0 16px;
  }
  .account-menu-logout {
    color: #a44a4a;
  }
  .account-menu-logout:hover,
  .account-menu-logout:focus-visible {
    background: #fff5f5;
    color: #a33c3c;
  }

  @media (max-width: 768px) {
    .topbar-account-trigger {
      padding-right: 5px;
    }
    .topbar-account-trigger .topbar-account-chevron {
      display: none;
    }
    .account-menu {
      right: -4px;
    }
  }

/* 2026 FULL-WIDTH WORKSPACE CHROME
   顶部栏横跨整个工作区；侧边栏从顶部栏下方开始，避免主内容区单独拥有一截顶部栏。 */
.app {
  --workspace-topbar-height: 76px;
  --workspace-breadcrumb-top-gap: 8px;
  --workspace-list-tools-offset: 55px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 100vh;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  min-height: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 0 28px;
  border-bottom: 1px solid #e3e6eb;
  background: rgba(250, 250, 251, .96);
  box-shadow: 0 1px 0 rgba(32, 36, 43, .02);
  backdrop-filter: blur(14px);
}

.app-topbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-topbar .brand {
  flex: 0 0 238px;
  width: 238px;
  height: 76px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
}

.app-topbar .brand-mark {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #17181b;
  color: #fff;
  box-shadow: none;
}

.app-topbar .brand-logo {
  width: 22px;
  height: 22px;
}

.app-topbar .brand-name {
  color: #20242b;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}

.app-topbar .brand-sub {
  color: #a6aab2;
  font-size: 9px;
  letter-spacing: .18em;
}

.app-topbar .sidebar-toggle {
  position: relative;
  top: auto;
  right: auto;
  z-index: 1;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: 0 2px 0 0;
  border: 1px solid #e0e4e9;
  border-radius: 50%;
  background: #fff;
  color: #68717d;
  box-shadow: 0 8px 18px rgba(32, 36, 43, .06);
}

.app-topbar .sidebar-toggle:hover {
  border-color: #d6dbe2;
  background: #fff;
  color: #3f4855;
}

.app-topbar-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.app-topbar-kicker {
  color: #20242b;
  font-size: 20px;
  font-weight: 700;
}

.app-topbar-divider {
  width: 1px;
  height: 22px;
  background: #dfe3e8;
}

.app-topbar-current {
  overflow: hidden;
  color: #7f8a98;
  font-size: 16px;
  text-overflow: ellipsis;
}

.app-topbar-account {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* 桌面端账户区固定在顶部栏右侧，不参与侧边栏切换时的横向 flex 重排。 */
@media (min-width: 769px) {
  .app-topbar-account {
    position: absolute;
    top: 0;
    right: 28px;
    height: 76px;
    display: flex;
    align-items: center;
    transform: none;
  }
}

.app-topbar .topbar-account-trigger {
  flex: 0 0 46px;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
}

.app-topbar .topbar-account-trigger:hover,
.app-topbar .topbar-account-trigger:focus-visible,
.app-topbar .topbar-account-trigger[aria-expanded="true"] {
  border-color: #e2e5ea;
  background: #fff;
  outline: none;
}

.app-topbar .topbar-account-trigger .who-ava {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  border: 1px solid #d9dde4;
  background: #f1f3f5;
}

/* 账户菜单仅由头像触发，姓名和角色保持为只读信息。 */
.app-topbar-account {
  gap: 10px;
}

.app-topbar .who-name {
  color: #20242b;
  font-size: 13px;
  font-weight: 650;
}

.app-topbar .who-role {
  color: #9099a5;
  font-size: 11px;
}

.app-body {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.app-body > .sidebar {
  position: sticky;
  top: 76px;
  width: 238px;
  flex: 0 0 238px;
  height: calc(100vh - 76px);
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid #e3e6eb;
  background: #f7f8fa;
}

body.sidebar-collapsed .app-body > .sidebar {
  width: 76px;
  flex-basis: 76px;
}

body.sidebar-collapsed .app-body > .main {
  margin-left: 0;
}

.app-body > .sidebar .sidebar-nav {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-body > .main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin-left: 0;
  padding: 12px clamp(24px, 3vw, 54px) 76px;
}

body.sidebar-collapsed .app-topbar .brand-text {
  display: block;
}

  body.sidebar-collapsed .app-topbar .brand {
    justify-content: flex-start;
    padding: 0;
  }

/* ======================================================================
   2026 PAGE BREADCRUMB PASS
   顶部栏只承载工作台身份，当前页面层级放回主内容区，参考 Arco 的
   图标 / 一级页面 / 当前页面结构；仅调整导航表现，不改变页面切换逻辑。
   ====================================================================== */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 28px;
  margin: -4px 0 12px;
  padding: 8px 0;
  background: var(--ui-bg);
  color: #7f8a98;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

/* 工单列表筛选区随页面正常滚动，不吸顶，避免内容从其下方穿过被遮挡。 */
#tab-list > .list-sticky-top {
  background: var(--ui-bg);
}

#tab-list > .list-sticky-top > .filter-bar {
  position: relative;
  top: auto;
}

.page-breadcrumb-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #8d97a5;
}

.page-breadcrumb-home svg {
  display: block;
  width: 18px;
  height: 18px;
}

.page-breadcrumb-separator {
  color: #c2c8d0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.page-breadcrumb-section {
  color: #7f8a98;
  font-weight: 500;
}

.page-breadcrumb-current {
  overflow: hidden;
  max-width: min(42vw, 420px);
  color: #20242b;
  font-weight: 650;
  text-overflow: ellipsis;
}

.page-breadcrumb [hidden] {
  display: none;
}

/* 工作台先保持干净留白，后续可直接在此区域加入统计卡片和图表。 */
.dashboard-page {
  min-height: calc(100vh - 196px);
}

@media (max-width: 768px) {
  .app {
    --workspace-topbar-height: 64px;
    --workspace-breadcrumb-top-gap: 18px;
  }

  .page-breadcrumb {
    gap: 8px;
    margin: -2px 0 14px;
    font-size: 13px;
  }

  #tab-list > .list-sticky-top {
    position: static;
  }

  .page-breadcrumb-current {
    max-width: 52vw;
  }
}

/* 独立一级入口：与分组菜单保持同一套导航语言，但不参与子菜单层级。 */
.nav-group[data-group="workbench"] > .nav-group-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6' rx='1'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1'/%3E%3C/svg%3E");
}

.nav-group[data-group="project-management"] > .nav-group-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5A2.5 2.5 0 016.5 4H10l2 2.5h5.5A2.5 2.5 0 0120 9v8.5a2.5 2.5 0 01-2.5 2.5h-11A2.5 2.5 0 014 17.5z'/%3E%3Cpath d='M9 12h6M12 9v6'/%3E%3C/svg%3E");
}

.nav-group[data-group="logistics-management"] > .nav-group-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v11H3zM14 10h4l3 4v3h-7z'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E");
}

.nav-group[data-group="archives"] > .nav-group-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5A2.5 2.5 0 016.5 4H10l2 2.5h5.5A2.5 2.5 0 0120 9v8.5a2.5 2.5 0 01-2.5 2.5h-11A2.5 2.5 0 014 17.5z'/%3E%3Cpath d='M8 11h8M8 15h5'/%3E%3C/svg%3E");
}

.nav-group[data-group="identity"] > .nav-group-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dbe5f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8.5' cy='8' r='3.2'/%3E%3Cpath d='M3 19c.6-3.1 2.9-4.9 5.5-4.9s4.9 1.8 5.5 4.9'/%3E%3Cpath d='M15.5 5.2a2.9 2.9 0 0 1 0 5.6'/%3E%3Cpath d='M17.3 14.2c2 .5 3 2.1 3.7 4.8'/%3E%3C/svg%3E");
}

.nav-standalone-group {
  margin-bottom: 3px;
}

.nav-item-standalone {
  width: 100%;
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
  transform: none !important;
  transition: background .18s ease, color .18s ease;
}

.nav-item-standalone:hover,
.nav-item-standalone:focus-visible,
.nav-item-standalone.active {
  background: var(--sb-surface) !important;
  box-shadow: none !important;
  color: var(--sb-text) !important;
  transform: none !important;
}

/* ======================================================================
   自定义档案：沿用管理页的克制表格与弹窗语言。
   ====================================================================== */
.archive-overview,
.archive-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 14px;
  padding: 22px 24px;
  border: 1px solid #e2e6eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(26, 32, 44, .045);
}

.archive-overview h2,
.archive-toolbar-card h2 {
  margin: 3px 0 6px;
  color: #20242b;
  font-size: 20px;
  font-weight: 680;
  line-height: 1.35;
  text-wrap: balance;
}

.archive-overview p,
.archive-toolbar-card p {
  max-width: 720px;
  margin: 0;
  color: #7f8996;
  font-size: 13px;
  line-height: 1.7;
  text-wrap: pretty;
}

.archive-overview-kicker {
  color: #9aa3af;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
}

.archive-primary-action {
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 40px;
}

.archive-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: #7c8693;
  font-size: 12px;
}

.archive-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #e3e7ec;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
}

.archive-summary strong {
  color: #27303b;
  font-variant-numeric: tabular-nums;
}

.archive-table-card {
  overflow: hidden;
  border: 1px solid #e2e6eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(26, 32, 44, .04);
}

.archive-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: fixed;
}

.archive-table th,
.archive-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #edf0f3;
  text-align: left;
  vertical-align: middle;
}

.archive-table th {
  background: #fafbfc;
  color: #7e8793;
  font-size: 12px;
  font-weight: 620;
}

.archive-table td {
  color: #47515d;
  font-size: 13px;
}

.archive-table tbody tr:last-child td {
  border-bottom: 0;
}

.archive-table tbody tr:hover td {
  background: #fbfcfd;
}

.archive-table th:nth-child(1) { width: 19%; }
.archive-table th:nth-child(2) { width: 13%; }
.archive-table th:nth-child(3) { width: 11%; }
.archive-table th:nth-child(4) { width: 29%; }
.archive-table th:nth-child(5) { width: 16%; }
.archive-table th:nth-child(6) { width: 12%; }

.archive-item-table th:nth-child(1) { width: 34%; }
.archive-item-table th:nth-child(2) { width: 15%; }
.archive-item-table th:nth-child(3) { width: 12%; }
.archive-item-table th:nth-child(4) { width: 12%; }
.archive-item-table th:nth-child(5) { width: 15%; }
.archive-item-table th:nth-child(6) { width: 12%; }

.archive-name-cell {
  color: #20242b;
  font-weight: 650;
}

.archive-code-cell {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #a0a8b2;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.archive-source-badge.system {
  background: #eef1f5;
  color: #5f6874;
}

.archive-source-badge.custom {
  background: #eef3ff;
  color: #343a45;
}

.archive-count-cell,
.archive-time-cell {
  font-variant-numeric: tabular-nums;
}

.archive-description-cell {
  overflow: hidden;
  color: #7f8996;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-content-cell {
  display: -webkit-box;
  overflow: hidden;
  color: #2d3641;
  line-height: 1.6;
  white-space: pre-wrap;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.archive-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.archive-row-action {
  min-width: 40px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #e0e4e9;
  border-radius: 9px;
  background: #fff;
  color: #59636f;
  font-size: 12px;
  transition: border-color .14s ease, background-color .14s ease, color .14s ease, transform .12s ease;
}

.archive-row-action:hover {
  border-color: #cfd5dc;
  background: #f8f9fb;
  color: #20242b;
}

.archive-row-action:active {
  transform: scale(.96);
}

.archive-row-action.danger:hover {
  border-color: #f0c8c5;
  background: #fff7f6;
  color: #c7463d;
}

.archive-system-label {
  color: #9aa3ad;
  font-size: 12px;
}

.archive-empty {
  padding: 54px 24px;
  color: #9aa3ae;
  font-size: 13px;
  text-align: center;
}

.archive-toolbar-card {
  align-items: flex-end;
}

.archive-toolbar-copy {
  min-width: 0;
}

.archive-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(220px, 300px) auto;
  align-items: end;
  gap: 7px 10px;
  flex: 0 0 auto;
}

.archive-toolbar-actions label {
  grid-column: 1 / -1;
  color: #6e7783;
  font-size: 11px;
  font-weight: 620;
}

.archive-toolbar-actions select {
  height: 40px;
  padding: 0 36px 0 12px;
  border: 1px solid #dde2e8;
  border-radius: 10px;
  background-color: #fff;
  color: #2e3742;
  font-size: 13px;
}

.archive-toolbar-actions .nb-btn {
  min-height: 40px;
}

.archive-source-note {
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid #e2e6eb;
  border-radius: 11px;
  background: #f8f9fb;
  color: #717b87;
  font-size: 12px;
}

.archive-modal-field {
  margin-top: 16px;
}

.archive-modal-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  padding: 11px 12px;
  border: 1px solid #dedee2;
  border-radius: 10px;
  background: #fff;
  color: #242428;
  font: inherit;
  line-height: 1.6;
}

.archive-modal-field textarea:focus {
  border-color: #77777f;
  outline: none;
  box-shadow: 0 0 0 3px rgba(45,45,50,.08);
}

.archive-attribute-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #e4e7eb;
  border-radius: 10px;
  background: #fafbfc;
}

.archive-attribute-preview small {
  color: #8b949f;
  line-height: 1.5;
}

.archive-field-count {
  display: block;
  margin-top: 5px;
  color: #9aa2ac;
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#archiveDefinitionModal,
#archiveItemModal {
  z-index: 120;
}

@media (max-width: 900px) {
  .archive-overview,
  .archive-toolbar-card {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .archive-primary-action {
    align-self: flex-start;
  }

  .archive-toolbar-actions {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 560px) {
  .archive-overview,
  .archive-toolbar-card {
    padding: 18px;
    border-radius: 14px;
  }

  .archive-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-summary > span {
    justify-content: space-between;
  }

  .archive-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .archive-toolbar-actions label {
    grid-column: 1;
  }
}

body.sidebar-collapsed .nav-item-standalone {
  width: 48px;
  min-height: 42px;
  margin: 0 auto 3px;
  padding: 0;
  justify-content: center;
  border-radius: 16px;
}

@media (max-width: 768px) {
  .nav-item-standalone,
  body.sidebar-collapsed .nav-item-standalone {
    width: 100%;
  }
}

@media (min-width: 769px) {
  body.sidebar-collapsed .nav-standalone-group > .nav-item-standalone {
    display: flex !important;
    width: 48px;
    min-height: 42px;
    margin: 0 auto 3px;
    padding: 0 !important;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .app-topbar {
    position: sticky;
    min-height: 64px;
    height: 64px;
    padding: 0 16px;
  }

  .app-topbar-left {
    gap: 10px;
  }

  .app-topbar .brand {
    flex-basis: auto;
    width: auto;
  }

  .app-topbar .brand-text {
    display: none;
  }

  .app-topbar .sidebar-toggle {
    display: grid;
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .app-topbar-kicker {
    font-size: 17px;
  }

  .app-topbar-current,
  .app-topbar-divider {
    display: none;
  }

  .app-topbar .who-txt,
  .app-topbar .topbar-account-chevron {
    display: none;
  }

  .app-body {
    display: block;
  }

  .app-body > .sidebar,
  body.sidebar-collapsed .app-body > .sidebar {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .app-body > .sidebar .sidebar-nav {
    height: auto;
    overflow: visible;
  }

  .app-body > .main {
    padding: 20px 16px 52px;
  }
}

/* Sidebar toggle lives at the bottom of the rail in both expanded states. */
.app-body > .sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.app-body > .sidebar .sidebar-nav {
  flex: 1 1 auto;
  height: auto;
}

.app-body > .sidebar > .sidebar-toggle {
  position: relative;
  inset: auto;
  z-index: 2;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  align-self: center;
  width: 40px;
  height: 40px;
  margin: 12px auto 14px;
  border: 1px solid #e0e4e9;
  border-radius: 50%;
  background: #fff;
  color: #68717d;
  box-shadow: 0 8px 18px rgba(32, 36, 43, .06);
}

.app-body > .sidebar > .sidebar-toggle:hover {
  border-color: #d6dbe2;
  background: #fff;
  color: #3f4855;
}

body:not(.sidebar-collapsed) .app-body > .sidebar > .sidebar-toggle {
  align-self: flex-end;
  margin-left: auto;
  margin-right: 16px;
}

body.sidebar-collapsed .app-body > .sidebar > .sidebar-toggle {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .app-body > .sidebar {
    display: flex;
  }

  .app-body > .sidebar > .sidebar-toggle {
    margin: 12px auto 14px;
  }
}

/* 部门树列表：主干纵线 + 横向肘线指向节点（最后节点不向下延伸多余线） */
.dept-list { margin-top: 16px; }
#deptList ul { list-style: none; margin: 0; padding: 0; }
#deptList > ul { margin-left: 0; padding-left: 0; }
#deptList ul ul { margin-left: 16px; padding-left: 22px; }
#deptList li { position: relative; list-style: none; display: flow-root; }
#deptList ul ul li::after {
  content: '';
  position: absolute;
  left: -22px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #cfd5de;
}
/* 最后一个子节点：主干线只到肘线为止，避免向下伸出多余短线 */
#deptList ul ul li:last-child::after { bottom: auto; height: 23px; }
/* 第一个子节点：主干线上接父卡片，保持父-子连线 */
#deptList ul ul li:first-child::after { top: -11px; }
/* 独子：从父卡片连到自身肘线 */
#deptList ul ul li:only-child::after { top: -11px; bottom: auto; height: 34px; }
.dept-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 12px;
  margin: 0 0 10px;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  background: #fff;
}
.dept-item:hover { border-color: #dce0e5; }
.dept-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 50%;
  width: 22px;
  height: 1px;
  background: #cfd5de;
}
#deptList > ul > li > .dept-item::before { content: none; }
.dept-name { flex: 0 1 auto; min-width: 0; font-weight: 600; color: var(--ui-text); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dept-meta { flex: 0 0 auto; color: #969da6; font-size: 12px; }
.dept-ops { flex: 0 0 auto; margin-left: auto; display: inline-flex; gap: 8px; }
.dept-empty { margin-top: 14px; padding: 24px; border: 1px dashed #dde1e6; border-radius: 13px; color: #a0a7b0; text-align: center; }

/* 部门作用域切换（内部 / 外部）——滑块 */
.dept-scope-toggle {
  position: relative;
  display: inline-flex;
  margin: 0 0 14px;
  padding: 3px;
  background: #eef0f2;
  border-radius: 999px;
}
.dept-scope {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #626b78;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease;
}
.dept-scope:hover { background: transparent; color: #20242b; }
.dept-scope.active { color: #fff; }

/* 通知中心 */
.notify-wrap { position: relative; display: inline-flex; margin-right: 6px; }
.topbar-notify-trigger {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 0; background: transparent; color: #3f4855; cursor: pointer;
  transition: color .15s ease;
}
.topbar-notify-trigger:hover { background: transparent; color: #20242b; }
.notify-bell { display: block; width: 26px; height: 26px; flex: 0 0 auto; }
.notify-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #e85656; color: #fff;
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 600;
  box-shadow: 0 0 0 2px #fff;
}
.notify-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 360px; max-height: 460px;
  border: 1px solid #e3e6eb; border-radius: 14px;
  background: #fff; box-shadow: 0 18px 40px rgba(16,24,40,.14);
  z-index: 120; display: flex; flex-direction: column; overflow: hidden;
}
.notify-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px; border-bottom: 1px solid #eef0f2;
}
.notify-title { font-size: 14px; font-weight: 650; color: #20242b; }
.notify-mark-all { border: 0; background: transparent; color: #626b78; font-size: 12px; cursor: pointer; }
.notify-mark-all:hover { background: transparent; color: #20242b; }
.notify-tabs { display: flex; gap: 6px; padding: 8px 14px; border-bottom: 1px solid #eef0f2; }
.notify-tab { min-height: 0; padding: 5px 12px; border: 0; border-radius: 999px; background: #eef0f2; color: #626b78; font-size: 12px; cursor: pointer; }
.notify-tab:hover { background: #eef0f2; color: #20242b; }
.notify-tab.active { background: #20242b; color: #fff; }
.notify-tab.active:hover { background: #20242b; color: #fff; }
.notify-list { overflow-y: auto; max-height: 340px; padding: 6px 8px; }
.notify-item { display: flex; gap: 10px; padding: 10px 8px; border-radius: 8px; cursor: pointer; }
.notify-item:hover { background: #f5f6f8; }
.notify-item .n-icon { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #cfd5de; }
.notify-item.todo .n-icon { background: #e85656; }
.notify-item .n-body { min-width: 0; }
.notify-item .n-text { font-size: 13px; color: #27364d; line-height: 1.5; }
.notify-item.unread .n-text { font-weight: 600; }
.notify-item .n-meta { font-size: 11px; color: #98a2b3; margin-top: 3px; }
.notify-empty { padding: 40px 0; text-align: center; color: #a0a7b0; font-size: 13px; }
.dept-scope-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  width: 0;
  background: #20242b;
  border-radius: 999px;
  z-index: 0;
  transition: left .24s cubic-bezier(.4,0,.2,1), width .24s cubic-bezier(.4,0,.2,1);
}

/* ===== 部门组织树（卡片式，参考组织架构 Demo） ===== */
.dept-toolbar {
  margin: 16px 0 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--ui-border);
}
.dept-stats { color: #9aa1aa; font-size: 12.5px; }

.org-group {
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.org-group:hover { border-color: #d6dae0; box-shadow: 0 2px 10px rgba(24,29,36,.04); }
.org-group + .org-group { margin-top: 12px; }

.org-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px 0 14px;
  background: #fff;
}
.toggle {
  width: 28px; height: 28px;
  border: 0; background: transparent;
  color: #777e87; border-radius: 7px;
  display: grid; place-items: center; padding: 0;
  flex: 0 0 auto;
}
.toggle:hover { background: #f3f4f6; color: #2a2e33; }
.toggle svg { width: 15px; height: 15px; transition: transform .2s ease; }
.org-group.collapsed .toggle svg { transform: rotate(-90deg); }

.org-name {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 650;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  display: flex; align-items: baseline; gap: 8px;
}
.org-meta {
  font-size: 11px; color: #a5aab2;
  font-weight: 500; white-space: nowrap;
}

.row-actions {
  display: flex; align-items: center; gap: 4px;
  flex: 0 0 auto;
  opacity: .25; transition: opacity .18s ease;
}
.org-header:hover .row-actions,
.dept-row:hover .row-actions { opacity: 1; }
.action-btn {
  height: 30px; padding: 0 10px;
  border: 0; background: transparent; border-radius: 7px;
  color: #686f78; font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.action-btn:hover { background: #f3f4f6; color: #202328; }
.action-btn.icon-only { width: 30px; padding: 0; justify-content: center; }
.action-btn svg { width: 14px; height: 14px; }

.dept-wrap {
  max-height: 600px; overflow: hidden;
  transition: max-height .28s ease;
}
.org-group.collapsed .dept-wrap { max-height: 0; }
.dept-wrap-inner {
  margin-left: 28px;
  position: relative;
  padding: 0 12px 0 19px;
}
/* 左侧竖线：底部留 22px，最后一行下方不拖尾（参照 Demo (2)） */
.dept-wrap-inner::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 22px;
  border-left: 1px solid #d8dde2;
  pointer-events: none;
}

.dept-node { position: relative; }
.dept-row {
  height: 44px;
  display: flex; align-items: center; gap: 11px;
  position: relative;
  padding: 0 4px 0 12px;
  transition: background .16s ease;
}
/* 相邻部门之间一条淡分隔线（首行不加） */
.dept-node + .dept-node > .dept-row { border-top: 1px solid #f0f1f3; }
/* 每个部门一条横线，连到左侧竖线 */
.dept-row::before {
  content: "";
  position: absolute; left: -20px; width: 18px; top: 50%;
  border-top: 1px solid #d8dde2;
  pointer-events: none;
}
.dept-row:hover { background: #fafbfc; border-radius: 8px; }
.dept-row .dept-name {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 550;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.people { width: 54px; flex: 0 0 auto; color: #a0a6ae; font-size: 11px; text-align: right; white-space: nowrap; }
.dept-children {
  margin-left: 28px;
  position: relative;
  padding: 0 12px 0 19px;
}
.dept-children::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 22px;
  border-left: 1px solid #d8dde2;
  pointer-events: none;
}

/* 下拉菜单 */
.dept-dropdown {
  position: fixed; z-index: 1200;
  width: 144px; background: #fff;
  border: 1px solid var(--ui-border); border-radius: 10px;
  padding: 5px;
  box-shadow: 0 12px 34px rgba(25,30,36,.12);
  display: none;
}
.dept-dropdown.show { display: block; }
.dept-dropdown button {
  width: 100%; border: 0; background: transparent;
  height: 34px; border-radius: 7px; padding: 0 10px;
  text-align: left; color: #3e444b; font-size: 12px;
  display: flex; align-items: center;
}
.dept-dropdown button:hover { background: #f5f6f7; }
.dept-dropdown button.danger { color: var(--ui-danger); }
.dept-dropdown button.danger:hover { background: #fff4f4; }

/* toast */
.dept-toast {
  position: fixed; z-index: 1300;
  left: 50%; bottom: 28px;
  transform: translate(-50%, 12px);
  opacity: 0; pointer-events: none;
  background: #202328; color: #fff;
  border-radius: 9px; padding: 10px 14px; font-size: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  transition: opacity .2s ease, transform .2s ease;
}
.dept-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .org-meta { display: none; }
  .action-btn:not(.icon-only) { display: none; }
  .people { width: 42px; }
}
