  /* ===== 主题变量 ===== */
  :root {
    color-scheme: dark;
    --bg: #0e1014;
    --canvas-bg: #0e1014;
    --dot: rgba(255,255,255,0.045);
    --panel: rgba(24,27,35,0.92);
    --panel-solid: #1b1e27;
    --surface: rgba(255,255,255,0.045);
    --surface-2: rgba(255,255,255,0.08);
    --surface-hover: rgba(255,255,255,0.12);
    --text: #e9ebef;
    --text-dim: #9aa0ac;
    --text-faint: #6b7280;
    --border: rgba(255,255,255,0.08);
    --border-soft: rgba(255,255,255,0.05);
    --overlay-bg: rgba(0,0,0,0.62);
    --shoe-shadow: drop-shadow(0 6px 18px rgba(0,0,0,0.5));
    --shoe-shadow-hover: drop-shadow(0 12px 28px rgba(0,0,0,0.62));
    --modal-shadow: 0 24px 70px rgba(0,0,0,0.6);
    --ease: cubic-bezier(.22,.78,.22,1);
    --accent: #3b82f6;
  }
  :root[data-theme="light"] {
    color-scheme: light;
    --bg: #edeef2;
    --canvas-bg: #e8eaef;
    --dot: rgba(30,41,73,0.07);
    --panel: rgba(255,255,255,0.93);
    --panel-solid: #ffffff;
    --surface: rgba(28,39,68,0.045);
    --surface-2: rgba(28,39,68,0.08);
    --surface-hover: rgba(28,39,68,0.13);
    --text: #232834;
    --text-dim: #5c6573;
    --text-faint: #98a0ad;
    --border: rgba(28,39,68,0.11);
    --border-soft: rgba(28,39,68,0.06);
    --overlay-bg: rgba(28,36,58,0.38);
    --shoe-shadow: drop-shadow(0 5px 15px rgba(30,40,70,0.2));
    --shoe-shadow-hover: drop-shadow(0 12px 26px rgba(30,40,70,0.3));
    --modal-shadow: 0 24px 70px rgba(30,40,70,0.22);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { width: 100%; height: 100%; overflow: hidden; }
  body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); user-select: none; -webkit-font-smoothing: antialiased; transition: background 0.3s var(--ease), color 0.3s var(--ease); }

  /* ===== 顶部栏 ===== */
  #top-bar { position: fixed; top: 0; left: 0; right: 0; height: 64px; background: var(--panel); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 16px; gap: 12px; z-index: 100; transition: background 0.3s var(--ease), border-color 0.3s var(--ease); }
  .brand { font-size: 16px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 9px; white-space: nowrap; }
  .brand-logo { height: 40px; width: auto; display: block; }
  .date-display { background: var(--surface); padding: 6px 12px; border-radius: 9px; display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
  .date-display .label { font-size: 10px; color: var(--text-dim); }
  .date-display #current-date { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
  .date-display .diff { font-size: 10px; color: #fbbf24; }
  .time-slider-wrap { flex: 1; display: flex; align-items: center; gap: 8px; max-width: 400px; }
  .slider-btn { background: var(--surface); color: var(--text-dim); border: 1px solid var(--border); padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 11px; transition: all 0.16s var(--ease); white-space: nowrap; }
  .slider-btn:hover { background: var(--surface-hover); color: var(--text); }
  .slider-btn.primary { background: #ef4444; color: #fff; border-color: #ef4444; }
  .slider-btn.primary:hover { background: #dc2626; }
  #time-slider { flex: 1; height: 6px; appearance: none; background: linear-gradient(to right,#fff 0%,#fb923c 60%,#ef4444 90%); border-radius: 3px; outline: none; cursor: pointer; }
  #time-slider::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; cursor: grab; border: 2px solid var(--panel-solid); box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
  .role-switcher { display: flex; background: var(--surface); border-radius: 9px; padding: 3px; gap: 2px; }
  .role-btn { padding: 5px 10px; font-size: 11px; color: var(--text-dim); background: transparent; border: 0; cursor: pointer; border-radius: 6px; transition: all 0.16s var(--ease); font-weight: 500; white-space: nowrap; }
  .role-btn.active { color: #fff; }
  .role-btn[data-role="admin"].active { background: #ef4444; }
  .role-btn[data-role="designer"].active { background: #3b82f6; }
  .role-btn[data-role="viewer"].active { background: #f59e0b; }
  .role-btn:not(.active):hover { color: var(--text); background: var(--surface-2); }
  .current-user { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 9px; padding: 5px 6px 5px 12px; }
  .current-user .cu-label { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
  .current-user .cu-logout { font-size: 11px; color: var(--text-dim); background: var(--surface-2); border: 0; padding: 5px 10px; border-radius: 6px; cursor: pointer; transition: all 0.15s var(--ease); }
  .current-user .cu-logout:hover { background: var(--surface-hover); color: var(--text); }
  .theme-toggle { width: 34px; height: 34px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; font-size: 15px; transition: all 0.16s var(--ease); flex-shrink: 0; }
  .theme-toggle:hover { background: var(--surface-hover); transform: translateY(-1px); }
  .stats { display: flex; gap: 6px; }
  .stat { display: flex; align-items: center; gap: 5px; padding: 4px 7px; background: var(--surface); border-radius: 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
  .stat .dot { width: 7px; height: 7px; border-radius: 50%; }
  .stat.normal .dot { background: #f3f4f6; box-shadow: 0 0 0 1px var(--border); }
  .stat.warning .dot { background: #fb923c; box-shadow: 0 0 6px #fb923c; }
  .stat.overdue .dot { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
  .stat.done .dot { background: #10b981; }

  /* ===== 侧栏 ===== */
  #sidebar { position: fixed; top: 64px; left: 0; bottom: 0; width: 234px; background: var(--panel); backdrop-filter: blur(14px); border-right: 1px solid var(--border); padding: 16px 14px; overflow-y: auto; z-index: 50; transition: background 0.3s var(--ease), border-color 0.3s var(--ease); }
  #sidebar h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin: 18px 0 8px; font-weight: 600; }
  .sidebar-btn-create { width: 100%; background: #3b82f6; color: #fff; border: 0; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; margin-bottom: 8px; transition: all 0.18s var(--ease); box-shadow: 0 4px 14px rgba(59,130,246,0.3); }
  .sidebar-btn-create:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(59,130,246,0.4); }
  .sidebar-btn-create:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
  .sidebar-btn-sub { width: 100%; background: var(--surface); color: var(--text-dim); border: 1px solid var(--border); padding: 9px; border-radius: 9px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; margin-bottom: 6px; transition: all 0.16s var(--ease); }
  .sidebar-btn-sub:hover { background: var(--surface-hover); color: var(--text); transform: translateY(-1px); }
  .sidebar-btn-sub.dash { background: rgba(168,85,247,0.13); border-color: rgba(168,85,247,0.32); color: #a855f7; }
  .sidebar-btn-sub.dash:hover { background: rgba(168,85,247,0.22); }
  .filter-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--text-dim); margin-bottom: 2px; transition: all 0.14s var(--ease); }
  .filter-item:hover { background: var(--surface-2); }
  .filter-item.active { background: rgba(59,130,246,0.15); color: var(--text); }
  .filter-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .filter-item .filter-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .filter-item .filter-meta { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
  .filter-item .overdue-summary { font-size: 10px; color: var(--text-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .filter-item .overdue-summary.has-overdue { color: #ef4444; }
  .filter-item.type-filter { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; column-gap: 8px; row-gap: 2px; }
  .filter-item.type-filter .dot { grid-column: 1; grid-row: 1; }
  .filter-item.type-filter .filter-label { grid-column: 2; grid-row: 1; overflow: visible; text-overflow: clip; white-space: normal; }
  .filter-item.type-filter .filter-meta { grid-column: 3; grid-row: 1; margin-left: 0; }
  .filter-item.type-filter .overdue-summary { grid-column: 2 / 4; grid-row: 2; }
  .filter-item .count { font-size: 11px; color: var(--text-faint); background: var(--surface-2); padding: 1px 6px; border-radius: 10px; }
  .shape-legend { background: var(--surface); border-radius: 9px; padding: 8px 10px; }
  .shape-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); padding: 3px 0; }
  .shape-legend-icon { width: 16px; text-align: center; color: var(--text-faint); font-size: 13px; }
  .toggle-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12px; color: var(--text-dim); cursor: pointer; border-radius: 7px; transition: background 0.14s var(--ease); }
  .toggle-row:hover { background: var(--surface-2); }
  .toggle-row input { accent-color: #3b82f6; cursor: pointer; }
  #stash-section { display: none; }
  .stash-item { background: rgba(251,146,60,0.09); border: 1px solid rgba(251,146,60,0.22); border-radius: 9px; padding: 8px; margin-bottom: 6px; }
  .stash-top { display: flex; align-items: center; gap: 8px; }
  .stash-thumb { width: 34px; height: 34px; border-radius: 7px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 18px; overflow: hidden; flex-shrink: 0; }
  .stash-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .stash-info { flex: 1; min-width: 0; }
  .stash-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stash-meta { font-size: 10px; color: var(--text-dim); }
  .stash-actions { display: flex; gap: 4px; margin-top: 6px; }
  .stash-btn { flex: 1; padding: 5px 6px; border-radius: 6px; border: 0; font-size: 11px; cursor: pointer; font-weight: 600; font-family: inherit; transition: all 0.14s var(--ease); }
  .stash-btn.start { background: #10b981; color: #fff; }
  .stash-btn.start:hover { background: #059669; }
  .stash-btn.del { background: rgba(239,68,68,0.15); color: #ef4444; flex: 0 0 auto; padding: 5px 9px; }
  .stash-all { width: 100%; background: #10b981; color: #fff; border: 0; padding: 8px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; margin-bottom: 6px; transition: all 0.14s var(--ease); }
  .stash-all:hover { background: #059669; }
  .help-list { list-style: none; font-size: 11px; color: var(--text-dim); line-height: 1.7; padding-left: 2px; }
  .help-list li::before { content: "・"; color: var(--text-faint); }
  .help-kbd { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-family: monospace; font-size: 10px; color: var(--text-dim); }
  .you-are { margin-top: 14px; padding: 10px 12px; background: rgba(251,146,60,0.1); border: 1px solid rgba(251,146,60,0.22); border-radius: 9px; font-size: 11px; }
  .you-are .label { color: var(--text-dim); }
  .you-are .name { color: #fb923c; font-weight: 600; font-size: 12px; margin-top: 2px; }

  /* ===== 画布 ===== */
  #canvas-container { position: fixed; top: 64px; left: 234px; right: 0; bottom: 0; background: var(--canvas-bg); overflow: hidden; cursor: grab; transition: background 0.3s var(--ease); }
  #canvas-container.panning { cursor: grabbing; }
  #canvas { width: 100%; height: 100%; background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px); background-size: 42px 42px; }
  .shoe-group { cursor: pointer; transition: transform 0.55s var(--ease); }
  .shoe-group.dragging { cursor: grabbing; transition: none; }
  .shoe-body { transition: fill 0.5s ease, filter 0.25s var(--ease); filter: var(--shoe-shadow); }
  .shoe-group:hover .shoe-body { filter: var(--shoe-shadow-hover); }
  .shoe-group.faded { opacity: 0.15; }
  .shoe-cancelled .shoe-name-text { text-decoration: line-through; }
  @keyframes pulseOverdue { 0%,100%{ opacity:1 } 50%{ opacity:0.4 } }
  .pulse-overdue { animation: pulseOverdue 1.2s ease-in-out infinite; }

  /* ===== Tooltip ===== */
  #tooltip { position: fixed; pointer-events: none; background: var(--panel-solid); border: 1px solid var(--border); backdrop-filter: blur(14px); padding: 12px 14px; border-radius: 10px; font-size: 12px; line-height: 1.6; box-shadow: var(--modal-shadow); z-index: 200; opacity: 0; transition: opacity 0.16s var(--ease); max-width: 320px; }
  #tooltip.visible { opacity: 1; }
  #tooltip .tt-image { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; display: block; border: 1px solid var(--border); background: var(--surface); }
  #tooltip .tt-name { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 4px; }
  #tooltip .tt-sub { color: var(--text-dim); font-size: 11px; margin-bottom: 8px; }
  #tooltip .tt-meta { color: var(--text-dim); }
  #tooltip .tt-meta span { color: var(--text); }
  #tooltip .tt-stage { margin-top: 6px; padding: 4px 8px; background: rgba(59,130,246,0.15); border-radius: 5px; font-size: 11px; color: #60a5fa; }
  #tooltip .tt-notes-title { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin: 8px 0 4px; }
  #tooltip .tt-note { padding: 6px 8px; background: rgba(251,146,60,0.1); border-left: 3px solid #fb923c; border-radius: 4px; color: #d97706; font-size: 11px; line-height: 1.5; margin-bottom: 4px; }
  :root[data-theme="dark"] #tooltip .tt-note, :root:not([data-theme]) #tooltip .tt-note { color: #fcd34d; }
  #tooltip .tt-note-author { font-weight: 700; font-size: 10px; }
  #tooltip .tt-note-img { font-size: 10px; color: #60a5fa; }
  #tooltip .tt-note-more { font-size: 10px; color: var(--text-faint); font-style: italic; }
  #tooltip .tt-status { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-weight: 600; }
  #tooltip .click-hint { margin-top: 8px; font-size: 10px; color: var(--text-faint); text-align: center; border-top: 1px dashed var(--border); padding-top: 6px; }

  /* ===== Mini-map ===== */
  #minimap { position: fixed; right: 16px; bottom: 16px; width: 180px; height: 130px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 6px; z-index: 90; backdrop-filter: blur(14px); }
  #minimap-title { font-size: 10px; color: var(--text-faint); padding: 2px 4px 4px; }
  #minimap svg { width: 100%; height: calc(100% - 16px); }

  /* ===== Modal ===== */
  .overlay { position: fixed; inset: 0; background: var(--overlay-bg); display: flex; align-items: center; justify-content: center; z-index: 500; backdrop-filter: blur(5px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.22s var(--ease), visibility 0.22s; }
  .overlay.visible { opacity: 1; visibility: visible; pointer-events: auto; }
  .modal-box { background: var(--panel-solid); width: 600px; max-width: 92vw; max-height: 90vh; border-radius: 16px; border: 1px solid var(--border); overflow-y: auto; box-shadow: var(--modal-shadow); transform: translateY(14px) scale(0.97); transition: transform 0.26s var(--ease); }
  .overlay.visible .modal-box { transform: none; }
  .modal-box.wide { width: 740px; }
  .modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: flex-start; gap: 12px; }
  .modal-thumb { width: 64px; height: 64px; border-radius: 14px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 34px; flex-shrink: 0; border: 2px dashed var(--border); overflow: hidden; }
  .modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .modal-thumb.has-img { border-style: solid; }
  .modal-title-area { flex: 1; }
  .modal-title-area h2 { font-size: 18px; color: var(--text); margin-bottom: 4px; }
  .modal-meta-line { font-size: 12px; color: var(--text-dim); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .designer-badge, .role-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
  .modal-close { background: var(--surface); color: var(--text-dim); border: 0; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; transition: all 0.14s var(--ease); }
  .modal-close:hover { background: var(--surface-hover); color: var(--text); }
  .modal-body { padding: 16px 24px; }
  .section { margin-bottom: 18px; }
  .section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: 8px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
  .lock-hint { font-size: 10px; color: var(--text-faint); font-weight: normal; text-transform: none; letter-spacing: 0; }
  .stages-bar { display: flex; gap: 3px; }
  .stage-btn { flex: 1; padding: 8px 2px; border-radius: 8px; cursor: pointer; background: var(--surface); border: 1px solid var(--border-soft); transition: all 0.15s var(--ease); text-align: center; position: relative; }
  .stage-btn:not(.disabled):hover { background: var(--surface-2); transform: translateY(-1px); }
  .stage-btn.active { background: rgba(59,130,246,0.2); border-color: #3b82f6; }
  .stage-btn.passed { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.32); }
  .stage-btn.disabled { cursor: not-allowed; opacity: 0.5; }
  .stage-btn-name { font-size: 10.5px; font-weight: 600; color: var(--text); }
  .stage-btn-desc { font-size: 8.5px; color: var(--text-dim); margin-top: 2px; }
  .stage-btn.locked-stage { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.22); }
  .stage-btn.locked-stage .stage-btn-name { color: #ef4444; }
  .stage-btn.locked-stage::after { content: "🔒"; position: absolute; top: 2px; right: 2px; font-size: 7px; }
  .notes-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; padding-right: 4px; }
  .notes-list::-webkit-scrollbar { width: 6px; }
  .notes-list::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }
  .note-item { background: var(--surface); padding: 10px 12px; border-radius: 9px; border-left: 3px solid; position: relative; }
  .note-item.mine { background: rgba(59,130,246,0.1); }
  .note-header { display: flex; align-items: center; gap: 8px; font-size: 11px; margin-bottom: 5px; }
  .note-author { font-weight: 700; font-size: 12px; }
  .note-role-tag { font-size: 9px; padding: 1px 6px; border-radius: 4px; color: #fff; }
  .note-time { color: var(--text-faint); margin-left: auto; }
  .note-text { font-size: 12px; color: var(--text); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
  .note-img { margin-top: 6px; max-width: 160px; max-height: 120px; border-radius: 7px; cursor: pointer; border: 1px solid var(--border); display: block; }
  .note-delete { position: absolute; top: 6px; right: 6px; background: none; border: 0; color: var(--text-faint); cursor: pointer; font-size: 13px; opacity: 0; transition: opacity 0.15s var(--ease); padding: 2px 6px; border-radius: 4px; }
  .note-item:hover .note-delete { opacity: 1; }
  .note-delete:hover { color: #ef4444; background: rgba(239,68,68,0.12); }
  .add-note-area { margin-top: 12px; padding: 12px; background: rgba(59,130,246,0.07); border-radius: 9px; border: 1px solid rgba(59,130,246,0.16); }
  .add-note-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; color: var(--text-dim); }
  .add-note-author-tag { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 5px; font-size: 11px; }
  .add-note-textarea { width: 100%; min-height: 52px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 12px; line-height: 1.5; font-family: inherit; resize: vertical; transition: border-color 0.14s var(--ease); }
  .add-note-textarea:focus { outline: none; border-color: #3b82f6; }
  .note-img-preview { margin-top: 8px; display: none; position: relative; width: fit-content; }
  .note-img-preview.show { display: block; }
  .note-img-preview img { max-width: 120px; max-height: 90px; border-radius: 7px; border: 1px solid var(--border); }
  .note-img-preview .rm { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; background: #ef4444; color: #fff; border: 0; cursor: pointer; font-size: 12px; }
  .add-note-actions { display: flex; justify-content: flex-end; margin-top: 8px; gap: 8px; align-items: center; }
  .add-note-hint { font-size: 10px; color: var(--text-faint); margin-right: auto; }
  .btn-attach { padding: 6px 10px; background: var(--surface); color: var(--text-dim); border: 1px solid var(--border); border-radius: 7px; font-size: 12px; cursor: pointer; font-family: inherit; transition: all 0.14s var(--ease); }
  .btn-attach:hover { background: var(--surface-hover); }
  .btn-add-note { padding: 6px 14px; background: #3b82f6; color: #fff; border: 0; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.14s var(--ease); }
  .btn-add-note:hover { background: #2563eb; }
  .empty-notes { color: var(--text-faint); font-size: 12px; padding: 18px 12px; text-align: center; font-style: italic; background: var(--surface); border-radius: 9px; border: 1px dashed var(--border); }
  .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .info-item { background: var(--surface); border-radius: 9px; padding: 10px 12px; }
  .info-item .k { font-size: 10px; color: var(--text-faint); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
  .info-item .v { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
  .select-input, .text-input, .date-input { width: 100%; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; color: var(--text); font-size: 13px; font-family: inherit; transition: border-color 0.14s var(--ease); }
  .select-input:disabled, .date-input:disabled { color: var(--text-dim); cursor: not-allowed; }
  .select-input { cursor: pointer; }
  .text-input:focus, .date-input:focus, .select-input:focus { outline: none; border-color: #3b82f6; }
  .form-row { margin-bottom: 14px; }
  .form-row label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 5px; font-weight: 600; }
  .form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .img-drop { border: 2px dashed var(--border); border-radius: 9px; padding: 16px; text-align: center; cursor: pointer; transition: all 0.15s var(--ease); }
  .img-drop:hover { border-color: #3b82f6; background: rgba(59,130,246,0.05); }
  .img-drop img { max-height: 120px; border-radius: 7px; }
  .img-drop .ph { color: var(--text-faint); font-size: 12px; }
  .cp-shape { display: flex; justify-content: center; padding: 12px 0 4px; }
  .cp-img { max-width: 180px; max-height: 150px; border-radius: 10px; border: 1px solid var(--border); }
  .cp-hint { text-align: center; font-size: 11px; color: var(--text-faint); margin-bottom: 14px; }
  .cp-info { background: var(--surface); border-radius: 10px; padding: 4px 14px; }
  .cp-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
  .cp-row:last-child { border-bottom: 0; }
  .cp-row .k { color: var(--text-dim); flex-shrink: 0; }
  .cp-row .v { color: var(--text); font-weight: 600; }
  .modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-soft); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface); flex-wrap: wrap; }
  .btn { padding: 8px 16px; border-radius: 7px; border: 0; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s var(--ease); font-family: inherit; }
  .btn:hover:not(:disabled) { transform: translateY(-1px); }
  .btn:disabled { opacity: 0.4; cursor: not-allowed; }
  .btn-ghost { background: var(--surface-2); color: var(--text-dim); }
  .btn-ghost:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
  .btn-primary { background: #3b82f6; color: #fff; }
  .btn-primary:hover:not(:disabled) { background: #2563eb; }
  .btn-success { background: #10b981; color: #fff; }
  .btn-success:hover:not(:disabled) { background: #059669; }
  .btn-danger { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
  .btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.25); }
  .btn-revive { background: #a855f7; color: #fff; }
  .btn-revive:hover:not(:disabled) { background: #9333ea; }
  .perm-warn { background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.25); color: #d97706; padding: 8px 12px; border-radius: 7px; font-size: 11px; margin-bottom: 12px; }
  .import-info { background: rgba(59,130,246,0.09); border: 1px solid rgba(59,130,246,0.22); border-radius: 9px; padding: 12px; font-size: 12px; color: #3b82f6; margin-bottom: 12px; line-height: 1.6; }
  .import-table, .dash-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .import-table th, .dash-table th { text-align: left; color: var(--text-faint); font-size: 10px; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--border); }
  .import-table td, .dash-table td { padding: 7px 8px; border-bottom: 1px solid var(--border-soft); color: var(--text); }
  .import-list { max-height: 300px; overflow-y: auto; }
  .import-empty { color: #ef4444; font-size: 13px; padding: 20px; text-align: center; }
  .dash-cards { display: flex; gap: 10px; margin-bottom: 6px; }
  .dash-card { flex: 1; background: var(--surface); border-radius: 11px; padding: 14px 8px; text-align: center; }
  .dash-card .num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
  .dash-card .lbl { font-size: 10px; color: var(--text-dim); margin-top: 5px; }
  .dash-section-title { font-size: 12px; color: var(--text); font-weight: 700; margin: 20px 0 8px; }
  .dash-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
  .dash-bar-label { width: 84px; color: var(--text-dim); flex-shrink: 0; }
  .dash-bar-track { flex: 1; height: 16px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
  .dash-bar-fill { display: block; height: 100%; border-radius: 8px; min-width: 2px; transition: width 0.4s var(--ease); }
  .dash-bar-num { width: 28px; text-align: right; color: var(--text-dim); flex-shrink: 0; }
  .dash-empty { color: #10b981; font-size: 12px; padding: 8px; }

  #img-viewer { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; z-index: 900; cursor: zoom-out; }
  #img-viewer.visible { display: flex; }
  #img-viewer img { max-width: 90vw; max-height: 90vh; border-radius: 10px; }

  #welcome { position: fixed; inset: 0; background: var(--overlay-bg); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(5px); opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease), visibility 0.3s; }
  #welcome.hidden { opacity: 0; visibility: hidden; }
  .welcome-card { background: var(--panel-solid); padding: 30px 38px; border-radius: 18px; max-width: 580px; border: 1px solid var(--border); box-shadow: var(--modal-shadow); transform: scale(1); transition: transform 0.3s var(--ease); }
  #welcome.hidden .welcome-card { transform: scale(0.96); }
  .welcome-card h1 { font-size: 22px; margin-bottom: 8px; background: linear-gradient(135deg,var(--text) 0%,#fb923c 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
  .welcome-card .sub { color: var(--text-dim); font-size: 13px; margin-bottom: 18px; }
  .welcome-card .tips { list-style: none; }
  .welcome-card .tips li { padding: 7px 0; font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 10px; }
  .welcome-card .tip-num { width: 22px; height: 22px; border-radius: 50%; background: rgba(251,146,60,0.2); color: #fb923c; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
  .welcome-card .cta { margin-top: 18px; width: 100%; background: #ef4444; color: #fff; border: 0; padding: 12px; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s var(--ease); }
  .welcome-card .cta:hover { background: #dc2626; transform: translateY(-1px); }
  #login-overlay { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 2000; }
  #login-overlay.hidden { display: none; }
  .login-card { text-align: center; max-width: 400px; width: 92vw; padding: 40px 32px; }
  .login-logo-img { height: 72px; width: auto; margin-bottom: 14px; }
  .login-card h1 { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
  .login-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 28px; }
  .login-form { text-align: left; }
  .login-field { margin-bottom: 14px; }
  .login-field label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; font-weight: 600; }
  .login-field input { width: 100%; padding: 11px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; color: var(--text); font-size: 14px; font-family: inherit; transition: border-color 0.14s var(--ease); }
  .login-field input:focus { outline: none; border-color: #3b82f6; }
  .btn-login { width: 100%; padding: 12px; background: #3b82f6; color: #fff; border: 0; border-radius: 9px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 6px; transition: all 0.16s var(--ease); font-family: inherit; }
  .btn-login:hover:not(:disabled) { background: #2563eb; transform: translateY(-1px); }
  .btn-login:disabled { opacity: 0.5; cursor: not-allowed; }
  .login-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--text-faint); font-size: 11px; }
  .login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
  .btn-feishu-login { width: 100%; padding: 11px 12px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.16s var(--ease); font-family: inherit; }
  .btn-feishu-login:hover:not(:disabled) { background: var(--surface-hover); border-color: rgba(51,112,255,0.55); transform: translateY(-1px); }
  .btn-feishu-login:disabled { opacity: 0.5; cursor: not-allowed; }
  .login-divider.hidden, .btn-feishu-login.hidden { display: none; }
  .login-error { color: #ef4444; font-size: 12px; margin-top: 10px; min-height: 16px; text-align: center; }
  #loading-overlay { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 3000; flex-direction: column; gap: 16px; }
  #loading-overlay.hidden { display: none; }
  .spin { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: #3b82f6; border-radius: 50%; animation: spin 0.8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .loading-text { color: var(--text-dim); font-size: 14px; }
  #btn-auto-play { position: fixed; bottom: 16px; left: 254px; background: var(--panel); color: #fb923c; border: 1px solid rgba(251,146,60,0.32); padding: 10px 16px; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 600; backdrop-filter: blur(14px); z-index: 90; transition: all 0.15s var(--ease); }
  #btn-auto-play:hover { background: rgba(251,146,60,0.15); }
  #btn-auto-play.playing { background: rgba(239,68,68,0.2); color: #ef4444; border-color: rgba(239,68,68,0.4); }

  /* ===== Zoom Controls ===== */
  #zoom-controls { position: fixed; right: 16px; bottom: 160px; display: flex; flex-direction: column; gap: 6px; z-index: 90; }
  #zoom-controls button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); backdrop-filter: blur(14px); color: var(--text); font-size: 18px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s var(--ease); line-height: 1; }
  #zoom-controls button:hover { background: var(--surface-2); border-color: var(--text-faint); }
  #zoom-controls button:active { transform: scale(0.92); }
  #zoom-controls .zoom-home { font-size: 14px; }
  .highlight-search { animation: searchPulse 1.5s ease-in-out infinite; transform-origin: 0 0; }
  @keyframes searchPulse {
    0% { scale: 1; filter: drop-shadow(0 0 0px rgba(59, 130, 246, 0.8)); }
    50% { scale: 1.4; filter: drop-shadow(0 0 20px rgba(59, 130, 246, 1)); }
    100% { scale: 1; filter: drop-shadow(0 0 0px rgba(59, 130, 246, 0.8)); }
  }

/* ========== 上新监控 · 补充样式 ========== */
.app-toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(16px); background: rgba(17, 21, 28, 0.94); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; letter-spacing: 0.2px; opacity: 0; pointer-events: none; transition: opacity 0.22s ease, transform 0.22s ease; z-index: 4000; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.app-toast.warn { background: rgba(239, 68, 68, 0.95); }
.app-toast.ok { background: rgba(16, 185, 129, 0.95); }
.warn-summary { font-size: 10px; color: #fb923c; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.node-desc { padding: 8px 12px; font-size: 11px; color: var(--text-dim); line-height: 1.5; }
.detail-top { display: flex; gap: 16px; align-items: flex-start; }
.detail-top .modal-thumb { cursor: default; }
.detail-top .info-grid { flex: 1; min-width: 0; }
.detail-long { background: var(--surface); border-radius: 9px; padding: 10px 12px; font-size: 13px; line-height: 1.7; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.dash-month-select { margin-left: 8px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 11px; }


/* ---------- 弹窗层级：详情(700) > 款明细(600) > 统计看板(500) ---------- */
#modal-overlay { z-index: 700; }
#owner-detail-overlay { z-index: 600; }

/* ---------- 看板负责人行可点击 ---------- */
.dash-table tbody tr.row-click { cursor: pointer; transition: background 0.15s var(--ease); }
.dash-table tbody tr.row-click:hover { background: var(--surface-hover); }
.dash-table tbody tr.row-click:hover td:first-child { color: var(--accent); }

/* ---------- 款明细弹窗 ---------- */
.od-body { max-height: 64vh; overflow-y: auto; }
.od-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.od-chip { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); }
.od-chip b { font-weight: 700; margin-left: 4px; }
.od-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.od-table th { position: sticky; top: 0; background: var(--panel-solid); text-align: left; color: var(--text-faint); font-size: 10px; text-transform: uppercase; padding: 8px; border-bottom: 1px solid var(--border); z-index: 1; }
.od-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-soft); color: var(--text); }
.od-table tbody tr { cursor: pointer; transition: background 0.15s var(--ease); }
.od-table tbody tr:hover { background: var(--surface-hover); }
.od-thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: block; }
.od-thumb-fallback { width: 38px; height: 38px; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 8px; color: var(--text-faint); text-align: center; line-height: 1.2; overflow: hidden; }
.od-code { font-weight: 600; white-space: nowrap; }
.od-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.od-empty { color: var(--text-faint); text-align: center; padding: 26px 0; font-size: 13px; }

/* 原生下拉弹层配色兜底 */
select option { background: var(--panel-solid); color: var(--text); }
