@charset "UTF-8";

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bg-deep: #070b1d;
  --bg-mid: #0c1228;
  --theme-1: 48, 91, 255;
  --theme-2: 137, 65, 226;
  --theme-3: 35, 183, 255;
  --glass: rgba(14, 20, 42, 0.72);
  --glass-light: rgba(255, 255, 255, 0.06);
  --card: rgba(18, 26, 48, 0.88);
  --card-hover: rgba(22, 32, 58, 0.95);
  --text: #f0f3ff;
  --text-soft: #c8d0e8;
  --muted: #8b96b0;
  --line: rgba(255, 255, 255, 0.08);
  --line-bright: rgba(var(--theme-1), 0.25);
  --primary: rgb(var(--theme-1));
  --primary-2: rgb(var(--theme-2));
  --accent: rgb(var(--theme-3));
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(var(--theme-1), 0.15);
  --radius: 18px;
  --sidebar-w: 260px;
  --topbar-h: 72px;
  --mobile-nav-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --status-gap: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] { display: none !important; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: rgba(var(--theme-1), 0.12);
  padding: 0.15em 0.45em;
  border-radius: 6px;
  color: var(--accent);
}

/* —— 背景层 —— */
.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
  contain: strict;
}

.ambient-layer {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: ambientDrift 22s ease-in-out infinite;
}
.ambient-a {
  width: 55vw; height: 55vw; max-width: 680px; max-height: 680px;
  left: -15vw; top: -10vw;
  background: radial-gradient(circle, rgba(var(--theme-2), 0.35), transparent 70%);
}
.ambient-b {
  width: 45vw; height: 45vw; max-width: 560px; max-height: 560px;
  right: -12vw; bottom: -8vw;
  background: radial-gradient(circle, rgba(var(--theme-1), 0.28), transparent 70%);
  animation-delay: -6s;
}
.ambient-c {
  width: 35vw; height: 35vw; max-width: 420px; max-height: 420px;
  left: 40%; top: 50%;
  background: radial-gradient(circle, rgba(var(--theme-3), 0.15), transparent 70%);
  animation-delay: -12s;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent);
  pointer-events: none;
}

.scan-line {
  position: fixed;
  left: 0; right: 0;
  height: 2px;
  top: 0;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(var(--theme-3), 0.35), transparent);
  animation: scanDown 10s linear infinite;
  pointer-events: none;
  opacity: 0.45;
  will-change: transform, opacity;
  transform: translate3d(0, -2px, 0);
}

@keyframes ambientDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(24px, -16px, 0) scale(1.04); }
  66% { transform: translate3d(-16px, 20px, 0) scale(0.98); }
}
@keyframes scanDown {
  0% { transform: translate3d(0, -2px, 0); opacity: 0; }
  5% { opacity: 0.45; }
  95% { opacity: 0.45; }
  100% { transform: translate3d(0, 100vh, 0); opacity: 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes slotPop {
  0% { transform: scale(0.7); opacity: 0.5; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes tileEnter {
  from { opacity: 0; transform: rotate(var(--rot, 0deg)) scale(0.6); }
  to { opacity: 1; transform: rotate(var(--rot, 0deg)) scale(1); }
}
@keyframes countGlow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 20px rgba(var(--theme-3), 0.4); }
}

.reveal-text {
  animation: fadeUp 0.7s var(--ease-out) both;
}
.reveal-up {
  animation: fadeUp 0.8s var(--ease-out) both;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.35s; }

.shake-target.shake { animation: shake 0.45s ease; }

/* —— 玻璃面板 —— */
.glass-panel {
  background: linear-gradient(145deg, rgba(18, 26, 52, 0.94), rgba(12, 18, 38, 0.9));
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,0.06);
}
.glass-inset {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}
.glass-sidebar {
  background: linear-gradient(180deg, rgba(10, 16, 36, 0.92), rgba(8, 12, 28, 0.95));
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
}
.glass-topbar {
  background: linear-gradient(180deg, rgba(8, 14, 32, 0.85), rgba(8, 14, 32, 0.45));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.glass-bottom {
  background: rgba(10, 16, 36, 0.92);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid var(--line);
}

/* —— 登录页 —— */
.login-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(20px, calc(var(--safe-top) + 16px)) 20px max(24px, calc(var(--safe-bottom) + 16px));
  position: relative;
  z-index: 2;
}

.login-shell {
  width: min(440px, 100%);
}

.login-hero { display: none; }

.login-panel {
  width: 100%;
  display: grid;
  place-items: center;
}

@media (min-width: 769px) {
  .login-view {
    padding: 0;
    display: block;
  }
  .login-shell {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .login-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    background:
      radial-gradient(ellipse 80% 60% at 20% 30%, rgba(var(--theme-1), 0.35), transparent 55%),
      radial-gradient(ellipse 70% 50% at 80% 70%, rgba(var(--theme-2), 0.28), transparent 50%),
      linear-gradient(145deg, rgba(12, 20, 48, 0.95), rgba(20, 28, 60, 0.88));
    border-right: 1px solid var(--line);
  }
  .login-hero-inner {
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.7s var(--ease-out) both;
  }
  .login-hero-visual {
    position: relative;
    height: 220px;
    margin-bottom: 28px;
  }
  .hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(32px);
    will-change: transform;
    animation: heroOrb 10s ease-in-out infinite;
  }
  .hero-orb-a {
    width: 140px; height: 140px;
    top: 10%; left: 15%;
    background: rgba(var(--theme-3), 0.35);
  }
  .hero-orb-b {
    width: 120px; height: 120px;
    bottom: 5%; right: 10%;
    background: rgba(var(--theme-1), 0.3);
    animation-delay: -3s;
  }
  .hero-card-float {
    position: absolute;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: heroFloat 5s ease-in-out infinite;
  }
  .hero-card-1 { width: 72px; height: 48px; top: 18%; right: 18%; animation-delay: 0.5s; }
  .hero-card-2 { width: 56px; height: 56px; bottom: 22%; left: 12%; animation-delay: 1.2s; }
  .hero-logo-big {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 96px; height: 96px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgb(var(--theme-3)), rgb(var(--theme-1)));
    display: grid;
    place-items: center;
    box-shadow: 0 24px 48px rgba(var(--theme-1), 0.45);
    animation: logoFloat 3s ease-in-out infinite;
  }
  .hero-logo-big svg { width: 42px; height: 42px; color: #fff; }
  .login-hero-title {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 20%, rgba(var(--theme-3), 0.95));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .login-hero-desc {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
  }
  .login-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .login-hero-tags li {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(var(--theme-1), 0.15);
    border: 1px solid rgba(var(--theme-1), 0.25);
  }
  .login-panel {
    padding: 40px 48px;
    background: rgba(8, 12, 28, 0.4);
  }
  .login-card {
    width: min(400px, 100%);
  }
  .login-brand-compact { text-align: left; }
  .login-brand-compact h1 { font-size: 1.45rem; margin-top: 0; }
}

