/* ============================================================
   DELTA // REPORT TERMINAL — Design System
   战术 HUD × Cyberpunk 暗色终端
   所有颜色/间距/动效曲线集中在 :root，改主题只动这一块。
   ============================================================ */

:root {
  /* ---- 底色层次 ---- */
  --bg-0: #05060a;
  --bg-1: #080a10;
  --bg-2: #0b0e15;
  --panel: #0e1118;
  --panel-2: #12161f;
  --panel-3: #171c27;

  /* ---- 线条 ---- */
  --line: rgba(150, 170, 200, 0.13);
  --line-2: rgba(160, 180, 210, 0.22);
  --line-3: rgba(180, 200, 230, 0.34);

  /* ---- 文本 ---- */
  --text: #e7ebf3;
  --text-2: #b0bacb;
  --text-dim: #8790a4;
  --text-mute: #5b6478;

  /* ---- 战术强调色 ---- */
  --amber: #ff8a2b;
  --amber-2: #ffb066;
  --amber-soft: rgba(255, 138, 43, 0.13);
  --amber-line: rgba(255, 138, 43, 0.42);
  --cyan: #3ad6e0;
  --cyan-soft: rgba(58, 214, 224, 0.12);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.12);
  --red: #ff4d5e;
  --red-soft: rgba(255, 77, 94, 0.13);
  --violet: #9b7bff;

  /* ---- 字号 ---- */
  --f-xs: 11px;
  --f-sm: 12.5px;
  --f-base: 14px;
  --f-md: 15.5px;
  --f-lg: 18px;
  --f-xl: 22px;
  --f-2xl: 28px;
  --f-3xl: 38px;
  --f-4xl: 52px;

  /* ---- 间距（8pt 网格） ---- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;
  --s-9: 56px; --s-10: 72px; --s-11: 96px;

  /* ---- 圆角 / 切角 ---- */
  --r-sm: 3px;
  --r: 6px;
  --r-lg: 10px;
  --cut: 12px;

  /* ---- 动效 ---- */
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --e-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 140ms;
  --t: 240ms;
  --t-slow: 480ms;

  /* ---- 字体 ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Bahnschrift", "DIN Alternate", "Oswald", "Chakra Petch",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "SF Mono", ui-monospace,
    Consolas, "Courier New", monospace;

  /* ---- 层级 ---- */
  --z-bg: 0; --z-content: 10; --z-bar: 40; --z-tab: 45;
  --z-toast: 80; --z-overlay: 90; --z-modal: 95;

  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 18px 48px -12px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 0 1px rgba(255, 138, 43, 0.28), 0 8px 32px -8px rgba(255, 138, 43, 0.35);
  --hairline-top: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================================ RESET */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100dvh;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--f-base);
  line-height: 1.55;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: var(--amber-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

::selection { background: rgba(255, 138, 43, 0.3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 细滚动条 */
* { scrollbar-width: thin; scrollbar-color: rgba(150, 170, 200, 0.25) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb {
  background: rgba(150, 170, 200, 0.22);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(180, 200, 230, 0.38); background-clip: content-box; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 999;
  padding: 10px 16px; background: var(--amber); color: #140a02;
  font-weight: 700; border-radius: var(--r); transition: top var(--t) var(--e-out);
}
.skip-link:focus { top: 12px; }

/* ============================================================ 背景层 */
.bg-grid, .bg-sweep, .bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: var(--z-bg);
}
.bg-grid {
  background-image:
    linear-gradient(rgba(120, 150, 190, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 190, 0.045) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 20%, transparent 78%);
}
.bg-sweep {
  background:
    radial-gradient(ellipse 60% 40% at 15% -5%, rgba(255, 138, 43, 0.14), transparent 70%),
    radial-gradient(ellipse 55% 45% at 88% 8%, rgba(58, 214, 224, 0.09), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(155, 123, 255, 0.07), transparent 70%);
  animation: sweepDrift 26s ease-in-out infinite alternate;
}
@keyframes sweepDrift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1.02); }
  to   { transform: translate3d(1.5%, 1%, 0) scale(1.06); }
}
.bg-noise {
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ============================================================ 排版工具 */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.display { font-family: var(--font-display); letter-spacing: 0.02em; }
.dim { color: var(--text-dim); }
.mute { color: var(--text-mute); }
.up { text-transform: uppercase; letter-spacing: 0.14em; font-size: var(--f-xs); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--amber);
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.7;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--f-lg);
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: var(--s-3);
}
.section-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

