/* ==========================================
   风之谷中国版 后台系统 - 视觉升级版样式
   版本: 202608260
   ========================================== */

/* === CSS 变量 === */
:root {
  --bg: #070707;
  --surface-1: #101114;
  --surface-2: #15161a;
  --surface-3: #1b1d22;
  --panel: #141518;
  --ink: #e4e7eb;
  --muted: #89929f;
  --blue: #38bdf8;
  --nav: #0e0f12;
  --line: #26282d;
  --green: #6ee7b7;
  --orange: #fb923c;
  --red: #f87171;
  --accent: #3b6dff;
  --glow: rgba(59, 109, 255, 0.4);
  color-scheme: dark;
}

/* === 基础重置 === */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body, #app {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  transition: background-color .35s ease, color .35s ease;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  user-select: none;
  -webkit-user-select: none;
}

/* === 首屏滑块验证 === */
.human-check-shell {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #20242a;
  background: #f6f7f9;
  animation: checkShellIn .55s cubic-bezier(.22, .8, .25, 1) both;
}

.human-check-shell::before,
.human-check-shell::after {
  position: absolute;
  width: 42vw;
  height: 42vw;
  content: '';
  border: 1px solid rgba(35, 43, 53, .06);
  border-radius: 50%;
  animation: checkHalo 8s ease-in-out infinite;
}

.human-check-shell::after { width: 68vw; height: 68vw; animation-delay: -3s; }

.human-check-card {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  padding: 42px 42px 34px;
  text-align: center;
  border: 1px solid #e0e3e8;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 70px rgba(34, 42, 52, .12), 0 2px 8px rgba(34, 42, 52, .04);
  backdrop-filter: blur(14px);
}

.check-orbit {
  display: flex;
  justify-content: center;
  gap: 13px;
  height: 24px;
  margin-bottom: 18px;
}

.check-orbit i {
  display: block;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: #9ca3ad;
  animation: checkDot 1.8s ease-in-out infinite;
}

.check-orbit i:nth-child(2) { animation-delay: .12s; }
.check-orbit i:nth-child(3) { animation-delay: .24s; background: #59616b; }
.check-orbit i:nth-child(4) { animation-delay: .36s; }
.check-orbit i:nth-child(5) { animation-delay: .48s; }

.check-eyebrow {
  color: #7b848f;
  font-size: 11px;
  letter-spacing: .16em;
}

.human-check-card h1 {
  margin: 10px 0 7px;
  color: #1e2329;
  font-size: 23px;
  font-weight: 700;
}

.check-lead { margin: 0 0 26px; color: #78818d; font-size: 13px; }

.check-track {
  position: relative;
  height: 54px;
  overflow: hidden;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  background: #f0f2f4;
  touch-action: none;
  user-select: none;
}

.check-track-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #e6eaee, #d7dde3);
  transition: width .12s ease-out;
}

.check-track-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8b949e;
  font-size: 13px;
  pointer-events: none;
  transition: opacity .15s ease;
}

.check-thumb {
  position: absolute;
  top: 50%;
  left: 4px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 9px;
  color: #fff;
  background: #2d3136;
  box-shadow: 0 5px 12px rgba(28, 34, 40, .2);
  transform: translate3d(0, -50%, 0);
  transition: transform .14s ease-out, background-color .3s ease, box-shadow .3s ease;
  cursor: grab;
  font-size: 22px;
  line-height: 1;
}

.check-thumb:active, .check-track.is-dragging .check-thumb { cursor: grabbing; box-shadow: 0 8px 18px rgba(28, 34, 40, .28); }
.check-track.is-complete { border-color: #b8ddc4; background: #edf8f0; }
.check-track.is-complete .check-track-fill { background: linear-gradient(90deg, #d7ebdc, #c0dfca); }
.check-track.is-complete .check-thumb { background: #208447; }
.check-track.is-complete .check-track-label { color: #208447; font-weight: 700; opacity: 1 !important; }

.check-status { min-height: 22px; margin: 14px 0 20px; color: #79828d; font-size: 12px; transition: color .3s ease; }
.check-track.is-complete + .check-status { color: #208447; }

.check-rule { display: flex; align-items: center; gap: 12px; color: #a0a7af; font-size: 10px; letter-spacing: .12em; }
.check-rule span { flex: 1; height: 1px; background: #e4e6e9; }
.check-note { margin: 16px 0 0; color: #a0a7af; font-size: 11px; }

.human-check-shell.is-leaving { animation: checkShellOut .42s ease both; }

@keyframes checkShellIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes checkShellOut { to { opacity: 0; transform: scale(1.025); } }
@keyframes checkDot { 0%, 100% { transform: translateY(0); opacity: .58; } 50% { transform: translateY(-6px); opacity: 1; } }
@keyframes checkHalo { 0%, 100% { transform: scale(.96); opacity: .45; } 50% { transform: scale(1.04); opacity: .9; } }

/* === Three.js 容器 === */
#three-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  transition: opacity 0.8s ease;
}

#three-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* === 登录视图 === */
.login-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.025) 0%, transparent 56%),
              linear-gradient(180deg, rgba(7, 7, 7, 0.08), rgba(7, 7, 7, 0.24));
  z-index: 1;
}

.login-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
}

.login-brand-section {
  text-align: center;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 0.8, 0.25, 1);
}

.login-logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: float 3s ease-in-out infinite;
}

.login-title {
  margin: 0 0 8px;
}

.title-main {
  display: block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #b8bcc4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-sub {
  display: block;
  font-size: 13px;
  color: #8b96a4;
  font-weight: 500;
  letter-spacing: 2px;
  margin-top: 6px;
}

.login-desc {
  color: #89929f;
  font-size: 14px;
  margin: 0;
}

.login-form-section {
  width: 100%;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 0.8, 0.25, 1) 0.1s backwards;
}

.login-form-card {
  background: rgba(17, 18, 21, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
              0 0 1px rgba(255, 255, 255, 0.1) inset;
  position: relative;
  overflow: hidden;
}

.login-form-card::before {
  content: '';
  position: absolute;
  inset: -100%;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(59, 109, 255, 0.15) 90deg, transparent 180deg);
  animation: rotate 4s linear infinite;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.login-form-card:hover::before {
  opacity: 1;
}

.login-form-card .eyebrow {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.login-form-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.login-form-card .muted {
  display: block;
  color: #89929f;
  font-size: 13px;
  margin-bottom: 24px;
}

#login-form {
  position: relative;
  z-index: 1;
}

.form-field {
  position: relative;
  margin-bottom: 20px;
}

.form-field input {
  width: 100%;
  background: rgba(15, 19, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
  color: #fff;
  transition: all 0.3s ease;
  outline: none;
}

.form-field input:focus {
  background: rgba(15, 19, 28, 1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 109, 255, 0.1),
              0 4px 12px rgba(59, 109, 255, 0.15);
  transform: translateY(-1px);
}

.form-field input::placeholder {
  color: #5a6371;
}

.field-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 0.4s cubic-bezier(0.22, 0.8, 0.25, 1);
  border-radius: 2px;
}

.form-field input:focus + .field-line {
  width: 100%;
}

.form-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--red);
  font-size: 13px;
  margin-bottom: 16px;
}

.primary-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.22, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(59, 109, 255, 0.3),
              0 0 1px rgba(255, 255, 255, 0.2) inset;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 109, 255, 0.4),
              0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn.loading .btn-text {
  opacity: 0.6;
}

