/* =========================================================
   二维码活码系统 · 全局样式表
   设计基调：清爽科技蓝 + 玻璃拟态卡片 + 细腻微交互
   ========================================================= */
/* ---------------------------------------------------------
   1. 设计令牌（Design Tokens）
   --------------------------------------------------------- */
:root {
  /* 品牌色 */
  --brand-1: #4f46e5;
  --brand-2: #2563eb;
  --brand-3: #7c3aed;
  --brand-soft: #eef2ff;
  --brand-soft-2: #e0e7ff;
  --brand-grad: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  --brand-grad-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  /* 中性色阶 */
  --ink-50: #f8fafc;
  --ink-100: #f1f5f9;
  --ink-200: #e2e8f0;
  --ink-300: #cbd5e1;
  --ink-400: #94a3b8;
  --ink-500: #64748b;
  --ink-600: #475569;
  --ink-700: #334155;
  --ink-800: #1e293b;
  --ink-900: #0f172a;
  /* 语义色 */
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warn: #f59e0b;
  --warn-soft: #fffbeb;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --info: #0ea5e9;
  --info-soft: #f0f9ff;
  /* 圆角 */
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 8px 24px rgba(15, 23, 42, .08), 0 2px 6px rgba(15, 23, 42, .04);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, .14), 0 6px 16px rgba(15, 23, 42, .06);
  --shadow-brand: 0 8px 20px rgba(79, 70, 229, .28);
  /* 缓动 */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* 字体 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo,
               Consolas, "Liberation Mono", monospace;
}
/* ---------------------------------------------------------
   2. 基础重置与全局排版
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-800);
  background-color: #f6f8fc;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(79, 70, 229, .07), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(37, 99, 235, .06), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(124, 58, 237, .05), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; color: var(--ink-900); }
p { margin: 0; }
a { color: var(--brand-2); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--brand-1); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-500); font-weight: 400; font-size: 13px; }
/* 滚动条美化 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-300);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); background-clip: content-box; }
/* 选中文本 */
::selection { background: var(--brand-soft-2); color: var(--brand-1); }
/* ---------------------------------------------------------
   3. 顶部导航栏
   --------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 26px;
  height: 62px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--ink-200);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.navbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--ink-900);
}
.navbar .brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 16px;
  border-radius: 9px;
  background: var(--brand-grad);
  box-shadow: var(--shadow-brand);
}
.navbar .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* ---------------------------------------------------------
   4. 页面容器与卡片
   --------------------------------------------------------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 22px 60px;
}
.card {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s var(--ease);
  animation: fadeUp .38s var(--ease-out) both;
}
.card:hover { box-shadow: var(--shadow); }
.card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink-900);
}
/* ---------------------------------------------------------
   5. 按钮体系
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--ink-700);
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: all .2s var(--ease);
  box-shadow: var(--shadow-xs);
}
.btn:hover {
  color: var(--brand-1);
  border-color: var(--brand-soft-2);
  background: var(--brand-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
  color: #fff;
  background: var(--brand-grad);
  border-color: transparent;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #4338ca 0%, #1d4ed8 100%);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(79, 70, 229, .36);
}
.btn-ghost {
  color: var(--ink-600);
  background: #fff;
  border-color: var(--ink-200);
}
.btn-ghost:hover {
  color: var(--brand-1);
  background: var(--brand-soft);
  border-color: var(--brand-soft-2);
}
.btn-danger {
  color: var(--danger);
  background: #fff;
  border-color: #fecaca;
}
.btn-danger:hover {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(239, 68, 68, .3);
}
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: var(--radius-xs); }
/* ---------------------------------------------------------
   6. 表单控件
   --------------------------------------------------------- */
.form-group { margin-bottom: 16px; }
.form-group > label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
.form-group > label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink-800);
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.form-control::placeholder { color: var(--ink-400); }
.form-control:hover { border-color: var(--ink-300); }
.form-control:focus {
  border-color: var(--brand-1);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.5 1.8 4.3l1-1L6 6.5l3.2-3.2 1 1z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
input[type="datetime-local"].form-control { cursor: pointer; }
input[type="checkbox"] { accent-color: var(--brand-1); cursor: pointer; }
.form-hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-500);
}
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
/* ---------------------------------------------------------
   7. 活码类型选择器
   --------------------------------------------------------- */