@keyframes heroOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -8px) scale(1.08); }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.login-card {
  width: min(440px, 100%);
  border-radius: calc(var(--radius) + 6px);
  padding: 38px 32px 30px;
  position: relative;
  overflow: hidden;
  animation: scaleIn 0.65s var(--ease-out);
}
.login-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(var(--theme-1), 0.12), rgba(var(--theme-2), 0.08), rgba(var(--theme-3), 0.1));
  pointer-events: none;
  opacity: 0.85;
}

.login-brand { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; }
.login-brand h1 {
  margin: 16px 0 8px;
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, rgba(var(--theme-3), 0.9));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-brand p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.logo-orbit {
  width: 76px; height: 76px;
  margin: 0 auto;
  position: relative;
  display: grid;
  place-items: center;
}
.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(var(--theme-3), 0.35);
  animation: spin 10s linear infinite;
}
.orbit-dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--theme-3), 0.8);
}
.orbit-dot-a { top: 4px; left: 50%; transform: translateX(-50%); animation: pulse 2s ease infinite; }
.orbit-dot-b { bottom: 8px; right: 8px; animation: pulse 2s ease infinite 0.5s; }
.logo-core {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgb(var(--theme-3)), rgb(var(--theme-1)) 50%, rgb(var(--theme-2)));
  display: grid;
  place-items: center;
  box-shadow: 0 12px 36px rgba(var(--theme-1), 0.4);
  animation: logoFloat 3s ease-in-out infinite;
}
.logo-core svg { width: 26px; height: 26px; fill: #fff; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }

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

.input-field {
  display: block;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.input-field span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 500;
}
.input-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s, transform 0.15s;
}
.input-field input::placeholder { color: rgba(139, 150, 176, 0.6); }
.input-field input:focus {
  outline: none;
  border-color: rgba(var(--theme-1), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--theme-1), 0.15), 0 8px 24px rgba(var(--theme-1), 0.1);
  background: rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.form-error {
  color: var(--danger);
  font-size: 0.86rem;
  margin: 12px 0 0;
  text-align: center;
}
.login-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

/* 验证码 */
.captcha-block {
  margin: 18px 0 20px;
  padding: 16px;
  position: relative;
  z-index: 1;
}
.captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.captcha-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
  animation: pulse 2s infinite;
}
.captcha-refresh {
  border: none;
  background: rgba(var(--theme-1), 0.12);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s, transform 0.15s;
}
.captcha-refresh:hover { background: rgba(var(--theme-1), 0.22); }
.captcha-refresh:active { transform: scale(0.96); }
.captcha-refresh.spin svg { animation: spin 0.6s ease; }

.captcha-hint {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}
.captcha-hint strong { color: var(--accent); }
.captcha-hint em { color: var(--text-soft); font-style: normal; }

.captcha-slots {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 48px;
  justify-content: center;
}
.captcha-slot {
  width: 48px; height: 48px;
  border-radius: 14px;
  border: 2px dashed rgba(var(--theme-1), 0.3);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.2);
  transition: transform 0.25s var(--ease-out), opacity 0.2s, border-color 0.25s, box-shadow 0.25s;
}
.captcha-slot.filled {
  border-style: solid;
  border-color: rgba(var(--theme-3), 0.6);
  box-shadow: 0 8px 24px rgba(var(--theme-1), 0.25);
  animation: slotPop 0.35s var(--ease-spring);
}

.captcha-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.captcha-tile {
  aspect-ratio: 1;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, hsl(var(--hue, 240) 75% 52%), hsl(calc(var(--hue, 240) + 30) 70% 42%));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.25s var(--ease-spring), opacity 0.2s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
  animation: tileEnter 0.45s var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
  touch-action: manipulation;
}
.captcha-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 50%);
  pointer-events: none;
}
.captcha-tile:hover:not(:disabled) {
  transform: rotate(0deg) scale(1.08);
  box-shadow: 0 16px 32px rgba(var(--theme-1), 0.35);
}
.captcha-tile:active:not(:disabled) { transform: rotate(0deg) scale(0.95); }
.captcha-tile:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: rotate(0deg) scale(0.9);
}

