@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Noto+Sans+SC:wght@400;500;700&display=swap");

/* 与首页一致的蓝黑风格 */
:root {
  --bg: #0f172a;
  --surface: rgba(30, 41, 59, 0.88);
  --surface-solid: #1e293b;
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --line: #334155;
  --side: #0f172a;
  --side-2: #1e293b;
  --accent: #38bdf8;
  --accent-2: #0ea5e9;
  --accent-deep: #1d4ed8;
  --warn: #fb923c;
  --danger: #f87171;
  --ok: #34d399;
  --shadow: 0 12px 36px rgba(2, 8, 23, 0.35);
  --radius: 14px;
  --font: "DM Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #1d4ed8 0%, transparent 50%),
    radial-gradient(900px 500px at 100% 0%, #0ea5e9 0%, transparent 45%),
    var(--bg);
  background-attachment: fixed;
}

.hidden { display: none !important; }

/* ===== Login ===== */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 24px;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1d4ed8 0%, transparent 50%),
    radial-gradient(900px 500px at 100% 0%, #0ea5e9 0%, transparent 45%),
    var(--bg);
}
.login-card {
  position: relative;
  width: min(420px, 100%);
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 40px 32px 28px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  animation: rise 0.45s ease;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.login-brand {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.35;
}
.login-sub { margin: 6px 0 28px; color: var(--muted); line-height: 1.5; }
.login-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--muted);
}
.table-wrap {
  position: relative;
  min-height: 120px;
  transition: opacity 0.15s ease;
  overflow-x: auto;
  border: 1px solid #334155;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
}
.panel.list-loading .table-wrap {
  opacity: 0.55;
  pointer-events: none;
}
.panel.list-loading .table-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.12));
  pointer-events: none;
}
.panel.list-loading .table-wrap::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  pointer-events: none;
}

.global-loading {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: rgba(2, 8, 23, 0.45);
}
.global-loading.is-on {
  display: grid;
}
.global-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 36px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid #334155;
  color: #e2e8f0;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.global-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(148, 163, 184, 0.25);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-card input:not([type="radio"]):not([type="checkbox"]),
.content input:not([type="radio"]):not([type="checkbox"]),
.content select,
.content textarea,
.modal input:not([type="radio"]):not([type="checkbox"]),
.modal select,
.modal textarea {
  width: 100%;
  min-height: 0;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: rgba(15, 23, 42, 0.65);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.login-card input::placeholder,
.content input::placeholder,
.modal input::placeholder {
  color: #64748b;
}
.login-card input:not([type="radio"]):not([type="checkbox"]):focus,
.content input:not([type="radio"]):not([type="checkbox"]):focus,
.content select:focus,
.modal input:not([type="radio"]):not([type="checkbox"]):focus,
.modal select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.login-tip { margin: 18px 0 0; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ===== Shell ===== */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}
.sidebar {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-right: 1px solid #334155;
  color: var(--ink);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: blur(10px);
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 10px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #38bdf8, #1d4ed8);
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand strong { display: block; font-size: 0.95rem; letter-spacing: 0.02em; color: #fff; line-height: 1.3; }
.brand small { color: var(--muted); }
#nav { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow-y: auto; }
#nav button, .logout {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s, color 0.15s;
}
#nav button:hover, .logout:hover { background: rgba(56, 189, 248, 0.1); color: #fff; }
#nav button.active {
  background: rgba(56, 189, 248, 0.16);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}
.nav-group-title::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(-45deg);
  margin-left: 8px;
  transition: transform 0.15s;
}
.nav-group.open > .nav-group-title::after {
  transform: rotate(45deg);
  margin-top: -4px;
}
.nav-group.has-active > .nav-group-title { color: #fff; }
.nav-group-items {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 6px 6px;
  margin: 0 0 4px 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}
.nav-group.open > .nav-group-items { display: flex; }
#nav .nav-group-items button {
  padding: 8px 12px 8px 14px;
  font-size: 0.9rem;
  color: #94a3b8;
}
.logout {
  border: 1px solid #475569;
  margin-top: auto;
}

