/* ============================================================
   小米授权服务系统  Xiaomi China Authorized Service System
   Glass-morphism · Fresh · Official Xiaomi Style
   ============================================================ */

@import url('https://font.sec.miui.com/font/css?family=MiSans:100,200,300,400,500,600,700,900:Chinese_Simplify,Latin&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

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

:root {
  /* 小米官方橙 + 清新玻璃配色 */
  --mi-orange: #FF6900;
  --mi-orange-soft: #FF8A33;
  --mi-orange-deep: #E55A00;
  --mi-orange-bg: #FFF4EC;

  --mi-mint: #9FE7D3;
  --mi-sky: #BEE3FF;
  --mi-lavender: #D9C9FF;
  --mi-peach: #FFD9C2;

  --ink-900: #111418;
  --ink-800: #1F242B;
  --ink-700: #343A42;
  --ink-600: #4F5662;
  --ink-500: #6E7683;
  --ink-400: #9BA3AF;
  --ink-300: #C9CED6;
  --ink-200: #E5E8EC;
  --ink-100: #F1F3F5;
  --ink-50:  #F8FAFB;

  --success: #17B26A;
  --warning: #F79009;
  --danger:  #F04438;
  --info:    #0EA5E9;

  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-bg-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 20px 40px -20px rgba(31, 36, 43, 0.18),
    0 8px 20px -10px rgba(31, 36, 43, 0.10);

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --trans: all .28s cubic-bezier(.2,.8,.2,1);

  --font-sans: 'MiSans', 'MI Sans', 'PingFang SC', 'HarmonyOS Sans SC',
               'Noto Sans SC', -apple-system, BlinkMacSystemFont,
               'Segoe UI', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', Consolas,
               'Courier New', monospace;
}

html, body {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.2px;
  background:
    radial-gradient(1200px 700px at -10% -10%, #FFE8D6 0%, transparent 55%),
    radial-gradient(1000px 600px at 110% 0%, #D8F3EA 0%, transparent 50%),
    radial-gradient(900px 800px at 50% 120%, #E7E1FF 0%, transparent 55%),
    linear-gradient(180deg, #FBFCFE 0%, #F4F7FA 100%);
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(2px 2px at 80% 70%, rgba(255,255,255,.5), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- 全站水印 ---------- */
.watermark {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  opacity: 0.16;
  background-image: var(--wm-image, none);
  background-repeat: repeat;
  mix-blend-mode: multiply;
}

/* ---------- 小米 Logo ---------- */
.mi-logo {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #FF8A33 0%, #FF6900 60%, #E55A00 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
  box-shadow:
    0 6px 14px -4px rgba(255,105,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.45);
  letter-spacing: -0.5px;
  font-family: var(--font-sans);
  flex-shrink: 0;
}
.mi-logo.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 26px; }
.mi-logo.sm { width: 28px; height: 28px; border-radius: 7px; font-size: 14px; }

/* ============================================================
   登录 / 注册
   ============================================================ */
.auth-wrap {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%; max-width: 460px;
  background: var(--glass-bg);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 44px 40px 36px;
  box-shadow: var(--glass-shadow);
  animation: floatIn .6s cubic-bezier(.22,1,.36,1);
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 8px;
}
.auth-brand-text h1 {
  font-size: 22px; font-weight: 600;
  color: var(--ink-900); letter-spacing: 0.5px;
  line-height: 1.25;
}
.auth-brand-text .sub {
  font-size: 12px; color: var(--ink-500);
  margin-top: 2px; font-weight: 400;
  letter-spacing: 0.3px;
}

.auth-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500;
  color: var(--mi-orange-deep);
  background: var(--mi-orange-bg);
  padding: 5px 10px; border-radius: 999px;
  margin: 14px 0 6px;
  border: 1px solid rgba(255,105,0,.14);
}
.auth-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mi-orange);
  box-shadow: 0 0 0 4px rgba(255,105,0,.15);
}

.auth-title-cn {
  font-size: 26px; font-weight: 600;
  color: var(--ink-900); letter-spacing: 0.5px;
  margin-top: 2px;
}
.auth-title-en {
  font-size: 12px; font-weight: 400;
  color: var(--ink-500); margin-top: 4px; margin-bottom: 28px;
  letter-spacing: 0.5px;
}

/* ============================================================
   表单
   ============================================================ */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--ink-700); margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--ink-800);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  transition: all .25s cubic-bezier(.22,1,.36,1);
  outline: none;
}
.form-group textarea { font-family: var(--font-mono); font-size: 13px; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--ink-400); }

.form-group input:hover,
.form-group textarea:hover { border-color: var(--ink-300); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--mi-orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,105,0,.12);
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-sans);
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.22,1,.36,1);
  position: relative;
  overflow: hidden;
  user-select: none;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, #FF8A33 0%, #FF6900 55%, #E55A00 100%);
  color: #fff;
  box-shadow:
    0 8px 20px -8px rgba(255,105,0,.55),
    inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 26px -10px rgba(255,105,0,.6),
    inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(255,255,255,0.72);
  color: var(--ink-800);
  border-color: var(--ink-200);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: #fff;
  border-color: var(--ink-300);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  border-color: var(--ink-200);
}
.btn-ghost:hover { background: var(--ink-50); }

.btn-danger {
  background: linear-gradient(135deg, #FF6B6B 0%, #F04438 100%);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(240,68,56,.55);
}
.btn-danger:hover { transform: translateY(-1px); }

.btn-success {
  background: linear-gradient(135deg, #2DD4A7 0%, #17B26A 100%);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(23,178,106,.5);
}
.btn-success:hover { transform: translateY(-1px); }

.btn.sm { padding: 8px 14px; font-size: 13px; width: auto; }
.btn.auto { width: auto; }

/* ============================================================
   Dashboard 布局
   ============================================================ */
.dashboard {
  position: relative; z-index: 2;
  display: flex;
  width: 100vw; min-height: 100vh;
}

/* ---------- 侧栏（玻璃） ---------- */
.sidebar {
  width: 272px; min-width: 272px;
  padding: 22px 16px;
  flex-shrink: 0;
  position: sticky; top: 0; align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  /* 平滑滚动 */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 侧边栏滚动条 */
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,105,0,.15);
  border-radius: 2px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255,105,0,.3);
}

.sidebar-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 20px 16px;
  box-shadow: var(--glass-shadow);
  min-height: calc(100vh - 44px);
  display: flex; flex-direction: column;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 6px 16px;
  border-bottom: 1px dashed rgba(31,36,43,.08);
  margin-bottom: 14px;
}
.brand-name {
  line-height: 1.25;
}
.brand-name .row1 {
  font-size: 16px; font-weight: 600;
  color: var(--ink-900); letter-spacing: 0.3px;
}
.brand-name .row2 {
  font-size: 12px; color: var(--mi-orange);
  margin-top: 4px; letter-spacing: 1px;
  font-weight: 700; line-height: 1.2;
}
.brand-name .row3 {
  font-size: 11px; color: var(--ink-500);
  margin-top: 2px; letter-spacing: 0.5px;
  font-weight: 500; line-height: 1.3;
}

.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.sidebar-user .avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB37A 0%, #FF6900 100%);
  color: #fff; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.sidebar-user .meta { line-height: 1.2; min-width: 0; flex: 1; }
.sidebar-user .name {
  font-size: 14px; font-weight: 600; color: var(--ink-900);
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .role {
  font-size: 11px; color: var(--mi-orange-deep);
  background: var(--mi-orange-bg);
  padding: 2px 8px; border-radius: 999px;
  margin-top: 4px; display: inline-block;
  border: 1px solid rgba(255,105,0,.15);
}

.nav-section-label {
  font-size: 11px; font-weight: 500;
  color: var(--ink-400); text-transform: uppercase;
  letter-spacing: 1px; padding: 10px 12px 6px;
}

.sidebar-menu { display: flex; flex-direction: column; gap: 3px; flex: 1; }

.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  color: var(--ink-700);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  transition: all .2s cubic-bezier(.22,1,.36,1);
  position: relative;
  border: 1px solid transparent;
}
.menu-item .nav-icon {
  width: 20px; height: 20px; flex-shrink: 0;
  color: var(--ink-500);
  transition: color .2s;
}
.menu-item:hover {
  background: rgba(255,255,255,0.7);
  color: var(--ink-900);
  border-color: rgba(255,255,255,0.8);
}
.menu-item:hover .nav-icon { color: var(--mi-orange); }

.menu-item.active {
  background: linear-gradient(135deg, rgba(255,138,51,.14) 0%, rgba(255,105,0,.10) 100%);
  color: var(--mi-orange-deep);
  border-color: rgba(255,105,0,.18);
  font-weight: 600;
  box-shadow: 0 6px 16px -10px rgba(255,105,0,.35);
}
.menu-item.active .nav-icon { color: var(--mi-orange); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(31,36,43,.08);
  font-size: 11px; color: var(--ink-400);
  text-align: center; letter-spacing: 0.4px;
  line-height: 1.5;
}
.sidebar-footer strong { color: var(--ink-600); font-weight: 500; }

/* ---------- 主内容 ---------- */
.main-content {
  flex: 1;
  padding: 22px 26px;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* 平滑滚动 */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* 确保可以滚动 */
  max-height: 100vh;
}

/* 主内容区域滚动条 */
.main-content::-webkit-scrollbar {
  width: 6px;
}
.main-content::-webkit-scrollbar-track {
  background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
  background: rgba(31,36,43,.12);
  border-radius: 3px;
}
.main-content::-webkit-scrollbar-thumb:hover {
  background: rgba(31,36,43,.25);
}

.header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  margin-bottom: 20px;
  box-shadow: var(--glass-shadow);
}
.header-left h1 {
  font-size: 20px; font-weight: 800;
  color: var(--ink-900); letter-spacing: 0.6px;
  display: flex; align-items: center; gap: 12px;
  font-family: 'Inter','SF Pro Display','Segoe UI Variable','Segoe UI',-apple-system,'Helvetica Neue',Arial,sans-serif;
  text-transform: none;
  background: linear-gradient(135deg, #1F242B 0%, #2A2F36 60%, #FF6900 130%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-left h1 .mi-logo {
  -webkit-text-fill-color: #fff;
  color: #fff;
  background: linear-gradient(135deg, #FF8A33, #E55A00);
}
.header-left h1 .h1-suffix {
  color: var(--mi-orange);
  -webkit-text-fill-color: var(--mi-orange);
  font-weight: 800;
  letter-spacing: 0.8px;
  font-family: inherit;
  padding-left: 4px;
  border-left: 2px solid rgba(255,105,0,.4);
  margin-left: 4px;
  padding-left: 12px;
}
.header-left .crumb {
  font-size: 12px; color: var(--ink-500);
  margin-top: 6px; letter-spacing: 0.4px;
}
.header-left .crumb .sep { margin: 0 6px; color: var(--ink-300); }
.header-left .crumb-warn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(255,236,219,.85), rgba(255,224,200,.6));
  border: 1px solid rgba(255,105,0,.22);
  border-radius: 999px;
  color: #B23F00;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.4px;
  box-shadow: 0 4px 12px -6px rgba(255,105,0,.3);
}
.header-left .crumb-warn svg {
  width: 14px; height: 14px; flex-shrink: 0;
  color: var(--mi-orange);
}

.header-right {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-700);
}
.user-chip strong { color: var(--ink-900); font-weight: 600; }
.user-chip .chip-icon { width: 14px; height: 14px; color: var(--mi-orange); }

