* {
  box-sizing: border-box;
}

html {
  height: 100%;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --line: #e8ebf0;
  --line-strong: #dfe3ea;
  --text: #17181c;
  --muted: #7b8190;
  --faint: #a2a8b5;
  --accent: #4d6bfe;
  --accent-soft: #eef2ff;
  --risk: #b42318;
  --risk-soft: #fee4e2;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --phone: #2563eb;
  --phone-soft: #eff6ff;
  --phone-line: #bfdbfe;
  --phone-ink: #1e40af;
  --douyin: #2563eb;
  --douyin-soft: #eff6ff;
  --douyin-line: #bfdbfe;
  --douyin-ink: #1e40af;
  --wechat: #16a34a;
  --wechat-soft: #f0fdf4;
  --wechat-line: #bbf7d0;
  --wechat-ink: #166534;
  --missing: #b45309;
  --missing-soft: #fff7ed;
  --missing-line: #fed7aa;
  --tab-height: calc(66px + env(safe-area-inset-bottom, 0px));
  --content-bottom-space: 24px;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overflow-x: hidden;
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
  touch-action: manipulation;
}

button {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  user-select: none;
}

button:active {
  opacity: 0.78;
}

#app {
  position: relative;
  width: min(100%, 430px);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}

.app-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 16px var(--content-bottom-space);
  -webkit-overflow-scrolling: touch;
}

.topbar,
.section-head,
.card-head,
.button-row,
.bottom-tabs,
.account-row,
.detail-row,
.subpage-head,
.menu-item,
.mini-stats {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0 7px;
}

.topbar-title {
  min-width: 0;
  text-align: center;
}

.topbar span,
.panel-label,
.hint,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.topbar h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.18;
  font-weight: 600;
}

.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-weight: 650;
}

.logout-btn {
  min-width: 46px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.panel {
  margin-bottom: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.hero {
  min-height: 112px;
}

.hero strong {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 560;
}

.hero p,
.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.section-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head h2,
.card-head h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
}

.form-stack {
  display: grid;
  gap: 10px;
}

.form-stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.form-stack input,
.form-stack select,
.admin-tools input,
.admin-tools select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfbfa;
  color: var(--text);
  outline: 0;
}

.form-stack input:focus,
.form-stack select:focus,
.admin-tools input:focus,
.admin-tools select:focus {
  border-color: var(--accent);
  background: #fff;
}

.form-stack input.is-invalid,
.form-stack select.is-invalid {
  border-color: var(--risk);
  background: #fff7f7;
  box-shadow: 0 0 0 1px rgba(180, 35, 24, 0.08);
}

.form-stack.is-submitting {
  opacity: 1;
}

.profile-form.is-photo-busy {
  cursor: wait;
}

.form-stack button:disabled,
.form-stack input:disabled,
.form-stack select:disabled {
  cursor: wait;
}

.primary-btn,
.ghost-btn,
.risk-btn,
.text-btn,
.text-link {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  font-weight: 560;
}

.primary-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.ghost-btn {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent);
}

.risk-btn {
  border-color: var(--risk-soft);
  background: var(--risk-soft);
  color: var(--risk);
}