.main { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.content-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}
.content-cover {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: none;
  place-items: center;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1d4ed8 0%, transparent 50%),
    radial-gradient(900px 500px at 100% 0%, #0ea5e9 0%, transparent 45%),
    var(--bg);
  background-attachment: fixed;
}
.content-cover.is-on { display: grid; }
.content-cover-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 28px 8px;
}
.topbar h1 { margin: 0; font-size: 1.55rem; color: #fff; }
.view-desc { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  backdrop-filter: blur(8px);
}
.content { padding: 12px 28px 40px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.panel h3 { color: #fff; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
.table-wrap code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: #7dd3fc;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 0.85rem; }
.stat .value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.filter-bar input,
.filter-bar select,
.filter-bar .ss-wrap {
  min-width: 160px;
  max-width: 260px;
  flex: 1;
}
.filter-bar .btn-primary { flex: 0 0 auto; min-width: auto; }

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.pager-info { color: var(--muted); font-size: 0.88rem; }
.pager-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pager-actions button:disabled { opacity: 0.4; cursor: not-allowed; }
.pager-actions select { width: auto; min-width: 90px; padding: 8px 10px; }

.field-error,
.form-error,
.error {
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0;
}
.field-error {
  display: block;
  min-height: 1.1em;
  margin-top: 4px;
}
.form-error {
  display: none;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.1);
}
.form-error.show { display: block; }
.error { min-height: 1.2em; margin: 10px 0 0; }
input.invalid, select.invalid, textarea.invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18) !important;
}
.sub-line {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}
.hint-line {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
}
.ellipsis {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn, .btn-primary, .btn-ghost, .btn-danger, .actions button,
.ops button, .modal-actions button, .filter-bar button,
.panel td button, .modal td button, .toolbar button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s, border-color 0.15s;
}
.btn:active, .btn-primary:active { transform: translateY(1px); }
.btn-primary, .btn-block {
  background: var(--accent);
  color: #0f172a;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-block { width: 100%; padding: 12px; margin-top: 4px; }
.btn-ghost, .actions button,
.ops button, .modal-actions button:not(.btn-primary),
.panel td button:not(.btn-primary), .modal td button:not(.btn-primary),
.toolbar button:not(.btn-primary), .filter-bar button:not(.btn-primary) {
  background: transparent;
  border-color: #475569;
  color: var(--ink);
}
.btn-ghost:hover, .actions button:hover,
.ops button:hover, .modal-actions button:not(.btn-primary):hover,
.panel td button:not(.btn-primary):hover, .modal td button:not(.btn-primary):hover,
.toolbar button:not(.btn-primary):hover, .filter-bar button:not(.btn-primary):hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(56, 189, 248, 0.1);
}
.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.35);
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.92rem;
  table-layout: auto;
}
th, td {
  border: 1px solid #334155;
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
}
thead th {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.82rem;
  background: rgba(30, 41, 59, 0.95);
  white-space: nowrap;
}
tbody td {
  background: rgba(15, 23, 42, 0.25);
  color: #e2e8f0;
}
tbody tr:hover td {
  background: rgba(30, 58, 138, 0.22);
}
.table-wrap .sub-line {
  text-align: center;
  margin-top: 4px;
}
th.actions,
td.actions {
  text-align: center;
  white-space: normal;
}
.actions button {
  margin: 2px;
  padding: 6px 10px;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.table-wrap .badge {
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
}
.badge.ok { background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.badge.warn { background: rgba(251, 146, 60, 0.15); color: var(--warn); }
.badge.bad { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.badge.muted { background: rgba(148, 163, 184, 0.15); color: var(--muted); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 12px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.72);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 16px;
  overflow: hidden;
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: rgba(30, 41, 59, 0.96);
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  color: var(--ink);
}
.modal.modal-wide {
  width: min(1180px, calc(100vw - 40px));
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  overflow: hidden;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
}
.modal.modal-wide > .merchant-form-page,
.modal.modal-wide > .product-form-page,
.modal.modal-wide > .product-wizard {
  flex: 1;
  min-height: 0;
  height: 100%;
}
.modal h3 { margin: 0 0 14px; color: #fff; }
.modal.modal-wide h3 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.modal label { display: grid; gap: 6px; margin-bottom: 14px; font-size: 0.9rem; color: var(--muted); }
.modal.modal-wide label { margin-bottom: 14px; gap: 6px; }

.merchant-form-page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  height: 100%;
}
.merchant-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 28px;
  border-bottom: 1px solid #334155;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.35), rgba(15, 23, 42, 0.2));
  flex-shrink: 0;
}
.merchant-form-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.merchant-form-actions-top { display: none; }
.file-field.is-invalid .btn-file {
  border-color: var(--danger);
}
.merchant-form-body {
  min-height: 0;
  overflow: auto;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(15, 23, 42, 0.25);
}
.merchant-form:not(.merchant-audit-page) .merchant-form-body {
  overflow: auto;
}
.merchant-form:not(.merchant-audit-page) .form-section-shop {
  position: relative;
  z-index: 1;
}
.merchant-form-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
  flex: 1;
}
.merchant-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 28px;
  border-top: 1px solid #334155;
  background: rgba(15, 23, 42, 0.55);
  flex-shrink: 0;
}
.merchant-form-footer .hint-line {
  margin: 0;
  flex: 1;
  min-width: 220px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}
.merchant-form-footer .modal-actions { margin: 0; }