.type-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.type-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 13px 14px;
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.type-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.type-option:hover {
  border-color: var(--brand-soft-2);
  background: var(--brand-soft);
  transform: translateY(-1px);
}
.type-option.active {
  border-color: var(--brand-1);
  background: var(--brand-grad-soft);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}
.type-option.active::after {
  content: "✓";
  position: absolute;
  top: 9px;
  right: 11px;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-1);
}
.type-icon { font-size: 19px; line-height: 1; }
.type-name { font-size: 13.5px; font-weight: 700; color: var(--ink-900); }
.type-desc { font-size: 11.5px; color: var(--ink-500); }
.type-panel { animation: fadeUp .26s var(--ease-out) both; }
/* ---------------------------------------------------------
   8. 图片上传区
   --------------------------------------------------------- */
.upload-zone {
  position: relative;
  padding: 22px;
  text-align: center;
  background: var(--ink-50);
  border: 2px dashed var(--ink-300);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.upload-zone:hover { border-color: var(--brand-1); background: var(--brand-soft); }
.upload-zone.dragover {
  border-color: var(--brand-1);
  background: var(--brand-soft);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}
.upload-placeholder { display: block; }
.upload-icon { font-size: 30px; margin-bottom: 8px; }
.upload-text { font-size: 13.5px; font-weight: 600; color: var(--ink-700); }
.upload-sub { margin-top: 5px; font-size: 12px; color: var(--ink-500); }
.upload-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.upload-preview img {
  max-width: 220px;
  max-height: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-sm);
}
.upload-actions { display: flex; gap: 8px; justify-content: center; }
/* ---------------------------------------------------------
   9. 数据表格
   --------------------------------------------------------- */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.table thead th {
  padding: 11px 12px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  color: var(--ink-600);
  background: var(--ink-50);
  border-bottom: 1.5px solid var(--ink-200);
}
.table thead th:first-child { border-top-left-radius: var(--radius-sm); }
.table thead th:last-child { border-top-right-radius: var(--radius-sm); }
.table tbody td {
  padding: 13px 12px;
  vertical-align: middle;
  color: var(--ink-700);
  border-bottom: 1px solid var(--ink-100);
}
.table tbody tr { transition: background .16s var(--ease); }
.table tbody tr:hover { background: var(--ink-50); }
.table tbody tr:last-child td { border-bottom: none; }
.table strong { color: var(--ink-900); font-weight: 700; }
.code-badge {
  display: inline-block;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--brand-1);
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-2);
  border-radius: var(--radius-xs);
}
.url-cell {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-600);
  font-size: 12.5px;
}
.op-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* ---------------------------------------------------------
   10. 标签（Tag）
   --------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tag-on { color: #047857; background: var(--success-soft); border-color: #a7f3d0; }
.tag-off { color: var(--ink-500); background: var(--ink-100); border-color: var(--ink-200); }
.tag-expired { color: #b91c1c; background: var(--danger-soft); border-color: #fecaca; }
.tag-type-url { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.tag-type-mp { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.tag-type-wx { color: #a21caf; background: #fdf4ff; border-color: #f5d0fe; }
/* ---------------------------------------------------------
   11. 开关（Switch）
   --------------------------------------------------------- */
.switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}
.switch-label { font-size: 11.5px; font-weight: 600; color: var(--ink-500); }
.switch { position: relative; display: inline-block; width: 38px; height: 21px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: var(--ink-300);
  border-radius: 999px;
  cursor: pointer;
  transition: background .22s var(--ease);
}
.switch .slider::before {
  content: "";
  position: absolute;
  left: 2.5px;
  top: 2.5px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: transform .22s var(--ease);
}
.switch input:checked + .slider { background: var(--brand-grad); }
.switch input:checked + .slider::before { transform: translateX(17px); }
.switch input:disabled + .slider { opacity: .55; cursor: not-allowed; }
/* ---------------------------------------------------------
   12. 弹窗（Modal）
   --------------------------------------------------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 42px 18px;
  overflow-y: auto;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s var(--ease), visibility .24s var(--ease);
}
.modal-mask.show { opacity: 1; visibility: visible; }
.modal {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(18px) scale(.97);
  opacity: 0;
  transition: transform .28s var(--ease-out), opacity .28s var(--ease-out);
}
.modal-mask.show .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ink-200);
}
.modal-header h3 { font-size: 16.5px; font-weight: 800; }
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-500);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.modal-close:hover { color: var(--danger); background: var(--danger-soft); }
.modal-body { padding: 20px 22px; max-height: 66vh; overflow-y: auto; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 22px;
  background: var(--ink-50);
  border-top: 1px solid var(--ink-200);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
/* ---------------------------------------------------------
   13. Toast 轻提示
   --------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  top: 22px;
  z-index: 2000;
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(30, 41, 59, .94);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -18px);
  transition: all .28s var(--ease-out);
  max-width: min(88vw, 460px);
  text-align: center;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.success { background: linear-gradient(135deg, #10b981, #059669); }
.toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
/* ---------------------------------------------------------
   14. 空状态
   --------------------------------------------------------- */
.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--ink-500);
  font-size: 13.5px;
}
.empty .icon { font-size: 44px; margin-bottom: 12px; opacity: .85; }
/* ---------------------------------------------------------
   15. 统计卡片
   --------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.stat-box {
  padding: 16px 18px;
  background: linear-gradient(180deg, #fdfdff, #fff);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: all .22s var(--ease);
}
.stat-box:hover {
  border-color: var(--brand-soft-2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.stat-box .label { font-size: 12.5px; font-weight: 600; color: var(--ink-500); }
.stat-box .value {
  margin-top: 5px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
/* ---------------------------------------------------------
   16. 二维码面板
   --------------------------------------------------------- */
.qr-panel { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start; }
.qr-box {
  flex: none;
  width: 250px;
  padding: 18px;
  text-align: center;
  background: linear-gradient(180deg, #fdfdff, #fff);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.qr-box img {
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  background: #fff;
}
.qr-link {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-500);
  word-break: break-all;
  line-height: 1.5;
}
/* ---------------------------------------------------------
   17. 登录页
   --------------------------------------------------------- */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 30px 18px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 38px 34px 32px;
  text-align: center;
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--ink-200);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .45s var(--ease-out) both;
}
.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 16px;
  font-size: 30px;
  border-radius: 18px;
  background: var(--brand-grad);
  box-shadow: var(--shadow-brand);
}
.login-card h1 { font-size: 21px; font-weight: 800; letter-spacing: .3px; }
.login-card .sub { margin: 7px 0 26px; font-size: 13px; color: var(--ink-500); }
.login-card form { text-align: left; }
/* ---------------------------------------------------------
   18. 小程序 / 葵花码 落地页
   --------------------------------------------------------- */
