/* ==========================================================================
   交友相亲平台 · 运营后台
   设计系统：浅色专业底 + 玫红品牌色（婚恋调性）+ 深色侧栏
   ========================================================================== */

:root {
  --brand: #d9446d;
  --brand-600: #c23a5f;
  --brand-50: #fdf2f5;
  --brand-100: #fbe1e9;

  --bg: #f4f5f7;
  --panel: #ffffff;
  --sidebar: #171c28;
  --sidebar-2: #1f2534;

  --text: #1b2030;
  --text-2: #5b6472;
  --text-3: #8b93a1;

  --line: #e7eaf0;
  --line-2: #f1f3f7;

  --green: #12805c;
  --green-bg: #e6f6ef;
  --amber: #9a6000;
  --amber-bg: #fdf3dc;
  --red: #c0362c;
  --red-bg: #fdecea;
  --blue: #1d4ed8;
  --blue-bg: #e8effd;
  --purple: #6b3fa0;
  --purple-bg: #f2ecfb;
  --teal: #0d6e78;
  --teal-bg: #e2f4f6;
  --cyan: #0e6b8a;
  --cyan-bg: #e4f3f8;
  --orange: #a85410;
  --orange-bg: #fdeede;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 10px 28px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 12px 48px rgba(16, 24, 40, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }

/* ------------------------------ 登录页 ------------------------------ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--panel);
}
.login-art {
  position: relative;
  background: linear-gradient(150deg, #2a1b28 0%, #4a1f33 45%, #d9446d 130%);
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-art::before,
.login-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}
.login-art::before { width: 460px; height: 460px; right: -150px; top: -120px; }
.login-art::after { width: 300px; height: 300px; left: -110px; bottom: -90px; }
.login-art .brand-mark { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }
.login-art .brand-mark .dot {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #ff8fae, #d9446d);
  display: grid; place-items: center; font-size: 17px;
}
.login-art h2 { font-size: 34px; line-height: 1.4; font-weight: 600; position: relative; z-index: 1; max-width: 420px; }
.login-art .sub { color: rgba(255, 255, 255, 0.72); margin-top: 16px; font-size: 14px; line-height: 1.9; max-width: 400px; position: relative; z-index: 1; }
.login-art .points { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.login-art .points div { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.82); font-size: 13.5px; }
.login-art .points i {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); display: grid; place-items: center;
  font-size: 11px; font-style: normal;
}

.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { font-size: 24px; margin-bottom: 8px; }
.login-card .tip { color: var(--text-3); font-size: 13px; margin-bottom: 32px; }
.login-card .btn { width: 100%; height: 44px; margin-top: 8px; font-size: 15px; }
.login-note {
  margin-top: 28px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--brand-50); color: var(--brand-600); font-size: 12.5px; line-height: 1.7;
}

/* ------------------------------ 主框架 ------------------------------ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--sidebar);
  color: #cbd2df;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .logo {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.3px;
}
.sidebar .logo .dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #ff8fae, #d9446d);
  display: grid; place-items: center; font-size: 15px;
}
.sidebar .logo small { display: block; font-size: 11px; color: #7d8698; font-weight: 400; letter-spacing: 0.4px; margin-top: 2px; }

.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav .group-label {
  font-size: 11px; color: #5f6878; letter-spacing: 1px;
  padding: 14px 12px 6px; text-transform: uppercase;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: #c2cad9; font-size: 14px; position: relative;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.055); color: #fff; }
.nav a.active { background: rgba(217, 68, 109, 0.16); color: #fff; font-weight: 500; }
.nav a.active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav a .ico { width: 18px; text-align: center; opacity: 0.85; font-size: 15px; }
.nav a .badge {
  margin-left: auto; background: var(--brand); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 500;
}

.sidebar-foot {
  padding: 14px 18px; border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px; color: #6b7486; line-height: 1.7;
}
.sidebar-foot .dot-ok, .sidebar-foot .dot-bad {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px;
}
.dot-ok { background: #35c98a; }
.dot-bad { background: #f0574d; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 62px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 26px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .crumb { color: var(--text-3); font-size: 13px; }
.topbar .crumb b { color: var(--text); font-weight: 500; }
.topbar .spacer { flex: 1; }
.topbar .quick {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-2); font-size: 13px;
  padding: 6px 12px; border-radius: 20px; background: var(--line-2);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #ffa8c1, #d9446d);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.user-box { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px; border-radius: 20px; }
.user-box:hover { background: var(--line-2); }
.user-box .meta { line-height: 1.25; }
.user-box .meta b { font-size: 13.5px; font-weight: 500; }
.user-box .meta span { font-size: 11.5px; color: var(--text-3); display: block; }

.content { padding: 24px 26px 40px; flex: 1; max-width: 1560px; width: 100%; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 21px; letter-spacing: -0.2px; }
.page-head p { margin: 6px 0 0; color: var(--text-3); font-size: 13px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ------------------------------ 卡片 ------------------------------ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 15px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat .label { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.stat .value { font-size: 28px; font-weight: 600; letter-spacing: -0.6px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 4px; }
.stat .hint { color: var(--text-3); font-size: 12px; margin-top: 6px; }
.stat .icon {
  position: absolute; right: 16px; top: 16px;
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px;
}
.stat.brand .icon { background: var(--brand-50); color: var(--brand); }
.stat.blue .icon { background: var(--blue-bg); color: var(--blue); }
.stat.green .icon { background: var(--green-bg); color: var(--green); }
.stat.amber .icon { background: var(--amber-bg); color: var(--amber); }

/* ------------------------------ 表格 ------------------------------ */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.toolbar .spacer { flex: 1; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead th {
  text-align: left; font-weight: 500; color: var(--text-3); font-size: 12.5px;
  padding: 11px 16px; background: #fafbfc; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table tbody td {
  padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fcfcfd; }
.table .num { font-variant-numeric: tabular-nums; color: var(--text-2); }
.table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--text-2); }
.table .strong { font-weight: 500; }
.table .row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.table .sub { color: var(--text-3); font-size: 12px; }