.role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid;
}
.role-chip.lvl-high {
  color: #fff;
  background: linear-gradient(135deg, #FF8A33, #E55A00);
  border-color: rgba(255,105,0,.3);
  box-shadow: 0 6px 14px -6px rgba(255,105,0,.5);
}
.role-chip.lvl-mid {
  color: #fff;
  background: linear-gradient(135deg, #3BA8FF, #0A84FF);
  border-color: rgba(10,132,255,.3);
  box-shadow: 0 6px 14px -6px rgba(10,132,255,.5);
}
.role-chip.lvl-low {
  color: var(--ink-800);
  background: linear-gradient(135deg, #F3F5F7, #E7EBF0);
  border-color: var(--ink-200);
}

.content { animation: fadeIn .35s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 玻璃卡片 ---------- */
.card {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--glass-shadow);
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s;
}
.card:hover { transform: translateY(-1px); }

.card h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 18px;
  letter-spacing: 0.3px;
}
.card h3 .accent {
  width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, #FF8A33, #FF6900);
}
.card h3 .mi-tag {
  font-size: 11px; font-weight: 500;
  color: var(--mi-orange-deep);
  background: var(--mi-orange-bg);
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid rgba(255,105,0,.15);
  margin-left: auto;
  letter-spacing: 0.3px;
}

/* ---------- 统计 ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  position: relative;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: transform .3s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card.clickable {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.stat-card.clickable:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px -12px rgba(31, 36, 43, 0.25), var(--glass-shadow);
  border-color: rgba(255, 105, 0, 0.3);
}
.stat-card.clickable:active {
  transform: translateY(-2px) scale(0.98);
  transition: all 0.1s ease;
}
.stat-card.clickable::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 105, 0, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.stat-card.clickable:hover::before {
  opacity: 1;
}
.stat-card::after {
  content: '';
  position: absolute; right: -30px; top: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,138,51,.18), transparent 65%);
}
.stat-card h4 {
  font-size: 13px; font-weight: 500;
  color: var(--ink-500);
  margin-bottom: 10px; letter-spacing: 0.3px;
}
.stat-card p {
  font-size: 30px; font-weight: 600;
  color: var(--ink-900); letter-spacing: -0.5px;
  line-height: 1;
}
.stat-card .stat-icon {
  position: absolute; right: 18px; top: 18px;
  width: 20px; height: 20px;
  color: var(--mi-orange);
  opacity: .85;
}

/* ---------- 表格 ---------- */
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
}
table th, table td {
  padding: 13px 14px;
  font-size: 13.5px;
  text-align: left;
  border-bottom: 1px solid rgba(31,36,43,.06);
}
table th {
  color: var(--ink-500); font-weight: 500;
  background: rgba(255,255,255,0.6);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 11.5px;
  position: sticky; top: 0;
}
table th:first-child { border-top-left-radius: var(--radius); }
table th:last-child { border-top-right-radius: var(--radius); }
table td { color: var(--ink-700); }
table tbody tr { transition: background .2s; }
table tbody tr:hover { background: rgba(255,138,51,.05); }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}
.badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.badge-success { color: #0B8A52; background: #E7F8EF; border-color: #BAEBCF; }
.badge-warning { color: #B06900; background: #FFF4E5; border-color: #FFD9A8; }
.badge-danger  { color: #B42318; background: #FEE4E2; border-color: #FECDCA; }
.badge-info    { color: #026AA2; background: #E0F2FE; border-color: #BAE6FD; }
.badge-secondary { color: #344054; background: #F2F4F7; border-color: #D0D5DD; }

/* 通道标签样式 */
.badge-channel-1 { color: #B23F00; background: #FFF1E8; border-color: #FFD2B5; }
.badge-channel-2 { color: #1F242B; background: #EEF1F4; border-color: #D8DEE6; }

/* ---------- Modal ---------- */
.modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(17,20,24,0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center; align-items: center;
  padding: 20px;
  animation: fadeIn .2s ease-out;
}
.modal.active { display: flex; }
.modal-content {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 28px;
  max-width: 560px; width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 30px 60px -15px rgba(17,20,24,.35);
  animation: popIn .35s cubic-bezier(.22,1,.36,1);
  /* 平滑滚动 */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 自定义滚动条样式 */
.modal-content::-webkit-scrollbar {
  width: 6px;
}
.modal-content::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}
.modal-content::-webkit-scrollbar-thumb {
  background: rgba(31,36,43,.15);
  border-radius: 3px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(31,36,43,.3);
}
.modal-content.wide { max-width: 720px; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
}
.modal-header h3 {
  font-size: 19px; font-weight: 600; color: var(--ink-900);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: 0.3px;
}
.modal-header h3 .accent {
  width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, #FF8A33, #FF6900);
}
.modal-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--ink-50);
  color: var(--ink-500); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
  transition: all .25s;
}
.modal-close:hover { background: var(--ink-100); color: var(--ink-800); transform: rotate(90deg); }

/* ---------- 确认退出 ---------- */
.confirm-modal .modal-content { max-width: 420px; text-align: center; padding: 32px 28px; }
.confirm-icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFE5D0 0%, #FFB37A 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 10px 24px -8px rgba(255,105,0,.45);
}
.confirm-icon svg { width: 30px; height: 30px; }
.confirm-title {
  font-size: 19px; font-weight: 600;
  color: var(--ink-900); margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.confirm-subtitle {
  font-size: 13px; color: var(--ink-500);
  line-height: 1.7; margin-bottom: 6px;
}
.confirm-hint {
  font-size: 12px; color: var(--ink-400);
  margin-bottom: 22px; padding: 10px 14px;
  background: var(--ink-50); border-radius: 10px;
  line-height: 1.6;
}
.confirm-actions {
  display: flex; gap: 12px;
}
.confirm-actions .btn { flex: 1; }

/* ---------- 服务选择切换 ---------- */
.service-switch {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 12px; margin-bottom: 6px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-switch.single-option {
  grid-template-columns: 1fr;
}
.service-switch.two-option {
  grid-template-columns: 1fr 1fr;
}
.service-option {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink-200);
  background: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: left;
  font-family: var(--font-sans);
  overflow: hidden;
}
.service-option:hover {
  border-color: var(--mi-orange-soft);
  background: #fff;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.service-option.selected {
  border-color: var(--mi-orange);
  background: linear-gradient(135deg, #FFF4EC 0%, #FFE8D6 100%);
  box-shadow: 0 8px 24px -8px rgba(255,105,0,0.5);
  transform: translateY(-1px) scale(1.02);
}
.service-option:active {
  transform: translateY(0) scale(0.98);
  transition: all 0.1s ease;
}
.service-option .so-title {
  font-size: 15px; font-weight: 600; color: var(--ink-900);
  display: flex; align-items: center; gap: 8px;
  transition: color 0.25s ease;
}
.service-option.selected .so-title {
  color: var(--mi-orange);
}
.service-option .so-price {
  font-size: 12px; color: var(--ink-500);
  margin-top: 6px;
  transition: color 0.25s ease;
}
.service-option.selected .so-price {
  color: var(--mi-orange-soft);
}
.service-option .so-check {
  position: absolute; top: 12px; right: 12px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--ink-300);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.service-option:hover .so-check {
  border-color: var(--mi-orange-soft);
  transform: scale(1.1);
}
.service-option.selected .so-check {
  border-color: var(--mi-orange);
  background: var(--mi-orange);
  transform: scale(1);
}
.service-option .so-check::after {
  content: '';
  width: 0;
  height: 0;
  border-radius: 50%;
  background: #fff;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.service-option.selected .so-check::after {
  width: 8px;
  height: 8px;
}

/* 服务选择区域出现动画 */
#service-selection-group {
  transform-origin: top center;
}
#service-selection-group.showing {
  animation: serviceGroupAppear 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes serviceGroupAppear {
  0% {
    opacity: 0;
    transform: translateY(-15px) scaleY(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

/* 选项切换时的过渡效果 */
.service-option.switching {
  animation: optionSwitch 0.3s ease;
}
@keyframes optionSwitch {
  0% { transform: scale(1); }
  50% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* FDL选项显示/隐藏过渡 */
#fdl-option {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#fdl-option[style*="display: none"] {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

/* ---------- 筛选下拉框美化 ---------- */
.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 12px 40px 12px 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 130px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23FF6900' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  backdrop-filter: blur(20px);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 4px 15px -4px rgba(31, 36, 43, 0.1),
    0 2px 8px -2px rgba(0, 0, 0, 0.05);
}
.filter-select:hover {
  border-color: rgba(255, 105, 0, 0.3);
  background: linear-gradient(135deg, #fff 0%, rgba(255, 248, 245, 0.95) 100%);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 12px 30px -8px rgba(255, 105, 0, 0.2),
    0 4px 12px -2px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px) scale(1.02);
}
.filter-select:focus {
  outline: none;
  border-color: var(--mi-orange);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 0 0 4px rgba(255, 105, 0, 0.12),
    0 12px 30px -8px rgba(255, 105, 0, 0.25);
  transform: translateY(-1px);
}

/* 下拉选项样式 - 浏览器原生下拉菜单无法完全自定义，但我们可以美化select本身 */
.filter-select option {
  padding: 12px 18px;
  font-size: 14px;
  background: #fff;
  color: var(--ink-700);
  font-weight: 500;
}

/* 选中状态 */
.filter-select option:checked {
  background: linear-gradient(135deg, rgba(255, 105, 0, 0.1) 0%, rgba(255, 138, 51, 0.1) 100%);
  color: var(--mi-orange);
  font-weight: 600;
}

/* 悬停状态 */
.filter-select option:hover {
  background: var(--mi-orange-soft);
}

/* 筛选组容器 */
.filter-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* 筛选标签 */
.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

/* ---------- Blob输入区域粘贴按钮 ---------- */
.blob-input-wrapper {
  position: relative;
}
.blob-input-wrapper textarea {
  padding-right: 80px;
}
.blob-paste-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--mi-orange) 0%, var(--mi-orange-soft) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(255, 105, 0, 0.3);
}
.blob-paste-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 105, 0, 0.4);
}
.blob-paste-btn:active {
  transform: translateY(0) scale(0.98);
}
.blob-paste-btn svg {
  stroke: currentColor;
}

/* ---------- 通道选择切换 ---------- */
.channel-switch {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 6px;
}
.channel-option {
  position: relative;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink-200);
  background: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: all .25s cubic-bezier(.22,1,.36,1);
  text-align: left;
  font-family: var(--font-sans);
}
.channel-option:hover {
  border-color: var(--info);
  background: #fff;
  transform: translateY(-1px);
}
.channel-option.selected {
  border-color: var(--info);
  background: linear-gradient(135deg, #E0F2FE 0%, #DBEAFE 100%);
  box-shadow: 0 8px 20px -10px rgba(14,165,233,.4);
}
.channel-option .ch-title {
  font-size: 14px; font-weight: 600; color: var(--ink-900);
  display: flex; align-items: center; gap: 8px;
}
.channel-option .ch-desc {
  font-size: 11px; color: var(--ink-500);
  margin-top: 4px;
}
.channel-option .ch-check {
  position: absolute; top: 12px; right: 12px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-300);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.channel-option.selected .ch-check {
  border-color: var(--info);
  background: var(--info);
}
.channel-option.selected .ch-check::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: #fff;
}

/* 通道标签样式 */
.channel-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.channel-badge.recommended {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.channel-option.selected .channel-badge.recommended {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.channel-badge.new {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.channel-option.selected .channel-badge.new {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
}

.channel-badge.classic {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.channel-option.selected .channel-badge.classic {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.4);
}

/* ---------- 通道下拉选择器 ---------- */
.channel-selector {
  position: relative;
  width: 100%;
}

.channel-dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 4px 20px -4px rgba(31, 36, 43, 0.15),
    0 2px 8px -2px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.channel-dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.channel-dropdown:hover::before {
  left: 100%;
}

.channel-dropdown:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 248, 245, 0.9) 100%);
  border-color: rgba(255, 105, 0, 0.3);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 12px 40px -8px rgba(255, 105, 0, 0.2),
    0 4px 12px -2px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px) scale(1.01);
}

.channel-dropdown.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 245, 240, 0.95) 100%);
  border-color: rgba(255, 105, 0, 0.5);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 0 0 4px rgba(255, 105, 0, 0.1),
    0 16px 50px -12px rgba(255, 105, 0, 0.25);
  transform: translateY(-1px);
}

.channel-selected {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-placeholder {
  color: var(--ink-400);
  font-size: 14px;
}

.channel-arrow {
  width: 20px;
  height: 20px;
  color: var(--ink-400);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.channel-dropdown.active .channel-arrow {
  transform: rotate(180deg);
}

.channel-options {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 30px 60px -15px rgba(31, 36, 43, 0.3),
    0 10px 30px -10px rgba(0, 0, 0, 0.15);
  z-index: 100;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-15px) scale(0.96);
  transform-origin: top center;
  transition: 
    opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    visibility 0.35s;
  visibility: hidden;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.channel-options.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.channel-option-item {
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 0;
}

.channel-option-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, var(--mi-orange) 0%, var(--mi-orange-soft) 100%);
  border-radius: 0 4px 4px 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.channel-option-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 105, 0, 0.08) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
}

.channel-option-item:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.channel-option-item:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.channel-option-item:hover::after {
  opacity: 1;
}

.channel-option-item.selected {
  background: linear-gradient(135deg, rgba(255, 248, 245, 0.95) 0%, rgba(255, 240, 235, 0.9) 100%);
  box-shadow: 0 2px 8px rgba(255, 105, 0, 0.1);
}

.channel-option-item.selected::before {
  transform: translateY(-50%) scaleY(1);
}

.channel-option-item.selected::after {
  opacity: 1;
}

.channel-option-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.channel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 3px 6px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.channel-option-item:hover .channel-dot {
  transform: scale(1.2);
}

.channel-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-900);
  transition: color 0.25s ease;
}

.channel-option-item:hover .channel-name {
  color: var(--mi-orange);
}

.channel-option-desc {
  font-size: 12px;
  color: var(--ink-500);
  padding-left: 22px;
  transition: all 0.25s ease;
  margin-top: 6px;
  font-weight: 400;
}

.channel-option-item:hover .channel-option-desc {
  color: var(--ink-600);
  transform: translateX(2px);
}

/* 已选通道的显示样式 */
.channel-selected-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.channel-selected-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.channel-selected-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-900);
}

/* ---------- Sig 输出框 ---------- */
.sig-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(159,231,211,.35) 0%, rgba(190,227,255,.35) 100%);
  border: 1px solid rgba(23,178,106,.22);
  box-shadow: 0 10px 24px -12px rgba(23,178,106,.25);
}
.sig-panel .sig-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.sig-panel .sig-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(23,178,106,.18);
}
.sig-panel h4 {
  font-size: 14px; font-weight: 600; color: #0B8A52;
  letter-spacing: 0.3px;
}
.sig-panel .sig-box {
  display: flex; gap: 10px;
}
.sig-panel textarea {
  flex: 1; min-height: 90px;
  padding: 12px 14px;
  border: 1px solid rgba(23,178,106,.3);
  border-radius: var(--radius);
  background: #fff;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-800);
  resize: vertical;
  outline: none;
}
.sig-panel textarea:focus { box-shadow: 0 0 0 4px rgba(23,178,106,.15); }

