/* ================= 原神风格设计系统 ================= */
:root {
  --bg-0: #0f1119;
  --bg-1: #161925;
  --bg-2: #1e2230;
  --panel: rgba(35, 39, 53, 0.86);
  --panel-solid: #232735;
  --panel-2: #2b3042;
  --panel-3: #343a4e;

  --gold: #d3bc8e;
  --gold-bright: #ffe6b0;
  --gold-deep: #a8894f;
  --gold-glow: rgba(211, 188, 142, 0.35);

  --text: #ece5d8;
  --text-2: #c3c8d4;
  --muted: #8b92a3;
  --line: rgba(211, 188, 142, 0.18);
  --line-soft: rgba(255, 255, 255, 0.06);

  --danger: #ff6b6b;
  --danger-deep: #d3454b;
  --warn: #ffbe5c;
  --ok: #86e0a8;
  --info: #7fc8f8;
  --anemo: #74c2a8;
  --geo: #fab632;
  --electro: #af8ec1;
  --hydro: #4cc2f1;
  --pyro: #ef7938;
  --cryo: #9fd6e3;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(.22, .8, .26, 1);
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  --font-title: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
.hidden { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(211,188,142,.22); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(211,188,142,.4); }

/* ================= 背景 ================= */
#bg-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -10%, #26304a 0%, transparent 60%),
    radial-gradient(900px 600px at 8% 100%, #1d2738 0%, transparent 62%),
    linear-gradient(160deg, #0e1018 0%, #141826 45%, #10131c 100%);
}
.bg-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.g1 { width: 620px; height: 620px; left: -140px; top: -180px; background: radial-gradient(circle, rgba(211,188,142,.16), transparent 65%); animation: float1 26s ease-in-out infinite; }
.g2 { width: 520px; height: 520px; right: -120px; top: 22%; background: radial-gradient(circle, rgba(122,168,255,.12), transparent 65%); animation: float2 32s ease-in-out infinite; }
.g3 { width: 700px; height: 700px; left: 32%; bottom: -420px; background: radial-gradient(circle, rgba(175,142,193,.12), transparent 65%); animation: float1 38s ease-in-out infinite reverse; }
.bg-stars { position: absolute; inset: 0; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 28% 62%, rgba(255,255,255,.4), transparent),
    radial-gradient(1.4px 1.4px at 44% 28%, rgba(255,230,176,.55), transparent),
    radial-gradient(1px 1px at 62% 74%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.2px 1.2px at 78% 34%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 88% 66%, rgba(255,230,176,.4), transparent),
    radial-gradient(1px 1px at 36% 88%, rgba(255,255,255,.3), transparent),
    radial-gradient(1px 1px at 70% 10%, rgba(255,255,255,.45), transparent);
  animation: twinkle 7s ease-in-out infinite alternate;
}
.bg-vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.55) 100%); }

@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.08); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px, 24px) scale(1.12); } }
@keyframes twinkle { from { opacity: .35; } to { opacity: .7; } }