.mp-body {
  background-color: #eef2f9;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(16, 185, 129, .1), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(37, 99, 235, .09), transparent 42%);
}
.mp-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 26px 18px;
}
.mp-card {
  width: 100%;
  max-width: 420px;
  padding: 34px 28px 30px;
  text-align: center;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--ink-200);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .45s var(--ease-out) both;
}
.mp-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  font-size: 29px;
  border-radius: 18px;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 8px 20px rgba(16, 185, 129, .3);
}
.mp-title { font-size: 19.5px; font-weight: 800; line-height: 1.4; }
.mp-sub { margin-top: 8px; font-size: 13px; color: var(--ink-500); }
.mp-info {
  margin: 20px 0;
  padding: 4px 16px;
  text-align: left;
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius);
}
.mp-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--ink-200);
  font-size: 13px;
}
.mp-info-row:last-child { border-bottom: none; }
.mp-label { flex: none; color: var(--ink-500); font-weight: 600; }
.mp-value { color: var(--ink-800); font-weight: 600; word-break: break-all; text-align: right; }
.mp-btn { width: 100%; margin-top: 6px; padding: 12px 18px; font-size: 14.5px; }
.mp-tip {
  margin-top: 18px;
  padding: 13px 15px;
  text-align: left;
  font-size: 12.5px;
  line-height: 1.65;
  color: #92400e;
  background: var(--warn-soft);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
}
.mp-tip strong { color: #b45309; }
.mp-foot { margin-top: 20px; font-size: 12.5px; color: var(--ink-500); }
.mp-qr {
  width: 132px;
  margin: 12px auto 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
}
/* 葵花码展示 */
.wxcode-box {
  margin: 22px 0;
  padding: 18px;
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
}
.wxcode-img {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.wxcode-hint {
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-1);
  animation: pulse 2.2s var(--ease) infinite;
}
/* ---------------------------------------------------------
   19. 创建页子项草稿
   --------------------------------------------------------- */
.item-draft {
  padding: 14px 15px;
  margin-bottom: 12px;
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  animation: fadeUp .28s var(--ease-out) both;
}
.item-draft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--ink-200);
}
.item-draft-head strong { font-size: 13.5px; color: var(--ink-800); }
.item-draft .form-group:last-child { margin-bottom: 0; }
/* ---------------------------------------------------------
   20. 动画关键帧
   --------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
/* ---------------------------------------------------------
   21. 响应式适配
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .qr-panel { gap: 18px; }
  .qr-box { width: 100%; }
}
@media (max-width: 768px) {
  .navbar { height: auto; padding: 12px 16px; }
  .container { padding: 18px 14px 48px; }
  .card { padding: 18px 16px; border-radius: var(--radius); }
  .modal-mask { padding: 18px 12px; }
  .modal-body { max-height: 72vh; }
  .stat-box .value { font-size: 22px; }
  .table { font-size: 12.5px; }
  .table thead th, .table tbody td { padding: 10px 8px; }
  .url-cell { max-width: 150px; }
  .op-btns { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .login-card { padding: 30px 22px 26px; }
  .mp-card { padding: 28px 20px 24px; }
  .type-picker { grid-template-columns: 1fr; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }
}
/* =========================================================
   22. 子项卡片式管理（新增）
   ========================================================= */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f8faff, #fff);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.batch-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  user-select: none;
}
.batch-check input { width: 16px; height: 16px; cursor: pointer; }
.batch-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-1);
  background: var(--brand-soft);
  padding: 3px 10px;
  border-radius: 999px;
}
.batch-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
/* ---------- 子项卡片网格 ---------- */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.item-card {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, #fdfdff, #fff);
  border: 1.5px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: all .22s var(--ease);
  animation: fadeUp .32s var(--ease) both;
}
.item-card:hover {
  border-color: #c7d2fe;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.item-card-off {
  background: linear-gradient(180deg, #fafafa, #f7f7f9);
  border-style: dashed;
  opacity: .88;
}
.item-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.item-check { display: inline-flex; align-items: center; cursor: pointer; }
.item-check input { width: 16px; height: 16px; cursor: pointer; }
.item-seq {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-500);
  background: var(--ink-100);
  padding: 2px 7px;
  border-radius: 5px;
}
.item-name {
  flex: 1;
  min-width: 60px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-target {
  padding: 9px 11px;
  margin-bottom: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-600);
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
  word-break: break-all;
  max-height: 58px;
  overflow: hidden;
}
.item-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.metric {
  padding: 9px 6px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
}
.metric-label {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-bottom: 3px;
}
.metric-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1.2;
}
.progress-wrap {
  height: 7px;
  background: var(--ink-100);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #2563eb);
  transition: width .35s var(--ease);
}
.progress-bar.bar-warn { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-bar.bar-full { background: linear-gradient(90deg, #ef4444, #dc2626); }
.progress-text {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-bottom: 12px;
}
.item-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed var(--ink-200);
  margin-bottom: 10px;
}
.item-status { display: inline-flex; align-items: center; gap: 6px; }
.item-card-ops {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.item-card-ops .btn { flex: none; }
@media (max-width: 768px) {
  .item-grid { grid-template-columns: 1fr; }
  .batch-actions { margin-left: 0; width: 100%; }
  .item-card-ops .btn { flex: 1; min-width: 64px; }
}