.captcha-clear {
  margin-top: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  width: 100%;
  padding: 6px;
  transition: color 0.2s;
}
.captcha-clear:hover { color: var(--accent); }

/* 登录验证触发按钮 */
.captcha-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(var(--theme-1), 0.35);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.25s, background 0.25s, transform 0.15s;
  position: relative;
  z-index: 1;
}
.captcha-trigger:hover {
  border-color: rgba(var(--theme-3), 0.5);
  background: rgba(var(--theme-1), 0.1);
}
.captcha-trigger.verified {
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.08);
  color: var(--success);
}
.captcha-trigger-icon { font-size: 1.1rem; opacity: 0.85; }
.captcha-trigger-ok {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--success);
}

/* 验证码弹窗 */
.captcha-modal-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
.captcha-modal-root[hidden] { display: none !important; }
body.captcha-open { overflow: hidden; }

.captcha-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.captcha-modal-panel {
  position: relative;
  width: min(380px, 100%);
  border-radius: calc(var(--radius) + 4px);
  padding: 0;
  overflow: hidden;
  animation: scaleIn 0.35s var(--ease-out);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.captcha-modal-panel.captcha-timeout { opacity: 0.92; }

.captcha-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.captcha-modal-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  flex: 1;
}
.captcha-timer {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--theme-1), 0.15);
}
.captcha-timer span { font-variant-numeric: tabular-nums; }
.captcha-modal-close {
  width: 32px; height: 32px;
  font-size: 1.25rem;
  line-height: 1;
}

.captcha-modal-body { padding: 18px; }
.captcha-modal-tip {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
}
.captcha-target-wrap {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(var(--theme-1), 0.12);
  border: 1px solid rgba(var(--theme-3), 0.28);
  text-align: center;
}
.captcha-target-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.08em;
}
.captcha-target-text {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.45em;
  color: #fff;
  text-indent: 0.45em;
  text-shadow: 0 0 24px rgba(var(--theme-3), 0.35);
}
.captcha-modal-error {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--danger);
}
.captcha-modal-lockout {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--warning);
}
.captcha-slots-modal { margin-bottom: 12px; }

.captcha-stage {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 14px;
  background: #0a1020;
}

.captcha-img-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
}

.captcha-image {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  user-select: none;
  -webkit-user-drag: none;
}

.captcha-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.captcha-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(35, 183, 255, 0.88);
  border: 2px solid #fff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.captcha-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.captcha-modal-actions .btn-primary { flex: 1; min-width: 100px; }

/* —— 按钮 —— */
.btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-out), box-shadow 0.25s, filter 0.2s;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(100deg, rgb(var(--theme-3)), rgb(var(--theme-1)) 50%, rgb(var(--theme-2)));
  color: #fff;
  box-shadow: 0 12px 32px rgba(var(--theme-1), 0.35);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 16px 40px rgba(var(--theme-1), 0.45); }
.btn-glow .btn-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  border: 1px solid var(--line);
}
.btn-ghost-outline {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.btn-ghost-outline:hover { border-color: var(--line-bright); color: var(--text); }
.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  border: 1px solid var(--line);
}
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 0.84rem; }
.btn-block { width: 100%; }
.btn-icon { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn {
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-soft);
  transition: background 0.2s, transform 0.15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.icon-btn:active { transform: scale(0.92); }

/* —— 主布局 —— */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 2;
}

.sidebar {
  border-right: 1px solid var(--line);
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 50;
  transition: transform 0.28s cubic-bezier(.2, .72, .2, 1);
  will-change: transform;
}
.sidebar-close {
  display: none;
  place-items: center;
  margin-left: auto;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #c5cde0;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(var(--theme-1), 0.45);
  color: #fff;
}
.sidebar-close:active { transform: scale(0.9); }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 24px;
}
.brand-logo-mini {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(var(--theme-3)), rgb(var(--theme-1)));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(var(--theme-1), 0.35);
  flex-shrink: 0;
}
.brand-logo-mini svg { width: 18px; height: 18px; color: #fff; }
.sidebar-brand strong { display: block; font-size: 1.05rem; color: #fff; }
.sidebar-brand span { font-size: 0.72rem; color: var(--muted); }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.nav-item {
  border: none;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: color 0.25s, transform 0.2s var(--ease-out);
  touch-action: manipulation;
}
.nav-item:hover { color: #fff; transform: translateX(3px); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(var(--theme-3), 0.2), rgba(var(--theme-1), 0.18));
  box-shadow: inset 0 0 0 1px rgba(var(--theme-1), 0.25), 0 8px 24px rgba(var(--theme-1), 0.12);
}
.nav-item.active .nav-glow {
  opacity: 1;
}
.nav-glow {
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 60%;
  transform: translateY(-50%);
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, rgb(var(--theme-3)), rgb(var(--theme-1)));
  opacity: 0;
  transition: opacity 0.25s;
}
.nav-icon-wrap {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.04);
  transition: background 0.25s;
}
.nav-item.active .nav-icon-wrap {
  background: rgba(var(--theme-1), 0.2);
}
.nav-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
  animation: pulse 2s infinite;
}
.sidebar-foot { padding: 12px 6px 4px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.3s;
}
.sidebar-backdrop.show { display: block; opacity: 1; }

.main-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  min-height: var(--topbar-h);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.menu-toggle { display: none; }
.topbar h2 {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.topbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--success);
}
.live-pill i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.3);
  animation: pulse 2s infinite;
}