/* ---------- Alert ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid;
  animation: slideIn .25s ease-out;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.alert-success { color: #0B8A52; background: #E7F8EF; border-color: #BAEBCF; }
.alert-error   { color: #B42318; background: #FEE4E2; border-color: #FECDCA; }
.alert-warning { color: #B06900; background: #FFF4E5; border-color: #FFD9A8; }

/* ---------- Loading ---------- */
.loading {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 邀请码块 ---------- */
.invite-block {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(255,138,51,.08) 0%, rgba(255,105,0,.04) 100%);
  border: 1px solid rgba(255,105,0,.15);
  border-radius: var(--radius-lg);
}
.invite-block .label { font-size: 12px; color: var(--ink-500); }
.invite-block code {
  display: inline-block; margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 600; letter-spacing: 2px;
  color: var(--mi-orange-deep);
}

/* ---------- Misc ---------- */
.auth-footer {
  text-align: center; margin-top: 24px;
  padding-top: 20px; border-top: 1px solid rgba(31,36,43,.08);
  font-size: 13px; color: var(--ink-500);
}
.auth-footer a {
  color: var(--mi-orange-deep); font-weight: 600; text-decoration: none;
}
.auth-footer a:hover { color: var(--mi-orange); }

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

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(31,36,43,.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(31,36,43,.3); }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   长横条身份胶囊 (User Bar)
   ============================================================ */
.user-bar {
  display: inline-flex; align-items: stretch;
  height: 46px;
  padding: 0 0 0 6px;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,247,240,.85));
  border: 1px solid rgba(255,105,0,.18);
  border-radius: 999px;
  box-shadow: 0 8px 22px -10px rgba(255,105,0,.25), 0 1px 0 rgba(255,255,255,.6) inset;
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  overflow: hidden;
}
.user-bar .ub-avatar {
  align-self: center;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB37A, #FF6900);
  color: #fff; font-weight: 700; font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px -3px rgba(255,105,0,.5), 0 1px 0 rgba(255,255,255,.4) inset;
  margin-right: 12px;
}
.user-bar .ub-section {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 14px;
  min-width: 0;
}
.user-bar .ub-label {
  font-size: 9.5px; font-weight: 600;
  color: var(--ink-400); letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: 1;
}
.user-bar .ub-value {
  font-size: 13px; font-weight: 600;
  color: var(--ink-900); letter-spacing: 0.3px;
  margin-top: 4px; line-height: 1;
  white-space: nowrap;
}
.user-bar .ub-value strong { color: var(--mi-orange); }
.user-bar .ub-divider {
  align-self: center;
  width: 1px; height: 24px;
  background: linear-gradient(to bottom, transparent, rgba(31,36,43,.18), transparent);
}
.user-bar .ub-tier .ub-value {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.user-bar.lvl-high .ub-tier .ub-value {
  background: linear-gradient(135deg, #FFE0CC, #FFCBA8);
  color: #B23F00;
  box-shadow: 0 2px 6px -2px rgba(255,105,0,.3) inset;
}
.user-bar.lvl-mid .ub-tier .ub-value {
  background: linear-gradient(135deg, #DCEEFF, #B6DBFF);
  color: #0A4FA3;
}
.user-bar.lvl-low .ub-tier .ub-value {
  background: linear-gradient(135deg, #EEF1F5, #DCE2EA);
  color: var(--ink-700);
}
.user-bar .ub-logout {
  align-self: stretch;
  width: 50px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FFF7F0, #FFE7D2);
  border: none;
  border-left: 1px solid rgba(255,105,0,.18);
  color: var(--mi-orange);
  cursor: pointer;
  transition: var(--trans);
}
.user-bar .ub-logout:hover {
  background: linear-gradient(135deg, var(--mi-orange), #E55A00);
  color: #fff;
}
.user-bar .ub-logout svg { width: 18px; height: 18px; }

/* ============================================================
   登录后页面（admin / agent / user）满屏水印
   ============================================================ */
.app-watermark {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  display: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='200' viewBox='0 0 420 200'><text x='-20' y='115' font-family='Arial,Helvetica,sans-serif' font-size='23' font-weight='800' fill='%231F242B' fill-opacity='0.26' letter-spacing='3' transform='rotate(-22 210 95)'>XIAOMI · 小米授权</text></svg>");
  background-repeat: repeat;
  background-size: 420px 200px;
}
body.has-watermark .dashboard {
  position: relative;
  z-index: 1;
}

/* ============================================================
   登录页 - 高级感装饰层
   ============================================================ */
.auth-stage {
  position: relative;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  /* 平滑滚动 */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.auth-stage::before,
.auth-stage::after {
  content: ""; position: absolute;
  pointer-events: none; z-index: 0;
}
.auth-stage::before {
  top: -200px; left: -150px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,138,51,.45), transparent 65%);
  filter: blur(40px);
  animation: float-a 18s ease-in-out infinite;
}
.auth-stage::after {
  bottom: -200px; right: -180px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(155,206,255,.55), transparent 65%);
  filter: blur(50px);
  animation: float-b 22s ease-in-out infinite;
}
.auth-orb {
  position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 0;
}
.auth-orb.o1 {
  top: 12%; right: 18%; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,200,150,.55), transparent 70%);
  filter: blur(28px);
  animation: float-a 14s ease-in-out infinite reverse;
}
.auth-orb.o2 {
  bottom: 18%; left: 14%; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(195,255,220,.6), transparent 70%);
  filter: blur(24px);
  animation: float-b 16s ease-in-out infinite;
}
/* 满屏对角文字水印 - 深色官方款 */
.auth-grid {
  position: absolute; inset: 0; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='460' height='180' viewBox='0 0 460 180'><text x='-20' y='110' font-family='Arial,Helvetica,sans-serif' font-size='30' font-weight='900' fill='%231F242B' fill-opacity='0.6' letter-spacing='4' transform='rotate(-22 230 90)'>XIAOMI · AUTHORIZED SERVICE</text></svg>");
  background-repeat: repeat;
  background-size: 460px 180px;
  pointer-events: none;
}

@keyframes float-a {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(40px,30px) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-40px,-30px) scale(1.1); }
}

.auth-card {
  position: relative;
  z-index: 1;
}
.auth-card::before {
  content: "";
  position: absolute; inset: -1px;
  background: linear-gradient(135deg, rgba(255,138,51,.55), rgba(255,255,255,0) 35%, rgba(120,180,255,.4) 75%, rgba(255,255,255,0));
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  filter: blur(0.4px);
  opacity: .85;
}
.auth-card::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 50% -20%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(80% 50% at 50% 120%, rgba(255,224,200,.45), transparent 60%);
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}

.auth-shimmer {
  position: relative; overflow: hidden;
  border-radius: inherit;
}
.auth-shimmer::after {
  content: "";
  position: absolute; top: 0; left: -60%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  animation: shimmer 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { left: -60%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}

.auth-badges {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 14px 0 4px;
}
.auth-badges .ab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.4px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(31,36,43,.06);
  color: var(--ink-700);
}
.auth-badges .ab svg { width: 12px; height: 12px; color: var(--mi-orange); }
.auth-badges .ab.dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #2DD673; box-shadow: 0 0 0 3px rgba(45,214,115,.18);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(45,214,115,.18); }
  50%      { box-shadow: 0 0 0 6px rgba(45,214,115,0); }
}

.auth-meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin: 18px 0 4px;
}
.auth-meta .am {
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(31,36,43,.05);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.auth-meta .am .v {
  font-size: 16px; font-weight: 700;
  color: var(--mi-orange);
  letter-spacing: 0.5px;
}
.auth-meta .am .l {
  font-size: 10px; color: var(--ink-500);
  letter-spacing: 0.6px;
  margin-top: 2px;
  text-transform: uppercase;
}

/* ============================================================
   登录页 - 联系我们按钮 + 弹窗
   ============================================================ */
.contact-btn {
  position: absolute; top: 18px; right: 18px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,247,240,.85));
  border: 1px solid rgba(255,105,0,.22);
  border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.4px;
  color: #B23F00;
  cursor: pointer;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 6px 18px -6px rgba(255,105,0,.35);
  transition: all .25s cubic-bezier(.22,1,.36,1);
  z-index: 2;
}
.contact-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.contact-btn:hover {
  background: linear-gradient(135deg, #FF6900, #E55A00);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -6px rgba(255,105,0,.5);
}

.contact-modal.active {
  display: flex;
  align-items: center; justify-content: center;
  z-index: 9999;
  /* 允许模态框背景滚动 */
  overflow-y: auto;
  overflow-x: hidden;
}
.contact-card {
  max-width: 580px; width: 92%;
  max-height: 85vh;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFAF5 100%);
  border: 1px solid rgba(31,36,43,.08);
  border-radius: 22px;
  padding: 0;
  box-shadow:
    0 32px 80px -24px rgba(31,36,43,.35),
    0 8px 24px -12px rgba(255,105,0,.18),
    0 1px 0 rgba(255,255,255,.9) inset;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  /* 平滑滚动 */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 联系我们弹窗滚动条 */
.contact-card::-webkit-scrollbar {
  width: 6px;
}
.contact-card::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}
.contact-card::-webkit-scrollbar-thumb {
  background: rgba(255,105,0,.2);
  border-radius: 3px;
}
.contact-card::-webkit-scrollbar-thumb:hover {
  background: rgba(255,105,0,.4);
}

/* 顶部官方栏 */
.contact-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1F242B 0%, #2A2F36 100%);
  position: relative;
}
.contact-topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,105,0,.6), transparent);
}
.contact-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px 7px 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #fff;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.22,1,.36,1);
  backdrop-filter: blur(8px);
}
.contact-back svg { width: 16px; height: 16px; flex-shrink: 0; }
.contact-back:hover {
  background: var(--mi-orange);
  border-color: var(--mi-orange);
  transform: translateX(-2px);
  box-shadow: 0 6px 18px -6px rgba(255,105,0,.6);
}
.contact-topbar-tag {
  font-size: 10px; font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.7);
  font-family: 'Inter','SF Pro Display',sans-serif;
}

/* 橙红渐变细条 */
.contact-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, #FF6900 0%, #FF8A33 35%, #E55A00 100%);
  position: relative;
  overflow: hidden;
}
.contact-accent-bar::after {
  content: "";
  position: absolute; top: 0; left: -40%;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  animation: accent-shine 3.5s ease-in-out infinite;
}
@keyframes accent-shine {
  0%, 100% { left: -40%; }
  60% { left: 110%; }
}

/* 主标 */
.contact-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 28px 14px;
}
.contact-hero-logo {
  position: relative;
  flex-shrink: 0;
}
.contact-hero-logo .mi-logo.lg {
  width: 52px; height: 52px;
  font-size: 19px;
  border-radius: 14px;
  box-shadow: 0 8px 22px -8px rgba(255,105,0,.55);
}
.contact-hero-badge {
  position: absolute; bottom: -4px; right: -4px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border: 2px solid var(--mi-orange);
  border-radius: 50%;
  color: var(--mi-orange);
  font-size: 11px; font-weight: 800;
  font-family: 'Inter',sans-serif;
}
.contact-hero-cn {
  font-size: 18px; font-weight: 700;
  color: var(--ink-900); letter-spacing: 0.4px;
}
.contact-hero-en {
  font-size: 10.5px; font-weight: 600;
  color: var(--ink-400); letter-spacing: 1.2px;
  margin-top: 4px;
  text-transform: uppercase;
}

/* slogan */
.contact-slogan {
  display: flex; align-items: center; gap: 10px;
  margin: 0 28px 18px;
  padding: 11px 14px;
  background: linear-gradient(135deg, rgba(255,236,219,.7), rgba(255,224,200,.45));
  border: 1px solid rgba(255,105,0,.22);
  border-radius: 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.3px;
  color: #8B3000;
  line-height: 1.45;
}
.contact-slogan-tag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px;
  background: linear-gradient(135deg, #FF6900, #C44A00);
  color: #fff; border-radius: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -4px rgba(196,74,0,.5);
}

/* 权益列表 */
.contact-benefits {
  list-style: none; padding: 0;
  margin: 0 28px 20px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(31,36,43,.06);
  border-radius: 14px;
  overflow: hidden;
}
.contact-benefits li {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(31,36,43,.05);
  font-size: 13px;
  color: var(--ink-800);
}
.contact-benefits li:last-child { border-bottom: none; }
.contact-benefits li:hover { background: rgba(255,105,0,.04); }
.contact-benefits .cb-ic {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1F242B, #2A2F36);
  border-radius: 8px;
  font-size: 10px; font-weight: 800;
  color: #FF8A33;
  letter-spacing: 0.5px;
  font-family: 'Inter',sans-serif;
}
.contact-benefits strong {
  display: block;
  color: var(--ink-900); font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}
.contact-benefits em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--ink-500);
  letter-spacing: 0.2px;
}