.form-section {
  border: 1px solid #475569;
  border-radius: 14px;
  padding: 0;
  margin: 0;
  background: rgba(30, 41, 59, 0.72);
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.form-section-shop {
  overflow: visible;
  min-height: 0;
  flex-shrink: 0;
}
.form-section-shop .form-section-body {
  padding: 18px 22px 14px;
  overflow: visible;
}
.merchant-form-bottom .form-section { min-height: 0; }
.form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.9);
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.28), transparent 75%);
  flex-shrink: 0;
}
.form-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}
.form-section-tip {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
}
.form-section-body {
  padding: 18px 20px 10px;
  flex: 1;
}
.form-section .split { gap: 16px; }
.form-section .split-3 { margin-bottom: 0; gap: 12px; }
.form-section .split-3 label { margin-bottom: 12px; }
.shop-top {
  display: grid;
  grid-template-columns: 150px minmax(260px, 1.15fr) minmax(260px, 1fr);
  gap: 22px;
  align-items: start;
  min-height: 0;
}
.shop-fields,
.shop-addr,
.addr-block { min-width: 0; }
.shop-fields textarea { min-height: 110px !important; }
.shop-top .avatar-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
  min-height: 0;
}
.shop-top .file-preview {
  margin-top: 4px;
  overflow: visible;
}
.shop-top .file-preview img,
.shop-top .file-preview .file-preview-btn img,
.file-preview.avatar-preview img,
.file-preview.avatar-preview .file-preview-btn img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.file-field { margin-bottom: 14px; }
.file-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.file-hint {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-file {
  appearance: none;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.75);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-file:hover {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
}
.file-name {
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-all;
  flex: 1;
  min-width: 0;
}
.file-preview { margin-top: 10px; }
.file-preview .file-preview-btn {
  width: auto;
  display: inline-block;
}
.file-preview img,
.file-preview .file-preview-btn img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f172a;
  display: block;
}
.file-preview.avatar-preview img,
.file-preview.avatar-preview .file-preview-btn img {
  border-radius: 50%;
}
.idcard-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 2px;
}
.modal.modal-wide input:not([type="radio"]):not([type="checkbox"]),
.modal.modal-wide select {
  min-height: 42px;
  padding: 10px 12px;
}
.modal.modal-wide textarea {
  min-height: 88px;
  padding: 10px 12px;
}
.modal.modal-wide .modal-actions {
  margin-top: 0;
  padding-top: 0;
  gap: 10px;
}
.modal.modal-wide .modal-actions .btn-primary,
.modal.modal-wide .modal-actions .btn-ghost {
  min-width: 96px;
  padding: 10px 18px;
}

