/* =========================================================
   千川 AI 投流系统 · 未来科技风主题 (v1.0.7)
   ========================================================= */
:root {
  --bg-0: #030712;
  --bg-1: #060d1f;
  --panel: rgba(13, 23, 44, 0.66);
  --panel-2: rgba(17, 30, 56, 0.78);
  --line: rgba(56, 189, 248, 0.16);
  --line-strong: rgba(56, 189, 248, 0.38);
  --text: #dbe7f4;
  --text-dim: #8ba3c2;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --info: #38bdf8;
  --grad: linear-gradient(120deg, #22d3ee, #3b82f6 55%, #8b5cf6);
  --radius: 12px;
  --font-mono: "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }

body {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(1200px 620px at 85% -10%, rgba(59, 130, 246, 0.14), transparent 62%),
    radial-gradient(1000px 600px at -10% 112%, rgba(139, 92, 246, 0.13), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 50%, var(--bg-0));
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* 全局网格底纹 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 38%, rgba(0, 0, 0, 0.85), transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 38%, rgba(0, 0, 0, 0.85), transparent 78%);
  pointer-events: none;
  z-index: 0;
}

#app { position: relative; z-index: 1; }

::selection { background: rgba(34, 211, 238, 0.28); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(3, 8, 20, 0.5); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.35), rgba(59, 130, 246, 0.35));
  border-radius: 6px;
  border: 2px solid rgba(3, 8, 20, 0.6);
}
::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, 0.55); }

