    /* ════════════════════════════════════════════════════════════════════════
       ClearFlow shell — 2026-09-15 前端重做（方向 A）
       左栏队列导航 + 顶栏 + 内容区。颜色只来自 tokens.css（U0-1.4 / U0-6.2）；
       本文件拥有壳、面板、按钮、状态 chip、工单行、通知。屏幕专有规则在
       workbench.css / review.css。测试钩子（id、data-*、语义类）保持不变。
       ════════════════════════════════════════════════════════════════════════ */
    /* ── Reset & base ──────────────────────────────────────────────────────── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
    body {
      font-family: var(--font-sans);
      font-size: 13px;
      line-height: 1.5;
      color: var(--ink);
      background: var(--bg);
      min-height: 100vh;
    }
    button { font-family: inherit; }
    :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
    ::selection { background: var(--accent-tint); }
    .icon-svg { width: 1em; height: 1em; vertical-align: -0.14em; flex-shrink: 0; }
    a { color: var(--accent-ink); }

    /* ── App frame: rail | main ────────────────────────────────────────────── */
    .app-frame { display: flex; min-height: 100vh; }
    .app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

    /* ── Rail ──────────────────────────────────────────────────────────────── */
    .rail {
      width: 232px;
      flex-shrink: 0;
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 16px 12px;
      background: var(--surface);
      border-right: 1px solid var(--hairline);
    }
    .rail-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
    .logo-mark {
      display: grid;
      place-items: center;
      width: 28px; height: 28px;
      border-radius: 7px;
      background: var(--accent);
      color: var(--surface);
      flex-shrink: 0;
    }
    .rail-brand h1 { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
    .rail-brand .badge { display: block; font-size: 13px; color: var(--ink-3); }
    .rail-label { font-size: 13px; color: var(--ink-3); padding: 12px 8px 4px; letter-spacing: 0.02em; }
    .rail-item {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 8px 10px;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--ink-2);
      font-size: 13px;
      text-align: left;
      text-decoration: none;
      cursor: pointer;
    }
    .rail-item:hover { background: var(--surface-2); color: var(--ink); }
    .rail-item.active, .rail-item.active:hover { background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
    .rail-item[hidden] { display: none; }
    .rail-item .icon-svg { width: 16px; height: 16px; color: var(--ink-3); }
    .rail-item.active .icon-svg { color: var(--accent-ink); }
    body:has(#review-panel.active) .rail { display: none; }
    .rail-foot {
      margin-top: auto;
      padding: 10px 4px 0;
      border-top: 1px solid var(--hairline-soft);
    }

    /* 今日队列 (#205)：六格搬进左栏，一格一行；id/类名不变，has-failed 只控制显隐。 */
    .queue-strip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .stat-tile.queue-cell {
      appearance: none;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "lbl num" "sub sub";
      align-items: center;
      column-gap: 8px;
      padding: 8px 10px;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--ink-2);
      font: inherit;
      text-align: left;
      cursor: pointer;
    }
    .queue-cell:hover { background: var(--surface-2); }
    .queue-cell.active { background: var(--accent-tint); color: var(--accent-ink); }
    .queue-cell .lbl { grid-area: lbl; font-size: 13px; }
    .queue-cell .num {
      grid-area: num;
      font-size: 13px;
      font-weight: 650;
      font-variant-numeric: tabular-nums;
      color: var(--ink);
      min-width: 20px;
      text-align: right;
    }
    .queue-cell.active .num { color: var(--accent-ink); }
    .queue-cell.danger .num { color: var(--red); }
    .queue-cell.danger .num[data-zero="true"] { color: var(--ink); }
    .queue-cell.ok .num { color: var(--green); }
    .queue-cell .queue-sub { grid-area: sub; font-size: 13px; color: var(--ink-3); margin-top: 2px; }

    /* ── Top bar ───────────────────────────────────────────────────────────── */
    .app-header {
      position: sticky;
      top: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 52px;
      padding: 0 28px;
      background: var(--surface);
      border-bottom: 1px solid var(--hairline-soft);
    }
    .app-header h2 { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
    .app-header .crumb { color: var(--ink-3); }
    .topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
    .nav-link { font-size: 13px; color: var(--accent-ink); text-decoration: none; }
    button.nav-link { border: 0; background: none; cursor: pointer; font-family: inherit; }
    .nav-link:hover { text-decoration: underline; }
    .operator-menu-wrap { position: relative; }
    .operator-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      padding: 6px 8px;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--ink-2);
      font-size: 13px;
      cursor: pointer;
      text-align: left;
      /* 「操作员」是匿名文字块，用户名长时会被挤成「操作 / 员」两行（10-06 试用单干跑 A9）。
         标签不换行，用户名自己折行。 */
      white-space: nowrap;
    }
    .operator-chip:hover { background: var(--surface-2); }
    .operator-chip::before {
      content: "";
      width: 8px; height: 8px;
      border-radius: 50%;
      background: var(--green);
      flex-shrink: 0;
    }
    .operator-chip strong { color: var(--ink); white-space: normal; overflow-wrap: anywhere; min-width: 0; }
    .operator-menu {
      position: absolute;
      bottom: calc(100% + 6px);
      left: 0;
      z-index: 110;
      width: 160px;
      padding: 5px;
      border: 1px solid var(--hairline);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: var(--shadow-card);
    }
    .operator-menu[hidden] { display: none; }
    .operator-menu button {
      display: block;
      width: 100%;
      padding: 8px 10px;
      border: none;
      border-radius: 5px;
      background: none;
      color: var(--ink-2);
      cursor: pointer;
      font-size: 13px;
      text-align: left;
    }
    .operator-menu button:hover { background: var(--surface-2); color: var(--ink); }
    .logout-link { color: var(--ink-3); background: none; border: none; cursor: pointer; font-size: 13px; }

    /* ── 页内分区导航（工具页；js/shell.js 从 section[data-nav] 渲染）─────────── */
    .subnav {
      position: sticky;
      top: 52px;
      z-index: 90;
      display: flex;
      gap: 4px;
      padding: 0 28px;
      overflow-x: auto;
      background: var(--surface);
      border-bottom: 1px solid var(--hairline);
    }
    .subnav[hidden] { display: none; }
    .subnav-item {
      padding: 10px 12px;
      border-bottom: 2px solid transparent;
      color: var(--ink-2);
      text-decoration: none;
      white-space: nowrap;
    }
    .subnav-item:hover { color: var(--ink); }
    .subnav-item.active { border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
    section[data-nav] { scroll-margin-top: 108px; }
    @media (max-width: 600px) {
      /* 手机：分区导航换行而不是横滑（每项都留在屏内），项高触达 44px。 */
      .subnav { position: static; flex-wrap: wrap; overflow: visible; padding: 4px 12px; }
      .subnav-item { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 14px; }
    }

    /* ── Content ───────────────────────────────────────────────────────────── */
    .container { max-width: 1180px; width: 100%; padding: 22px 28px 48px; position: relative; z-index: 1; }
    .container.wide { max-width: none; }
    .screen-intro { margin: 0 0 16px; color: var(--ink-subtle); }

    /* ── Panel（原 card）────────────────────────────────────────────────────── */
    .card {
      background: var(--surface);
      border: 1px solid var(--hairline);
      border-radius: 8px;
      padding: 16px;
      margin-bottom: 16px;
    }
    .card > h2, .panel-head {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      font-weight: 650;
      letter-spacing: -0.01em;
      margin: -16px -16px 12px;
      padding: 12px 16px;
      border-bottom: 1px solid var(--hairline-soft);
    }
    .section-title { font-size: 13px; font-weight: 650; color: var(--ink); }
    .count-chip {
      font-size: 13px;
      font-weight: 600;
      color: var(--ink-2);
      background: var(--control-hover);
      border-radius: 4px;
      padding: 1px 7px;
      font-variant-numeric: tabular-nums;
    }
    .confirmed-bucket-chip {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 2px 8px; border-radius: 4px; font-size: 13px;
      background: var(--accent-tint); color: var(--accent-ink);
      border: none; cursor: pointer; font-weight: 600;
    }

    /* ── Buttons ───────────────────────────────────────────────────────────── */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-height: 32px;
      padding: 0 12px;
      border-radius: 6px;
      border: 1px solid var(--hairline);
      background: var(--surface);
      color: var(--ink);
      cursor: pointer;
      font-size: 13px;
      font-weight: 550;
      white-space: nowrap;
      transition: background 0.15s, border-color 0.15s, opacity 0.15s;
    }
    .btn:hover { background: var(--surface-2); }
    .btn:active { background: var(--control-hover); }
    .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--surface); }
    .btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
    .btn-success { background: var(--green); border-color: var(--green); color: var(--surface); }
    .btn-success:hover { background: var(--green); opacity: 0.92; }
    .btn-danger { background: var(--red); border-color: var(--red); color: var(--surface); }
    .btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
    .btn-ghost:hover { background: var(--control-hover); color: var(--ink); }
    .btn-danger-ghost { background: var(--red-tint); color: var(--red); border-color: var(--red-border); }
    .btn-danger-ghost:hover { background: var(--red-tint); border-color: var(--red); }
    .btn:disabled { opacity: 0.45; cursor: not-allowed; }
    .btn-toggle { background: var(--surface); border: 1px solid var(--hairline); color: var(--ink-2); }
    .btn-toggle .red-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; }
    .btn-toggle.active { background: var(--red-tint); border-color: var(--red-border); color: var(--red); font-weight: 600; }
    .btn-small { min-height: 26px; padding: 0 9px; font-size: 13px; }

    /* ── Status chip ───────────────────────────────────────────────────────── */
    .status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 20px;
      padding: 0 8px;
      border-radius: 4px;
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
    }
    .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
    .status-processing     { background: var(--amber-tint); color: var(--amber); }
    .status-pending_review { background: var(--accent-tint); color: var(--accent-ink); }
    .status-confirmed      { background: var(--green-tint); color: var(--green); }
    .status-failed         { background: var(--red-tint); color: var(--red); }

    /* ── Entry rows（表格感的列表，钩子不变）──────────────────────────────── */
    .entry-list { list-style: none; margin: 0 -16px; }
    .entry-item {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 44px;
      padding: 8px 16px;
      border-top: 1px solid var(--hairline-soft);
      cursor: pointer;
    }
    .entry-item:first-child { border-top: none; }
    .entry-item:hover { background: var(--surface-2); }
    .entry-doc-icon {
      display: grid;
      place-items: center;
      width: 28px; height: 28px;
      border-radius: 6px;
      background: var(--accent-tint);
      color: var(--accent-ink);
      flex-shrink: 0;
    }
    .entry-doc-icon.confirmed { background: var(--green-tint); color: var(--green); }
    .entry-meta { flex: 1; min-width: 0; }
    .entry-meta .name { font-weight: 550; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .entry-meta .sub { font-size: 13px; color: var(--ink-3); margin-top: 1px; font-variant-numeric: tabular-nums; }
    .entry-item .btn { flex-shrink: 0; }
    /* #1501：密钥没换之前，凭据被拒的失败行用一句说明顶掉「重新识别工单」按钮的位置。 */
    .entry-action-note { flex-shrink: 0; font-size: 13px; color: var(--ink-3); }
    /* .btn 的 display:inline-flex 会盖过 [hidden]，复核页顶栏的重试入口要显式关掉。 */
    #review-retry-btn[hidden] { display: none; }
    .entry-check { accent-color: var(--accent); width: 14px; height: 14px; flex-shrink: 0; cursor: pointer; }
    .empty-state { text-align: center; color: var(--ink-3); padding: 28px 16px; font-size: 13px; cursor: default; }
    .empty-state:hover { background: transparent; }
    .empty-state .icon-svg { width: 24px; height: 24px; display: block; margin: 0 auto 8px; opacity: 0.5; }
    .expand-row { text-align: center; padding-top: 10px; }
    #confirmed-pagination-notice {
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
      margin: 0 -16px 0; padding: 10px 16px;
      background: var(--amber-tint); border-top: 1px solid var(--amber-border); border-bottom: 1px solid var(--amber-border);
      color: var(--amber);
    }
    #confirmed-pagination-notice p { flex: 1; min-width: 200px; }
    #confirmed-pagination-notice[hidden] { display: none; }

    /* ── History toolbar ───────────────────────────────────────────────────── */
    .history-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
    .search-field {
      display: flex;
      align-items: center;
      gap: 7px;
      flex: 1;
      min-width: 180px;
      height: 32px;
      background: var(--surface);
      border: 1px solid var(--hairline);
      border-radius: 6px;
      padding: 0 10px;
      color: var(--ink-3);
    }
    .search-field:focus-within { border-color: var(--accent); }
    .search-field input { border: none; background: transparent; outline: none; font-size: 13px; font-family: inherit; color: var(--ink); width: 100%; }
    .search-field input::placeholder { color: var(--ink-3); }
    .toolbar-selectall { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; padding: 4px 6px; }

    /* ── Upload area ───────────────────────────────────────────────────────── */
    .upload-area {
      display: flex;
      align-items: center;
      gap: 16px;
      border: 1px dashed var(--hairline);
      border-radius: 8px;
      padding: 16px 18px;
      cursor: pointer;
      background: var(--surface-2);
      text-align: left;
      transition: border-color 0.2s, background 0.2s;
    }
    .upload-area:hover, .upload-area.drag-over { border-color: var(--accent); background: var(--accent-tint); }
    .upload-area input[type=file] { display: none; }
    .upload-area .icon {
      display: grid;
      place-items: center;
      width: 40px; height: 40px;
      border-radius: 8px;
      background: var(--accent-tint);
      color: var(--accent-ink);
      flex-shrink: 0;
    }
    .upload-area .icon .icon-svg { width: 18px; height: 18px; }
    .upload-area .upload-copy { flex: 1; min-width: 0; }
    .upload-area p { color: var(--ink); font-size: 13px; font-weight: 550; }
    .upload-area p strong { color: var(--accent-ink); font-weight: 600; cursor: pointer; }
    .upload-area .hint { color: var(--ink-3); font-size: 13px; font-weight: 400; margin-top: 2px; }

    /* ── Upload Batch group（同批上传）────────────────────────────────────── */
    .batch-group { list-style: none; border-top: 1px solid var(--hairline-soft); background: var(--surface); }
    .batch-group-header {
      display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
      padding: 8px 16px;
      background: var(--surface-2);
      border-bottom: 1px solid var(--hairline-soft);
      font-size: 13px; color: var(--ink-2);
    }
    .batch-group-header > .icon-svg { color: var(--accent-ink); width: 14px; height: 14px; }
    .batch-group-header .batch-title { font-weight: 600; color: var(--ink); }
    .batch-group-header .batch-sub { color: var(--ink-3); }
    .batch-group-header .batch-sub strong { color: var(--amber); font-weight: 600; }
    .batch-group-header .btn { margin-left: auto; }
    .batch-group > .entry-list { margin: 0; }
    .batch-group .entry-item { padding-left: 32px; }

    /* ── Audit nudge / stub / delivered ────────────────────────────────────── */
    .stub-banner { background: var(--amber-tint); border: 1px solid var(--amber-border); padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; color: var(--amber); }
    .delivered-panel {
      margin-top: 16px; padding: 12px 14px; border-radius: 6px;
      background: var(--green-tint); border: 1px solid var(--green-border);
      display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    }
    .delivered-panel .msg { font-weight: 600; color: var(--green); margin-right: 4px; }
    .sw-export-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 4px 16px 12px; border-top: none; }
    .sw-details { flex-basis: 100%; color: var(--ink-3); }
    .sw-details summary { cursor: pointer; font-weight: 550; color: var(--ink-2); }
    .sw-details summary:hover { color: var(--accent-ink); }
    .sw-notes-body { margin-top: 8px; line-height: 1.55; }
    .sw-notes-intro { color: var(--amber); font-weight: 600; margin-bottom: 6px; }
    .sw-notes-section { margin-bottom: 10px; }
    .sw-notes-section ul { margin: 4px 0 0 18px; }
    .sw-notes-section li { margin-bottom: 2px; }
    .sw-notes-missing strong, .sw-notes-missing li, .sw-notes-error { color: var(--red); }
    .sw-unavailable { color: var(--ink-3); line-height: 1.5; }

    /* ── 通知（#1001）：#toast 是最新一条，其下堆叠更早的失败，铃铛后是失败记录 ──
       顶栏正下方靠右（#234：不遮复核控件）。失败不再自动消失，所以复核屏的
       「关闭 / 重新识别 / 状态」搬进顶栏，永远在通知之上。 */
    #notice-area {
      position: fixed;
      top: 64px;
      right: 24px;
      width: min(380px, calc(100vw - 32px));
      display: flex;
      flex-direction: column;
      gap: 8px;
      z-index: 9999;
      pointer-events: none;
    }
    #notice-stack { display: flex; flex-direction: column; gap: 8px; }
    /* 复核屏动作只在复核屏显示（body:has 同 .rail 的判据）。 */
    .review-only { display: none; }
    body:has(#review-panel.active) .review-only { display: inline-flex; align-items: center; gap: 8px; }
    /* 固定顶栏下方留白：滚动定位到按钮或输入框时不被顶栏压住。 */
    .app-main :is(button, input, select, textarea, a, [tabindex]) { scroll-margin-top: 64px; }
    /* A flex item honours z-index even when static — the toast must not paint
       over its own ✕. */
    #notice-area #toast { position: static; width: auto; z-index: auto; }
    #notice-area #toast:not(.show) { display: none; }
    /* 通知正文让点击穿过（与重做前的 #toast 一致），只有 ✕、出路和「还有 N 条」
       接点击：失败要等人关掉才走，这期间不能锁住压在下面的控件（#775 的
       「知道了，本次不再提示」）。 */
    .notice {
      position: relative;
      padding: 11px 36px 11px 14px;
      border-radius: 8px;
      background: var(--surface);
      border: 1px solid var(--hairline);
      border-left: 3px solid var(--red);
      color: var(--ink);
      box-shadow: var(--shadow-card);
      pointer-events: none;
      overflow-wrap: anywhere;
    }
    .notice[hidden] { display: none; }
    .notice .toast-action { display: block; margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--accent-ink); font: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; pointer-events: auto; }
    .notice-dismiss {
      position: absolute;
      top: 6px; right: 6px;
      width: 26px; height: 26px;
      border: 0; border-radius: 6px;
      background: transparent;
      color: var(--ink-3);
      font-size: 13px;
      cursor: pointer;
      pointer-events: auto;
    }
    .notice-dismiss:hover { background: var(--control-hover); color: var(--ink); }
    .notice-more {
      align-self: flex-end;
      border: 0; background: transparent;
      color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 600;
      text-decoration: underline; cursor: pointer; pointer-events: auto;
    }
    .notice-more[hidden] { display: none; }
    .notice-bell { position: relative; width: 32px; padding: 0; }
    .notice-bell .icon-svg { width: 16px; height: 16px; }
    .notice-bell-count {
      position: absolute; top: -5px; right: -5px;
      min-width: 16px; height: 16px; padding: 0 4px;
      border-radius: 8px; background: var(--red); color: var(--surface);
      font-size: 13px; font-weight: 700; line-height: 16px; text-align: center;
    }
    .notice-bell-count[hidden] { display: none; }
    .notice-log {
      position: fixed;
      top: 0; right: 0; bottom: 0;
      width: min(440px, 100vw);
      z-index: 10001;
      display: flex;
      flex-direction: column;
      background: var(--surface);
      border-left: 1px solid var(--hairline);
      box-shadow: var(--shadow-card);
    }
    .notice-log[hidden] { display: none; }
    .notice-log-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--hairline-soft); }
    .notice-log-head h3 { font-size: 14px; font-weight: 650; }
    .notice-log-head #notice-log-clear { margin-left: auto; }
    .notice-log-list { list-style: none; overflow-y: auto; }
    .notice-log-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--hairline-soft); }
    .notice-log-item.handled { opacity: 0.6; }
    .notice-log-time { flex-shrink: 0; width: 64px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
    .notice-log-body { flex: 1; min-width: 0; }
    .notice-log-text { overflow-wrap: anywhere; }
    .notice-log-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
    .notice-log-way { color: var(--ink-3); font-size: 13px; }
    .notice-log-empty { padding: 20px 16px; color: var(--ink-3); }

    /* #toast：最新一条（noticeArea() 把它收进 #notice-area；这里的 fixed 只在
       挂载前的一瞬生效） */
    #toast {
      position: fixed;
      top: 64px;
      right: 24px;
      width: min(380px, calc(100vw - 32px));
      padding: 11px 36px 11px 14px;
      border-radius: 8px;
      background: var(--surface);
      border: 1px solid var(--hairline);
      border-left: 3px solid var(--ink-3);
      color: var(--ink);
      font-size: 13px;
      box-shadow: var(--shadow-card);
      opacity: 0;
      transform: translateY(6px);
      transition: opacity 0.25s, transform 0.25s;
      pointer-events: none;
      z-index: 9999;
      overflow-wrap: anywhere;
    }
    #toast.show { opacity: 1; transform: none; }
    #toast.success { border-left-color: var(--green); }
    #toast.error { border-left-color: var(--red); }
    #toast-dismiss { position: absolute; top: 6px; right: 6px; z-index: 2; }
    #toast-dismiss[hidden] { display: none; }
    #toast .toast-action {
      pointer-events: auto;
      display: block;
      margin-top: 8px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--accent-ink);
      font: inherit;
      font-weight: 650;
      text-decoration: underline;
      cursor: pointer;
    }
    @media (max-width: 600px) { #toast { right: 16px; } }

    /* ── Loading ───────────────────────────────────────────────────────────── */
    .spinner {
      display: inline-block;
      width: 13px; height: 13px;
      border: 2px solid var(--hairline);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      vertical-align: middle;
    }
    .btn-primary .spinner { border-color: var(--accent-tint); border-top-color: var(--surface); }
    .spinner.dark { border-color: var(--hairline); border-top-color: var(--accent); }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── Locate flash (#522) ───────────────────────────────────────────────── */
    @keyframes locate-flash {
      0%   { background: var(--amber-tint); }
      60%  { background: var(--amber-tint); }
      100% { background: transparent; }
    }
    .field-row.field-located .label,
    .field-row.field-located input[type=text],
    .field-row.field-located textarea.field-multiline { animation: locate-flash 1.2s ease-out; }
    .field-row.field-located .label { color: var(--amber); }
    .line-items-table td.cell-located { animation: locate-flash 1.2s ease-out; box-shadow: inset 0 0 0 1px var(--amber-border); }
    @media (prefers-reduced-motion: reduce) {
      .field-row.field-located .label,
      .field-row.field-located input[type=text],
      .field-row.field-located textarea.field-multiline,
      .line-items-table td.cell-located { animation: none; }
    }

    /* ── 手机（#711）：左栏折成顶部队列条，触达 44px ────────────────────────
       队列条在窄屏是两列 grid；不带内联 grid-template-columns。 */
    @media (max-width: 900px) {
      /* The top bar stays at the very top (fixed) so notices anchor to it
         whatever the page scrolled; the rail becomes a strip beneath it. */
      .app-frame { flex-direction: column; padding-top: 52px; }
      .app-header { position: fixed; top: 0; left: 0; right: 0; }
      .rail {
        position: static; width: auto; height: auto;
        flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 6px;
        border-right: none; border-bottom: 1px solid var(--hairline); padding: 12px;
      }
      .rail-brand { padding-bottom: 6px; flex-basis: 100%; }
      .rail-label { flex-basis: 100%; padding-top: 6px; }
      .queue-strip { flex-basis: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .rail-item { width: auto; }
      .rail-foot { margin-top: 0; margin-left: auto; padding: 0; border-top: none; }
      .operator-menu { bottom: auto; top: calc(100% + 6px); left: auto; right: 0; }
      .app-header, .container { padding-left: 16px; padding-right: 16px; }
      .app-header .crumb { display: none; }
    }
    @media (max-width: 600px) {
      /* U0-2.1 手机正文下限 14px：壳里所有 13px 文字在 390px 屏上抬一档。 */
      .rail-brand .badge, .rail-label, .rail-item, .operator-chip, .operator-menu button, .logout-link,
      .nav-link, .btn, .btn-small, .status, .count-chip, .crumb, .screen-intro, .empty-state,
      .entry-meta .name, .entry-meta .sub, .subnav-item, .notice, #toast, .notice-more, .notice-log-item { font-size: 14px; }
      /* 顶栏一行放不下标题 + 状态 + 两个按钮：状态 chip 让位给按钮，正文里仍有状态。 */
      .review-only .status { display: none; }
      .app-header h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
    }

/* 平台管理账号直开企业业务页时的整页拦截（js/shell.js 的 shellBlockPlatformAccount）。 */
/* 只给上下留白：拦截区在工作台、质检抽检页上就是 .container 本身，左右沿用它的边距。 */
.platform-gate { padding-top: 28px; padding-bottom: 28px; color: var(--ink-2); }
.platform-gate p { margin: 0 0 12px; line-height: 1.7; }
.platform-gate a { font-weight: 600; }