.text-btn {
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.text-link {
  min-height: 34px;
  border-color: transparent;
  padding: 0;
  background: transparent;
  color: var(--accent);
}

.button-row {
  gap: 8px;
}

.button-row > * {
  flex: 1 1 0;
}

.button-row.compact {
  justify-content: flex-end;
  margin-top: 8px;
}

.record-card .button-row.compact > * {
  flex: 0 0 auto;
  min-height: 30px;
  border-color: transparent;
  padding: 0 8px;
  background: transparent;
  font-size: 12px;
}

.user-record-card .button-row.compact {
  padding: 0 10px 10px;
}

.auth-screen {
  min-height: 100%;
  display: grid;
  align-items: center;
  padding: 22px 16px;
}

.auth-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.brand-mark {
  min-width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.auth-brand-logo {
  display: block;
  width: 96px;
  height: 44px;
  margin: 0 0 14px 0;
  object-fit: contain;
}

.auth-card h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 650;
}

.auth-card p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.wechat-guide-screen {
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #ececec;
}

.wechat-guide-shell {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: #f7f7f7;
}

.wechat-guide-body {
  min-height: 100dvh;
  padding: 236px 26px 26px;
  background: #fbfbfb;
}

.wechat-guide-app {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  margin-bottom: 34px;
}

.wechat-guide-app img {
  width: 78px;
  height: 78px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 12px 24px rgba(28, 35, 48, 0.1);
}

.wechat-guide-app strong {
  display: block;
  color: #111;
  font-size: 25px;
  line-height: 1.25;
  font-weight: 750;
}

.wechat-guide-app span {
  display: block;
  margin-top: 9px;
  color: #777;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 650;
}

.wechat-guide-actions {
  display: grid;
  gap: 14px;
}

.wechat-guide-actions button {
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  color: #343434;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 650;
}

.wechat-guide-actions button:last-child {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.wechat-guide-ios {
  margin: 22px 0 0;
  color: #8a8a8a;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.wechat-guide-mask {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.wechat-guide-mask p {
  position: absolute;
  top: 132px;
  left: 88px;
  right: 24px;
  margin: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 750;
}

.wechat-guide-arrow {
  position: absolute;
  top: 8px;
  right: 15px;
  width: 112px;
  height: 126px;
}

.wechat-guide-arrow path {
  fill: none;
  stroke: #fff;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-internal-note {
  margin: 8px 0 0 !important;
  color: var(--muted);
  font-size: 12px !important;
  line-height: 1.45 !important;
  text-align: center;
}

.bottom-tabs {
  flex: 0 0 auto;
  width: 100%;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: var(--tab-height);
  gap: 4px;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
  overscroll-behavior: none;
  pointer-events: auto;
}

.bottom-tabs button {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 1px;
  border: 0;
  border-radius: 8px;
  padding: 7px 3px;
  background: transparent;
  color: var(--muted);
}

.bottom-tabs button strong,
.bottom-tabs button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-tabs button strong {
  color: inherit;
  font-size: 12.5px;
  font-weight: 650;
}

.bottom-tabs button span {
  font-size: 10px;
}

.bottom-tabs .active {
  background: var(--accent-soft);
  color: var(--accent);
}

.bottom-tabs [data-tab="phone"].active {
  background: var(--phone-soft);
  color: var(--phone);
}

.bottom-tabs [data-tab="douyin"].active {
  background: var(--douyin-soft);
  color: var(--douyin);
}

.bottom-tabs [data-tab="wechat"].active {
  background: var(--phone-soft);
  color: var(--phone);
}

.admin-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-tabs .active {
  background: var(--phone-soft);
  color: var(--phone);
}

.detail-panel {
  display: grid;
  gap: 2px;
}

.subpage-head {
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.detail-row {
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.detail-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 14px;
  font-weight: 560;
}

.profile-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.profile-card-title strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 650;
}

.profile-entry-panel {
  border-color: #cbd5e1;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(100, 116, 139, 0.12),
    0 8px 22px rgba(15, 23, 42, 0.05);
}

.profile-form-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.profile-form-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.16;
  font-weight: 700;
}

.profile-form {
  gap: 9px;
  padding: 12px;
}

.profile-form-section {
  display: grid;
  gap: 9px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  padding: 10px;
  background: #fbfbfa;
}

.profile-form.is-salesperson [data-owner-site-section] {
  display: none;
}

.profile-form.is-salesperson [data-owner-optional-section] {
  display: none;
}

.profile-form.is-salesperson [data-owner-optional-upload] {
  display: none;
}

.owner-optional-photo-panel .profile-form {
  padding: 0;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.identity-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.identity-type-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  min-height: 58px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.identity-type-option input {
  margin-top: 3px;
  accent-color: var(--phone);
}

.identity-type-option strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.identity-type-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.identity-type-option:has(input:checked) {
  border-color: var(--phone);
  background: var(--phone-soft);
}

.guide-warning {
  color: var(--risk);
  font-weight: 750;
}

.profile-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-upload-gate {
  grid-column: 1 / -1;
  min-height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed var(--phone);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(239, 246, 255, 0.92)),
    var(--phone-soft);
  color: var(--text);
  text-align: center;
}

.profile-upload-gate strong {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
}

.profile-upload-gate span {
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.profile-upload-tile {
  position: relative;
  min-width: 0;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid var(--phone-line);
  border-radius: 8px;
  background: var(--phone-soft);
  color: var(--text);
}

.profile-upload-tile.selected {
  border-color: var(--phone);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.profile-upload-tile.is-invalid {
  border-color: var(--risk);
  background: #fff7f7;
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.08);
}

.profile-upload-tile.preview-unavailable {
  background: var(--phone-soft);
}

.profile-upload-tile.is-reading {
  border-color: var(--phone);
  background: #eef4ff;
}

.profile-upload-tile.is-reading .profile-upload-picker {
  cursor: wait;
}

.profile-upload-picker {
  position: relative;
  width: 100%;
  min-height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 10px 7px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.profile-file-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.profile-upload-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-upload-preview[hidden] {
  display: none;
}

.profile-upload-tile.selected .profile-upload-picker::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.46));
  pointer-events: none;
}