/* 商家编辑：仍用「上店铺、下资质/法人」布局，加宽并压缩间距，避免出现滚动条 */
.modal.modal-merchant-edit {
  width: min(1480px, calc(100vw - 24px));
  height: calc(100vh - 16px);
  max-height: calc(100vh - 16px);
  overflow: hidden;
}
.modal.modal-merchant-edit .merchant-form-header {
  padding: 12px 24px;
}
.modal.modal-merchant-edit .merchant-form-sub {
  margin: 4px 0 0;
}
.modal.modal-merchant-edit .merchant-form-footer {
  padding: 10px 24px;
}
.modal.modal-merchant-edit .merchant-form-body {
  overflow: hidden;
  padding: 12px 20px;
  gap: 12px;
}
.modal.modal-merchant-edit .form-section-head {
  padding: 10px 16px;
}
.modal.modal-merchant-edit .form-section-shop .form-section-body,
.modal.modal-merchant-edit .form-section-body {
  padding: 12px 16px 8px;
}
.modal.modal-merchant-edit label {
  margin-bottom: 8px;
  gap: 4px;
}
.modal.modal-merchant-edit .form-section .split { gap: 12px; }
.modal.modal-merchant-edit .form-section .split-3 { gap: 10px; }
.modal.modal-merchant-edit .form-section .split-3 label { margin-bottom: 8px; }
.modal.modal-merchant-edit .shop-top {
  grid-template-columns: 132px minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
}
.modal.modal-merchant-edit input:not([type="radio"]):not([type="checkbox"]),
.modal.modal-merchant-edit select {
  min-height: 36px;
  padding: 7px 10px;
}
.modal.modal-merchant-edit textarea {
  min-height: 72px;
  padding: 8px 10px;
}
.modal.modal-merchant-edit .shop-fields textarea {
  min-height: 72px !important;
}
.modal.modal-merchant-edit .file-field { margin-bottom: 8px; }
.modal.modal-merchant-edit .file-label { margin-bottom: 4px; }
.modal.modal-merchant-edit .file-preview { margin-top: 6px; }
.modal.modal-merchant-edit .shop-top .file-preview img,
.modal.modal-merchant-edit .shop-top .file-preview .file-preview-btn img,
.modal.modal-merchant-edit .file-preview.avatar-preview img,
.modal.modal-merchant-edit .file-preview.avatar-preview .file-preview-btn img {
  width: 108px;
  height: 108px;
}
.modal.modal-merchant-edit .file-preview img,
.modal.modal-merchant-edit .file-preview .file-preview-btn img {
  width: 84px;
  height: 84px;
}
.modal.modal-merchant-edit .file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal.modal-merchant-edit .merchant-form-bottom {
  min-height: 0;
  gap: 12px;
}
.modal.modal-merchant-edit .merchant-form-bottom .form-section-body {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .shop-top { grid-template-columns: 150px 1fr; }
  .shop-addr { grid-column: 1 / -1; }
  .merchant-form-bottom { grid-template-columns: 1fr; }
  /* 编辑页保持三列店铺 + 两列底部，避免叠成一列撑出滚动条 */
  .modal.modal-merchant-edit .shop-top {
    grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
  }
  .modal.modal-merchant-edit .shop-addr { grid-column: auto; }
  .modal.modal-merchant-edit .merchant-form-bottom { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .modal-mask { padding: 8px; overflow-y: auto; place-items: start center; }
  .modal.modal-wide {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .merchant-form-page { height: auto; display: block; }
  .merchant-form-header,
  .merchant-form-body,
  .merchant-form-footer { padding-left: 16px; padding-right: 16px; }
  .shop-top { grid-template-columns: 1fr; gap: 14px; min-height: 0; }
  .form-section-shop { min-height: 0; }
  .idcard-pair { grid-template-columns: 1fr; }
  .form-section-head { padding: 12px 14px; }
  .form-section-body { padding: 14px 14px 8px; }
  .audit-footer { flex-direction: column; align-items: stretch; }
  .audit-actions { justify-content: flex-start; }
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.modal .split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .split-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) {
  .modal .split-3 { grid-template-columns: 1fr; }
}
.modal hr { border-color: var(--line); }
.modal textarea {
  resize: vertical;
  min-height: 96px;
}
.modal input:not([type="radio"]):not([type="checkbox"]):focus,
.modal select:focus,
.modal textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-top: 10px;
  font-size: 0.9rem;
}
.detail-grid b {
  display: block;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.detail-grid span { color: #e2e8f0; word-break: break-all; }
.detail-grid .span-2 { grid-column: 1 / -1; }

/* —— 统一详情页 —— */
.detail-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9));
}
.detail-hero-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.detail-hero-text {
  min-width: 0;
}
.detail-hero-text h3 {
  margin: 0 0 6px;
  color: #f8fafc;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.detail-hero-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.detail-hero-chip {
  display: grid;
  gap: 4px;
  text-align: right;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  flex-shrink: 0;
}
.detail-hero-chip small {
  color: var(--muted);
  font-size: 0.75rem;
}
.detail-hero-chip strong {
  color: #7dd3fc;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.detail-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-page .form-section-body .split,
.detail-page .form-section-body .split-3 {
  margin-bottom: 0;
}
.detail-page .form-section-body .ro-field,
.detail-page .form-section-body .split,
.detail-page .form-section-body .split-3 {
  margin-bottom: 12px;
}
.detail-table-block {
  margin-top: 4px;
}
.detail-table-block .table-wrap {
  max-height: 320px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #334155;
}
.detail-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.detail-cover {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
  border: 1px solid #334155;
  flex-shrink: 0;
}
.detail-cover.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.audit-remark {
  margin-left: 8px;
  color: #fbbf24;
}
.ro-field { cursor: default; }
.ro-value {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  word-break: break-all;
}
.ro-value-multi {
  min-height: 88px;
  align-items: flex-start;
  white-space: pre-wrap;
  line-height: 1.5;
}
.audit-remark { margin-left: 8px; color: #fbbf24; }
.audit-decide-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(2, 8, 23, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 18px;
}
.audit-decide-layer[hidden] { display: none !important; }
.audit-decide-panel {
  width: min(420px, 100%);
  background: rgba(30, 41, 59, 0.98);
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.audit-decide-panel h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.15rem;
}
.audit-decide-options {
  display: flex;
  gap: 28px;
  margin: 18px 0 8px;
}
.audit-decide-opt {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.95rem;
}
.audit-decide-opt:has(input:checked) {
  color: #7dd3fc;
  font-weight: 600;
}
.audit-decide-opt input[type="radio"] {
  appearance: auto;
  -webkit-appearance: radio;
  width: 16px !important;
  height: 16px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  accent-color: #38bdf8;
  flex: none;
}
.audit-reject-reason {
  display: grid;
  gap: 8px;
  margin: 12px 0 8px;
}
.audit-reject-reason[hidden] {
  display: none !important;
}
.audit-reject-reason textarea { min-height: 88px; }
.merchant-audit-page { position: relative; }
.audit-log-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}
.audit-log-time { color: #94a3b8; margin-right: 6px; }
.audit-footer { flex-wrap: wrap; }
.audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.material-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.35);
  min-width: 0;
  margin-bottom: 8px;
}
.material-card-avatar {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}
.merchant-audit-page .avatar-thumb,
.material-card-avatar .material-thumb {
  width: auto;
  display: inline-block;
}
.merchant-audit-page .avatar-thumb img,
.material-card-avatar .material-thumb img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.material-card-avatar .material-actions {
  margin-top: 10px;
}
.material-title { color: #fff; font-size: 0.86rem; margin-bottom: 6px; }
.material-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: hidden;
}
.material-thumb img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  background: #0f172a;
  display: block;
}
.material-pdf { width: 100%; margin-bottom: 6px; }
.material-actions { margin-top: 8px; }
.material-name, .material-empty {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}
.img-preview-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2, 8, 23, 0.82);
  display: grid;
  place-items: center;
  padding: 20px;
}
.img-preview-layer[hidden] { display: none !important; }
.img-preview-panel {
  width: min(960px, 96vw);
  height: min(860px, 92vh);
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.img-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #334155;
  background: rgba(30, 41, 59, 0.95);
}
.img-preview-title {
  color: #fff;
  font-weight: 600;
}
.img-preview-body {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #020617;
}
.img-preview-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.img-preview-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
@media (max-width: 640px) {
  .detail-grid, .material-grid { grid-template-columns: 1fr; }
}
.perm-list {
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.4);
}
.perm-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
}
.perm-list input { width: auto; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 12px 16px;
  border-radius: 10px;
  z-index: 50;
  box-shadow: var(--shadow);
  animation: rise 0.25s ease;
  max-width: min(360px, calc(100vw - 40px));
}
.toast.error {
  background: rgba(69, 10, 10, 0.96);
  border-color: #f87171;
  color: #fecaca;
}
.toast.ok {
  background: rgba(6, 46, 34, 0.96);
  border-color: #34d399;
  color: #a7f3d0;
}

