/* ============================================================
   IMEICheck H5 v2 — Design System
   橙色品牌设计系统 · Alpine.js 纯 HTML 版
   v80.47: 紫色→橙色统一（H5/APP 全橙色调，主色 #FF6B35）
   来源：app-final.html / app-history.html / app-pages.html 统一提取
   ============================================================ */

:root {
  /* Brand — 橙色色阶（v80.47 统一 H5/APP 为全橙色调，主色对齐 APP #FF6B35） */
  --brand-50: #fff4ed; --brand-100: #ffe6d5; --brand-200: #ffc8aa;
  --brand-300: #ffa574; --brand-400: #ff8359; --brand-500: #FF6B35;
  --brand-600: #ed5519; --brand-700: #c44414; --brand-800: #973612;
  --brand-900: #7a2e10;

  /* Ink — 灰阶 */
  --ink-0: #ffffff; --ink-50: #fafbfc; --ink-100: #f3f4f7;
  --ink-200: #e6e8ef; --ink-300: #d3d6df; --ink-400: #9aa1b2;
  --ink-500: #687187; --ink-600: #4d576c; --ink-700: #323d55;
  --ink-800: #1e2840; --ink-900: #10172d;

  /* Semantic */
  --success: #0b9f73; --success-bg: #eafaf4;
  --warning: #b97905; --warning-bg: #fff7df;
  --danger: #d83b4b;  --danger-bg: #fff0f2;
  --info: #087ea4;    --info-bg: #eaf8fc;

  /* Social */
  --tg: #229ed9; --orange: #FF6B35;

  /* Background */
  --bg: #eef1f8; --bg-soft: #f7f8fc; --bg-page: #ffffff;
  --line: #e4e7ef; --border: #e4e7ef; --border-subtle: #f3f4f6;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(16,23,45,.04);
  --shadow-sm: 0 1px 3px rgba(16,23,45,.07), 0 1px 2px rgba(16,23,45,.04);
  --shadow-md: 0 9px 25px rgba(16,23,45,.10), 0 3px 8px rgba(16,23,45,.05);
  --shadow-lg: 0 30px 70px rgba(16,23,45,.18), 0 5px 15px rgba(16,23,45,.08);
  --shadow-brand: 0 16px 35px rgba(255,107,53,.28);

  /* Radius */
  --r-xs: 7px; --r-sm: 10px; --r-md: 13px; --r-lg: 17px;
  --r-xl: 22px; --r-2xl: 28px; --r-full: 999px;

  /* Font */
  --font-ui: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Motion */
  --ease: cubic-bezier(.16,1,.3,1);
  --t-fast: 160ms; --t-base: 240ms;

  /* Safe area */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at 10% 0%, rgba(255,107,53,.09), transparent 30rem),
    radial-gradient(circle at 92% 12%, rgba(34,158,217,.08), transparent 26rem),
    var(--bg-soft);
  color: var(--ink-900);
  font: 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; background: none; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid rgba(255,107,53,.35); outline-offset: 2px;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; display: inline-block; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-500); }

/* ===== App Shell (mobile-first, adaptive to desktop) ===== */
.app-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-soft);
  position: relative;
  overflow-x: hidden;
}

/* Desktop: center with side padding */
@media (min-width: 768px) {
  .app-shell {
    max-width: 480px;
    box-shadow: var(--shadow-lg);
  }
  body { background: var(--bg); }
}

/* ===== Status Bar (decorative) ===== */
.statusbar {
  position: relative; z-index: 4;
  height: 44px;
  padding: 14px 25px 0;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--ink-900); font-size: 12px; font-weight: 800;
}
.status-icons { display: flex; align-items: center; gap: 5px; }
.status-icons .icon { width: 14px; height: 14px; }

/* ===== Screen / Content Area ===== */
.screen {
  position: relative;
  min-height: calc(100vh - 44px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen-pad { padding: 0 15px calc(74px + var(--safe-bottom)); }

/* ===== App Bar (top navigation) ===== */
.appbar {
  min-height: 50px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 3px 2px 6px;
}
.brand-lockup {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 900; letter-spacing: -.04em;
}
.brand-lockup .logo {
  width: 27px; height: 27px;
  display: grid; place-items: center; color: #fff;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--brand-400), var(--brand-700));
  box-shadow: 0 5px 10px rgba(255,107,53,.25);
  font-size: 12px; font-weight: 900;
}
.brand-lockup em { color: var(--brand-600); font-style: normal; }
.appbar-title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.appbar-actions { display: flex; align-items: center; gap: 7px; }

/* ===== Icon Button ===== */
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  color: var(--ink-600); background: #fff;
  border: 1px solid var(--line); border-radius: 9px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) var(--ease);
}
.icon-btn:active { transform: scale(.94); }
.icon-btn .icon { width: 16px; height: 16px; }
.back-btn { color: var(--ink-700); background: transparent; border: 0; box-shadow: none; }
.link-btn { color: var(--brand-600); background: transparent; font-size: 12px; font-weight: 700; }

/* ===== Tab Bar (bottom navigation) ===== */
.tabbar {
  position: fixed; z-index: 50;
  left: 50%; transform: translateX(-50%);
  bottom: 0;
  width: 100%; max-width: 480px;
  height: calc(50px + var(--safe-bottom));
  display: flex;
  padding: 2px 3px var(--safe-bottom);
  background: rgba(255,255,255,.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.tab {
  position: relative; flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-400); background: transparent;
  font-size: 10px; font-weight: 600;
  transition: color var(--t-fast);
}
.tab .icon { width: 19px; height: 19px; }
.tab.active { color: var(--brand-600); font-weight: 800; }
.tab.active::before {
  content: ""; position: absolute; top: 0;
  width: 21px; height: 3px; border-radius: 0 0 4px 4px;
  background: var(--brand-500);
}

/* ===== Section Head ===== */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 13px 1px 7px;
}
.section-head h3 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.section-head .muted-link { color: var(--brand-600); font-size: 11px; font-weight: 700; }

