/* =====================================================================
   UmeShort 运营中心 · 深色科技风样式
   纯静态、零构建；无外部字体与 CDN 依赖
   ===================================================================== */

:root {
  --bg-0: #05070d;
  --bg-1: #070b14;
  --bg-2: #0a1020;
  --panel: rgba(17, 26, 45, 0.62);
  --panel-2: rgba(12, 19, 33, 0.72);
  --panel-hover: rgba(26, 38, 62, 0.72);
  --line: rgba(122, 162, 220, 0.14);
  --line-strong: rgba(122, 180, 255, 0.28);
  --text: #e7eefb;
  --text-2: #a9b8d0;
  --muted: #7688a3;
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.14);
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.14);
  --gold: #f5b942;
  --gold-dim: rgba(245, 185, 66, 0.13);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.12);
  --red: #fb7185;
  --red-dim: rgba(251, 113, 133, 0.12);
  --amber: #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.12);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow: 0 20px 50px -28px rgba(0, 0, 0, 0.95);
  --sidebar-w: 236px;
  --topbar-h: 72px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 背景：径向光晕 + 细网格 + 扫描线 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 720px at 10% -12%, rgba(34, 211, 238, 0.15), transparent 62%),
    radial-gradient(960px 640px at 92% -6%, rgba(139, 92, 246, 0.17), transparent 64%),
    radial-gradient(900px 700px at 74% 108%, rgba(34, 211, 238, 0.07), transparent 62%),
    radial-gradient(700px 500px at 24% 92%, rgba(245, 185, 66, 0.05), transparent 66%),
    linear-gradient(180deg, #05070d 0%, #070b14 44%, #0a1020 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(122, 170, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 170, 255, 0.045) 1px, transparent 1px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 4px);
  background-size: 64px 64px, 64px 64px, 100% 4px;
  -webkit-mask-image: radial-gradient(130% 110% at 50% 0%, #000 34%, rgba(0, 0, 0, 0.35) 100%);
  mask-image: radial-gradient(130% 110% at 50% 0%, #000 34%, rgba(0, 0, 0, 0.35) 100%);
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.8;
  font-weight: 700;
}
.num { text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.nowrap { white-space: nowrap; }
.only-mobile { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.32), rgba(139, 92, 246, 0.32));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.55), rgba(139, 92, 246, 0.55));
  background-clip: padding-box;
}