.primary-btn.loading .btn-icon {
  animation: pulse 1s ease-in-out infinite;
}

.btn-icon {
  transition: transform 0.3s ease;
}

.primary-btn:hover .btn-icon {
  transform: translateX(4px);
}

.login-footer {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: #5a6371;
  z-index: 2;
  animation: fadeIn 1s ease 0.3s backwards;
}

/* 登录成功动画 */
.login-shell.login-success {
  animation: zoomOut 0.8s cubic-bezier(0.6, -0.28, 0.74, 0.05) forwards;
}

@keyframes zoomOut {
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* === 主应用布局 === */
.app-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96);
}

.app-shell.page-enter {
  animation: pageEnter 0.6s cubic-bezier(0.22, 0.8, 0.25, 1) forwards;
}

.app-shell.is-leaving {
  animation: pageLeave 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.34) forwards;
}

@keyframes pageEnter {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pageLeave {
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

/* === 水印 === */
.watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: 9998;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  grid-auto-rows: 150px;
  gap: 36px 52px;
  padding: 1vh 0;
  opacity: 0.047;
  color: #fff;
  transform: rotate(-18deg) scale(1.22);
  transform-origin: center;
  overflow: hidden;
}

.watermark span {
  align-self: center;
  justify-self: center;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 1px;
}

/* === 侧边栏 === */
.sidebar {
  width: 260px;
  background: var(--nav);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  transition: width 0.2s cubic-bezier(.22,.8,.25,1),
              padding 0.2s cubic-bezier(.22,.8,.25,1),
              transform 0.2s cubic-bezier(.22,.8,.25,1),
              opacity 0.16s ease,
              border-color 0.16s ease;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(59, 109, 255, 0.2) 50%, transparent);
  opacity: 0.5;
}

@media (min-width: 1001px) {
  .app-shell.sidebar-collapsed .sidebar {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    border-color: transparent;
    opacity: 0;
    transform: translateX(-100%);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.3s ease;
}

.brand:hover {
  background: rgba(255, 255, 255, 0.04);
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: #fff;
  font-weight: 700;
}

.brand span {
  display: block;
  color: #8b96a4;
  font-size: 11px;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.workspace-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #5a6371;
  font-weight: 600;
  margin-bottom: 12px;
  padding: 0 12px;
}

/* === 导航项 === */
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: #a5b4c7;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.22, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  font-size: 14px;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: height 0.3s cubic-bezier(0.22, 0.8, 0.25, 1);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(59, 109, 255, 0.15) 0%, rgba(59, 109, 255, 0.08) 100%);
  color: #fff;
  border-color: rgba(59, 109, 255, 0.3);
  box-shadow: 0 4px 12px rgba(59, 109, 255, 0.15);
}

.nav-item.active::before {
  height: 60%;
}