/* ===== Cards ===== */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}

/* ===== Pills / Badges ===== */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 8px; border-radius: var(--r-full);
  font-size: 10px; font-weight: 800; white-space: nowrap;
}
.pill.success { color: var(--success); background: var(--success-bg); }
.pill.warning { color: var(--warning); background: var(--warning-bg); }
.pill.danger { color: var(--danger); background: var(--danger-bg); }
.pill.info { color: var(--info); background: var(--info-bg); }
.pill.brand { color: var(--brand-600); background: var(--brand-50); }
.pill.neutral { color: var(--ink-600); background: var(--ink-100); }

/* ===== Buttons ===== */
.btn-primary {
  min-height: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 14px; color: #fff;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border-radius: var(--r-md);
  box-shadow: 0 8px 16px rgba(255,107,53,.22);
  font-size: 13px; font-weight: 800;
  transition: transform var(--t-fast) var(--ease);
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary .icon { width: 16px; height: 16px; }

.btn-secondary {
  min-height: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 13px; color: var(--brand-600);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: var(--r-md);
  font-size: 12px; font-weight: 800;
}
.btn-ghost {
  color: var(--ink-600); background: var(--ink-100);
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 12px; font-weight: 700;
}

/* ===== Form Fields ===== */
.field { margin-top: 9px; }
.field label {
  display: block; margin: 0 0 5px;
  color: var(--ink-700); font-size: 10px; font-weight: 800;
}
.field-control {
  height: 44px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 13px;
  background: var(--ink-50); border: 1.5px solid transparent;
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}
.field-control:focus-within {
  background: #fff; border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(255,107,53,.12);
}
.field-control .icon { width: 16px; height: 16px; color: var(--ink-400); }
.field-control input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  background: transparent; color: var(--ink-900); font-size: 14px;
}
.field-control input::placeholder { color: var(--ink-400); }

/* ===== Home / Service List ===== */
.home-welcome {
  display: flex; align-items: end; justify-content: space-between;
  gap: 8px; padding: 5px 2px 8px;
}
.home-welcome h2 { margin: 3px 0 0; font-size: 21px; line-height: 1.15; letter-spacing: -.045em; }
.home-welcome p { margin: 3px 0 0; color: var(--ink-500); font-size: 10.5px; }
.wallet-chip {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  padding: 7px 9px; color: var(--brand-700);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: 11px;
}
.wallet-chip small { color: var(--ink-500); font-size: 9px; }
.wallet-chip strong { font: 800 14px/1 var(--font-mono); }