.page-content {
  padding: 8px 24px calc(32px + var(--safe-bottom));
  flex: 1;
}
.page-content.page-enter {
  animation: fadeUp 0.45s var(--ease-out);
}
.page-content.page-exit {
  animation: fadeIn 0.15s reverse;
}

/* 移动端底部导航 */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 6px 6px calc(6px + var(--safe-bottom));
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  background: rgba(10, 14, 24, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.mob-nav-item {
  border: none;
  background: transparent;
  color: #8b96b0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 2px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
  touch-action: manipulation;
}
.mob-nav-item span {
  font-size: 1.02rem;
  line-height: 1;
  font-weight: 500;
}
.mob-nav-item small {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.mob-nav-item.active {
  color: #e8eef8;
  background: rgba(255, 255, 255, 0.06);
}
.mob-nav-item:active { transform: none; background: rgba(255, 255, 255, 0.08); }

/* —— 统计卡片 —— */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s, background 0.3s;
  animation: fadeUp 0.5s var(--ease-out) both;
  animation-delay: var(--stagger, 0ms);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--theme-1), 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35), 0 0 30px rgba(var(--theme-1), 0.08);
  background: var(--card-hover);
}
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.stat-icon.purple { background: linear-gradient(135deg, rgb(var(--theme-1)), rgb(var(--theme-2))); box-shadow: 0 8px 20px rgba(var(--theme-1), 0.3); }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3); }
.stat-icon.blue { background: linear-gradient(135deg, rgb(var(--theme-3)), #38bdf8); box-shadow: 0 8px 20px rgba(var(--theme-3), 0.3); }

.stat-label { display: block; font-size: 0.76rem; color: var(--muted); position: relative; z-index: 1; }
.stat-value {
  display: block;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  margin-top: 4px;
  line-height: 1.1;
  font-weight: 800;
  position: relative;
  z-index: 1;
  animation: countGlow 3s ease-in-out infinite;
}
.stat-foot { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 6px; position: relative; z-index: 1; }

.stat-card[data-stat="online"] .stat-icon {
  animation: onlinePulse 2.4s ease-in-out infinite;
}
@keyframes onlinePulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(var(--theme-3), 0.3); }
  50% { box-shadow: 0 8px 26px rgba(56, 189, 248, 0.55); }
}