/* ---------------- 通用控件 ---------------- */
button {
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(30, 47, 80, 0.55), rgba(16, 27, 50, 0.65));
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13px;
  position: relative;
  overflow: hidden;
  transition: all 0.18s ease;
}
button:hover {
  border-color: var(--line-strong);
  color: #fff;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.16);
}
button.primary {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}
button.primary:hover {
  box-shadow: 0 8px 26px rgba(34, 211, 238, 0.5);
  filter: brightness(1.08);
}
button.success {
  background: linear-gradient(120deg, #059669, #10b981);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
}
button.success:hover { box-shadow: 0 8px 24px rgba(52, 211, 153, 0.45); filter: brightness(1.06); }
button.danger {
  background: transparent;
  border-color: rgba(251, 113, 133, 0.5);
  color: var(--danger);
}
button.danger:hover {
  background: rgba(251, 113, 133, 0.12);
  box-shadow: 0 0 14px rgba(251, 113, 133, 0.25);
}
button.small { padding: 4px 10px; font-size: 12px; }
button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

input, select, textarea {
  width: 100%;
  background: rgba(4, 10, 24, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12), 0 0 16px rgba(34, 211, 238, 0.18);
  background: rgba(6, 14, 30, 0.9);
}
input::placeholder, textarea::placeholder { color: rgba(139, 163, 194, 0.45); }
label { display: block; font-size: 11px; color: var(--text-dim); letter-spacing: 0.5px; margin-bottom: 5px; }

/* ---------------- 登录页：未来科技风 ---------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 50% -12%, rgba(34, 211, 238, 0.16), transparent 62%),
    radial-gradient(800px 500px at 12% 108%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(700px 460px at 90% 100%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, #030815, #060d20 55%, #030815);
}
.login-grid {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -14%;
  height: 46%;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.16) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(430px) rotateX(62deg);
  transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 42%);
  mask-image: linear-gradient(180deg, transparent, #000 42%);
  animation: gridFlow 3.4s linear infinite;
  opacity: 0.55;
  pointer-events: none;
}
@keyframes gridFlow {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 54px, 54px 0; }
}
.login-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.85;
}
.login-stars::before,
.login-stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, 0.8), transparent 55%),
    radial-gradient(1px 1px at 28% 66%, rgba(103, 232, 249, 0.9), transparent 55%),
    radial-gradient(1.5px 1.5px at 42% 12%, rgba(255, 255, 255, 0.6), transparent 55%),
    radial-gradient(1px 1px at 56% 78%, rgba(165, 180, 252, 0.8), transparent 55%),
    radial-gradient(1.5px 1.5px at 68% 34%, rgba(255, 255, 255, 0.7), transparent 55%),
    radial-gradient(1px 1px at 81% 58%, rgba(103, 232, 249, 0.8), transparent 55%),
    radial-gradient(1.5px 1.5px at 92% 18%, rgba(255, 255, 255, 0.65), transparent 55%),
    radial-gradient(1px 1px at 8% 84%, rgba(165, 180, 252, 0.7), transparent 55%),
    radial-gradient(1.5px 1.5px at 48% 46%, rgba(255, 255, 255, 0.5), transparent 55%),
    radial-gradient(1px 1px at 34% 90%, rgba(103, 232, 249, 0.6), transparent 55%);
  background-size: 520px 520px;
  background-repeat: repeat;
  animation: starDrift 48s linear infinite alternate;
}
.login-stars::after {
  background-size: 740px 740px;
  animation-duration: 64s;
  animation-direction: alternate-reverse;
  opacity: 0.5;
}
@keyframes starDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(-38px, 26px); }
}
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.42;
  pointer-events: none;
}
.login-orb.o1 {
  width: 430px; height: 430px;
  left: 6%; top: -10%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.4), transparent 70%);
  animation: orbFloat 11s ease-in-out infinite alternate;
}
.login-orb.o2 {
  width: 470px; height: 470px;
  right: 5%; bottom: -14%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.38), transparent 70%);
  animation: orbFloat 14s ease-in-out infinite alternate-reverse;
}
@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(34px, -24px) scale(1.08); }
}
.login-card {
  position: relative;
  width: 410px;
  padding: 46px 42px 38px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(165deg, rgba(15, 27, 50, 0.86), rgba(7, 14, 30, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.55),
    0 0 44px rgba(34, 211, 238, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  z-index: 2;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.85), transparent);
}
.lc { position: absolute; width: 18px; height: 18px; pointer-events: none; }
.lc::before, .lc::after { content: ""; position: absolute; background: var(--cyan); box-shadow: 0 0 8px rgba(34, 211, 238, 0.8); }
.lc::before { width: 18px; height: 1px; }
.lc::after { width: 1px; height: 18px; }
.lc-tl { top: -1px; left: -1px; }
.lc-tr { top: -1px; right: -1px; transform: scaleX(-1); }
.lc-bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.lc-br { bottom: -1px; right: -1px; transform: scale(-1); }
.login-logo {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(34, 211, 238, 0.55);
  animation: ringSpin 9s linear infinite;
}
.login-logo::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.4);
  animation: ringSpin 14s linear infinite reverse;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
.core-wrap { filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.7)); }
.logo-core {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6 55%, #8b5cf6);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  animation: corePulse 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-core::after {
  content: "";
  width: 13px;
  height: 13px;
  background: rgba(255, 255, 255, 0.92);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}
@keyframes corePulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}
.login-card h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 8px;
  color: #eef6ff;
  text-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
}
.login-card h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.5));
}
.login-terminal {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(103, 232, 249, 0.65);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.login-terminal::before,
.login-terminal::after {
  content: "";
  width: 34px;
  height: 1px;
}
.login-terminal::before { background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.6)); }
.login-terminal::after { background: linear-gradient(90deg, rgba(34, 211, 238, 0.6), transparent); }
.login-terminal i {
  width: 7px;
  height: 11px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: caretBlink 1.1s steps(2) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }
.login-card .field { margin-bottom: 16px; text-align: left; }
.login-card label {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(148, 180, 220, 0.75);
  margin-bottom: 7px;
}
.login-card input {
  background: rgba(3, 8, 20, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  color: #e2ecf9;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}
.login-card input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14), 0 0 18px rgba(34, 211, 238, 0.22);
  background: rgba(5, 12, 26, 0.9);
}
.login-btn {
  position: relative;
  width: 100%;
  padding: 13px 16px;
  margin-top: 6px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 8px;
  color: #fff;
  background: linear-gradient(110deg, #0ea5e9, #2563eb 45%, #7c3aed);
  background-size: 200% 100%;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s ease;
}
.login-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: btnSheen 3.2s ease-in-out infinite;
}
@keyframes btnSheen {
  0%, 55% { left: -80%; }
  85%, 100% { left: 130%; }
}
.login-btn:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(34, 211, 238, 0.5);
}
.login-btn:active { transform: translateY(0); }
.form-error {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 0.4px;
  line-height: 1.55;
  text-align: left;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: var(--danger);
}
.modal .form-error { margin-top: 4px; }

/* ---------------- 后台布局 ---------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 226px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px;
  background: linear-gradient(180deg, rgba(10, 18, 38, 0.92), rgba(6, 12, 26, 0.96));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 10px 18px;
}
.brand b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--grad);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: #0b1428;
  transform: rotate(45deg);
}
.nav-item {
  position: relative;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}
.nav-item::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(139, 163, 194, 0.45);
  transition: all 0.18s ease;
}
.nav-item:hover {
  background: rgba(34, 211, 238, 0.07);
  color: #d8e9ff;
  border-color: rgba(34, 211, 238, 0.16);
}
.nav-item:hover::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.12));
  color: #fff;
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: inset 3px 0 0 var(--cyan), 0 0 18px rgba(34, 211, 238, 0.12);
}
.nav-item.active::before { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.sidebar-footer { margin-top: auto; padding: 10px 4px; font-size: 12px; color: var(--text-dim); }
.nav-scroll { flex: 1; overflow-y: auto; min-height: 0; padding-right: 2px; }
.nav-section {
  width: calc(100% - 8px); display: flex; align-items: center; gap: 8px; margin: 12px 4px 4px;
  padding: 8px 9px; border: 1px solid transparent; border-radius: 8px; background: transparent;
  color: #7489a7; font-size: 10px; font-weight: 700; letter-spacing: 1.6px;
  text-align: left; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.nav-section:hover { background: rgba(34, 211, 238, .06); border-color: rgba(139, 163, 194, .15); }
.nav-section .nav-line { width: 18px; height: 1px; background: currentColor; opacity: .8; flex: 0 0 auto; }
.nav-section-label { flex: 1; }
.nav-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s ease; opacity: .85; }
.nav-section.expanded .nav-chevron { transform: rotate(45deg); }
.nav-group { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .22s ease, opacity .18s ease; }
.nav-group.expanded { grid-template-rows: 1fr; opacity: 1; }
.nav-group-inner { min-height: 0; overflow: hidden; }
.nav-section.live { color: var(--cyan); }
.nav-section.product { color: #a78bfa; }
.nav-item.live.active { border-color: rgba(34, 211, 238, .45); }
.nav-item.product.active { border-color: rgba(167, 139, 250, .48); box-shadow: inset 0 0 22px rgba(139, 92, 246, .08); }
.nav-item.product.active::before { background: #a78bfa; box-shadow: 0 0 10px #8b5cf6; }
.workspace-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:18px; }
.workspace-card { min-height:310px; padding:28px; position:relative; overflow:hidden; cursor:pointer; }
.workspace-card::after { content:""; position:absolute; width:250px; height:250px; border-radius:50%; right:-90px; top:-90px; filter:blur(18px); opacity:.18; }
.workspace-card.live::after { background:var(--cyan); }
.workspace-card.product::after { background:var(--violet); }
.workspace-icon { width:58px; height:58px; border-radius:17px; display:grid; place-items:center; font-size:25px; font-weight:800; margin-bottom:22px; }
.workspace-card.live .workspace-icon { color:var(--cyan); border:1px solid rgba(34,211,238,.45); background:rgba(34,211,238,.1); }
.workspace-card.product .workspace-icon { color:#c4b5fd; border:1px solid rgba(167,139,250,.45); background:rgba(139,92,246,.12); }
.workspace-card h3 { font-size:24px; margin-bottom:10px; }
.workspace-card p { color:var(--text-dim); line-height:1.75; font-size:13px; }
.workspace-tags { display:flex; flex-wrap:wrap; gap:7px; margin:20px 0 24px; }
.workspace-tags span { padding:5px 9px; border:1px solid var(--line); border-radius:99px; font-size:11px; color:var(--text-dim); }
.workspace-card .enter { position:absolute; left:28px; bottom:26px; font-size:13px; font-weight:700; }
@media (max-width: 980px) { .workspace-grid { grid-template-columns:1fr; } }
.user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  margin-bottom: 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(34, 211, 238, 0.05);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.user-chip em {
  font-style: normal;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 1px;
  margin-left: auto;
}

.main {
  flex: 1;
  padding: 26px 32px;
  overflow-x: hidden;
  position: relative;
}
.main::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 80%);
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}
.page-header h2 {
  font-size: 20px;
  letter-spacing: 1px;
  position: relative;
  padding-left: 14px;
}
.page-header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}
.page-header .desc {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 5px;
  letter-spacing: 0.4px;
}

/* ---------------- 卡片与网格 ---------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(16, 28, 52, 0.72), rgba(9, 17, 36, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.65), transparent);
  opacity: 0.65;
}
.card::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 26px; height: 26px;
  border-top: 1px solid rgba(34, 211, 238, 0.5);
  border-right: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 0 10px 0 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(34, 211, 238, 0.08);
}
.card:hover::after { opacity: 1; }
.card .k {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.card .v {
  font-size: 23px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: 0.5px;
}
.card .v.good { color: var(--success); text-shadow: 0 0 14px rgba(52, 211, 153, 0.4); }
.card .v.bad { color: var(--danger); text-shadow: 0 0 14px rgba(251, 113, 133, 0.4); }
.card .v.warn { color: var(--warning); text-shadow: 0 0 14px rgba(251, 191, 36, 0.35); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ---------------- 表格 ---------------- */
.table-wrap {
  position: relative;
  background: linear-gradient(160deg, rgba(14, 25, 48, 0.7), rgba(8, 15, 32, 0.85));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 12px 14px;
  color: #9fc3e8;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.8px;
  white-space: nowrap;
  border-bottom: 1px solid rgba(56, 189, 248, 0.28);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.07), rgba(59, 130, 246, 0.04));
  position: sticky;
  top: 0;
}
td { padding: 11px 14px; border-bottom: 1px solid rgba(56, 189, 248, 0.08); vertical-align: top; }
tr:hover td { background: rgba(34, 211, 238, 0.05); }
td .mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}
.empty { text-align: center; color: var(--text-dim); padding: 36px 0 !important; }