.nav-icon {
  flex: none;
  width: 20px;
  text-align: center;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.nav-item:hover .nav-icon {
  transform: scale(1.1);
}

.nav-label {
  flex: 1;
  font-weight: 500;
}

.nav-indicator {
  position: absolute;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active .nav-indicator {
  opacity: 1;
  transform: scale(1);
}

/* === 导航组（系统管理、内容管理）=== */
.nav-group {
  margin-bottom: 4px;
}

.nav-group-toggle {
  font-weight: 600;
}

.nav-chevron {
  margin-left: auto;
  transition: transform 0.14s ease-out;
  font-size: 18px;
  opacity: 0.6;
}

.nav-group.expanded .nav-chevron {
  transform: rotate(180deg);
}

.nav-subitems {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.18s ease-out, opacity 0.14s ease-out;
  padding-left: 12px;
  margin-top: 4px;
}

.nav-group.expanded .nav-subitems {
  max-height: 500px;
  opacity: 1;
}

.nav-sub {
  font-size: 13px;
  padding: 8px 12px;
}

.nav-nested-group {
  margin: 0 0 4px;
}

.nav-nested-group .nav-group-toggle {
  padding-left: 12px;
  font-size: 13px;
}

.nav-nested-subitems {
  padding-left: 18px;
  margin-top: 2px;
}

.nav-sub-sub {
  font-size: 12px;
  padding: 7px 10px;
}

.table-actions {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.compact-select {
  min-width: 118px;
  height: 32px;
  padding: 0 8px;
  color: #dce3ed;
  background: #171a20;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #e2b34b;
  box-shadow: 0 0 0 3px rgba(226,179,75,.12);
}

.status-dot.online { background: #54d18b; box-shadow: 0 0 0 3px rgba(84,209,139,.12); }
.status-dot.warning { background: #e2b34b; }
.feedback-description { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
.ticket-tabs button { border: 1px solid var(--line, #2b3038); background: transparent; color: var(--muted, #9aa3af); padding: 8px 14px; border-radius: 6px; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.ticket-tabs button:hover, .ticket-tabs button.active { color: var(--text, #f1f3f5); background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.28); }
.ticket-tabs span { display: inline-block; min-width: 1.4em; margin-left: 4px; color: inherit; font-variant-numeric: tabular-nums; }

/* === 侧边栏底部 === */
.sidebar-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profile {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
  color: #fff;
  text-align: left;
}

.profile:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex: none;
  color: #fff;
}

.profile > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.profile strong {
  display: block;
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile small {
  display: block;
  font-size: 11px;
  color: #8b96a4;
  margin-top: 2px;
}

.dots {
  color: #5a6371;
  font-size: 16px;
  flex: none;
}

/* === 侧边栏遮罩（移动端）=== */
.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.sidebar-scrim.active {
  opacity: 1;
  pointer-events: all;
}

/* === 主内容区 === */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: var(--bg);
}

.main.is-refreshing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  animation: loading 1s ease-in-out infinite;
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* === 顶栏 === */
.topbar {
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  opacity: 0.3;
}

.mobile-menu {
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu:hover {
  background: rgba(255, 255, 255, 0.1);
}

.breadcrumb {
  font-size: 14px;
  color: #89929f;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb b {
  color: #fff;
  font-weight: 600;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-tag {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: var(--orange);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.live-tag {
  background: rgba(110, 231, 183, 0.1);
  border-color: rgba(110, 231, 183, 0.3);
  color: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.top-time {
  font-size: 13px;
  color: #89929f;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #a5b4c7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
  font-size: 16px;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.icon-btn.danger:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--red);
}

.refresh-icon {
  display: block;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.icon-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

#refresh-btn.is-refreshing .refresh-icon {
  animation: spin 1s linear infinite;
}

#refresh-btn {
  transition: transform .2s ease, color .2s ease, background-color .2s ease;
}

#refresh-btn:active { transform: scale(.92); }

.content.is-refreshing { opacity: .72; transition: opacity .16s ease; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.logout-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--red);
  font-weight: 500;
  font-size: 13px;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.4);
  transform: translateY(-2px);
}

/* === 内容区 === */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  opacity: 1;
  transform: translateX(0);
}

.content.is-view-leaving {
  opacity: 0;
  transform: translateX(12px);
  pointer-events: none;
  transition: opacity 0.14s ease-in, transform 0.14s ease-in;
}

.content.is-view-entering {
  animation: contentViewIn 0.22s cubic-bezier(.22,.8,.25,1) both;
}

@keyframes contentViewIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.content::-webkit-scrollbar {
  width: 8px;
}

.content::-webkit-scrollbar-track {
  background: transparent;
}

.content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* === 页面头部 === */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 20px;
}

.eyebrow {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.page-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.management-head > .primary-btn {
  width: auto;
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
  flex: none;
}

/* === 指标卡片网格 === */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease;
}

.metric-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 148px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.22, 0.8, 0.25, 1);
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.metric-card:nth-child(1) { animation-delay: 0.05s; }
.metric-card:nth-child(2) { animation-delay: 0.1s; }
.metric-card:nth-child(3) { animation-delay: 0.15s; }
.metric-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 109, 255, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3),
              0 0 40px rgba(59, 109, 255, 0.1);
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.metric-card:hover .card-glow {
  opacity: 0.6;
}

.metric-card.accent {
  background: var(--surface-1);
  border-color: rgba(59, 109, 255, 0.24);
}

.metric-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 8px 24px rgba(59, 109, 255, 0.3);
  color: #fff;
}

.metric-icon.blue {
  background: linear-gradient(135deg, var(--blue) 0%, #0ea5e9 100%);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}

.metric-icon.green {
  background: linear-gradient(135deg, var(--green) 0%, #10b981 100%);
  box-shadow: 0 8px 24px rgba(110, 231, 183, 0.3);
}

.metric-icon.orange {
  background: linear-gradient(135deg, var(--orange) 0%, #f97316 100%);
  box-shadow: 0 8px 24px rgba(251, 146, 60, 0.3);
}

.metric-card > span {
  display: block;
  font-size: 13px;
  color: #89929f;
  max-width: calc(100% - 48px);
  margin-bottom: 10px;
  font-weight: 500;
}

.metric-card > strong {
  display: block;
  font-size: 31px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  margin: 8px 0 2px;
  font-variant-numeric: tabular-nums;
}

.metric-card > small {
  display: block;
  font-size: 12px;
  color: #5a6371;
}

.slash {
  font-size: 24px;
  font-weight: 400;
  opacity: 0.5;
}

.green-text {
  color: var(--green);
  font-weight: 600;
}

/* 小型火花图 */
.spark {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
  padding: 10px;
  opacity: 0.3;
}

.spark span {
  width: 4px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  animation: sparkBar 1.5s ease-in-out infinite;
}

.spark span:nth-child(1) { animation-delay: 0s; }
.spark span:nth-child(2) { animation-delay: 0.1s; }
.spark span:nth-child(3) { animation-delay: 0.2s; }
.spark span:nth-child(4) { animation-delay: 0.3s; }
.spark span:nth-child(5) { animation-delay: 0.4s; }
.spark span:nth-child(6) { animation-delay: 0.5s; }
.spark span:nth-child(7) { animation-delay: 0.6s; }

@keyframes sparkBar {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* === 面板 === */
.panel {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
  animation: fadeInUp 0.6s ease 0.2s backwards;
}

.panel-head {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.01);
}

.panel-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.panel-head p {
  margin: 0;
  font-size: 13px;
  color: #89929f;
}

/* === 曲线图 === */
.chart-panel {
  animation-delay: 0.3s;
}

.chart-wrap {
  padding: 24px;
  position: relative;
}

.y-labels {
  position: absolute;
  left: 24px;
  top: 24px;
  bottom: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11px;
  color: #5a6371;
  font-variant-numeric: tabular-nums;
  z-index: 1;
}

.chart {
  width: 100%;
  height: 240px;
  margin-left: 40px;
  display: block;
}

.chart polyline {
  transition: points 0.8s cubic-bezier(0.22, 0.8, 0.25, 1);
}

.chart path {
  transition: d 0.8s cubic-bezier(0.22, 0.8, 0.25, 1);
}

.chart circle {
  transition: cy 0.8s cubic-bezier(0.22, 0.8, 0.25, 1);
  filter: drop-shadow(0 0 4px rgba(59, 109, 255, 0.6));
}

.x-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  margin-left: 40px;
  font-size: 11px;
  color: #5a6371;
}

/* === 表格 === */
.table-panel {
  animation-delay: 0.4s;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 工单表格在窄屏 WebView 中保持列宽，通过横向滚动避免中文逐字竖排。 */
.ticket-page .table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.ticket-page .data-table {
  min-width: 860px;
  table-layout: auto;
}

.ticket-page .data-table th,
.ticket-page .data-table td {
  white-space: nowrap;
  word-break: keep-all;
  vertical-align: middle;
}

.ticket-page .data-table .feedback-description {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: rgba(255, 255, 255, 0.02);
  position: sticky;
  top: 0;
  z-index: 1;
}

th {
  text-align: left;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #89929f;
  border-bottom: 1px solid var(--line);
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

tbody tr:hover {
  background: rgba(59, 109, 255, 0.05);
}

tbody tr.status-change {
  animation: rowPulse 0.6s ease;
}

@keyframes rowPulse {
  0%, 100% { background: transparent; }
  50% { background: rgba(110, 231, 183, 0.1); }
}

td {
  padding: 16px 24px;
  color: #e4e7eb;
}

.empty-row {
  text-align: center;
  color: #5a6371;
  padding: 48px 24px;
  font-style: italic;
}

/* 服务端行 */
.server-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.server-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
  transition: all 0.3s ease;
}

.server-mark.online {
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.server-mark[data-pulse="true"] {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.server-name strong {
  font-weight: 600;
  color: #fff;
}

/* 服务端分组与详情 */
.service-row {
  cursor: pointer;
}

.service-group-row {
  background: rgba(255, 255, 255, 0.018);
}

.service-group-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.service-group-row td {
  padding: 0;
}

.service-group-toggle {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  text-align: left;
  color: var(--ink);
}

.service-group-toggle strong {
  white-space: nowrap;
  font-size: 13px;
}

.service-group-toggle small {
  color: var(--muted);
  font-size: 11px;
}

.group-chevron {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--blue);
  background: rgba(56, 189, 248, 0.08);
  transition: transform 0.12s ease-out, background 0.12s ease;
}

.service-group-toggle:hover .group-chevron {
  background: rgba(56, 189, 248, 0.16);
}

.service-group-row.collapsed .group-chevron {
  transform: rotate(-90deg);
}

.service-child-row td:first-child {
  padding-left: 56px;
}

.service-child-row:hover .server-name strong {
  color: #fff;
  text-shadow: 0 0 18px rgba(59, 109, 255, 0.35);
}

.service-row-hidden {
  display: none;
}

.service-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: flex-end;
  background: rgba(3, 5, 9, 0.68);
  backdrop-filter: blur(5px);
  animation: drawerBackdropIn 0.26s ease both;
}

.service-drawer-backdrop.closing {
  animation: drawerBackdropOut 0.26s ease both;
}

.service-drawer {
  width: min(440px, 92vw);
  height: 100%;
  padding: max(72px, env(safe-area-inset-top)) 32px max(28px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: rgba(15, 19, 28, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.46);
  animation: drawerIn 0.38s cubic-bezier(.22,.8,.25,1) both;
}

.service-drawer-backdrop.closing .service-drawer {
  animation: drawerOut 0.26s cubic-bezier(.6,.04,.98,.34) both;
}

.drawer-close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 22px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.25s ease;
}

.drawer-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(90deg);
}

.service-drawer h2 {
  margin: 8px 0 4px;
  font-size: 24px;
  color: #fff;
}

.service-drawer > .muted {
  margin: 0 0 28px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.drawer-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.drawer-stat > span {
  color: var(--muted);
  font-size: 12px;
}

.drawer-stat > strong {
  grid-row: span 2;
  font-size: 26px;
  color: #fff;
}

.drawer-stat .state {
  width: max-content;
}

.drawer-chart {
  height: 132px;
  margin: 20px 0;
  padding: 18px 16px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(59, 109, 255, 0.08), transparent);
}

.drawer-bars {
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.drawer-bars i {
  flex: 1;
  min-width: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--blue), var(--accent));
  transform-origin: bottom;
  animation: drawerBarIn 0.55s cubic-bezier(.22,.8,.25,1) both;
}

.drawer-bars i:nth-child(2n) { animation-delay: 35ms; }
.drawer-bars i:nth-child(3n) { animation-delay: 70ms; }

.drawer-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  color: #a5b4c7;
  font-size: 13px;
  font-weight: 500;
}

.drawer-label textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  outline: 0;
  color: #fff;
  background: rgba(7, 10, 16, 0.7);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.drawer-label textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 109, 255, 0.12);
}

.service-drawer > .primary-btn {
  width: 100%;
}

@keyframes drawerBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drawerBackdropOut {
  to { opacity: 0; }
}

@keyframes drawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes drawerOut {
  to { transform: translateX(100%); }
}

@keyframes drawerBarIn {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}

.type-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}