/* —— 面板 & 表格 —— */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  animation: fadeUp 0.5s var(--ease-out) both;
  animation-delay: var(--stagger, 0ms);
  transition: border-color 0.3s;
}
.panel:hover { border-color: rgba(255,255,255,0.12); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.panel-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.panel-body { padding: 16px 20px 20px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar input, .toolbar select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(12, 18, 28, 0.92);
  color: var(--text);
  min-width: 140px;
  transition: border-color 0.2s, box-shadow 0.2s;
  color-scheme: dark;
}
.toolbar input:focus, .toolbar select:focus {
  outline: none;
  border-color: rgba(var(--theme-1), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--theme-1), 0.1);
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th, .data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.data-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table tbody tr {
  transition: background 0.2s;
  animation: fadeUp 0.4s var(--ease-out) both;
  animation-delay: var(--row-delay, 0ms);
}
.data-table tbody tr:hover td { background: rgba(var(--theme-1), 0.06); }

/* 移动端卡片列表 */
.card-list { display: none; flex-direction: column; gap: 12px; }
.data-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  animation: fadeUp 0.4s var(--ease-out) both;
  animation-delay: var(--row-delay, 0ms);
  transition: border-color 0.2s, transform 0.2s;
}
.data-card:active { transform: scale(0.99); }
.data-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.data-card-title { font-weight: 700; font-size: 0.95rem; }
.data-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.data-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}
.tag.active { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.tag.void { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.tag.banned { background: rgba(139, 150, 176, 0.15); color: #94a3b8; }
.tag.trial { background: rgba(var(--theme-3), 0.15); color: #7dd3fc; }
.tag.forever { background: rgba(var(--theme-2), 0.15); color: #c4b5fd; }
.tag.once { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.tag.new { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.tag.processing { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.tag.resolved { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.tag.archived { background: rgba(139, 150, 176, 0.12); color: #94a3b8; }
.tag.online { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; }
.tag.offline { background: rgba(139, 150, 176, 0.12); color: #94a3b8; }

.device-cell { max-width: 240px; }
.device-link {
  display: inline;
  max-width: 220px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-link:hover { color: var(--accent); }
.device-link.is-empty { color: var(--muted); }

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

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 16px;
  font-size: 0.84rem;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  background: var(--card, #121a30);
  z-index: 4;
}
.pagination-info { margin-right: auto; }
.pagination-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pagination-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}
.pagination-jump input {
  width: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  text-align: center;
}
.pagination select,
.pagination .ui-dd {
  min-width: 110px;
  margin-top: 0;
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  color-scheme: dark;
}

/* 原生 select 隐藏，由自定义暗色下拉接管 */
select.ui-select-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0);
}

.ui-dd {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 6px;
  z-index: 1;
}
.toolbar .ui-dd {
  margin-top: 0;
  width: auto;
  min-width: 140px;
  flex: 0 0 auto;
  z-index: 5;
}
.ui-dd.is-open { z-index: 80; }

.ui-dd-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(120, 150, 200, 0.28);
  border-radius: 12px;
  padding: 10px 34px 10px 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%89a0b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
      right 12px center / 12px no-repeat,
    linear-gradient(180deg, rgba(18, 26, 40, 0.98), rgba(10, 14, 24, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  font: inherit;
}
.ui-dd-sm .ui-dd-trigger {
  padding: 9px 32px 9px 12px;
  font-size: 0.86rem;
  border-radius: 11px;
}
.ui-dd-trigger:hover {
  border-color: rgba(var(--theme-1), 0.45);
}
.ui-dd.is-open .ui-dd-trigger,
.ui-dd-trigger:focus-visible {
  outline: none;
  border-color: rgba(var(--theme-1), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--theme-1), 0.18);
}
.ui-dd-trigger.is-placeholder {
  color: var(--muted);
}

.ui-dd-menu {
  display: none;
  position: fixed;
  max-height: min(280px, 42vh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(130, 170, 230, 0.28);
  background: linear-gradient(180deg, #1a2436 0%, #0e141f 100%);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 24px rgba(var(--theme-1), 0.12);
  z-index: 5000;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 168, 200, 0.35) transparent;
}
.ui-dd-menu.is-open,
.ui-dd.is-open .ui-dd-menu { display: block; }

.ui-dd-menu::-webkit-scrollbar { width: 6px; }
.ui-dd-menu::-webkit-scrollbar-track { background: transparent; }
.ui-dd-menu::-webkit-scrollbar-thumb {
  background: rgba(140, 168, 200, 0.35);
  border-radius: 999px;
}

.ui-dd-option {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  color: #e8eef6;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.ui-dd-option:hover,
.ui-dd-option:focus-visible {
  outline: none;
  background: rgba(var(--theme-1), 0.18);
  color: #fff;
}
.ui-dd-option.is-selected {
  background: linear-gradient(90deg, rgba(var(--theme-2), 0.32), rgba(var(--theme-1), 0.16));
  color: #fff;
  font-weight: 600;
}
.ui-dd-option:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-grid label[hidden],
.form-grid [hidden] {
  display: none !important;
}

.log-viewer {
  background: rgba(0, 0, 0, 0.4);
  color: #cbd5e1;
  border-radius: 14px;
  padding: 16px;
  max-height: 420px;
  overflow: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid var(--line);
}

.api-doc { line-height: 1.7; color: var(--text-soft); }
.api-doc h4 { margin: 20px 0 10px; color: #fff; }
.api-doc pre {
  background: rgba(0, 0, 0, 0.4);
  color: #cbd5e1;
  padding: 16px;
  border-radius: 14px;
  overflow: auto;
  font-size: 0.76rem;
  border: 1px solid var(--line);
}

.batch-bar {
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.batch-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.quick-actions .btn.is-active {
  border-color: rgba(var(--theme-1), 0.7);
  color: #fff;
  background: rgba(var(--theme-1), 0.22);
}

.dash-preview {
  margin-top: 14px;
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  padding: 12px;
}

.dash-preview-empty {
  min-height: 156px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
}

.dash-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 4px;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.dash-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-preview-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  cursor: default;
}

.dash-preview-item[data-log-view] {
  cursor: pointer;
}

.dash-preview-item[data-log-view]:hover {
  border-color: rgba(var(--theme-1), 0.45);
  background: rgba(var(--theme-1), 0.08);
}

.dash-preview-item strong {
  display: block;
  margin-bottom: 4px;
}

.dash-preview-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dash-preview-item small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.dash-preview-item > span {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.vault-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 960px) {
  .vault-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.vault-desc {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.vault-desc.danger-text {
  color: #fca5a5;
}

.vault-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text-soft);
}

.vault-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vault-wipe-list {
  margin: 0 0 14px 18px;
  color: var(--muted);
  line-height: 1.6;
}

.vault-danger {
  border-color: rgba(239, 68, 68, 0.35);
}

.btn-file {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.vault-guard-box {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.08);
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.vault-guard-box ul {
  margin: 8px 0 0 18px;
}

/* —— 弹窗 —— */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  animation: fadeIn 0.25s ease;
}
.modal-root.is-open { display: grid; }
.modal-root[hidden] { display: none !important; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}
.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  border-radius: calc(var(--radius) + 4px);
  display: flex;
  flex-direction: column;
  animation: scaleIn 0.35s var(--ease-out);
}
.modal-head, .modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-foot {
  border-bottom: none;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 16px 20px; overflow: auto; flex: 1; }
.modal-close {
  width: 36px; height: 36px;
  font-size: 1.3rem;
}

/* —— Toast & Loader —— */
.toast-root {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + var(--safe-bottom));
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: rgba(14, 20, 42, 0.95);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  animation: scaleIn 0.35s var(--ease-spring);
  font-size: 0.88rem;
  border: 1px solid var(--line);
  pointer-events: auto;
  max-width: min(360px, calc(100vw - 32px));
}
.toast.ok { border-left: 3px solid var(--success); }
.toast.err { border-left: 3px solid var(--danger); }

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  background: rgba(7, 11, 29, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.page-loader[hidden] { display: none !important; }
.loader-ring {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(var(--theme-1), 0.15);
  border-top-color: rgb(var(--theme-3));
  animation: spin 0.8s linear infinite;
}

.batch-result {
  max-height: 280px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px;
  font-family: ui-monospace, monospace;
  font-size: 0.76rem;
  line-height: 1.6;
  border: 1px solid var(--line);
  margin-top: 12px;
}

.hide-mobile { display: inline; }

/* —— 响应式 —— */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .hide-mobile { display: none; }
  .app-layout { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: min(var(--sidebar-w), 85vw);
    transform: translateX(-105%);
    box-shadow: var(--shadow);
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 14, 26, 0.97);
  }
  .sidebar.open {
    transform: translateX(0);
    touch-action: pan-x pan-y;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  }
  .sidebar-close { display: grid; }
  .sidebar-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(4, 8, 18, 0.62);
  }

  .menu-toggle { display: grid; }
  .mobile-bottom-nav { display: grid; }

  .page-content {
    padding: 8px 16px calc(var(--mobile-nav-h) + 16px + var(--safe-bottom));
  }

  .topbar {
    padding: calc(var(--safe-top) + var(--status-gap)) 16px 12px;
    background: #070b1d;
  }
  .topbar p { max-width: 52vw; }

  .sidebar {
    padding-top: calc(var(--safe-top) + 16px);
  }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px 14px; }
  .stat-value { font-size: 1.35rem; }

  .panel-head { padding: 14px 16px; }
  .panel-body { padding: 14px 16px 16px; }

  .table-wrap { display: none; }
  .card-list { display: flex; }

  .toolbar input, .toolbar select, .toolbar .ui-dd { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }

  .vault-actions .btn { flex: 1 1 100%; justify-content: center; }
  .panel-head { flex-wrap: wrap; gap: 10px; }

  .modal-root {
    padding: 0;
    align-items: end;
    place-items: end stretch;
  }
  .modal-panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 18px 18px 0 0;
  }
  .modal-head h3 { font-size: 0.95rem; }

  .login-card { padding: 28px 22px 24px; }
  .captcha-grid { gap: 8px; }
  .captcha-slot { width: 44px; height: 44px; }

  .toast-root {
    left: 16px;
    right: 16px;
    bottom: calc(var(--mobile-nav-h) + 12px + var(--safe-bottom));
  }
  .toast { max-width: 100%; }
}

@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr; }
  .live-pill { display: none; }
  .captcha-slots { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .particle-canvas, .scan-line { display: none; }
}

/* 低配 / 移动端：关闭高开销装饰 */
body.effects-lite .scan-line,
body.effects-lite .ambient-c { display: none; }
body.effects-lite .ambient-layer { animation: none; filter: blur(48px); }
body.effects-lite .glass-panel,
body.effects-lite .glass-sidebar,
body.effects-lite .glass-bottom {
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
}
body.effects-lite .captcha-modal-backdrop {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(4, 8, 20, 0.82);
}
body.effects-lite .captcha-tile { animation: none; }
body.effects-lite .hero-orb,
body.effects-lite .hero-card-float,
body.effects-lite .hero-logo-big { animation: none; }

body.admin-app .particle-canvas,
body.admin-app .scan-line,
body.admin-app .ambient-layer {
  display: none !important;
}
body.admin-app .glass-panel,
body.admin-app .glass-sidebar,
body.admin-app .glass-bottom,
body.admin-app .glass-topbar,
body.admin-app .modal-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.admin-app .stat-card:hover,
body.admin-app .data-card:hover,
body.admin-app .data-table tbody tr:hover td,
body.admin-app .btn:hover,
body.admin-app .nav-item:hover,
body.admin-app .mob-nav-item:hover {
  transform: none;
}

body.admin-app .page-content.page-enter,
body.admin-app .modal-root,
body.admin-app .modal-backdrop,
body.admin-app .modal-panel {
  animation: none !important;
}

body.admin-app .stat-card,
body.admin-app .panel,
body.admin-app .data-card,
body.admin-app .data-table tbody tr,
body.admin-app .dash-preview-item {
  animation: none !important;
  content-visibility: visible !important;
  contain: none !important;
}

body.admin-app .btn,
body.admin-app .nav-item,
body.admin-app .mob-nav-item,
body.admin-app .icon-btn {
  transition-property: background-color, border-color, color, opacity;
}

@media (max-width: 768px) {
  .scan-line { display: none; }
  .ambient-c { display: none; }
}

/* —— 移动端预览切换 —— */
.preview-toggle {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(var(--theme-3), 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14, 22, 48, 0.92), rgba(20, 28, 56, 0.88));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  color: var(--text);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 24px rgba(var(--theme-1), 0.12);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, border-color 0.25s, background 0.25s;
  touch-action: manipulation;
}
.preview-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--theme-3), 0.55);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45), 0 0 32px rgba(var(--theme-1), 0.2);
}
.preview-toggle:active { transform: scale(0.96); }
.preview-toggle.active {
  background: linear-gradient(135deg, rgba(var(--theme-3), 0.25), rgba(var(--theme-1), 0.2));
  border-color: rgba(var(--theme-3), 0.6);
  color: #fff;
}
.preview-toggle .icon-desktop { display: none; }
.preview-toggle.active .icon-phone { display: none; }
.preview-toggle.active .icon-desktop { display: block; }
.preview-toggle.active .label-on { display: none; }
.preview-toggle.active .label-off { display: inline !important; }