.service-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px;
}
.service-card {
  min-height: 84px; padding: 10px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 5px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) var(--ease);
}
.service-card:active { transform: scale(.97); }
.service-top { display: flex; align-items: start; justify-content: space-between; gap: 5px; }
.service-icon {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; color: #fff;
  background: linear-gradient(145deg, var(--brand-400), var(--brand-700));
}
.service-icon.orange { background: linear-gradient(145deg, #ff9a53, #ef641b); }
.service-icon.blue { background: linear-gradient(145deg, #52c5ee, #1887c1); }
.service-icon.red { background: linear-gradient(145deg, #f47783, #d9364b); }
.service-icon.dark { background: linear-gradient(145deg, #46506a, #171e37); }
.service-icon .icon { width: 14px; height: 14px; }
.service-price { color: var(--brand-600); font: 800 10px/1 var(--font-mono); }
.service-card h4 { margin: 0; font-size: 11px; line-height: 1.22; }
.service-card p {
  margin: 2px 0 0; color: var(--ink-500); font-size: 9px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.service-foot { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: var(--ink-400); font-size: 9px; }
.service-foot .icon { width: 12px; height: 12px; }

.notice-strip {
  display: flex; align-items: center; gap: 8px;
  margin-top: 9px; padding: 8px 10px;
  color: var(--ink-600);
  background: linear-gradient(90deg, #fff, #f8f7ff);
  border: 1px solid var(--brand-100); border-radius: 10px;
  font-size: 10px;
}
.notice-strip .icon { color: var(--brand-600); width: 15px; height: 15px; }
.notice-strip strong { color: var(--brand-600); }

/* ===== Query Page ===== */
.query-hero {
  position: relative; overflow: hidden;
  margin-top: 5px; padding: 17px; color: #fff;
  background: linear-gradient(145deg, #6664f7 0%, #4f45cf 70%, #3937a7 100%);
  border-radius: var(--r-xl); box-shadow: var(--shadow-brand);
}
.query-hero::after {
  content: ""; position: absolute; top: -44px; right: -28px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.2), rgba(255,255,255,0) 68%);
  pointer-events: none;
}
.query-hero .overline {
  display: flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,.78); font-size: 10px; font-weight: 800; letter-spacing: .08em;
}
.query-hero .overline .empty-dot {
  width: 6px; height: 6px; background: #63e6b1;
  box-shadow: 0 0 0 3px rgba(99,230,177,.15); border-radius: 50%;
}
.query-hero h2 {
  position: relative; z-index: 1; margin: 6px 0 3px;
  font-size: 20px; line-height: 1.16; letter-spacing: -.04em;
}
.query-hero .sub {
  position: relative; z-index: 1; margin: 0;
  color: rgba(255,255,255,.72); font-size: 11px;
}
.imei-entry {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 6px;
  margin-top: 13px; padding: 4px; background: #fff;
  border-radius: 11px; box-shadow: 0 7px 15px rgba(20,20,80,.18);
}
.imei-entry .icon { margin-left: 5px; color: var(--ink-400); width: 16px; height: 16px; }
.imei-entry input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  color: var(--ink-900); background: transparent;
  font: 600 13px var(--font-mono);
}
.imei-entry input::placeholder { color: var(--ink-400); font: 400 12px var(--font-ui); }
.paste {
  padding: 6px 10px; color: var(--brand-600); background: var(--brand-50);
  border-radius: 8px; font-size: 10px; font-weight: 800;
}
.scan-mini {
  width: 32px; height: 32px; display: grid; place-items: center;
  color: var(--ink-600); background: var(--ink-100); border-radius: 8px;
}
.scan-mini .icon { width: 15px; height: 15px; }
.query-submit {
  position: relative; z-index: 1; width: 100%; min-height: 46px;
  margin-top: 9px; display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--brand-700); background: #fff;
  border-radius: 11px; font-size: 14px; font-weight: 900;
  box-shadow: 0 7px 15px rgba(20,20,80,.18);
  transition: transform var(--t-fast) var(--ease);
}
.query-submit:active { transform: translateY(1px); }
.query-submit .icon { width: 15px; height: 15px; }
.query-hint {
  position: relative; z-index: 1; margin: 9px 0 0;
  color: rgba(255,255,255,.72); text-align: center; font-size: 10px;
}
.query-hint code {
  padding: 2px 6px; background: rgba(255,255,255,.15);
  border-radius: 5px; font: 600 10px var(--font-mono); color: #fff;
}

/* Tier toggle (free / deep query) */
.tier-toggle {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px;
  margin-top: 13px; padding: 4px;
  background: rgba(255,255,255,.16); border-radius: 11px;
}
.tier {
  padding: 7px 3px; color: rgba(255,255,255,.72); background: transparent;
  border-radius: 8px; font-size: 10px; font-weight: 800;
  transition: all var(--t-fast) var(--ease);
}
.tier.active {
  color: var(--brand-700); background: #fff;
  box-shadow: 0 3px 7px rgba(20,20,80,.2);
}
.tier small {
  display: block; margin-top: 1px; opacity: .72;
  font: 700 9px/1 var(--font-mono);
}

/* Brand selection grid */
.brand-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px;
  margin-top: 4px;
}
.brand-tile {
  padding: 9px 3px; display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  color: var(--ink-700); background: #fff;
  border: 1px solid var(--line); border-radius: 11px;
  font-size: 10px; font-weight: 700;
  transition: all var(--t-fast) var(--ease);
}
.brand-tile:active { transform: scale(.96); }
.brand-tile .brand-icon {
  width: 28px; height: 28px; display: grid; place-items: center;
  color: #fff; border-radius: 9px; background: #1f2937;
}
.brand-tile:nth-child(2) .brand-icon { background: #1838a3; }
.brand-tile:nth-child(3) .brand-icon { background: #ff7019; }
.brand-tile:nth-child(4) .brand-icon { background: #c8000b; }
.brand-tile:nth-child(5) .brand-icon { background: #1598cc; }
.brand-tile:nth-child(6) .brand-icon { background: linear-gradient(145deg, var(--brand-400), var(--brand-700)); }
.brand-icon .icon { width: 15px; height: 15px; }

/* Recent query row */
.recent-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; margin-bottom: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  transition: transform var(--t-fast) var(--ease);
}
.recent-row:active { transform: scale(.99); box-shadow: var(--shadow-md); }
.recent-row .device {
  width: 28px; height: 28px; display: grid; place-items: center;
  color: #fff; background: #202a42; border-radius: 8px;
}
.recent-row .device .icon { width: 14px; height: 14px; }
.recent-row .info { min-width: 0; flex: 1; }
.recent-row strong { display: block; font-size: 11px; }
.recent-row code {
  display: block; margin-top: 2px; color: var(--ink-500);
  font: 10px var(--font-mono);
}
.recent-row .time { color: var(--ink-400); font: 9px var(--font-mono); }

/* Service list item (for query page service selection) */
.service-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; margin-bottom: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
}
.service-item:active { transform: scale(.99); }
.service-item.selected {
  border-color: var(--brand-300);
  background: var(--brand-50);
  box-shadow: 0 5px 12px rgba(255,107,53,.12);
}
.service-item-icon {
  width: 30px; height: 30px; display: grid; place-items: center;
  font-size: 15px; border-radius: 8px;
  background: var(--brand-50);
}
.service-item-info { min-width: 0; flex: 1; }
.service-item-name {
  display: block; font-size: 12px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.service-item-price {
  display: block; margin-top: 2px;
  color: var(--brand-600); font: 700 10px var(--font-mono);
}
.service-item-check { color: var(--brand-500); }

/* Query cost row */
.query-cost-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 9px; padding: 10px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  font-size: 12px; color: var(--ink-500);
}
.query-cost-amount {
  color: var(--brand-600); font: 800 16px var(--font-mono);
}

/* Tutorial link */
.tutorial-link-row {
  text-align: center; margin-top: 12px; padding-bottom: 10px;
}

/* ===== Content area helpers ===== */
.screen-content {
  padding: 0 15px calc(74px + var(--safe-bottom));
}
.screen-content.has-appbar { padding-top: 4px; }

/* ===== Appbar back button & lang pill ===== */
.appbar-back {
  width: 36px; height: 36px; display: grid; place-items: center;
  color: var(--ink-700); background: transparent; border: 0;
  cursor: pointer; transition: transform var(--t-fast) var(--ease);
}
.appbar-back:active { transform: scale(.94); }
.appbar-back svg { width: 20px; height: 20px; }
.lang-pill {
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: 20px; padding: 4px 12px;
  color: var(--brand-600); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.lang-pill:hover { background: var(--brand-100); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; z-index: 80; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(16,23,45,.5); backdrop-filter: blur(4px);
  padding: 0 16px calc(20px + var(--safe-bottom));
}
.modal-card {
  width: 100%; max-width: 448px;
  background: #fff; border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 0 18px 18px; }

/* Tutorial tabs */
.tutorial-tab-row {
  display: flex; gap: 6px; margin-bottom: 14px;
  padding: 4px; background: var(--ink-100); border-radius: 10px;
}
.tutorial-tab {
  flex: 1; padding: 8px; color: var(--ink-500);
  border-radius: 8px; font-size: 12px; font-weight: 800;
  transition: all var(--t-fast);
}
.tutorial-tab.active {
  color: var(--brand-700); background: #fff; box-shadow: var(--shadow-sm);
}
.tutorial-content { display: grid; gap: 8px; }
.tutorial-step {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #fff, #fbfbff);
  border: 1px solid var(--line); border-radius: 11px;
  font-size: 11px; line-height: 1.5;
}

/* ===== Scan Overlay ===== */
.scan-overlay {
  position: fixed; z-index: 90; inset: 0;
  background: #000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
}
.scan-container {
  width: 100%; max-width: 400px; position: relative;
  display: flex; flex-direction: column; align-items: center;
}
.scan-container video {
  width: 100%; border-radius: var(--r-lg); object-fit: cover;
}
.scan-frame {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 250px; height: 250px;
}
.scan-corner {
  position: absolute; width: 30px; height: 30px;
  border: 3px solid var(--brand-400); border-radius: 4px;
}
.scan-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.scan-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.scan-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.scan-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.scan-hint {
  color: #fff; font-size: 14px; font-weight: 600;
  margin-top: 16px; text-align: center;
}
.scan-cancel { margin-top: 8px; }

/* ===== History Page ===== */
.search-box {
  height: 42px; display: flex; align-items: center; gap: 8px;
  padding: 0 13px; margin-top: 4px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-box:focus-within {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px var(--brand-50);
}
.search-box .icon { width: 16px; height: 16px; color: var(--ink-400); transition: color var(--t-fast); }
.search-box:focus-within .icon { color: var(--brand-500); }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  color: var(--ink-900); background: transparent; font-size: 13px;
}
.search-box input::placeholder { color: var(--ink-400); }

.chips {
  display: flex; gap: 6px; overflow-x: auto;
  margin-top: 10px; padding: 1px 0 3px; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 14px;
  color: var(--ink-600); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all var(--t-fast) var(--ease);
}
.chip:active { transform: scale(.96); }
.chip.active {
  color: #fff; background: var(--brand-500); border-color: var(--brand-500);
  box-shadow: 0 4px 12px rgba(255,107,53,.25);
}
.chip .num { font: 700 9px var(--font-mono); opacity: .7; }

/* Stats card — premium gradient */
.stat-card {
  margin-top: 10px; padding: 13px;
  background: linear-gradient(135deg, var(--brand-50) 0%, #fff 60%);
  border: 1px solid var(--brand-100); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.stat-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
}
.stat-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; background: rgba(255,255,255,.8);
  border: 1px solid var(--border-subtle); border-radius: var(--r-sm);
  backdrop-filter: blur(4px);
}
.stat-item .stat-icon {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; flex-shrink: 0;
}
.stat-item .stat-icon svg { width: 16px; height: 16px; }
.stat-item .stat-data { min-width: 0; }
.stat-item strong {
  display: block; font: 800 17px/1 var(--font-mono); color: var(--ink-900);
}
.stat-item small { display: block; margin-top: 1px; color: var(--ink-500); font-size: 9px; }

.stat-total .stat-icon { color: var(--brand-600); background: var(--brand-100); }
.stat-total strong { color: var(--brand-700); }
.stat-success .stat-icon { color: var(--success); background: var(--success-bg); }
.stat-success strong { color: var(--success); }
.stat-failed .stat-icon { color: var(--danger); background: var(--danger-bg); }
.stat-failed strong { color: var(--danger); }

.group { margin-top: 14px; }
.group-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 2px 7px;
}
.group-head strong { font-size: 13px; }
.group-head span { color: var(--ink-400); font: 9px var(--font-mono); }

/* History row — premium card design */
.history-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; margin-bottom: 7px;
  background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--r-sm);
  position: relative; overflow: hidden;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.history-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ink-300); border-radius: 3px 0 0 3px;
}
.history-row.success::before { background: var(--success); }
.history-row.fail::before { background: var(--danger); }
.history-row.pending::before { background: var(--warning); }
.history-row:active {
  transform: scale(.985);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-200);
}
.history-row .device {
  width: 36px; height: 36px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(145deg,#3c455b,#171e37);
  border-radius: 9px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16,23,45,.15);
}
.history-row .device svg { width: 18px; height: 18px; }
.history-row .device.apple { background: linear-gradient(145deg,#1F2937,#374151); }
.history-row .device.samsung { background: linear-gradient(145deg,#1428A0,#1E40AF); }
.history-row .device.xiaomi { background: linear-gradient(145deg,#FF6900,#FB923C); }
.history-row .device.huawei { background: linear-gradient(145deg,#C7000B,#DC2626); }
.history-row .device.orange { background: linear-gradient(145deg,#ff9c52,#e55e1d); }
.history-row .info { min-width: 0; flex: 1; }
.history-row .info strong {
  display: block; font-size: 13px; font-weight: 700; color: var(--ink-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-row .info code {
  display: inline-block; margin-top: 3px;
  color: var(--ink-500); font: 10px var(--font-mono);
  background: var(--ink-100); padding: 1px 6px; border-radius: 4px;
}
.history-row .right {
  display: flex; flex-direction: column; align-items: end; gap: 4px; flex-shrink: 0;
}
.history-row .status-dot {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: var(--r-full);
}
.history-row .status-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
}
.history-row .status-dot.success { color: var(--success); background: var(--success-bg); }
.history-row .status-dot.success::before { background: var(--success); }
.history-row .status-dot.fail { color: var(--danger); background: var(--danger-bg); }
.history-row .status-dot.fail::before { background: var(--danger); }
.history-row .status-dot.pending { color: var(--warning); background: var(--warning-bg); }
.history-row .status-dot.pending::before { background: var(--warning); }
.history-row time { color: var(--ink-400); font: 9px var(--font-mono); }
.history-row .chevron {
  width: 16px; height: 16px; color: var(--ink-300); flex-shrink: 0;
  transition: transform var(--t-fast) var(--ease), color var(--t-fast);
}
.history-row:active .chevron { color: var(--brand-500); transform: translateX(2px); }

/* ===== Auth Pages (Login/Register) ===== */
.auth-card {
  margin-top: 14px; padding: 18px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-md);
}
.auth-logo {
  width: 60px; height: 60px; display: grid; place-items: center;
  margin: 0 auto 14px; color: #fff;
  background: linear-gradient(145deg, #ff8359, #FF6B35 55%, #c44414);
  border-radius: 18px; box-shadow: 0 8px 24px rgba(255,107,53,.32), inset 0 1px 0 rgba(255,255,255,.25);
  font-size: 24px; font-weight: 900; letter-spacing: -.04em;
  position: relative; overflow: hidden;
}
.auth-logo::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent);
  pointer-events: none;
}
.auth-card h2 {
  margin: 0; text-align: center;
  font-size: 20px; letter-spacing: -.04em;
}
.auth-card > p {
  margin: 4px 0 14px; color: var(--ink-500);
  text-align: center; font-size: 12px;
}
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 13px;
  background: var(--ink-100); border-radius: 11px;
}
.auth-tab {
  padding: 9px; color: var(--ink-500); background: transparent;
  border-radius: 8px; font-size: 12px; font-weight: 800;
  transition: all var(--t-fast);
}
.auth-tab.active {
  color: var(--brand-700); background: #fff; box-shadow: var(--shadow-sm);
}
.auth-options {
  display: flex; align-items: center; justify-content: space-between;
  margin: 10px 0 13px; color: var(--ink-500); font-size: 11px;
}
.remember { display: inline-flex; align-items: center; gap: 5px; }
.remember i {
  width: 14px; height: 14px; display: grid; place-items: center;
  color: #fff; background: var(--brand-500);
  border-radius: 4px; font-style: normal; font-size: 9px;
}
.auth-submit { width: 100%; }
.divider {
  display: flex; align-items: center; gap: 9px;
  margin: 16px 0 12px; color: var(--ink-400); font-size: 10px;
}
.divider::before, .divider::after {
  content: ""; height: 1px; flex: 1; background: var(--line);
}

/* Social login buttons */
.social-row {
  display: flex; justify-content: center; gap: 12px;
}
.social-btn {
  width: 48px; height: 48px;
  border-radius: 14px; background: #fff;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.social-btn:active { transform: scale(.96); }
.social-btn svg { width: 22px; height: 22px; }
.social-btn.tg svg { color: var(--tg); }
.social-btn.gg svg { color: #4285F4; }

.social-login {
  width: 100%; height: 42px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--tg); background: #edf8fd;
  border: 1px solid #cdeef9; border-radius: 11px;
  font-size: 12px; font-weight: 800;
}
.tg-mark {
  width: 18px; height: 18px; display: grid; place-items: center;
  color: #fff; background: var(--tg);
  border-radius: 50%; font-size: 9px; font-weight: 900;
}

.legal {
  margin: 12px 0 0; color: var(--ink-400);
  text-align: center; font-size: 10px; line-height: 1.45;
}
.legal u { color: var(--brand-600); text-underline-offset: 2px; }
.legal a { color: var(--brand-600); font-weight: 500; }

/* ===== Result Page ===== */
.result-hero {
  position: relative; overflow: hidden;
  margin-top: 5px; padding: 16px; color: #fff;
  background: linear-gradient(145deg,#303a5a,#171e38);
  border-radius: var(--r-xl);
}
.result-hero::after {
  content: ""; position: absolute; right: -30px; top: -44px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle,rgba(104,210,255,.23),transparent 67%);
}
.result-head {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 11px;
}
.result-device {
  width: 45px; height: 45px; display: grid; place-items: center;
  color: var(--ink-900); background: #fff; border-radius: 14px;
}
.result-device .icon { width: 23px; height: 23px; }
.result-name { min-width: 0; flex: 1; }
.result-name strong { display: block; font-size: 15px; letter-spacing: -.02em; }
.result-name span {
  display: block; margin-top: 2px;
  color: rgba(255,255,255,.66); font: 9px var(--font-mono);
}
.result-imei {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 11px;
  border-top: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.68); font-size: 10px;
}
.result-imei code { color: #fff; font: 600 11px var(--font-mono); }
.result-imei .icon { margin-left: auto; width: 14px; height: 14px; color: rgba(255,255,255,.7); }

.result-metrics {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; margin-top: 10px;
}
.metric {
  padding: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
}
.metric-top {
  display: flex; align-items: center; justify-content: space-between; gap: 5px;
}
.metric small { color: var(--ink-500); font-size: 9px; }
.metric strong { display: block; margin-top: 5px; font-size: 13px; }
.metric-icon {
  width: 22px; height: 22px; display: grid; place-items: center;
  color: var(--success); background: var(--success-bg); border-radius: 7px;
}
.metric.warning .metric-icon { color: var(--warning); background: var(--warning-bg); }
.metric-icon .icon { width: 13px; height: 13px; }

.report-card {
  padding: 12px; margin-top: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.report-card h3 { margin: 0 0 9px; font-size: 13px; }
.report-line {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-top: 1px solid var(--ink-100); font-size: 11px;
}
.report-line:first-of-type { border-top: 0; }
.report-line span { color: var(--ink-500); }
.report-line strong { text-align: right; font-size: 11px; }
.result-footnote {
  margin: 9px 2px 0; color: var(--ink-400);
  text-align: center; font-size: 9px;
}

/* ===== Profile Page ===== */
.profile-login {
  position: relative; overflow: hidden;
  margin-top: 6px; padding: 15px 14px; color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  border-radius: var(--r-xl); box-shadow: var(--shadow-brand);
}
.profile-login::after {
  content: ""; position: absolute; right: -40px; top: -50px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle,rgba(255,255,255,.2),transparent 68%);
}
.profile-login .small {
  position: relative; z-index: 1;
  color: rgba(255,255,255,.72); font-size: 10px;
}
.profile-login h2 {
  position: relative; z-index: 1; margin: 4px 0 5px;
  font-size: 20px; letter-spacing: -.04em;
}
.profile-login p {
  position: relative; z-index: 1; margin: 0;
  color: rgba(255,255,255,.72); font-size: 10.5px;
}
.profile-login .btn-white {
  position: relative; z-index: 1; width: 100%; height: 40px;
  margin-top: 12px; color: var(--brand-700); background: #fff;
  border-radius: 10px; font-size: 13px; font-weight: 900;
}

.signed-profile {
  position: relative; overflow: hidden;
  margin-top: 4px; padding: 13px; color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  border-radius: var(--r-xl); box-shadow: var(--shadow-brand);
}
.signed-profile::after {
  content: ""; position: absolute; right: -48px; top: -60px;
  width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle,rgba(255,255,255,.18),transparent 68%);
}
.profile-row {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 40px; height: 40px; display: grid; place-items: center;
  color: var(--brand-700); background: #fff;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%; font-size: 16px; font-weight: 900;
  overflow: hidden;
}
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong { display: block; font-size: 14px; }
.profile-copy span {
  display: block; margin-top: 2px;
  color: rgba(255,255,255,.7); font: 9px var(--font-mono);
}
.vip {
  padding: 5px 8px; color: #fff;
  background: rgba(255,255,255,.17);
  border-radius: var(--r-full); font-size: 9px; font-weight: 900;
}
.balance-row {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.16);
}
.balance-row small { display: block; color: rgba(255,255,255,.7); font-size: 9px; }
.balance-row strong { display: block; margin-top: 2px; font: 800 18px/1 var(--font-mono); }
.topup {
  padding: 6px 11px; color: var(--brand-700); background: #fff;
  border-radius: 8px; font-size: 10px; font-weight: 900;
}

.profile-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 10px;
}
.profile-stat {
  padding: 9px 5px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.profile-stat strong { display: block; font: 800 15px/1 var(--font-mono); }
.profile-stat span { display: block; margin-top: 4px; color: var(--ink-500); font-size: 9px; }

.invite-strip {
  display: flex; align-items: center; gap: 9px;
  margin-top: 8px; padding: 9px 10px;
  color: #875017;
  background: linear-gradient(100deg,#fff7e1,#fffdf6);
  border: 1px solid #f9df9c; border-radius: 11px;
}
.invite-strip .icon { width: 20px; height: 20px; }
.invite-strip strong { display: block; font-size: 10px; }
.invite-strip span { display: block; margin-top: 2px; font-size: 9px; }
.invite-strip button {
  margin-left: auto; color: #a56c12; background: transparent;
  font-size: 10px; font-weight: 900;
}

/* Entry list (settings rows) */
.entry-list {
  margin-top: 10px; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.entry {
  min-height: 48px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--ink-100); background: #fff;
  transition: background var(--t-fast);
}
.entry:last-child { border-bottom: 0; }
.entry:active { background: var(--ink-50); }
.entry-icon {
  width: 28px; height: 28px; display: grid; place-items: center;
  color: var(--brand-600); background: var(--brand-50); border-radius: 8px;
}
.entry-icon.green { color: var(--success); background: var(--success-bg); }
.entry-icon.orange { color: var(--orange); background: #fff3e8; }
.entry-icon.blue { color: var(--info); background: var(--info-bg); }
.entry-icon .icon { width: 15px; height: 15px; }
.entry-copy { min-width: 0; flex: 1; }
.entry-copy strong { display: block; font-size: 12px; }
.entry-copy span { display: block; margin-top: 2px; color: var(--ink-500); font-size: 10px; }
.entry > .icon { width: 14px; height: 14px; color: var(--ink-300); }

/* ===== Recharge Page ===== */
.recharge-balance {
  margin-top: 4px; padding: 14px; color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  border-radius: var(--r-xl); box-shadow: var(--shadow-brand);
}
.recharge-balance small { color: rgba(255,255,255,.72); font-size: 10px; }
.recharge-balance strong {
  display: block; margin-top: 4px;
  font: 800 24px/1 var(--font-mono); letter-spacing: -.04em;
}
.recharge-balance .balance-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 11px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.17);
  color: rgba(255,255,255,.72); font-size: 9px;
}
.package-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; margin-top: 8px;
}
.package {
  position: relative; min-height: 68px; padding: 10px;
  text-align: left; background: #fff;
  border: 1.5px solid var(--line); border-radius: 11px;
  transition: all var(--t-fast);
}
.package.active {
  color: var(--brand-700); background: var(--brand-50);
  border-color: var(--brand-300);
  box-shadow: 0 5px 12px rgba(255,107,53,.12);
}
.package .gift {
  position: absolute; top: -7px; right: 8px;
  padding: 3px 6px; color: #9a640a; background: #ffecb3;
  border-radius: var(--r-full); font-size: 8px; font-weight: 900;
}
.package strong { display: block; font: 800 17px/1 var(--font-mono); }
.package span { display: block; margin-top: 5px; color: var(--ink-500); font-size: 9px; }
.package.active span { color: var(--brand-600); }

.pay-methods {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 8px;
}
.pay {
  padding: 8px 3px; color: var(--ink-600); background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  text-align: center; font-size: 9px; font-weight: 800;
  transition: all var(--t-fast);
}
.pay.active {
  color: var(--success); background: var(--success-bg);
  border-color: #a9e6d0;
}
.pay .pay-mark {
  width: 20px; height: 20px; display: grid; place-items: center;
  margin: 0 auto 4px; color: #fff;
  background: #27c45a; border-radius: 6px;
  font-size: 10px; font-weight: 900;
}

.checkout {
  margin-top: 10px; padding: 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
}
.checkout-line {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--ink-500); font-size: 10px;
}
.checkout-line + .checkout-line { margin-top: 6px; }
.checkout-line strong { color: var(--ink-900); font-size: 11px; }
.checkout-line.total {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line);
}
.checkout-line.total strong {
  color: var(--brand-600); font: 800 17px var(--font-mono);
}
.checkout-btn { width: 100%; margin-top: 9px; }

/* ===== About Page ===== */
.about-hero {
  margin-top: 7px; padding: 20px 16px; color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-800));
  border-radius: var(--r-xl); text-align: center;
  box-shadow: var(--shadow-brand);
}
.about-hero .auth-logo {
  width: 54px; height: 54px; margin: 0 auto 10px;
  color: var(--brand-700); background: #fff; box-shadow: none;
}
.about-hero h2 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.about-hero p { margin: 6px 0 0; color: rgba(255,255,255,.74); font-size: 10px; }
.about-hero .version {
  display: inline-flex; margin-top: 12px; padding: 4px 8px;
  color: #fff; background: rgba(255,255,255,.14);
  border-radius: var(--r-full); font: 9px var(--font-mono);
}
.about-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 11px;
}
.about-stat {
  padding: 10px 4px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
}
.about-stat strong { display: block; color: var(--brand-600); font: 800 16px/1 var(--font-mono); }
.about-stat span { display: block; margin-top: 4px; color: var(--ink-500); font-size: 9px; }

.copy-card {
  margin-top: 11px; padding: 13px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
}
.copy-card h3 { margin: 0 0 6px; font-size: 13px; }
.copy-card p { margin: 0; color: var(--ink-500); font-size: 11px; line-height: 1.65; }

.trust-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; margin-top: 9px;
}
.trust-card {
  padding: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 11px;
}
.trust-card .entry-icon { width: 26px; height: 26px; margin-bottom: 7px; }
.trust-card strong { display: block; font-size: 10px; }
.trust-card span { display: block; margin-top: 3px; color: var(--ink-500); font-size: 9px; }
.about-foot {
  margin-top: 15px; color: var(--ink-400);
  text-align: center; font: 9px var(--font-mono);
}

/* ===== Help Page ===== */
.faq-list {
  overflow: hidden; margin-top: 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
}
.faq {
  width: 100%; min-height: 48px;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; color: var(--ink-800);
  background: #fff; border-bottom: 1px solid var(--ink-100);
  text-align: left;
}
.faq:last-child { border-bottom: 0; }
.faq-number {
  width: 21px; height: 21px; display: grid; place-items: center;
  color: var(--brand-600); background: var(--brand-50);
  border-radius: 7px; font: 800 9px var(--font-mono);
}
.faq span { min-width: 0; flex: 1; font-size: 11px; font-weight: 700; }
.faq .icon { width: 14px; height: 14px; color: var(--ink-300); }
.faq-answer {
  display: block; padding: 0 12px 10px 42px;
  color: var(--ink-500); background: #fff;
  font-size: 10px; line-height: 1.55;
}

.help-steps { display: grid; gap: 7px; margin-top: 10px; }
.help-step {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px;
  background: linear-gradient(90deg,#fff,#fbfbff);
  border: 1px solid var(--line); border-radius: 11px;
}
.step-num {
  width: 23px; height: 23px; display: grid; place-items: center;
  color: #fff; background: var(--brand-500);
  border-radius: 8px; font: 800 10px var(--font-mono);
}
.help-step strong { display: block; font-size: 11px; }
.help-step span { display: block; margin-top: 2px; color: var(--ink-500); font-size: 10px; }

.contact-card {
  display: flex; align-items: center; gap: 9px;
  margin-top: 11px; padding: 11px;
  color: var(--tg); background: var(--info-bg);
  border: 1px solid #c7edf8; border-radius: 12px;
}
.contact-card .icon { width: 19px; height: 19px; }
.contact-card strong { display: block; color: var(--ink-800); font-size: 11px; }
.contact-card span { display: block; margin-top: 2px; color: var(--ink-500); font-size: 10px; }
.contact-card .icon:last-child { margin-left: auto; width: 14px; height: 14px; }

/* ===== Toast ===== */
.toast {
  position: fixed; z-index: 100;
  left: 50%; bottom: calc(100px + var(--safe-bottom));
  transform: translate(-50%, 12px);
  padding: 10px 16px; color: #fff;
  background: rgba(16,23,45,.92);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: .2s var(--ease);
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ===== Loading ===== */
.loading-overlay {
  position: fixed; z-index: 90; inset: 0;
  display: none; place-items: center;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(4px);
}
.loading-overlay.show { display: grid; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--brand-100);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Empty State ===== */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--ink-400);
}
.empty-state .empty-icon {
  width: 64px; height: 64px; margin: 0 auto 14px;
  display: grid; place-items: center;
  background: var(--brand-50); border-radius: var(--r-md);
}
.empty-state .empty-icon svg { width: 32px; height: 32px; color: var(--brand-300); }
.empty-state p { margin: 0; font-size: 13px; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ===== TG Promoted Login Card (v80.62) ===== */
.tg-promo {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px;
  cursor: pointer; user-select: none;
  color: #fff;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 55%, #1E88C7 100%);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(34, 158, 217, 0.32);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
  position: relative; overflow: hidden;
}
.tg-promo::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% -20%, rgba(255,255,255,.18), transparent 55%);
  pointer-events: none;
}
.tg-promo:active {
  transform: scale(0.985);
  box-shadow: 0 3px 10px rgba(34, 158, 217, 0.28);
}
.tg-promo-icon {
  flex: 0 0 42px; width: 42px; height: 42px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.tg-promo-icon svg { width: 24px; height: 24px; color: #229ED9; display: block; }
.tg-promo-body { flex: 1; min-width: 0; }
.tg-promo-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700;
  line-height: 1.2;
}
.tg-promo-badge {
  display: inline-block; padding: 2px 7px;
  font-size: 10px; font-weight: 800; line-height: 1.4;
  color: #B45309;
  background: linear-gradient(135deg, #FEF3C7, #FCD34D);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.tg-promo-hint {
  margin-top: 3px;
  font-size: 11px; font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.35;
}
.tg-promo-arrow {
  flex: 0 0 18px;
  font-size: 24px; font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1;
  transform: translateX(0);
  transition: transform .15s var(--ease);
}
.tg-promo:active .tg-promo-arrow { transform: translateX(2px); }

/* 在 TG 卡片下方的「或用密码登录」分隔线 */
.divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 4px 12px;
  font-size: 11px; color: var(--ink-400);
  font-weight: 500;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px;
  background: var(--line);
}

/* ===== TG 切换到密码登录（小折叠入口，v80.75）===== */
.tg-alt-switch {
  display: flex; align-items: center; gap: 9px;
  margin: 12px 0 4px;
  padding: 11px 14px;
  color: var(--ink-700);
  background: var(--bg-soft, #f4f6fb);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer; user-select: none;
  font-size: 12px; font-weight: 600;
  transition: background .15s var(--ease), transform .1s var(--ease);
}
.tg-alt-switch:active { transform: scale(0.98); background: var(--bg-soft-hover, #e9eef6); }
.tg-alt-switch .icon { width: 16px; height: 16px; color: var(--ink-500); flex: 0 0 16px; }
.tg-alt-switch span:first-of-type { flex: 1; }
.tg-alt-arrow { font-size: 18px; font-weight: 300; color: var(--ink-400); line-height: 1; }

/* ===== [v80.76] 账号合并模态（TG 同名老账号防分裂）===== */
.merge-overlay {
  position: fixed; z-index: 220; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base, 180ms) var(--ease, ease);
}
.merge-overlay.show { opacity: 1; pointer-events: auto; }
.merge-card {
  width: 340px; max-width: calc(100vw - 32px);
  padding: 24px 20px 18px;
  background: #fff; border-radius: var(--r-xl, 16px);
  box-shadow: var(--shadow-lg, 0 10px 40px rgba(0,0,0,.18));
  transform: translateY(8px); transition: transform var(--t-base, 180ms) var(--ease, ease);
}
.merge-overlay.show .merge-card { transform: translateY(0); }
.merge-icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-50, #eef4ff), #fff7f2);
  border-radius: 50%; color: var(--brand-600, #5b7fff);
}
.merge-icon svg { width: 28px; height: 28px; }
.merge-title {
  margin: 0 0 6px; font-size: 17px; font-weight: 800;
  text-align: center; color: var(--ink-800, #1a2233);
}
.merge-sub {
  margin: 0 0 10px; padding: 0 4px;
  text-align: center; color: var(--ink-700, #3b475c);
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.merge-hint {
  margin: 0 0 14px; padding: 0 4px;
  text-align: center; color: var(--ink-500, #6b7585);
  font-size: 11px; line-height: 1.5;
}
.merge-target-box {
  margin: 0 0 14px; padding: 10px 12px;
  background: var(--bg-soft, #f4f6fb);
  border: 1px solid var(--line, #e6e9ef);
  border-radius: 10px;
}
.merge-target-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; padding: 3px 0;
}
.merge-target-row + .merge-target-row { border-top: 1px solid var(--line, #e6e9ef); margin-top: 3px; padding-top: 6px; }
.merge-target-label { color: var(--ink-400, #8a93a3); font-weight: 500; }
.merge-target-row strong { color: var(--ink-800, #1a2233); font-weight: 700; }
.merge-target-bal { color: var(--brand-600, #5b7fff); font: 800 14px/1 var(--font-mono); }
.merge-pwd-field { margin-bottom: 14px; }
.merge-pwd-field .icon { color: var(--ink-400); }
.merge-confirm {
  width: 100%; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-500, #4a6cf7), var(--brand-600, #5b7fff));
  color: #fff; font-size: 14px; font-weight: 700;
  border: none; box-shadow: 0 4px 12px rgba(74, 108, 247, .25);
  cursor: pointer; transition: transform .12s var(--ease, ease), box-shadow .15s var(--ease, ease);
}
.merge-confirm:active { transform: scale(0.98); }
.merge-confirm:disabled { background: var(--ink-200, #d6dae2); box-shadow: none; cursor: not-allowed; }
.merge-cancel {
  display: block; width: 100%; margin-top: 8px; padding: 10px;
  background: transparent; border: none;
  color: var(--ink-500, #6b7585); font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: center;
}
.merge-cancel:active { color: var(--ink-700); }
.merge-cancel:disabled { opacity: .4; cursor: not-allowed; }