.upload-mark {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--phone);
  color: #fff;
  font-size: 23px;
  line-height: 1;
  font-weight: 360;
}

.profile-upload-tile.selected .upload-mark {
  opacity: 0;
  visibility: hidden;
}

.profile-upload-tile strong {
  position: relative;
  z-index: 2;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}

.upload-optional-note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 500;
}

.profile-upload-tile small {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-upload-tile.selected strong,
.profile-upload-tile.selected small {
  color: #fff;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.5);
}

.profile-upload-tile.selected .upload-optional-note {
  color: #fff;
}

.profile-upload-tile.selected strong {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 24px;
}

.profile-upload-tile.selected small {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 8px;
}

.profile-upload-remove {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 23, 42, 0.48);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
}

.profile-upload-tile.selected .profile-upload-remove {
  display: grid;
}

.profile-submit-btn {
  margin-top: 2px;
}

.lottery-tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--phone-soft);
  color: var(--phone);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}

.photo-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.photo-actions a {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.photo-thumb {
  min-width: 0;
  width: 100%;
  appearance: none;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fbfbfa;
  color: var(--text);
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.photo-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  border-radius: 6px;
  object-fit: cover;
  background: var(--accent-soft);
}

.photo-thumb img.is-loading {
  opacity: 0.35;
}

.photo-thumb span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-preview-root {
  z-index: 19;
}

.photo-preview-sheet {
  display: grid;
  gap: 12px;
}

.photo-preview-stage {
  display: grid;
  min-height: 260px;
  max-height: min(64vh, 560px);
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--bg);
}

.photo-preview-image {
  width: 100%;
  max-height: min(64vh, 560px);
  display: block;
  object-fit: contain;
}

.photo-preview-image.is-loading {
  min-height: 260px;
  opacity: 0.2;
}

.photo-preview-actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 0;
}

.extra-profile-panel {
  padding: 12px;
}

.extra-profile-head {
  margin-bottom: 10px;
}

.extra-profile-head h2 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.extra-profile-head .ghost-btn {
  min-height: 34px;
  padding: 0 12px;
}

.extra-profile-list,
.admin-extra-profiles {
  display: grid;
  gap: 8px;
}

.extra-profile-card {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px;
  background: #fbfbfa;
}

.extra-profile-card-head {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}

.extra-profile-card-head strong {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 650;
}