.preview-stage {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}
.preview-shell {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}

body.auth-screen:not(.mobile-preview) {
  overflow: hidden;
}
body.auth-screen .particle-canvas,
body.auth-screen .scan-line,
body.auth-screen .ambient-layer {
  display: none !important;
}
body.auth-screen:not(.mobile-preview) .preview-stage,
body.auth-screen:not(.mobile-preview) .preview-shell {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
.preview-notch { display: none; }

/* 预览模式：手机框 + 强制移动端布局 */
body.mobile-preview {
  overflow: hidden;
  background: #030508;
}
body.mobile-preview .ambient-layer,
body.mobile-preview .grid-overlay,
body.mobile-preview .scan-line {
  opacity: 0.5;
}
body.mobile-preview .preview-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 16px 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(var(--theme-2), 0.12), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(var(--theme-1), 0.1), transparent 40%),
    #030508;
}
body.mobile-preview .preview-shell {
  width: 390px;
  max-width: calc(100vw - 32px);
  height: min(844px, calc(100vh - 80px));
  max-height: calc(100dvh - 80px);
  min-height: 0;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 8px #0a0c14,
    0 0 0 9px rgba(255, 255, 255, 0.08),
    0 28px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  background: #070b1d;
  animation: none;
}
body.mobile-preview .preview-notch {
  display: block;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  height: 22px;
  width: 108px;
  background: #000;
  border-radius: 14px;
  z-index: 80;
  pointer-events: none;
}
.preview-toggle-icon { flex-shrink: 0; }