/* ===== Searchable Select ===== */
.ss-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}
.ss-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  pointer-events: none !important;
}
.ss-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 36px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.65);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.ss-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #94a3b8;
  transform: translateY(-40%);
}
.ss-wrap.ss-open .ss-trigger::after {
  transform: translateY(-40%) rotate(180deg);
}
.ss-trigger.is-placeholder { color: #94a3b8; }
.ss-wrap.is-disabled .ss-trigger {
  opacity: 0.55;
  cursor: not-allowed;
}
.ss-wrap.is-invalid .ss-trigger,
.ss-trigger.invalid {
  border-color: var(--danger) !important;
}
.ss-wrap.ss-open .ss-trigger {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.ss-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 120;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ss-panel[hidden] {
  display: none !important;
}
.ss-panel .ss-list {
  flex: 1;
  min-height: 0;
}
.ss-search-wrap {
  padding: 8px;
  border-bottom: 1px solid #334155;
}
.ss-search {
  width: 100% !important;
  min-height: 36px !important;
  padding: 8px 10px !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
.ss-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 220px;
  overflow: auto;
}
.ss-option {
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #e2e8f0;
  font-size: 0.9rem;
}
.ss-option:hover { background: rgba(56, 189, 248, 0.12); }
.ss-option.is-active {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}
.ss-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ss-empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}
.filter-bar .ss-wrap,
.pager .ss-wrap {
  width: auto;
  min-width: 120px;
}
.pager .ss-trigger {
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.modal .ss-wrap { margin-bottom: 0; }

/* —— 用户详情 / 流水 —— */
.detail-grid .span-2 { grid-column: 1 / -1; }
.user-profile { display: flex; flex-direction: column; gap: 18px; }
.user-profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #e0f2fe;
  background: linear-gradient(145deg, #0ea5e9, #0369a1);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
  flex-shrink: 0;
}
.user-profile-meta { flex: 1; min-width: 0; }
.user-profile-meta h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: #f8fafc;
}
.user-profile-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.user-balance-chip {
  text-align: right;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
}
.user-balance-chip small {
  display: block;
  color: #86efac;
  font-size: 0.75rem;
  margin-bottom: 2px;
}
.user-balance-chip strong {
  color: #bbf7d0;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.user-info-grid {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.7);
}
.user-card-block {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(51, 65, 85, 0.65);
}
.user-card-block .block-title {
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.bound-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(71, 85, 105, 0.5);
}
.bound-card-item strong { color: #f1f5f9; display: block; }
.bound-card-item small { color: var(--muted); }
.bound-card-item > span { color: #94a3b8; font-size: 0.82rem; white-space: nowrap; }
.empty-inline { margin: 0; color: var(--muted); font-size: 0.9rem; }

.ledger-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.ledger-sheet-head h3 { margin: 0; }
.ledger-sheet-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.ledger-filters {
  margin: 12px 0 14px;
  flex-wrap: wrap;
}
.ledger-filters input[type="date"] {
  min-width: 140px;
}
.ledger-table table tbody td { vertical-align: middle; }
.ledger-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #cbd5e1;
}
.cell-stack { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.cell-stack strong { color: #f1f5f9; font-weight: 600; }
.cell-stack small { color: var(--muted); font-size: 0.78rem; }
.amt-plus { color: #34d399; font-weight: 600; font-variant-numeric: tabular-nums; }
.amt-minus { color: #fb923c; font-weight: 600; font-variant-numeric: tabular-nums; }
.amt-zero { color: #94a3b8; font-variant-numeric: tabular-nums; }

.ledger-page-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(251, 146, 60, 0.12), transparent 50%),
    linear-gradient(120deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.ledger-page-intro strong {
  display: block;
  color: #f8fafc;
  font-size: 1rem;
  margin-bottom: 4px;
}
.ledger-page-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* —— 小程序管理 —— */
.mp-page {
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mp-hero {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.mp-hero-text h3 {
  margin: 0 0 6px;
  color: #f8fafc;
  font-size: 1.15rem;
  font-weight: 700;
}
.mp-hero-text p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}
.mp-logo-preview {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.28);
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.mp-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mp-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.mp-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.mp-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  overflow: hidden;
}
.mp-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.35);
}
.mp-card-head h4 {
  margin: 0;
  font-size: 0.98rem;
  color: #f1f5f9;
  font-weight: 700;
}
.mp-card-head span {
  color: var(--muted);
  font-size: 0.8rem;
}
.mp-card-body {
  padding: 16px 18px 8px;
}
.mp-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.mp-form label > span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
}
.mp-form input,
.mp-form select,
.mp-form textarea {
  width: 100%;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.75);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mp-form input:focus,
.mp-form select:focus,
.mp-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.mp-form textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
}
.mp-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}
.mp-badge.is-on {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
}
.mp-badge.is-off {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.mp-logo-field {
  margin-bottom: 14px;
}
.mp-field-label {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
}
.mp-logo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.mp-logo-actions .btn-ghost {
  padding: 10px 14px;
}
.mp-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.mp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.mp-footer .mp-hint {
  margin: 0;
  flex: 1;
  min-width: 200px;
}
.mp-footer .btn-primary {
  min-width: 128px;
  padding: 11px 20px;
}

@media (max-width: 960px) {
  .mp-grid { grid-template-columns: 1fr; }
  .mp-hero { align-items: flex-start; }
  .mp-card-head { flex-direction: column; gap: 4px; }
  .mp-footer { flex-direction: column; align-items: stretch; }
  .mp-footer .btn-primary { width: 100%; }
}

/* 商品管理 */
.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #334155;
  flex-shrink: 0;
}
.product-cover.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
}


.product-wizard {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.pw-header {
  padding: 22px 28px 8px;
  border-bottom: none;
  flex-shrink: 0;
  text-align: center;
}
.pw-header h3 { margin: 0; }
.pw-sub {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 520px;
}
.pw-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 28px 18px;
  flex-shrink: 0;
  overflow-x: auto;
}
.pw-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.35);
  color: #94a3b8;
  white-space: nowrap;
}
.pw-step.active {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.16);
  color: #e2e8f0;
}
.pw-step.done {
  border-color: rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
}
.pw-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.18);
}
.pw-step.active .pw-step-num {
  background: #0ea5e9;
  color: #0f172a;
}
.pw-step-title { font-size: 0.86rem; font-weight: 600; }
.pw-step-line {
  width: 18px;
  height: 1px;
  background: #475569;
  flex-shrink: 0;
}
.pw-body {
  min-height: 0;
  overflow: auto;
  padding: 8px 28px 24px;
  background: rgba(15, 23, 42, 0.22);
  display: flex;
  justify-content: center;
}
.pw-panel {
  display: none;
  width: min(720px, 100%);
  margin: 0 auto;
}
.pw-panel.active { display: block; }
.pw-panel-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #fff;
  text-align: center;
}
.pw-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.pw-panel-head .pw-panel-title {
  margin: 0;
  text-align: left;
}
.pw-tip {
  margin: 0 0 14px;
  color: #94a3b8;
  font-size: 0.86rem;
  text-align: center;
}
.pw-upload-row {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}
.pw-upload-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  margin: 0 !important;
  border-radius: 10px;
  border: 1px dashed #64748b;
  background: rgba(14, 165, 233, 0.1);
  color: #7dd3fc;
  cursor: pointer;
  font-weight: 600;
}
.pw-upload-btn:hover {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.18);
}
.image-chip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  min-height: 140px;
  padding: 14px;
  border: 1px solid #334155;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
}
.image-empty {
  width: 100%;
  min-height: 110px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #94a3b8;
  gap: 4px;
}
.image-empty strong { color: #e2e8f0; }
.image-empty p { margin: 0; font-size: 0.82rem; }
.image-chip.banner-chip {
  width: 220px;
  height: 110px;
}
.image-chip.is-cover {
  border-color: rgba(56, 189, 248, 0.75);
}
.image-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.cover-tag {
  position: absolute;
  left: 6px;
  top: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.95);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 22px;
}
.image-chip-actions {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 4px;
  padding: 6px;
  background: linear-gradient(180deg, transparent, rgba(2, 8, 23, 0.88));
}
.chip-btn {
  flex: 1;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: rgba(226, 232, 240, 0.16);
  color: #e2e8f0;
  font-size: 0.7rem;
  cursor: pointer;
}
.chip-btn.danger { background: rgba(248, 113, 113, 0.25); color: #fecaca; }

.sku-list { display: flex; flex-direction: column; gap: 12px; }
.sku-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #475569;
  background: rgba(15, 23, 42, 0.4);
}
.sku-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sku-card-index {
  font-weight: 700;
  color: #7dd3fc;
  font-size: 0.9rem;
}
.sku-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.sku-card-grid label { margin-bottom: 0 !important; min-width: 0; }
.sku-card-grid input { width: 100%; max-width: 100%; }
.sku-remove {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: transparent;
  color: #fca5a5;
  cursor: pointer;
}
.sku-remove:hover {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px 12px;
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  margin: 0 0 12px;
  border-radius: 12px;
  border: 1px solid #475569;
  background: rgba(15, 23, 42, 0.35);
}
.check-grid.tall { max-height: 240px; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 0.88rem;
  color: #e2e8f0;
  cursor: pointer;
}
.check-item input { margin-top: 3px; flex-shrink: 0; }
.check-item span { line-height: 1.35; }
.check-item em { font-style: normal; font-size: 0.8em; }