.extra-profile-card-head span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.compact-action-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.sales-add-control {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.sales-add-control small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.sales-add-control.mini .mini-text-btn {
  min-height: 26px;
  padding: 0 8px;
}

.compact-sales-panel {
  padding: 12px;
}

.sales-photo-sheet {
  max-width: 420px;
}

.sales-photo-only-grid {
  grid-template-columns: minmax(0, 1fr);
}

.embedded-sales-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.embedded-sales-section .section-head {
  margin-bottom: 0;
}

.embedded-sales-section h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.sales-info-list {
  display: grid;
  gap: 8px;
}

.sales-info-row {
  display: grid;
  gap: 8px;
  padding: 2px 0 8px;
  background: transparent;
}

.sales-info-row:first-child {
  border-top: 0;
}

.sales-info-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sales-info-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.sales-info-main strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.22;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-info-main span {
  color: var(--muted);
  font-size: 11px;
}

.sales-info-actions,
.extra-sales-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sales-info-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mini-text-btn {
  min-height: 28px;
  border: 1px solid var(--accent-soft);
  border-radius: 7px;
  padding: 0 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.sales-info-thumb {
  min-width: 0;
  width: 100%;
  appearance: none;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fbfbfa;
  color: var(--text);
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.sales-info-thumb:disabled {
  opacity: 0.72;
}

.sales-info-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  border-radius: 7px;
  object-fit: cover;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(74, 114, 181, 0.16);
}

.sales-info-thumb b {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.sales-info-thumb span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-info-thumb.missing span {
  color: var(--risk);
}

.sales-inline-upload-form {
  min-width: 0;
  margin: 0;
}

.sales-inline-upload-grid,
.sales-edit-upload-grid {
  grid-template-columns: minmax(0, 1fr);
}

.sales-edit-upload-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sales-inline-upload-grid .profile-upload-tile,
.sales-inline-upload-grid .profile-upload-picker,
.sales-edit-upload-grid .profile-upload-tile,
.sales-edit-upload-grid .profile-upload-picker {
  min-height: 118px;
}

.sales-edit-upload-slot {
  position: relative;
  min-width: 0;
}

.sales-edit-existing-thumb {
  min-width: 0;
  width: 100%;
  appearance: none;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fbfbfa;
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.sales-edit-existing-thumb[hidden],
.sales-edit-replace-btn[hidden],
.sales-edit-replacement[hidden] {
  display: none;
}

.sales-edit-existing-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  border-radius: 7px;
  object-fit: cover;
  background: var(--accent-soft);
}

.sales-edit-existing-thumb span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-edit-replace-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 4;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 300;
}

.extra-sales-block {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.extra-sales-head {
  justify-content: space-between;
}

.extra-sales-head span {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.sales-info-form-grid {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  align-items: end;
}

.sales-type-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.sales-type-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.sales-type-row label {
  min-width: 48px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.sales-type-row label.active,
.sales-type-row label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.sales-type-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.compact-hint {
  margin: 0;
  font-size: 12px;
}

.compact-photo-gallery {
  margin-top: 0;
  gap: 6px;
}

.compact-photo-gallery .photo-thumb {
  padding: 5px;
}

.compact-photo-gallery .photo-thumb img {
  aspect-ratio: 1;
}

.extra-profile-sheet .modal-head {
  margin-bottom: 10px;
}

.extra-profile-form {
  gap: 12px;
}

.compact-upload-grid {
  gap: 7px;
}

.compact-upload-grid .profile-upload-tile,
.compact-upload-grid .profile-upload-picker {
  min-height: 96px;
}

.admin-extra-profiles {
  margin-top: 14px;
}

.admin-extra-empty {
  margin-top: 12px;
}

.stack-list {
  display: grid;
  gap: 9px;
}

.record-list {
  padding-bottom: 86px;
}

.mine-hero strong {
  font-size: 24px;
}

.mine-menu {
  padding: 8px;
}

.profile-action-list {
  display: grid;
  gap: 6px;
}

.menu-item {
  width: 100%;
  gap: 11px;
  border: 0;
  border-radius: 8px;
  padding: 12px 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.muted-menu-item {
  opacity: 0.72;
  background: #f8fafc;
}

.menu-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.menu-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 3px;
}

.menu-copy strong {
  font-size: 15px;
}

.menu-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-chevron {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 2px;
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.78;
}

.menu-item em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-style: normal;
}

.menu-item em.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.menu-item em.warn {
  background: var(--missing-soft);
  color: var(--missing);
}

.bind-hero {
  min-height: 146px;
}

.mini-stats {
  gap: 8px;
  margin-top: 14px;
}

.mini-stats span {
  min-width: 0;
  flex: 1 1 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfbfa;
  color: var(--muted);
  font-size: 12px;
}

.mini-stats.three span {
  padding: 8px 7px;
}

.mini-stats b {
  float: right;
  color: var(--text);
  font-weight: 650;
}

.record-filter-panel {
  padding-bottom: 12px;
}

.result-count {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}

.record-filter-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.record-add-row {
  margin: -1px 0 9px;
}

.record-add-card {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--phone-line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--phone);
  font-weight: 650;
}

.record-add-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--phone-soft);
  color: var(--phone);
  font-size: 19px;
  line-height: 1;
  font-weight: 500;
}

.copy-page-btn {
  min-height: 28px;
  border: 1px solid var(--phone-line);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--phone-soft);
  color: var(--phone);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.filter-grid label,
.filter-chip-panel {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.filter-grid input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfbfa;
  color: var(--text);
  outline: 0;
}

.filter-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.filter-chip-row > span {
  min-height: 30px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.compact-filter-row {
  grid-template-columns: 1fr;
  gap: 5px;
}

.compact-filter-row > span {
  min-height: 18px;
}

.compact-filter-row .filter-chip-grid {
  display: grid;
  grid-template-columns: repeat(var(--filter-columns, 4), minmax(0, 1fr));
  gap: 4px;
}

.compact-filter-row .filter-chip-grid button {
  min-width: 0;
  width: 100%;
  padding: 0 2px;
  white-space: nowrap;
}

.filter-chip-grid button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #fbfbfa;
  color: var(--muted);
  font-size: 12px;
}

.filter-chip-grid button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

#app[data-scope="phone"] .filter-chip-grid button.active {
  border-color: var(--phone);
  background: var(--phone-soft);
  color: var(--phone);
}