/* ============================ 启动屏 ============================ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: radial-gradient(700px 500px at 50% 40%, rgba(34, 211, 238, 0.1), transparent 70%), #05070d;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.boot[hidden] { display: none; }
.boot.is-gone { opacity: 0; visibility: hidden; }
.boot-mark { position: relative; width: 74px; height: 74px; display: grid; place-items: center; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 17px;
  color: #04121b;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 6px 20px -8px rgba(34, 211, 238, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  letter-spacing: -0.02em;
}
.brand-mark-lg { width: 54px; height: 54px; border-radius: 16px; font-size: 26px; }
.boot-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-top-color: var(--cyan);
  animation: spin 1.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-text { color: var(--text-2); font-size: 12.5px; letter-spacing: 0.08em; }
.boot-bar { width: 180px; height: 2px; background: rgba(122, 162, 220, 0.16); border-radius: 2px; overflow: hidden; }
.boot-bar i {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple));
  animation: bootbar 1.2s ease-in-out infinite;
}
@keyframes bootbar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ============================ 登录页 ============================ */
.login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  padding: 24px;
  overflow: hidden;
}
.login[hidden] { display: none; }
.login-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.login-grid {
  position: absolute;
  inset: -40% -20%;
  background-image:
    linear-gradient(rgba(122, 180, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 180, 255, 0.07) 1px, transparent 1px);
  background-size: 58px 58px;
  transform: perspective(680px) rotateX(62deg) translateY(12%);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 40%, #000 0%, transparent 78%);
  mask-image: radial-gradient(60% 60% at 50% 40%, #000 0%, transparent 78%);
  animation: gridDrift 18s linear infinite;
}
@keyframes gridDrift { to { background-position: 0 58px, 58px 0; } }
.login-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 5px);
  opacity: 0.6;
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); }
.orb-a {
  width: 460px;
  height: 460px;
  left: -120px;
  top: -80px;
  background: rgba(34, 211, 238, 0.24);
  animation: float 14s ease-in-out infinite;
}
.orb-b {
  width: 520px;
  height: 520px;
  right: -160px;
  bottom: -160px;
  background: rgba(139, 92, 246, 0.24);
  animation: float 18s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(26px, -22px, 0) scale(1.06); }
}
.login-card {
  position: relative;
  width: min(400px, 100%);
  padding: 30px 30px 22px;
  border-radius: 22px;
  border: 1px solid rgba(122, 180, 255, 0.18);
  background: linear-gradient(180deg, rgba(20, 30, 50, 0.86), rgba(9, 14, 25, 0.9));
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: cardIn 0.55s var(--ease);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(130deg, rgba(34, 211, 238, 0.6), rgba(139, 92, 246, 0.05) 42%, rgba(139, 92, 246, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(0.985); } }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 21px; }
.login-brand h1 { font-size: 19px; letter-spacing: -0.01em; font-weight: 700; }
.login-brand p { font-size: 9.5px; letter-spacing: 0.28em; color: var(--muted); margin-top: 2px; }
.login-form { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field-label { font-size: 11.5px; color: var(--text-2); letter-spacing: 0.04em; }
.field-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(122, 162, 220, 0.18);
  background: rgba(6, 10, 18, 0.7);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field-box:focus-within {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12), inset 0 0 22px rgba(34, 211, 238, 0.06);
  background: rgba(8, 14, 24, 0.9);
}
.field-icon { color: var(--muted); flex: none; width: 17px; height: 17px; }
.field-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.field-box input::placeholder { color: #55647d; }
.login-error {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.3);
  animation: shake 0.35s ease;
}
.login-error[hidden] { display: none; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.login-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(122, 162, 220, 0.1);
  font-size: 11px;
  color: var(--muted);
}
.login-foot svg { width: 14px; height: 14px; color: var(--green); }
.login-copy { font-size: 11px; color: #4c5a72; letter-spacing: 0.06em; }

/* ============================ 按钮 / 输入 ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid rgba(122, 162, 220, 0.2);
  background: rgba(20, 30, 50, 0.6);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s, border-color 0.18s, transform 0.12s, box-shadow 0.18s;
  user-select: none;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(28, 41, 66, 0.75); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-sm { height: 29px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.btn-xs { height: 25px; padding: 0 8px; font-size: 11px; border-radius: 7px; gap: 4px; }
.btn-xs svg { width: 12px; height: 12px; }
.btn-lg { height: 46px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: rgba(122, 162, 220, 0.16); }
.btn-primary {
  color: #04121b;
  border-color: transparent;
  background: linear-gradient(135deg, #22d3ee, #7dd3fc 45%, #a78bfa);
  box-shadow: 0 12px 30px -16px rgba(34, 211, 238, 0.9);
  font-weight: 700;
}
.btn-primary:hover {
  color: #04121b;
  filter: brightness(1.06);
  box-shadow: 0 14px 36px -14px rgba(34, 211, 238, 1);
}
.btn-primary:disabled { filter: grayscale(0.35); }
.btn-ok { color: var(--green); border-color: rgba(52, 211, 153, 0.34); background: rgba(52, 211, 153, 0.1); }
.btn-ok:hover { color: #d1fae5; background: rgba(52, 211, 153, 0.2); border-color: rgba(52, 211, 153, 0.5); }
.btn-warn { color: var(--amber); border-color: rgba(251, 191, 36, 0.34); background: rgba(251, 191, 36, 0.1); }
.btn-warn:hover { color: #fef3c7; background: rgba(251, 191, 36, 0.2); border-color: rgba(251, 191, 36, 0.5); }
.btn-danger { color: var(--red); border-color: rgba(251, 113, 133, 0.34); background: rgba(251, 113, 133, 0.1); }
.btn-danger:hover { color: #ffe4e6; background: rgba(251, 113, 133, 0.2); border-color: rgba(251, 113, 133, 0.5); }
.btn-cyan { color: var(--cyan); border-color: rgba(34, 211, 238, 0.34); background: rgba(34, 211, 238, 0.1); }
.btn-cyan:hover { color: #cffafe; background: rgba(34, 211, 238, 0.2); border-color: rgba(34, 211, 238, 0.5); }
.btn-spin {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(4, 18, 27, 0.25);
  border-top-color: #04121b;
  animation: spin 0.7s linear infinite;
}
.btn-spin[hidden] { display: none; }
.btn.is-loading .btn-text,
.btn.is-loading > span:first-child { opacity: 0.7; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(122, 162, 220, 0.16);
  background: rgba(20, 30, 50, 0.5);
  color: var(--text-2);
  cursor: pointer;
  transition: 0.18s;
  flex: none;
}
.icon-btn:hover { color: var(--cyan); border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.1); }
.icon-btn svg { width: 16px; height: 16px; }

.input, .search-input, .select {
  height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid rgba(122, 162, 220, 0.18);
  background: rgba(6, 10, 18, 0.66);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  min-width: 0;
}
.input:focus, .search-input:focus, .select:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}
.input::placeholder, .search-input::placeholder { color: #56657e; }
.select {
  appearance: none;
  padding-right: 28px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #7b8ba5 50%),
    linear-gradient(135deg, #7b8ba5 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.select option { background: #0b1220; color: var(--text); }

.search-box { position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 11px; width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.search-box .search-input { padding-left: 33px; width: 268px; height: 34px; }
.search-input::-webkit-search-cancel-button { filter: invert(0.6); }

.switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; font-size: 11.5px; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: rgba(122, 162, 220, 0.16);
  border: 1px solid rgba(122, 162, 220, 0.2);
  transition: 0.2s;
  flex: none;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8fa1bb;
  transition: 0.2s var(--ease);
}
.switch input:checked + .track { background: rgba(34, 211, 238, 0.24); border-color: rgba(34, 211, 238, 0.55); }
.switch input:checked + .track::after { left: 16px; background: var(--cyan); box-shadow: 0 0 10px rgba(34, 211, 238, 0.9); }

/* ============================ 布局骨架 ============================ */
.app { display: flex; min-height: 100vh; }
.app[hidden] { display: none; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.92), rgba(6, 10, 18, 0.88));
  backdrop-filter: blur(18px);
  box-shadow: 12px 0 40px -30px rgba(0, 0, 0, 1);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 20px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand-txt strong { font-size: 15px; letter-spacing: 0.01em; }