.mono {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: #8b96a4;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.state.online {
  background: rgba(110, 231, 183, 0.1);
  border: 1px solid rgba(110, 231, 183, 0.3);
  color: var(--green);
}

.state.offline {
  background: rgba(137, 146, 159, 0.1);
  border: 1px solid rgba(137, 146, 159, 0.3);
  color: var(--muted);
}

.state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.state.online i {
  animation: pulse 2s ease-in-out infinite;
}

.load {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.load span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green) 0%, var(--blue) 100%);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.22, 0.8, 0.25, 1);
}

/* 用户行 */
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.role-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: var(--orange);
  font-size: 11px;
  font-weight: 600;
}

.row-actions {
  display: flex;
  gap: 8px;
}

/* 角色行 */
.role-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-icon {
  font-size: 20px;
  opacity: 0.6;
}

.code-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 11px;
  color: #a5b4c7;
}

.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(59, 109, 255, 0.2);
  border-radius: 5px;
  background: rgba(59, 109, 255, 0.07);
  color: #aebfe8;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

/* === 管理页：筛选、工具栏与紧凑数据表 === */
.management-search {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 14px 28px;
  margin-bottom: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-1);
}

.management-search label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.management-search input,
.management-search select {
  width: 100%;
  height: 36px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid #34373e;
  border-radius: 6px;
  outline: 0;
  color: var(--ink);
  background: #111216;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.management-search input:focus,
.management-search select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 109, 255, 0.13);
}