/* QQ 群卡片 */
.contact-qq {
  margin: 0 28px 16px;
  padding: 18px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F0F8FF 100%);
  border: 1.5px solid rgba(18,183,245,.25);
  border-radius: 16px;
  box-shadow: 0 8px 24px -12px rgba(18,183,245,.25);
}
.contact-qq-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.qq-icon {
  width: 32px; height: 32px;
  color: #12B7F5;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(18,183,245,.35));
}
.contact-qq-label {
  font-size: 13px; font-weight: 700; letter-spacing: 0.4px;
  color: var(--ink-900);
}
.contact-qq-sub {
  font-size: 10px; color: var(--ink-400);
  margin-top: 1px; letter-spacing: 0.6px;
  text-transform: uppercase; font-weight: 600;
}
.contact-qq-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1F242B, #2A2F36);
  border-radius: 10px;
  margin-bottom: 10px;
}
.contact-qq-num {
  font-size: 22px; font-weight: 800; letter-spacing: 2px;
  color: #FF8A33;
  font-family: 'Inter','SF Mono','Roboto Mono',monospace;
  text-shadow: 0 0 24px rgba(255,138,51,.4);
}
.contact-qq-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #FF6900, #E55A00);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 4px 12px -4px rgba(255,105,0,.6);
}
.contact-qq-btn svg { width: 14px; height: 14px; }
.contact-qq-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -4px rgba(255,105,0,.8);
}
.contact-qq-hint {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--ink-500);
  letter-spacing: 0.2px;
  padding: 8px 10px;
  background: rgba(18,183,245,.05);
  border-radius: 8px;
}
.contact-qq-hint svg {
  width: 13px; height: 13px;
  color: #12B7F5;
  flex-shrink: 0;
}

.contact-footer {
  padding: 14px 28px 22px;
  font-size: 11px;
  color: var(--ink-400);
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 1.6;
  border-top: 1px solid rgba(31,36,43,.05);
  background: rgba(255,255,255,.5);
}

/* 响应式 */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .user-bar .ub-tier, .user-bar .ub-tier + .ub-divider { display: none; }
}
@media (max-width: 880px) {
  .dashboard { flex-direction: column; }
  .sidebar { width: 100%; min-width: 0; height: auto; position: static; padding: 14px; }
  .sidebar-card { min-height: auto; }
  .main-content { padding: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .header { flex-wrap: wrap; }
  .service-switch { grid-template-columns: 1fr; }
  .user-bar .ub-role, .user-bar .ub-role + .ub-divider { display: none; }
  .auth-wrap { padding: 20px 14px; }
  .auth-card { padding: 28px 22px; }
.contact-btn { top: 12px; right: 12px; padding: 6px 10px; font-size: 11px; }
}

/* ============================================================
   官方简洁版覆盖层
   ============================================================ */
body {
  letter-spacing: 0;
  background: #f5f6f8;
}

body::before,
.auth-stage::before,
.auth-stage::after,
.auth-orb {
  display: none;
}

.dashboard {
  background:
    linear-gradient(180deg, rgba(255,255,255,.84), rgba(245,246,248,.92)),
    radial-gradient(700px 420px at 20% 0%, rgba(255,105,0,.08), transparent 70%);
}

.sidebar-card,
.header,
.card,
.modal-content,
.auth-card {
  background: rgba(255,255,255,.94);
  border-color: rgba(17,20,24,.08);
  box-shadow: 0 18px 46px -30px rgba(17,20,24,.35);
}

.sidebar-card,
.header,
.card {
  border-radius: 18px;
}

.sidebar-menu {
  position: relative;
  gap: 5px;
}

.menu-item {
  min-height: 44px;
  border-radius: 13px;
  transition:
    transform .36s cubic-bezier(.34,1.56,.64,1),
    background .26s ease,
    color .26s ease,
    box-shadow .26s ease,
    border-color .26s ease;
}

.menu-item::before {
  content: "";
  position: absolute;
  inset: 6px auto 6px 6px;
  width: 4px;
  border-radius: 99px;
  background: var(--mi-orange);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .34s cubic-bezier(.34,1.56,.64,1);
}

.menu-item:hover {
  transform: translateX(7px) scale(1.018);
  background: #fff;
  border-color: rgba(255,105,0,.16);
  box-shadow: 0 12px 26px -20px rgba(17,20,24,.45), 0 8px 20px -18px rgba(255,105,0,.7);
}

.menu-item:hover::before,
.menu-item.active::before {
  transform: scaleY(1);
}

.menu-item.active {
  background: #fff3eb;
  border-color: rgba(255,105,0,.22);
  box-shadow: inset 0 0 0 1px rgba(255,105,0,.08), 0 10px 24px -20px rgba(255,105,0,.75);
}

.btn,
.form-group input,
.form-group select,
.form-group textarea,
.filter-select,
.channel-dropdown,
.channel-options,
.service-option {
  border-radius: 12px;
}

.btn:hover {
  transform: translateY(-1px) scale(1.01);
}

.stat-card::after,
.auth-grid {
  opacity: .025;
}

.config-group {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(248,250,252,.82)),
    radial-gradient(260px 140px at 12% 0%, rgba(255,105,0,.10), transparent 72%);
  box-shadow: 0 20px 46px -38px rgba(17,20,24,.46), inset 0 1px 0 rgba(255,255,255,.9);
  overflow: hidden;
}

.config-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31,36,43,.06);
}

.config-group-head h4 {
  font-size: 16px;
  color: var(--ink-900);
  font-weight: 900;
}

.config-group-head span {
  font-size: 12px;
  color: #b64b00;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,105,0,.09);
  border: 1px solid rgba(255,105,0,.14);
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(31,36,43,.06);
  margin-top: 10px;
  box-shadow: 0 14px 28px -26px rgba(31,36,43,.42);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), border-color .22s ease, box-shadow .22s ease;
}

.config-row:hover {
  transform: translateY(-2px);
  border-color: rgba(255,105,0,.18);
  box-shadow: 0 20px 36px -30px rgba(255,105,0,.48);
}

.config-row h4 {
  color: var(--ink-900);
  font-size: 14px;
  margin-bottom: 2px;
}

.config-row p {
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.6;
  max-width: 520px;
}

.config-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.config-actions input {
  width: 86px;
  padding: 8px 10px;
  text-align: center;
  font-weight: 700;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.config-group-api .config-actions input {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
}

.config-group-pricing .config-row h4::before,
.config-group-api .config-row h4::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: #ff6900;
  box-shadow: 0 0 0 4px rgba(255,105,0,.10);
}

.config-group-api .config-row h4::before {
  background: #20bfa9;
  box-shadow: 0 0 0 4px rgba(32,191,169,.10);
}

.channel-options {
  grid-template-columns: 1fr 1fr;
}

.channel-option-item {
  min-height: 96px;
  border: 1px solid rgba(31,36,43,.06);
  background: #fff;
}

.channel-option-item:hover {
  transform: translateY(-2px) scale(1.012);
}

.contact-qq {
  background: linear-gradient(135deg, #fff 0%, #fff7f0 100%);
  border-color: rgba(255,105,0,.2);
  box-shadow: 0 14px 32px -22px rgba(255,105,0,.5);
}

.qq-icon {
  width: 38px;
  height: 38px;
  padding: 7px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #12B7F5, #0088cc);
  filter: drop-shadow(0 8px 14px rgba(18,183,245,.28));
}

.contact-qq-row {
  background: linear-gradient(135deg, #111418, #2b3036);
  border: 1px solid rgba(255,255,255,.08);
}

.contact-qq-num {
  font-size: 18px;
  letter-spacing: 0;
}

@media (max-width: 880px) {
  .dashboard { min-height: 100vh; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(245,246,248,.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .sidebar-card {
    padding: 14px;
  }
  .brand {
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
  .sidebar-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .menu-item {
    justify-content: center;
    min-height: 42px;
    padding: 9px 10px;
  }
  .menu-item:hover {
    transform: translateY(-1px) scale(1.015);
  }
  .sidebar-footer {
    display: none;
  }
  .main-content {
    max-height: none;
    overflow: visible;
  }
  .header-left h1 {
    font-size: 16px;
    line-height: 1.35;
    flex-wrap: wrap;
  }
  .header-left h1 .h1-suffix {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 16px;
  }
  .channel-options {
    grid-template-columns: 1fr;
  }
  .channel-option-item {
    min-height: 0;
  }
  .config-row,
  .config-group-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .config-actions {
    justify-content: flex-start;
    width: 100%;
  }
  .config-actions input {
    flex: 1;
    min-width: 110px;
  }
  .contact-card {
    width: 96%;
    max-height: 92vh;
  }
  .contact-hero,
  .contact-slogan,
  .contact-benefits,
  .contact-qq {
    margin-left: 16px;
    margin-right: 16px;
  }
  .contact-qq-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .auth-card {
    padding: 24px 18px;
    border-radius: 18px;
  }
  .auth-brand {
    padding-right: 92px;
  }
  .auth-brand-text h1 {
    font-size: 18px;
  }
  .contact-btn {
    right: 12px;
    top: 12px;
  }
  .auth-meta {
    grid-template-columns: 1fr;
  }
  table {
    min-width: 680px;
  }
}

/* ============================================================
   Xiaomi-style login polish + temporary captcha-off state
   ============================================================ */
.captcha-field {
  display: block;
  margin-top: 14px;
}

.captcha-field.captcha-visible {
  display: block !important;
}

.auth-stage {
  background:
    linear-gradient(180deg, #f7f8fa 0%, #eef1f4 100%);
  color: #191919;
}

.auth-stage::before,
.auth-stage::after,
.auth-orb {
  display: none !important;
}

.auth-grid {
  z-index: 0;
  opacity: .42;
  background-image:
    linear-gradient(rgba(17, 24, 39, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, .035) 1px, transparent 1px);
  background-size: 42px 42px;
}

.auth-wrap {
  position: relative;
  z-index: 1;
  padding: 32px 16px;
}

.auth-card {
  max-width: 520px;
  padding: 42px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(25, 25, 25, .08);
  box-shadow:
    0 24px 70px -42px rgba(15, 23, 42, .55),
    0 1px 0 rgba(255, 255, 255, .9) inset;
}

.auth-card::before,
.auth-card::after,
.auth-shimmer::after {
  display: none;
}

.auth-brand {
  margin-bottom: 20px;
  align-items: flex-start;
}

.auth-brand-text h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  color: #111;
}

.auth-brand-text .sub {
  color: #7b7f87;
  font-size: 11px;
  letter-spacing: .8px;
}

.auth-badges {
  margin: 18px 0 12px;
  gap: 8px;
}

.auth-badges .ab {
  background: #f6f7f9;
  border-color: rgba(25, 25, 25, .06);
  color: #4b5563;
  letter-spacing: 0;
}

.auth-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff4ec;
  border: 1px solid rgba(255, 105, 0, .18);
  color: #b64b00;
  font-weight: 700;
}

.auth-title-cn {
  margin-top: 18px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  color: #111;
}

.auth-title-en {
  color: #7b7f87;
  letter-spacing: .2px;
}

.auth-card .form-group label {
  color: #30343b;
  font-weight: 700;
}

.auth-card .form-group input {
  border-radius: 14px;
  background: #f8fafc;
  border-color: #e6e9ef;
  box-shadow: none;
}

.auth-card .form-group input:focus {
  background: #fff;
  border-color: rgba(255, 105, 0, .55);
  box-shadow: 0 0 0 4px rgba(255, 105, 0, .11);
}

.auth-card .captcha-field label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.auth-card .captcha-field label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(135deg, #ffb26a, #ff6900);
  box-shadow: 0 8px 16px -9px rgba(255, 105, 0, .95);
}

.captcha-shell {
  position: relative;
  padding: 7px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.92)),
    linear-gradient(135deg, rgba(255,105,0,.10), rgba(20,184,166,.07));
  border: 1px solid rgba(255, 105, 0, .14);
  box-shadow:
    0 16px 28px -24px rgba(255, 105, 0, .72),
    inset 0 1px 0 rgba(255,255,255,.9);
  overflow: hidden;
}

.captcha-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 18%, rgba(255,255,255,.82), transparent 58%);
  transform: translateX(-120%);
  animation: captcha-sweep 3.8s cubic-bezier(.22,1,.36,1) infinite;
  pointer-events: none;
}

.captcha-box {
  position: relative;
  z-index: 1;
  min-height: 46px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,248,251,.9));
  border: 1px solid rgba(17,20,24,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.captcha-box:empty::before {
  content: "安全验证加载中";
  color: #5d6673;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
}

.captcha-box.captcha-fallback:empty::before {
  content: "验证组件预览模式";
  color: #b64b00;
}

.captcha-box iframe {
  width: 100% !important;
  max-width: 100% !important;
  border: 0;
  border-radius: 10px;
}

.captcha-box [class*="brand"],
.captcha-box [class*="logo"],
.captcha-box [class*="powered"],
.captcha-box [class*="copyright"],
.captcha-box [class*="title"] {
  display: none !important;
}

.auth-verify-layer {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(520px 320px at 25% 18%, rgba(255,105,0,.22), transparent 70%),
    radial-gradient(520px 320px at 82% 78%, rgba(20,184,166,.18), transparent 72%),
    rgba(248,250,252,.58);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.auth-verify-layer.active {
  display: flex;
  animation: verify-fade .22s ease-out;
}

.verify-open .auth-card {
  filter: blur(2px) saturate(.96);
  transform: scale(.992);
}

.verify-card {
  position: relative;
  width: min(100%, 500px);
  max-height: calc(100vh - 42px);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 30px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,250,246,.86)),
    linear-gradient(135deg, rgba(255,105,0,.10), rgba(20,184,166,.06));
  border: 1px solid rgba(255,255,255,.82);
  box-shadow:
    0 38px 110px -50px rgba(17,20,24,.58),
    0 24px 58px -42px rgba(255,105,0,.58),
    inset 0 1px 0 rgba(255,255,255,.92);
  animation: verify-pop .45s cubic-bezier(.34,1.56,.64,1);
}