.brand-txt span { font-size: 10.5px; color: var(--muted); letter-spacing: 0.18em; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; padding-right: 2px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 11px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.18s, background 0.18s;
}
.nav-item svg { width: 17px; height: 17px; color: var(--muted); transition: color 0.18s; flex: none; }
.nav-item:hover { color: var(--text); background: rgba(34, 211, 238, 0.06); }
.nav-item:hover svg { color: var(--cyan); }
.nav-item.active {
  color: #ecfeff;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.08) 70%, transparent);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.2);
}
.nav-item.active svg { color: var(--cyan); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.8);
}

.sidebar-foot { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 9px; padding: 0 4px; min-width: 0; }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #cffafe;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), rgba(139, 92, 246, 0.35));
  border: 1px solid rgba(34, 211, 238, 0.35);
  flex: none;
  text-transform: uppercase;
}
.me-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.me-txt strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-txt span { font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.92), rgba(6, 10, 18, 0.72));
  backdrop-filter: blur(16px);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h2 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.topbar-title p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.clock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(12, 19, 33, 0.6);
}
.clock svg { width: 15px; height: 15px; color: var(--cyan); opacity: 0.8; }
.clock-txt { display: flex; flex-direction: column; line-height: 1.2; }
.clock-txt span { font-size: 9.5px; color: var(--muted); letter-spacing: 0.04em; }
.clock-txt strong { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.online-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--green); }
.online-dot i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.content { flex: 1; padding: 22px 26px 40px; min-width: 0; }
.page { display: grid; gap: 16px; animation: pageIn 0.42s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head h3 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.page-head h3 .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.page-head .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============================ 卡片 ============================ */
.card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 30, 50, 0.66), rgba(10, 16, 28, 0.6));
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
  min-width: 0;
}
.card.hoverable:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 26px 60px -34px rgba(0, 0, 0, 1), 0 0 0 1px rgba(34, 211, 238, 0.08);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}
.card-head h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-head h4 svg { width: 14px; height: 14px; color: var(--cyan); opacity: 0.85; }
.card-head .hint { font-size: 11px; color: var(--muted); }
.card-body { padding: 12px 16px 16px; }
.card-body.tight { padding: 10px 12px 12px; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 14px; min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2a { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.g-1a { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }

@media (max-width: 1180px) {
  .g-2a, .g-1a { grid-template-columns: 1fr; }
}

/* ============================ KPI ============================ */
.kpi {
  position: relative;
  overflow: hidden;
  padding: 14px 16px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 33, 54, 0.7), rgba(10, 16, 28, 0.66));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, var(--cyan)), var(--accent-2, var(--purple)), transparent);
  background-size: 220% 100%;
  animation: streak 5.6s linear infinite;
  opacity: 0.9;
}
@keyframes streak {
  0% { background-position: -120% 0; }
  100% { background-position: 220% 0; }
}
.kpi::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -50px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.26), transparent 68%);
  filter: blur(14px);
  opacity: 0.55;
  pointer-events: none;
}
@supports (background: color-mix(in srgb, red 10%, transparent)) {
  .kpi::after {
    background: radial-gradient(circle, color-mix(in srgb, var(--accent, var(--cyan)) 30%, transparent), transparent 68%);
  }
}
.kpi:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 11.5px; color: var(--text-2); letter-spacing: 0.04em; }
.kpi-ico {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--accent, var(--cyan));
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.26);
  flex: none;
}
@supports (background: color-mix(in srgb, red 10%, transparent)) {
  .kpi-ico {
    background: color-mix(in srgb, var(--accent, var(--cyan)) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent, var(--cyan)) 26%, transparent);
  }
}
.kpi-ico svg { width: 14px; height: 14px; }
.kpi-value {
  margin-top: 9px;
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: #f2f7ff;
  white-space: nowrap;
}
.kpi-value .unit { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-sub { margin-top: 5px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.kpi-sub b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi-sub .up { color: var(--green); }
.kpi-sub .down { color: var(--red); }

/* ============================ 表格 ============================ */
.table-wrap {
  position: relative;
  width: 100%;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 10, 18, 0.38);
}
.table-wrap.flush { border: 0; border-radius: 0; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.tbl thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
  background: rgba(9, 15, 26, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
table.tbl thead th.num { text-align: right; }
table.tbl tbody td {
  padding: 9px 12px;
  color: var(--text-2);
  border-bottom: 1px solid rgba(122, 162, 220, 0.07);
  white-space: nowrap;
  vertical-align: middle;
}
table.tbl tbody tr { transition: background 0.16s; }
table.tbl tbody tr:hover td { background: rgba(34, 211, 238, 0.05); color: var(--text); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tbody tr.clickable:hover td:first-child { box-shadow: inset 2px 0 0 var(--cyan); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.strong { color: var(--text); font-weight: 600; }
table.tbl .mono { font-size: 11.5px; color: var(--text-2); }
.cell-main { color: var(--text); font-weight: 600; }
.cell-sub { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.money { color: var(--gold); font-variant-numeric: tabular-nums; }
.money-strong { color: #fde68a; font-weight: 650; }
.rank {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(122, 162, 220, 0.1);
  border: 1px solid rgba(122, 162, 220, 0.16);
}
.rank.top1 {
  color: #06212b;
  background: linear-gradient(135deg, #22d3ee, #67e8f9);
  border-color: transparent;
  box-shadow: 0 0 14px -4px var(--cyan);
}
.rank.top2 { color: #052e2b; background: linear-gradient(135deg, #a7f3d0, #6ee7b7); border-color: transparent; }
.rank.top3 { color: #2a1a05; background: linear-gradient(135deg, #f5b942, #fcd34d); border-color: transparent; }

.ratio { display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.ratio .bar { width: 46px; height: 4px; border-radius: 999px; background: rgba(122, 162, 220, 0.14); overflow: hidden; flex: none; }
.ratio .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.ratio span { font-variant-numeric: tabular-nums; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  color: var(--text-2);
  background: rgba(122, 162, 220, 0.1);
  border: 1px solid rgba(122, 162, 220, 0.2);
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
  flex: none;
}
.pill.no-dot::before { display: none; }
.pill[data-tone="ok"] { color: var(--green); background: var(--green-dim); border-color: rgba(52, 211, 153, 0.3); }
.pill[data-tone="warn"] { color: var(--amber); background: var(--amber-dim); border-color: rgba(251, 191, 36, 0.3); }
.pill[data-tone="danger"] { color: var(--red); background: var(--red-dim); border-color: rgba(251, 113, 133, 0.3); }
.pill[data-tone="info"] { color: var(--cyan); background: var(--cyan-dim); border-color: rgba(34, 211, 238, 0.3); }
.pill[data-tone="purple"] { color: #c4b5fd; background: var(--purple-dim); border-color: rgba(139, 92, 246, 0.32); }
.pill[data-tone="gold"] { color: var(--gold); background: var(--gold-dim); border-color: rgba(245, 185, 66, 0.3); }
.pill[data-tone="muted"] { color: #93a3bb; background: rgba(122, 162, 220, 0.07); border-color: rgba(122, 162, 220, 0.16); }

.row-actions { display: flex; align-items: center; gap: 5px; justify-content: flex-end; }
.risk-score { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.risk-score .meter { width: 42px; height: 4px; border-radius: 999px; background: rgba(122, 162, 220, 0.16); overflow: hidden; }
.risk-score .meter i { display: block; height: 100%; border-radius: 999px; }
.hash { color: #7f90a9; font-family: var(--mono); font-size: 10.5px; }

/* ============================ 图表 ============================ */
.chart { width: 100%; height: 286px; }
.chart-sm { height: 220px; }
.chart-xs { height: 168px; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 12px; gap: 6px; }

/* ============================ 漏斗 / 留存 ============================ */
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 92px 1fr 108px; align-items: center; gap: 12px; }
.funnel-label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.funnel-label .idx { font-size: 10px; color: var(--muted); font-family: var(--mono); }
.funnel-track { height: 22px; border-radius: 6px; background: rgba(122, 162, 220, 0.07); overflow: hidden; position: relative; }
.funnel-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.85), rgba(139, 92, 246, 0.8));
  box-shadow: 0 0 18px -6px rgba(34, 211, 238, 0.9);
  transition: width 0.9s var(--ease);
  position: relative;
  min-width: 3px;
}
.funnel-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0 6px, transparent 6px 14px);
  opacity: 0.5;
}
.funnel-val { text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text); font-weight: 600; }
.funnel-val small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; }

.retention-bar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.retention-bar .track { width: 56px; height: 4px; border-radius: 999px; background: rgba(122, 162, 220, 0.14); overflow: hidden; flex: none; }
.retention-bar .track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22d3ee, #8b5cf6); }

/* ============================ 图表图例补充 ============================ */
.legend-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.legend-inline i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

.drama-cover {
  width: 30px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(139, 92, 246, 0.25));
  border: 1px solid var(--line);
  flex: none;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #cffafe;
  overflow: hidden;
}
.drama-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.drama-cell .title { color: var(--text); font-weight: 600; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================ 加载骨架 ============================ */
.sk { position: relative; overflow: hidden; border-radius: 6px; background: rgba(122, 162, 220, 0.09); }
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(190, 225, 255, 0.12), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-line { height: 12px; margin: 8px 0; }
.sk-row { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-bottom: 1px solid rgba(122, 162, 220, 0.06); }
.sk-row > * { height: 12px; }

/* ============================ 空 / 错误状态 ============================ */
.state { display: grid; place-items: center; gap: 8px; padding: 40px 16px; text-align: center; }
.state .state-ico {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(122, 162, 220, 0.07);
  border: 1px solid var(--line);
}
.state .state-ico svg { width: 20px; height: 20px; }
.state strong { font-size: 13px; font-weight: 600; color: var(--text-2); }
.state p { font-size: 11.5px; color: var(--muted); max-width: 420px; }
.state[data-tone="error"] .state-ico { color: var(--red); background: var(--red-dim); border-color: rgba(251, 113, 133, 0.3); }

/* ============================ 分页 ============================ */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.pager-info { font-size: 11.5px; color: var(--muted); }
.pager-info b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.pager-btns { display: flex; align-items: center; gap: 6px; }
.pager-btns .btn { min-width: 60px; }

/* ============================ 抽屉 ============================ */
.drawer-wrap { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end; }
.drawer-wrap[hidden] { display: none; }
.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 8, 0.66);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } }
.drawer {
  position: relative;
  width: min(620px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(12, 19, 33, 0.98), rgba(6, 10, 18, 0.99));
  box-shadow: -30px 0 80px -40px rgba(0, 0, 0, 1);
  animation: drawerIn 0.36s var(--ease);
}
@keyframes drawerIn { from { transform: translateX(36px); opacity: 0.4; } }
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(420px 160px at 0% 0%, rgba(34, 211, 238, 0.12), transparent 70%);
}
.drawer-head h3 { font-size: 16px; font-weight: 650; margin-top: 2px; }
.drawer-head .muted { font-size: 11.5px; margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 32px; display: grid; gap: 16px; align-content: start; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(6, 10, 18, 0.7);
  border: 1px solid var(--line);
  overflow-x: auto;
}
.tab {
  padding: 5px 12px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.18s;
}
.tab:hover { color: var(--text-2); }
.tab.active {
  color: #ecfeff;
  background: rgba(34, 211, 238, 0.14);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.28);
}
.tab .count { font-size: 10px; opacity: 0.7; margin-left: 4px; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title h5 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(122, 162, 220, 0.08);
}
.kv-item { background: rgba(9, 15, 26, 0.92); padding: 9px 12px; min-width: 0; }
.kv-item span { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: 0.03em; }
.kv-item strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kv-item strong.mono { font-size: 11.5px; font-weight: 500; }
.kv-item.wide { grid-column: 1 / -1; }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mini-stat { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(12, 19, 33, 0.7); }
.mini-stat span { display: block; font-size: 10px; color: var(--muted); letter-spacing: 0.03em; }
.mini-stat strong { display: block; font-size: 15px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mini-stat strong small { font-size: 10px; color: var(--muted); font-weight: 500; margin-left: 2px; }

.profile { display: flex; align-items: center; gap: 12px; }
.profile .avatar { width: 42px; height: 42px; border-radius: 12px; font-size: 16px; }

/* ============================ 弹窗 ============================ */
.modal-wrap { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px; }
.modal-wrap[hidden] { display: none; }
.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease both;
}
.modal {
  position: relative;
  width: min(460px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(122, 180, 255, 0.24);
  background: linear-gradient(180deg, rgba(18, 27, 45, 0.99), rgba(8, 13, 23, 0.99));
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modalIn 0.28s var(--ease);
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.modal-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 18px 0; }
.modal-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(34, 211, 238, 0.3);
}
.modal-ico[data-tone="danger"] { color: var(--red); background: var(--red-dim); border-color: rgba(251, 113, 133, 0.32); }
.modal-ico[data-tone="warn"] { color: var(--amber); background: var(--amber-dim); border-color: rgba(251, 191, 36, 0.32); }
.modal-ico svg { width: 17px; height: 17px; }
.modal-head h4 { font-size: 14.5px; font-weight: 650; }
.modal-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 14px 18px 0; display: grid; gap: 11px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 18px; }
.modal textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(122, 162, 220, 0.2);
  background: rgba(4, 8, 14, 0.8);
  font-size: 12.5px;
  outline: none;
  line-height: 1.55;
}
.modal textarea:focus { border-color: rgba(34, 211, 238, 0.55); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1); }
.quick-notes { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(122, 162, 220, 0.2);
  background: rgba(122, 162, 220, 0.07);
  color: var(--text-2);
  font-size: 10.5px;
  cursor: pointer;
  transition: 0.16s;
}
.chip:hover { color: var(--cyan); border-color: rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.1); }
.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-2);
  cursor: pointer;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(245, 185, 66, 0.24);
  background: rgba(245, 185, 66, 0.06);
}
.confirm-check input { margin-top: 2px; accent-color: var(--cyan); flex: none; }
.warn-box {
  display: flex;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #fde68a;
  background: rgba(245, 185, 66, 0.08);
  border: 1px solid rgba(245, 185, 66, 0.28);
}
.warn-box svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--gold); }