/* ============================================================ 命令栏 */
.cmdbar {
  position: sticky; top: 0; z-index: var(--z-bar);
  height: 60px;
  display: flex; align-items: center; gap: var(--s-5);
  padding: 0 clamp(14px, 3vw, 32px);
  background: rgba(6, 8, 13, 0.82);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.cmdbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber-line) 22%, rgba(58,214,224,0.35) 55%, transparent);
  opacity: 0.85;
}
.cmdbar__brand { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.brandmark {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  color: var(--amber);
  background: linear-gradient(160deg, rgba(255,138,43,0.16), rgba(255,138,43,0.02));
  border: 1px solid var(--amber-line);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.brandtype {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--font-display);
  font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase;
  white-space: nowrap;
}
.brandtype b { color: #fff; font-weight: 800; }
.brandtype__sep { color: var(--amber); opacity: 0.85; }
.brandtype span:last-child { color: var(--text-dim); font-size: 12px; letter-spacing: 0.2em; }
.brand-chip {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 6px; color: var(--text-mute);
  border: 1px solid var(--line); border-radius: 2px;
  white-space: nowrap;
}

.cmdbar__status {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--f-xs); color: var(--text-dim);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.015);
  white-space: nowrap;
  overflow: hidden;
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: pulseDot 2.4s var(--e-in-out) infinite;
  flex: none;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); opacity: 1; }
  50% { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); opacity: 0.72; }
}

.cmdbar__right { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }

.credits-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  font-size: var(--f-xs); color: var(--text-dim);
  border: 1px solid var(--line-2);
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  transition: border-color var(--t) var(--e-out), color var(--t) var(--e-out), transform var(--t) var(--e-out);
}
.credits-chip:hover { border-color: var(--amber-line); color: var(--text); }
.credits-chip:active { transform: scale(0.97); }
.credits-chip b { color: var(--amber); font-size: 13px; font-weight: 700; }
.credits-chip.is-bumped b { animation: bump 520ms var(--e-spring); }
@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); color: #fff; }
  100% { transform: scale(1); }
}

/* ---- 用户菜单 ---- */
.usermenu { position: relative; }
.usermenu__trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px 0 4px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255,255,255,0.02);
  transition: border-color var(--t) var(--e-out), background var(--t) var(--e-out);
}
.usermenu__trigger:hover { border-color: var(--line-3); background: rgba(255,255,255,0.05); }
.avatar {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #10131a;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  flex: none;
}
.usermenu__name {
  font-size: 12.5px; color: var(--text-2); max-width: 96px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chev { color: var(--text-mute); transition: transform var(--t) var(--e-out); }
.usermenu__trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.usermenu__panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 190px; padding: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  z-index: 60;
  animation: menuIn 180ms var(--e-out) both;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--text-2); text-align: left;
  transition: background var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}
.menu-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.menu-item--danger:hover { background: var(--red-soft); color: #ff8a95; }
.menu-div { height: 1px; margin: 5px 4px; background: var(--line); }

/* ============================================================ 主区域 */
#main {
  position: relative; z-index: var(--z-content);
  min-height: calc(100dvh - 60px);
  padding-bottom: 96px;
}
.shell {
  width: min(1240px, 100% - clamp(28px, 6vw, 72px));
  margin-inline: auto;
}

