:root {
  --bg: #f4f7fb;
  --bg-grad: radial-gradient(1000px 400px at 15% -5%, #e0f2fe 0%, transparent 55%),
             radial-gradient(900px 400px at 110% 0%, #dcfce7 0%, transparent 50%);
  --card: #ffffff;
  --card-border: #eef2f7;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-soft: #d1fae5;
  --blue: #3b82f6;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 30px -8px rgba(15, 23, 42, .10);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 12px -4px rgba(15, 23, 42, .08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }

.container { max-width: 920px; margin: 0 auto; padding: 24px 20px 60px; }

/* ===== Header ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 26px; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: var(--shadow-sm);
}
.brand .brand-name { font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.brand .brand-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.link-btn { color: var(--muted); font-size: 13px; padding: 8px 14px; border-radius: 8px; transition: .2s; }
.link-btn:hover { color: var(--primary); background: var(--primary-soft); }

/* ===== Panel / Card ===== */
.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 18px; }

h1 { font-size: 24px; font-weight: 700; letter-spacing: .2px; }
h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.subtitle { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ===== 卡密概览横幅 ===== */
.card-banner {
  background: linear-gradient(120deg, #0f766e, #059669 55%, #3b82f6);
  border-radius: var(--radius);
  padding: 22px 26px;
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card-banner::after {
  content: "🚶";
  position: absolute; right: 20px; top: -8px;
  font-size: 96px; opacity: .12;
}
.card-banner .b-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-banner .b-badge {
  background: rgba(255,255,255,.2); padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; backdrop-filter: blur(4px);
}
.card-banner .b-key { font-family: "SF Mono", Menlo, monospace; font-size: 13px; opacity: .85; word-break: break-all; }
.card-banner .b-stats { display: flex; gap: 28px; margin-top: 14px; flex-wrap: wrap; }
.card-banner .b-stat .v { font-size: 20px; font-weight: 700; }
.card-banner .b-stat .l { font-size: 12px; opacity: .8; }
.card-banner .b-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.35);
  transition: .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,.28); }

/* 配额进度 */
.quota-wrap { margin-top: 18px; }
.quota-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.quota-track { flex: 1; min-width: 150px; height: 10px; background: rgba(255,255,255,.25); border-radius: 5px; overflow: hidden; }
.quota-track > i { display: block; height: 100%; background: #fff; border-radius: 5px; transition: width .5s; }
.quota-num { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* PDD 提示 */
.pdd-box {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 16px;
  background: rgba(255,255,255,.14); border: 1px dashed rgba(255,255,255,.4);
  border-radius: 12px; padding: 12px 16px; font-size: 13px; color: #fff;
}
.pdd-box a { color: #fff; text-decoration: underline; word-break: break-all; font-weight: 600; }
.pdd-box.gray {
  background: #fffbeb; border-color: #fcd34d; color: #92400e;
}
.pdd-box.gray a { color: #b45309; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}
input::placeholder { color: #94a3b8; }
textarea { min-height: 110px; resize: vertical; font-family: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 22px; border: none; border-radius: 11px;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: .2s;
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 6px 16px -6px rgba(5,150,105,.5);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -6px rgba(5,150,105,.55); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn.blue { background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: 0 6px 16px -6px rgba(37,99,235,.5); }
.btn.gray { background: #eef2f7; color: #334155; box-shadow: none; }
.btn.gray:hover { background: #e2e8f0; }
.btn.danger { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 6px 16px -6px rgba(220,38,38,.5); }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }

/* 公告 */
.announce {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px;
  display: none;
}
.announce.show { display: block; }

/* 步骤/状态徽章 */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge.day { background: #dbeafe; color: #1d4ed8; }
.badge.month { background: #d1fae5; color: #047857; }
.badge.quarter { background: #ede9fe; color: #6d28d9; }
.badge.year { background: #fef3c7; color: #b45309; }
.badge.quota { background: #fce7f3; color: #be185d; }
.badge.active { background: #d1fae5; color: #047857; }
.badge.unused { background: #f1f5f9; color: #64748b; }
.badge.expired { background: #e2e8f0; color: #475569; }
.badge.disabled, .badge.banned { background: #fee2e2; color: #b91c1c; }
.badge.used { background: #f1f5f9; color: #475569; }

/* ===== 任务列表 ===== */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head h2::before { content: ""; display: inline-block; width: 4px; height: 18px; background: linear-gradient(var(--primary), var(--blue)); border-radius: 2px; margin-right: 10px; vertical-align: -2px; }

.task-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s;
}
.task-card:hover { box-shadow: var(--shadow); }
.task-card .tc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.task-card .tc-account { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.task-card .tc-account .avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #10b981, #3b82f6); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.task-card .tc-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.task-card .tc-meta .m-item { display: flex; flex-direction: column; gap: 2px; }
.task-card .tc-meta .m-item .k { font-size: 11px; color: #94a3b8; }
.task-card .tc-meta .m-item .v { color: var(--text); font-weight: 600; }
.task-card .tc-meta .m-item .v.warn { color: var(--warning); }

/* 绑定图标 */
.bind-icons { display: flex; gap: 22px; margin-top: 16px; }
.bind-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.bind-item .icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #e2e8f0;
  filter: grayscale(1); opacity: .45;
  transition: all .25s;
}
.bind-item.on .icon { filter: none; opacity: 1; box-shadow: 0 4px 14px -4px rgba(16,185,129,.5); }
.bind-item.on.wechat .icon { border-color: #86efac; }
.bind-item.on.alipay .icon { border-color: #93c5fd; }
.bind-item.on.qq .icon { border-color: #67e8f9; }

/* 操作按钮 */
.tc-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 48px 20px; }
.empty .big { font-size: 52px; margin-bottom: 14px; }
.empty h3 { font-size: 18px; margin-bottom: 8px; }
.empty p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
  display: none; align-items: center; justify-content: center; z-index: 100;
  padding: 16px; overflow: auto; backdrop-filter: blur(3px);
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 18px;
  width: 100%; max-width: 540px; padding: 28px; max-height: 92vh; overflow: auto;
  box-shadow: 0 24px 60px -12px rgba(15,23,42,.35);
  animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal h3 { margin-bottom: 20px; font-size: 18px; font-weight: 700; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 20px; }
.schedule-fields { display: none; }
.schedule-fields.show { display: block; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.toolbar .form-group { flex: 1; min-width: 130px; }

/* 日志 */
.log-item { padding: 11px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.log-item:last-child { border-bottom: none; }
.log-item .lg-time { color: #94a3b8; font-size: 12px; }

/* 教程 */
.tutorial-list { list-style: none; }
.tutorial-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.tutorial-list li:last-child { border-bottom: none; }
.tutorial-list .num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary-soft); color: #047857;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.after-sales {
  display: flex; align-items: center; gap: 14px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px;
  padding: 14px 16px; margin-top: 16px;
}

/* 其他 */
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hidden { display: none !important; }
.alert { padding: 12px 16px; border-radius: 11px; margin-bottom: 14px; font-size: 14px; display: none; }
.alert.show { display: block; }
.alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.footer-note { text-align: center; color: #94a3b8; font-size: 12px; margin-top: 32px; }

/* ===== 三端自适应 ===== */
@media (max-width: 768px) {
  .container { max-width: 100%; }
  .card-banner .b-stats { gap: 18px; }
  .card-banner::after { font-size: 72px; }
  .tc-meta { gap: 14px; }
  .tc-meta .m-item { flex: 1 1 45%; }
}

@media (max-width: 640px) {
  .container { padding: 14px 12px 40px; }
  .panel, .card-banner { padding: 18px; }
  .task-card { padding: 16px; }
  .brand-name { font-size: 18px; }
  .card-banner .b-stats { gap: 16px; }
  .card-banner .b-stat .v { font-size: 17px; }
  .bind-icons { gap: 16px; }
  .bind-item .icon { width: 38px; height: 38px; }
  .tc-actions .btn { flex: 1 1 30%; }
  .quota-bar { gap: 10px; }
  .section-head { margin-top: 22px; }
  .toolbar .form-group { min-width: 100%; }
}

@media (max-width: 400px) {
  .card-banner .b-actions .btn-ghost { flex: 1; justify-content: center; }
  .tc-meta .m-item { flex: 1 1 100%; }
  .tc-top { flex-direction: column; align-items: flex-start; }
}

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

/* ===== Zepp 注册与微信绑定 ===== */
.zepp-setup-open {
  border: 1px solid rgba(255,255,255,.35); background: linear-gradient(135deg, #10b981, #0f766e); color: #fff !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 17px; font-size: 14px; font-weight: 750; cursor: pointer; white-space: nowrap;
  box-shadow: 0 9px 22px -9px rgba(5,150,105,.75);
}
.zepp-setup-open:hover { color: #fff; background: linear-gradient(135deg, #059669, #0f766e); border-color: rgba(255,255,255,.5); transform: translateY(-1px); }
.setup-guide-btn {
  margin-top: 18px; min-height: 50px; color: #fff !important; font-size: 15px;
  background: linear-gradient(135deg, #2563eb, #0f766e); border: 0;
  box-shadow: 0 12px 28px -10px rgba(37,99,235,.7);
}
.setup-guide-btn:hover { color: #fff !important; background: linear-gradient(135deg, #1d4ed8, #0f766e); }
.setup-hot-entry {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px;
  margin-top: 18px; padding: 22px 24px; border: 1px solid #a7f3d0; border-radius: 17px;
  background: linear-gradient(130deg, rgba(236,253,245,.98), rgba(239,246,255,.98));
  box-shadow: 0 12px 30px -16px rgba(5,150,105,.55);
}
.setup-hot-entry::after { content: '◈'; position: absolute; right: 200px; top: -42px; color: rgba(16,185,129,.07); font-size: 150px; line-height: 1; pointer-events: none; }
.setup-hot-copy { position: relative; z-index: 1; }
.setup-hot-badge { display: inline-flex; align-items: center; gap: 7px; color: #047857; font-size: 11px; font-weight: 800; letter-spacing: .4px; }
.setup-hot-badge span { padding: 2px 7px; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#f97316,#ef4444); font-size: 9px; box-shadow: 0 4px 10px -4px rgba(239,68,68,.7); }
.setup-hot-entry h2 { margin: 7px 0 5px; font-size: 18px; color: #0f172a; }
.setup-hot-entry p { max-width: 580px; color: #64748b; font-size: 12px; line-height: 1.7; }
.setup-hot-points { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: #047857; font-size: 11px; font-weight: 650; }
.setup-hot-button {
  position: relative; z-index: 1; min-width: 192px; padding: 13px 18px; border: 0; border-radius: 13px; cursor: pointer;
  color: #fff; background: linear-gradient(135deg,#10b981,#0f766e); box-shadow: 0 10px 22px -10px rgba(5,150,105,.75);
  display: grid; grid-template-columns: 24px 1fr; column-gap: 7px; text-align: left; transition: .2s;
}
.setup-hot-button:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(5,150,105,.8); }
.setup-hot-button > span { grid-row: 1 / 3; align-self: center; font-size: 19px; }
.setup-hot-button b { font-size: 13px; line-height: 1.4; }
.setup-hot-button small { color: rgba(255,255,255,.72); font-size: 9.5px; }
#modal-zepp-setup { padding: 24px; }
.setup-modal {
  position: relative; max-width: 880px; padding: 0; max-height: min(92vh, 760px);
  border: 1px solid rgba(255,255,255,.8); border-radius: 24px; overflow: auto;
  box-shadow: 0 30px 90px -24px rgba(15,23,42,.48);
}
.modal.setup-modal {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.setup-x {
  position: absolute; z-index: 3; top: 16px; right: 16px; width: 34px; height: 34px;
  border: 1px solid #e2e8f0; border-radius: 50%; background: rgba(255,255,255,.92);
  color: #64748b; font-size: 22px; line-height: 1; cursor: pointer; transition: .2s;
}
.setup-x:hover { color: #0f172a; background: #fff; transform: rotate(4deg); }
.setup-shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 610px; }
.setup-aside {
  position: relative; overflow: hidden; padding: 38px 30px 30px;
  background: linear-gradient(155deg, #0f766e 0%, #059669 48%, #2563eb 140%); color: #fff;
}
.setup-aside::before, .setup-aside::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.setup-aside::before { width: 220px; height: 220px; right: -110px; top: -90px; background: rgba(255,255,255,.09); }
.setup-aside::after { width: 180px; height: 180px; left: -100px; bottom: -90px; background: rgba(147,197,253,.13); }
.setup-brand { position: relative; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .4px; }
.setup-brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.24); font-size: 17px;
}
.setup-aside h3 { position: relative; margin: 30px 0 12px; color: #fff; font-size: 25px; line-height: 1.35; letter-spacing: .2px; }
.setup-lead { position: relative; color: rgba(255,255,255,.76); font-size: 13px; line-height: 1.8; }
.setup-flow { position: relative; margin-top: 32px; display: flex; flex-direction: column; gap: 2px; }
.setup-step { position: relative; display: flex; gap: 12px; padding: 0 0 24px; }
.setup-step:not(:last-child)::after {
  content: ''; position: absolute; left: 14px; top: 32px; bottom: 2px; width: 1px; background: rgba(255,255,255,.22);
}
.setup-step > span {
  flex: 0 0 29px; height: 29px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); font-size: 12px; font-weight: 750;
}
.setup-step.active > span { background: #fff; color: #047857; box-shadow: 0 7px 18px -8px rgba(0,0,0,.4); }
.setup-step b { display: block; font-size: 14px; color: #fff; margin: 2px 0 3px; }
.setup-step p { margin: 0; color: rgba(255,255,255,.66); font-size: 11.5px; line-height: 1.55; }
.setup-safe {
  position: absolute; z-index: 1; left: 30px; right: 30px; bottom: 28px; display: flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,.68); font-size: 11px;
}
.setup-safe span { color: #a7f3d0; font-weight: 800; }
.setup-main { padding: 38px 40px 28px; background: #fff; }
.setup-main-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-right: 36px; }
.setup-kicker { display: block; color: #059669; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; margin-bottom: 4px; }
.setup-main-head h4 { font-size: 20px; line-height: 1.35; color: #0f172a; }
.setup-time { flex: 0 0 auto; color: #64748b; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; padding: 5px 10px; font-size: 11px; }
.setup-form-card { padding: 22px; border: 1px solid #e8eef5; border-radius: 17px; background: #fbfdff; }
.setup-form-card .form-group { margin-bottom: 16px; }
.setup-form-card label { color: #334155; font-size: 13px; }
.setup-form-card label small { float: right; color: #94a3b8; font-weight: 500; }
.setup-form-card input { background: #fff; padding: 11px 13px; border-radius: 10px; }
.setup-password-wrap { position: relative; }
.setup-password-wrap input { padding-right: 56px; }
.setup-password-wrap button {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent;
  color: #64748b; font-size: 12px; font-weight: 650; cursor: pointer; padding: 5px;
}
.setup-code-row { padding-top: 15px; border-top: 1px dashed #dbe3ec; }
.setup-captcha-line { display: grid; grid-template-columns: 120px minmax(0,1fr) auto; align-items: stretch; gap: 9px; }
.setup-captcha {
  min-height: 44px; border: 1px solid #dbe3ec; border-radius: 10px; background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.setup-captcha img { display: block; width: 120px; height: 50px; object-fit: contain; }
.setup-refresh-captcha {
  border: 1px solid #dbe3ec; border-radius: 10px; padding: 0 11px; background: #fff; color: #475569;
  font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap;
}
.setup-refresh-captcha:hover { border-color: #86efac; color: #047857; }
.setup-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin-top: 4px; }
.setup-actions .btn { min-height: 44px; padding: 10px 13px; font-size: 13px; }
.setup-primary { background: linear-gradient(135deg, #10b981, #0f766e); }
.setup-secondary { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; box-shadow: none; }
.setup-secondary:hover { background: #dbeafe; box-shadow: none; }
.setup-check {
  display: flex !important; align-items: flex-start; gap: 10px; margin: 15px 0 0; padding: 11px 12px;
  border-radius: 11px; background: #f0fdf4; border: 1px solid #dcfce7; cursor: pointer;
}
.setup-check input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; accent-color: #059669; }
.setup-check span { min-width: 0; }
.setup-check b { display: block; color: #166534; font-size: 12px; line-height: 1.4; }
.setup-check small { display: block; margin-top: 2px; color: #4d7c5d; font-size: 10.5px; font-weight: 500; line-height: 1.5; }
.setup-sync-card { background: #eff6ff; border-color: #dbeafe; }
.setup-sync-card input { accent-color: #2563eb; }
.setup-sync-card b { color: #1e40af; }
.setup-sync-card small { color: #64748b; }
.setup-sync-card em { display: inline-block; margin-left: 5px; padding: 1px 6px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 9px; font-style: normal; vertical-align: 1px; }
.setup-alert { margin: 12px 0 0; font-size: 12px; padding: 10px 12px; }
.setup-qr, .setup-result { margin-top: 14px; border-radius: 16px; border: 1px solid #dbeafe; background: linear-gradient(135deg, #f8fbff, #f0fdf9); }
.setup-qr { padding: 18px; display: grid; grid-template-columns: 1fr 170px; gap: 18px; align-items: center; }
.setup-qr-copy p { color: #64748b; font-size: 12px; line-height: 1.7; margin-top: 6px; }
.setup-band-state { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 9px 10px; border-radius: 10px; text-align: left; }
.setup-band-state > span { flex: 0 0 23px; width: 23px; height: 23px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; }
.setup-band-state b, .setup-band-state small { display: block; line-height: 1.45; }
.setup-band-state b { font-size: 11px; }
.setup-band-state small { margin-top: 2px; font-size: 9.5px; }
.setup-band-state.ok { color: #166534; background: #dcfce7; }
.setup-band-state.ok > span { color: #fff; background: #16a34a; }
.setup-band-state.bad { color: #9a3412; background: #ffedd5; }
.setup-band-state.bad > span { color: #fff; background: #ea580c; }
.setup-qr-badge { display: inline-block; color: #1d4ed8; background: #dbeafe; border-radius: 999px; padding: 3px 9px; font-size: 10px; font-weight: 750; margin-bottom: 8px; }
.setup-qr-image { width: 170px; height: 170px; padding: 7px; border-radius: 13px; background: #fff; border: 1px solid #e2e8f0; }
.setup-qr-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.setup-result-title { color: #0f172a; font-size: 14px; font-weight: 750; }
.setup-result { padding: 16px; }
.setup-result-head { display: flex; align-items: center; gap: 10px; }
.setup-result-head > span { width: 31px; height: 31px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #dcfce7; color: #15803d; font-weight: 900; }
.setup-result-head small { display: block; color: #94a3b8; font-size: 11px; }
.setup-bindings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; }
.setup-chip { display: grid; grid-template-columns: 25px 1fr; align-items: center; column-gap: 7px; padding: 9px; border-radius: 11px; border: 1px solid #e2e8f0; background: #fff; }
.setup-chip i { grid-row: 1 / 3; width: 25px; height: 25px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 800; background: #f1f5f9; color: #64748b; }
.setup-chip span { font-size: 11px; color: #475569; line-height: 1.2; }
.setup-chip b { font-size: 10px; color: #94a3b8; line-height: 1.2; }
.setup-chip.ok { border-color: #bbf7d0; background: #f0fdf4; }
.setup-chip.ok i { background: #dcfce7; color: #15803d; }
.setup-chip.ok b { color: #15803d; }
.setup-chip.bad { border-color: #fed7aa; background: #fffaf5; }
.setup-chip.bad i { background: #ffedd5; color: #c2410c; }
.setup-chip.bad b { color: #c2410c; }
.setup-device { margin-top: 10px; border-radius: 9px; padding: 8px 10px; font-size: 11px; }
.setup-device.ok { color: #166534; background: #dcfce7; }
.setup-device.bad { color: #b91c1c; background: #fee2e2; }
.setup-result-note { color: #64748b; font-size: 11px; line-height: 1.6; margin-top: 10px; }
.setup-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.setup-detect, .setup-close { border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 650; padding: 8px 0; }
.setup-detect { color: #047857; }
.setup-close { color: #94a3b8; }
.setup-detect:hover { color: #065f46; }
.setup-close:hover { color: #475569; }

@media (max-width: 760px) {
  .setup-hot-entry { grid-template-columns: 1fr; gap: 15px; padding: 19px; }
  .setup-hot-button { width: 100%; min-width: 0; justify-content: center; }
  #modal-zepp-setup { padding: 10px; align-items: flex-start; }
  .modal.setup-modal {
    height: auto;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    border-radius: 20px;
  }
  .setup-shell { display: block; min-height: 0; }
  .setup-aside { padding: 25px 22px 20px; }
  .setup-aside h3 { margin: 18px 0 7px; font-size: 21px; }
  .setup-lead { font-size: 12px; padding-right: 24px; }
  .setup-flow { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .setup-step { display: block; padding: 0; }
  .setup-step:not(:last-child)::after, .setup-step p { display: none; }
  .setup-step > span { width: 25px; height: 25px; margin-bottom: 6px; }
  .setup-step b { font-size: 11px; }
  .setup-safe { display: none; }
  .setup-main { padding: 24px 18px 20px; }
  .setup-main-head { margin-bottom: 16px; padding-right: 22px; }
  .setup-main-head h4 { font-size: 18px; }
  .setup-time { display: none; }
  .setup-form-card { padding: 16px; }
  .setup-actions { grid-template-columns: 1fr; }
  .setup-primary { order: -1; }
  .setup-captcha-line { grid-template-columns: 104px minmax(0,1fr); }
  .setup-captcha { grid-row: 1 / 3; }
  .setup-captcha img { width: 104px; }
  .setup-refresh-captcha { min-height: 36px; }
  .setup-qr { grid-template-columns: 1fr; text-align: center; }
  .setup-qr-image { margin: 0 auto; }
}

@media (max-width: 390px) {
  .setup-bindings { grid-template-columns: 1fr; }
  .setup-footer { align-items: stretch; flex-direction: column; gap: 0; }
}

/* ===== 管理后台 ===== */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid #eef2f7; }
.tab { padding: 10px 18px; cursor: pointer; font-size: 14px; color: var(--muted); background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); font-weight: 600; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); }
.stat-card .val { font-size: 26px; font-weight: 700; }
.stat-card .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.toolbar select, .toolbar input { width: auto; padding: 10px 12px; font-size: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 12px; text-align: left; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; background: #f8fafc; }
tr:hover td { background: #f8fafc; }

.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; }
.pagination button { padding: 8px 14px; border-radius: 9px; border: 1px solid #e2e8f0; background: #fff; color: var(--text); cursor: pointer; font-size: 14px; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

.keys-box { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 12px; padding: 14px; max-height: 260px; overflow: auto; font-family: "SF Mono", Menlo, monospace; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.keys-box #gen-keys { white-space: pre-wrap; word-break: break-all; line-height: 1.9; }

/* ===== 壁纸背景（用户端） ===== */
body.wallpaper {
  background: url('/img/bg1.jpg') center/cover fixed no-repeat;
}
body.wallpaper::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.68) 0%, rgba(255,255,255,.55) 45%, rgba(255,255,255,.66) 100%);
}
body.wallpaper .container { position: relative; z-index: 1; }
body.wallpaper .panel {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 44px -14px rgba(30,41,59,.22);
}
body.wallpaper .task-card { background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }

/* ===== 简介 Hero ===== */
.hero { text-align: center; padding: 18px 14px 6px; }
.hero .hero-logo { font-size: 56px; line-height: 1; filter: drop-shadow(0 8px 20px rgba(16,185,129,.35)); }
.hero h1 {
  font-size: 30px; font-weight: 800; margin: 12px 0 8px; letter-spacing: 1px;
  background: linear-gradient(120deg, #0f766e, #059669 50%, #3b82f6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero .hero-sub { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 15px; line-height: 1.9; }
.hero .chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.hero .chip {
  padding: 7px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--card-border);
  font-size: 13px; color: #475569; box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; gap: 5px;
}

/* ===== 温馨提醒 ===== */
.reminder {
  margin-top: 16px; border-radius: 16px; padding: 18px 22px;
  background: linear-gradient(135deg, #fffbeb, #fefce8);
  border: 1px solid #fde68a; box-shadow: var(--shadow-sm);
}
.reminder .rem-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: #92400e; margin-bottom: 8px; }
.reminder ul { list-style: none; }
.reminder li { display: flex; gap: 8px; font-size: 13.5px; color: #78350f; padding: 4px 0; line-height: 1.7; }
.reminder li::before { content: '✨'; flex-shrink: 0; }

/* ===== 弹窗升级 ===== */
.modal {
  border-radius: 20px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 24px; margin: -28px -28px 20px;
  background: linear-gradient(120deg, #0f766e, #059669 50%, #3b82f6);
  color: #fff;
}
.modal-head .mh-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.modal-head h3 { margin: 0; font-size: 17px; color: #fff; font-weight: 700; }
.modal-head .mh-sub { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 1px; }
.modal .btn-row { gap: 12px; }

/* 空状态丰富 */
.empty .big { filter: drop-shadow(0 10px 24px rgba(16,185,129,.3)); }
.empty .empty-tips { margin-top: 14px; display: inline-flex; flex-direction: column; gap: 6px; text-align: left; color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 24px; }
  .modal-head { margin: -18px -18px 18px; }
}

/* ===== 广告 ===== */
.ad-banner { margin-top: 16px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; border: 1px solid var(--card-border); }
.ad-banner img { display: block; width: 100%; }
body.wallpaper .ad-banner { background: #fff; }

/* 手环未绑定警告 + 手环点亮 */
.band-warn {
  margin-top: 12px; background: #fffbeb; border: 1px solid #fde68a;
  color: #92400e; border-radius: 10px; padding: 9px 14px; font-size: 13px;
}
.bind-item.on.band .icon { border-color: #6ee7b7; }

/* ===== 免费体验页 ===== */
.free-hero { padding-top: 22px; }

/* 使用说明（白底黑字） */
.free-guide {
  position: relative; overflow: hidden; color: #1e293b;
  background: #fff; border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
body.wallpaper .free-guide {
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 44px -14px rgba(30,41,59,.2);
}
.free-guide .fg-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857;
  padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
  margin-bottom: 14px;
}
.free-guide h2 { margin: 0 0 16px; color: #0f172a; font-size: 21px; }
.free-guide .fg-steps { display: flex; flex-direction: column; gap: 14px; }
.free-guide .fg-step { display: flex; gap: 12px; align-items: flex-start; }
.free-guide .fg-step .fg-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #3b82f6); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; box-shadow: 0 4px 12px -3px rgba(16,185,129,.45);
}
.free-guide .fg-step .fg-step-body { flex: 1; }
.free-guide .fg-step .fg-step-body b { display: block; color: #0f172a; font-size: 15px; margin-bottom: 3px; }
.free-guide .fg-step .fg-step-body p { margin: 0; color: #475569; font-size: 13.5px; line-height: 1.8; }
.free-guide .fg-tutorial {
  margin-top: 18px; width: 100%; text-align: center;
  background: linear-gradient(135deg, #0f766e, #059669); color: #fff; font-weight: 700;
  box-shadow: 0 10px 24px -8px rgba(5,150,105,.55);
}
.free-guide .fg-tutorial:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(5,150,105,.65); }

.free-exec .form-group input { display: block; width: 100%; }
.free-auto-buy {
  margin-top: 12px; width: 100%; text-align: center;
  background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; font-weight: 700;
  box-shadow: 0 10px 24px -8px rgba(245,158,11,.55); text-decoration: none;
}
.free-auto-buy:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 12px 26px -8px rgba(245,158,11,.65); }

/* 滚动展示 */
.scroll-box {
  margin-top: 18px; background: #fff; border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
body.wallpaper .scroll-box { background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
.scroll-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; font-size: 13px; font-weight: 600; color: var(--text);
  border-bottom: 1px solid #f1f5f9; background: linear-gradient(120deg, #ecfdf5, #eff6ff);
}
.scroll-dot {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #059669; font-weight: 700; letter-spacing: 1px;
}
.scroll-dot::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: #10b981;
  animation: dotPulse 1.2s ease-in-out infinite;
}
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.scroll-viewport { height: 56px; overflow: hidden; position: relative; display: flex; align-items: center; padding: 0 14px; }
.scroll-track { width: 100%; }
.scroll-viewport .scroll-item { animation: itemFade .5s ease; }
@keyframes itemFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.scroll-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px; font-size: 14px; color: #1e293b; font-weight: 500;
}
.scroll-item .si-icon {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #10b981, #3b82f6); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.scroll-item .si-time { margin-left: auto; flex-shrink: 0; color: #94a3b8; font-size: 11px; }

/* 免费完成弹窗 */
.done-body { padding: 4px 2px 2px; }
.done-ok { display: flex; gap: 12px; align-items: center; padding: 4px 0 16px; }
.done-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: #ecfdf5; display: inline-flex; align-items: center; justify-content: center; font-size: 24px;
}
.done-msg { font-size: 14px; line-height: 1.9; color: var(--text); }
.done-promo {
  background: linear-gradient(135deg, #fff7ed, #fef3c7); border: 1px solid #fde68a;
  border-radius: 14px; padding: 16px 16px 18px; margin-top: 4px;
}
.done-promo .promo-tag {
  display: inline-block; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.done-promo .promo-title { font-size: 15px; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.done-promo .promo-content { font-size: 13px; color: #92400e; line-height: 1.8; white-space: pre-line; }
#btn-done-buy {
  background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff;
  font-weight: 700; box-shadow: 0 8px 18px -6px rgba(245,158,11,.5); text-align: center;
}

/* ===== 复刻版补充：Web 端无法生成微信二维码时，改用文本指引展示 ===== */
.setup-qr:has(.setup-qr-text) { grid-template-columns: 1fr; }
.setup-qr-image:has(.setup-qr-text) {
  width: auto; height: auto; max-width: 100%; padding: 12px 14px;
  background: #f8fafc; border-style: dashed;
}
.setup-qr-text {
  font-size: 12px; line-height: 1.9; color: #475569;
  white-space: pre-wrap; word-break: break-word; text-align: left;
}

/* ===== 复刻版补充：登录成功标记 ===== */
.setup-qr-badge.setup-qr-badge-ok { background: #dcfce7; color: #15803d; }

/* ===== 复刻版补充：登录成功后的下一步提示 ===== */
.setup-next-hint {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: #eff6ff; color: #1d4ed8; font-size: 12px; line-height: 1.7;
  border: 1px dashed #bfdbfe;
}