.verify-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 29px;
  background:
    linear-gradient(110deg, transparent 8%, rgba(255,255,255,.55) 34%, transparent 56%),
    radial-gradient(360px 180px at 50% 0%, rgba(255,255,255,.75), transparent 72%);
  pointer-events: none;
}

.verify-card::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 0 22px 0 26px;
  background:
    radial-gradient(circle at 58% 42%, rgba(255,255,255,.98), rgba(255,250,246,.90) 66%, rgba(255,255,255,.62));
  box-shadow:
    -12px 12px 26px -24px rgba(17,20,24,.5),
    inset 0 1px 0 rgba(255,255,255,.95);
  pointer-events: none;
}

.verify-close {
  position: absolute;
  right: 19px;
  top: 19px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.86);
  color: #30343b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 24px -20px rgba(17,20,24,.7);
  transition: transform .34s cubic-bezier(.34,1.56,.64,1), background .2s ease;
}

.verify-close:hover {
  background: rgba(255,105,0,.13);
  transform: rotate(90deg) scale(1.06);
}

.verify-visual,
.verify-copy,
.verify-captcha-shell,
.verify-submit {
  position: relative;
  z-index: 1;
}

.verify-visual {
  height: 88px;
  margin-bottom: 13px;
  border-radius: 24px;
  clip-path: polygon(0 0, calc(100% - 68px) 0, calc(100% - 68px) 12px, calc(100% - 48px) 12px, calc(100% - 48px) 0, 100% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(135deg, rgba(17,20,24,.92), rgba(42,47,54,.86)),
    radial-gradient(240px 120px at 18% 20%, rgba(255,177,106,.34), transparent 70%);
  overflow: hidden;
  box-shadow: 0 24px 48px -34px rgba(17,20,24,.8);
}

.verify-visual::before {
  content: "XIAOMI VERIFY";
  position: absolute;
  left: 20px;
  bottom: -8px;
  color: rgba(255,255,255,.10);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 1px;
}

.verify-mi {
  position: absolute;
  left: 22px;
  top: 22px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #ff9d4d, #ff6900);
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 18px 32px -18px rgba(255,105,0,.9);
}

.verify-dot {
  position: absolute;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.7);
  animation: verify-dot-float 5.5s cubic-bezier(.34,1.56,.64,1) infinite;
}

.vd-a {
  right: 34px;
  top: 20px;
  width: 78px;
  height: 38px;
  background: linear-gradient(135deg, #fff0c2, #ffc766);
}

.vd-b {
  right: 130px;
  bottom: 22px;
  width: 54px;
  height: 54px;
  background: rgba(20,184,166,.22);
  animation-delay: -.9s;
}

.vd-c {
  right: 86px;
  bottom: 18px;
  width: 26px;
  height: 26px;
  background: rgba(147,197,253,.35);
  animation-delay: -1.8s;
}

.verify-kicker {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,105,0,.10);
  color: #b64b00;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .8px;
}

.verify-copy h2 {
  margin: 10px 0 5px;
  color: #111418;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
}

.verify-copy p {
  margin: 0 0 12px;
  color: #626b76;
  font-size: 13px;
  line-height: 1.7;
}

.verify-captcha-shell {
  padding: 6px;
  border-radius: 18px;
}

.verify-captcha-box {
  min-height: 292px;
  align-items: flex-start;
}

.verify-captcha-box .captcha-widget {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.verify-submit {
  width: 100%;
  margin-top: 12px;
}

.verify-submit.is-disabled,
.verify-submit:disabled {
  opacity: .58;
  cursor: not-allowed;
  filter: grayscale(.18);
  transform: none !important;
  box-shadow: 0 12px 24px -22px rgba(17,20,24,.5);
}

.auth-card .btn-primary {
  border-radius: 14px;
  background: #ff6900;
  box-shadow: 0 14px 24px -18px rgba(255, 105, 0, .85);
}

.auth-card .btn-primary:hover {
  background: #f25f00;
  transform: translateY(-1px);
}

.auth-footer {
  color: #6b7280;
}

.auth-footer a {
  color: #ff6900;
  font-weight: 700;
}

.auth-meta {
  padding-top: 16px;
  border-top: 1px solid rgba(25, 25, 25, .08);
}

.auth-meta .am {
  background: #f7f8fa;
  border-color: rgba(25, 25, 25, .06);
  border-radius: 14px;
}

.auth-meta .am .v {
  color: #111;
  letter-spacing: 0;
}

.auth-meta .am:nth-child(2) .v {
  color: #ff6900;
}

.contact-btn {
  border-radius: 14px;
  background: #fff;
  border-color: rgba(25, 25, 25, .08);
  color: #111;
  box-shadow: 0 10px 26px -20px rgba(15, 23, 42, .8);
}

.contact-btn:hover {
  background: #111;
  color: #fff;
  box-shadow: 0 18px 30px -24px rgba(15, 23, 42, .9);
}

.contact-qq {
  background: #fff;
  border-color: rgba(25, 25, 25, .08);
}

.contact-qq-row {
  background: #111;
  border-radius: 14px;
}

@media (max-width: 520px) {
  .auth-wrap {
    padding: 18px 12px;
  }

  .auth-card {
    padding: 26px 18px;
    border-radius: 20px;
  }

  .auth-brand {
    padding-right: 78px;
  }

  .auth-title-cn {
    font-size: 24px;
  }

  .auth-badges .ab {
    font-size: 10px;
    padding: 5px 9px;
  }

  .contact-btn {
    top: 12px;
    right: 12px;
    padding: 7px 10px;
  }
}

/* ============================================================
   Fresh dynamic Xiaomi login scene
   ============================================================ */
.auth-stage {
  background:
    radial-gradient(720px 460px at 14% 14%, rgba(255, 196, 151, .62), transparent 66%),
    radial-gradient(760px 500px at 86% 8%, rgba(167, 231, 214, .58), transparent 62%),
    radial-gradient(680px 520px at 70% 95%, rgba(190, 227, 255, .68), transparent 66%),
    linear-gradient(135deg, #fffaf4 0%, #f3fff9 44%, #f6fbff 100%);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.auth-stage::before,
.auth-stage::after,
.auth-orb {
  display: block !important;
}

.auth-stage::before {
  width: 620px;
  height: 620px;
  top: -220px;
  left: -170px;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 105, 0, .36), transparent 58%),
    radial-gradient(circle at 70% 70%, rgba(255, 208, 162, .5), transparent 55%);
  filter: blur(26px);
  animation: float-a 13s ease-in-out infinite;
}

.auth-stage::after {
  width: 720px;
  height: 720px;
  right: -240px;
  bottom: -260px;
  background:
    radial-gradient(circle at 42% 42%, rgba(20, 184, 166, .24), transparent 54%),
    radial-gradient(circle at 70% 70%, rgba(96, 165, 250, .28), transparent 58%);
  filter: blur(30px);
  animation: float-b 16s ease-in-out infinite;
}

.auth-orb.o1,
.auth-orb.o2 {
  border-radius: 28px;
  filter: none;
  opacity: .72;
}

.auth-orb.o1 {
  top: 12%;
  right: 12%;
  width: 132px;
  height: 132px;
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,233,214,.58));
  border: 1px solid rgba(255, 105, 0, .2);
  box-shadow: 0 24px 50px -34px rgba(255, 105, 0, .65);
  animation: cube-drift 8s cubic-bezier(.34,1.56,.64,1) infinite;
}

.auth-orb.o2 {
  left: 10%;
  bottom: 11%;
  width: 110px;
  height: 110px;
  background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(209,250,229,.58));
  border: 1px solid rgba(20, 184, 166, .18);
  box-shadow: 0 24px 48px -34px rgba(20, 184, 166, .7);
  animation: cube-drift 9.5s cubic-bezier(.34,1.56,.64,1) infinite reverse;
}

.auth-grid {
  opacity: .18;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='500' height='220' viewBox='0 0 500 220'><text x='-30' y='130' font-family='Arial,Helvetica,sans-serif' font-size='30' font-weight='900' fill='%23111418' fill-opacity='0.78' letter-spacing='4' transform='rotate(-22 250 110)'>XIAOMI OFFICIAL · 官方授权 · AUTHORIZED SERVICE</text></svg>");
  background-size: 500px 220px;
  animation: watermark-slide 24s linear infinite;
}

.auth-wrap {
  perspective: 1400px;
  padding: 42px 18px;
  width: 100%;
  overflow-x: hidden;
}

.auth-card {
  --mx: 0;
  --my: 0;
  max-width: 1060px;
  width: min(100%, 1060px);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(390px, .82fr);
  grid-template-areas:
    "brand brand"
    "visual badges"
    "visual tag"
    "visual title"
    "visual subtitle"
    "visual form"
    "visual meta"
    "visual foot";
  column-gap: 38px;
  align-items: start;
  padding: 34px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.56)),
    linear-gradient(180deg, rgba(255,244,236,.5), rgba(240,253,250,.26));
  border: 1px solid rgba(255,255,255,.72);
  backdrop-filter: blur(28px) saturate(175%);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  box-shadow:
    0 36px 100px -48px rgba(255,105,0,.42),
    0 30px 80px -52px rgba(20,184,166,.32),
    0 1px 0 rgba(255,255,255,.9) inset;
  overflow: hidden;
  transform: rotateX(calc(var(--my) * -3deg)) rotateY(calc(var(--mx) * 4deg));
  transition:
    transform .45s cubic-bezier(.34,1.56,.64,1),
    box-shadow .3s ease;
}

.auth-card::before,
.auth-card::after,
.auth-shimmer::after {
  display: block;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 29px;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255,255,255,.42) 36%, transparent 54%),
    radial-gradient(420px 220px at calc(52% + var(--mx) * 10%) calc(8% + var(--my) * 8%), rgba(255,255,255,.78), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: auto -120px -140px auto;
  width: 360px;
  height: 360px;
  border-radius: 44px;
  background:
    linear-gradient(135deg, rgba(255, 105, 0, .18), rgba(255, 210, 164, .08)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 8px, transparent 8px 16px);
  transform: rotate(18deg);
  pointer-events: none;
  z-index: 0;
}

.auth-brand,
.auth-dynamic-panel,
.auth-badges,
.auth-tag,
.auth-title-cn,
.auth-title-en,
#login-form-container,
#register-form-container,
.auth-meta,
.auth-card > div[style*="Xiaomi Corporation"] {
  position: relative;
  z-index: 1;
}

.auth-brand {
  grid-area: brand;
  align-items: center;
  margin-bottom: 22px;
  padding: 6px 112px 14px 2px;
  border-bottom: 1px solid rgba(31,36,43,.07);
}

.auth-brand-text h1 {
  font-size: 28px;
  font-weight: 900;
  color: #101418;
}

.auth-brand-text .sub {
  color: #57606a;
  font-weight: 700;
  letter-spacing: .5px;
}

.auth-dynamic-panel {
  grid-area: visual;
  min-height: 500px;
  padding: 24px;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.64), rgba(255,255,255,.28)),
    radial-gradient(420px 260px at 24% 22%, rgba(255,105,0,.18), transparent 70%),
    radial-gradient(420px 260px at 82% 78%, rgba(20,184,166,.17), transparent 70%);
  border: 1px solid rgba(255,255,255,.74);
  box-shadow: 0 22px 62px -42px rgba(31,36,43,.5), inset 0 1px 0 rgba(255,255,255,.72);
  overflow: hidden;
}

.auth-dynamic-panel::after {
  content: "";
  position: absolute;
  inset: 74px 20px 20px;
  border-radius: 24px;
  background-image:
    linear-gradient(rgba(255,255,255,.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.42) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .42;
  mask-image: linear-gradient(145deg, rgba(0,0,0,.86), transparent 74%);
  animation: panel-grid-drift 16s linear infinite;
  pointer-events: none;
}

.auth-dynamic-panel::before {
  content: "XIAOMI OFFICIAL";
  position: absolute;
  left: 26px;
  bottom: 16px;
  color: rgba(17,20,24,.16);
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 900;
  line-height: .86;
  letter-spacing: 2px;
}

.official-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(17,20,24,.9);
  color: #fff;
  box-shadow: 0 18px 38px -28px rgba(17,20,24,.8);
}

.official-strip span {
  color: #ffd39b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.official-strip strong {
  font-size: 13px;
}

.dynamic-stack {
  position: relative;
  height: 340px;
  margin-top: 26px;
}

.dynamic-stack::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 5%;
  top: 50%;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,105,0,.18), rgba(20,184,166,.18), rgba(96,165,250,.16));
  filter: blur(18px);
  opacity: .76;
  transform: translateY(-50%) rotate(-8deg);
}

.dynamic-stack::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,105,0,.55), rgba(20,184,166,.45), transparent);
  opacity: .72;
}