/* 预览：侧栏 / 底栏 / 弹窗锁在手机框内，不再跑到桌面 */
body.mobile-preview .app-layout {
  grid-template-columns: 1fr !important;
  height: 100%;
  min-height: 0 !important;
  overflow: hidden;
}
body.mobile-preview .main-area {
  min-height: 0 !important;
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
body.mobile-preview .sidebar,
body.mobile-preview .sidebar-backdrop,
body.mobile-preview .modal-root,
body.mobile-preview .toast-root,
body.mobile-preview .page-loader,
body.mobile-preview .captcha-modal-root {
  position: absolute;
}
body.mobile-preview .sidebar {
  left: 0; top: 0; bottom: 0;
  width: min(var(--sidebar-w), 82%);
  transform: translateX(-105%);
  z-index: 90;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
  padding-top: 48px;
  touch-action: pan-y;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(10, 14, 26, 0.97);
}
body.mobile-preview .sidebar.open {
  transform: translateX(0);
  touch-action: pan-x pan-y;
}
body.mobile-preview .sidebar.open { transform: translateX(0); }
body.mobile-preview .sidebar-close { display: grid; }
body.mobile-preview .sidebar-backdrop {
  inset: 0;
}
body.mobile-preview .sidebar-backdrop.show { display: block; opacity: 1; }
body.mobile-preview .menu-toggle { display: grid !important; }
body.mobile-preview .mobile-bottom-nav {
  display: grid !important;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding-bottom: 10px;
}
body.mobile-preview .hide-mobile { display: none !important; }
body.mobile-preview .live-pill { display: none !important; }
body.mobile-preview .table-wrap { display: none !important; }
body.mobile-preview .card-list { display: flex !important; }
body.mobile-preview .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
body.mobile-preview .stat-card { padding: 14px 12px; }
body.mobile-preview .page-content {
  padding: 8px 14px calc(var(--mobile-nav-h) + 18px) !important;
}
body.mobile-preview .topbar {
  padding: 48px 14px 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #070b1d;
}
body.mobile-preview .topbar p { max-width: 58%; }
body.mobile-preview .login-view { padding: 48px 16px 24px; min-height: auto; }
body.mobile-preview .login-shell { width: 100%; display: block; }
body.mobile-preview .login-hero { display: none !important; }
body.mobile-preview .login-panel { padding: 0; background: transparent; }
body.mobile-preview .login-card { width: 100%; }
body.mobile-preview .login-brand-compact { text-align: center; }
body.mobile-preview .form-grid { grid-template-columns: 1fr !important; }
body.mobile-preview .toolbar {
  gap: 8px;
}
body.mobile-preview .toolbar .btn,
body.mobile-preview .toolbar .ui-dd,
body.mobile-preview .toolbar input {
  flex: 1 1 calc(50% - 8px);
  min-width: 0;
}
body.mobile-preview .toast-root {
  left: 12px;
  right: 12px;
  bottom: calc(var(--mobile-nav-h) + 10px);
}
body.mobile-preview .toast { max-width: 100%; }
body.mobile-preview .modal-root {
  inset: 0;
  padding: 0;
  align-items: end;
  place-items: end stretch;
}
body.mobile-preview .modal-panel {
  width: 100%;
  max-height: 86%;
  border-radius: 18px 18px 0 0;
  animation: none;
}
body.mobile-preview .particle-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 480px) {
  .preview-toggle { padding: 9px 12px; font-size: 0.76rem; }
  .preview-toggle .label-on,
  .preview-toggle .label-off { display: none !important; }
}

/* —— 流畅度（对照《前端流畅度实现分析》） —— */
html {
  scrollbar-gutter: stable;
}

.page-content,
.modal-body,
.dash-preview,
.table-wrap,
.log-viewer {
  overscroll-behavior: contain;
}

/* 屏外列表不渲染，但预留高度避免滚动条跳动 */
.data-table tbody tr,
.data-card,
.stat-card,
.dash-preview-item {
  content-visibility: auto;
  contain-intrinsic-size: auto 4.5rem;
}

.data-card {
  contain-intrinsic-size: auto 9rem;
}

.stat-card {
  contain-intrinsic-size: auto 7rem;
}

.data-table tbody tr,
.data-card,
.panel {
  contain: layout paint style;
}

/* 动效纪律：只动合成层属性；禁用 transition:all */
.btn,
.nav-item,
.mob-nav-item,
.icon-btn,
.data-card,
.stat-card {
  transition-property: transform, opacity, background-color, border-color, box-shadow, color, filter;
}

.btn:hover,
.nav-item:hover,
.stat-card:hover,
.data-card:hover {
  transform: translateY(-1px);
}

.btn:active,
.nav-item:active {
  transform: translateY(0) scale(0.98);
}

body.admin-app .stat-card,
body.admin-app .panel,
body.admin-app .data-card,
body.admin-app .data-table tbody tr {
  animation: none;
}

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

.page-loader {
  transition: opacity 0.12s ease;
}