.spec-list { display: flex; flex-direction: column; gap: 12px; }
.spec-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #475569;
  background: rgba(15, 23, 42, 0.4);
}
.spec-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.spec-card-index {
  font-weight: 700;
  color: #7dd3fc;
  font-size: 0.9rem;
}
.spec-card-body {
  display: grid;
  gap: 12px;
}
.spec-card-body label { margin-bottom: 0 !important; }
.spec-values-wrap { display: grid; gap: 8px; }
.spec-values-label {
  color: #94a3b8;
  font-size: 0.82rem;
}
.spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #475569;
  background: rgba(15, 23, 42, 0.55);
}
.spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.18);
  color: #e0f2fe;
  font-size: 0.85rem;
}
.spec-tag-x {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.25);
  color: #fecaca;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.spec-tag-input {
  flex: 1;
  min-width: 120px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 4px 0 !important;
  height: auto !important;
  color: #e2e8f0;
}
.sku-gen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 10px;
}
.sku-matrix-host { margin-top: 4px; }
.sku-matrix-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  border: 1px dashed #475569;
  border-radius: 12px;
}
.sku-matrix-wrap {
  overflow: auto;
  border: 1px solid #475569;
  border-radius: 12px;
}
.sku-matrix {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.sku-matrix th,
.sku-matrix td {
  padding: 10px 12px;
  border-bottom: 1px solid #334155;
  text-align: left;
  vertical-align: middle;
}
.sku-matrix th {
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.sku-matrix td input {
  width: 100%;
  min-width: 0;
}
.sku-combo-cell strong {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 600;
}
.sku-matrix-count { margin-top: 8px; }

.pw-summary { margin-top: 18px; }
.pw-summary-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: rgba(14, 165, 233, 0.08);
}
.pw-summary-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.pw-summary-card span {
  color: #94a3b8;
  font-size: 0.8rem;
}
.pw-summary-card strong {
  color: #e2e8f0;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-top: 1px solid #334155;
  background: rgba(15, 23, 42, 0.6);
  flex-shrink: 0;
}
.pw-footer .form-error {
  width: min(720px, 100%);
  text-align: center;
}
.pw-footer-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: min(720px, 100%);
}
.pw-footer .modal-actions { margin: 0; }
.btn-sm {
  height: 32px !important;
  padding: 0 12px !important;
  font-size: 0.82rem !important;
}