/* ================= 登录 ================= */
.login-screen { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; }
.login-panel {
  position: relative; width: 400px; max-width: 100%; padding: 42px 38px 30px;
  background: linear-gradient(170deg, rgba(43,48,66,.96), rgba(28,32,44,.97));
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6), inset 0 0 60px rgba(211,188,142,.05);
  animation: panelIn .7s var(--ease) both;
}
.login-panel::before, .login-panel::after {
  content: ""; position: absolute; width: 26px; height: 26px; border: 1px solid var(--gold); opacity: .65;
}
.login-panel::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.login-panel::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
@keyframes panelIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.login-crest { width: 64px; height: 64px; margin: 0 auto 14px; animation: crestSpin 18s linear infinite; }
.crest-svg { width: 100%; height: 100%; filter: drop-shadow(0 0 18px rgba(211,188,142,.5)); }
@keyframes crestSpin { to { transform: rotate(360deg); } }
.login-title { font-family: var(--font-title); font-size: 26px; letter-spacing: 6px; text-align: center; margin: 0 0 6px;
  background: linear-gradient(180deg, #fff6e2, #d3bc8e 60%, #a8894f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-sub { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: 2px; margin: 0 0 28px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; color: var(--gold); letter-spacing: 2px; margin-bottom: 7px; }
.field input {
  width: 100%; padding: 11px 13px; background: rgba(15,17,25,.7); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm); outline: none; font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(211,188,142,.12); }
.login-error { min-height: 18px; color: var(--danger); font-size: 12px; margin-bottom: 8px; }
.login-foot { margin-top: 20px; text-align: center; color: #5f6675; font-size: 11px; letter-spacing: 2px; }

/* ================= 布局 ================= */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 224px 1fr; height: 100vh; }

.sidebar {
  display: flex; flex-direction: column; padding: 22px 14px 14px;
  background: linear-gradient(180deg, rgba(24,28,40,.92), rgba(17,20,29,.96));
  border-right: 1px solid var(--line); backdrop-filter: blur(14px);
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 20px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; font-family: var(--font-title); font-size: 19px;
  color: #241d0f; background: linear-gradient(150deg, #ffe9bd, #c8a96d); border-radius: 8px;
  box-shadow: 0 0 20px rgba(211,188,142,.35);
}
.brand-name { font-size: 14px; letter-spacing: 1px; color: var(--gold-bright); }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 3px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  color: var(--text-2); text-decoration: none; border-radius: var(--r-sm); font-size: 13.5px; letter-spacing: .5px;
  transition: background .22s var(--ease), color .22s, transform .22s;
}
.nav-item::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  transform: translateY(-50%); border-radius: 3px; transition: height .25s var(--ease);
}
.nav-item:hover { background: rgba(211,188,142,.07); color: var(--text); transform: translateX(2px); }
.nav-item.active { background: linear-gradient(90deg, rgba(211,188,142,.16), rgba(211,188,142,.02)); color: var(--gold-bright); }
.nav-item.active::before { height: 22px; }
.nav-ico { width: 18px; text-align: center; font-size: 14px; opacity: .9; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px;
  display: grid; place-items: center; background: rgba(211,188,142,.18); color: var(--gold-bright);
  border: 1px solid rgba(211,188,142,.3);
}
.nav-badge.hot { background: linear-gradient(140deg, #ff9d5c, #e2574c); border-color: #ffb27a; color: #fff; animation: pulseBadge 2s infinite; }
@keyframes pulseBadge { 0%,100% { box-shadow: 0 0 0 0 rgba(255,120,80,.4); } 50% { box-shadow: 0 0 0 6px rgba(255,120,80,0); } }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line-soft); }
.conn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.conn-dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulseDot 2.4s infinite; }
.conn-dot.err { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar {
  height: 68px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(18,21,31,.55); backdrop-filter: blur(10px);
}
.topbar-left { display: flex; align-items: baseline; gap: 12px; }
.topbar h2 { margin: 0; font-family: var(--font-title); font-size: 19px; letter-spacing: 3px; font-weight: 500; color: var(--gold-bright); }
.view-sub { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.scan-state { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 5px 11px; border: 1px solid var(--line-soft); border-radius: 20px; }
.scan-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulseDot 2s infinite; }
.scan-state.paused i { background: var(--warn); }
.scan-state.err i { background: var(--danger); animation: none; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-soft); border-radius: 30px; background: rgba(255,255,255,.02); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: linear-gradient(150deg, #4a5470, #2b3244); border: 1px solid var(--gold); color: var(--gold-bright); }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta span { font-size: 12.5px; }
.user-meta em { font-size: 10.5px; color: var(--muted); font-style: normal; letter-spacing: 1px; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; background: transparent; border: 1px solid var(--line-soft); color: var(--muted); cursor: pointer; transition: .2s; }
.icon-btn:hover { color: var(--danger); border-color: rgba(255,107,107,.4); background: rgba(255,107,107,.08); }

.view { flex: 1; overflow: auto; padding: 22px 26px 40px; position: relative; }
.view-enter { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ================= 通用组件 ================= */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; font-size: 13px; font-family: var(--font); letter-spacing: 1px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text-2);
  border-radius: var(--r-sm); transition: all .22s var(--ease); overflow: hidden; white-space: nowrap;
}
.btn:hover { border-color: rgba(211,188,142,.5); color: var(--gold-bright); background: rgba(211,188,142,.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-gold {
  background: linear-gradient(160deg, #f4e3bb, #d3bc8e 45%, #b99a63); color: #2a2114; border-color: #e8d3a6; font-weight: 600;
  box-shadow: 0 6px 18px rgba(211,188,142,.22);
}
.btn-gold:hover { background: linear-gradient(160deg, #fff3d2, #e2cda2 45%, #c9aa72); color: #241c10; box-shadow: 0 8px 24px rgba(211,188,142,.35); }
.btn-danger { border-color: rgba(255,107,107,.35); color: #ff9b9b; }
.btn-danger:hover { background: rgba(255,107,107,.12); border-color: var(--danger); color: #ffd0d0; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; padding: 12px; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-magic::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn-magic:hover::after { animation: sheen .8s ease; }
@keyframes sheen { to { transform: translateX(120%); } }

.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  backdrop-filter: blur(8px); box-shadow: 0 10px 34px rgba(0,0,0,.28);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.panel-title { font-size: 14px; letter-spacing: 2px; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: "◆"; font-size: 8px; color: var(--gold-deep); }
.panel-body { padding: 16px 18px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 11px; letter-spacing: .5px;
  border: 1px solid rgba(211,188,142,.28); background: rgba(211,188,142,.1); color: var(--gold-bright);
}
.tag-danger { border-color: rgba(255,107,107,.35); background: rgba(255,107,107,.1); color: #ffb0b0; }
.tag-ok { border-color: rgba(134,224,168,.35); background: rgba(134,224,168,.1); color: #a9f0c6; }
.tag-info { border-color: rgba(127,200,248,.35); background: rgba(127,200,248,.1); color: #b3e2ff; }
.tag-warn { border-color: rgba(255,190,92,.35); background: rgba(255,190,92,.1); color: #ffd9a0; }
.tag-mute { border-color: var(--line-soft); background: rgba(255,255,255,.03); color: var(--muted); }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 70px 20px; color: var(--muted); }
.empty-mark { font-size: 40px; opacity: .35; animation: floatSoft 4s ease-in-out infinite; }
@keyframes floatSoft { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ================= 待审核 ================= */
.queue-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; background: rgba(15,17,25,.6); border: 1px solid var(--line-soft); border-radius: 8px; }
.seg button { padding: 6px 16px; font-size: 12.5px; background: transparent; border: 0; color: var(--muted); cursor: pointer; border-radius: 6px; transition: .2s; letter-spacing: 1px; }
.seg button.on { background: linear-gradient(150deg, rgba(211,188,142,.9), rgba(185,154,99,.9)); color: #241d10; font-weight: 600; }
.toolbar-spacer { flex: 1; }

.queue-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.q-card {
  position: relative; padding: 22px 24px; min-height: 420px;
  animation: cardIn .42s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.q-card.leaving { animation: cardOut .3s var(--ease) forwards; }
@keyframes cardOut { to { opacity: 0; transform: translateX(40px) scale(.97); } }

.q-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.q-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 17px;
  background: linear-gradient(150deg, #3b4560, #262c3d); border: 1px solid var(--line); color: var(--gold); }
.q-author { font-size: 15px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.q-meta { display: flex; gap: 12px; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.q-head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.q-index { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

.q-title { font-family: var(--font-title); font-size: 21px; line-height: 1.5; margin: 0 0 12px; color: #fdf8ec; letter-spacing: .5px; }
.q-content { font-size: 14px; line-height: 1.85; color: var(--text-2); white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }
.q-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 16px; }
.q-images img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-soft); cursor: zoom-in; transition: transform .3s var(--ease), box-shadow .3s; }
.q-images img:hover { transform: scale(1.03); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.q-foot { display: flex; gap: 16px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }

/* 处置栏 */
.act-panel { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.act-group { padding: 14px; }
.act-group-title { font-size: 11.5px; letter-spacing: 2px; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.act-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.act-opt {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid transparent; transition: all .18s var(--ease); font-size: 13px; color: var(--text-2); position: relative;
}
.act-opt:hover { background: rgba(255,255,255,.04); border-color: var(--line-soft); }
.act-opt.on { background: rgba(211,188,142,.12); border-color: rgba(211,188,142,.45); color: var(--gold-bright); }
.act-opt.on.danger { background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.5); color: #ffc0c0; }
.act-key {
  width: 20px; height: 20px; flex: none; display: grid; place-items: center; font-size: 11px; border-radius: 4px;
  background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid var(--line-soft);
}
.act-opt.on .act-key { background: var(--gold); color: #241d10; border-color: var(--gold-bright); }
.act-opt.on.danger .act-key { background: var(--danger); color: #fff; border-color: #ffb0b0; }
.act-desc { font-size: 10.5px; color: var(--muted); margin-left: auto; }

.tag-input { display: none; padding: 8px 0 2px; }
.tag-input.show { display: block; animation: fadeSlide .25s var(--ease); }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tag-input input, .tag-input textarea {
  width: 100%; padding: 8px 10px; background: rgba(15,17,25,.65); border: 1px solid var(--line-soft);
  border-radius: 6px; color: var(--text); font-size: 12.5px; font-family: var(--font); outline: none; resize: vertical;
}
.tag-input input:focus, .tag-input textarea:focus { border-color: var(--gold); }
.tag-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.tag-presets button { padding: 3px 9px; font-size: 11px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); color: var(--muted); cursor: pointer; }
.tag-presets button:hover { color: var(--gold-bright); border-color: var(--gold); }

.summary-bar { padding: 13px 15px; border-radius: 8px; background: rgba(15,17,25,.55); border: 1px dashed rgba(211,188,142,.3); font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.summary-bar b { color: var(--gold-bright); font-weight: 600; }
.summary-bar .warn { color: var(--warn); }
.summary-bar .danger { color: var(--danger); }
.submit-row { display: flex; flex-direction: column; gap: 8px; }
.submit-hint { font-size: 11px; color: var(--muted); text-align: center; letter-spacing: 1px; }
.detail-box { margin-top: 10px; padding: 10px 12px; border-radius: 7px; background: rgba(15,17,25,.55); border: 1px solid var(--line-soft); font-size: 12px; line-height: 1.8; color: var(--text-2); animation: fadeSlide .3s var(--ease); }
.detail-box .k { color: var(--muted); margin-right: 8px; }
.detail-box .v { color: var(--gold-bright); }
.detail-box .loading { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.spinner { width: 12px; height: 12px; border: 2px solid rgba(211,188,142,.25); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.stage-hint { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 12px; color: var(--muted); border: 1px dashed var(--line-soft); border-radius: 8px; }

/* ================= 表格 ================= */
.table-wrap { overflow: auto; border-radius: var(--r-md); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th {
  position: sticky; top: 0; z-index: 2; text-align: left; padding: 11px 12px; font-weight: 500; font-size: 11.5px;
  letter-spacing: 1.5px; color: var(--muted); background: #1b1f2c; border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); vertical-align: middle; }
table.data tbody tr { transition: background .18s; animation: rowIn .35s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
table.data tbody tr:hover { background: rgba(211,188,142,.05); }
table.data .cell-title { max-width: 420px; color: var(--text); }
table.data .clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data .muted { color: var(--muted); font-size: 12px; }
table.data .row-actions { display: flex; gap: 6px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filter-item { display: flex; flex-direction: column; gap: 6px; }
.filter-item label { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; }
.input, .select {
  padding: 8px 11px; background: rgba(15,17,25,.65); border: 1px solid var(--line-soft); border-radius: 6px;
  color: var(--text); font-size: 13px; outline: none; font-family: var(--font); transition: .2s; min-width: 130px;
}
.input:focus, .select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(211,188,142,.1); }
.select option { background: #1c2030; }
.checkbox { width: 15px; height: 15px; accent-color: var(--gold); cursor: pointer; }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px 0; font-size: 12px; color: var(--muted); }
.pager-btns { display: flex; gap: 8px; }

/* ================= 数据看板 ================= */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; padding: 18px 20px; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(211,188,142,.16), transparent 70%); }
.stat-label { font-size: 11.5px; color: var(--muted); letter-spacing: 2px; margin-bottom: 10px; }
.stat-value { font-family: var(--font-title); font-size: 34px; line-height: 1; color: var(--gold-bright); letter-spacing: 1px; }
.stat-value.small { font-size: 26px; }
.stat-delta { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.stat-delta .up { color: var(--danger); }
.stat-delta .down { color: var(--ok); }
.chart-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.chart-box { padding: 18px; min-height: 260px; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.bar-rect { transition: opacity .2s; cursor: pointer; }
.bar-rect:hover { opacity: .75; }
.donut-center { font-family: var(--font-title); fill: var(--gold-bright); }

/* ================= 弹窗 ================= */
.modal-mask { position: fixed; inset: 0; z-index: 60; background: rgba(6,8,14,.66); backdrop-filter: blur(6px); display: grid; place-items: center;
  animation: maskIn .22s ease both; padding: 20px; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 560px; max-width: 100%; max-height: 86vh; overflow: auto; position: relative;
  background: linear-gradient(170deg, #262b3b, #1b1f2b); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); animation: modalIn .3s var(--ease) both; padding: 26px 28px;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.modal::before, .modal::after { content: ""; position: absolute; width: 22px; height: 22px; border: 1px solid var(--gold); opacity: .5; }
.modal::before { left: 8px; top: 8px; border-right: 0; border-bottom: 0; }
.modal::after { right: 8px; bottom: 8px; border-left: 0; border-top: 0; }
.modal h3 { margin: 0 0 6px; font-family: var(--font-title); font-size: 20px; letter-spacing: 2px; color: var(--gold-bright); font-weight: 500; }
.modal .modal-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 20px; }
.modal-body { font-size: 13.5px; line-height: 1.9; color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.modal-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.modal-list .li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px; background: rgba(15,17,25,.5); border: 1px solid var(--line-soft); }
.modal-list .li .ic { width: 18px; text-align: center; }
.modal-list .li.danger { border-color: rgba(255,107,107,.35); background: rgba(255,107,107,.08); }
.danger-text { color: var(--danger); }

.zoom-layer { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 30px; animation: maskIn .2s; cursor: zoom-out; }
.zoom-layer img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }

/* toast */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 80; display: flex; flex-direction: column; gap: 10px; width: 340px; }
.toast {
  position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px 16px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(150deg, rgba(43,48,66,.98), rgba(28,32,44,.98)); border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,.5); animation: toastIn .38s var(--ease) both;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(.96); } }
.toast-ic { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.toast.ok .toast-ic { background: rgba(134,224,168,.15); color: var(--ok); border: 1px solid rgba(134,224,168,.4); }
.toast.err .toast-ic { background: rgba(255,107,107,.15); color: var(--danger); border: 1px solid rgba(255,107,107,.4); }
.toast.info .toast-ic { background: rgba(127,200,248,.15); color: var(--info); border: 1px solid rgba(127,200,248,.4); }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 13.5px; color: var(--text); letter-spacing: .5px; }
.toast-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; word-break: break-word; }
.toast-undo { margin-top: 8px; }
.toast-progress { position: absolute; left: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-deep)); animation: toastProg linear forwards; }
@keyframes toastProg { from { width: 100%; } to { width: 0; } }

/* 快捷键提示 */
.kbd { display: inline-block; padding: 1px 6px; font-size: 10.5px; border-radius: 4px; background: rgba(255,255,255,.06); border: 1px solid var(--line-soft); color: var(--muted); font-family: ui-monospace, monospace; }

/* 批量操作条 */
.bulk-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-top: 12px;
  background: linear-gradient(180deg, rgba(43,48,66,.98), rgba(30,34,46,.99)); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 -6px 30px rgba(0,0,0,.35); animation: bulkIn .3s var(--ease); }
@keyframes bulkIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bulk-count { font-size: 12.5px; color: var(--gold-bright); }
.bulk-hint { font-size: 11.5px; color: var(--muted); }

.section-gap { height: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.flex { display: flex; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .items-center { align-items: center; }
.spacer { flex: 1; }
.text-muted { color: var(--muted); } .text-danger { color: var(--danger); } .text-ok { color: var(--ok); }
.fs12 { font-size: 12px; } .fs11 { font-size: 11px; }

@media (max-width: 1280px) {
  .queue-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .app { grid-template-columns: 72px 1fr; }
  .brand-text, .nav-label, .sidebar-foot span { display: none; }
  .nav-item { justify-content: center; }
  .queue-layout { grid-template-columns: 1fr; }
  .act-panel { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