.vault-card label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.vault-card label input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
}

.ops-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ops-tabs .btn { min-width: 0; }

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

html {
  color-scheme: dark;
}

/* ===== 全页手机适配：真实窄屏 + 手机预览 ===== */
body.mobile-ui .hide-mobile { display: none !important; }

body.mobile-ui .topbar {
  min-height: 0;
  gap: 10px;
  padding: calc(var(--safe-top) + var(--status-gap)) 14px 12px;
  background: #070b1d;
}
body.mobile-preview .topbar {
  padding: 48px 14px 12px;
}
body.mobile-ui .topbar h2 { font-size: 1.05rem; }
body.mobile-ui .topbar p {
  font-size: 0.72rem;
  max-width: 58%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.mobile-ui .stats-grid {
  grid-template-columns: 1fr 1fr !important;
  gap: 10px;
  margin-bottom: 12px;
}
body.mobile-ui .stat-card {
  padding: 12px 10px;
  gap: 10px;
}
body.mobile-ui .stat-value { font-size: 1.2rem; }
body.mobile-ui .stat-label { font-size: 0.72rem; }
body.mobile-ui .stat-foot { font-size: 0.68rem; }

body.mobile-ui .quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
body.mobile-ui .quick-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 40px;
}

body.mobile-ui .dash-preview {
  max-height: 42vh;
}
body.mobile-ui .dash-preview-item {
  flex-wrap: wrap;
  gap: 6px 10px;
}
body.mobile-ui .dash-preview-item > span {
  width: 100%;
  white-space: normal;
}

body.mobile-ui .panel-head {
  padding: 12px 14px;
  gap: 8px;
}
body.mobile-ui .panel-head h3 { font-size: 0.92rem; }
body.mobile-ui .panel-body { padding: 12px 14px 16px; }

body.mobile-ui .ops-tabs {
  width: 100%;
  margin: 0 !important;
}
body.mobile-ui .ops-tabs .btn {
  flex: 1;
  justify-content: center;
}

body.mobile-ui .toolbar {
  gap: 8px;
}
body.mobile-ui .toolbar .btn,
body.mobile-ui .toolbar input,
body.mobile-ui .toolbar .ui-dd {
  flex: 1 1 calc(50% - 8px);
  min-width: 0;
}
body.mobile-ui .toolbar input { min-width: 0; width: auto; }

body.mobile-ui .batch-bar {
  flex-wrap: wrap;
}
body.mobile-ui .batch-bar .btn {
  flex: 1 1 calc(50% - 8px);
  justify-content: center;
}

body.mobile-ui .table-wrap { display: none !important; }
body.mobile-ui .card-list { display: flex !important; }

body.mobile-ui .data-card { padding: 12px 12px 10px; }
body.mobile-ui .data-card-title {
  font-size: 0.88rem;
  word-break: break-all;
}
body.mobile-ui .data-card-meta {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 0.74rem;
}
body.mobile-ui .data-card-actions {
  gap: 6px;
}
body.mobile-ui .data-card-actions .btn {
  flex: 1 1 calc(50% - 6px);
  justify-content: center;
  min-height: 36px;
  font-size: 0.78rem;
}

body.mobile-ui .pagination {
  justify-content: stretch;
  position: sticky;
  bottom: calc(var(--mobile-nav-h) - 4px);
  padding: 10px 0 8px;
}
body.mobile-ui .pagination-info { width: 100%; margin: 0 0 4px; }
body.mobile-ui .pagination-btns { width: 100%; }
body.mobile-ui .pagination-btns .btn { flex: 1 1 auto; min-height: 36px; }
body.mobile-ui .pagination-jump,
body.mobile-ui .pagination .ui-dd { flex: 1; }

body.mobile-ui .vault-grid { grid-template-columns: 1fr !important; }
body.mobile-ui .vault-desc { font-size: 0.82rem; }
body.mobile-ui .vault-actions .btn,
body.mobile-ui .vault-actions .btn-file {
  flex: 1 1 100%;
  justify-content: center;
}

body.mobile-ui .form-grid { grid-template-columns: 1fr !important; }

body.mobile-ui .modal-root {
  padding: 0;
  align-items: end;
  place-items: end stretch;
}
body.mobile-ui .modal-panel {
  width: 100%;
  max-height: 88%;
  border-radius: 18px 18px 0 0;
}
body.mobile-ui .modal-head,
body.mobile-ui .modal-foot { padding: 12px 14px; }
body.mobile-ui .modal-head h3 { font-size: 0.92rem; line-height: 1.35; }
body.mobile-ui .modal-body { padding: 12px 14px 16px; max-height: 62vh; overflow: auto; }
body.mobile-ui .modal-foot .btn { min-height: 40px; }
body.mobile-ui .log-viewer {
  max-height: 36vh;
  font-size: 0.72rem;
  padding: 12px;
}

body.mobile-ui .captcha-modal-root {
  padding: 0;
  align-items: end;
}
body.mobile-ui .captcha-modal-panel {
  width: 100%;
  max-width: 100%;
  border-radius: 18px 18px 0 0;
  max-height: 92%;
}
body.mobile-ui .captcha-image { max-width: 100%; height: auto; }
body.mobile-ui .captcha-modal-actions { flex-wrap: wrap; }
body.mobile-ui .captcha-modal-actions .btn { flex: 1 1 calc(50% - 8px); }

body.mobile-ui .login-hero { display: none !important; }
body.mobile-ui .login-shell { display: block; width: 100%; }
body.mobile-ui .login-card { width: 100%; margin: 0 auto; }