.dynamic-card,
.dynamic-cube {
  position: absolute;
  border: 1px solid rgba(255,255,255,.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dynamic-card {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 22px 48px -32px rgba(31,36,43,.55), inset 0 1px 0 rgba(255,255,255,.8);
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;
  z-index: 2;
}

.dynamic-card:hover {
  transform: translateY(-8px) scale(1.03) rotate(-1deg);
  box-shadow: 0 28px 60px -30px rgba(255,105,0,.5);
}

.dynamic-card span {
  display: block;
  color: #7a828c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

.dynamic-card strong {
  display: block;
  color: #111418;
  font-size: 26px;
  font-weight: 900;
  margin-top: 8px;
}

.dynamic-card em {
  display: block;
  margin-top: 6px;
  color: #c44a00;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.dc-main {
  left: 7%;
  top: 18px;
  width: 64%;
  min-height: 158px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,243,232,.68)),
    linear-gradient(135deg, rgba(255,105,0,.12), transparent);
  animation: card-float 7s cubic-bezier(.34,1.56,.64,1) infinite;
}

.dc-mini {
  width: 142px;
  min-height: 118px;
}

.dc-mini strong {
  font-size: 22px;
}

.dc-a {
  right: 4%;
  top: 54px;
  background: linear-gradient(135deg, rgba(17,20,24,.92), rgba(42,47,54,.84));
}

.dc-a span,
.dc-a strong {
  color: #fff;
}

.dc-b {
  left: 12%;
  bottom: 34px;
  background: linear-gradient(135deg, rgba(17,20,24,.9), rgba(38,44,52,.76));
}

.dc-b span,
.dc-b strong {
  color: #fff;
}

.dc-c {
  right: 11%;
  bottom: 8px;
}

.gold {
  background: linear-gradient(135deg, #fff1c7, #ffc766 54%, #f4a51c);
  border-color: rgba(255, 198, 102, .9);
  box-shadow: 0 24px 50px -30px rgba(174, 107, 0, .9);
}

.gold span,
.gold strong {
  color: #6a3d00;
}

.dynamic-cube {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255,255,255,.64);
  box-shadow: 0 18px 34px -24px rgba(31,36,43,.6);
  z-index: 1;
}

.cube-a {
  left: 2%;
  top: 225px;
  background: rgba(255,105,0,.16);
  animation: cube-drift 6.5s cubic-bezier(.34,1.56,.64,1) infinite;
}

.cube-b {
  right: 28%;
  top: 216px;
  background: rgba(20,184,166,.16);
  animation: cube-drift 8s cubic-bezier(.34,1.56,.64,1) infinite reverse;
}

.cube-c {
  right: 2%;
  bottom: 118px;
  background: rgba(59,130,246,.16);
  animation: cube-drift 7.5s cubic-bezier(.34,1.56,.64,1) infinite;
}

.official-grid-tags {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.official-grid-tags span {
  padding: 11px 12px;
  border-radius: 14px;
  color: #343a42;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.68);
  box-shadow: 0 14px 26px -24px rgba(31,36,43,.5);
  transition: transform .36s cubic-bezier(.34,1.56,.64,1), background .2s ease;
}

.official-grid-tags span:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.78);
}

.auth-dynamic-panel .official-strip::after {
  content: "";
  width: 82px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9d4d, #ffc766, #20bfa9);
  box-shadow: 0 10px 20px -12px rgba(255,105,0,.9);
}

.dynamic-card::before {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,105,0,.16), rgba(20,184,166,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.dc-main::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,105,0,.64) 0 38%, rgba(20,184,166,.36) 38% 70%, rgba(17,20,24,.12) 70%);
}

.auth-card .form-group {
  position: relative;
}

.auth-card .form-group::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,105,0,.18), rgba(20,184,166,.16), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}

.auth-card .form-group:focus-within::after {
  opacity: 1;
}

.auth-tag,
.auth-badges .ab {
  transition: transform .34s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease, background .22s ease;
}

.auth-tag:hover,
.auth-badges .ab:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px -22px rgba(255,105,0,.56);
}

.auth-meta .am::before {
  content: "";
  width: 26px;
  height: 5px;
  border-radius: 999px;
  margin: 0 auto 8px;
  background: rgba(106,61,0,.26);
}

.auth-badges {
  grid-area: badges;
  margin-top: 2px;
}

.auth-badges .ab {
  background: rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.78);
  box-shadow: 0 10px 22px -20px rgba(31,36,43,.55);
}

.auth-tag {
  grid-area: tag;
  width: fit-content;
  margin-top: 8px;
  background: rgba(255, 244, 236, .76);
  border-color: rgba(255,105,0,.24);
}

.auth-title-cn {
  grid-area: title;
  margin-top: 18px;
  font-size: 34px;
}

.auth-title-en {
  grid-area: subtitle;
  align-self: start;
  margin-top: 4px;
  margin-bottom: 0;
}

#login-form-container,
#register-form-container {
  grid-area: form;
  margin-top: 20px;
}

.auth-card .form-group input {
  background: rgba(255,255,255,.74);
  border-color: rgba(255,255,255,.84);
  box-shadow: 0 14px 28px -26px rgba(31,36,43,.5);
}

.auth-card .btn-primary {
  min-height: 50px;
  background: linear-gradient(135deg, #ff9d4d 0%, #ff6900 56%, #e55a00 100%);
  box-shadow: 0 18px 34px -22px rgba(255,105,0,.95);
}

.auth-card .btn-primary:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 24px 44px -24px rgba(255,105,0,.95);
}

.auth-meta {
  grid-area: meta;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 0;
  gap: 10px;
  margin-top: 18px;
  padding-top: 0;
}

.auth-meta .am {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #fff0c2, #ffc766 54%, #f4a51c);
  border: 1px solid rgba(255,198,102,.9);
  box-shadow: 0 18px 34px -24px rgba(174,107,0,.85);
  transition: transform .38s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}

.auth-meta .am:hover {
  transform: translateY(-6px) scale(1.035);
  box-shadow: 0 24px 42px -28px rgba(17,20,24,.9);
}

.auth-meta .am .v,
.auth-meta .am .l,
.auth-meta .am:nth-child(2) .v,
.auth-meta .am:nth-child(2) .l {
  color: #6a3d00;
}

.auth-copyright,
.auth-card > div[style*="Xiaomi Corporation"] {
  grid-area: foot;
  color: rgba(17,20,24,.56) !important;
  font-weight: 700;
}

@keyframes watermark-slide {
  from { background-position: 0 0; }
  to { background-position: 500px 220px; }
}

@keyframes card-float {
  0%, 100% { transform: translate3d(0,0,0) rotate(-1deg); }
  50% { transform: translate3d(0,-14px,0) rotate(1.5deg); }
}

@keyframes cube-drift {
  0%, 100% { transform: translate3d(0,0,0) rotate(0deg); }
  50% { transform: translate3d(16px,-18px,0) rotate(8deg); }
}

@keyframes panel-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 24px, 48px 24px; }
}

@keyframes verify-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes verify-pop {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes verify-dot-float {
  0%, 100% { transform: translate3d(0,0,0) rotate(0deg); }
  50% { transform: translate3d(8px,-10px,0) rotate(5deg); }
}

@media (max-width: 940px) {
  .auth-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .auth-card {
    width: 100%;
    max-width: min(560px, calc(100vw - 28px));
    min-height: 0;
    transform: none !important;
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "visual"
      "badges"
      "tag"
      "title"
      "subtitle"
      "form"
      "meta"
      "foot";
    row-gap: 0;
  }

  .auth-dynamic-panel {
    min-height: 360px;
    margin-bottom: 20px;
  }

  .verify-card {
    width: min(100%, 500px);
  }

  .dynamic-stack {
    height: 230px;
  }

  .dc-main {
    width: 68%;
  }

  .dc-mini {
    width: 120px;
    min-height: 96px;
  }
}

@media (max-width: 520px) {
  .auth-stage {
    background:
      radial-gradient(420px 280px at 12% 10%, rgba(255,196,151,.62), transparent 70%),
      radial-gradient(420px 300px at 95% 0%, rgba(167,231,214,.58), transparent 68%),
      linear-gradient(135deg, #fffaf4, #f4fffb 48%, #f6fbff);
  }

  .auth-stage::before,
  .auth-stage::after,
  .auth-orb,
  .auth-grid {
    animation: none !important;
  }

  .auth-grid {
    opacity: .055;
    background-size: 360px 160px;
  }

  .auth-card {
    max-width: calc(100vw - 24px);
    padding: 18px;
    border-radius: 24px;
  }

  .auth-brand {
    padding-right: 78px;
    margin-bottom: 14px;
  }

  .auth-brand-text h1 {
    font-size: 19px;
  }

  .auth-dynamic-panel {
    min-height: 268px;
    padding: 16px;
    border-radius: 20px;
  }

  .auth-dynamic-panel::after {
    opacity: .24;
    animation: none;
  }

  .auth-dynamic-panel::before {
    font-size: 42px;
    opacity: .58;
  }

  .official-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .dynamic-stack {
    height: 154px;
    margin-top: 14px;
  }

  .dc-main {
    left: 0;
    top: 2px;
    width: 74%;
    min-height: 108px;
    animation: none;
  }

  .dynamic-card {
    padding: 13px;
    border-radius: 17px;
    transition: box-shadow .2s ease, transform .2s ease;
  }

  .dynamic-card:hover {
    transform: none;
  }

  .dynamic-card strong {
    font-size: 19px;
  }

  .dc-mini {
    width: 100px;
    min-height: 76px;
  }

  .dc-mini strong {
    font-size: 16px;
  }

  .dc-a {
    right: 0;
    top: 26px;
  }

  .dc-b {
    left: 4%;
    bottom: 0;
  }

  .dc-c {
    right: 7%;
    bottom: -4px;
  }

  .dynamic-cube {
    animation: none !important;
    opacity: .58;
  }

  .official-grid-tags {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 12px;
  }

  .official-grid-tags span {
    padding: 8px;
    font-size: 11px;
  }

  .auth-title-cn {
    font-size: 26px;
  }

  .auth-meta {
    grid-template-columns: 1fr;
  }

  .auth-verify-layer {
    padding: 14px;
  }

  .verify-card {
    padding: 20px;
    border-radius: 24px;
  }

  .verify-visual {
    height: 96px;
    border-radius: 20px;
  }

  .verify-copy h2 {
    font-size: 24px;
  }

  .verify-captcha-box {
    min-height: 286px;
  }
}

/* livelier official dashboard surfaces */
.app-watermark {
  background-image: none;
}

.card,
.stat-card,
.service-option,
.channel-option-item,
.sidebar-card {
  transition:
    transform .42s cubic-bezier(.34,1.56,.64,1),
    box-shadow .28s ease,
    border-color .28s ease,
    background .28s ease;
}

.card:hover,
.stat-card:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 28px 58px -38px rgba(17,20,24,.45), 0 20px 42px -36px rgba(255,105,0,.55);
}

.service-option:hover,
.channel-option-item:hover {
  transform: translateY(-5px) scale(1.018);
  box-shadow: 0 24px 42px -32px rgba(255,105,0,.68);
}

/* channel picker refresh */
.channel-options {
  gap: 12px;
}

.channel-option-item {
  min-height: 112px;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.72)),
    radial-gradient(220px 120px at 16% 10%, rgba(255,105,0,.12), transparent 70%);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 18px 42px -34px rgba(17,20,24,.42);
}

.channel-option-item.v6-line {
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,255,252,.76)),
    radial-gradient(220px 120px at 16% 10%, rgba(20,184,166,.15), transparent 70%);
}

.mi-channel-dot,
.v6-channel-dot {
  width: 18px;
  height: 18px;
  border-radius: 7px;
  box-shadow: 0 10px 18px -10px currentColor;
}

.mi-channel-dot {
  background: linear-gradient(135deg, #ffb06e, #ff6900);
  color: #ff6900;
}

.v6-channel-dot {
  background: linear-gradient(135deg, #90f0de, #18b79a);
  color: #18b79a;
}

.channel-badge.recommended,
.channel-badge.classic {
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 11px;
  letter-spacing: .2px;
}

.channel-badge.recommended {
  background: linear-gradient(135deg, #fff0c2, #ffc766);
  color: #6a3d00;
}

.channel-badge.classic {
  background: linear-gradient(135deg, #dcfff6, #96f1df);
  color: #075f52;
}

.channel-option-item:hover .channel-name,
.channel-option-item.selected .channel-name {
  color: #111418;
}

.channel-option-item.selected {
  border-color: rgba(255,105,0,.32);
  box-shadow: 0 24px 52px -34px rgba(255,105,0,.7), inset 0 0 0 1px rgba(255,105,0,.12);
}

.channel-option-item.v6-line.selected {
  border-color: rgba(20,184,166,.36);
  box-shadow: 0 24px 52px -34px rgba(20,184,166,.72), inset 0 0 0 1px rgba(20,184,166,.12);
}

/* livelier logged-in app */
.dashboard {
  background:
    radial-gradient(640px 360px at 20% 4%, rgba(255,105,0,.13), transparent 72%),
    radial-gradient(700px 380px at 92% 12%, rgba(20,184,166,.12), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(246,250,252,.96));
}

.sidebar-card,
.header,
.card {
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}

.sidebar-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,250,246,.9)),
    radial-gradient(260px 180px at 20% 0%, rgba(255,105,0,.13), transparent 70%);
}

.header {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.72)),
    radial-gradient(360px 160px at 10% 10%, rgba(255,105,0,.12), transparent 70%);
}

