/* 虚拟主机销售系统 通用样式 */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warn: #d97706;
  --bg: #f5f7fb;
  --card: #fff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { background: #f5f7fb; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.container { width: 1120px; max-width: calc(100% - 32px); margin: 0 auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
/* 管理员以用户身份浏览时的顶部提示条 */
.impersonate-bar { background: #1e3a8a; color: #fff; font-size: 13px; }
.impersonate-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.impersonate-bar b { color: #fde68a; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-size: 20px; font-weight: 700; color: var(--primary); }
.nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.user-chip { color: var(--muted); }
.main { padding: 24px 0 48px; min-height: 70vh; }
.footer { border-top: 1px solid var(--line); background: #fff; padding: 20px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* 通用组件 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font-size: 14px; cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; }
.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; overflow-wrap: anywhere; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.tag { display: inline-block; padding: 2px 8px; background: #eef2ff; color: #4338ca; border-radius: 20px; font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.small { font-size: 12px; }
.text-error { color: var(--danger); }
.text-success { color: var(--success); }
.nav-badge { display: inline-block; min-width: 18px; padding: 1px 5px; margin-left: 3px; border-radius: 10px; background: #eef2ff; color: #4338ca; font-size: 11px; font-weight: 600; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-head h2 { margin: 0; font-size: 21px; }
.account-chip { font-size: 13px; color: var(--muted); }
.account-chip b { color: var(--text); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel h3 { margin: 0 0 14px; font-size: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 首页 */
.hero { text-align: center; padding: 36px 16px 28px; }
.hero h1 { margin: 0 0 8px; font-size: 34px; color: var(--primary); }
.hero p { margin: 4px 0; color: var(--muted); }
.hero-sub { font-size: 13px; }
.section-title { font-size: 20px; margin: 12px 0 16px; }
.grid.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.product-card { padding: 20px; display: flex; flex-direction: column; transition: .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.09); }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.card-head h3 { margin: 0; font-size: 18px; }
.desc { color: var(--muted); font-size: 13px; min-height: 40px; }
.price { font-size: 32px; color: var(--danger); font-weight: 700; margin: 6px 0 12px; }
.price .cur { font-size: 16px; }
.price .unit { font-size: 13px; color: var(--muted); font-weight: 400; }
.specs { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.specs li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.specs b { color: var(--text); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.stock { font-size: 12px; color: var(--muted); }

/* ===== 首页介绍落地页 ===== */
.lp-hero { background: var(--primary-tint); border-radius: 20px; padding: 0; overflow: hidden; }
.lp-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 54px 48px; }
.lp-hero-copy { flex: 1 1 480px; min-width: 0; }
.lp-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: #fff; border: 1px solid var(--primary-soft); border-radius: 30px; font-size: 12.5px; color: var(--primary-dark); box-shadow: 0 2px 8px rgba(37,99,235,.06); }
.lp-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.15); }
.lp-hero h1 { margin: 18px 0 10px; font-size: 42px; line-height: 1.2; color: var(--primary-dark); font-weight: 800; letter-spacing: .5px; }
.lp-hero-desc { margin: 0 0 6px; font-size: 17px; color: #334155; }
.lp-hero-sub { margin: 0; font-size: 14px; color: #64748b; }
.lp-hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.lp-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px; border-radius: 11px; font-size: 15px; font-weight: 600; transition: .15s; }
.lp-btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 18px var(--primary-soft); }
.lp-btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 11px 24px var(--primary-soft); }
.lp-btn-ghost { background: #fff; color: var(--primary-dark); border: 1px solid var(--primary-soft); }
.lp-btn-ghost:hover { background: var(--primary-tint); color: var(--primary-dark); }
.lp-btn-lg { padding: 14px 36px; font-size: 16px; }
.lp-hero-art { flex: 0 1 340px; display: flex; justify-content: center; }
.lp-hero-art svg { width: 100%; max-width: 320px; height: auto; }

.lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 8px; }
.lp-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 10px; text-align: center; box-shadow: var(--shadow); }
.lp-stat-num { font-size: 22px; font-weight: 800; color: var(--primary); }
.lp-stat-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.lp-section { padding: 44px 0 8px; }
.lp-section-alt { background: #f7f9fd; border-radius: 20px; padding-left: 24px; padding-right: 24px; }
.lp-sec-head { text-align: center; margin-bottom: 30px; }
.lp-sec-title { font-size: 28px; margin: 0 0 8px; color: var(--primary-dark); font-weight: 800; }
.lp-sec-sub { margin: 0; color: var(--muted); font-size: 14px; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-feature { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px; box-shadow: var(--shadow); transition: .2s; }
.lp-feature:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.08); border-color: var(--primary-soft); }
.lp-feature-ico { width: 46px; height: 46px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.lp-feature-ico svg { width: 24px; height: 24px; }
.lp-feature h3 { margin: 0 0 8px; font-size: 17px; }
.lp-feature p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; }

.lp-steps { display: flex; align-items: flex-start; justify-content: center; gap: 10px; flex-wrap: nowrap; }
.lp-step { flex: 1 1 0; text-align: center; min-width: 0; }
.lp-step-num { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px var(--primary-soft); }
.lp-step h3 { margin: 0 0 6px; font-size: 16px; }
.lp-step p { margin: 0; color: var(--muted); font-size: 13px; }
.lp-step-arrow { color: var(--primary); opacity: .45; font-size: 24px; font-weight: 700; margin-top: 14px; flex: 0 0 auto; }

.lp-faq { max-width: 780px; margin: 0 auto; }
.lp-faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 0 18px; box-shadow: var(--shadow); }
.lp-faq summary { cursor: pointer; padding: 16px 0; font-size: 15px; font-weight: 600; color: #1f2937; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: '+'; font-size: 20px; color: var(--primary); font-weight: 400; }
.lp-faq details[open] summary::after { content: '−'; }
.lp-faq details p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }

.lp-cta { text-align: center; margin: 48px 0 8px; padding: 46px 24px; background: #2563eb; border-radius: 20px; color: #fff; }
.lp-cta h2 { margin: 0 0 10px; font-size: 28px; }
.lp-cta p { margin: 0 0 24px; color: #dbeafe; font-size: 15px; }
.lp-cta .lp-btn-primary { background: #fff; color: #1d4ed8; box-shadow: 0 8px 18px rgba(0,0,0,.15); }
.lp-cta .lp-btn-primary:hover { color: #1e40af; }

/* 表单 */
.form label, .field label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 5px; }
.form input, .form select, .form textarea, .field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; color: var(--text);
}
.form input:focus, .field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form .btn-block { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field-group { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.field-group h3 { margin: 0 0 10px; font-size: 15px; }
.checkbox-field { display: flex; align-items: center; }
.checkbox-field label { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: auto; }
.field-tip { color: var(--muted); font-size: 12px; }

/* ===== 认证页（登录/注册/找回/重置） ===== */
.auth-scene {
  position: relative;
  border-radius: 22px;
  background: #eef2fb;
  padding: 38px 18px 40px;
  margin: 6px 0 10px;
  overflow: hidden;
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px; margin: 0 auto;
  background: #fff; border-radius: 20px; padding: 30px 26px 26px;
  box-shadow: 0 18px 44px rgba(37,99,235,.13), 0 3px 10px rgba(0,0,0,.04);
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-logo {
  width: 58px; height: 58px; margin: 0 auto 13px;
  border-radius: 17px; display: flex; align-items: center; justify-content: center;
  background: #2563eb;
  box-shadow: 0 8px 20px rgba(37,99,235,.32); color: #fff;
}
.auth-logo svg { width: 30px; height: 30px; }
.auth-brand h1 { font-size: 21px; margin: 0 0 5px; font-weight: 700; letter-spacing: .5px; }
.auth-brand p { color: var(--muted); font-size: 13px; margin: 0; }
.auth-title { font-size: 18px; margin: 0 0 4px; text-align: center; font-weight: 700; }
.auth-subtitle { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 22px; }

.auth-field { margin-bottom: 17px; }
.auth-field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: #374151; }
.input-wrap { position: relative; }
.input-wrap .ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: #a1a7b3; display: flex; pointer-events: none; line-height: 0;
}
.input-wrap .ico svg { width: 17px; height: 17px; }
.input-wrap input {
  width: 100%; padding: 12px 13px 12px 41px; border: 1px solid #e6e8ee;
  border-radius: 11px; background: #f9fafc; font-size: 15px; color: var(--text);
  box-sizing: border-box; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap input::placeholder { color: #b9bec8; }
.input-wrap input:focus {
  outline: none; background: #fff; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .input-wrap { flex: 1; min-width: 0; }
.captcha-img {
  width: 118px; height: 47px; border: 1px solid #e6e8ee; border-radius: 11px;
  cursor: pointer; background: #f9fafc; flex: 0 0 auto; transition: border-color .2s;
}
.captcha-img:hover { border-color: var(--primary); }

.auth-options { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 22px; font-size: 13px; }
.remember-label { display: flex; align-items: center; gap: 7px; color: #6b7280; cursor: pointer; user-select: none; }
.remember-label input { position: absolute; opacity: 0; width: 0; height: 0; }
.remember-label .box {
  width: 17px; height: 17px; border: 1.5px solid #cbd2dc; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center; transition: .15s; flex: 0 0 auto;
}
.remember-label .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.remember-label input:checked + .box { background: var(--primary); border-color: var(--primary); }
.remember-label input:checked + .box svg { opacity: 1; }
.remember-label input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
.forgot-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.forgot-link:hover { text-decoration: underline; }

.auth-submit {
  width: 100%; padding: 13px; border: none; border-radius: 11px; cursor: pointer;
  background: #2563eb; color: #fff;
  font-size: 16px; font-weight: 600; letter-spacing: .5px;
  box-shadow: 0 8px 18px rgba(37,99,235,.28); transition: transform .15s, box-shadow .15s;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(37,99,235,.36); }
.auth-submit:active { transform: translateY(0); }
.auth-footer {
  text-align: center; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid #f0f1f4; font-size: 13px; color: var(--muted);
}
.auth-footer a { color: var(--primary); font-weight: 600; margin-left: 3px; }
.auth-tip { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 0 0 20px; text-align: center; }
.demo-reset {
  margin-top: 16px; padding: 12px 13px; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 10px; font-size: 12px; line-height: 1.7; word-break: break-all; color: #92400e;
}
.demo-reset a { color: #b45309; }

/* 信息表 */
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.info-table td:first-child { width: 140px; color: var(--muted); }
.amount-line { margin: 16px 0; font-size: 15px; }
.amount-line b { color: var(--danger); font-size: 20px; }
.amount { color: var(--danger); font-size: 20px; font-weight: 700; }

/* 支付页 */
.pay-box { max-width: 560px; margin: 0 auto; text-align: center; }
.pay-box .info-table { text-align: left; margin-bottom: 16px; }
.qr-wrap { margin: 10px auto; }
.qr { width: 220px; height: 220px; border: 1px solid var(--line); padding: 6px; background: #fff; border-radius: 8px; }
.tip { color: var(--muted); font-size: 13px; }
.pay-msg { margin: 12px 0; font-size: 14px; color: var(--primary); }
.pay-links { display: flex; justify-content: center; gap: 24px; font-size: 13px; margin-top: 12px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { background: #f9fafb; color: var(--muted); font-weight: 600; }
.data-table tr:hover td { background: #fafbff; }
.data-table .ops { display: flex; align-items: center; gap: 12px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; background: #f3f4f6; color: #374151; }
.badge-0 { background: #fef3c7; color: #92400e; }
.badge-1, .badge-2 { background: #dbeafe; color: #1e40af; }
.badge-3 { background: #dcfce7; color: #166534; }
.badge-4 { background: #fee2e2; color: #991b1b; }
.badge-5, .badge-6 { background: #f3f4f6; color: #6b7280; }
.badge-level { padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.badge-level.info { background: #dbeafe; color: #1e40af; }
.badge-level.error { background: #fee2e2; color: #991b1b; }
.badge-level.warn { background: #fef3c7; color: #92400e; }
.action-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.test-result { font-size: 12px; }
.test-result.ok { color: var(--success); }
.test-result.err { color: var(--danger); }

/* 后台 */
.admin-body { background: #f0f2f7; }
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #111827; color: #d1d5db; flex-shrink: 0; }
.side-logo { display: block; padding: 20px 18px 2px; font-size: 18px; font-weight: 700; color: #fff; }
.side-sub { padding: 0 18px 18px; font-size: 12px; color: #9ca3af; border-bottom: 1px solid #1f2937; }
.side-nav { display: flex; flex-direction: column; padding: 12px 8px; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 11px;
  color: #d1d5db; font-size: 14px; border-radius: 8px; transition: background .15s, color .15s;
}
.side-nav a:hover { background: #1f2937; color: #fff; }
.side-nav a.active { background: #1d4ed8; color: #fff; font-weight: 600; }
.side-nav .ni { width: 18px; height: 18px; flex: 0 0 auto; opacity: .9; }
.side-nav .side-front { margin-top: 10px; border-top: 1px solid #1f2937; border-radius: 0; padding-top: 16px; color: #9ca3af; font-size: 13px; }
.sn-badge {
  margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px;
  background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; text-align: center;
}
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  min-height: 56px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px; font-size: 13px;
}
.admin-crumb { font-size: 14px; font-weight: 600; color: var(--text); }
.admin-top-actions { display: flex; align-items: center; gap: 14px; }
.admin-user { color: var(--muted); }
.admin-todo { background: #fef2f2; color: #b91c1c; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.admin-todo b { font-size: 13px; }
.admin-todo:hover { background: #fee2e2; color: #991b1b; }
.admin-burger { display: none; }
.admin-tabbar, .admin-drawer, .admin-scrim { display: none; }
.admin-content { padding: 22px 24px 48px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat-value.warn { color: var(--warn); }
.stat-link { color: var(--text); display: block; transition: border-color .15s, transform .15s; }
.stat-link:hover { color: var(--text); border-color: var(--primary); }
.stat-link:active { transform: scale(.99); }
.stat-alert { border-color: #fca5a5; background: #fff7f7; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 2px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-head h3 { margin: 0; }
.filters { display: flex; gap: 8px; font-size: 13px; }
.filters a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.filters a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.help ol { padding-left: 20px; font-size: 13px; color: var(--muted); }
.help li { margin-bottom: 8px; }
.help code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.help h3 { margin-top: 20px; }

/* ============ 响应式：平板 ============ */
@media (max-width: 900px) {
  .grid.cards { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .sidebar { width: 180px; }
}

/* ============ 响应式：手机 ============ */
@media (max-width: 640px) {
  .grid.cards, .form-grid { grid-template-columns: 1fr; }

  /* 前台导航：logo 固定 + 菜单横向滚动，避免多菜单拆字 */
  .container { width: 100%; max-width: 100%; padding-left: 12px; padding-right: 12px; }
  .header-inner { height: 54px; gap: 10px; }
  .logo { font-size: 16px; white-space: nowrap; flex: 0 0 auto; }
  .nav { gap: 14px; font-size: 13px; flex: 1 1 auto; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav > a, .nav > .nav-badge, .nav .user-chip { white-space: nowrap; flex: 0 0 auto; }
  .nav .user-chip { display: none; }
  .main { padding: 16px 12px 32px; }

  /* 首页 hero：缩小标题，避免首屏被占满 */
  .hero { padding: 24px 8px 18px; }
  .hero h1 { font-size: 26px; }
  .section-title { font-size: 18px; }
  .product-card { padding: 16px; }
  .price { font-size: 28px; }

  /* 介绍落地页：手机端纵向堆叠 */
  .lp-hero-inner { flex-direction: column; padding: 36px 22px 30px; gap: 20px; }
  .lp-hero-copy { flex: 0 0 auto; }
  .lp-hero h1 { font-size: 30px; }
  .lp-hero-desc { font-size: 15px; }
  .lp-hero-art { order: -1; flex: 0 0 auto; width: 100%; }
  .lp-hero-art svg { max-width: 230px; }
  .lp-hero-actions { justify-content: center; }
  .lp-btn { padding: 11px 22px; font-size: 14px; }
  .lp-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lp-stat { padding: 14px 8px; }
  .lp-stat-num { font-size: 19px; }
  .lp-section { padding: 36px 0 4px; }
  .lp-section-alt { padding-left: 16px; padding-right: 16px; border-radius: 16px; }
  .lp-sec-title { font-size: 23px; }
  .lp-features { grid-template-columns: 1fr; gap: 12px; }
  .lp-feature { padding: 18px; }
  .lp-feature-ico { margin-bottom: 12px; }
  /* 流程：两列网格，隐藏箭头 */
  .lp-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .lp-step-arrow { display: none; }
  .lp-step-num { width: 44px; height: 44px; font-size: 19px; margin-bottom: 10px; }
  .lp-cta { margin: 36px 0 4px; padding: 36px 18px; border-radius: 16px; }
  .lp-cta h2 { font-size: 22px; }

  /* 页面标题区：改为纵向堆叠，筛选条单独一行且可横向滚动 */
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-head h2 { font-size: 19px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .filters a { white-space: nowrap; flex: 0 0 auto; padding: 7px 12px; }

  /* 表单：加大输入框和按钮的触摸高度 */
  .form input, .form select, .form textarea, .field input, .field select, .field textarea {
    font-size: 16px; padding: 11px 12px; /* 16px 避免 iOS 自动缩放 */
  }
  .btn { min-height: 38px; }
  .auth-scene { padding: 26px 12px 30px; border-radius: 18px; }
  .auth-card { padding: 26px 20px 22px; border-radius: 17px; }
  .auth-logo { width: 54px; height: 54px; }
  .captcha-img { width: 112px; height: 46px; }
  .auth-options { font-size: 12.5px; }

  /* 后台：内容区与统计卡（导航外壳样式见文件末尾的后台移动端区块） */
  .admin-content { padding: 14px 14px calc(78px + env(safe-area-inset-bottom)); }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px; }
  .stat-value { font-size: 22px; }
  .panel { padding: 14px; }

  /* 表格卡片化：隐藏表头，每行变成独立卡片，字段名用 data-label 显示 */
  .table-wrap { overflow: visible; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tbody { padding: 0; }
  .data-table tr {
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    margin-bottom: 12px; padding: 6px 12px; box-shadow: 0 1px 4px rgba(0,0,0,.04);
  }
  .data-table tr:last-child { margin-bottom: 0; }
  .data-table td {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 9px 0; border-bottom: 1px dashed var(--line); white-space: normal;
    text-align: right; font-size: 13px; line-height: 1.5;
  }
  .data-table td:last-child { border-bottom: none; }
  .data-table td::before {
    content: attr(data-label); flex: 0 0 auto; color: var(--muted);
    font-size: 12px; font-weight: 600; text-align: left;
  }
  /* 合并单元格（暂无数据）不显示标签 */
  .data-table td[colspan] { justify-content: center; color: var(--muted); }
  .data-table td[colspan]::before { content: none; }
  .data-table .ops { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .info-table td:first-child { width: 40%; }
  .action-bar { gap: 8px; }
  .pay-links { gap: 16px; }
}

/* 超窄屏微调 */
@media (max-width: 360px) {
  .nav { gap: 8px; font-size: 12px; }
  .logo { font-size: 15px; }
  .auth-card { padding: 22px 16px 18px; }
  .auth-scene { padding: 22px 8px 26px; }
  .captcha-img { width: 104px; }
  .stat-value { font-size: 20px; }
}

/* ===================== 用户中心 ===================== */
.uc { display: grid; grid-template-columns: 232px 1fr; gap: 20px; align-items: start; }
.uc-side {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; position: sticky; top: 76px;
}
.uc-profile { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.uc-avatar {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
}
.uc-name { font-weight: 600; line-height: 1.3; }
.uc-sub { font-size: 12px; color: var(--muted); }
.uc-nav { display: flex; flex-direction: column; gap: 2px; margin: 12px 0; }
.uc-nav a { padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: 14px; }
.uc-nav a:hover { background: #f3f4f6; color: var(--primary); }
.uc-nav a.active { background: #eff6ff; color: var(--primary); font-weight: 600; }
.uc-wallet { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.uc-wallet-row { display: flex; justify-content: space-between; color: var(--muted); }
.uc-wallet-row b { color: var(--text); }

.uc-body { min-width: 0; }
.uc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.uc-head h2 { margin: 0 0 4px; font-size: 20px; }
.uc-head .btn { flex: 0 0 auto; white-space: nowrap; }
.uc-tip { color: var(--muted); font-size: 13px; margin: 0; }

.uc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.uc-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
  color: var(--text); box-shadow: var(--shadow); transition: border-color .15s;
}
.uc-stat:hover { border-color: var(--primary); color: var(--text); }
.uc-stat-warn { border-color: #fcd34d; background: #fffbeb; }
.uc-stat-label { font-size: 13px; color: var(--muted); }
.uc-stat-num { font-size: 26px; line-height: 1.25; }
.uc-stat-foot { font-size: 12px; color: var(--muted); }

.uc-panel { margin-bottom: 18px; }
.uc-panel h3 { margin-top: 0; }
.uc-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.uc-panel-head h3 { margin: 0; }
.uc-more { font-size: 13px; }

.uc-list { list-style: none; margin: 0; padding: 0; }
.uc-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.uc-list li:last-child { border-bottom: none; }

.uc-actions { white-space: nowrap; }
.uc-actions a { margin-right: 8px; font-size: 13px; }
.uc-actions a:last-child { margin-right: 0; }

.uc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.uc-tabs a { padding: 5px 12px; border-radius: 20px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.uc-tabs a span { margin-left: 2px; color: #9ca3af; }
.uc-tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.uc-tabs a.active span { color: #dbeafe; }

.uc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.uc-kv { list-style: none; margin: 0; padding: 0; }
.uc-kv li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.uc-kv li:last-child { border-bottom: none; }
.uc-kv span { color: var(--muted); }
.uc-pwd-form { max-width: 420px; }
.muted { color: var(--muted); }

@media (max-width: 900px) {
  .uc { grid-template-columns: 1fr; }
  .uc-side { position: static; }
  .uc-nav { flex-direction: row; flex-wrap: wrap; }
  .uc-stats { grid-template-columns: repeat(2, 1fr); }
  .uc-grid2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  /* 窄屏下标题与按钮改为上下排列，避免按钮文字被挤成两行 */
  .uc-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .uc-head .btn { align-self: flex-start; }
  .uc-stats { gap: 10px; }
  .uc-stat { padding: 12px; }
  .uc-stat-num { font-size: 22px; }
  .uc-list li { flex-wrap: wrap; }
}

/* ===================== 后台：服务器实时状态 ===================== */
.srv-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 16px; margin-bottom: 14px; font-size: 14px; box-shadow: var(--shadow);
}
.srv-sum-item { color: var(--muted); }
.srv-sum-item b { color: var(--text); font-size: 16px; margin-left: 2px; }
.srv-sum-item.ok b { color: var(--success); }
.srv-sum-item.err b { color: var(--danger); }
.srv-sum-item.idle b { color: #9ca3af; }
.srv-sum-spacer { flex: 1 1 auto; }
.srv-updated { color: var(--muted); font-size: 13px; }

.srv-note { color: var(--muted); font-size: 12px; margin-top: 10px; line-height: 1.7; }

.srv-cell { white-space: normal; min-width: 250px; }
.srv-state { display: flex; flex-direction: column; gap: 4px; }
.srv-hint { color: var(--muted); font-size: 12px; }
.srv-line { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.srv-meta { font-weight: 400; color: var(--muted); font-size: 12px; }
.srv-reason { color: var(--muted); font-size: 12px; line-height: 1.5; white-space: normal; }
.srv-load { color: var(--muted); font-size: 12px; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot-ok { background: var(--success); box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.dot-err { background: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,.15); }
.dot-idle { background: #9ca3af; box-shadow: 0 0 0 3px rgba(156,163,175,.15); }

.meter-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.meter-label { color: var(--muted); width: 30px; flex: 0 0 auto; }
.meter {
  position: relative; width: 84px; height: 6px; flex: 0 0 auto;
  background: #eef1f5; border-radius: 4px; overflow: hidden;
}
.meter > i { display: block; height: 100%; min-width: 3px; border-radius: 4px; background: var(--success); transition: width .4s ease; }
.meter > i.warn { background: #f59e0b; }
.meter > i.danger { background: var(--danger); }
.meter-val { color: var(--text); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .srv-cell { min-width: 0; }
  .srv-summary { gap: 10px; font-size: 13px; }
  .srv-sum-spacer { display: none; }
}

/* ===================== 后台：移动端外壳 ===================== */
/* 手机/小平板改用「顶栏 + 抽屉菜单 + 底部标签栏」，替代原先需要横滑的一排菜单 */
@media (max-width: 720px) {
  .admin-layout { display: block; }
  .sidebar { display: none; }

  .admin-main { width: 100%; }
  .admin-topbar {
    position: sticky; top: 0; z-index: 30;
    min-height: 52px; padding: 0 12px; gap: 8px;
    justify-content: flex-start;
    background: rgba(255,255,255,.97);
    backdrop-filter: saturate(180%) blur(8px);
    box-shadow: 0 1px 0 var(--line);
  }
  .admin-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-left: -6px; flex: 0 0 auto;
    border: 0; border-radius: 9px; background: transparent; color: var(--text);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .admin-burger:active { background: #f3f4f6; }
  .admin-burger .ni { width: 22px; height: 22px; }
  .admin-crumb { font-size: 15px; }
  .admin-top-actions { margin-left: auto; gap: 10px; font-size: 12px; }
  .admin-user { display: none; }
  .admin-todo { padding: 4px 9px; font-size: 11.5px; }
  .admin-content { padding: 12px 12px calc(80px + env(safe-area-inset-bottom)); }

  /* 底部标签栏：单手可达的 5 个高频入口 */
  .admin-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255,255,255,.97);
    backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .admin-tabbar a, .admin-tabbar button {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 56px; border: 0; background: transparent; color: #6b7280;
    font-size: 11px; font-family: inherit; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .admin-tabbar .ni { width: 22px; height: 22px; }
  .admin-tabbar a.active, .admin-tabbar a.active .ni { color: var(--primary); }
  .admin-tabbar a.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 26px; height: 2.5px; border-radius: 0 0 3px 3px; background: var(--primary);
  }
  .tab-dot {
    position: absolute; top: 6px; left: calc(50% + 4px);
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
    background: #dc2626; color: #fff; font-size: 10px; font-style: normal;
    line-height: 16px; text-align: center; font-weight: 700;
  }

  /* 抽屉菜单 */
  .admin-scrim {
    display: block;
    position: fixed; inset: 0; z-index: 50;
    background: rgba(17,24,39,.45);
    opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
  }
  .admin-scrim.open { opacity: 1; visibility: visible; }
  .admin-drawer {
    display: flex; flex-direction: column;
    position: fixed; z-index: 60; top: 0; left: 0; bottom: 0;
    width: 286px; max-width: 86vw;
    background: #111827; color: #e5e7eb;
    transform: translateX(-100%); transition: transform .22s ease;
    padding-bottom: env(safe-area-inset-bottom);
    overflow-y: auto; overscroll-behavior: contain;
    box-shadow: 8px 0 32px rgba(0,0,0,.28);
  }
  .admin-drawer.open { transform: translateX(0); }
  .ad-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 18px 16px 14px; border-bottom: 1px solid #1f2937;
  }
  .ad-title { font-size: 16px; font-weight: 700; color: #fff; }
  .ad-sub { font-size: 12px; color: #9ca3af; margin-top: 2px; }
  .ad-close {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; flex: 0 0 auto;
    border: 0; border-radius: 9px; background: #1f2937; color: #d1d5db; cursor: pointer;
  }
  .ad-close .ni { width: 18px; height: 18px; }
  .ad-nav { display: flex; flex-direction: column; padding: 8px; gap: 2px; }
  .ad-nav a {
    display: flex; align-items: center; gap: 12px;
    min-height: 48px; padding: 0 12px; border-radius: 9px;
    color: #d1d5db; font-size: 15px;
  }
  .ad-nav a:active { background: #1f2937; }
  .ad-nav a.active { background: #1d4ed8; color: #fff; font-weight: 600; }
  .ad-nav .ni { width: 20px; height: 20px; flex: 0 0 auto; }
  .ad-nav .sn-badge { margin-left: auto; }
  .ad-foot { margin-top: auto; padding: 14px 20px 20px; border-top: 1px solid #1f2937; font-size: 13px; }
  .ad-foot a { color: #9ca3af; }
  body.drawer-open { overflow: hidden; }

  /* 移动端表格卡片：标签列宽一点，长内容右对齐不挤 */
  .data-table td::before { min-width: 62px; }
  .data-table td.mono { word-break: break-all; }
  .page-head .btn { min-height: 40px; }
  .ops .btn, .action-bar .btn { min-height: 36px; }
  .filters a { min-height: 36px; display: inline-flex; align-items: center; }
}

@media (min-width: 721px) {
  .admin-drawer, .admin-scrim, .admin-tabbar { display: none !important; }
}

/* 后台：筛选与搜索 */
.search-form { display: flex; align-items: center; gap: 8px; }
.search-form input {
  padding: 7px 11px; min-width: 210px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--text); background: #fff;
}
.search-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.filter-bar { margin: 0 0 14px; flex-wrap: wrap; }
.filter-bar a b { margin-left: 3px; }
.filter-bar a.active b { color: #fff; }

/* 后台手机端表格：订单号做成卡片顶部副标题，主字段加粗 */
@media (max-width: 640px) {
  .search-form { width: 100%; }
  .search-form input { min-width: 0; flex: 1 1 auto; font-size: 16px; padding: 9px 11px; }
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; }

  .admin-body .data-table tr { display: flex; flex-direction: column; }
  .admin-body .data-table td { width: 100%; }
  .admin-body .data-table td.cell-sub {
    order: -2; justify-content: flex-start;
    border-bottom: none; padding: 1px 0 0;
    color: var(--muted); font-size: 11.5px; letter-spacing: .2px;
  }
  .admin-body .data-table td.cell-sub::before { content: none; }
  .admin-body .data-table td.cell-main {
    order: -1; font-weight: 600; font-size: 14.5px;
    padding: 3px 0 8px; border-bottom: 1px dashed var(--line);
  }
}

/* 后台：详情页与状态块在窄屏的堆叠 */
@media (max-width: 640px) {
  .action-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .action-bar form { width: 100%; }
  .action-bar .btn { width: 100%; min-height: 42px; }
  .info-table td { word-break: break-word; }
  .info-table .mono { word-break: break-all; }
  .admin-body .data-table td.srv-cell { flex-direction: column; align-items: stretch; gap: 3px; }
  .admin-body .data-table td.srv-cell .meter { width: auto; flex: 1 1 auto; }
}

/* 后台移动端：顶栏已显示栏目名，列表页内的重复标题省掉，首屏多留内容 */
@media (max-width: 640px) {
  .page-head-list h2 { display: none; }
  .page-head-list { margin-bottom: 10px; }
  .search-form .btn { min-height: 42px; padding-left: 16px; padding-right: 16px; }
  .admin-body .data-table td.srv-cell { text-align: left; }
}

/* 后台：长表单分段标题间距 & 移动端吸底保存按钮 */
.panel.form > h3 { margin: 24px 0 6px; font-size: 15px; }
.panel.form > h3:first-of-type { margin-top: 0; }
@media (max-width: 640px) {
  /* 日志：内容单独一行左对齐，长句不挤成窄条 */
  .admin-body .data-table td.cell-log {
    flex-direction: column; align-items: flex-start; gap: 3px;
    text-align: left; line-height: 1.65;
  }
}

/* ===================== 前台：区块布局变体 ===================== */
/* 后台「前台管理 → 页面布局」里选的列数，通过 lp-cols-N 生效 */
.lp-stats.lp-cols-2, .lp-features.lp-cols-2, .grid.lp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.lp-stats.lp-cols-3, .lp-features.lp-cols-3, .grid.lp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.lp-stats.lp-cols-4, .lp-features.lp-cols-4, .grid.lp-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* 首屏：居中单列 */
.lp-hero-center .lp-hero-inner { flex-direction: column; align-items: center; text-align: center; gap: 30px; }
.lp-hero-center .lp-hero-copy { flex: none; max-width: 720px; }
.lp-hero-center .lp-hero-actions { justify-content: center; }

/* 首屏：渐变 / 深色 */
.lp-hero-gradient { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.lp-hero-gradient h1 { color: #fff; }
.lp-hero-gradient .lp-hero-desc { color: rgba(255,255,255,.92); }
.lp-hero-gradient .lp-hero-sub { color: rgba(255,255,255,.75); }
.lp-hero-gradient .lp-badge { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }
.lp-hero-gradient .lp-btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.34); }
.lp-hero-gradient .lp-btn-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }
.lp-hero-gradient .lp-btn-primary { background: #fff; color: var(--primary-dark); box-shadow: 0 8px 18px rgba(0,0,0,.16); }
.lp-hero-gradient .lp-btn-primary:hover { background: #f8fafc; color: var(--primary-dark); }

.lp-hero-dark { background: #0f172a; }
.lp-hero-dark h1 { color: #fff; }
.lp-hero-dark .lp-hero-desc { color: #cbd5e1; }
.lp-hero-dark .lp-hero-sub { color: #94a3b8; }
.lp-hero-dark .lp-badge { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); color: #e2e8f0; }
.lp-hero-dark .lp-btn-ghost { background: transparent; color: #e2e8f0; border-color: rgba(255,255,255,.3); }
.lp-hero-dark .lp-btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* 流程：网格排列 */
.lp-steps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.lp-steps-grid .lp-step { text-align: left; }
.lp-steps-grid .lp-step-num { margin: 0 0 12px; }

/* 自定义内容块 */
.lp-custom { max-width: 860px; margin: 0 auto; font-size: 15px; color: #374151; line-height: 1.85; }
.lp-section-wide .lp-custom { max-width: 100%; }
.lp-custom img { max-width: 100%; height: auto; border-radius: var(--radius); }
.lp-custom h3 { font-size: 18px; margin: 22px 0 8px; }
.lp-custom ul { padding-left: 20px; }
.lp-custom a { color: var(--primary); }

/* 顶部导航当前页高亮 */
.nav a.active { color: var(--primary); font-weight: 600; }

@media (max-width: 860px) {
  .lp-stats.lp-cols-3, .lp-stats.lp-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .lp-features.lp-cols-3, .lp-features.lp-cols-4, .grid.lp-cols-3, .grid.lp-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .lp-features.lp-cols-2, .grid.lp-cols-2,
  .lp-features.lp-cols-3, .grid.lp-cols-3,
  .lp-features.lp-cols-4, .grid.lp-cols-4 { grid-template-columns: 1fr; }
  .lp-steps-grid { grid-template-columns: 1fr; }
}

/* ===================== 后台：前台管理 ===================== */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a {
  padding: 9px 16px; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--primary); }
.tabs a.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

.head-actions { display: flex; gap: 8px; }
.hint-bar {
  background: var(--primary-tint); border: 1px solid var(--primary-soft);
  color: #1e40af; border-radius: 8px; padding: 9px 13px; font-size: 13px; margin-bottom: 14px;
}
.hint-bar b { color: var(--primary-dark); }

.site-layout { display: grid; grid-template-columns: minmax(0, 1fr) 388px; gap: 20px; align-items: start; }
.site-blocks { min-width: 0; }

/* 区块卡片 */
.site-block {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 10px; overflow: hidden; transition: .15s;
}
.site-block.off { background: #fafbfc; border-style: dashed; }
.site-block.off .sb-name b { color: var(--muted); }
.site-block:target { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.sb-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
.sb-idx {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px;
  background: #f1f5f9; color: var(--muted);
  font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.site-block:not(.off) .sb-idx { background: var(--primary-soft); color: var(--primary-dark); }
.sb-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sb-name b { font-size: 14.5px; }
.sb-desc {
  font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-tools { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.sb-tools form { margin: 0; display: flex; }

.icon-btn {
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: #4b5563; font-size: 14px; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn:disabled:hover { border-color: var(--line); color: #4b5563; }
.icon-btn.on { color: var(--success); border-color: #bbf7d0; background: #f0fdf4; }
.icon-btn.danger:hover { color: var(--danger); border-color: #fecaca; background: #fef2f2; }

.sb-body { border-top: 1px dashed var(--line); }
.sb-body > summary {
  padding: 9px 12px; font-size: 13px; color: var(--primary); cursor: pointer;
  list-style: none; user-select: none;
}
.sb-body > summary::-webkit-details-marker { display: none; }
.sb-body > summary::before { content: '▸ '; font-size: 11px; }
.sb-body[open] > summary::before { content: '▾ '; }
.sb-body > summary:hover { background: #f8fafc; }
.sb-body > form { padding: 4px 12px 12px; }

/* 编辑表单 */
.fb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.fld > span { font-weight: 500; }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 13.5px; font-family: inherit; color: var(--text); background: #fff;
}
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.fld textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; }
.fld-full { grid-column: 1 / -1; }
.fld-tip { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.6; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text); }
.chk input { width: 16px; height: 16px; accent-color: var(--primary); }
.sb-actions { margin-top: 12px; }

/* 条目编辑器 */
.items-editor { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fafbfc; }
.ie-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.ie-rows { display: flex; flex-direction: column; gap: 7px; }
.row-item { display: flex; align-items: flex-start; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 7px 8px; }
.ri-idx { flex: 0 0 auto; width: 20px; padding-top: 7px; font-size: 12px; color: var(--muted); text-align: center; }
.ri-fields { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ri-fields input, .ri-fields select {
  flex: 1 1 140px; min-width: 0; padding: 6px 9px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; font-family: inherit; color: var(--text);
}
.ri-fields input:focus, .ri-fields select:focus { outline: none; border-color: var(--primary); }
.ri-fields .w-ico { flex: 0 0 92px; }
.ri-fields .w-md { flex: 1 1 150px; }
.ri-fields .w-lg { flex: 2 1 240px; }
.ri-del {
  flex: 0 0 auto; width: 26px; height: 26px; margin-top: 3px; border: 0; border-radius: 6px;
  background: transparent; color: #9ca3af; font-size: 16px; cursor: pointer;
}
.ri-del:hover { background: #fef2f2; color: var(--danger); }

.add-block { margin: 16px 0 12px; }
.add-block h3 { margin: 0 0 10px; font-size: 15px; }
.add-block-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.add-block-form select, .add-block-form input {
  flex: 1 1 220px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13.5px; font-family: inherit; color: var(--text); background: #fff;
}

/* 导航菜单 */
.nav-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.nav-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nr-move { display: flex; gap: 4px; flex: 0 0 auto; }
.nav-row input[type="text"], .nr-label, .nr-url {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 13.5px; font-family: inherit; color: var(--text);
}
.nr-label { flex: 0 0 140px; }
.nr-url { flex: 1 1 220px; min-width: 0; }
.nr-show { flex: 0 0 auto; }
.nr-sys { font-size: 11.5px; color: var(--muted); background: #f1f5f9; border-radius: 5px; padding: 2px 7px; }

/* 外观 */
.color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.color-row input[type="color"] {
  width: 46px; height: 38px; padding: 2px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; cursor: pointer;
}
.color-text { width: 96px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; text-align: center; background: #f8fafc; color: var(--muted); }
.swatches { display: flex; gap: 6px; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.sw:hover { transform: scale(1.1); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1 1 auto; accent-color: var(--primary); }
.range-row span { flex: 0 0 48px; font-size: 13px; color: var(--muted); text-align: right; }
.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rc {
  display: flex; flex-direction: column; gap: 3px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: .15s;
}
.rc:hover { border-color: var(--primary); }
.rc input { position: absolute; opacity: 0; pointer-events: none; }
.rc:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); box-shadow: 0 0 0 2px var(--primary-soft); }
.rc-name { font-size: 13.5px; font-weight: 600; }
.rc-desc { font-size: 11.5px; color: var(--muted); }

/* 预览面板 */
.site-preview { position: sticky; top: 16px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.sp-frame {
  width: 100%; height: 560px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  box-shadow: var(--shadow); position: relative;
}
.sp-frame iframe {
  width: 1280px; height: 1866px; border: 0;
  transform: scale(.3); transform-origin: top left;
  position: absolute; top: 0; left: 0; pointer-events: none;
}
.sp-tip { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }

@media (max-width: 1100px) {
  .site-layout { grid-template-columns: 1fr; }
  .site-preview { display: none; }
}
@media (max-width: 720px) {
  .tabs a { padding: 9px 12px; font-size: 13.5px; }
  .fb-grid { grid-template-columns: 1fr; }
  .sb-head { padding: 10px; gap: 8px; }
  .sb-name b { font-size: 14px; }
  .icon-btn { width: 34px; height: 34px; font-size: 15px; }
  .sb-body > form { padding: 4px 10px 12px; }
  .fld input, .fld select { font-size: 16px; padding: 9px 10px; }
  .ri-fields input, .ri-fields select { font-size: 16px; flex: 1 1 100%; }
  .ri-fields .w-ico { flex: 1 1 100%; }
  .row-item { padding: 8px; }
  .add-block-form select, .add-block-form input { flex: 1 1 100%; font-size: 16px; }
  .nav-row { gap: 6px; }
  .nr-label { flex: 1 1 90px; }
  .nr-url { flex: 1 1 100%; order: 5; }
  .nr-show { flex: 1 1 auto; order: 6; }
  .radio-cards { grid-template-columns: 1fr; }
  .swatches { width: 100%; }
}

/* 外观页：.form 的 input 默认 100% 宽，这里把取色器/滑块/单选卡放回正常尺寸 */
.panel.form .color-row input[type="color"] { flex: 0 0 46px; width: 46px; padding: 2px; }
.panel.form .color-text { flex: 0 0 104px; width: 104px; }
.panel.form .range-row input[type="range"] { flex: 1 1 auto; width: auto; padding: 0; border: 0; background: transparent; }
.panel.form .rc { display: flex; flex-direction: column; margin: 0; }
.panel.form .rc input { width: auto; }
.panel.form .chk { display: inline-flex; margin: 0; font-weight: 400; }
.panel.form .swatches { flex: 0 0 auto; }
.admin-content { min-width: 0; }
.icon-btn svg { width: 15px; height: 15px; }
.ri-del svg { width: 13px; height: 13px; }

/* 前台管理：手机端标题区的按钮不要占满整行 */
@media (max-width: 640px) {
  .page-head-list:has(.head-actions) { flex-direction: row; align-items: center; justify-content: flex-end; }
  .head-actions { flex: 0 0 auto; align-self: center; }
  .head-actions .btn { min-height: 34px; padding: 5px 12px; font-size: 13px; }
}
.ri-fields textarea {
  flex: 1 1 240px; min-width: 0; padding: 6px 9px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; font-family: inherit; color: var(--text);
  line-height: 1.55; resize: vertical;
}
.ri-fields textarea:focus { outline: none; border-color: var(--primary); }
@media (max-width: 720px) {
  .ri-fields textarea { flex: 1 1 100%; font-size: 16px; }
  .sb-actions .btn { width: 100%; min-height: 42px; }
}