#app[data-scope="douyin"] .filter-chip-grid button.active {
  border-color: var(--douyin);
  background: var(--douyin-soft);
  color: var(--douyin);
}

#app[data-scope="wechat"] .filter-chip-grid button.active {
  border-color: var(--wechat);
  background: var(--wechat-soft);
  color: var(--wechat);
}

.record-card {
  margin-bottom: 0;
  padding: 11px 12px;
}

.user-record-card {
  padding: 0;
  overflow: hidden;
  border-color: #9fb0c2;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(100, 116, 139, 0.12),
    0 6px 18px rgba(15, 23, 42, 0.06);
}

.record-card-title {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5edf6;
  background: #f8fafc;
}

.record-card-title span {
  color: var(--muted);
  font-size: 12px;
}

.record-phone-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.record-card-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.phone-remark-line {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 400;
}

.pill {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill.risk {
  background: var(--risk-soft);
  color: var(--risk);
}

.pill.warn {
  background: var(--missing-soft);
  color: var(--missing);
}

.card-fields {
  display: grid;
  gap: 7px;
}

.user-record-card .card-fields {
  padding: 10px 10px 0;
}

.card-field {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--field-line, var(--line));
  border-radius: 8px;
  padding: 7px 8px 7px 10px;
  background: var(--field-bg, #fbfbfa);
}

.card-field:last-child {
  padding-bottom: 7px;
}

.card-field.field-douyin {
  --field-bg: var(--douyin-soft);
  --field-line: var(--douyin-line);
}

.card-field.field-wechat {
  --field-bg: var(--wechat-soft);
  --field-line: var(--wechat-line);
}

.card-field span {
  color: var(--text);
  font-size: 12px;
}

.card-field strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 660;
}

.card-field strong.card-missing-text {
  color: var(--risk);
}

.card-field-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.card-field .card-sub-label {
  grid-column: 1;
  min-height: 20px;
}

.card-field .card-sub-value {
  grid-column: 2 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 520;
}

.card-field.empty {
  --field-bg: var(--missing-soft);
  --field-line: var(--missing-line);
  border-style: dashed;
}

.card-field em {
  border-radius: 999px;
  padding: 3px 6px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.card-field em.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.card-field em.risk {
  background: var(--risk-soft);
  color: var(--risk);
}

.account-row {
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.account-row span,
.account-row em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.account-row strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 560;
}

.account-row em {
  color: var(--ok);
}

.account-row em.risk {
  color: var(--risk);
}

.empty-state {
  padding: 28px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.fab {
  position: absolute;
  right: 18px;
  bottom: calc(var(--tab-height) + 18px);
  z-index: 8;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(77, 107, 254, 0.28);
}

#app[data-scope="phone"] .fab {
  background: var(--phone);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

#app[data-scope="douyin"] .fab {
  background: var(--douyin);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

#app[data-scope="wechat"] .fab {
  background: var(--phone);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.fab span {
  margin-top: -2px;
  font-size: 31px;
  line-height: 1;
  font-weight: 360;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  align-items: end;
  justify-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(17, 19, 24, 0.34);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  box-shadow: 0 -18px 42px rgba(23, 24, 28, 0.14);
  -webkit-overflow-scrolling: touch;
}

.confirm-root {
  align-items: center;
}

.confirm-sheet {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), 360px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(23, 24, 28, 0.18);
}

.confirm-sheet h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 650;
}