.sitefoot {
  position: relative; z-index: var(--z-content);
  border-top: 1px solid var(--line);
  padding: var(--s-5) 0 var(--s-6);
  margin-top: var(--s-8);
}
.sitefoot__row {
  width: min(1240px, 100% - clamp(28px, 6vw, 72px));
  margin-inline: auto;
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  justify-content: space-between;
  font-size: 10.5px; color: var(--text-mute);
}

/* ============================================================ 面板 */
.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0) 42%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--hairline-top);
}
.panel--flush { background: var(--panel); }
.panel__head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 13px var(--s-4);
  border-bottom: 1px solid var(--line);
}
.panel__title {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2);
}
.panel__body { padding: var(--s-4); }
.panel__foot { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); }

/* HUD 角标 */
.hud { position: relative; }
.hud::before, .hud::after {
  content: ""; position: absolute; width: 12px; height: 12px;
  border: 1px solid var(--amber-line); pointer-events: none;
  opacity: 0.9;
}
.hud::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ============================================================ 按钮 */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  font-size: 13.5px; font-weight: 650; letter-spacing: 0.03em;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  color: var(--text);
  transition: background var(--t) var(--e-out), border-color var(--t) var(--e-out),
              transform var(--t) var(--e-out), color var(--t) var(--e-out), box-shadow var(--t) var(--e-out);
  overflow: hidden;
  white-space: nowrap;
}
.btn:hover { border-color: var(--line-3); background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)); }
.btn:active { transform: translateY(1px) scale(0.995); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45; cursor: not-allowed; transform: none;
}
.btn--primary {
  border: 0;
  color: #180b01;
  background: linear-gradient(135deg, var(--amber-2) 0%, var(--amber) 52%, #ff6a3d 100%);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  box-shadow: 0 6px 22px -10px rgba(255, 138, 43, 0.75);
  font-weight: 750;
}
.btn--primary:hover {
  background: linear-gradient(135deg, #ffc188 0%, var(--amber-2) 52%, #ff7b4d 100%);
  box-shadow: 0 8px 30px -8px rgba(255, 138, 43, 0.9);
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.5) 46%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 620ms var(--e-out);
}
.btn--primary:hover::after { transform: translateX(120%); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,0.04); }
.btn--danger { border-color: rgba(255,77,94,0.4); color: #ff8892; }
.btn--danger:hover { background: var(--red-soft); border-color: rgba(255,77,94,0.65); }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 13px; font-size: 12.5px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 15px; }
.btn__spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================ 表单 */
.field { display: grid; gap: 7px; }
.field__label {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  letter-spacing: 0.03em;
}
.field__label .req { color: var(--amber); }
.field__hint { font-size: 11.5px; color: var(--text-mute); line-height: 1.5; }
.field__error {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #ff8a95;
  animation: errIn 200ms var(--e-out);
}
@keyframes errIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--text);
  background: rgba(5, 7, 11, 0.72);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-size: 14px;
  transition: border-color var(--t) var(--e-out), box-shadow var(--t) var(--e-out), background var(--t) var(--e-out);
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--amber-line);
  background: rgba(255, 138, 43, 0.035);
  box-shadow: 0 0 0 3px rgba(255, 138, 43, 0.13);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: rgba(255, 77, 94, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 77, 94, 0.12);
}
.textarea { min-height: 108px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238790a4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
.select option { background: var(--panel-2); color: var(--text); }

.input-with-unit { position: relative; }
.input-with-unit .unit {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
  pointer-events: none;
}

.char-count {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-mute);
  margin-left: auto;
}
.char-count.is-warn { color: var(--amber); }
.char-count.is-over { color: var(--red); }

/* ---- 分段控件 ---- */
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 6px;
  padding: 4px;
  background: rgba(5,7,11,0.6);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.segmented button {
  flex: 0 0 auto; min-width: 54px;
  padding: 9px 14px; border-radius: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  transition: color var(--t) var(--e-out), background var(--t) var(--e-out);
  min-height: 38px;
}