/* 图文详情富文本 */
.rich-editor {
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.45);
  text-align: left;
}
.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #334155;
  background: rgba(30, 41, 59, 0.85);
}
.rich-toolbar button {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 0.82rem;
}
.rich-toolbar button:hover {
  border-color: #38bdf8;
  color: #7dd3fc;
}
.rich-body {
  min-height: 320px;
  max-height: min(52vh, 480px);
  overflow: auto;
  padding: 16px 18px;
  color: #e2e8f0;
  line-height: 1.7;
  outline: none;
}
.rich-body:empty::before {
  content: attr(data-placeholder);
  color: #64748b;
}
.rich-body p { margin: 0 0 12px; }
.rich-body h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: #fff;
}
.rich-body ul { margin: 0 0 12px; padding-left: 1.2rem; }
.rich-body img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .sku-card-grid { grid-template-columns: 1fr; }
  .pw-summary-card { grid-template-columns: 1fr; }
  .pw-body, .pw-header, .pw-steps, .pw-footer { padding-left: 16px; padding-right: 16px; }
  .rich-body { min-height: 240px; max-height: 42vh; }
}

.comment-list {
  max-height: 60vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.comment-item {
  padding: 12px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.7);
}
.comment-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.comment-reply {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: rgba(14, 165, 233, 0.12);
  border-radius: 8px;
  color: #7dd3fc;
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .image-upload-panel { grid-template-columns: 1fr; }
  .sku-card { grid-template-columns: 1fr; }
  .sku-card-index, .sku-remove { margin-top: 0; }
  .sku-card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
  #nav { flex-direction: row; flex-wrap: wrap; width: 100%; overflow: visible; }
  .nav-group { width: 100%; }
  .nav-group-items { margin-left: 0; border-left: 0; flex-direction: row; flex-wrap: wrap; }
  .logout { margin-top: 0; }
  .stats { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .modal .split { grid-template-columns: 1fr; }
}

.qr-thumb {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border: 2px solid #1d4ed8;
  border-radius: 8px;
  cursor: pointer;
  padding: 3px;
  background: linear-gradient(180deg, #eff6ff, #fff);
  box-shadow: 0 2px 6px rgba(29, 78, 216, .18);
  vertical-align: middle;
}
.qr-card {
  text-align: center;
  padding: 4px 8px 8px;
}
.qr-poster {
  width: 300px;
  margin: 0 auto 16px;
  background: linear-gradient(165deg, #0b3a82 0%, #1d4ed8 55%, #2563eb 100%);
  border-radius: 22px;
  padding: 18px 16px 16px;
  box-shadow: 0 16px 40px rgba(11, 58, 130, .28);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.qr-poster::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -40px;
  top: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, .35), transparent 70%);
  pointer-events: none;
}
.qr-poster-brand {
  position: relative;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
  padding: 2px 8px 10px;
}
.qr-poster-sub {
  position: relative;
  font-size: 11px;
  letter-spacing: .28em;
  opacity: .82;
  margin: -4px 0 12px;
}
.qr-poster-frame {
  position: relative;
  background: linear-gradient(180deg, #fff, #f8fbff);
  border-radius: 16px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 8px 20px rgba(8, 30, 80, .22);
}
.qr-poster-frame img,
.qr-lg {
  width: 220px;
  height: 220px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
}
.qr-poster-table {
  position: relative;
  margin-top: 14px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  padding: 10px 12px 12px;
}
.qr-poster-table .k {
  display: block;
  font-size: 11px;
  letter-spacing: .35em;
  opacity: .8;
  margin-bottom: 4px;
}
.qr-poster-table .v {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.15;
}
.qr-poster-hint {
  position: relative;
  margin-top: 10px;
  font-size: 12px;
  opacity: .88;
  letter-spacing: .08em;
}

.tag-editor { width: 100%; }
.tag-list { min-height: 28px; margin-bottom: 8px; }
.tag-add-row { display: flex; gap: 8px; margin-bottom: 8px; }
.tag-add-row input { flex: 1; }
.tag-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-presets .chip-btn { border: 0; cursor: pointer; }

/* 嘉宾资料编辑弹窗 */
.modal.modal-wide.modal-profile-edit {
  width: min(960px, calc(100vw - 48px));
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
}
.modal.modal-wide.modal-profile-edit > .profile-form-page {
  flex: 1;
  min-height: 0;
  height: 100%;
}
.profile-form-page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  height: 100%;
}
.profile-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  border-bottom: 1px solid #334155;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.32), rgba(15, 23, 42, 0.18));
  flex-shrink: 0;
}
.profile-form-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.profile-form-actions-top {
  margin: 0;
  flex-shrink: 0;
}
.profile-form-body {
  min-height: 0;
  overflow: auto;
  padding: 22px 28px;
  background: rgba(15, 23, 42, 0.25);
}
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: none;
  overflow: visible;
  padding: 0;
}
.profile-form .profile-section {
  margin: 0;
  overflow: visible;
}
.profile-form .form-section-head {
  background: rgba(15, 23, 42, 0.35);
  padding: 14px 18px;
  align-items: flex-start;
}
.profile-section-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.profile-form .form-section-title {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.35;
}
.profile-form .form-section-tip {
  white-space: normal;
  overflow: visible;
  line-height: 1.4;
  max-width: none;
}
.profile-form .form-section-body {
  padding: 18px 18px 8px;
  overflow: visible;
}
.profile-form .form-section-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  min-width: 0;
}
.profile-form .form-section-body label > span {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.3;
  white-space: normal;
}
.profile-form .split,
.profile-form .split-3 {
  display: grid;
  gap: 14px;
  margin-bottom: 4px;
}
.profile-form .split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profile-form .split-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.profile-form .split > label,
.profile-form .split-3 > label {
  margin-bottom: 0;
}
.profile-form input,
.profile-form select,
.profile-form textarea {
  min-width: 0;
  width: 100%;
}
.profile-form .image-chip-list {
  justify-content: flex-start;
  min-height: 120px;
}
.profile-photo-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}
.profile-form .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  margin-bottom: 10px;
}
.profile-form .tag-chip {
  border: 1px solid #334155;
  cursor: pointer;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  font-size: 0.82rem;
}
.profile-form .tag-chip span { opacity: 0.75; margin-left: 4px; }
.profile-form .tag-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.profile-form .tag-add-row input { flex: 1; min-width: 0; }
.profile-form .tag-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.profile-form .preset-chip {
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
}
.profile-form .preset-chip.on,
.profile-form .preset-chip:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}
.profile-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 28px;
  border-top: 1px solid #334155;
  background: rgba(15, 23, 42, 0.55);
  flex-shrink: 0;
}
.profile-form-footer .modal-actions { margin: 0; }
.profile-form-footer-tip {
  color: #94a3b8;
  font-size: 0.85rem;
}
@media (max-width: 900px) {
  .profile-form .split,
  .profile-form .split-3 {
    grid-template-columns: 1fr;
  }
  .profile-form-header {
    flex-direction: column;
    padding: 18px 18px;
  }
  .profile-form-body { padding: 16px 18px; }
  .profile-form-footer { padding: 12px 18px; }
}

