/* 主题变量:默认深色,<html data-theme="light"> 时切到浅色。所有页面共用。 */
:root {
  --bg:#0f1115; --fg:#e6e6e6; --muted:#8b93a1; --faint:#6b7280;
  --panel:#181b21; --hover:#141820; --line:#1d2129; --line2:#161a21;
  --border:#2a2f3a; --border-hi:#3b4252; --sel:#1e3a8a40; --shadow:#0008;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg:#ffffff; --fg:#1a1d23; --muted:#5b6472; --faint:#8a93a0;
  --panel:#f5f6f8; --hover:#f3f6fb; --line:#e6e8ec; --line2:#eef0f3;
  --border:#d0d5dd; --border-hi:#98a2b3; --sel:#dbeafe; --shadow:#0002;
  color-scheme: light;
}
/* 浅色下的状态标签:深色字 + 浅底,保证看得清 */
:root[data-theme="light"] .status-confirmed { background:#dbeafe; color:#1d4ed8; }
:root[data-theme="light"] .status-shipped { background:#dbeafe; color:#1e40af; }
:root[data-theme="light"] .status-partially_shipped,
:root[data-theme="light"] .status-out_for_delivery { background:#fef3c7; color:#92400e; }
:root[data-theme="light"] .status-partially_delivered { background:#ecfccb; color:#3f6212; }
:root[data-theme="light"] .status-delivered { background:#dcfce7; color:#166534; }
:root[data-theme="light"] .status-cancelled { background:#fee2e2; color:#b91c1c; }
:root[data-theme="light"] .status-unknown { background:#e5e7eb; color:#4b5563; }
:root[data-theme="light"] .tag-US { background:#dbeafe; color:#1d4ed8; }
:root[data-theme="light"] .tag-CA { background:#fee2e2; color:#b91c1c; }
:root[data-theme="light"] .notice { background:#dcfce7; color:#166534; }
:root[data-theme="light"] .error, :root[data-theme="light"] .err { color:#b91c1c; }
:root[data-theme="light"] .link a { color:#2563eb; }
:root[data-theme="light"] .tag-manual { background:#fef3c7; color:#92400e; }
:root[data-theme="light"] .cell-fill { background:#dcfce7; }
:root[data-theme="light"] .cell-conflict { background:#fef3c7; }
:root[data-theme="light"] .imwarn { color:#92400e; }
.theme-fab { position:fixed; top:14px; right:16px; width:auto !important; margin:0 !important; padding:6px 12px !important;
  background:var(--panel) !important; color:var(--fg) !important; border:1px solid var(--border) !important;
  border-radius:6px; font-size:12px !important; cursor:pointer; }