.empty {
  padding: 56px 20px; text-align: center; color: var(--text-3);
}
.empty .big { font-size: 30px; opacity: 0.35; margin-bottom: 10px; }
.empty p { margin: 0 0 4px; }

.pager {
  display: flex; align-items: center; gap: 8px; padding: 14px 20px;
  border-top: 1px solid var(--line-2); color: var(--text-2); font-size: 13px;
}
.pager .spacer { flex: 1; }
.pager button {
  min-width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; color: var(--text-2); cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button:disabled { opacity: 0.45; cursor: not-allowed; }
.pager button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ------------------------------ 控件 ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; font-size: 13.5px; transition: 0.15s; white-space: nowrap;
}
.btn:hover { border-color: #cdd3de; background: #fbfbfc; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-danger { color: var(--red); border-color: #f3cdc9; background: #fff; }
.btn-danger:hover { background: var(--red-bg); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--line-2); color: var(--text); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-link { border: none; background: none; color: var(--brand); padding: 0; height: auto; cursor: pointer; font-size: 13px; }
.btn-link:hover { text-decoration: underline; }

.input, .select, .textarea {
  height: 34px; padding: 0 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; color: var(--text);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s; min-width: 0;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(217, 68, 109, 0.12);
}
.input::placeholder { color: #aeb5c1; }
.textarea { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.select { padding-right: 28px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238b93a1' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input.w-140, .select.w-140 { width: 140px; }
.input.w-180, .select.w-180 { width: 180px; }
.input.w-220, .select.w-220 { width: 220px; }

.search-box { position: relative; }
.search-box .input { padding-left: 30px; width: 220px; }
.search-box::before {
  content: "⌕"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 15px;
}

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.field > label b { color: var(--red); font-weight: 400; margin-left: 2px; }
.field .input, .field .select, .field .textarea { width: 100%; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; white-space: nowrap; background: var(--line-2); color: var(--text-2);
}
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.tag-red { background: var(--red-bg); color: var(--red); }
.tag-blue { background: var(--blue-bg); color: var(--blue); }
.tag-purple { background: var(--purple-bg); color: var(--purple); }
.tag-teal { background: var(--teal-bg); color: var(--teal); }
.tag-cyan { background: var(--cyan-bg); color: var(--cyan); }
.tag-orange { background: var(--orange-bg); color: var(--orange); }
.tag-gray { background: #eef0f4; color: #6b7280; }

/* ------------------------------ 抽屉 / 弹窗 ------------------------------ */
.mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, 0.36);
  opacity: 0; transition: opacity 0.2s; z-index: 100;
}
.mask.show { opacity: 1; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw;
  background: #fff; z-index: 101; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}
.drawer.show { transform: none; }
.drawer-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.drawer-head h3 { font-size: 16px; }
.drawer-head .close { margin-left: auto; }
.drawer-body { padding: 22px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: #fcfcfd; }

.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(0.97);
  background: #fff; border-radius: var(--radius); z-index: 101; width: 420px; max-width: 92vw;
  box-shadow: var(--shadow-lg); opacity: 0; transition: 0.2s; overflow: hidden;
}
.modal.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-head { padding: 20px 22px 0; font-size: 16px; font-weight: 600; }
.modal-body { padding: 12px 22px 4px; color: var(--text-2); line-height: 1.7; font-size: 13.5px; }
.modal-foot { padding: 18px 22px; display: flex; gap: 10px; justify-content: flex-end; }

/* Toast */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #1f2532; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13.5px;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-8px); transition: 0.22s;
  display: flex; align-items: center; gap: 8px; max-width: 460px;
}
.toast.show { opacity: 1; transform: none; }
.toast.err { background: #b3271e; }
.toast.ok { background: #10704f; }

/* ------------------------------ 业务组件 ------------------------------ */
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 12px 14px; font-size: 13.5px; }
.kv dt { color: var(--text-3); font-size: 12.5px; }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }

.section-title {
  font-size: 13px; color: var(--text-3); font-weight: 500;
  margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2);
}
.section-title:first-child { margin-top: 0; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.timeline .item { position: relative; padding-bottom: 16px; }
.timeline .item::before {
  content: ""; position: absolute; left: -18px; top: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid var(--brand);
}
.timeline .item .t { font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.timeline .item .c { font-size: 13.5px; line-height: 1.6; }
.timeline .item .m { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* 漏斗 */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel .row { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 12px; }
.funnel .row .name { font-size: 13px; color: var(--text-2); }
.funnel .bar { height: 26px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.funnel .bar i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #f0779a, var(--brand));
  transition: width 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
.funnel .row .val { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 500; }

.hbar { display: flex; flex-direction: column; gap: 14px; }
.hbar .row { display: grid; grid-template-columns: 120px 1fr 48px; align-items: center; gap: 12px; }
.hbar .row .name { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.hbar .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #9bb6ff, #4f74e3); }
.hbar .row .val { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-2); }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.photo-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-strip .ph {
  width: 72px; height: 88px; border-radius: 8px; background: var(--line-2);
  overflow: hidden; position: relative; border: 1px solid var(--line);
}
.photo-strip .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-strip .ph .cover {
  position: absolute; left: 0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.55);
  color: #fff; font-size: 10px; text-align: center; padding: 2px 0;
}
.photo-strip .ph .del {
  position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.5); color: #fff; border: none; cursor: pointer; font-size: 10px; line-height: 1;
}

.photo-url-row { display: flex; gap: 8px; margin-bottom: 8px; }
.photo-url-row .input { flex: 1; }

.skeleton { background: linear-gradient(90deg, #f2f3f6 25%, #e9ebf0 37%, #f2f3f6 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 6px; height: 14px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.alert {
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.7;
  background: var(--amber-bg); color: var(--amber); margin-bottom: 16px;
}
.alert.err { background: var(--red-bg); color: var(--red); }
.alert.info { background: var(--blue-bg); color: var(--blue); }

/* 页内标签页（渠道 / 推广短链 等同一页面下的多个列表） */
.tabs {
  display: flex; gap: 4px; padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.tab {
  appearance: none; border: none; background: none; cursor: pointer;
  padding: 12px 14px 11px; font-size: 13.5px; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* 页首按钮切换标签页时用 hidden 显隐；.btn 是 display:inline-flex 会盖掉 hidden，需要这里兜住 */
.page-head .actions [hidden] { display: none; }

/* 响应式 */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .sidebar { width: 64px; flex-basis: 64px; }
  .sidebar .logo span, .nav a span:not(.ico), .nav .group-label, .sidebar-foot { display: none; }
  .content { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* 活动列表缩略图（封面 + 是否已配宣传图） */
.a-cell { display: flex; gap: 10px; align-items: center; }
.a-thumb {
  position: relative; width: 44px; height: 44px; flex: none; overflow: hidden;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; font-size: 15px; font-weight: 600;
}
.a-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a-thumb .thumb-ph { display: grid; place-items: center; width: 100%; height: 100%; }
.thumb-flag {
  position: absolute; right: 0; bottom: 0; padding: 2px 3px;
  font-size: 10px; line-height: 1; font-weight: 500;
  border-radius: 4px 0 0 0; background: rgba(217, 68, 109, 0.92); color: #fff;
}

/* 图片地址预览（活动封面 / 宣传图） */
.img-preview {
  margin-top: 8px; padding: 8px; min-height: 54px;
  border: 1px dashed var(--line); border-radius: 8px; background: #fafbfc;
  display: flex; align-items: center; gap: 10px;
}
.img-preview img { width: 128px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.img-preview-tall img { width: auto; height: auto; max-width: 150px; max-height: 220px; object-fit: contain; }
.img-preview .pv-empty { font-size: 12px; color: var(--text-3); }

/* ---------------- 图片上传（本地文件 → 服务器） ---------------- */
.img-field { display: flex; gap: 8px; align-items: center; }
.img-field .input { flex: 1; }
.img-field .btn { flex: none; height: 34px; }

.btn-xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 6px; }

.upload-bar {
  margin-top: 8px; display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-3);
}
.upload-bar > i {
  display: block; height: 4px; flex: 1; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand) 50%, var(--line-2) 50%);
  background-size: 200% 100%; animation: up 1s linear infinite;
}
@keyframes up { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.img-meta { margin-top: 6px; font-size: 12px; color: var(--text-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.img-addr { margin-top: 8px; display: grid; gap: 6px; }
.addr-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px;
  background: #fafbfc; border: 1px solid var(--line);
}
.addr-row.addr-active { background: var(--brand-50); border-color: rgba(217, 68, 109, 0.35); }
/* 分发地址还没回填（CDN 待同步）：整行淡化，值显示「待 CDN 同步」 */
.addr-row.addr-empty { opacity: .72; border-style: dashed; }
.addr-row.addr-empty .addr-val { color: var(--text-3); font-family: inherit; }
.addr-tag {
  flex: none; font-size: 11px; padding: 2px 6px; border-radius: 4px;
  background: var(--line-2); color: var(--text-2);
}
.addr-tag.dist { background: var(--brand-50); color: var(--brand); }
.addr-val {
  flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* hidden 属性优先级必须压过上面的 display 设置 */
.upload-bar[hidden], .img-addr[hidden], .img-meta[hidden] { display: none; }

/* 小程序用户：列表头像 + 详情相册 */
.au-user { display: flex; align-items: center; gap: 10px; }
.au-ava, .au-ava-ph {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  object-fit: cover; background: #f2e9ec;
}
.au-ava-ph {
  display: flex; align-items: center; justify-content: center;
  color: #b9a6ac; font-size: 13px;
}
.au-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.au-photos img {
  width: 56px; height: 56px; border-radius: 8px;
  object-fit: cover; background: #f5f5f5; cursor: zoom-in;
}

/* ==========================================================================
   站点配置（pages/siteconfig.js）
   左：分组表单；右：客户端效果预览（分享卡 / 客服 / 页脚，随输入实时更新）
   ========================================================================== */
.sc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.sc-main { min-width: 0; }
.sc-side { position: sticky; top: 16px; display: grid; gap: 16px; }

@media (max-width: 1180px) {
  .sc-layout { grid-template-columns: 1fr; }
  .sc-side { position: static; }
}

.sc-group { margin-bottom: 16px; }
.sc-group:last-child { margin-bottom: 0; }
.sc-group .card-head h3 { display: flex; align-items: center; }
.sc-group-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-right: 8px;
  border-radius: 6px; background: var(--brand-50); color: var(--brand);
  font-size: 12px; font-weight: 400;
}
.sc-group-hint { font-size: 12px; color: var(--text-3); }

/* 图片字段：logo/二维码是方形，用 contain 避免被裁 */
.sc-img-preview img { width: 72px; height: 72px; object-fit: contain; background: #fff; }

/* 页头右侧的保存状态 */
.sc-state { font-size: 12px; color: var(--text-3); }
.sc-state.dirty { color: var(--amber); }
.sc-state.dirty::before { content: '●'; margin-right: 4px; }

.sc-dict-tip { margin-bottom: 16px; }

/* 预览面板 */
.sc-pv-label {
  margin: 14px 0 8px; font-size: 11.5px; letter-spacing: .4px;
  color: var(--text-3); text-transform: uppercase;
}
.sc-pv-label:first-child { margin-top: 0; }

.sc-pv-share {
  display: flex; gap: 10px; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: #fafbfc;
}
.sc-pv-thumb {
  flex: none; width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fbe1e9, #f6dbe2);
}
.sc-pv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sc-pv-thumb i { font-style: normal; font-size: 11px; color: var(--brand); }

.sc-pv-share-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sc-pv-share-text b {
  font-size: 13px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-pv-share-text span {
  font-size: 11.5px; color: var(--text-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-pv-share-text em { font-style: normal; font-size: 11px; color: var(--text-3); margin-top: auto; }

.sc-pv-service { border: 1px solid var(--line); border-radius: 10px; padding: 2px 10px; background: #fafbfc; }
.sc-pv-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line-2);
}
.sc-pv-row:last-child { border-bottom: none; }
.sc-pv-row span { color: var(--text-3); flex: none; }
.sc-pv-row b { font-weight: 500; text-align: right; word-break: break-all; }

.sc-pv-qr { padding: 8px 0; text-align: center; }
.sc-pv-qr img {
  width: 96px; height: 96px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}

.sc-pv-foot { font-size: 11.5px; color: var(--text-3); line-height: 1.9; word-break: break-all; }
.sc-pv-empty { color: var(--text-3); }

.sc-pv-note {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--text-3); line-height: 1.7;
}
.sc-pv-note code, .sc-help code {
  background: var(--line-2); border-radius: 4px; padding: 1px 4px; font-size: 11px;
}

.sc-help p { margin: 0 0 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.sc-help p:last-child { margin-bottom: 0; }