.card {
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.78)),
    radial-gradient(280px 160px at 94% 0%, rgba(20,184,166,.08), transparent 72%);
}

.menu-item {
  overflow: hidden;
}

.menu-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.52), transparent);
  transform: translateX(-120%);
  transition: transform .55s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}

.menu-item:hover::after {
  transform: translateX(120%);
}

.stat-card,
.config-row,
tr {
  transition: transform .34s cubic-bezier(.34,1.56,.64,1), box-shadow .24s ease, background .24s ease;
}

.config-row:hover {
  transform: translateY(-3px) scale(1.006);
  background: #fff;
  box-shadow: 0 18px 34px -30px rgba(255,105,0,.62);
}

tbody tr:hover {
  transform: translateX(4px);
  background: rgba(255,244,236,.58);
}

/* final official app polish */
.dashboard {
  isolation: isolate;
  overflow-x: hidden;
}

.dashboard::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(17, 24, 39, .034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, .034) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.72), transparent 76%);
  pointer-events: none;
}

.dashboard::after {
  content: "XIAOMI AUTHORIZED SERVICE";
  position: fixed;
  right: clamp(18px, 5vw, 72px);
  bottom: clamp(22px, 5vw, 76px);
  z-index: -1;
  color: rgba(17,20,24,.035);
  font-size: clamp(38px, 8vw, 104px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: .9;
  text-align: right;
  pointer-events: none;
}

.sidebar-card {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 28px 60px -42px rgba(17,20,24,.54),
    inset 0 1px 0 rgba(255,255,255,.92);
}

.sidebar-card::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #ff6900, #ffb26a, #20bfa9);
}

.brand {
  position: relative;
}

.brand::after {
  content: "OFFICIAL";
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(255,105,0,.09);
  border: 1px solid rgba(255,105,0,.16);
  color: #b64b00;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .7px;
}

.sidebar-user {
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,244,236,.78)),
    linear-gradient(135deg, rgba(255,105,0,.10), transparent 58%);
  border-color: rgba(255,255,255,.86);
  box-shadow: 0 16px 28px -24px rgba(255,105,0,.68);
}

.sidebar-user .avatar {
  border-radius: 14px;
  box-shadow: 0 14px 22px -16px rgba(255,105,0,.86);
}

.menu-item {
  transform-origin: left center;
  transition:
    transform .42s cubic-bezier(.34,1.56,.64,1),
    background .25s ease,
    color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

.menu-item:hover {
  transform: translateX(5px) scale(1.018);
  box-shadow: 0 14px 26px -24px rgba(255,105,0,.62);
}

.menu-item:active {
  transform: translateX(3px) scale(.992);
}

.menu-item.active {
  background:
    linear-gradient(135deg, rgba(255,105,0,.17), rgba(255,255,255,.70)),
    linear-gradient(90deg, rgba(255,105,0,.12), transparent 60%);
}

.menu-item.active::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb26a, #ff6900);
  transform: translateY(-50%);
  box-shadow: 0 8px 14px -8px rgba(255,105,0,.9);
}

.header {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 26px 56px -42px rgba(17,20,24,.48),
    inset 0 1px 0 rgba(255,255,255,.92);
}

.header::after {
  content: "AUTHORIZED";
  position: absolute;
  right: 18px;
  bottom: -8px;
  color: rgba(255,105,0,.055);
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
}

.header-left h1 {
  position: relative;
  z-index: 1;
}

.header-left .crumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(17,20,24,.06);
}

.user-chip,
.role-chip,
.badge {
  box-shadow: 0 10px 22px -20px rgba(17,20,24,.45);
}

.card {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 26px 60px -45px rgba(17,20,24,.52),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,105,0,.34), rgba(32,191,169,.24), transparent);
  opacity: .9;
}

.card h3 {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.card h3::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,105,0,.14), rgba(17,20,24,.055), transparent);
}

.stat-card {
  min-height: 128px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.97), rgba(255,255,255,.78)),
    linear-gradient(135deg, rgba(255,105,0,.11), rgba(32,191,169,.07));
}

.stat-card:nth-child(2n) {
  background:
    linear-gradient(145deg, rgba(255,255,255,.97), rgba(248,255,253,.80)),
    linear-gradient(135deg, rgba(32,191,169,.12), rgba(255,105,0,.06));
}

.stat-card .stat-icon {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 13px;
  background: rgba(255,105,0,.10);
  color: #ff6900;
  box-shadow: 0 14px 26px -20px rgba(255,105,0,.82);
}

.stat-card p {
  font-weight: 850;
  background: linear-gradient(135deg, #111418, #30343b 70%, #ff6900);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card:hover .stat-icon,
.menu-item:hover .nav-icon,
.btn:hover svg {
  animation: icon-bounce .62s cubic-bezier(.34,1.56,.64,1);
}

table {
  overflow: hidden;
  border-radius: 16px;
}

table th {
  background:
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(248,250,252,.72));
  color: #5f6671;
  font-weight: 800;
}

table tbody tr {
  transform-origin: center;
}

.modal.active .modal-content {
  animation: popIn .42s cubic-bezier(.34,1.56,.64,1);
}

.modal-content {
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,250,246,.91)),
    linear-gradient(135deg, rgba(255,105,0,.09), rgba(32,191,169,.055));
}

.modal-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(17,20,24,.065);
}

.btn {
  transform-origin: center;
}

.btn-primary,
.btn-secondary {
  transition:
    transform .36s cubic-bezier(.34,1.56,.64,1),
    box-shadow .25s ease,
    background .25s ease,
    border-color .25s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px) scale(1.012);
}

.btn-primary:active,
.btn-secondary:active {
  transform: translateY(0) scale(.986);
}

@keyframes captcha-sweep {
  0%, 28% { transform: translateX(-120%); }
  62%, 100% { transform: translateX(120%); }
}

@keyframes icon-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  42% { transform: translateY(-3px) scale(1.12); }
  68% { transform: translateY(1px) scale(.96); }
}

@media (max-width: 768px) {
  .dashboard::after {
    display: none;
  }

  .brand::after {
    display: none;
  }

  .header::after {
    right: 10px;
    bottom: -4px;
    font-size: 34px;
  }

  .menu-item:hover {
    transform: translateX(0) scale(1.01);
  }

  .captcha-shell {
    padding: 6px;
  }
}

/* final coherent Xiaomi-style interior layer */
.main-content {
  position: relative;
}

.header-left h1::after {
  content: "官方服务";
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-left: 2px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(255,105,0,.09);
  border: 1px solid rgba(255,105,0,.16);
  color: #b64b00;
  -webkit-text-fill-color: #b64b00;
  font-size: 11px;
  font-weight: 900;
}

.card h3::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255,105,0,.18), rgba(255,255,255,.76)),
    linear-gradient(135deg, rgba(20,184,166,.12), transparent);
  border: 1px solid rgba(255,255,255,.74);
  box-shadow: 0 12px 22px -18px rgba(255,105,0,.82);
}

.card h3 .accent {
  display: none;
}

.card:hover h3::before {
  animation: icon-bounce .62s cubic-bezier(.34,1.56,.64,1);
}

.card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 118px;
  height: 118px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,105,0,.12), rgba(20,184,166,.10)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.28) 0 8px, transparent 8px 16px);
  transform: rotate(14deg);
  opacity: .72;
  pointer-events: none;
}

.stat-card::before {
  opacity: 1;
  background:
    linear-gradient(115deg, transparent, rgba(255,255,255,.72), transparent),
    linear-gradient(135deg, rgba(255,105,0,.08), transparent 50%);
  transform: translateX(-110%);
  animation: stat-sheen 7s cubic-bezier(.22,1,.36,1) infinite;
}

.stat-card:nth-child(2n)::before {
  animation-delay: -2.1s;
}

.stat-card:nth-child(3n)::before {
  animation-delay: -4.2s;
}

.stat-card::after {
  border-radius: 30px;
  background:
    radial-gradient(circle, rgba(255,138,51,.16), transparent 62%),
    linear-gradient(135deg, rgba(20,184,166,.10), transparent);
}

.sidebar-footer {
  border-radius: 14px;
  padding: 12px 10px;
  background: rgba(255,255,255,.52);
  border: 1px solid rgba(255,255,255,.66);
}

.sidebar-menu .nav-section-label {
  position: relative;
}

.sidebar-menu .nav-section-label::after {
  content: "";
  display: block;
  width: 30px;
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,105,0,.55), rgba(32,191,169,.34));
}

.modal-header::before {
  content: "Mi";
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff9d4d, #ff6900);
  box-shadow: 0 12px 22px -16px rgba(255,105,0,.9);
}

.modal-header h3 {
  flex: 1;
}

.config-group,
.filter-row,
.api-doc-section,
.channel-options,
.service-switch {
  position: relative;
}

.config-group::before,
.api-doc-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 54px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,105,0,.58), rgba(32,191,169,.34));
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 10%, rgba(255,255,255,.34), transparent 62%);
  transform: translateX(-120%);
  transition: transform .65s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

@keyframes stat-sheen {
  0%, 34% { transform: translateX(-110%); }
  58%, 100% { transform: translateX(110%); }
}

/* final upload polish: fresh official accents */
.auth-card {
  box-shadow:
    0 38px 104px -50px rgba(255,105,0,.42),
    0 32px 82px -54px rgba(20,184,166,.36),
    0 18px 58px -52px rgba(96,165,250,.32),
    0 1px 0 rgba(255,255,255,.92) inset;
}

.auth-dynamic-panel {
  background:
    linear-gradient(145deg, rgba(255,255,255,.66), rgba(255,255,255,.30)),
    radial-gradient(420px 260px at 24% 22%, rgba(255,105,0,.18), transparent 70%),
    radial-gradient(390px 260px at 86% 20%, rgba(96,165,250,.14), transparent 72%),
    radial-gradient(420px 260px at 82% 78%, rgba(20,184,166,.18), transparent 70%);
}

.official-strip {
  position: relative;
  overflow: hidden;
}

.official-strip::before {
  content: "CN";
  position: absolute;
  right: 112px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.12);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 1px;
  pointer-events: none;
}

.dc-main {
  box-shadow:
    0 22px 48px -32px rgba(31,36,43,.55),
    0 0 0 1px rgba(255,255,255,.36) inset,
    0 18px 42px -34px rgba(255,105,0,.62);
}

.dc-main span::after {
  content: " / CN-SVC";
  color: rgba(20,184,166,.92);
}

.dc-a::after,
.dc-b::after,
.dc-c::after {
  position: absolute;
  right: 13px;
  bottom: 12px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .8px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  pointer-events: none;
}

.dc-a::after {
  content: "AES";
  color: rgba(255,255,255,.82);
}

.dc-b::after {
  content: "SLA";
  color: rgba(255,255,255,.82);
}

.dc-c::after {
  content: "VIP";
  color: rgba(106,61,0,.72);
  background: rgba(255,255,255,.36);
  border-color: rgba(106,61,0,.10);
}

.dynamic-cube {
  animation-timing-function: cubic-bezier(.22,1,.36,1);
}

.cube-a::before,
.cube-b::before,
.cube-c::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 999px;
  background: currentColor;
  opacity: .55;
  box-shadow: 0 0 22px currentColor;
  animation: signal-pulse 2.8s ease-in-out infinite;
}