/* ---------------- 徽章 ---------------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}
.badge.green {
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.12);
}
.badge.red {
  background: rgba(251, 113, 133, 0.12);
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.35);
  box-shadow: 0 0 10px rgba(251, 113, 133, 0.12);
}
.badge.yellow {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
  border-color: rgba(251, 191, 36, 0.35);
}
.badge.blue {
  background: rgba(56, 189, 248, 0.12);
  color: var(--info);
  border-color: rgba(56, 189, 248, 0.35);
}
.badge.gray {
  background: rgba(139, 163, 194, 0.1);
  color: var(--text-dim);
  border-color: rgba(139, 163, 194, 0.25);
}

/* ---------------- 操作区 ---------------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  position: relative;
  width: 560px;
  max-width: 92vw;
  max-height: 86vh;
  overflow: auto;
  background: linear-gradient(165deg, rgba(17, 30, 56, 0.94), rgba(8, 15, 32, 0.97));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 30px rgba(34, 211, 238, 0.08);
  backdrop-filter: blur(18px);
}
.modal::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.8), transparent);
}
.modal h3 {
  margin-bottom: 16px;
  font-size: 16px;
  letter-spacing: 1px;
  padding-left: 12px;
  position: relative;
}
.modal h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .field { margin-bottom: 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal .full { grid-column: 1 / -1; }

/* ---------------- 提示 ---------------- */
.toast-wrap {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  position: relative;
  background: linear-gradient(160deg, rgba(16, 28, 52, 0.94), rgba(9, 17, 36, 0.96));
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  padding: 12px 16px 12px 18px;
  border-radius: 9px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 18px rgba(34, 211, 238, 0.1);
  font-size: 13px;
  max-width: 380px;
  backdrop-filter: blur(12px);
  pointer-events: auto;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

/* ---------------- 代码块 ---------------- */
.pre {
  background: rgba(3, 8, 20, 0.8);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow: auto;
  color: var(--text-dim);
}

/* ---------------- 状态条 ---------------- */
.status-bar {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.status-bar > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(34, 211, 238, 0.05);
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.green { background: var(--success); box-shadow: 0 0 8px var(--success); }
.dot.red { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.dot.cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; }
  .sidebar-footer { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------------- 商品库 / 报表导入 ---------------- */
.field-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 150px; margin-bottom: 0; }
.upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(34, 211, 238, 0.04);
}
.upload-box input[type='file'] {
  width: auto;
  font-size: 12px;
  padding: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
}
.import-result {
  border-left: 3px solid var(--cyan);
  background: rgba(34, 211, 238, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.08);
}
.result-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--line);
  font-size: 12px;
  margin: 2px 6px 2px 0;
}
.imp-detail td { background: rgba(3, 8, 20, 0.55); }
.audience-desc {
  padding: 12px 14px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.06);
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0.3px;
}