.management-search input::placeholder {
  color: #666d79;
}

.search-actions,
.management-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-actions {
  justify-content: flex-end;
}

.primary-btn.compact,
.outline-btn.compact {
  width: auto;
  min-width: 66px;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.management-table-panel {
  border-radius: 7px;
}

.management-toolbar {
  min-height: 56px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
}

.toolbar-spacer {
  flex: 1;
}

.table-count {
  color: var(--muted);
  font-size: 12px;
}

.table-count b {
  color: var(--ink);
  font-weight: 600;
}

.table-tool,
.table-more {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: #aeb4bf;
  background: #202228;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.table-tool:hover,
.table-more:hover {
  color: #fff;
  border-color: #3b404a;
  background: #292c33;
}

.table-tool.is-refreshing {
  animation: spin 0.72s linear infinite;
}

.management-table {
  min-width: 880px;
  table-layout: auto;
}

.management-table th {
  height: 46px;
  padding-top: 9px;
  padding-bottom: 9px;
  color: #bbc1cb;
  background: #141518;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.management-table td {
  height: 58px;
  padding-top: 9px;
  padding-bottom: 9px;
  color: #d9dde4;
  font-size: 12px;
}

.management-table tbody tr {
  transition: background 0.14s ease;
}

.management-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.management-table .select-cell {
  width: 46px;
  text-align: center;
}

.table-check {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 1px solid #4a4e57;
  border-radius: 4px;
  vertical-align: middle;
  background: #141519;
}

.round-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: 4px;
  font-size: 11px;
}

.status-pill.normal {
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
}

.nowrap {
  white-space: nowrap;
}

.action-cell {
  text-align: right;
}

.row-menu {
  position: fixed;
  z-index: 10020;
  width: 128px;
  padding: 5px;
  border: 1px solid #32353c;
  border-radius: 7px;
  background: #17181c;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.46);
  animation: menuIn 0.14s ease-out both;
}

.row-menu button {
  width: 100%;
  padding: 8px 10px;
  border-radius: 5px;
  color: #d9dde4;
  text-align: left;
  font-size: 12px;
}

.row-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.row-menu button.danger {
  color: var(--red);
}

.compact-tags {
  min-width: 220px;
  max-width: 420px;
}

.compact-tags span {
  min-height: 22px;
  padding: 2px 6px;
  font-size: 10px;
}

[hidden] {
  display: none !important;
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === 空状态 === */
.empty-panel {
  padding: 80px 40px;
}

.email-page { width: min(920px, 100%); margin: 0 auto; }
.email-compose-panel,
.email-records-panel { width: 100%; margin-bottom: 18px; }
.email-compose-form { display: grid; gap: 14px; }
.email-compose-form .ui-modal-field { margin: 0; }
.email-compose-form textarea { resize: vertical; min-height: 84px; }
.email-reward-fields { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 0; }
.email-reward-fields legend { padding: 0 6px; color: #cbd5e1; font-size: 13px; }
.reward-command-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.reward-command-list .ui-modal-field { margin: 0; }
.danger-btn { border: 1px solid rgba(248,113,113,.35); background: rgba(127,29,29,.24); color: #fca5a5; }
.danger-btn:hover { background: rgba(127,29,29,.45); }
.email-compose-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.status-badge { border: 1px solid rgba(255,255,255,.12); color: #9ca3af; padding: 5px 10px; border-radius: 999px; font-size: 12px; }
.status-badge.online { color: #86efac; border-color: rgba(134,239,172,.35); }
@media (max-width: 680px) { .email-compose-grid, .reward-command-list { grid-template-columns: 1fr; } }

.empty-state {
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #fff;
}

.empty-state p {
  margin: 0;
  color: #89929f;
  font-size: 14px;
}

/* === 模态框 === */
.ui-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
  overflow-y: auto;
}

.ui-modal-backdrop.closing {
  animation: fadeOut 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; }
}

.ui-modal {
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.ui-modal.form-modal {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ui-modal-backdrop.closing .ui-modal {
  animation: modalSlideOut 0.25s cubic-bezier(0.6, 0.04, 0.98, 0.34);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalSlideOut {
  to {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
}

.modal-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  opacity: 0.6;
}

.ui-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #89929f;
  background: rgba(255, 255, 255, 0.05);
  font-size: 20px;
  transition: all 0.3s ease;
  z-index: 1;
}

.ui-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: rotate(90deg);
}

.ui-modal .eyebrow {
  position: relative;
  z-index: 1;
}

.ui-modal h2 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
}

.ui-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.ui-modal-actions button {
  flex: 1;
}

.outline-btn {
  padding: 12px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e4e7eb;
  font-weight: 500;
  transition: all 0.3s ease;
}

.outline-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* === 表单 === */
.ui-modal-form {
  position: relative;
  z-index: 1;
}

.ui-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ui-modal-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #a5b4c7;
  font-weight: 500;
}

.ui-modal-field input,
.ui-modal-field textarea,
.ui-modal-field select {
  width: 100%;
  background: rgba(15, 19, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
  font-size: 14px;
}

.ui-modal-field input:focus,
.ui-modal-field textarea:focus,
.ui-modal-field select:focus {
  background: rgba(15, 19, 28, 1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 109, 255, 0.1);
}

.ui-modal-field textarea {
  min-height: 100px;
  resize: vertical;
}

.ui-modal-field input::placeholder,
.ui-modal-field textarea::placeholder {
  color: #5a6371;
}

/* 权限复选框 */
.permission-checks {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  background: rgba(15, 19, 28, 0.5);
}

.permission-checks .permission-group { border: 1px solid var(--border, #2a3140); border-radius: 8px; margin: 8px 0; padding: 8px 12px; }
.permission-checks .permission-group summary { cursor: pointer; color: var(--text-strong, #eef1f4); font-weight: 700; list-style: none; }
.permission-checks .permission-group summary::-webkit-details-marker { display: none; }
.permission-checks .permission-group summary::before { content: '›'; display: inline-block; margin-right: 8px; transition: transform .2s ease; }
.permission-checks .permission-group[open] summary::before { transform: rotate(90deg); }
.permission-checks .permission-group .ui-check { margin: 8px 0 2px 18px; }

.permission-checks legend {
  padding: 0 8px;
  font-size: 13px;
  color: #a5b4c7;
  font-weight: 500;
}

.ui-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease;
  font-size: 13px;
  color: #e4e7eb;
}

.ui-check:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ui-check input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* 头像预览 */
.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  margin-top: 8px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.avatar-preview:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 109, 255, 0.3);
}

/* === Toast 通知 === */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4),
              0 0 1px rgba(255, 255, 255, 0.1) inset;
  min-width: 280px;
  max-width: 400px;
  opacity: 0;
  transform: translateX(100%) translateY(-20px);
  pointer-events: all;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.toast-show {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

.toast.toast-hide {
  opacity: 0;
  transform: translateX(100%);
}

.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  flex: none;
}

.toast-success .toast-icon {
  background: rgba(110, 231, 183, 0.2);
  color: var(--green);
}

.toast-error .toast-icon {
  background: rgba(248, 113, 113, 0.2);
  color: var(--red);
}

.toast-warning .toast-icon {
  background: rgba(251, 146, 60, 0.2);
  color: var(--orange);
}

.toast-info .toast-icon {
  background: rgba(56, 189, 248, 0.2);
  color: var(--blue);
}

.toast-message {
  flex: 1;
  font-size: 14px;
  color: #e4e7eb;
  font-weight: 500;
}

/* === 动画工具类 === */
.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.page-enter {
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

/* === 响应式设计 === */
@media (max-width: 1000px) {
  .sidebar {
    width: 260px;
    padding: 24px 16px;
    opacity: 1;
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 999;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    display: block;
  }

  .topbar {
    padding: 0 14px;
  }

  .content {
    padding: 20px 16px;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .management-head {
    width: 100%;
    flex-direction: row;
    align-items: flex-end;
  }

  .management-head > div {
    min-width: 0;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .chart-wrap {
    padding: 16px;
  }

  .chart {
    margin-left: 0;
  }

  .y-labels {
    left: 16px;
  }

  .x-labels {
    margin-left: 0;
  }

  table {
    font-size: 12px;
  }

  th, td {
    padding: 12px 16px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
  }

  .toast {
    min-width: 0;
  }
}

/* === 轻量灰黑主题与可排序导航 === */
:root {
  --blue: #a8b0bb;
  --accent: #858d98;
  --glow: rgba(160, 170, 184, 0.18);
}
.sidebar { width: 232px; padding: 18px 12px; }
.brand { gap: 10px; margin-bottom: 24px; padding: 6px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.workspace-label { margin-bottom: 8px; padding: 0 10px; }
.nav-item { gap: 10px; padding: 8px 10px; margin-bottom: 2px; border-radius: 6px; }
.nav-item:hover { transform: none; background: rgba(255,255,255,.055); }
.nav-item.active { background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.13); box-shadow: none; }
.nav-item.active::before { background: #d6dbe2; }
.nav-subitems { padding-left: 10px; margin-top: 2px; }
.nav-sub { padding: 7px 10px; font-size: 12px; }
.nav-entry [draggable="true"] { cursor: grab; }
.nav-entry [draggable="true"]:active { cursor: grabbing; }
.nav-entry .is-dragging { opacity: .45; }
.nav-entry .drag-over { outline: 1px dashed rgba(255,255,255,.55); outline-offset: 2px; }
.breadcrumb { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.1; }
.breadcrumb small { color: #69717c; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.breadcrumb-separator { display: none; }
.breadcrumb b { font-size: 14px; }
.chart polyline { stroke: #ef4444; }
.chart circle { stroke: #ef4444; filter: drop-shadow(0 0 4px rgba(239,68,68,.45)); }
.service-group-controls { display: flex; align-items: center; width: 100%; }
.service-group-controls .service-group-toggle { flex: 1; }
.service-group-note { margin: 0 18px 0 8px; padding: 5px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 5px; color: var(--muted); background: transparent; font-size: 11px; opacity: .75; }
.service-group-note:hover { color: var(--ink); border-color: rgba(255,255,255,.3); opacity: 1; }

.billing-page .page-head .muted { margin: 6px 0 0; }
.data-source-badge { align-self: flex-start; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: var(--muted); font-size: 11px; padding: 5px 10px; }
.billing-chart-panel { min-height: 260px; }
.billing-chart { display: block; width: 100%; height: 220px; margin-top: 18px; color: #e05b5b; overflow: visible; }
.billing-chart polyline { stroke-dasharray: 900; stroke-dashoffset: 900; animation: billing-line-in 900ms cubic-bezier(.22,.8,.25,1) forwards; }
.billing-chart-empty { min-height: 220px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
@keyframes billing-line-in { to { stroke-dashoffset: 0; } }
.module-placeholder { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.module-placeholder-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 24px; }
.module-placeholder h2, .module-placeholder p { margin: 0; }
.module-placeholder p { color: var(--muted); font-size: 13px; }

@media (max-width: 1000px) {
  .sidebar { width: min(232px, 82vw); padding: 18px 12px; }
}

@media (max-width: 700px) {
  .human-check-card {
    width: calc(100vw - 24px);
    padding: 34px 20px 28px;
    border-radius: 15px;
  }

  .human-check-card h1 { font-size: 21px; }

  .login-content {
    padding: 24px 20px;
    gap: 32px;
  }

  .login-logo {
    width: 72px;
    height: 72px;
  }

  .title-main {
    font-size: 24px;
  }

  .login-form-card {
    padding: 24px;
  }

  .page-head h1 {
    font-size: 24px;
  }

  .metric-card > strong {
    font-size: 26px;
  }

  .ui-modal {
    padding: 24px;
    margin: 16px;
  }

  .ui-modal h2 {
    font-size: 20px;
  }

  .breadcrumb {
    min-width: 0;
    gap: 5px;
    font-size: 11px;
    white-space: nowrap;
  }

  .breadcrumb b {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-time {
    display: none;
  }

  .topbar {
    height: 52px;
    gap: 9px;
    padding: 0 10px;
  }

  .mobile-menu {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    font-size: 17px;
  }

  .top-actions {
    gap: 7px;
  }

  .demo-tag {
    display: none;
  }

  .top-actions .icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    font-size: 14px;
  }

  .logout-btn {
    min-width: 44px;
    padding: 6px 9px;
    border-radius: 7px;
    font-size: 11px;
    white-space: nowrap;
  }

  .content {
    padding: 18px 12px;
  }

  .page-head {
    margin-bottom: 18px;
  }

  .metric-grid {
    gap: 10px;
    margin-bottom: 18px;
  }

  .metric-card {
    min-height: 128px;
    padding: 14px;
  }

  .metric-card > span {
    max-width: calc(100% - 38px);
    font-size: 11px;
  }

  .metric-card > small {
    font-size: 10px;
  }

  .metric-icon {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 7px;
    font-size: 17px;
    box-shadow: 0 5px 16px rgba(59, 109, 255, 0.24);
  }

  .slash {
    font-size: 18px;
  }

  .spark {
    height: 38px;
    padding: 8px;
  }

  .roles-panel {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .roles-panel .table-scroll {
    overflow: visible;
  }

  .roles-table,
  .roles-table tbody {
    display: block;
    width: 100%;
  }

  .roles-table thead {
    display: none;
  }

  .roles-table tbody {
    display: grid;
    gap: 10px;
  }

  .roles-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-1);
  }

  .roles-table tbody tr:hover {
    background: var(--surface-1);
  }

  .roles-table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .roles-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .roles-table td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .roles-table td:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 3;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .roles-table .role-actions-cell {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: start;
  }

  .roles-table .row-actions {
    gap: 6px;
  }

  .roles-table .icon-btn {
    width: 32px;
    height: 32px;
  }

  .role-name strong,
  .code-pill,
  .permission-tags span {
    white-space: nowrap;
    word-break: keep-all;
  }

  .watermark {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 138px;
    gap: 34px 24px;
    opacity: 0.043;
    transform: rotate(-20deg) scale(1.28);
  }

  .watermark span {
    font-size: 15px;
    font-weight: 300;
  }

  .services-panel {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .services-panel .panel-head {
    padding: 16px 2px 12px;
    border: 0;
    background: transparent;
  }

  .services-panel .table-scroll {
    overflow: visible;
  }

  .services-panel table,
  .services-panel tbody {
    display: block;
    width: 100%;
  }

  .services-panel thead {
    display: none;
  }

  .service-group-row {
    display: block;
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    background: var(--surface-2);
  }

  .service-group-row.collapsed {
    border-radius: 8px;
  }

  .service-group-row td,
  .service-group-toggle {
    display: block;
    width: 100%;
  }

  .service-group-toggle {
    display: flex;
    min-height: 46px;
    padding: 10px 12px;
  }

  .service-child-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    min-height: 0;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-top: 0;
    background: var(--surface-1);
  }

  .service-child-row:last-child {
    border-radius: 0 0 8px 8px;
  }

  .service-child-row td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .service-child-row td:first-child {
    grid-column: 1;
    padding-left: 0;
  }

  .service-child-row td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .service-child-row td:nth-child(3) {
    display: none;
  }

  .service-child-row td:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
    font-size: 12px;
  }

  .service-child-row td:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
  }

  .service-child-row td:nth-child(6) {
    display: none;
  }

  .service-row-hidden {
    display: none;
  }

  .service-child-row td:first-child {
    padding-left: 0;
  }

  .service-group-toggle {
    padding-inline: 16px;
  }

  .service-drawer {
    width: 100%;
    padding: max(66px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    border-left: 0;
  }
}

@media (max-width: 700px) {
  .management-search {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px;
  }

  .management-search label {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .search-actions {
    justify-content: flex-end;
  }

  .management-toolbar {
    min-height: 52px;
    padding: 8px 12px;
  }

  .management-table-panel,
  .roles-panel.management-table-panel {
    border: 1px solid var(--line);
    background: var(--surface-1);
    overflow: hidden;
  }

  .management-table-panel .table-scroll,
  .roles-panel.management-table-panel .table-scroll {
    display: block;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .management-table,
  .roles-table.management-table {
    display: table;
    width: 100%;
    min-width: 820px;
  }

  .management-table thead,
  .roles-table.management-table thead {
    display: table-header-group;
  }

  .management-table tbody,
  .roles-table.management-table tbody {
    display: table-row-group;
  }

  .management-table tr,
  .roles-table.management-table tbody tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .management-table th,
  .management-table td,
  .roles-table.management-table td {
    display: table-cell;
    min-width: 0;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
  }

  .roles-table.management-table td:nth-child(n),
  .roles-table.management-table .role-actions-cell {
    grid-column: auto;
    grid-row: auto;
  }

  .compact-tags {
    min-width: 200px;
  }
}

/* === 无障碍访问 === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .login-logo {
    animation: none;
  }

  .spark span {
    animation: none;
  }
}

/* === 打印样式 === */
@media print {
  .sidebar,
  .topbar,
  .watermark,
  .ui-modal-backdrop,
  .toast-container,
  #three-container {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .main {
    overflow: visible;
  }

  .content {
    padding: 0;
  }
}

/* === 性能优化提示 === */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* 硬件加速 */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* === 终版灰黑后台覆盖层 === */
:root {
  --bg: #0a0a0b;
  --surface-1: #111214;
  --surface-2: #171819;
  --surface-3: #1d1f21;
  --panel: #141516;
  --nav: #101112;
  --line: #2b2d30;
  --ink: #e7e8ea;
  --muted: #8c9198;
  --blue: #aeb4bc;
  --accent: #9ca3ad;
  --glow: rgba(190, 196, 204, 0.16);
}

body,
.app-shell,
.main,
.content { background: var(--bg); }

.sidebar { width: 224px; padding: 16px 10px; background: #101112; border-right-color: #242629; }
.sidebar::before { background: linear-gradient(180deg, transparent, rgba(255,255,255,.10) 50%, transparent); }
.brand { margin-bottom: 20px; padding: 5px 6px; }
.brand img { width: 38px; height: 38px; border-radius: 9px; }
.workspace-label { margin-bottom: 6px; padding: 0 9px; color: #777c83; }
.nav-group { margin-bottom: 1px; }
.nav-item { gap: 9px; padding: 7px 9px; margin-bottom: 1px; border-radius: 5px; color: #b0b4ba; font-size: 13px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #f0f1f2; }
.nav-item.active { background: rgba(255,255,255,.085); border-color: rgba(255,255,255,.14); box-shadow: none; }
.nav-item.active::before { background: #dfe2e6; }
.nav-icon { width: 18px; font-size: 14px; }
.nav-label { font-weight: 500; }
.nav-subitems { padding-left: 9px; margin-top: 1px; }
.nav-sub { padding: 6px 9px; font-size: 12px; }
.nav-chevron { font-size: 15px; }
.nav-indicator { width: 5px; height: 5px; background: #d8dce1; }
.sidebar-bottom { padding-top: 12px; }

.topbar { background: #111214; border-bottom-color: #292b2e; }
.breadcrumb small { color: #8c9198; }
.breadcrumb b { color: #f0f1f2; }
.panel,
.metric-card,
.management-search,
.email-compose-panel,
.service-drawer { background: #151617; border-color: #2b2d30; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.metric-card:hover { border-color: #4a4d51; box-shadow: 0 12px 28px rgba(0,0,0,.28); }
.metric-card.accent { background: #151617; border-color: #36383b; }
.metric-icon,
.metric-icon.blue,
.metric-icon.green,
.metric-icon.orange { background: #242629; box-shadow: none; color: #d7dbe0; }
.type-pill { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #c5c9cf; }
.drawer-chart { background: linear-gradient(180deg, rgba(255,255,255,.05), transparent); }
.drawer-bars i { background: linear-gradient(180deg, #b5bbc3, #686e76); }
.ui-modal,
.login-form-card,
.human-check-card { background: #151617; border-color: #303236; }
.form-field input,
.form-field textarea,
.form-field select,
.ui-modal input,
.ui-modal textarea,
.ui-modal select,
.drawer-label textarea { background: #101112; border-color: #303236; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.ui-modal input:focus,
.ui-modal textarea:focus,
.ui-modal select:focus,
.drawer-label textarea:focus { border-color: #707780; box-shadow: 0 0 0 3px rgba(190,196,204,.12); }
.outline-btn,
.icon-btn,
.table-tool,
.drawer-close,
.service-group-note { color: #c0c5cb; border-color: #3a3d41; background: rgba(255,255,255,.025); }
.primary-btn,
.login-btn { background: #3b6dff; color: #fff; }
.primary-btn:hover,
.login-btn:hover { background: #4c7aff; }
.chart circle { filter: drop-shadow(0 0 4px rgba(239,68,68,.42)); }

@media (max-width: 1000px) { .sidebar { width: min(224px, 82vw); padding: 16px 10px; } }
