/* ============================================================
   DS 分发系统 — 蓝白主题样式
   背景 #F8FAFC / 卡片 #FFF + #E2E8F0 边框 / 主色 #2b6cff
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --primary: #2b6cff;
  --primary-dark: #1e54d6;
  --primary-soft: #eef4ff;
  --text: #1e293b;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, .12);
  --sidebar-w: 216px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ==================== 登录页 ==================== */
.ds-login {
  min-height: 100vh; display: flex; align-items: stretch; justify-content: center;
  background: #F8FAFC; position: relative; overflow: hidden; padding: 24px; gap: 0;
}
/* ★ E#547 登录页改版: 左浅色介绍 + 右白色登录卡片 (与全站白卡片风格一致) */
.ds-login-wrap {
  display: flex; width: 100%; max-width: 880px; margin: auto; gap: 28px;
  animation: dsFadeUp .55s cubic-bezier(.16, 1, .3, 1);
}
/* 左侧介绍区: 纯浅色, 不加边框不加阴影, 与页面融为一体 */
/* 不设 overflow:hidden —— 悬浮卡片/副手机阴影需伸出 hero 边界, 裁切会出现硬切线 */
.ds-login-hero {
  flex: 1.1; position: relative; padding: 36px 8px; display: flex; flex-direction: column; justify-content: center;
}
.ds-login-hero .hero-brand { position: relative; display: flex; align-items: center; gap: 12px; }
.ds-login-hero .hero-brand .lg-ico {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px;
  background: linear-gradient(135deg, #2b6cff, #5b8def); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(43, 108, 255, .28);
}
.ds-login-hero .hero-brand b { font-size: 17px; letter-spacing: .3px; color: var(--text); }
.ds-login-hero .hero-brand span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
/* ★ E#547d: 品牌区移入登录卡片顶部 (居中), 左侧只留标题+手机 */
.hero-brand.in-card {
  display: flex; align-items: center; gap: 12px;
  justify-content: center; margin-bottom: 6px;
  animation: dsLoginSeq .5s cubic-bezier(.16, 1, .3, 1) .05s backwards;
}
.hero-brand.in-card .lg-ico {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 38px;
  background: linear-gradient(135deg, #2b6cff, #5b8def); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(43, 108, 255, .28);
}
.hero-brand.in-card b { font-size: 16px; letter-spacing: .3px; color: var(--text); }
.hero-brand.in-card span { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ds-login-hero .hero-title { position: relative; font-size: 24px; font-weight: 700; line-height: 1.45; letter-spacing: .5px; color: var(--text); margin-top: 0; }
.ds-login-hero .hero-title em { font-style: normal; color: var(--primary); }
.ds-login-hero .hero-feats { position: relative; display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.ds-login-hero .feat {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 11px;
  background: #fff; border: 1px solid var(--border); color: var(--text-2);
  font-size: 12.5px; box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), border-color .2s;
  animation: dsFeatIn .45s cubic-bezier(.16, 1, .3, 1) backwards;
}
.ds-login-hero .feat:nth-child(1) { animation-delay: .1s; }
.ds-login-hero .feat:nth-child(2) { animation-delay: .18s; }
.ds-login-hero .feat:nth-child(3) { animation-delay: .26s; }
.ds-login-hero .feat:nth-child(4) { animation-delay: .34s; }
@keyframes dsFeatIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.ds-login-hero .feat:hover { transform: translateX(5px); border-color: var(--primary); }
.ds-login-hero .feat i {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px; font-style: normal;
  background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.ds-login-hero .hero-foot { position: relative; font-size: 11.5px; color: var(--text-3); margin-top: 26px; }

/* ★ 登录页手机展示区 (1:1 同官网 about.html: 主手机+副手机+悬浮卡片+粒子) */
.ds-login-hero .hero-visual {
  position: relative; display: flex; justify-content: center; align-items: center;
  margin-top: 26px; align-self: center;
}
.ds-login-hero .hero-visual::before { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,.12) 0%, transparent 70%); top: 50%; left: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.ds-login-hero .hero-visual::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.1) 0%, transparent 70%); top: 30%; left: 40%; pointer-events: none; }
.phone-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particle { position: absolute; border-radius: 50%; animation: particleDrift linear infinite; opacity: 0; }
@keyframes particleDrift { 0% { transform: translateY(0) scale(0); opacity: 0; } 20% { opacity: .6; transform: translateY(-30px) scale(1); } 80% { opacity: .3; } 100% { transform: translateY(-120px) scale(.5); opacity: 0; } }