/* ============================ Toast ============================ */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 130; display: grid; gap: 9px; justify-items: end; pointer-events: none; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 220px;
  max-width: 360px;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid rgba(122, 180, 255, 0.24);
  background: rgba(12, 20, 34, 0.96);
  box-shadow: 0 22px 50px -26px rgba(0, 0, 0, 1);
  backdrop-filter: blur(12px);
  font-size: 12.5px;
  color: var(--text);
  pointer-events: auto;
  animation: toastIn 0.3s var(--ease);
}
.toast.out { animation: toastOut 0.24s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(0.98); } }
.toast .t-ico { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.toast .t-body { min-width: 0; }
.toast .t-title { font-weight: 650; font-size: 12.5px; }
.toast .t-msg { color: var(--text-2); font-size: 11.5px; margin-top: 1px; line-height: 1.45; word-break: break-word; }
.toast[data-tone="ok"] { border-color: rgba(52, 211, 153, 0.4); }
.toast[data-tone="ok"] .t-ico { color: var(--green); }
.toast[data-tone="error"] { border-color: rgba(251, 113, 133, 0.42); }
.toast[data-tone="error"] .t-ico { color: var(--red); }
.toast[data-tone="warn"] { border-color: rgba(251, 191, 36, 0.4); }
.toast[data-tone="warn"] .t-ico { color: var(--amber); }
.toast[data-tone="info"] .t-ico { color: var(--cyan); }

/* ============================ 刷新脉冲 ============================ */
.is-pulse { animation: pulseFlash 0.9s ease-out; }
@keyframes pulseFlash {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5), inset 0 0 0 1px rgba(34, 211, 238, 0.5); }
  100% { box-shadow: 0 0 0 14px rgba(34, 211, 238, 0), inset 0 0 0 1px rgba(34, 211, 238, 0); }
}
.flash-update { animation: flashUpdate 0.75s ease-out; }
@keyframes flashUpdate {
  0% { background-color: rgba(34, 211, 238, 0.14); }
  100% { background-color: transparent; }
}