/* ---- 次数步进器 ---- */
.times-stepper {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 4px;
  background: rgba(5,7,11,0.6);
  border: 1px solid var(--line);
  border-radius: var(--r);
  max-width: 100%;
}
.times-step {
  width: 38px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 4px;
  font-size: 17px; font-weight: 600; line-height: 1;
  color: var(--text-dim);
  transition: background var(--t) var(--e-out), color var(--t) var(--e-out);
}
.times-step:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); color: var(--amber-2); }
.times-step:disabled { opacity: 0.3; cursor: not-allowed; }
.times-input {
  width: 84px; height: 36px; flex: none;
  text-align: center;
  font-family: var(--font-mono); font-size: 16px; font-weight: 700;
  color: var(--amber-2);
  background: none; border: 0; outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.times-input::-webkit-outer-spin-button,
.times-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.segmented button:hover { color: var(--text-2); background: rgba(255,255,255,0.03); }
.segmented button[aria-pressed="true"] {
  color: #180b01;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 4px 14px -8px rgba(255,138,43,0.8);
}

/* ---- 勾选 ---- */
.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; color: var(--text-dim); line-height: 1.55;
  cursor: pointer;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: none; width: 18px; height: 18px; margin-top: 1px;
  border: 1px solid var(--line-3); border-radius: 3px;
  display: grid; place-items: center;
  background: rgba(5,7,11,0.7);
  transition: background var(--t) var(--e-out), border-color var(--t) var(--e-out);
}
.check__box svg { opacity: 0; transform: scale(0.6); transition: opacity 140ms var(--e-out), transform 200ms var(--e-spring); stroke: #180b01; }
.check input:checked + .check__box { background: var(--amber); border-color: var(--amber); }
.check input:checked + .check__box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--amber); outline-offset: 2px; }
.check a { color: var(--amber-2); }

/* ============================================================ 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.04em;
  border-radius: 3px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--live { color: var(--green); background: var(--green-soft); border-color: rgba(52,211,153,0.28); }
.badge--wait { color: var(--amber-2); background: var(--amber-soft); border-color: rgba(255,138,43,0.3); }
.badge--review { color: var(--cyan); background: var(--cyan-soft); border-color: rgba(58,214,224,0.3); }
.badge--done { color: #8ef0c4; background: rgba(52,211,153,0.16); border-color: rgba(52,211,153,0.4); }
.badge--crit { color: #ff9aa3; background: var(--red-soft); border-color: rgba(255,77,94,0.34); }
.badge--neutral { color: var(--text-dim); background: rgba(255,255,255,0.04); border-color: var(--line-2); }
.badge--violet { color: #c3b1ff; background: rgba(155,123,255,0.13); border-color: rgba(155,123,255,0.3); }

.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.dot--pulse { animation: pulseDot 2s var(--e-in-out) infinite; }

/* ============================================================ 统计块 */
.stat {
  display: grid; gap: 4px;
  padding: var(--s-4);
  background: linear-gradient(180deg, rgba(255,255,255,0.024), transparent);
  border: 1px solid var(--line);
  border-radius: var(--r);
  position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 100%;
  background: var(--amber); opacity: 0.5;
}
.stat__k { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); font-family: var(--font-mono); }
.stat__v { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: 0.01em; line-height: 1.15; }
.stat__v small { font-size: 11px; font-family: var(--font-mono); color: var(--text-dim); font-weight: 500; margin-left: 3px; }
.stat__sub { font-size: 11px; color: var(--text-mute); }