/* ---- 主手机 ---- */
.phone-main { width: 265px; height: 535px; background: linear-gradient(160deg, #1c2436 0%, #0f1523 100%); border-radius: 46px; padding: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px rgba(37,99,235,.3), 0 10px 30px rgba(0,0,0,.4); position: relative; z-index: 3; animation: phoneFloat 4s ease-in-out infinite; }
.phone-main::before { content: ''; position: absolute; inset: 0; border-radius: 46px; background: linear-gradient(160deg, rgba(255,255,255,.12) 0%, transparent 50%); pointer-events: none; }
@keyframes phoneFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-18px) rotate(-1deg); } }
.phone-screen { width: 100%; height: 100%; background: linear-gradient(175deg, #1e40af 0%, #6d28d9 45%, #db2777 100%); border-radius: 38px; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.phone-screen::before { content: ''; position: absolute; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%); top: -20px; left: -20px; pointer-events: none; }
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 88px; height: 28px; background: #0a0f1c; border-radius: 20px; z-index: 10; box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.phone-status-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px 0; font-size: 11px; color: rgba(255,255,255,.9); font-weight: 600; flex-shrink: 0; }
.phone-status-bar .status-time { font-size: 13px; }
.phone-status-icons { display: flex; gap: 5px; align-items: center; }
.phone-status-icons svg { width: 14px; height: 14px; fill: rgba(255,255,255,.9); }
.phone-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20px 30px; position: relative; z-index: 2; }
.phone-app-icon { width: 76px; height: 76px; background: rgba(255,255,255,.18); backdrop-filter: blur(20px); border-radius: 22px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 12px 40px rgba(0,0,0,.25); animation: iconPulse 3s ease-in-out infinite; overflow: hidden; }
.phone-app-icon img { width: 100%; height: 100%; object-fit: cover; }
@keyframes iconPulse { 0%,100% { box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 12px 40px rgba(0,0,0,.25); } 50% { box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 12px 40px rgba(0,0,0,.25), 0 0 30px rgba(255,255,255,.15); } }
.phone-text { font-weight: 700; font-size: 20px; color: #fff; margin-bottom: 8px; text-shadow: 0 2px 12px rgba(0,0,0,.4); letter-spacing: 1px; }
.phone-sub { font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 24px; }
.phone-progress-wrap { width: 160px; margin: 0 auto 10px; }
.phone-progress-label { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,.7); margin-bottom: 6px; }
.phone-progress-bar { height: 5px; background: rgba(255,255,255,.2); border-radius: 10px; overflow: hidden; }
.phone-progress-fill { height: 100%; background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6); border-radius: 10px; animation: progressAnim 3s ease-in-out infinite; width: 0%; }
@keyframes progressAnim { 0% { width: 0%; opacity: 1; } 70% { width: 100%; opacity: 1; } 85% { width: 100%; opacity: 0; } 86% { width: 0%; opacity: 0; } 100% { width: 0%; opacity: 1; } }
.phone-install-badge { display: inline-flex; align-items: center; gap: 5px; background: rgba(16,185,129,.25); border: 1px solid rgba(16,185,129,.5); color: #6ee7b7; font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 20px; animation: badgeFade 3s ease-in-out infinite; opacity: 0; }
@keyframes badgeFade { 0%,69% { opacity: 0; transform: scale(.9); } 80%,95% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.9); } }
.phone-install-badge svg { width: 12px; height: 12px; fill: #6ee7b7; }
.phone-apps-row { display: flex; gap: 12px; justify-content: center; padding: 0 10px; }
.phone-app-mini { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.phone-app-mini svg { width: 22px; height: 22px; fill: #fff; }

/* ---- 副手机 ---- */
.phone-secondary { width: 148px; height: 295px; background: linear-gradient(160deg, #243040 0%, #111827 100%); border-radius: 30px; padding: 7px; position: absolute; bottom: -30px; right: 20px; z-index: 2; box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 25px 60px rgba(0,0,0,.5); animation: phoneFloat2 4.5s ease-in-out infinite; }
.phone-secondary::before { content: ''; position: absolute; inset: 0; border-radius: 30px; background: linear-gradient(160deg, rgba(255,255,255,.1) 0%, transparent 50%); pointer-events: none; }
@keyframes phoneFloat2 { 0%,100% { transform: translateY(0) rotate(4deg); } 50% { transform: translateY(-12px) rotate(6deg); } }
.phone-secondary .phone-screen { background: linear-gradient(175deg, #065f46 0%, #0891b2 100%); border-radius: 24px; }
.phone-secondary .phone-notch { width: 55px; height: 18px; top: 8px; border-radius: 14px; }
.phone-secondary .phone-status-bar { padding: 8px 14px 0; font-size: 9px; }
.phone-secondary .phone-status-bar .status-time { font-size: 10px; }
.phone-secondary .phone-status-icons svg { width: 10px; height: 10px; }
.phone-secondary .phone-app-icon { width: 44px; height: 44px; border-radius: 14px; margin-bottom: 10px; }
.phone-secondary .phone-text { font-size: 13px; margin-bottom: 4px; }
.phone-secondary .phone-sub { font-size: 9.5px; margin-bottom: 14px; }
.phone-speed-bar { width: 90px; margin: 0 auto; }
.phone-speed-label { font-size: 9px; color: rgba(255,255,255,.6); margin-bottom: 4px; text-align: left; }
.phone-speed-dots { display: flex; gap: 4px; }
.phone-speed-dot { height: 4px; flex: 1; border-radius: 4px; background: rgba(255,255,255,.2); }
.phone-speed-dot.active { background: #34d399; }

/* ---- 悬浮通知卡片 + 浮动标签 ---- */
.phone-toast { position: absolute; top: 32px; left: -30px; background: rgba(255,255,255,.92); backdrop-filter: blur(20px); border-radius: 16px; padding: 10px 14px; box-shadow: 0 12px 40px rgba(0,0,0,.15); display: flex; align-items: center; gap: 10px; z-index: 10; width: 190px; animation: toastFloat 4s ease-in-out infinite; border: 1px solid rgba(255,255,255,.5); }
@keyframes toastFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.phone-toast-icon { width: 34px; height: 34px; background: linear-gradient(135deg, #10B981, #06B6D4); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.phone-toast-icon svg { width: 18px; height: 18px; fill: #fff; }
.phone-toast-title { font-size: 12px; font-weight: 700; color: #1E293B; margin-bottom: 2px; }
.phone-toast-desc { font-size: 10px; color: #64748B; }
.phone-badge-tag { position: absolute; bottom: 50px; right: -18px; background: linear-gradient(135deg, #2563EB, #8B5CF6); color: #fff; font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 20px; box-shadow: 0 8px 24px rgba(37,99,235,.4); z-index: 10; }

/* 矮屏自适应: 等比缩放避免溢出登录视口 */
@media (max-height: 880px) { .ds-login-hero .hero-visual { zoom: .82; } }
@media (max-height: 760px) { .ds-login-hero .hero-visual { zoom: .72; } }
/* 右侧表单区: 独立白色卡片 */
.ds-login-card {
  flex: 1; position: relative; width: auto; background: #fff; border: 1px solid var(--border);
  border-radius: 18px; padding: 44px 38px; display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 4px 20px rgba(15, 23, 42, .05); animation: dsLoginSwap .35s cubic-bezier(.16, 1, .3, 1);
  max-width: 400px;
}
.ds-login-logo { text-align: center; margin-bottom: 26px; }
.ds-login-logo .lg-ico { display: none; }
.ds-login-logo .lg-ico-2fa {
  display: flex; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 15px;
  background: linear-gradient(135deg, #2b6cff, #5b8def); align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(43, 108, 255, .35); animation: dsLogoFloat 3s ease-in-out infinite;
}
.ds-login-logo h1 { font-size: 21px; letter-spacing: .3px; }
.ds-login-logo p { color: var(--text-2); font-size: 12.5px; margin-top: 5px; }
/* E#548: 登录卡片 h1 去掉包裹 div 直接置于卡片内, 字体加大 */
.ds-login-card > h1 { font-size: 30px; font-weight: 800; letter-spacing: .5px; color: var(--text); margin: 18px 0 20px; animation: dsLoginSeq .5s cubic-bezier(.16, 1, .3, 1) .12s backwards; }
.ds-login-card .btn.block { padding: 12px 18px; font-size: 14.5px; border-radius: 12px; }
.ds-login-card .fi input { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.ds-login-card .fi label { font-size: 13px; margin-bottom: 7px; }
.ds-login-hint {
  margin-top: 18px; text-align: center; font-size: 11.5px; color: var(--text-3);
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
.ds-login-hint::before, .ds-login-hint::after { content: ''; flex: 1; height: 1px; background: var(--border); }
/* ★ 登录交互增强: 输入框容器 (尾部图标按钮) / 大写提示 / 底部链接 */
.lg-input-wrap { position: relative; }
.lg-input-wrap input { padding-right: 42px; }
.lg-eye, .lg-in-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent;
  color: var(--text-3); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; transition: color .15s, background .15s;
}
.lg-eye:hover, .lg-in-clear:hover { color: var(--primary); background: var(--primary-soft); }
.lg-eye.on { color: var(--primary); }
.lg-caps[hidden], .lg-in-clear[hidden] { display: none !important; }
.lg-caps {
  margin-top: 6px; font-size: 11.5px; color: var(--amber);
  display: flex; align-items: center; gap: 4px;
}
.lg-foot {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12.5px;
}
.lg-foot a { color: var(--text-2); transition: color .15s; display: inline-flex; align-items: center; gap: 4px; }
.lg-foot a:hover { color: var(--primary); }
.lg-foot i { font-style: normal; color: var(--border); }
/* 登录按钮渐变 + 悬浮微升 */
.ds-login-card .btn.block {
  background: linear-gradient(135deg, #2b6cff, #4d7dff);
  box-shadow: 0 6px 16px rgba(43, 108, 255, .28);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.ds-login-card .btn.block:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(43, 108, 255, .36); }
.ds-login-card .btn.block:active { transform: translateY(0); }
.ds-login-card .btn.block:disabled { filter: grayscale(.3) opacity(.8); transform: none; }
/* 移动端: 单栏, 隐藏介绍区 */
@media (max-width: 820px) {
  .ds-login { padding: 16px; align-items: center; }
  .ds-login-wrap { max-width: 400px; flex-direction: column; }
  .ds-login-hero { display: none; }
  .ds-login-card { padding: 34px 26px; max-width: none; }
}

/* ==================== 通用表单控件 ==================== */
.fi { position: relative; margin-bottom: 16px; }
.fi input, .fi select, .fi textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; background: #fff; color: var(--text); outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.fi input:focus, .fi select:focus, .fi textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 108, 255, .12);
}
.fi label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border: 1px solid transparent; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, transform .12s, opacity .15s, box-shadow .15s; white-space: nowrap;
  position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--primary-dark); box-shadow: 0 3px 10px rgba(43, 108, 255, .3); }
.btn:active { transform: scale(.95); transition-duration: .06s; }
/* 涟漪扩散 (JS 注入 .ds-ripple) */
.ds-ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .5); transform: scale(0);
  animation: dsRipple .5s ease-out forwards;
}
@keyframes dsRipple {
  to { transform: scale(2.6); opacity: 0; }
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; padding: 12px; font-size: 14.5px; }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: #f1f5f9; }
.btn.ghost .ds-ripple, .btn.danger .ds-ripple { background: rgba(43, 108, 255, .18); }
.btn.soft { background: var(--primary-soft); color: var(--primary); }
.btn.soft:hover { background: #ddeaff; }
.btn.danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }

/* ==================== 应用框架 ==================== */
.ds-app { display: flex; min-height: 100vh; }
.ds-sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #fff;
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 40;
}
.ds-brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px;
}
.ds-brand .lg-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  background: linear-gradient(135deg, #2b6cff, #5b8def);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(43, 108, 255, .3);
}
.ds-brand b { font-size: 15px; letter-spacing: .3px; display: block; line-height: 1.2; }
.ds-brand span { font-size: 11px; color: var(--text-3); }

.ds-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }
.ds-nav .nav-cap { font-size: 11px; color: var(--text-3); padding: 12px 10px 6px; font-weight: 600; letter-spacing: .5px; }
.ds-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 2px;
  border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 13.5px;
  transition: background .15s, color .15s;
}
.ds-nav a svg { flex: 0 0 18px; }
.ds-nav a:hover { background: #f1f5f9; color: var(--text); }
.ds-nav a.on { background: var(--primary-soft); color: var(--primary); }
.ds-nav a.on svg { stroke: var(--primary); }

.ds-side-user { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.ds-side-user .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 34px;
}
.ds-side-user .nm { flex: 1; min-width: 0; }
.ds-side-user .nm b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-side-user .nm span { font-size: 11px; color: var(--text-3); }

/* ==================== 主区域 ==================== */
.ds-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ds-topbar {
  height: 56px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center;
  padding: 0 24px; gap: 14px; position: sticky; top: 0; z-index: 30;
}
.ds-topbar h2 { font-size: 16px; flex: 1; }
.ds-topbar .top-right { display: flex; align-items: center; gap: 10px; }
.top-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.top-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: dsPulse 2.2s infinite; }

.ds-page { flex: 1; padding: 22px 24px 40px; max-width: 1440px; width: 100%; margin: 0 auto; animation: dsPageIn .3s ease-out; }

/* ==================== 卡片 / 布局 ==================== */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden;
}
.card > .ch {
  display: flex; align-items: center; gap: 10px; padding: 13px 18px;
  border-bottom: 1px solid var(--border); background: #fbfdff;
}
.card > .ch h3 { font-size: 14px; color: var(--primary); flex: 1; }
.card > .cb { padding: 16px 18px; }
.card > .ch .ch-extra { display: flex; gap: 8px; align-items: center; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } .grid.c5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .grid.c2, .grid.c3, .grid.c4, .grid.c5 { grid-template-columns: 1fr; } }

/* KPI 卡片 */
.kpi { padding: 16px 18px; position: relative; }

/* IP 统计排行条 (E#545) */
.bar-line { height: 4px; background: var(--line, #E2E8F0); border-radius: 2px; overflow: hidden; }
.bar-line > i { display: block; height: 100%; background: #2b6cff; border-radius: 2px; }
tr.bg-red > td { background: #FEF2F2; }
.kpi .k-ico {
  position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; background: var(--primary-soft);
}
.kpi .k-label { color: var(--text-2); font-size: 12.5px; margin-bottom: 6px; }
.kpi .k-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.kpi .k-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.kpi .k-sub b.up { color: var(--green); }
.kpi .k-sub b.down { color: var(--red); }

/* ==================== 表格 ==================== */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600;
  padding: 9px 12px; border-bottom: 1px solid var(--border); background: #fbfdff; white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 13px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr { transition: background .12s; }
.tbl tbody tr:hover { background: #f8fafc; }

/* 徽章 */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill.blue { background: var(--primary-soft); color: var(--primary); }
.pill.green { background: #dcfce7; color: var(--green); }
.pill.red { background: #fee2e2; color: var(--red); }
.pill.gray { background: #f1f5f9; color: var(--text-2); }
.pill.amber { background: #fef3c7; color: var(--amber); }

/* iOS 风格开关 */
.tgl { position: relative; display: inline-block; width: 38px; height: 22px; flex: 0 0 38px; }
.tgl input { opacity: 0; width: 0; height: 0; }
.tgl i {
  position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer;
  transition: background .2s;
}
.tgl i::before {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.tgl input:checked + i { background: var(--primary); }
.tgl input:checked + i::before { transform: translateX(16px); }

/* ==================== 提示 / 加载 ==================== */
.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-70px);
  background: #0f172a; color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 13px;
  z-index: 200; opacity: 0; transition: transform .3s ease, opacity .3s ease; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 8px; max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.err { background: #7f1d1d; }

.skl { background: linear-gradient(90deg, #f1f5f9 25%, #e8eef5 50%, #f1f5f9 75%); background-size: 200% 100%; animation: dsSkl 1.2s infinite; border-radius: 8px; }
@keyframes dsSkl { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.empty { text-align: center; color: var(--text-3); padding: 40px 20px; font-size: 13px; }
.empty svg { margin-bottom: 10px; opacity: .4; }

.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  border-radius: 50%; animation: dsSpin .7s linear infinite; display: inline-block;
}

/* ==================== 模态框 ==================== */
.mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: dsFadeIn .18s ease-out; backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 16px; width: 480px; max-width: 100%; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: dsModalIn .25s cubic-bezier(.16, 1, .3, 1);
}
.modal.wide { width: 680px; }
.modal .mh { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal .mh h3 { font-size: 15px; flex: 1; }
.modal .mb { padding: 18px 20px; overflow-y: auto; }
.modal .mf { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ==================== 动画 ==================== */
@keyframes dsPageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dsFadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes dsFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dsModalIn { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes dsPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes dsSpin { to { transform: rotate(360deg); } }
.num-anim { animation: dsNumIn .5s ease-out; }
@keyframes dsNumIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ==================== 图表容器 ==================== */
.chart-box { position: relative; width: 100%; }
.chart-box canvas { width: 100%; display: block; }
.chart-tip {
  position: absolute; pointer-events: none; background: #0f172a; color: #fff;
  padding: 7px 11px; border-radius: 8px; font-size: 12px; line-height: 1.5;
  transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; z-index: 5;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .3); opacity: 0; transition: opacity .12s;
}
.chart-tip.show { opacity: 1; }
.chart-legend { display: flex; gap: 16px; padding: 0 18px 10px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

/* ==================== tabs ==================== */
.tabs { display: flex; gap: 4px; background: #f1f5f9; padding: 4px; border-radius: 10px; }
.tabs button {
  border: none; background: transparent; padding: 6px 14px; border-radius: 8px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; font-weight: 500; transition: all .15s; white-space: nowrap;
}
.tabs button.on { background: #fff; color: var(--primary); box-shadow: var(--shadow); font-weight: 600; }

/* ==================== 其他工具类 ==================== */
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mut { color: var(--text-3); font-size: 12px; }
.mono { font-family: 'SF Mono', 'JetBrains Mono', Consolas, monospace; font-size: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.clickable { cursor: pointer; }

/* 通知面板 */
.notice-item { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f1f5f9; }
.notice-item:last-child { border-bottom: none; }
.notice-item .n-ico { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center; }
.notice-item .n-ico.info { background: var(--primary-soft); color: var(--primary); }
.notice-item .n-ico.warn { background: #fef3c7; color: var(--amber); }
.notice-item .n-ico.critical { background: #fee2e2; color: var(--red); }
.notice-item b { font-size: 13px; display: block; }
.notice-item p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.notice-item time { font-size: 11px; color: var(--text-3); }

/* 账号信息面板 */
.uinfo { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.uinfo .avatar-lg {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 52px;
  background: linear-gradient(135deg, #2b6cff, #5b8def); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700;
}
.perm-chip { display: inline-flex; padding: 3px 10px; background: #f1f5f9; border-radius: 6px; font-size: 11.5px; color: var(--text-2); margin: 2px 3px 2px 0; }

/* ==================== 响应式 ==================== */
/* ★ 移动端: 侧边栏抽屉化 + 汉堡按钮 + 表格横滚 + 弹窗全宽 */
.ds-menu-btn {
  display: none; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 9px;
  background: #fff; color: var(--text); align-items: center; justify-content: center;
  cursor: pointer; flex: 0 0 36px; padding: 0; -webkit-tap-highlight-color: transparent;
}
.ds-menu-btn svg { display: block; }
.ds-side-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 39;
  backdrop-filter: blur(2px); animation: dsFadeIn .18s ease-out;
}
@media (max-width: 860px) {
  .ds-menu-btn { display: inline-flex; }
  .ds-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh;
    transform: translateX(-102%); transition: transform .25s cubic-bezier(.16, 1, .3, 1);
    box-shadow: 0 0 40px rgba(15, 23, 42, .18); z-index: 40;
  }
  body.side-open .ds-sidebar { transform: none; }
  body.side-open .ds-side-overlay { display: block; }
  .ds-topbar { padding: 0 14px; gap: 10px; }
  .ds-topbar h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ds-page { padding: 12px 12px 32px; }
  /* 表格横向滚动, 小屏不挤压 */
  .card > .cb { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 620px; }
  .card > .ch { padding: 12px 14px; flex-wrap: wrap; row-gap: 8px; }
  .card > .ch .ch-extra { flex-wrap: wrap; }
  /* 弹窗: 底部弹出 + 全宽 */
  .mask { padding: 12px; align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 16px 16px 12px 12px; }
  .modal.wide { width: 100%; }
  .modal .mb { padding: 14px 16px; }
  .modal .mf { padding: 12px 16px; }
  .modal .mf .btn { flex: 1; }
  /* Toast: 全宽吸顶 */
  .toast { left: 12px; right: 12px; transform: translateY(-70px); max-width: none; }
  .toast.show { transform: translateY(0); animation: none; }
  /* 顶栏简化 */
  .ds-topbar .top-dot { display: none; }
}

/* ============================================================
   ★ E#546 动画增强 (全套微交互)
   ============================================================ */

/* 1. KPI 卡片: 依次弹入 (stagger) + hover 浮起 */
@keyframes dsKpiIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.grid .card .kpi { animation: dsKpiIn .5s cubic-bezier(.16, 1, .3, 1) backwards; }
.grid .card:nth-child(1) .kpi { animation-delay: .02s; }
.grid .card:nth-child(2) .kpi { animation-delay: .08s; }
.grid .card:nth-child(3) .kpi { animation-delay: .14s; }
.grid .card:nth-child(4) .kpi { animation-delay: .2s; }
.grid .card:nth-child(5) .kpi { animation-delay: .26s; }
.kpi { transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s; }
.kpi:hover { transform: translateY(-3px); }
.kpi .k-ico { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.kpi:hover .k-ico { transform: rotate(-6deg) scale(1.12); }

/* 2. KPI 数值: 数字滚动放大登场 */
@keyframes dsNumPop { 0% { opacity: 0; transform: translateY(10px) scale(.7); } 60% { transform: translateY(-2px) scale(1.06); } 100% { opacity: 1; transform: none; } }
.kpi .k-value.num-anim { animation: dsNumPop .55s cubic-bezier(.16, 1, .3, 1) .15s backwards; }

/* 3. 卡片: 页面进入依次上浮 */
@keyframes dsCardIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.ds-page .card { animation: dsCardIn .45s cubic-bezier(.16, 1, .3, 1) backwards; }
.ds-page .card:nth-child(1) { animation-delay: .03s; }
.ds-page .card:nth-child(2) { animation-delay: .09s; }
.ds-page .card:nth-child(3) { animation-delay: .15s; }
.ds-page .card:nth-child(4) { animation-delay: .21s; }
.ds-page .card:nth-child(5) { animation-delay: .27s; }
.ds-page .grid { animation: dsCardIn .45s cubic-bezier(.16, 1, .3, 1) .06s backwards; }

/* 4. 表格行: 依次淡入 + hover 左滑亮条 */
@keyframes dsRowIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.tbl tbody tr { animation: dsRowIn .3s ease-out backwards; }
.tbl tbody tr:nth-child(1) { animation-delay: .02s; }
.tbl tbody tr:nth-child(2) { animation-delay: .05s; }
.tbl tbody tr:nth-child(3) { animation-delay: .08s; }
.tbl tbody tr:nth-child(4) { animation-delay: .11s; }
.tbl tbody tr:nth-child(5) { animation-delay: .14s; }
.tbl tbody tr:nth-child(6) { animation-delay: .17s; }
.tbl tbody tr:nth-child(7) { animation-delay: .2s; }
.tbl tbody tr:nth-child(8) { animation-delay: .23s; }
.tbl tbody tr:nth-child(n+9) { animation-delay: .26s; }
.tbl tbody tr { position: relative; }
.tbl tbody tr::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--primary); border-radius: 2px; transition: width .18s ease;
}
.tbl tbody tr:hover::after { width: 3px; }
.tbl tbody tr:hover td:first-child { padding-left: 15px; }
.tbl tbody tr td:first-child { transition: padding .18s ease; }

/* 5. 徽章: 弹性弹入 */
@keyframes dsPillPop { 0% { opacity: 0; transform: scale(.5); } 70% { transform: scale(1.1); } 100% { opacity: 1; transform: scale(1); } }
.pill { animation: dsPillPop .35s cubic-bezier(.34, 1.56, .64, 1) backwards; }

/* 6. 呼吸灯增强: 状态点带光环扩散 */
@keyframes dsPulseRing {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
.top-dot i { animation: dsPulseRing 2s infinite; }

/* 7. 图标按钮: hover 弹跳 */
.btn.ghost.sm:hover svg { animation: dsIconBounce .4s ease; }
@keyframes dsIconBounce { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-2.5px); } 65% { transform: translateY(-1px); } }
.btn svg { transition: transform .2s; }

/* 8. 排行榜条目: 依次滑入 + 进度条生长 */
@keyframes dsRankIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
#ip-rank > div { animation: dsRankIn .4s ease-out backwards; }
#ip-rank > div:nth-child(1) { animation-delay: .05s; }
#ip-rank > div:nth-child(2) { animation-delay: .1s; }
#ip-rank > div:nth-child(3) { animation-delay: .15s; }
#ip-rank > div:nth-child(4) { animation-delay: .2s; }
#ip-rank > div:nth-child(5) { animation-delay: .25s; }
#ip-rank > div:nth-child(n+6) { animation-delay: .3s; }
@keyframes dsBarGrow { from { width: 0; } }
.bar-line > i { animation: dsBarGrow .8s cubic-bezier(.16, 1, .3, 1) .2s backwards; }

/* 9. 登录卡片: 主登录 + 2FA 切换动画 */
@keyframes dsLoginSwap { 0% { opacity: 0; transform: translateX(26px); } 100% { opacity: 1; transform: none; } }
.ds-login-card { animation: dsLoginSwap .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes dsCodeShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.ds-login-card .fi.err-anim { animation: dsCodeShake .4s ease; }
@keyframes dsLogoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.ds-login-logo .lg-ico { animation: dsLogoFloat 3s ease-in-out infinite; }

/* 10. Toast: 弹性下滑 */
.toast.show { animation: dsToastIn .4s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes dsToastIn { 0% { transform: translateX(-50%) translateY(-70px); } 100% { transform: translateX(-50%) translateY(0); } }

/* 11. Tabs 按钮: 指示条滑动 (用 background 过渡加强) */
.tabs button { transition: all .2s cubic-bezier(.16, 1, .3, 1); }
.tabs button:active { transform: scale(.94); }

/* 12. IP 列表地区: 拉黑行红闪 */
@keyframes dsBlackFlash { 0% { background: rgba(220, 38, 38, .18); } 100% { background: #FEF2F2; } }
tr.bg-red > td { animation: dsBlackFlash .5s ease-out; }

/* 13. 权限减少动画负担 (用户偏好 prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .phone-progress-fill { width: 100% !important; }
  .phone-install-badge { opacity: 1 !important; }
}

/* ★ E#547b 登录页载入序列: brand→title→phone→feats→表单 依次入场 */
@keyframes dsLoginSeq { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.ds-login-hero .hero-brand { animation: dsLoginSeq .5s cubic-bezier(.16, 1, .3, 1) .05s backwards; }
.ds-login-hero .hero-title { animation: dsLoginSeq .5s cubic-bezier(.16, 1, .3, 1) .15s backwards; }
.ds-login-hero .hero-visual { animation: dsLoginSeq .55s cubic-bezier(.16, 1, .3, 1) .3s backwards; }
.ds-login-hero .hero-feats { animation: dsLoginSeq .5s cubic-bezier(.16, 1, .3, 1) .45s backwards; }
.ds-login-hero .feat { animation: dsFeatIn .45s cubic-bezier(.16, 1, .3, 1) backwards; }
.ds-login-hero .hero-foot { animation: dsLoginSeq .5s ease-out .65s backwards; }
.ds-login-card { animation: dsLoginSwap .35s cubic-bezier(.16, 1, .3, 1), dsLoginSeq .55s cubic-bezier(.16, 1, .3, 1) .2s backwards; }
@keyframes dsBootSpin { to { transform: rotate(360deg); } }