/* 活动报名管理弹窗 */
.modal.modal-wide.modal-signup-manage {
  width: min(1120px, calc(100vw - 48px));
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
}
.modal.modal-wide.modal-signup-manage > .signup-manage-page {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
}
.signup-manage-page {
  min-height: 0;
}
.signup-manage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.signup-manage-head h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
  word-break: break-word;
}
.signup-manage-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.signup-manage-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.signup-manage-toolbar input[type="search"],
.signup-manage-toolbar select {
  min-width: 180px;
  flex: 1 1 180px;
  max-width: 320px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
}
.signup-manage-toolbar .btn-primary,
.signup-manage-toolbar .btn-ghost {
  flex: 0 0 auto;
}
.signup-manage-body {
  min-height: 0;
  overflow: auto;
  padding: 8px 28px 24px;
  margin: 0;
  border: 0;
  background: transparent;
}
.signup-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}
.signup-table th,
.signup-table td {
  padding: 14px 12px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  white-space: normal;
  word-break: break-word;
}
.signup-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #1e293b;
  color: #94a3b8;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.signup-table .td-phone {
  white-space: nowrap;
  min-width: 120px;
}
.signup-table .td-nowrap {
  white-space: nowrap;
}
.signup-table .phone-link {
  color: #7dd3fc;
  text-decoration: none;
}
.signup-table .phone-link:hover {
  text-decoration: underline;
}
.signup-table .muted {
  color: var(--muted);
  font-size: 0.85rem;
}
.signup-table .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 200px;
}
.signup-table .row-actions .btn-ghost {
  white-space: nowrap;
}
@media (max-width: 900px) {
  .modal.modal-wide.modal-signup-manage {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }
  .signup-manage-head,
  .signup-manage-toolbar,
  .signup-manage-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}