/* ============================================================ Toast */
.toast-host {
  position: fixed; right: clamp(12px, 3vw, 26px); bottom: clamp(78px, 10vh, 28px);
  z-index: var(--z-toast);
  display: grid; gap: 8px; justify-items: end;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  max-width: min(360px, calc(100vw - 28px));
  padding: 11px 14px;
  background: rgba(14, 17, 24, 0.96);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--amber);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(10px);
  font-size: 12.5px; color: var(--text-2);
  animation: toastIn 260ms var(--e-out) both;
  pointer-events: auto;
}
.toast.is-out { animation: toastOut 200ms var(--e-in-out) both; }
.toast--ok { border-left-color: var(--green); }
.toast--err { border-left-color: var(--red); }
.toast--info { border-left-color: var(--cyan); }
.toast__title { font-weight: 700; color: var(--text); font-size: 12.5px; margin-bottom: 1px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px) scale(0.98); } }

/* ============================================================ 遮罩 / 模态 */
.overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: grid; place-items: center;
  padding: clamp(12px, 4vw, 40px);
  background: rgba(3, 4, 8, 0.86);
  backdrop-filter: blur(10px) saturate(0.9);
  -webkit-backdrop-filter: blur(10px) saturate(0.9);
  animation: overlayIn 240ms var(--e-out) both;
  overflow-y: auto;
}
.overlay.is-out { animation: overlayOut 200ms var(--e-in-out) both; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayOut { to { opacity: 0; } }

.modal {
  position: relative;
  width: min(560px, 100%);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2), 0 0 80px -30px rgba(255,138,43,0.4);
  animation: modalIn 320ms var(--e-out) both;
  overflow: hidden;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.modal__head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
}
.modal__title { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0.05em; }
.modal__body { padding: var(--s-5); }
.modal__foot {
  display: flex; gap: var(--s-3); justify-content: flex-end;
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
}
.modal__close {
  margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--r-sm); color: var(--text-mute);
  transition: color var(--t) var(--e-out), background var(--t) var(--e-out);
}
.modal__close:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* ============================================================ 空状态 */
.empty {
  display: grid; gap: var(--s-3); place-items: center;
  padding: var(--s-9) var(--s-4);
  text-align: center;
}
.empty__icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  color: var(--text-mute);
  border: 1px dashed var(--line-2); border-radius: 50%;
}
.empty__t { font-family: var(--font-display); font-size: 14px; color: var(--text-2); letter-spacing: 0.04em; }
.empty__d { font-size: 12px; color: var(--text-mute); max-width: 34ch; line-height: 1.6; }

/* ============================================================ 骨架 */
.sk {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%;
  animation: sk 1.4s ease infinite;
  border-radius: 3px;
}
@keyframes sk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

/* ============================================================ 底部 Tab（移动端） */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-tab);
  display: none;
  padding: 6px max(10px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));
  background: rgba(8, 10, 15, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.tab {
  display: grid; place-items: center; gap: 3px;
  padding: 7px 4px; border-radius: var(--r-sm);
  font-size: 10.5px; color: var(--text-mute);
  min-height: 48px;
  transition: color var(--t) var(--e-out), background var(--t) var(--e-out);
}
.tab:hover { color: var(--text-2); }
.tab.is-active { color: var(--amber); background: var(--amber-soft); }
.tab--primary { color: var(--amber-2); }
.tab--primary svg {
  padding: 3px; border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  color: #180b01; width: 26px; height: 26px;
  box-shadow: 0 4px 14px -6px rgba(255,138,43,0.9);
}

/* ============================================================ 响应式 */
@media (max-width: 900px) {
  .cmdbar__status { display: none; }
  .brandtype span:last-child { display: none; }
  .brand-chip { display: none; }
}
@media (max-width: 720px) {
  .cmdbar { height: 54px; }
  .tabbar { display: grid; }
  .sitefoot { padding-bottom: 84px; }
  #main { padding-bottom: 88px; }
  .usermenu__name { display: none; }
  .credits-chip span { display: none; }
  .toast-host { bottom: 84px; }
}
@media (max-width: 420px) {
  .brandtype { font-size: 13px; }
}

/* ============================================================ 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .bg-sweep { animation: none; }
  .pulse-dot, .dot--pulse { animation: none; }
}
