/* =========================================================
   去水印小程序 · 管理后台
   清爽浅色风格 / 主色取自小程序 #4f6bff
   ========================================================= */

:root {
  --brand: #4f6bff;
  --brand-strong: #3d58f0;
  --brand-soft: #eef1ff;
  --brand-ink: #2f45c9;
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e9edf5;
  --line-strong: #dbe2ef;
  --text: #172033;
  --text-2: #44506b;
  --muted: #7b859c;
  --success: #16a34a;
  --success-soft: #e8f8ee;
  --warning: #d97706;
  --warning-soft: #fff5e6;
  --danger: #e5484d;
  --danger-soft: #fdeeee;
  --shadow-sm: 0 1px 2px rgba(23, 32, 51, .04);
  --shadow: 0 10px 30px -18px rgba(23, 32, 51, .28);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 238px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }

/* ---------------- 通用按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: .16s ease;
  user-select: none;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(79, 107, 255, .9); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover { background: #e3e8ff; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { background: #fff; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #fbdcdc; }
.btn-block { width: 100%; }
.btn-lg { height: 46px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  transition: .16s;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.mini { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.mini svg { width: 15px; height: 15px; }

/* ---------------- 登录页 ---------------- */
.login-page {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  overflow: hidden;
  background: #f5f7ff;
}
.login-aurora {
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(46% 46% at 20% 20%, rgba(79, 107, 255, .20), transparent 70%),
    radial-gradient(40% 40% at 82% 30%, rgba(0, 129, 255, .16), transparent 70%),
    radial-gradient(45% 45% at 60% 90%, rgba(139, 92, 246, .14), transparent 70%);
  filter: blur(6px);
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 34px 34px 28px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  box-shadow: 0 30px 70px -40px rgba(30, 45, 100, .55);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #6d84ff, #4f6bff);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(79, 107, 255, .9);
}
.brand-logo svg { width: 24px; height: 24px; stroke-width: 2; }
.brand strong { display: block; font-size: 15px; letter-spacing: .2px; }
.brand small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); letter-spacing: .4px; }
.brand-lg { margin-bottom: 26px; }
.brand-lg .brand-logo { width: 46px; height: 46px; border-radius: 14px; }
.brand-lg strong { font-size: 16px; }
.login-title { margin: 0 0 6px; font-size: 23px; letter-spacing: -.3px; }
.login-sub { margin: 0 0 24px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.login-form { display: grid; gap: 16px; }
.login-error { margin: -4px 0 0; padding: 9px 12px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: 12.5px; }
.login-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 13px;
  border-radius: 10px;
  background: #f3f6ff;
  color: var(--text-2);
  font-size: 12.5px;
}
.login-hint svg { width: 15px; height: 15px; color: var(--brand); }
.login-hint b { color: var(--brand-ink); font-weight: 600; }
.login-foot { position: relative; margin: 22px 0 0; font-size: 12px; color: #98a2b8; }

/* ---------------- 表单 ---------------- */
.field { display: grid; gap: 7px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field-label em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted); }
.field-hint { margin: 0; font-size: 12px; line-height: 1.65; color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 12px; width: 17px; height: 17px; color: #98a2b8; pointer-events: none; }
.input-wrap .input { padding-left: 38px; }
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 9px 12px;
  transition: .15s;
  outline: none;
}
.input { height: 40px; }
.input::placeholder, .textarea::placeholder { color: #aab3c5; }
.input:hover, .textarea:hover, .select:hover { border-color: #c6d1e6; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 107, 255, .12); }
.textarea { resize: vertical; min-height: 84px; }
.select { height: 40px; padding-right: 34px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b859c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.input-suffix { position: absolute; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.input-suffix:hover { background: #f1f4fa; }
.input-suffix svg { width: 17px; height: 17px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.input-addon { display: inline-flex; align-items: center; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: #f7f9fd; color: var(--muted); font-size: 13px; white-space: nowrap; }

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { position: relative; width: 42px; height: 24px; border-radius: 99px; background: #d8dfec; transition: .18s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 30, 60, .25); transition: .18s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(79, 107, 255, .2); }
.switch .switch-label { font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.switch.sm .track { width: 36px; height: 21px; }
.switch.sm .track::after { width: 15px; height: 15px; }
.switch.sm input:checked + .track::after { transform: translateX(15px); }

/* ---------------- 布局 ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  padding: 20px 14px 14px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.sidebar > .brand { padding: 0 8px 18px; border-bottom: 1px solid var(--line); }
.sidebar-close { display: none; margin-left: auto; }
.nav { flex: 1; overflow-y: auto; padding: 6px 0 10px; scrollbar-width: thin; }
.nav-group { margin: 16px 0 6px; padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #a3adc2; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 11px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: .15s;
}
.nav-item svg { width: 18px; height: 18px; color: #8b96ad; transition: .15s; }
.nav-item:hover { background: #f4f6fb; color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav-item.active svg { color: var(--brand); }
.sidebar-foot { padding-top: 12px; border-top: 1px solid var(--line); }
.server-state { display: flex; align-items: center; gap: 7px; padding: 0 4px 10px; font-size: 12px; color: var(--muted); }
.server-ver { margin-left: auto; font-size: 11px; color: #b3bccd; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dot-success { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .14); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 30px;
  background: rgba(245, 247, 251, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(233, 237, 245, .8);
}
.topbar-title { min-width: 0; }
.topbar-title h1 { margin: 0; font-size: 20px; letter-spacing: -.3px; }
.topbar-title p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.save-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); padding: 5px 9px; border-radius: 99px; white-space: nowrap; }
.save-state svg { width: 13px; height: 13px; }
.save-state[data-state="saved"] { color: var(--success); background: var(--success-soft); }
.save-state[data-state="saving"] { color: var(--warning); background: var(--warning-soft); }
.save-state[data-state="dirty"] { color: var(--text-2); background: #eef1f7; }
.save-state[data-state="error"] { color: var(--danger); background: var(--danger-soft); }

.page { width: 100%; max-width: 1280px; padding: 24px 30px 56px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.page-head h2 { margin: 0 0 5px; font-size: 17px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.page-head .spacer { flex: 1; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.card-hd { display: flex; align-items: center; gap: 12px; padding: 17px 20px 0; }
.card-hd h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.card-hd p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.card-hd .spacer { flex: 1; }
.card-bd { padding: 18px 20px 20px; }
.card-bd.tight { padding: 14px 20px 16px; }
.card-foot { display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-top: 1px solid var(--line); background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); }
.card-foot .spacer { flex: 1; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }

/* ---------------- 统计卡 ---------------- */
.stat { position: relative; padding: 18px 18px 16px; overflow: hidden; }
.stat-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.stat-icon svg { width: 17px; height: 17px; }
.stat-icon.green { background: var(--success-soft); color: var(--success); }
.stat-icon.orange { background: var(--warning-soft); color: var(--warning); }
.stat-icon.purple { background: #f3efff; color: #7c5cf5; }
.stat-value { margin: 14px 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.stat-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.trend-up { color: var(--success); font-weight: 600; }
.trend-down { color: var(--danger); font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; background: #f0f3f9; color: var(--text-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.green { background: var(--success-soft); color: #15803d; }
.badge.blue { background: var(--brand-soft); color: var(--brand-ink); }
.badge.orange { background: var(--warning-soft); color: #b45309; }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.purple { background: #f3efff; color: #6d4ddb; }
.badge.gray { background: #f1f4f9; color: var(--muted); }

/* ---------------- 图表 ---------------- */
.chart-wrap { padding: 6px 4px 0; }
.chart-svg { display: block; width: 100%; height: 230px; overflow: visible; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; background: var(--brand); }
.chart-legend i.alt { background: #b9c4ff; }
.chart-axis { font-size: 10.5px; fill: #9aa4ba; stroke: none; font-weight: 500; }
.chart-hit { stroke: none; }
.chart-grid { stroke: #eef1f7; stroke-width: 1; }
.chart-tip { position: absolute; pointer-events: none; transform: translate(-50%, -120%); background: #172033; color: #fff; padding: 7px 10px; border-radius: 8px; font-size: 11.5px; white-space: nowrap; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .12s; z-index: 5; }
.chart-tip.show { opacity: 1; }
.chart-container { position: relative; }

.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: #f1f4fa; }
.tabs button { height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.tabs button.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(23, 32, 51, .09); }

/* 平台分布 */
.dist-list { display: grid; gap: 13px; }
.dist-row { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; font-size: 12.5px; }
.dist-name { display: flex; align-items: center; gap: 7px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.platform-dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 700; flex: none; }
.dist-bar { height: 7px; border-radius: 99px; background: #f0f3f9; overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7b90ff, #4f6bff); }
.dist-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { padding: 10px 14px; text-align: left; font-size: 11.5px; letter-spacing: .3px; color: var(--muted); font-weight: 600; background: #fafbfe; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid #f1f4f9; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcff; }
.table .cell-title { max-width: 320px; }
.cell-title strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-user { display: flex; align-items: center; gap: 8px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; color: #fff; font-size: 11.5px; font-weight: 700; flex: none; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.thumb { width: 44px; height: 44px; border-radius: 9px; background: linear-gradient(135deg, #e9edff, #f4f6fd); display: flex; align-items: center; justify-content: center; color: #a9b7ff; flex: none; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 18px; height: 18px; }
.time-cell { color: var(--muted); font-size: 12px; white-space: nowrap; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar .search { position: relative; flex: 1; min-width: 180px; max-width: 320px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #9aa4ba; }
.toolbar .search .input { padding-left: 36px; }
.toolbar .spacer { flex: 1; }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pager .page-info { margin-right: auto; }
.pager button { min-width: 32px; height: 32px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text-2); font-size: 12.5px; cursor: pointer; }
.pager button:hover:not([disabled]) { border-color: var(--brand); color: var(--brand); }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button[disabled] { opacity: .45; cursor: not-allowed; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 52px 20px; color: var(--muted); font-size: 13px; }
.empty svg { width: 40px; height: 40px; color: #c9d2e3; }

/* ---------------- 表单页 ---------------- */
.form-grid { display: grid; gap: 18px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-row { display: grid; gap: 7px; }
.form-row .field-label { justify-content: space-between; }
.form-row .count { font-size: 11px; color: #a3adc2; font-weight: 500; }
.form-section { padding: 20px; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 9px; margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.section-title .section-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.section-title .section-icon svg { width: 15px; height: 15px; }
.section-desc { margin: 0 0 18px 37px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }

/* 模式选择卡 */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice { position: relative; display: flex; gap: 11px; padding: 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; cursor: pointer; transition: .15s; background: #fff; }
.choice:hover { border-color: #c3cdf0; }
.choice input { position: absolute; opacity: 0; }
.choice.active { border-color: var(--brand); background: #f8f9ff; box-shadow: 0 0 0 3px rgba(79, 107, 255, .08); }
.choice-radio { position: relative; width: 18px; height: 18px; border: 2px solid #cbd5e5; border-radius: 50%; flex: none; margin-top: 1px; }
.choice.active .choice-radio { border-color: var(--brand); }
.choice.active .choice-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand); }
.choice strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.choice small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* 列表编辑行 */
.list-rows { display: grid; gap: 10px; }
.list-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdff; }
.list-row .row-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.list-row .row-actions { display: flex; align-items: center; gap: 4px; }
.list-row.dragging { opacity: .5; }
.row-index { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 7px; background: #eef1ff; color: var(--brand-ink); font-size: 11px; font-weight: 700; flex: none; margin-top: 9px; }

/* 图片上传 */
.uploader { display: flex; gap: 12px; align-items: center; }
.uploader-preview { position: relative; width: 86px; height: 86px; border-radius: 12px; border: 1px dashed var(--line-strong); background: #f8faff; display: flex; align-items: center; justify-content: center; color: #a8b4cc; overflow: hidden; flex: none; }
.uploader-preview img { width: 100%; height: 100%; object-fit: cover; }
.uploader-preview svg { width: 24px; height: 24px; }
.uploader-body { display: grid; gap: 7px; flex: 1; min-width: 0; }
.uploader-tip { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.uploader.wide { flex-direction: column; align-items: stretch; }
.uploader.wide .uploader-preview { width: 100%; height: 140px; }
.uploader.wide .uploader-preview img { object-fit: cover; }

/* 广告位示意 */
.ad-layout { display: grid; gap: 10px; }
.ad-slot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed #d9e0f0; border-radius: 11px; background: #fbfcff; }
.ad-slot-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: #eef2ff; color: var(--brand); flex: none; }
.ad-slot-icon svg { width: 17px; height: 17px; }
.ad-slot strong { display: block; font-size: 13px; }
.ad-slot small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.ad-slot .badge { margin-left: auto; }

/* 平台卡片 */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.platform-card { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdff; }
.platform-card.off { opacity: .55; background: #f8fafc; }
.platform-logo { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-size: 13px; font-weight: 700; flex: none; overflow: hidden; }
.platform-logo img { width: 100%; height: 100%; object-fit: cover; }
.platform-meta { flex: 1; min-width: 0; }
.platform-meta strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.platform-meta small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }

/* 卡片列表（轮播图） */
.banner-list { display: grid; gap: 12px; }
.banner-item { display: flex; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.banner-item.off { background: #fafbfe; border-style: dashed; }
.banner-item.off .banner-thumb { opacity: .55; }
.banner-item.off .banner-info { opacity: .8; }
.banner-thumb { width: 150px; height: 88px; border-radius: 10px; background: linear-gradient(135deg, #eef1ff, #dfe6ff); display: flex; align-items: center; justify-content: center; color: #9faeff; overflow: hidden; flex: none; position: relative; }
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; }
.banner-thumb svg { width: 26px; height: 26px; }
.banner-thumb .badge { position: absolute; top: 6px; left: 6px; }
.banner-info { flex: 1; min-width: 0; display: grid; gap: 8px; }
.banner-info .row { display: flex; gap: 8px; align-items: center; }
.banner-info .row .input { height: 36px; }
.banner-actions { display: flex; flex-direction: column; gap: 5px; align-items: center; }

/* 帮助中心 */
.faq-item { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdff; display: grid; gap: 9px; }
.faq-head { display: flex; align-items: center; gap: 9px; }
.faq-head .input { font-weight: 600; }
.faq-body { display: flex; gap: 9px; align-items: flex-start; }
.faq-body .textarea { min-height: 62px; font-size: 13px; }

/* 接口页 */
.code-box { position: relative; border-radius: 12px; background: #161c2d; color: #d7e0f5; padding: 16px 16px; overflow: auto; max-height: 340px; font-size: 12px; line-height: 1.75; font-family: "JetBrains Mono", Consolas, "Courier New", monospace; white-space: pre; }
.code-box .code-actions { position: absolute; top: 10px; right: 10px; }
.code-box .btn { background: rgba(255, 255, 255, .1); color: #dbe4ff; border: 0; }
.code-box .btn:hover { background: rgba(255, 255, 255, .18); }
.copy-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcff; }
.copy-row code { flex: 1; min-width: 0; font-family: "JetBrains Mono", Consolas, monospace; font-size: 12.5px; color: var(--brand-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { display: grid; gap: 14px; counter-reset: step; }
.step { display: flex; gap: 12px; }
.step-num { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 700; flex: none; }
.step-num::before { content: counter(step); }
.step strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.step p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.kv { display: grid; grid-template-columns: 128px 1fr; gap: 10px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text-2); word-break: break-all; }

/* ---------------- 手机预览 ---------------- */
.drawer-mask { position: fixed; inset: 0; z-index: 60; background: rgba(16, 24, 40, .32); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: .2s; }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw; background: #f5f7fb; border-left: 1px solid var(--line); box-shadow: -30px 0 60px -40px rgba(16, 24, 40, .5); transform: translateX(102%); transition: transform .24s cubic-bezier(.22, .8, .3, 1); display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-hd { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-hd h2 { margin: 0; font-size: 16px; }
.drawer-hd p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.drawer-hd .icon-btn { margin-left: auto; }
.drawer-bd { flex: 1; overflow-y: auto; padding: 24px 20px 32px; display: flex; flex-direction: column; align-items: center; }
.drawer-tip { margin: 16px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; }

.phone { position: relative; width: 310px; height: 640px; border-radius: 42px; background: #0f1420; padding: 10px; box-shadow: 0 30px 60px -30px rgba(15, 20, 32, .55); }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.phone-status { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 16px; font-size: 10.5px; font-weight: 600; color: #fff; background: #0081ff; flex: none; }
.phone-status .notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 74px; height: 18px; border-radius: 99px; background: #0f1420; }
.phone-nav { position: relative; height: 46px; display: flex; align-items: center; justify-content: center; background: #0081ff; color: #fff; font-size: 14px; font-weight: 600; flex: none; }
.phone-nav .capsule { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 66px; height: 25px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .55); display: flex; align-items: center; justify-content: space-around; color: #fff; }
.phone-nav .capsule i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.phone-nav .capsule b { width: 11px; height: 11px; border: 1.4px solid currentColor; border-radius: 50%; position: relative; }
.phone-nav .capsule b::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: currentColor; }
.phone-body { flex: 1; overflow: hidden; background: #f7f8fa; display: flex; flex-direction: column; }
.phone-banner { position: relative; height: 96px; background: linear-gradient(135deg, #dfe6ff, #eef1ff); display: flex; align-items: center; justify-content: center; color: #97a7f2; font-size: 11px; overflow: hidden; flex: none; }
.phone-banner img { width: 100%; height: 100%; object-fit: cover; }
.phone-banner .banner-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.phone-banner .banner-empty svg { width: 20px; height: 20px; }
.phone-notice { display: flex; align-items: center; gap: 5px; padding: 7px 10px; font-size: 10.5px; color: #ff2d2d; font-weight: 700; text-align: center; justify-content: center; background: #fff; line-height: 1.4; flex: none; }
.phone-notice svg { width: 12px; height: 12px; color: #ffb300; }
.phone-main { padding: 10px; display: grid; gap: 9px; }
.phone-textarea { height: 66px; border-radius: 9px; border: 1px solid #e6e9f0; background: #fff; padding: 8px; font-size: 10.5px; color: #a9b2c4; position: relative; }
.phone-textarea::after { content: "清空"; position: absolute; right: 6px; bottom: 5px; padding: 1px 7px; border-radius: 99px; background: #017bfd; color: #fff; font-size: 9px; font-weight: 700; }
.phone-btn { height: 38px; border-radius: 8px; background: #0081ff; color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.phone-ad { height: 62px; border-radius: 8px; border: 1px dashed #dfe4ee; background: #fbfcfe; display: flex; align-items: center; justify-content: center; gap: 6px; color: #aab4c8; font-size: 10.5px; }
.phone-ad svg { width: 13px; height: 13px; }
.phone-tabbar { margin-top: auto; height: 44px; border-top: 1px solid #eef0f5; background: #fff; display: flex; align-items: center; justify-content: space-around; font-size: 9.5px; color: #8a93a6; padding-bottom: 4px; }
.phone-tabbar .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.phone-tabbar .tab.active { color: #4f6bff; }
.phone-tabbar .tab svg { width: 15px; height: 15px; }
.phone-badge-vip { position: absolute; top: 7px; right: 8px; padding: 2px 6px; border-radius: 99px; background: linear-gradient(135deg, #ffd76e, #ffb01f); color: #6b4300; font-size: 8.5px; font-weight: 800; }
.phone-home-bar { height: 5px; width: 96px; border-radius: 99px; background: #0f1420; margin: 7px auto; flex: none; }

/* ---------------- 弹窗 ---------------- */
.modal-mask { position: fixed; inset: 0; z-index: 80; background: rgba(16, 24, 40, .45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .16s ease; }
.modal { width: 100%; max-width: 440px; background: #fff; border-radius: 18px; box-shadow: 0 30px 70px -30px rgba(15, 23, 42, .5); animation: popIn .2s cubic-bezier(.2, .9, .3, 1.2); overflow: hidden; }
.modal-hd { display: flex; align-items: flex-start; gap: 10px; padding: 20px 22px 0; }
.modal-hd h3 { margin: 0; font-size: 16px; }
.modal-hd p { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.modal-hd .icon-btn { margin-left: auto; border: 0; }
.modal-bd { padding: 18px 22px; display: grid; gap: 14px; }
.modal-ft { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px 20px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ---------------- 提示 ---------------- */
.toast-root { position: fixed; z-index: 100; top: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 11px; background: #172033; color: #fff; font-size: 13px; box-shadow: 0 16px 40px -18px rgba(15, 23, 42, .6); animation: toastIn .2s ease; }
.toast svg { width: 16px; height: 16px; color: #6ee7a0; }
.toast.error svg { color: #ff9d9d; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* 提示条 */
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 11px; background: #f3f6ff; color: var(--text-2); font-size: 12.5px; line-height: 1.7; }
.callout svg { width: 16px; height: 16px; color: var(--brand); margin-top: 2px; }
.callout.warn { background: var(--warning-soft); color: #92400e; }
.callout.warn svg { color: var(--warning); }
.callout strong { font-weight: 650; }

/* 快速入口 */
.quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quick-link { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 12.5px; font-weight: 550; color: var(--text-2); transition: .15s; }
.quick-link:hover { border-color: #c9d3f5; background: #fbfcff; color: var(--brand-ink); transform: translateY(-1px); }
.quick-link svg { width: 16px; height: 16px; color: var(--brand); }
.quick-link .arrow { margin-left: auto; color: #c2cad9; }
.quick-link .arrow svg { color: currentColor; width: 14px; height: 14px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-104%); transition: transform .22s ease; box-shadow: 20px 0 50px -30px rgba(15, 23, 42, .4); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-flex; }
  .nav-mask { position: fixed; inset: 0; z-index: 39; background: rgba(16, 24, 40, .35); opacity: 0; pointer-events: none; transition: .2s; }
  .nav-mask.open { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .mobile-only { display: inline-flex !important; }
  .topbar, .page { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 760px) {
  .page { padding: 18px 15px 44px; }
  .topbar { padding: 13px 15px; }
  .topbar-title h1 { font-size: 17px; }
  .topbar-title p { display: none; }
  .save-state { display: none; }
  .grid-4, .grid-3, .grid-2, .form-grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .choice-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-links { grid-template-columns: minmax(0, 1fr); }
  .banner-item { flex-wrap: wrap; }
  .banner-thumb { width: 100%; height: 120px; }
  .banner-actions { flex-direction: row; width: 100%; justify-content: flex-end; }
  .drawer { width: 100%; max-width: 100%; }
  .stat-value { font-size: 24px; }
  .card-hd { padding: 15px 15px 0; }
  .card-bd { padding: 15px; }
  .form-section { padding: 16px 15px; }
  .section-desc { margin-left: 0; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .table th, .table td { padding: 10px; }
}