.confirm-sheet p {
  margin: 9px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.identity-guide-root {
  z-index: 18;
}

.identity-guide-sheet {
  display: grid;
  gap: 12px;
}

.handheld-sample {
  display: grid;
  gap: 10px;
  border: 1px solid var(--phone-line);
  border-radius: 10px;
  padding: 10px;
  background: var(--phone-soft);
}

.sample-photo {
  width: min(100%, 320px);
  max-height: min(40vh, 360px);
  display: block;
  justify-self: center;
  border: 1px solid #d7e4ff;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.handheld-sample strong,
.guide-strip strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.handheld-sample p,
.guide-strip p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.guide-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfbfa;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 3px 0 0;
  font-size: 19px;
  font-weight: 650;
}

.light-form {
  gap: 8px;
}

.light-form input,
.light-form select {
  min-height: 38px;
  padding: 8px 10px;
}

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.form-section-title span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  text-align: right;
}

.guide-link {
  min-height: 26px;
  flex: 0 0 auto;
  border: 1px solid var(--phone-line);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--phone-soft);
  color: var(--phone);
  font-size: 11px;
  font-weight: 650;
}

.account-fieldset .form-section-title span {
  color: var(--risk);
  font-weight: 600;
}

.extra-upload-title {
  margin-top: 2px;
}

.account-fieldset {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfbfa;
}

.compact-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 106px;
  gap: 8px;
}

.compact-fields .span-2 {
  grid-column: 1 / -1;
}

.admin-tools {
  display: grid;
  gap: 10px;
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.admin-tools button {
  min-width: 0;
}

.admin-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 8px;
}

.admin-filter-panel {
  display: grid;
  gap: 8px;
}

.admin-filter-row .filter-chip-grid button {
  padding: 0 2px;
}

#app[data-scope="admin"] .filter-chip-grid button.active {
  border-color: var(--phone);
  background: var(--phone-soft);
  color: var(--phone);
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.admin-summary-item {
  min-width: 0;
  display: grid;
  gap: 2px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  padding: 8px 6px;
  background: #f8fafc;
  color: var(--text);
  font: inherit;
  text-align: center;
}

.admin-summary-item.clickable {
  cursor: pointer;
}

.admin-summary-item.clickable:active {
  transform: translateY(1px);
}

.admin-summary-item.risk {
  border-color: #f5b5ae;
  background: var(--risk-soft);
}

.admin-summary-item span {
  color: var(--muted);
  font-size: 11px;
}

.admin-summary-item.risk span,
.admin-summary-item.risk strong {
  color: var(--risk);
}

.admin-summary-item strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.15;
  font-weight: 700;
}

.admin-tool-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-tool-actions .copy-page-btn,
.admin-tool-actions .ghost-btn {
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
}

.admin-user-list {
  padding-bottom: 8px;
}

.admin-list-card {
  padding: 0;
  overflow: hidden;
  border-color: #c3ccd8;
}

.admin-list-card.active {
  border-color: var(--phone);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.16);
}

.admin-list-open {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 0;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.admin-list-open > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-list-open strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
}

.admin-list-open small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.admin-list-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  width: 112px;
}

.admin-user-card {
  overflow: hidden;
  padding: 0;
  border-color: #94a3b8;
  box-shadow:
    0 0 0 1px rgba(100, 116, 139, 0.16),
    0 8px 22px rgba(15, 23, 42, 0.06);
}

.admin-detail-empty {
  display: grid;
  gap: 10px;
}

.admin-detail-empty strong {
  color: var(--text);
  font-size: 21px;
  line-height: 1.18;
  font-weight: 700;
}

.admin-detail-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-detail-empty button {
  margin-top: 4px;
}

.admin-subpage-head {
  margin-top: 0;
}

.admin-user-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.admin-user-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-user-head h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 19px;
  line-height: 1.18;
  font-weight: 700;
}