.spin { animation: spin 0.9s linear infinite; }

/* ============================ 工具栏 ============================ */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; border: 1px solid var(--line); background: rgba(6, 10, 18, 0.66); }
.seg button {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.16s;
  white-space: nowrap;
}
.seg button:hover { color: var(--text-2); }
.seg button.active { color: #04121b; background: linear-gradient(135deg, #22d3ee, #a5f3fc); box-shadow: 0 4px 14px -8px var(--cyan); }
.filter-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-pills button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(122, 162, 220, 0.18);
  background: rgba(12, 19, 33, 0.6);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.16s;
}
.filter-pills button:hover { border-color: var(--line-strong); color: var(--text); }
.filter-pills button .cnt { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter-pills button.active {
  color: #ecfeff;
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 16px -8px var(--cyan);
}
.filter-pills button.active .cnt { color: var(--cyan); }

.last-updated { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.last-updated i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }

/* 配置页 */
.cfg-group { display: grid; gap: 1px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: rgba(122, 162, 220, 0.07); }
.cfg-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(120px, 0.9fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  background: rgba(9, 15, 26, 0.94);
}
.cfg-key { min-width: 0; }
.cfg-key code { font-family: var(--mono); font-size: 11.5px; color: var(--cyan); }
.cfg-key p { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.cfg-input-wrap { display: flex; align-items: center; gap: 7px; }
.cfg-input-wrap .input { flex: 1; font-family: var(--mono); font-size: 12px; }
.cfg-hint { font-size: 10.5px; color: var(--gold); white-space: nowrap; }
.cfg-row.dirty .input { border-color: rgba(245, 185, 66, 0.6); box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.1); }

/* 密码弹窗字段 */
.modal .field { gap: 6px; }
.modal .field-box { height: 40px; border-radius: 10px; }

/* 宽表容器（水平滚动由 .table-wrap 承担） */
.table-wrap.scrollable { max-width: 100%; }

/* ============================ 响应式 ============================ */
@media (max-width: 1180px) {
  .g-4, .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 18px 18px 36px; }
  .topbar { padding: 0 18px; }
}
@media (max-width: 900px) {
  .only-mobile { display: inline-grid !important; }
  .only-desktop { display: none !important; }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s var(--ease); box-shadow: 30px 0 80px -40px rgba(0, 0, 0, 1); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(2, 4, 8, 0.6); backdrop-filter: blur(2px); animation: fadeIn 0.2s ease both; }
  .scrim[hidden] { display: none; }
  .g-2, .g-3, .g-4, .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-right { gap: 8px; }
  .clock { padding: 4px 8px; }
  .clock-txt span { display: none; }
  .online-dot { display: none; }
  .content { padding: 14px 14px 32px; }
  .topbar { padding: 0 14px; }
  .kv { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfg-row { grid-template-columns: 1fr; gap: 7px; }
  .funnel-row { grid-template-columns: 74px 1fr 78px; gap: 8px; }
  .search-box .search-input { width: 100%; }
  .search-box { width: 100%; }
}
@media (max-width: 560px) {
  .g-2, .g-3, .g-4, .g-kpi { grid-template-columns: 1fr; }
  .kpi-value { font-size: 22px; }
  .drawer-body { padding: 14px 14px 28px; }
  .drawer-head { padding: 14px 14px 12px; }
  .chart { height: 240px; }
  .toasts { right: 12px; left: 12px; justify-items: stretch; }
  .toast { max-width: none; }
  .page-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
/* 账号管理：板块权限勾选 */
.nav-item[hidden] { display: none; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding-top: 2px; }
.perm-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 9px; background: rgba(122, 162, 220, 0.04);
  cursor: pointer; font-size: 12.5px; color: var(--text);
}
.perm-item:hover { border-color: rgba(34, 211, 238, 0.32); background: rgba(34, 211, 238, 0.06); }
.perm-item input { accent-color: var(--cyan); }

/* 参数配置：列表型配置（广告位 ID 等）与开关型配置 */
.cfg-textarea {
  min-height: 84px;
  height: auto;
  resize: vertical;
  padding: 8px 10px;
  line-height: 1.55;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre;
  overflow-x: auto;
}
.cfg-switch { margin-right: 6px; }
.cfg-row .cfg-input-wrap:has(.cfg-textarea) { align-items: flex-start; }