.cube-a { color: #ff6900; }
.cube-b { color: #20bfa9; }
.cube-c { color: #3b82f6; }

.official-grid-tags span {
  position: relative;
  overflow: hidden;
}

.official-grid-tags span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #ff6900;
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px rgba(255,105,0,.10);
}

.official-grid-tags span:nth-child(2)::before { background: #20bfa9; box-shadow: 0 0 0 4px rgba(32,191,169,.10); }
.official-grid-tags span:nth-child(3)::before { background: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,.10); }
.official-grid-tags span:nth-child(4)::before { background: #f6b73c; box-shadow: 0 0 0 4px rgba(246,183,60,.13); }

.auth-badges .ab:nth-child(1) {
  background: rgba(240,253,250,.78);
  border-color: rgba(32,191,169,.18);
}

.auth-badges .ab:nth-child(2) {
  background: rgba(239,246,255,.78);
  border-color: rgba(59,130,246,.14);
}

.auth-badges .ab:nth-child(3) {
  background: rgba(255,247,237,.82);
  border-color: rgba(255,105,0,.16);
}

.auth-title-en {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.auth-title-en::after {
  content: "AUTH · T9008";
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(17,20,24,.06);
  color: rgba(17,20,24,.52);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .8px;
}

.auth-card .btn-primary {
  isolation: isolate;
}

.auth-card .btn-primary::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255,255,255,.24), transparent 42%, rgba(255,255,255,.18));
  opacity: .78;
  pointer-events: none;
  z-index: -1;
}

.auth-meta .am:nth-child(1) {
  background: linear-gradient(135deg, #fff4ec, #ffc89a 56%, #ff9d4d);
}

.auth-meta .am:nth-child(2) {
  background: linear-gradient(135deg, #fff1c7, #ffc766 54%, #f4a51c);
}

.auth-meta .am:nth-child(3) {
  background: linear-gradient(135deg, #edfffb, #9fe7d3 56%, #49cdb7);
  border-color: rgba(32,191,169,.34);
}

.auth-meta .am:nth-child(3) .v,
.auth-meta .am:nth-child(3) .l {
  color: #075f55;
}

@keyframes signal-pulse {
  0%, 100% { opacity: .34; transform: scale(.82); }
  50% { opacity: .78; transform: scale(1.18); }
}

@media (max-width: 520px) {
  .official-strip::before,
  .auth-title-en::after {
    display: none;
  }

  .official-grid-tags span {
    padding-left: 18px;
  }

  .official-grid-tags span::before {
    left: 8px;
  }
}

/* ============================================================
   兼容层：新版页面使用的工具类 / 移动端侧栏（供“灵动主题”使用）
   ============================================================ */
:root {
  --border-color: #E5E8EC;
  --border-strong: #DCE0E6;
  --bg-card: #FFFFFF;
  --bg-subtle: #F8F9FB;
  --bg-page: #F5F6F8;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 28px -18px rgba(16, 24, 40, 0.12);
  --shadow-pop: 0 12px 40px -12px rgba(16, 24, 40, 0.24), 0 4px 12px -4px rgba(16, 24, 40, 0.10);
  --success-bg: #E7F8EF;
  --success-border: #BAEBCF;
  --warning-bg: #FFF4E5;
  --warning-border: #FFD9A8;
  --danger-bg: #FEE4E2;
  --danger-border: #FECDCA;
  --info-bg: #E0F2FE;
  --info-border: #BAE6FD;
  --mi-orange-border: #FFD9C2;
}

/* 工具类 */
.hidden { display: none; }
.text-center { text-align: center; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--ink-500); }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-column { display: flex; flex-direction: column; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.w-100 { width: 100%; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.modal-open,
.verify-open { overflow: hidden; }

body.modal-open,
body.verify-open { overflow: hidden; }

/* 移动端侧栏 */
.sidebar-toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-700);
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-toggle svg { width: 19px; height: 19px; }
.sidebar-toggle:hover { color: var(--mi-orange); border-color: var(--mi-orange-border); }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(3px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s var(--ease), visibility .24s var(--ease);
}
body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }

@media (max-width: 960px) {
  .sidebar-toggle { display: inline-flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-102%);
    transition: transform .28s var(--ease);
    box-shadow: 20px 0 50px -20px rgba(16, 24, 40, 0.35);
    z-index: 46;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .header { padding: 12px 16px; }
  .content { padding: 18px 16px 36px; }
  .header-left h1 { font-size: 15px; flex-wrap: wrap; }
  .header-left h1 .mi-logo { display: none; }
}

/* DEMO 提示条 */
.demo-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(31, 36, 43, 0.92);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  box-shadow: 0 12px 40px -12px rgba(16, 24, 40, 0.45);
  max-width: calc(100vw - 24px);
}
.demo-banner .demo-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mi-orange);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
}
.demo-banner .demo-accounts { display: flex; gap: 6px; flex-wrap: wrap; }
.demo-banner .demo-accounts button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all .24s var(--ease);
}
.demo-banner .demo-accounts button:hover { background: var(--mi-orange); border-color: var(--mi-orange); }
.auth-stage .demo-banner {
  bottom: auto;
  top: 16px;
}

/* ============================================================
   流光 · macOS 毛玻璃（主页 Hero / 服务状态）
   ============================================================ */
.portal-hero {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0,1fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 20px;
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(150deg, rgba(255,255,255,.90), rgba(244,247,253,.78));
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 26px 64px -30px rgba(79,70,229,.30), inset 0 1px 0 #fff;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  overflow: hidden;
}
.portal-hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.22), transparent 65%);
  pointer-events: none;
}
.portal-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,212,191,.16), transparent 62%);
  pointer-events: none;
}
.portal-hero-copy {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 1;
}
.portal-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(99,102,241,.10);
  border: 1px solid rgba(99,102,241,.22);
  color: #4f46e5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.portal-hero-eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16,185,129,.14);
}
.portal-hero h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -.045em;
  background: linear-gradient(92deg, #111827, #4f46e5 55%, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.portal-hero p {
  margin: 0;
  max-width: 720px;
  color: #5b6472;
  line-height: 1.75;
  font-size: 13.5px;
}
.portal-hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.portal-hero-meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(99,102,241,.18);
  color: #4f46e5;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 6px 16px -10px rgba(79,70,229,.35);
}
.portal-hero-meta .pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
}
.portal-console {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  border-radius: 20px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(15,23,42,.14);
  box-shadow: 0 18px 46px -18px rgba(15,23,42,.45);
  animation: portalFloat 7s ease-in-out infinite;
}
.portal-console-top {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.portal-console-top span { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; }
.portal-console-top span:nth-child(2) { background: #f59e0b; }
.portal-console-top span:nth-child(3) { background: #22c55e; }
.portal-console pre {
  margin: 0;
  padding: 14px;
  color: #a5f3fc;
  font: 12px/1.65 'SFMono-Regular',Consolas,monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
.portal-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.portal-api-card {
  position: relative;
  overflow: hidden;
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 14px 30px -20px rgba(79,70,229,.28), inset 0 1px 0 #fff;
}
.portal-api-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #10b981;
}
.portal-api-card .pa-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.portal-api-card strong { font-size: 17px; color: #111827; }
.portal-api-card .pa-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16,185,129,.10);
  border: 1px solid rgba(16,185,129,.28);
  color: #059669;
  font-size: 10.5px;
  font-weight: 900;
}
.portal-api-card .pa-badge i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.portal-api-card p { margin: 0; color: #6b7280; font-size: 12px; line-height: 1.55; }
@keyframes portalFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (max-width: 900px) {
  .portal-hero { grid-template-columns: 1fr; padding: 22px 20px; }
  .portal-hero-copy { grid-column: 1; }
  .portal-console { display: none; }
  .portal-status { grid-template-columns: 1fr; }
}

/* ============================================================
   流光 · macOS 高级质感（独立主题，不混入深空元素）
   ============================================================ */
.portal-hero,
.portal-status { display: none !important; }

body {
  background:
    radial-gradient(760px 460px at 8% -6%, rgba(255,149,0,.12), transparent 60%),
    radial-gradient(820px 520px at 100% 4%, rgba(88,86,214,.10), transparent 58%),
    linear-gradient(180deg, #f7f8fc 0%, #f2f4f9 60%, #eceef5 100%);
}
.dashboard { background: transparent; }

/* 毛玻璃侧栏 */
.sidebar {
  background: rgba(255,255,255,.62);
  border-right: 1px solid rgba(255,255,255,.9);
  box-shadow: 1px 0 30px -18px rgba(30,41,59,.35);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
}
.sidebar-header { border-bottom: 1px solid rgba(30,41,59,.06); }
.brand .mi-logo,
.sidebar .mi-logo {
  background: linear-gradient(135deg, #ffb37a, #ff8a33 45%, #ff6900);
  box-shadow: 0 10px 24px -10px rgba(255,105,0,.65);
}
.menu-item { border-radius: 12px; }
.menu-item:hover { background: rgba(30,41,59,.05); }
.menu-item.active {
  background: linear-gradient(135deg, rgba(255,105,0,.14), rgba(255,105,0,.06));
  color: #e8590c;
  box-shadow: inset 0 0 0 1px rgba(255,105,0,.22), 0 10px 24px -16px rgba(255,105,0,.5);
}
.sidebar-card,
.sidebar-footer {
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 12px 28px -20px rgba(30,41,59,.35);
}

/* 顶栏 */
.header {
  background: rgba(255,255,255,.55);
  border-bottom: 1px solid rgba(30,41,59,.06);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}

/* 卡片：白色玻璃 */
.card,
.stat-card {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 20px;
  box-shadow: 0 18px 44px -26px rgba(30,41,59,.28), inset 0 1px 0 #fff;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.card:hover,
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 56px -28px rgba(30,41,59,.38), 0 18px 44px -30px rgba(255,105,0,.35);
}

/* 按钮：药丸 */
.btn { border-radius: 999px; }
.btn-primary {
  background: linear-gradient(135deg, #ff9d4d, #ff6900 55%, #e8590c);
  box-shadow: 0 14px 30px -12px rgba(255,105,0,.65);
}
.btn-secondary {
  background: rgba(255,255,255,.9);
  border-color: rgba(30,41,59,.10);
  color: #1f2937;
}
.btn-ghost { color: #6b7280; }

/* 输入框 */
.form-group input,
.form-group select,
.form-group textarea,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.filter-select,
.form-input {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(30,41,59,.10);
  border-radius: 12px;
  color: #1f2937;
  box-shadow: inset 0 1px 2px rgba(30,41,59,.04);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="email"]:focus,
.filter-select:focus,
.form-input:focus {
  border-color: rgba(255,105,0,.55);
  box-shadow: 0 0 0 4px rgba(255,105,0,.12);
  outline: none;
}

/* 弹窗：Mac 窗口 + 红黄绿 */
.modal { background: rgba(30,41,59,.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.modal-content {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 24px;
  box-shadow: 0 40px 90px -30px rgba(30,41,59,.5), inset 0 1px 0 #fff;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}
.modal-header { border-bottom: 1px solid rgba(30,41,59,.07); }
.modal-header::before {
  content: "";
  width: 50px;
  height: 14px;
  margin-right: 12px;
  background:
    radial-gradient(circle at 7px 7px, #ff5f57 5.5px, transparent 6.5px),
    radial-gradient(circle at 25px 7px, #febc2e 5.5px, transparent 6.5px),
    radial-gradient(circle at 43px 7px, #28c840 5.5px, transparent 6.5px);
  flex-shrink: 0;
  align-self: center;
}
.modal-close { background: rgba(30,41,59,.05); color: #6b7280; }
.modal-close:hover { background: #ff5f57; color: #fff; }

/* 服务选择 */
.service-option { background: rgba(255,255,255,.85); border-color: rgba(30,41,59,.10); }
.service-option.selected {
  background: linear-gradient(145deg, rgba(255,105,0,.12), rgba(255,255,255,.92));
  border-color: rgba(255,105,0,.45);
  box-shadow: 0 0 0 3px rgba(255,105,0,.10), 0 14px 30px -18px rgba(255,105,0,.5);
}
.service-option .so-icon {
  background: linear-gradient(145deg, #fff, #fff4ec);
  border-color: rgba(255,105,0,.16);
  color: #ff6900;
}
.service-option.selected .so-icon {
  background: linear-gradient(135deg, #ff9d4d, #ff6900);
  color: #fff;
}

/* 弹簧动画 */
@keyframes macSpring {
  0% { opacity: 0; transform: translateY(18px) scale(.96); }
  60% { transform: translateY(-2px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.modal.active .modal-content { animation: macSpring .5s cubic-bezier(.22,1,.36,1); }
.card,
.stat-card {
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, border-color .3s ease;
}
#overview-section { animation: macFade .5s ease both; }
@keyframes macFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(30,41,59,.18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(30,41,59,.30); }

/* 水印：浅灰高级 */
.watermark {
  filter: grayscale(1) brightness(1.35);
  opacity: .8;
  z-index: 0;
}

/* 登录页 macOS 质感 */
.auth-stage {
  background: linear-gradient(160deg, #f7f8fc, #eef0f7 55%, #e9ebf4);
}
.auth-card {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 28px;
  box-shadow: 0 40px 90px -40px rgba(30,41,59,.45), inset 0 1px 0 #fff;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}
@media (max-width: 880px) {
  .sidebar { background: rgba(255,255,255,.92); }
}

/* ===== 顶栏标题单行省略(避免换行) ===== */
.header-left { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.header-left h1 { white-space: nowrap; overflow: hidden; }
.header-left h1 .h1-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.header-left h1 .h1-suffix { flex-shrink: 0; }
.header-right { flex-shrink: 0; }
/* ===== 安全设置:邮箱/验证码输入框加大 ===== */
.security-form-row .form-input {
  height: 48px;
  padding: 13px 16px;
  font-size: 14.5px;
  border-radius: 12px;
  box-sizing: border-box;
}
.security-form-row .btn {
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}
/* ===== 安全设置:邮箱框全宽,按钮组等高 ===== */
.security-form > .form-input {
  width: 100%;
  height: 50px;
  padding: 13px 18px;
  font-size: 15px;
  border-radius: 12px;
  box-sizing: border-box;
}
.security-form-row .form-input {
  height: 50px;
  padding: 13px 16px;
  font-size: 14.5px;
  border-radius: 12px;
  box-sizing: border-box;
}
.security-form-row .btn {
  height: 50px;
  padding: 0 20px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* 安全设置按钮组:行内按钮自适应宽度 */
.security-form-row .btn { width: auto; }

/* ===== Xiaomi official MI logo (replaces text Mi) ===== */
.mi-logo {
  background: url('/img/mi-logo.svg') center/cover no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
  text-indent: 0 !important;
}
html[data-theme="official"] .mi-logo,
body.theme-official .mi-logo {
  background-image: url('/img/mi-logo-purple.svg') !important;
}

/* ===== Auth bottom info: single-line, even spacing, official look ===== */
.auth-meta {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 6px;
}
.auth-meta .am { padding: 10px 6px; }
.auth-meta .am .v {
  font-size: 13px;
  letter-spacing: .6px;
  white-space: nowrap;
}
.auth-meta .am .l {
  font-size: 10px;
  letter-spacing: .8px;
  white-space: nowrap;
  margin-top: 3px;
}
.auth-copyright {
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: .6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