.admin-user-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.admin-card-tags {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: 112px;
}

.admin-profile-block,
.admin-record-block {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.admin-record-block {
  border-bottom: 0;
}

.admin-detail-filter {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fbfdff;
}

.admin-detail-filter .section-head {
  margin-bottom: 0;
}

.admin-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-block-title strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.admin-block-title span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--phone-soft);
  color: var(--phone);
  font-size: 11px;
  font-weight: 650;
}

.admin-block-title button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-profile-block .detail-row {
  padding: 7px 0;
}

.admin-profile-block .detail-row strong {
  font-size: 13px;
}

.admin-photo-gallery {
  margin-top: 3px;
}

.admin-photo-gallery .photo-thumb {
  padding: 6px;
}

.admin-record-list {
  display: grid;
  gap: 8px;
}

.admin-record-card {
  border-color: #a7b4c5;
  box-shadow: none;
}

.admin-record-actions {
  padding: 0 10px 10px;
}

.admin-user-actions {
  padding: 0 12px 12px;
}

.compact-empty {
  padding: 16px 10px;
  font-size: 12px;
}

.admin-history-sheet {
  max-height: min(88vh, 760px);
}

.admin-banned-sheet {
  max-height: min(88vh, 760px);
}

.admin-banned-list {
  display: grid;
  gap: 9px;
}

.admin-banned-item {
  display: grid;
  gap: 8px;
  border: 1px solid #f5b5ae;
  border-radius: 8px;
  padding: 10px;
  background: #fffafa;
}

.admin-banned-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-banned-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
}

.admin-banned-item p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.admin-banned-meta {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 5px 8px;
  border-top: 1px solid #fee4e2;
  padding-top: 7px;
}

.admin-banned-meta span {
  color: var(--muted);
  font-size: 12px;
}

.admin-banned-meta strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 560;
}

.admin-banned-item .ghost-btn {
  min-height: 32px;
  border-radius: 8px;
  font-size: 12px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  gap: 8px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  padding: 10px;
  background: #fbfbfa;
}

.history-item-head {
  display: grid;
  gap: 3px;
}

.history-item-head strong {
  font-size: 14px;
}

.history-item-head span {
  color: var(--muted);
  font-size: 12px;
}

.history-context-list {
  display: grid;
  gap: 5px;
  border: 1px solid #dbe5f3;
  border-radius: 8px;
  padding: 8px;
  background: #f8fbff;
}

.history-context-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.history-context-row span {
  color: var(--muted);
  font-size: 12px;
}

.history-context-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.history-diff-list {
  display: grid;
  gap: 5px;
}

.history-diff-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.history-diff-row span {
  color: var(--muted);
  font-size: 12px;
}

.history-diff-values {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.history-value-line {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.history-value-line em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.history-value-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 560;
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(118px + env(safe-area-inset-top, 0px));
  z-index: 40;
  width: min(360px, calc(100% - 32px));
  transform: translate(-50%, -12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(23, 24, 28, 0.94);
  color: #fff;
  font-size: 13px;
  transition: 0.18s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast.success {
  background: rgba(52, 120, 92, 0.96);
}

.toast.loading {
  background: rgba(37, 99, 235, 0.96);
}

@media (max-width: 360px) {
  .admin-tools,
  .admin-search-row,
  .admin-tool-actions,
  .filter-grid,
  .profile-field-grid,
  .identity-type-grid,
  .filter-chip-row,
  .compact-fields {
    grid-template-columns: 1fr;
  }

  .admin-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-fields .span-2 {
    grid-column: auto;
  }

  .compact-filter-row {
    grid-template-columns: 1fr;
  }

  .compact-filter-row .filter-chip-grid {
    grid-template-columns: repeat(var(--filter-columns, 4), minmax(0, 1fr));
    gap: 3px;
  }

  .compact-filter-row .filter-chip-grid button {
    min-height: 28px;
    padding: 0 1px;
    font-size: 10px;
  }

  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .profile-upload-grid {
    grid-template-columns: 1fr;
  }

  .profile-upload-tile {
    min-height: 118px;
  }

  .profile-upload-picker {
    min-height: 118px;
  }

  .sample-photo {
    width: min(100%, 292px);
    max-height: 38vh;
  }
}
