:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #6b7280;
  --line: #e3e8f0;
  --brand: #6d5cf6;
  --brand-strong: #4b48d9;
  --green: #16a34a;
  --orange: #ff6b22;
  --red: #c24135;
  --cream: #fff4df;
  --peach: #ffe8e3;
  --soft-blue: #f0edff;
  --shadow: 0 14px 36px rgba(20, 35, 60, 0.08);
  --fs-caption: 12px;
  --fs-body: 14px;
  --fs-body-lg: 15px;
  --fs-title: 18px;
  --fs-section: 20px;
  --fs-page: 24px;
  --lh-tight: 1.25;
  --lh-body: 1.55;
  --space-page: 12px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body:has(.miniapp-shell:not(.hidden)) {
  background: #d7dde8;
}

.hidden {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  white-space: nowrap;
  overflow: hidden;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: #fff;
}

.splash-center {
  margin-top: -6vh;
  display: grid;
  justify-items: center;
  gap: 22px;
}

.brand-logo {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #6d5cf6, #7c5cf6);
  border: 1px solid #d9ddff;
  box-shadow: 0 16px 34px rgba(79, 115, 246, 0.25);
}

.brand-logo span {
  color: #fff;
  font-size: 34px;
  font-weight: 900;
}

.splash-center h1 {
  color: #111827;
  font-size: 26px;
}

.loading-dots {
  display: flex;
  gap: 10px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c4c7cc;
  animation: dotPulse 1.1s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes dotPulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
  }
  40% {
    opacity: 1;
  }
}

.role-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: auto;
  background: linear-gradient(180deg, #effcf5 0, #fff 34%);
}

.mini-nav {
  height: 72px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
}

.mini-nav strong {
  text-align: center;
  font-size: 18px;
}

.back-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  font-size: 42px;
  line-height: 1;
  color: #111827;
}

.role-content {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 54px 20px 36px;
}

.role-content h1 {
  font-size: clamp(34px, 8vw, 46px);
}

.role-content > p {
  margin-top: 18px;
  color: #313946;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.role-card-grid {
  display: grid;
  gap: 28px;
  margin-top: 68px;
}

.role-card {
  min-height: 150px;
  border: 0;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 170px 1fr 58px;
  align-items: center;
  overflow: hidden;
  padding: 0 30px 0 0;
  text-align: left;
  color: #2e343b;
}

.role-card.merchant {
  background: #fff4df;
}

.role-card.teacher {
  background: #ffe8e3;
}

.role-illustration {
  width: 170px;
  height: 150px;
  display: grid;
  place-items: end center;
  color: #fff;
  font-size: 44px;
  font-weight: 900;
  background: linear-gradient(145deg, #3b82f6, #8b5cf6);
  border-radius: 0 70px 0 0;
}

.role-card.teacher .role-illustration {
  background: linear-gradient(145deg, #fb7185, #f97316);
}

.role-card-title {
  padding-left: 24px;
  font-size: 30px;
  font-weight: 800;
}

.role-arrow {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: 48px;
  line-height: 1;
}

.store-code-panel {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.store-code-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
}

.store-code-panel input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-transform: uppercase;
}

.store-code-panel .primary-btn {
  width: 100%;
  margin-top: 14px;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 36px;
}

.miniapp-shell {
  position: relative;
  width: min(430px, 100%);
  padding: 0 var(--space-page) 92px;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.mp-navbar {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 64px;
  display: grid;
  grid-template-columns: 52px 1fr 112px;
  align-items: center;
  gap: 8px;
  margin: 0 -12px;
  padding: 10px 12px 8px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.mp-navbar strong {
  justify-self: center;
  font-size: 17px;
}

.mp-nav-action {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
  color: var(--text);
}

.mp-logo {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
}

.mp-back-icon {
  display: none;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.mp-nav-action.is-back {
  background: #f3f6fb;
}

.mp-nav-action.is-back .mp-logo {
  display: none;
}

.mp-nav-action.is-back .mp-back-icon {
  display: block;
}

.mp-back {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 800;
}

.mp-capsule {
  justify-self: end;
  width: 96px;
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  padding: 0 10px;
  background: #fff;
}

.mp-capsule span {
  width: 26px;
  height: 8px;
  justify-self: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, #111 0 3px, transparent 4px) 0 0 / 9px 8px repeat-x;
}

.mp-capsule i {
  height: 18px;
  background: #d7dbe2;
}

.mp-capsule b {
  width: 22px;
  height: 22px;
  justify-self: center;
  border: 3px solid #111;
  border-radius: 999px;
  position: relative;
}

.mp-capsule b::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #111;
}

.topbar,
.store-line,
.sheet-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  padding: 8px 2px 18px;
}

.eyebrow,
.muted,
.metric-label,
.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 3px;
  font-size: var(--fs-page);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-section);
  line-height: 1.3;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(20, 35, 60, 0.06);
}

.status-panel,
.task-card,
.material-card,
.record-card,
.form-card,
.notice-card,
.calendar-card,
.reward-card,
.admin-card,
.example-card,
.fix-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.status-panel {
  margin-top: 12px;
  padding: 14px;
}

.store-line strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.role-switch,
.tabs,
.admin-tabs {
  display: flex;
  padding: 4px;
  border-radius: 8px;
  background: #e9eef7;
  flex-shrink: 0;
}

.role-btn,
.tab {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  min-height: 36px;
}

.role-btn {
  padding: 0 10px;
}

.role-btn.active,
.tab.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 6px 16px rgba(20, 35, 60, 0.08);
}

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

.progress-grid > div,
.progress-grid > button {
  min-height: 68px;
  padding: 10px;
  border-radius: 8px;
  background: #f6f8fc;
  border: 1px solid #e8edf5;
  text-align: left;
}

.metric-action {
  color: inherit;
  cursor: pointer;
}

.metric {
  display: block;
  color: var(--brand-strong);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.tabs {
  margin: 14px 0;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar,
.admin-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1 0 auto;
  min-width: 64px;
  padding: 0 10px;
}

.miniapp-shell .mini-tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 14;
  width: min(430px, 100%);
  transform: translateX(-50%);
  height: 70px;
  margin: 0;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  border-radius: 0;
  border-top: 1px solid #e5eaf2;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.08);
}

.miniapp-shell .mini-tabbar .tab {
  min-width: 0;
  min-height: 54px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  padding: 0 4px;
  font-size: 12px;
}

.miniapp-shell .mini-tabbar .tab.active {
  box-shadow: none;
  background: transparent;
  color: var(--brand-strong);
}

.tab-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #eef3fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.miniapp-shell .mini-tabbar .tab.active .tab-icon {
  background: #dbeafe;
  color: var(--brand-strong);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head {
  display: block;
  margin: 16px 2px 10px;
}

.section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.5;
}

.task-list,
.material-list,
.record-list,
.reward-list,
.profile-list {
  display: grid;
  gap: 12px;
}

.task-card,
.material-card,
.record-card,
.form-card,
.calendar-card,
.reward-card,
.admin-card {
  padding: 14px;
}

.task-top,
.task-actions,
.record-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #e8f0ff;
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.task-card h3,
.material-card h3 {
  margin: 0;
  font-size: var(--fs-title);
}

.task-card p,
.material-card p,
.record-card p {
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef3fb;
  color: var(--muted);
  font-size: var(--fs-caption);
  font-weight: 700;
  white-space: nowrap;
}

.pill.done {
  background: #e8f7ef;
  color: var(--green);
}

.pill.warn {
  background: #fff4e8;
  color: var(--orange);
}

.pill.danger {
  background: #fee2e2;
  color: #dc2626;
}

.task-body {
  margin: 8px 0 12px;
}

.task-actions {
  align-items: stretch;
}

.primary-btn,
.secondary-btn,
.text-btn {
  border-radius: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand) 0%, #7c5cf6 100%);
  color: #fff;
}

.secondary-btn {
  background: #eef3fb;
  color: var(--text);
  border-color: #dfe6f1;
}

.text-btn {
  background: transparent;
  color: var(--brand);
  padding: 0 4px;
}

.primary-btn:disabled,
.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.form-card {
  display: grid;
  gap: 12px;
}

.form-card h3,
.admin-card h3 {
  margin: 0;
  font-size: 17px;
}

.form-card label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 700;
}

.form-card input,
.form-card textarea,
.form-card select,
.store-code-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.form-card input,
.form-card select {
  height: 46px;
  padding: 0 12px;
}

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

.primary-fields {
  grid-template-columns: 1fr;
}

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

.address-fields label {
  min-width: 0;
  font-size: 12px;
}

.more-fields {
  border: 1px dashed #d9e2ee;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdff;
}

.more-fields summary {
  cursor: pointer;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
}

.more-fields .form-grid {
  margin-top: 12px;
}

.form-actions,
.filter-row,
.material-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-actions {
  justify-content: center;
}

.form-actions .primary-btn,
.form-actions .secondary-btn {
  flex: 1;
}

.register-submit-btn {
  flex: 0 1 360px !important;
  min-height: 58px;
  border-radius: 12px;
  font-size: 18px;
  box-shadow: 0 12px 24px rgba(82, 93, 246, .28);
}

.compact-form {
  margin-bottom: 12px;
}

.notice-card {
  padding: 12px;
  box-shadow: none;
  background: #f8fafc;
}

.notice-card strong {
  display: block;
  margin-bottom: 4px;
}

.notice-card p,
.admin-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.sample-delivery-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.sample-delivery-view {
  display: block;
}

.list-page-head {
  align-items: center;
  margin-bottom: 16px;
}

.list-page-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-body);
}

.delivery-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.delivery-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.delivery-table th,
.delivery-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.delivery-table th {
  background: #f8fafc;
  color: #4b5563;
  font-size: 13px;
}

.delivery-table tr:last-child td {
  border-bottom: 0;
}

.delivery-empty {
  height: 120px;
  color: var(--muted);
  text-align: center !important;
}

.table-action-btn {
  min-height: 34px;
  padding: 0 12px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.table-action-btn.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.form-card select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.activity-brief-board,
.activity-wait-board,
.activity-points-board .points-total-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.activity-brief-board div,
.activity-wait-board > div,
.points-total-card div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.activity-brief-board span,
.activity-wait-board > div > span,
.points-total-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.activity-brief-board strong,
.activity-wait-board > div > strong,
.points-total-card strong {
  color: var(--text);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.activity-wait-board {
  display: block;
}

.pending-stage,
.rejected-stage {
  display: grid;
  gap: 18px;
}

.pending-stage h2,
.rejected-stage h2 {
  margin: 8px 0 0;
  text-align: center;
  font-size: 32px;
  line-height: 1.15;
}

.pending-stage h2 {
  color: #16c76a;
}

.rejected-stage h2 {
  color: #ef4444;
}

.rejected-stage > p {
  margin: -6px auto 0;
  color: #b42318;
  text-align: center;
  line-height: 1.5;
}

.activity-flow-line {
  --dot-size: 16px;
  --line-y: calc(var(--dot-size) / 2);
  --step-count: 4;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--step-count), minmax(0, 1fr));
  width: min(100%, 420px);
  margin: 0 auto;
  padding-top: 1px;
  text-align: center;
}

.activity-flow-line::before,
.activity-flow-line::after {
  content: "";
  position: absolute;
  left: calc(12.5% + var(--dot-size) / 2);
  right: calc(12.5% + var(--dot-size) / 2);
  top: var(--line-y);
  height: 3px;
  border-radius: 999px;
  background: #dbe3ef;
}

.activity-flow-line::after {
  right: calc(62.5% + var(--dot-size) / 2);
  background: var(--brand);
  z-index: 1;
}

.activity-flow-line span {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: var(--dot-size) auto;
  place-items: center;
  gap: 7px;
  min-width: 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.activity-flow-line span::before {
  content: "";
  width: var(--dot-size);
  height: var(--dot-size);
  border: 2px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
}

.activity-flow-line span.done,
.activity-flow-line span.active {
  color: var(--text);
}

.activity-flow-line span.done::before {
  border-color: var(--brand);
  background: var(--brand);
}

.activity-flow-line span.active::before {
  border-color: var(--brand);
  background: #fff;
  box-shadow: inset 0 0 0 4px var(--brand);
}

.signup-info-card {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.signup-info-card h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
}

.signup-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.signup-info-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.signup-info-grid span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.signup-info-grid strong {
  color: var(--text);
  font-size: 14px;
  text-align: right;
  overflow-wrap: anywhere;
}

.pending-actions {
  justify-content: space-between;
  gap: 12px;
}

.pending-action-primary,
.pending-action-secondary {
  min-width: 128px;
  min-height: 48px;
}

.pending-action-secondary {
  border-color: #dfe6f1;
  background: #fff;
  color: var(--text);
}

.inline-input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.inline-input-action .secondary-btn {
  min-width: 96px;
  height: 46px;
  padding: 0 10px;
  white-space: nowrap;
}

.activity-content-list {
  margin: 12px 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.activity-content-list li + li {
  margin-top: 6px;
}

.points-rule-card {
  display: grid;
  gap: 8px;
}

.points-rule-row {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.points-rule-row span {
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.points-rule-row strong,
.points-rule-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.audit-reason {
  color: #e95f40;
}

.activity-record-card {
  cursor: pointer;
}

.activity-record-card .task-actions {
  position: relative;
  z-index: 2;
}

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

.record-detail-summary div,
.record-detail-block,
.record-detail-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.record-detail-summary div {
  padding: 10px;
}

.record-detail-summary span,
.record-detail-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.record-detail-summary strong,
.record-detail-row strong {
  color: var(--text);
  font-size: 14px;
}

.record-detail-block {
  margin-top: 10px;
  padding: 12px;
}

.record-detail-block > strong {
  display: block;
  margin-bottom: 8px;
}

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

.record-detail-images a {
  display: grid;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.record-detail-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

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

.record-detail-row {
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.filter-chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
}

.filter-chip.active {
  border-color: var(--brand);
  background: #eff6ff;
  color: var(--brand-strong);
}

.employee-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.material-content {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f6f8fc;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.calendar-day {
  min-height: 54px;
  padding: 6px 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 3px;
}

.calendar-day span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.calendar-day small {
  font-size: 11px;
}

.calendar-day.valid {
  border-color: #b7e3c7;
  background: #e8f7ef;
  color: var(--green);
}

.calendar-day.makeup {
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--orange);
}

.calendar-day.missed {
  border-color: #f7c2bd;
  background: #fff1f0;
  color: var(--red);
}

.calendar-day.future {
  cursor: default;
}

.reward-card.unlocked {
  border-color: #bfd6ff;
}

.stock-bar {
  height: 8px;
  margin: 14px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.stock-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #16a34a);
}

.stacked-actions {
  margin-top: 12px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  background: rgba(16, 24, 40, 0.42);
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.sheet-backdrop.open {
  display: flex;
}

.sheet {
  width: min(430px, 100%);
  max-height: 92vh;
  overflow: auto;
  margin: 0;
  padding: 10px 16px 22px;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.sheet-handle {
  width: 44px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: #cbd5e1;
}

.field {
  margin-top: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.platform-btn {
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.platform-btn.active {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: #eff6ff;
}

.example-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  margin-top: 16px;
  padding: 12px;
}

.example-visual {
  min-height: 142px;
  border-radius: 8px;
  border: 1px solid #d8e0ec;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #dbeafe, #fef3c7) border-box;
  position: relative;
  overflow: hidden;
}

.example-visual::before,
.example-visual::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  border-radius: 6px;
  background: #e7edf6;
}

.example-visual::before {
  top: 14px;
  height: 18px;
}

.example-visual::after {
  top: 44px;
  height: 64px;
  background: #dbeafe;
}

.example-card ul,
.fix-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.upload-file-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-file-field {
  padding: 0;
  border-radius: 12px;
}

.upload-file-field > label:first-child {
  color: #6d5dfc;
  font-size: 16px;
  font-weight: 900;
}

.upload-file-btn {
  width: 100%;
  min-height: 62px;
  margin: 8px 0 10px;
  padding: 0 22px;
  border: 1px solid #d8d2ff;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  background: #f3f0ff;
  color: #5b4df2;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(109, 93, 252, .08);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.field .upload-file-btn {
  display: inline-flex;
}

.upload-file-btn::before {
  content: "+";
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e6e0ff;
  color: #5b4df2;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.upload-file-btn:active {
  transform: translateY(1px);
}

.upload-file-btn:hover {
  border-color: #9f8cff;
  background: #eee9ff;
  box-shadow: 0 12px 26px rgba(109, 93, 252, .16);
}

.upload-file-name {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

textarea {
  resize: vertical;
  padding: 12px;
  min-height: 86px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.fix-box {
  margin-top: 16px;
  padding: 12px;
  box-shadow: none;
  background: #fffaf3;
}

.sheet-actions {
  position: sticky;
  bottom: -22px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin: 16px -16px -22px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(244, 247, 251, 0.96);
  border-top: 1px solid var(--line);
}

.record-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 40;
  transform: translateX(-50%) translateY(18px);
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 14px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.admin-shell {
  padding-bottom: 48px;
}

.admin-link {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(20, 35, 60, 0.06);
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.admin-tabs {
  margin: 16px 0;
  width: 100%;
  overflow-x: auto;
}

.admin-tabs .tab {
  min-width: 76px;
}

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

.admin-card {
  min-height: 128px;
}

.admin-card .metric {
  margin: 8px 0;
}

.mini-stat-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mini-stat-list div,
.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.data-row span {
  min-width: 0;
  line-height: 1.45;
}

.data-row .secondary-btn {
  min-height: 34px;
  flex-shrink: 0;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.inline-actions .primary-btn,
.inline-actions .secondary-btn {
  min-height: 36px;
}

.danger-text {
  color: var(--red);
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--bg);
}

.login-gate.hidden {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 4px 0 22px;
  font-size: 28px;
}

.login-card label {
  display: block;
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.login-card .primary-btn {
  width: 100%;
  margin-top: 18px;
}

.login-method-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.login-method-actions .primary-btn,
.login-method-actions .secondary-btn {
  width: 100%;
  display: grid;
  place-items: center;
}

.login-code-row {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 10px;
  align-items: center;
}

.login-code-row input {
  margin: 0;
}

.login-code-row .secondary-btn {
  height: 46px;
  min-height: 46px;
  padding: 0 12px;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .progress-grid {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .admin-grid,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .task-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .data-row {
    align-items: flex-start;
  }

  .example-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .miniapp-shell {
    padding-top: 0;
  }

  .role-content {
    padding-top: 34px;
  }

  .role-content h1 {
    font-size: 30px;
  }

  .role-content > p {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 600;
  }

  .role-card-grid {
    gap: 16px;
    margin-top: 36px;
  }

  .role-card {
    min-height: 112px;
    grid-template-columns: 112px 1fr 42px;
    padding-right: 16px;
    border-radius: 14px;
  }

  .role-illustration {
    width: 112px;
    height: 112px;
    font-size: 32px;
  }

  .role-card-title {
    padding-left: 18px;
    font-size: 22px;
  }

  .role-arrow {
    width: 38px;
    height: 38px;
    font-size: 34px;
  }

  .mp-navbar {
    height: 58px;
  }

  .status-panel {
    margin-top: 10px;
  }

  .store-line {
    align-items: center;
  }

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

  .metric {
    font-size: 21px;
  }

  .metric-label {
    font-size: 12px;
  }
}

/* 53活动中心新版移动端 */
.role-gate {
  background: #fff;
}

.identity-content {
  padding-top: 34px;
}

.identity-content h1 {
  font-size: 32px;
}

.identity-card {
  margin-top: 18px;
  border: 0;
  box-shadow: 0 14px 34px rgba(79, 72, 217, 0.1);
}

.identity-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-title);
}

.identity-card input {
  text-transform: none;
}

.mini-role-palette {
  margin-top: 22px;
  gap: 14px;
}

.mini-role-palette .role-card {
  min-height: 112px;
  grid-template-columns: 112px 1fr 42px;
  border-radius: 14px;
  padding-right: 16px;
}

.mini-role-palette .role-illustration {
  width: 112px;
  height: 112px;
  font-size: 32px;
}

.mini-role-palette .role-card-title {
  font-size: 22px;
}

.miniapp-shell {
  background:
    linear-gradient(180deg, rgba(79, 115, 246, 0.08), transparent 260px),
    #f7f8fc;
}

.partner-hero,
.member-panel,
.mine-hero {
  margin: 12px 0;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff 0%, #f2f5ff 100%);
  border: 1px solid #e2e8ff;
  box-shadow: var(--shadow);
}

.partner-hero,
.mine-hero,
.member-row,
.hero-store {
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-hero,
.mine-hero {
  justify-content: space-between;
}

.hero-store,
.mine-hero > div:nth-child(2),
.member-row > div:nth-child(2) {
  min-width: 0;
}

.hero-store p,
.member-row p,
.mine-hero p {
  color: var(--muted);
  font-size: var(--fs-body);
  margin-bottom: 3px;
}

.hero-store strong,
.member-row strong,
.mine-hero strong {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-title);
  line-height: var(--lh-tight);
}

.store-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #6d5cf6, #7c5cf6);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(79, 115, 246, 0.24);
}

.vip-badge {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: #fff4df;
  color: #4b48d9;
  font-size: var(--fs-caption);
  font-weight: 800;
  white-space: nowrap;
}

.official-card,
.promo-banner,
.home-read-card,
.activity-card,
.staff-card {
  margin: 12px 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.official-card {
  background: linear-gradient(145deg, #fff4df, #fff);
  border-color: #f6dfb8;
}

.official-card span,
.activity-card span,
.promo-banner span {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
}

.official-card strong,
.promo-banner strong,
.home-read-card h2,
.activity-card h3 {
  display: block;
  margin: 0;
  font-size: var(--fs-section);
  line-height: 1.35;
}

.official-card p,
.promo-banner p,
.activity-card p,
.home-read-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.quick-grid button {
  min-height: 86px;
  border: 1px solid #e2e8ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 35, 60, 0.05);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  color: var(--text);
}

.quick-grid span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: var(--brand-strong);
  font-weight: 900;
}

.quick-grid strong {
  font-size: var(--fs-caption);
  line-height: 1.25;
}

.promo-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #fff4df 0%, #ffe8e3 100%);
  border-color: #f5d7c8;
}

.promo-banner button {
  min-width: 70px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b5e, #ff7a1a);
  color: #fff;
  font-weight: 800;
}

.home-read-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.member-panel {
  background: linear-gradient(145deg, #fff4df, #fff);
}

.member-row {
  justify-content: space-between;
}

.member-row > div:nth-child(2) {
  margin-right: auto;
}

.member-panel .progress-grid > div,
.member-panel .progress-grid > button {
  background: rgba(255, 255, 255, 0.72);
}

.activity-stack {
  display: grid;
  gap: 12px;
}

.activity-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.active-activity {
  background: linear-gradient(145deg, #eef4ff, #fff);
  border-color: #dbe4ff;
}

.offline-activity {
  background: linear-gradient(145deg, #ffe8e3, #fff);
  border-color: #ffd0c6;
}

.compact-head h2 {
  font-size: var(--fs-section);
}

.simple-task .task-actions,
.reward-card .task-actions {
  margin-top: 12px;
}

.sheet-input,
.staff-form input,
.staff-form select {
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

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

.staff-form select,
.staff-form .primary-btn {
  grid-column: span 1;
}

.staff-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.staff-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.staff-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--fs-body);
}

.primary-btn {
  background: linear-gradient(135deg, #6d5cf6, #7c5cf6);
  font-weight: 800;
}

.secondary-btn {
  background: #f1f4fb;
}

.tab-icon {
  border-radius: 8px;
}

.role-card.merchant .role-illustration {
  background: linear-gradient(145deg, #6d5cf6, #7c5cf6);
}

.role-card.teacher .role-illustration {
  background: linear-gradient(145deg, #ff6b5e, #ff7a1a);
}

.home-dashboard {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-rows: repeat(2, minmax(104px, auto));
  gap: 12px;
  margin: 12px 0 18px;
}

.home-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  padding: 16px;
  overflow: hidden;
  text-align: left;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 35, 60, 0.08);
  color: var(--text);
}

.home-card span {
  display: inline-flex;
  color: var(--muted);
  font-size: var(--fs-caption);
  font-weight: 800;
}

.home-card strong {
  display: block;
  margin-top: 8px;
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
}

.home-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.35;
}

.checkin-card {
  grid-row: span 2;
  min-height: 220px;
  background:
    radial-gradient(circle at 78% 78%, rgba(255, 255, 255, 0.72) 0 42px, transparent 43px),
    linear-gradient(145deg, #6d5cf6 0%, #7c5cf6 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}

.checkin-card span,
.checkin-card p {
  color: rgba(255, 255, 255, 0.82);
}

.checkin-card strong {
  font-size: 34px;
}

.model-3d {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(20, 35, 60, 0.22));
}

.stamp-model {
  right: 18px;
  bottom: 18px;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 42% 34%, rgba(255, 255, 255, 0.88) 0 9px, transparent 10px),
    linear-gradient(145deg, #ffffff, #dfe7ff 62%, #b8c8ff);
  transform: rotate(-8deg);
}

.stamp-model::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -13px;
  height: 20px;
  border-radius: 50%;
  background: rgba(36, 44, 89, 0.2);
}

.stamp-model::after {
  content: "53";
  position: absolute;
  inset: 22px 16px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #6d5cf6, #7c5cf6);
  color: #fff;
  font-style: normal;
  font-weight: 900;
  font-size: 24px;
}

.gift-model {
  right: 12px;
  bottom: 10px;
  width: 58px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ff8158, #ffb347);
}

.gift-model::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 0;
  bottom: 0;
  width: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.gift-model::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: -10px;
  height: 18px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(145deg, #6d5cf6, #7c5cf6);
  box-shadow: inset 22px 0 0 rgba(255, 255, 255, 0.22);
}

.medal-model {
  right: 16px;
  bottom: 12px;
  width: 54px;
  height: 64px;
}

.medal-model::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  width: 26px;
  height: 36px;
  background: linear-gradient(145deg, #6d5cf6, #7c5cf6);
  clip-path: polygon(0 0, 100% 0, 84% 100%, 50% 76%, 16% 100%);
}

.medal-model::after {
  content: "奖";
  position: absolute;
  left: 3px;
  bottom: 0;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ff8158, #ffb347);
  color: #fff;
  font-style: normal;
  font-weight: 900;
  font-size: 20px;
}

.hot-card {
  background: linear-gradient(145deg, #fff4df, #fff);
  border-color: #f6dfb8;
}

.my-card {
  background: linear-gradient(145deg, #ffe8e3, #fff);
  border-color: #ffd0c6;
}

.home-feature-head {
  margin-top: 6px;
}

.hot-function-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hot-function-grid button {
  min-height: 92px;
  border: 1px solid #e2e8ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 35, 60, 0.05);
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  padding: 14px;
  color: var(--text);
  text-align: left;
}

.hot-function-grid span {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: var(--brand-strong);
  font-weight: 900;
}

.hot-function-grid button:nth-child(2) span,
.hot-function-grid button:nth-child(3) span {
  background: #fff4df;
  color: #ff7a1a;
}

.hot-function-grid button:nth-child(4) span {
  background: #ffe8e3;
  color: #ff6b5e;
}

.hot-function-grid strong {
  font-size: var(--fs-title);
  line-height: var(--lh-tight);
}

.pill.done {
  background: #eef4ff;
  color: var(--brand-strong);
}

.calendar-day.valid {
  border-color: #cbd6ff;
  background: #eef4ff;
  color: var(--brand-strong);
}

.stock-bar span {
  background: linear-gradient(90deg, #6d5cf6, #ff7a1a);
}

@media (max-width: 440px) {
  :root {
    --fs-body: 13px;
    --fs-body-lg: 14px;
    --fs-title: 16px;
    --fs-section: 18px;
    --fs-page: 22px;
    --space-page: 10px;
  }

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

  .home-dashboard {
    gap: 10px;
    grid-template-rows: repeat(2, minmax(92px, auto));
  }

  .checkin-card {
    min-height: 196px;
  }

  .checkin-card strong {
    font-size: 30px;
  }

  .hot-function-grid {
    gap: 10px;
  }

  .quick-grid button {
    min-height: 78px;
  }

  .activity-card {
    align-items: stretch;
    display: grid;
  }

  .staff-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 370px) {
  :root {
    --fs-caption: 11px;
    --fs-body: 12px;
    --fs-title: 15px;
    --fs-section: 17px;
    --space-page: 8px;
  }

  .quick-grid {
    gap: 8px;
  }

  .home-dashboard,
  .hot-function-grid {
    gap: 8px;
  }

  .home-card {
    padding: 12px;
  }

  .hot-function-grid button {
    min-height: 82px;
    padding: 12px;
    grid-template-columns: 36px 1fr;
  }

  .hot-function-grid span {
    width: 36px;
    height: 36px;
  }

  .quick-grid button {
    min-height: 72px;
  }

  .store-avatar {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }
}

/* 层级化卡片流优化 */
.miniapp-shell .mini-tabbar {
  height: 78px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}

.miniapp-shell .mini-tabbar .tab {
  min-height: 58px;
  gap: 4px;
  color: #697386;
  font-weight: 700;
}

.miniapp-shell .mini-tabbar .tab.active {
  color: #4b48d9;
}

.miniapp-shell .mini-tabbar .tab-icon {
  width: 28px;
  height: 28px;
  border-radius: 11px;
  background: #edf2fb;
}

.miniapp-shell .mini-tabbar .tab.active .tab-icon {
  background: linear-gradient(145deg, #6d5cf6, #7c5cf6);
  color: #fff;
}

.home-card {
  min-height: 132px;
  padding: 18px 16px;
  border-radius: 10px;
}

.home-card span,
.home-card strong,
.home-card p {
  position: relative;
  z-index: 2;
}

.asset-model {
  z-index: 1;
  object-fit: contain;
  opacity: .94;
}

.checkin-card .asset-model {
  width: 184px;
  height: 150px;
  right: -28px;
  bottom: -14px;
}

.hot-card .asset-model,
.my-card .asset-model {
  width: 132px;
  height: 108px;
  right: -22px;
  bottom: -22px;
}

.hot-card,
.my-card {
  min-height: 104px;
}

.hot-card p,
.my-card p {
  max-width: 116px;
}

.hot-function-grid button {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #f8faff);
}

.hot-function-grid button::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 86px;
  height: 86px;
  border-radius: 28px;
  background: rgba(79, 115, 246, .08);
  transform: rotate(18deg);
}

.activity-list-view,
.activity-detail-view,
.message-list-view,
#profileView {
  padding-top: 8px;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.micro-page-theme {
  margin: 6px calc(-1 * var(--space-page)) 10px;
  padding: 14px calc(var(--space-page) + 22px) 10px;
  min-height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  border-bottom: 1px solid rgba(226, 232, 240, .75);
  background: linear-gradient(180deg, #f7faff 0%, rgba(247, 250, 255, 0) 100%);
}

.micro-page-theme h2 {
  margin: 0;
  color: #172033;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 900;
}

.micro-page-theme p {
  margin-top: 5px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.28;
  font-weight: 500;
}

.activity-tabs-list {
  display: grid;
  gap: 14px;
}

.activity-feed-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e4e9f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(20, 35, 60, .08);
}

.activity-feed-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.activity-feed-head strong {
  font-size: 17px;
}

.activity-feed-head span,
.activity-feed-card p,
.list-pager {
  color: var(--muted);
  font-size: var(--fs-body);
}

.activity-feed-card p {
  margin: 0;
  overflow: hidden;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.activity-poster {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 84% 26%, rgba(255,255,255,.85) 0 18px, transparent 19px),
    linear-gradient(135deg, #f0edff, #fff4df 58%, #ff8a6a);
}

.activity-poster.school {
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.72) 0 20px, transparent 21px),
    linear-gradient(135deg, #fff4df, #ffc56f 48%, #ff7a1a);
}

.activity-poster.traffic {
  background:
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.7) 0 20px, transparent 21px),
    linear-gradient(135deg, #eef4ff, #8ea4ff 52%, #7c5cf6);
}

.activity-poster.sample {
  background:
    radial-gradient(circle at 78% 30%, rgba(255,255,255,.8) 0 20px, transparent 21px),
    linear-gradient(135deg, #ffe8e3, #ff9b6a 54%, #6d5cf6);
}

.activity-poster.has-theme-image {
  background: #eef4ff;
}

.activity-poster.has-theme-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-poster.has-theme-image::before,
.activity-poster.has-theme-image::after {
  display: none;
}

.activity-poster.has-theme-image em {
  color: #fff;
  text-shadow: 0 2px 8px rgba(15, 23, 42, .42);
}

.activity-poster.has-theme-image::selection {
  background: transparent;
}

.activity-poster::before,
.activity-poster::after {
  content: "";
  position: absolute;
  border-radius: 18px;
  background: rgba(255,255,255,.35);
  transform: rotate(-10deg);
}

.activity-poster::before {
  left: 24px;
  bottom: 24px;
  width: 78px;
  height: 54px;
}

.activity-poster::after {
  right: 22px;
  bottom: 18px;
  width: 62px;
  height: 80px;
  background: rgba(255,255,255,.28);
  transform: rotate(10deg);
}

.activity-poster span,
.activity-poster b {
  position: absolute;
  z-index: 2;
  top: 16px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-style: normal;
  font-weight: 800;
}

.activity-poster span {
  left: 0;
  background: rgba(17, 24, 39, .52);
  color: #fff;
}

.activity-poster b {
  right: 0;
  background: #16c76a;
  color: #fff;
}

.activity-poster em {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  top: 58px;
  color: #172033;
  font-size: 30px;
  line-height: 1.1;
  font-style: normal;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(255,255,255,.48);
}

.activity-poster.large {
  margin-bottom: 14px;
}

.activity-center-hero,
.activity-intro-card,
.stage-result-card {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid #e4e9f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.activity-intro-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.activity-date-range {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.activity-intro-card p {
  color: var(--muted);
  line-height: 1.65;
}

.activity-rich-intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.activity-rich-intro p,
.activity-rich-intro ul,
.activity-rich-intro ol,
.activity-rich-intro blockquote {
  margin: 0 0 10px;
}

.activity-rich-intro ul,
.activity-rich-intro ol {
  padding-left: 20px;
}

.activity-rich-intro img,
.activity-rich-intro video {
  display: block;
  max-width: 100%;
  margin: 10px 0;
  border-radius: 10px;
}

.activity-rich-intro blockquote {
  padding: 8px 12px;
  border-left: 3px solid #5b63f6;
  border-radius: 6px;
  background: #f6f7ff;
  color: var(--text);
}

.activity-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.activity-meta-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #f6f8fc;
}

.activity-meta-grid span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.activity-meta-grid strong {
  font-size: 13px;
  text-align: right;
}

.activity-status-value {
  color: #16c76a;
}

.activity-entry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 340px);
  min-height: 58px;
  margin: 20px auto 2px;
  border-radius: 12px;
  font-size: 18px;
  box-shadow: 0 12px 24px rgba(82, 93, 246, .28);
}

.text-back-btn {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #4b48d9;
  font-weight: 800;
}

.activity-detail-panel {
  display: none;
}

.activity-detail-panel.active {
  display: block;
}

.message-filter {
  display: block;
  margin: 0 0 14px;
  overflow: visible;
}

.message-summary-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #eef4ff);
  border: 1px solid #dfe7ff;
}

.message-summary-card span,
.message-summary-card p {
  color: var(--muted);
}

.message-summary-card strong {
  grid-row: span 2;
  align-self: center;
  color: #4b48d9;
  font-size: 32px;
}

.message-swipe-row {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.message-delete-btn {
  position: absolute;
  inset: 0 0 0 auto;
  width: 74px;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  transform: translateX(100%);
  transition: transform .2s ease;
}

.message-feed-card {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 16px 18px;
  border: 1px solid #e4e9f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(20, 35, 60, .06);
  transform: translateX(0);
  transition: transform .2s ease;
  touch-action: pan-y;
}

.message-swipe-row.is-open .message-delete-btn {
  transform: translateX(0);
}

.message-swipe-row.is-open .message-feed-card {
  transform: translateX(-74px);
}

.message-state {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  color: transparent;
  overflow: hidden;
}

.message-state.read {
  background: #16a34a;
}

.message-feed-card .record-top strong {
  min-width: 0;
  font-size: 18px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-feed-card .record-top span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.message-time {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.message-detail-content {
  white-space: pre-line;
  line-height: 1.65;
}

.message-detail-content.is-clickable {
  cursor: pointer;
}

.message-detail-content.is-clickable:hover {
  color: #4b48d9;
}

#profileView {
  margin-left: calc(-1 * var(--space-page));
  margin-right: calc(-1 * var(--space-page));
  padding-top: 0;
}

#profileView .profile-list {
  gap: 0;
}

.profile-hero-panel {
  min-height: 190px;
  padding: 42px 20px 70px;
  background:
    radial-gradient(circle at 84% 20%, rgba(255,255,255,.28) 0 42px, transparent 43px),
    linear-gradient(135deg, #6d5cf6, #7c5cf6 62%, #9b2cff);
  color: #fff;
}

.profile-hero-content {
  display: grid;
  grid-template-columns: 72px 1fr 74px;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #4b48d9;
  font-size: 28px;
  font-weight: 900;
}

.profile-hero-content strong {
  display: block;
  font-size: 23px;
  line-height: 1.25;
}

.profile-hero-content p {
  margin-top: 6px;
  color: rgba(255,255,255,.78);
}

.profile-hero-content button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #4b48d9;
  font-weight: 800;
}

.profile-stat-card {
  margin: -42px 18px 14px;
  padding: 18px 12px;
  border-radius: 16px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border: 1px solid #eef1f7;
  box-shadow: 0 16px 36px rgba(20, 35, 60, .1);
}

.profile-stat-card.has-scope-toggle {
  padding-top: 22px;
}

.profile-stat-card button {
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  gap: 3px;
  text-align: center;
}

.profile-stat-card button:active {
  transform: translateY(1px);
}

.profile-stat-card .profile-scope-toggle {
  position: absolute;
  top: -14px;
  right: 12px;
  min-width: 54px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #dfe6ff;
  box-shadow: 0 8px 18px rgba(50, 64, 120, .12);
  color: #4b48d9;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.profile-stat-card .profile-scope-toggle:active {
  transform: translateY(1px) scale(.98);
}

.profile-stat-card strong {
  color: #4b48d9;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.profile-stat-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.15;
}

.profile-banner {
  margin: 0 18px 14px;
  min-height: 88px;
  padding: 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    radial-gradient(circle at 17% 50%, rgba(255,255,255,.58) 0 22px, transparent 23px),
    linear-gradient(135deg, #fff4df, #ffe8e3 52%, #ff8a6a);
  color: #172033;
}

.profile-banner span {
  color: #ff6b22;
  font-weight: 800;
}

.profile-banner strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.profile-banner b {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ff8066, #ff6b22);
  color: #fff;
}

.profile-service-card {
  margin: 0 18px 22px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f7;
  box-shadow: 0 10px 26px rgba(20, 35, 60, .07);
}

.profile-service-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.profile-service-list {
  display: grid;
}

.profile-service-list button {
  min-height: 70px;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid #eef1f7;
  background: #fff;
  display: grid;
  grid-template-columns: 46px 1fr 20px;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.profile-service-list button:first-child {
  border-top: 0;
}

.profile-service-list button > span {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: #4b48d9;
  font-weight: 900;
}

.profile-service-list button:nth-child(2n) > span {
  background: #fff4df;
  color: #ff7a1a;
}

.profile-service-list button:nth-child(3n) > span {
  background: #ffe8e3;
  color: #ff6b5e;
}

.profile-service-list strong {
  display: block;
  font-size: 17px;
}

.profile-service-list small,
.muted-line {
  color: var(--muted);
}

.profile-service-list i {
  color: #9aa3b2;
  font-style: normal;
  font-size: 24px;
}

.service-sheet-content {
  display: grid;
  gap: 12px;
}

#recordDetailSheet.open {
  inset: 0 auto 0 50%;
  width: min(430px, 100vw);
  transform: translateX(-50%);
  align-items: center;
  justify-content: center;
  padding: 18px;
}

#recordDetailSheet .record-detail-sheet {
  width: min(390px, calc(100vw - 32px));
  max-height: min(76vh, 620px);
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

#recordDetailSheet .sheet-handle {
  display: none;
}

#recordDetailSheet .sheet-head {
  position: sticky;
  top: -18px;
  z-index: 2;
  margin: -18px -18px 12px;
  padding: 18px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #eef1f7;
}

.service-section {
  display: grid;
  gap: 12px;
}

.hotspot-utility-section .service-info-list strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.service-headline,
.service-info-list p,
.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-headline strong {
  font-size: 18px;
}

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

.point-detail-list {
  display: grid;
  gap: 0;
}

.point-detail-row {
  min-height: 58px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #eef1f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.point-detail-row span,
.point-detail-row strong,
.point-detail-row small {
  display: block;
  min-width: 0;
}

.point-detail-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.point-detail-row b {
  flex-shrink: 0;
  color: var(--brand-strong);
}

.service-record-row {
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.service-record-row span,
.service-record-row strong,
.service-record-row small {
  display: block;
  min-width: 0;
}

.service-record-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

button.staff-activity-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eef1f7;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.service-info-list p,
.service-row {
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f7;
}

.service-info-list span {
  color: var(--muted);
}

.wide-btn {
  width: 100%;
}

.service-development-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed #d6ddec;
  border-radius: 14px;
  background: rgba(248, 250, 252, .72);
}

.service-development-state strong {
  color: #64748b;
  font-size: 22px;
}

.mall-balance {
  min-height: 96px;
  padding: 18px;
  border-radius: 14px;
  display: grid;
  align-content: center;
  background: linear-gradient(135deg, #6d5cf6, #7c5cf6);
  color: #fff;
}

.mall-balance strong {
  font-size: 34px;
}

.mall-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mall-grid button {
  min-height: 142px;
  padding: 12px;
  border: 1px solid #e4e9f4;
  border-radius: 12px;
  background: #fff;
  text-align: left;
}

.mall-grid button:disabled {
  opacity: .56;
}

.mall-grid i {
  width: 48px;
  height: 40px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff4df, #ffb347);
  color: #ff7a1a;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 900;
  overflow: hidden;
}

.mall-grid i img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mall-grid strong,
.mall-grid span {
  display: block;
}

.mall-grid span {
  margin-top: 4px;
  color: #4b48d9;
  font-weight: 800;
}

.mall-grid p {
  margin-top: 6px;
  color: var(--muted);
}

.mall-grid em {
  display: block;
  margin-top: 8px;
  color: #9aa5b5;
  font-size: 12px;
  font-style: normal;
}

.mall-admin-tabs,
.mall-record-filters,
.mall-points-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.mall-visibility-note {
  max-width: 760px;
  margin: 8px 0 0;
  padding: 9px 12px;
  border: 1px solid #f5c56f;
  border-radius: 8px;
  background: #fff8e8;
  color: #8a5200;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.mall-tab-panel {
  display: grid;
  gap: 14px;
}

.mall-tab-panel[hidden] {
  display: none;
}

.mall-record-filters label,
.mall-points-toolbar label {
  min-width: 150px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mall-record-filters input,
.mall-record-filters select,
.mall-points-toolbar input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.mall-chart-list {
  display: grid;
  gap: 10px;
}

.mall-chart-row {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(0, 1.4fr) 42px;
  align-items: center;
  gap: 10px;
}

.mall-chart-row span,
.mall-chart-row strong {
  min-width: 0;
  font-size: 13px;
}

.mall-chart-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef3fb;
}

.mall-chart-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6d5cf6;
}

.mall-trend-chart {
  min-height: 180px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.mall-trend-bar {
  min-width: 0;
  height: 170px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.mall-trend-bar i {
  width: 100%;
  max-width: 28px;
  align-self: end;
  border-radius: 8px 8px 2px 2px;
  background: #16a34a;
}

.mall-thumb {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #e8f0ff;
  color: var(--brand);
  font-weight: 900;
}

.mall-thumb img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.mall-manual-points-form {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #dfe6f1;
  border-radius: 10px;
  background: #f8fafc;
}

.mall-points-result-head {
  margin-top: 4px;
}

.activity-theme-image-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 290px);
  gap: 16px;
  align-items: end;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.activity-theme-image-preview {
  aspect-ratio: 16 / 5.6;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background: linear-gradient(135deg, #9ee7ed, #fff5d8 58%, #ff9677);
  color: #172033;
  font-size: 18px;
  font-weight: 900;
}

.activity-theme-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-theme-image-fields {
  display: grid;
  gap: 10px;
  align-content: end;
}

.activity-theme-image-fields input[type="file"] {
  display: none;
}

.activity-theme-upload-btn {
  width: 100%;
  cursor: pointer;
}

.compact-service-section {
  margin-top: 14px;
}

.sheet-field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.sheet-field input,
.sheet-field textarea,
.sheet-field select,
.staff-mini-form input,
.staff-mini-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
}

.sheet-field textarea {
  padding: 12px;
}

.service-phone-card {
  padding: 14px;
  border: 1px solid #e4e9f4;
  border-radius: 12px;
  background: #fff;
  display: grid;
  gap: 5px;
}

.service-phone-card span,
.service-phone-card a {
  color: var(--muted);
}

.service-phone-card a {
  color: #4b48d9;
  font-weight: 900;
  text-decoration: none;
}

.staff-mini-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.staff-field {
  display: grid;
  gap: 7px;
}

.staff-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.staff-field input,
.staff-field select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid #dfe6f1;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
}

.staff-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.staff-form-actions button {
  min-height: 50px;
}

.staff-service-section,
.staff-add-section,
.staff-detail-section {
  gap: 14px;
}

.staff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.staff-toolbar strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.staff-toolbar .muted-line {
  margin-top: 3px;
  font-size: 12px;
}

.staff-add-btn {
  min-width: 78px;
  min-height: 40px;
}

.staff-member-table,
.staff-activity-table {
  overflow: hidden;
  border: 1px solid #e4e9f4;
  border-radius: 10px;
  background: #fff;
}

.staff-member-row {
  display: grid;
  grid-template-columns: 28px minmax(48px, .75fr) minmax(76px, 1.15fr) minmax(56px, .95fr) minmax(56px, .85fr);
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 8px 6px;
  border-top: 1px solid #eef1f7;
  color: #172033;
  font-size: 12px;
}

.staff-member-row:first-child,
.staff-activity-row:first-child {
  border-top: 0;
}

.staff-member-row > span,
.staff-member-row > strong,
.staff-activity-row > span,
.staff-activity-row > strong,
.staff-activity-row > em,
.staff-activity-row > time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-member-head,
.staff-activity-head {
  min-height: 38px;
  background: #f6f8fc;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.staff-member-row strong,
.staff-activity-row strong {
  font-size: 13px;
}

.text-action {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  background: #eef4ff;
  color: #4b48d9;
  font-size: 12px;
  font-weight: 900;
}

.staff-person-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.staff-person-card div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4e9f4;
  border-radius: 10px;
  background: #fbfcff;
}

.staff-person-card span,
.staff-person-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.staff-person-card strong {
  margin-top: 4px;
  color: #172033;
  font-size: 15px;
}

.compact-back {
  width: fit-content;
  padding: 0;
  min-height: auto;
  color: #4b48d9;
  background: transparent;
}

.staff-activity-row {
  display: grid;
  grid-template-columns: 42px minmax(96px, 1.4fr) minmax(54px, .75fr) minmax(92px, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 10px;
  border-top: 1px solid #eef1f7;
  font-size: 12px;
}

.staff-activity-row em,
.staff-activity-row time {
  color: var(--muted);
  font-style: normal;
}

@media (max-width: 370px) {
  .staff-member-row {
    grid-template-columns: 24px minmax(44px, .72fr) minmax(72px, 1.15fr) minmax(50px, .85fr) minmax(52px, .82fr);
    padding: 8px 5px;
    font-size: 11px;
  }

  .staff-member-row strong,
  .staff-activity-row strong {
    font-size: 12px;
  }

  .text-action {
    padding: 0 6px;
    font-size: 11px;
  }

  .staff-person-card {
    grid-template-columns: 1fr;
  }

  .staff-form-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 370px) {
  .activity-poster em {
    font-size: 24px;
  }

  .profile-hero-content {
    grid-template-columns: 60px 1fr 62px;
  }

  .profile-avatar {
    width: 60px;
    height: 60px;
  }
}

/* 固定小程序外壳：顶部和底部不滚动，中间内容独立滚动 */
body:has(.miniapp-shell:not(.hidden)) {
  height: 100vh;
  overflow: hidden;
}

.miniapp-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
  display: grid;
  grid-template-rows: 58px 1fr;
}

@supports (height: 100dvh) {
  body:has(.miniapp-shell:not(.hidden)),
  .miniapp-shell {
    height: 100dvh;
  }
}

.mp-navbar {
  position: relative;
  top: auto;
  margin-bottom: 0;
}

.miniapp-shell .view {
  min-height: 0;
  overflow: hidden;
}

.miniapp-shell .view.active {
  display: block;
  height: calc(100vh - 58px - 78px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

@supports (height: 100dvh) {
  .miniapp-shell .view.active {
    height: calc(100dvh - 58px - 78px);
  }
}

.miniapp-shell .view.active::-webkit-scrollbar {
  display: none;
}

.miniapp-shell .mini-tabbar {
  flex-shrink: 0;
}

/* Final mobile shell refinements */
.miniapp-shell {
  width: min(430px, 100vw);
  max-width: 100vw;
}

.miniapp-shell .mini-tabbar {
  width: min(430px, 100vw);
  max-width: 100vw;
}

.miniapp-shell input,
.miniapp-shell select,
.miniapp-shell textarea,
.role-gate input,
.login-gate input {
  font-size: 16px;
}

.miniapp-shell textarea {
  line-height: 1.5;
}

.mp-navbar {
  grid-template-columns: 20% 1fr 112px;
  height: 58px;
  padding: 8px 12px;
}

.mp-nav-action {
  justify-self: start;
  width: 100%;
  max-width: 72px;
  height: 42px;
  border-radius: 0;
  place-items: center start;
  padding: 0;
  background: transparent;
}

.mp-logo {
  width: 54px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
}

.mp-nav-action.is-back {
  width: 42px;
  max-width: 42px;
  border-radius: 999px;
  background: #f3f6fb;
  place-items: center;
}

.mp-nav-action.is-back .mp-back-icon {
  display: block;
  font-size: 30px;
}

/* Polished mini-program home */
.miniapp-shell {
  background:
    linear-gradient(180deg, #eef3ff 0%, #f8fbff 34%, #f6f8fc 100%);
}

.mp-navbar {
  height: 64px;
  padding: 9px 14px;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 16px rgba(44, 62, 80, .05);
}

.mp-navbar strong {
  color: #2c3e50;
  font-family: "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.mp-nav-action {
  max-width: 82px;
  padding-left: 8px;
  border-radius: 10px;
  transition: background-color .3s ease, transform .2s ease;
}

.mp-nav-action:active {
  background: #e6f7ff;
  transform: scale(.97);
}

.mp-logo {
  width: 60px;
  height: 42px;
}

.mp-capsule {
  height: 38px;
  border-color: #e3e8f2;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  transition: background-color .3s ease, box-shadow .3s ease;
}

.mp-capsule:hover,
.mp-capsule:active {
  background: #e6f7ff;
  box-shadow: 0 8px 22px rgba(74, 108, 247, .12);
}

.partner-hero {
  margin-top: 14px;
  padding: 22px 24px;
  border: 1px solid rgba(184, 197, 255, .42);
  border-radius: 20px;
  background: linear-gradient(135deg, #f3e8ff 0%, #ffffff 72%);
  box-shadow: 0 14px 34px rgba(74, 108, 247, .09);
}

.store-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(145deg, #4a6cf7, #7c5cf6);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(74, 108, 247, .25);
}

.hero-store p,
#identityLine {
  color: #6c757d;
  font-size: 14px;
  line-height: 1.5;
}

.hero-store strong,
#storeName {
  color: #2c3e50;
  font-size: 21px;
  font-weight: 900;
}

.partner-hero .vip-badge {
  padding: 8px 16px;
  border-radius: 10px;
  background: #fff3e0;
  color: #ff9800;
  font-weight: 900;
}

.home-dashboard {
  gap: 14px;
  margin-top: 14px;
}

.home-card {
  border-radius: 20px;
  border-color: rgba(226, 232, 240, .78);
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(30, 41, 82, .08);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.home-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 84% 82%, rgba(255, 255, 255, .76) 0 34px, transparent 35px),
    linear-gradient(145deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 58%);
}

.home-card:active {
  transform: translateY(-2px) scale(.99);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .12);
}

.checkin-card {
  min-height: 232px;
  padding: 32px 24px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, #4D66F6 0%, #7064F5 54%, #21B6B2 138%);
  box-shadow: 0 18px 38px rgba(77, 102, 246, .24);
}

.checkin-card span {
  color: #fff;
  font-size: 16px;
}

.checkin-card strong {
  margin-top: 18px;
  color: #fff;
  font-size: 44px;
  font-weight: 900;
}

.checkin-card strong::after {
  content: "已连续签到";
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 700;
}

.checkin-card p {
  color: rgba(255, 255, 255, .82);
}

.checkin-card .asset-model {
  width: 184px;
  height: 150px;
  right: -28px;
  bottom: -14px;
  animation: clockFloat 3.8s ease-in-out infinite;
}

.checkin-card.is-pulsing {
  animation: checkinPulse .5s ease;
}

.hot-card,
.my-card {
  border-radius: 20px;
  box-shadow: 0 12px 26px rgba(30, 41, 82, .07);
}

.hot-card {
  background: linear-gradient(145deg, #FFF6E8 0%, #FFFFFF 68%);
  border-color: rgba(255, 178, 92, .28);
}

.my-card {
  background: linear-gradient(145deg, #EAFBFA 0%, #FFFFFF 70%);
  border-color: rgba(39, 184, 176, .24);
}

.hot-card span {
  color: #D76D1D;
}

.my-card span {
  color: #0D8E91;
}

.hot-card strong,
.my-card strong {
  max-width: 128px;
  color: #21304A;
}

.hot-card p,
.my-card p {
  max-width: 116px;
  color: #6D7688;
}

.hot-card .asset-model,
.my-card .asset-model {
  width: 132px;
  height: 108px;
  right: -22px;
  bottom: -22px;
  filter: drop-shadow(0 16px 18px rgba(31, 45, 90, .18));
}

.hot-function-grid {
  gap: 14px;
}

.hot-function-grid button {
  min-height: 98px;
  padding: 20px;
  grid-template-columns: 48px 1fr;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.hot-function-grid button:active {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
}

.hot-function-grid span {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 18px;
}

.hot-function-grid strong {
  color: #2c3e50;
  font-size: 18px;
  font-weight: 900;
}

.hot-function-grid .tone-blue span {
  background: rgba(74, 108, 247, .1);
  color: #4a6cf7;
}

.hot-function-grid .tone-orange span {
  background: rgba(255, 152, 0, .12);
  color: #ff9800;
}

.hot-function-grid .tone-yellow span {
  background: rgba(255, 193, 7, .16);
  color: #d89a00;
}

.hot-function-grid .tone-red span {
  background: rgba(244, 67, 54, .11);
  color: #f44336;
}

@keyframes checkinPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes clockFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

.miniapp-shell .mini-tabbar .tab {
  color: #6b7280;
  position: relative;
}

.miniapp-shell .mini-tabbar .tab-icon,
.miniapp-shell .mini-tabbar .tab.active .tab-icon {
  width: 26px;
  height: 26px;
  border-radius: 0;
  background: transparent;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  box-shadow: none;
}

.miniapp-shell .mini-tabbar .tab.active {
  color: #4b48d9;
}

.miniapp-shell .mini-tabbar .tab.active .tab-icon {
  stroke-width: 2.2;
}

.miniapp-shell .mini-tabbar .tab-badge {
  position: absolute;
  top: 8px;
  right: calc(50% - 20px);
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}

.message-state.unread::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}

.message-state.read {
  width: 18px;
  height: 18px;
  margin-top: 14px;
  display: grid;
  place-items: center;
  background: #e8f7ef;
  color: #16a34a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  overflow: visible;
}

#messageSheet.open {
  background: rgba(15, 23, 42, .14);
  align-items: flex-start;
}

#messageSheet .sheet.positioned-pop {
  position: fixed;
  left: var(--message-pop-left, 16px);
  top: var(--message-pop-top, 90px);
  width: var(--message-pop-width, min(360px, calc(100vw - 28px)));
  max-height: min(420px, calc(100vh - 120px));
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .22);
}

#messageSheet .sheet.positioned-pop .sheet-handle {
  display: none;
}

#messageSheet .sheet.positioned-pop .sheet-actions {
  position: static;
  grid-template-columns: 1fr;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

@media (max-width: 520px) {
  body:has(.miniapp-shell:not(.hidden)) {
    background: #f7f8fc;
  }

  .miniapp-shell,
  .miniapp-shell .mini-tabbar {
    width: 100vw;
    max-width: none;
    box-shadow: none;
  }
}

/* PC admin hierarchy */
body:has(.admin-shell) {
  background: #eef2f8;
  overflow: auto;
}

.admin-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  padding: 24px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
}

.admin-shell .topbar {
  grid-column: 1 / -1;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid #dfe6f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
}

.admin-shell .topbar h1 {
  font-size: 24px;
}

.admin-sidebar {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.admin-sidebar .status-panel {
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.admin-sidebar .progress-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.admin-sidebar .progress-grid div {
  min-height: 64px;
  padding: 10px;
  border-radius: 10px;
  background: #f7f9fd;
}

.admin-tabs {
  margin: 0;
  padding: 12px;
  height: 100%;
  max-height: calc(100vh - 218px);
  display: block;
  overflow-y: auto;
  border: 1px solid #dfe6f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.admin-nav-group {
  margin: 14px 8px 8px;
  color: #8a94a6;
  font-size: 12px;
  font-weight: 900;
}

.admin-nav-group:first-child {
  margin-top: 4px;
}

.admin-tabs .tab {
  width: 100%;
  min-height: 58px;
  margin: 4px 0;
  padding: 9px 12px;
  display: grid;
  justify-items: start;
  align-content: center;
  border-radius: 10px;
  text-align: left;
}

.admin-tabs .tab span {
  color: #273248;
  font-size: 15px;
  font-weight: 900;
}

.admin-tabs .tab small {
  margin-top: 2px;
  color: #7b8494;
  font-size: 12px;
}

.admin-tabs .tab.active {
  background: linear-gradient(135deg, #6d5cf6, #7c5cf6);
  color: #fff;
  box-shadow: 0 14px 28px rgba(79, 115, 246, .22);
}

.admin-tabs .tab.active span,
.admin-tabs .tab.active small {
  color: #fff;
}

.admin-content {
  min-width: 0;
  min-height: 0;
  padding: 0 2px 36px;
}

.admin-view.active {
  display: grid;
  gap: 16px;
}

.admin-view > .section-head:first-child {
  margin-top: 0;
  padding: 18px 20px;
  border: 1px solid #dfe6f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

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

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.admin-shell .form-card,
.admin-shell .record-card,
.admin-shell .material-card,
.admin-shell .reward-card,
.admin-shell .admin-card,
.admin-preview-card {
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.admin-shell .form-card {
  padding: 18px;
}

.form-grid.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-preview-card {
  padding: 18px;
  border: 1px solid #dfe6f1;
  background: #fff;
}

.admin-preview-card h3 {
  margin: 4px 0 14px;
  font-size: 20px;
}

.preview-phone-card {
  padding: 14px;
  border-radius: 20px;
  background: #f6f7fb;
  border: 1px solid #e1e7f2;
}

.preview-top {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.preview-top span {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #6d5cf6, #7c5cf6);
  color: #fff;
  font-weight: 900;
}

.preview-dashboard {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 10px;
}

.preview-dashboard b {
  min-height: 70px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.preview-dashboard small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.preview-dashboard b:first-child {
  grid-row: span 2;
  color: #fff;
  background: linear-gradient(145deg, #6d5cf6, #7c5cf6);
}

.preview-dashboard b:first-child small {
  color: rgba(255, 255, 255, .78);
}

.preview-tabs {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  color: #667085;
  font-size: 12px;
  text-align: center;
}

.advanced-config {
  margin-top: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.advanced-config summary {
  padding: 12px 14px;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.advanced-config label {
  padding: 0 14px 14px;
}

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    max-height: none;
  }

  .admin-split,
  .admin-grid,
  .form-grid.four-col {
    grid-template-columns: 1fr;
  }
}

/* Mature desktop admin layout */
body:has(.admin-shell) {
  min-height: 100vh;
  background: #f3f6fb;
}

.admin-shell {
  width: 100%;
  max-width: none;
  height: 100vh;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  gap: 0;
  background: #f3f6fb;
}

.admin-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  min-height: 0;
  display: grid;
  grid-template-rows: 72px auto minmax(0, 1fr);
  gap: 0;
  background: #0f172a;
  border-right: 1px solid rgba(255, 255, 255, .06);
  color: #dbe4f0;
}

.admin-brand {
  height: 72px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.admin-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
}

.admin-brand strong {
  display: block;
  color: #fff;
  font-size: 16px;
}

.admin-brand span {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.admin-shell .topbar {
  grid-column: 2;
  grid-row: 1;
  height: 72px;
  margin: 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 420px) auto;
  align-items: center;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid #e5eaf2;
  border-radius: 0;
  background: rgba(255, 255, 255, .94);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.admin-shell .topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.admin-shell .topbar .eyebrow {
  margin-bottom: 5px;
  color: #64748b;
}

.admin-search {
  height: 42px;
  min-width: 0;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dfe6f1;
  border-radius: 10px;
  background: #f8fafc;
  color: #94a3b8;
}

.admin-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172033;
}

.admin-actions {
  justify-self: end;
}

.admin-link {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  border-color: #dfe6f1;
  box-shadow: none;
  background: #fff;
  color: #6d5cf6;
  font-weight: 700;
}

.admin-sidebar .status-panel {
  margin: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 12px;
  background: rgba(15, 23, 42, .72);
  box-shadow: none;
}

.admin-sidebar .store-line {
  align-items: center;
}

.admin-sidebar .muted,
.admin-sidebar .metric-label {
  color: #94a3b8;
}

.admin-sidebar .store-line strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.admin-sidebar .progress-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-sidebar .progress-grid div {
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 10px;
  background: rgba(30, 41, 59, .8);
}

.admin-sidebar .metric {
  color: #fff;
  font-size: 20px;
}

.admin-tabs {
  height: auto;
  max-height: none;
  margin: 0;
  padding: 2px 12px 18px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-nav-group {
  margin: 18px 10px 8px;
  color: #718096;
  font-size: 12px;
  letter-spacing: 0;
}

.admin-tabs .tab {
  min-height: 48px;
  margin: 3px 0;
  padding: 8px 10px 8px 46px;
  position: relative;
  border-radius: 10px;
  color: #cbd5e1;
  background: transparent;
  box-shadow: none;
}

.admin-nav-tree {
  display: grid;
  gap: 2px;
}

.admin-tabs .admin-parent-tab {
  padding-right: 30px;
}

.admin-tabs .admin-parent-tab::after {
  content: "›";
  position: absolute;
  right: 12px;
  top: 50%;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.18s ease;
}

.admin-nav-tree.open .admin-parent-tab::after {
  transform: translateY(-50%) rotate(90deg);
}

.admin-submenu {
  display: none;
  gap: 2px;
  margin-left: 12px;
  padding-left: 10px;
  border-left: 1px solid rgba(148, 163, 184, 0.28);
}

.admin-nav-tree.open .admin-submenu {
  display: grid;
}

.admin-tabs .admin-sub-tab {
  min-height: 44px;
  padding-left: 42px;
}

.admin-tabs .tab::before {
  content: attr(data-icon);
  position: absolute;
  left: 10px;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(148, 163, 184, .14);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
}

.admin-tabs .tab span {
  color: inherit;
  font-size: 14px;
}

.admin-tabs .tab small {
  margin-top: 1px;
  color: #7f8ca3;
  font-size: 11px;
}

.admin-tabs .tab.active {
  background: linear-gradient(135deg, #6d5cf6, #7c5cf6);
  color: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2);
}

.admin-tabs .tab.active::before {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.admin-tabs .tab.active span,
.admin-tabs .tab.active small {
  color: #fff;
}

.admin-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 36px;
}

.admin-view.active {
  display: grid;
  gap: 16px;
}

.admin-view > .section-head:first-child {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-view > .section-head:first-child h2 {
  font-size: 20px;
}

.admin-view > .section-head:first-child p {
  max-width: 760px;
}

.admin-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-card,
.admin-shell .form-card,
.admin-shell .record-card,
.admin-shell .task-card,
.admin-shell .material-card,
.admin-shell .reward-card,
.admin-preview-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.admin-card,
.admin-shell .form-card,
.admin-shell .record-card,
.admin-shell .task-card,
.admin-shell .material-card,
.admin-shell .reward-card {
  padding: 16px;
}

.admin-card {
  min-height: 132px;
}

.admin-card .metric {
  margin: 8px 0 2px;
  color: #4b48d9;
  font-size: 30px;
  line-height: 1;
}

.admin-shell .section-head {
  margin: 8px 0 0;
}

.admin-shell .task-list,
.admin-shell .record-list,
.admin-shell .material-list,
.admin-shell .reward-list {
  gap: 10px;
}

.admin-shell .record-card,
.admin-shell .task-card,
.admin-shell .material-card,
.admin-shell .reward-card {
  box-shadow: none;
}

.admin-shell .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-shell .form-grid.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-shell .form-card input,
.admin-shell .form-card textarea {
  min-height: 42px;
  border-radius: 9px;
  background: #f8fafc;
}

.admin-split {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.reward-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shell .reward-card {
  min-height: 122px;
}

.stock-bar {
  height: 8px;
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .admin-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .admin-shell .topbar {
    grid-template-columns: 1fr auto;
  }

  .admin-search {
    display: none;
  }

  .admin-grid,
  .reward-list,
  .admin-shell .form-grid,
  .admin-shell .form-grid.four-col,
  .admin-split,
  .activity-admin-layout:not(.is-detail),
  .participation-filter-bar {
    grid-template-columns: 1fr;
  }
}

/* Layered admin workspaces */
.admin-layer {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.layer-head,
.activity-admin-card-head,
.flow-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.layer-head h3,
.activity-admin-card-head h3,
.flow-card-head h3 {
  margin: 0;
  color: #172033;
  font-size: 17px;
  line-height: 1.35;
}

.layer-kicker {
  display: none;
}

.layer-meta,
.activity-admin-card-head > span,
.flow-card-head > span,
.activity-admin-toolbar span {
  flex-shrink: 0;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef3fb;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.activity-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.activity-admin-toolbar .primary-btn {
  min-height: 36px;
}

.admin-page-tabs {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 4px;
  display: inline-flex;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid #dfe6f1;
  border-radius: 10px;
  background: #eef3fb;
}

.admin-page-tabs button {
  min-width: 116px;
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-page-tabs button.active {
  background: #6d5cf6;
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 115, 246, 0.22);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

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

.summary-tile {
  min-width: 0;
  min-height: 96px;
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  background: #f8fafc;
}

.summary-tile span,
.summary-tile small {
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.summary-tile strong {
  min-width: 0;
  color: #172033;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.activity-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.activity-admin-list-card,
.activity-participation-card,
.activity-mode-card,
.activity-editor-card,
.shop-intake-card,
.shop-code-form,
.ledger-panel,
.activity-flow-card {
  box-shadow: none;
}

.activity-admin-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.activity-admin-item {
  width: 100%;
  min-height: 112px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.activity-admin-item.active {
  border-color: #6d5cf6;
  background: #f7f9ff;
  box-shadow: inset 3px 0 0 #6d5cf6;
}

.sample-page-head {
  margin-bottom: 12px;
}

.sample-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid #dfe6f1;
  border-radius: 10px;
  background: #eef3fb;
}

.sample-tab {
  min-width: 128px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-weight: 800;
}

.sample-tab.active {
  background: #6d5cf6;
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 115, 246, 0.22);
}

.sample-tab-panel {
  display: none;
}

.sample-tab-panel.active {
  display: block;
}

.admin-list-row.clickable-row {
  cursor: pointer;
}

.admin-list-row.clickable-row:hover {
  background: #f7f9ff;
}

.sample-request-row {
  position: relative;
  padding-right: 86px;
}

.sample-request-edit-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.activity-admin-item strong,
.activity-admin-item small,
.activity-admin-item em {
  min-width: 0;
  grid-column: 1 / -1;
}

.activity-admin-item strong {
  color: #172033;
  font-size: 15px;
  line-height: 1.35;
}

.activity-admin-item small,
.activity-admin-item em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.activity-admin-item > .pill:first-child {
  justify-self: start;
}

.activity-admin-item > i.pill {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-style: normal;
}

.list-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-list-table {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.admin-list-head,
.admin-list-row {
  display: grid;
  grid-template-columns: var(--list-cols, repeat(var(--cols), minmax(90px, 1fr)));
  align-items: center;
  gap: clamp(6px, .75vw, 12px);
  min-width: min(100%, calc(var(--cols) * 108px));
}

.admin-list-head {
  min-height: 40px;
  padding: 0 clamp(8px, .9vw, 14px);
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: clamp(11px, .68vw, 12px);
  font-weight: 800;
}

.admin-list-row {
  width: 100%;
  min-height: 52px;
  padding: clamp(7px, .75vw, 10px) clamp(8px, .9vw, 14px);
  border: 0;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  color: #172033;
  text-align: left;
  font-size: clamp(12px, .72vw, 14px);
}

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

.admin-list-row[role="button"],
button.admin-list-row {
  cursor: pointer;
}

.admin-list-row[role="button"]:hover,
.admin-list-row[role="button"]:focus-visible,
button.admin-list-row:hover,
.admin-list-row.active {
  background: #f7f9ff;
}

.admin-list-row[role="button"]:focus-visible {
  outline: 2px solid #9db3ff;
  outline-offset: -2px;
}

.admin-list-box {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.admin-list-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.admin-list-filter select,
.admin-list-filter input {
  min-height: 38px;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
  background: #f8fafc;
  color: #172033;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.admin-list-filter input {
  width: min(320px, 100%);
}

.admin-list-filter.has-bulk-actions {
  justify-content: space-between;
}

.admin-list-selector-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-list-selector-cell input {
  width: 16px;
  height: 16px;
  accent-color: #3666df;
}

.admin-list-box[data-admin-list-selectable="false"] .admin-list-head,
.admin-list-box[data-admin-list-selectable="false"] .admin-list-row {
  grid-template-columns: repeat(var(--cols), minmax(90px, 1fr));
}

.admin-list-box[data-density="compact"] .admin-list-head,
.admin-list-box[data-density="compact"] .admin-list-row {
  gap: 7px;
  min-width: min(100%, calc(var(--cols) * 98px));
}

.admin-list-box[data-density="tight"] .admin-list-head,
.admin-list-box[data-density="tight"] .admin-list-row {
  gap: 5px;
  min-width: min(100%, calc(var(--cols) * 86px));
}

.admin-list-box[data-density="tight"] .admin-list-row {
  min-height: 46px;
  font-size: 12px;
}

.admin-list-row.hidden {
  display: none !important;
}

.table-link-btn {
  min-width: 54px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef3ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.table-link-btn:hover {
  border-color: #6d5cf6;
  background: #e5edff;
}

.table-link-btn.is-configured {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #16a34a;
}

.muted-cell {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.admin-list-row strong,
.admin-list-row small {
  display: block;
  min-width: 0;
}

.admin-list-row strong {
  color: #172033;
  font-size: clamp(12px, .75vw, 14px);
  line-height: 1.28;
}

.admin-list-row small {
  margin-top: 2px;
  color: #64748b;
  font-size: clamp(10px, .66vw, 12px);
  line-height: 1.25;
}

.admin-list-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-list-row > span strong,
.admin-list-row > span small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-content-table .admin-list-head,
.marketing-content-table .admin-list-row {
  grid-template-columns:
    42px
    minmax(150px, 1.3fr)
    minmax(150px, 1.1fr)
    minmax(130px, 1fr)
    repeat(7, minmax(78px, .66fr))
    minmax(90px, .72fr)
    minmax(104px, .76fr);
  min-width: 1280px;
}

.marketing-content-table .admin-list-box[data-admin-list-selectable="false"] .admin-list-head,
.marketing-content-table .admin-list-box[data-admin-list-selectable="false"] .admin-list-row {
  grid-template-columns:
    minmax(150px, 1.3fr)
    minmax(150px, 1.1fr)
    minmax(130px, 1fr)
    repeat(7, minmax(78px, .66fr))
    minmax(90px, .72fr)
    minmax(104px, .76fr);
}

.employee-row {
  cursor: pointer;
}

.employee-row:focus-visible {
  outline: 2px solid #6d5cf6;
  outline-offset: -2px;
}

.employee-row .table-actions {
  position: relative;
  z-index: 1;
}

.activity-admin-list .admin-list-head,
.activity-admin-list .admin-list-row {
  grid-template-columns: 52px minmax(150px, 1.35fr) minmax(104px, .9fr) minmax(104px, .9fr) minmax(150px, 1.25fr) minmax(90px, .7fr) minmax(92px, .75fr) minmax(88px, .7fr) minmax(88px, .7fr) minmax(86px, .7fr);
  min-width: 1200px;
}

.participation-filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.participation-filter-bar label {
  min-width: 0;
  gap: 5px;
  color: #475569;
  font-size: 12px;
}

.participation-filter-bar input,
.participation-filter-bar select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background: #f8fafc;
  color: #172033;
}

.participation-filter-bar .secondary-btn {
  min-height: 38px;
}

.participation-record-list .admin-list-head,
.participation-record-list .admin-list-row {
  grid-template-columns: 52px minmax(82px, .8fr) minmax(116px, 1fr) minmax(92px, .8fr) minmax(88px, .8fr) minmax(88px, .8fr) minmax(190px, 1.5fr) minmax(132px, 1.05fr) minmax(96px, .85fr) minmax(92px, .8fr);
  min-width: 1160px;
}

.participation-record-row {
  cursor: default;
}

.participation-record-row .table-action-btn {
  min-height: 32px;
}

.participation-activity-hint {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.required-mark {
  color: #dc2626;
}

.activity-directory-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.activity-directory-row {
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

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

.activity-directory-row:hover {
  background: #f8fafc;
}

.activity-directory-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef3ff;
  color: #6d5cf6;
}

.activity-directory-icon.large {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

.activity-directory-icon svg,
.activity-directory-chevron svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activity-directory-main {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

.activity-directory-main strong {
  color: #172033;
  font-size: 14px;
  line-height: 1.35;
}

.activity-directory-main small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.activity-directory-status {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef3fb;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.activity-directory-status.warn {
  background: #fff4e8;
  color: #f97316;
}

.activity-directory-status.done {
  background: #eaf8ef;
  color: #16a34a;
}

.activity-directory-status.muted {
  background: #f1f5f9;
  color: #64748b;
}

.activity-directory-chevron {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  color: #94a3b8;
}

.admin-grid.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.market-calendar-year {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.market-month {
  min-width: 0;
  min-height: 108px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.market-month span {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.market-month strong {
  color: #172033;
  font-size: 28px;
  line-height: 1;
}

.market-month small {
  min-height: 34px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.market-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.market-metric-card {
  min-width: 0;
  min-height: 112px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.market-metric-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.market-metric-card strong {
  color: #172033;
  font-size: 32px;
  line-height: 1;
}

.market-metric-card small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.market-metric-card.active {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.market-metric-card.active strong {
  color: #1d4ed8;
}

.market-metric-card.soon {
  border-color: #fed7aa;
  background: #fff7ed;
}

.market-metric-card.soon strong {
  color: #c2410c;
}

.market-metric-card.pending {
  border-color: #fde68a;
  background: #fffbeb;
}

.market-metric-card.pending strong {
  color: #a16207;
}

.market-metric-card.month {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.market-metric-card.month strong {
  color: #15803d;
}

.market-calendar-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, .85fr);
  gap: 16px;
  align-items: start;
}

.market-calendar-panel {
  min-width: 0;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-toolbar .secondary-btn {
  min-height: 36px;
  padding: 0 12px;
}

.calendar-nav-btn {
  width: 38px;
  font-size: 22px;
}

.market-calendar-weekdays,
.market-calendar-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.market-calendar-weekdays {
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.market-calendar-month {
  gap: 8px;
}

.market-day {
  min-width: 0;
  min-height: 94px;
  padding: 9px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

.market-day:hover,
.market-day.is-selected {
  border-color: #6d5cf6;
  box-shadow: 0 10px 24px rgba(79, 115, 246, .13);
}

.market-day.is-muted {
  background: #f8fafc;
  color: #94a3b8;
}

.market-day.is-today > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #6d5cf6;
  color: #fff;
}

.market-day.is-selected {
  background: #f5f7ff;
}

.market-day > span {
  font-size: 13px;
  font-weight: 900;
}

.market-day-events {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.market-day-events i,
.market-day-events b {
  min-width: 0;
  height: 22px;
  padding: 0 7px;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-calendar-panel .flow-card-head {
  align-items: center;
}

.market-day-events i.online {
  background: #2563eb;
}

.market-day-events i.offline {
  background: #16a34a;
}

.market-day-events i.hybrid {
  background: #7c3aed;
}

.market-day-events i.growth {
  background: #ea580c;
}

.market-day-events b {
  background: #64748b;
  text-align: center;
}

.market-agenda-panel {
  min-width: 0;
}

.calendar-filter-note {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.calendar-type-dot {
  width: 8px;
  height: 8px;
  margin-right: 6px;
  display: inline-block;
  border-radius: 999px;
  vertical-align: middle;
}

.calendar-type-dot.online {
  background: #2563eb;
}

.calendar-type-dot.offline {
  background: #16a34a;
}

.calendar-type-dot.hybrid {
  background: #7c3aed;
}

.calendar-type-dot.growth {
  background: #ea580c;
}

.activity-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.activity-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .36);
}

.activity-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 32px));
  min-width: min(420px, calc(100vw - 32px));
  min-height: 280px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  resize: both;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

.dialog-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #f8fafc;
  color: #475569;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.activity-dialog-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding-right: 44px;
}

.activity-dialog-head p {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 13px;
}

.activity-dialog-head h2 {
  margin: 0;
  color: #172033;
  font-size: 22px;
  line-height: 1.25;
}

.activity-dialog-desc {
  margin: 18px 0;
  color: #475569;
  line-height: 1.7;
}

.activity-dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.activity-dialog-grid div,
.activity-dialog-section {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.activity-dialog-grid span,
.activity-dialog-section span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.activity-dialog-grid strong,
.activity-dialog-section p {
  margin: 0;
  color: #172033;
  font-size: 14px;
  line-height: 1.5;
}

.activity-dialog-section {
  margin-top: 10px;
}

.activity-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.admin-subpage {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.list-toolbar,
.detail-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.list-toolbar h3,
.detail-page-head h3 {
  margin: 0;
  color: #172033;
  font-size: 18px;
  line-height: 1.35;
}

.list-toolbar p,
.detail-page-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.admin-detail-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #fff;
}

.admin-detail-panel .form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-detail-panel label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.admin-detail-panel input,
.admin-detail-panel textarea,
.admin-detail-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  background: #f8fafc;
  color: #172033;
  padding: 9px 10px;
}

.detail-data-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.detail-data-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
  background: #f8fafc;
}

.detail-data-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.detail-data-grid strong {
  display: block;
  margin-top: 3px;
  color: #172033;
  overflow-wrap: anywhere;
}

.proof-image-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  background: #f8fafc;
}

.proof-image-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.proof-image-head strong {
  color: #172033;
}

.proof-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.proof-image-thumb {
  display: grid;
  gap: 6px;
  color: #475569;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.proof-image-thumb small,
.proof-image-thumb em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.proof-image-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.proof-image-empty {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  text-align: center;
}

.proof-risk-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #f8fafc;
}

.proof-risk-panel.warn {
  border-color: #f5c56f;
  background: #fff8e8;
}

.proof-risk-panel.danger {
  border-color: #f1a088;
  background: #fff1ed;
}

.proof-risk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proof-risk-head strong {
  color: #172033;
}

.proof-risk-head span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

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

.proof-risk-grid div {
  padding: 8px;
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.proof-risk-grid span,
.duplicate-match-list span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.proof-risk-grid strong,
.duplicate-match-list strong {
  color: #172033;
}

.proof-risk-panel ul {
  margin: 0;
  padding-left: 18px;
  color: #92331f;
  font-size: 13px;
  font-weight: 800;
}

.duplicate-match-list {
  display: grid;
  gap: 6px;
}

.duplicate-match-list p {
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .36);
}

#marketingRichEditorModal {
  z-index: 320;
  justify-items: center;
  align-items: center;
}

.admin-modal.hidden {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.admin-modal-card {
  width: min(820px, calc(100vw - 32px));
  min-width: min(420px, calc(100vw - 32px));
  min-height: 240px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  resize: both;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
}

.admin-modal-card.sales-visit-modal-card {
  width: min(1040px, calc(100vw - 32px));
  padding: 18px;
  display: grid;
  gap: 14px;
}

.sales-visit-modal-card .flow-card-head {
  align-items: flex-start;
}

.sales-visit-modal-card .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 0;
}

.admin-modal-head h3 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  line-height: 1.35;
}

.admin-modal-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.admin-modal-card > .form-grid,
.admin-modal-card > .modal-wide-field {
  margin: 18px;
}

.admin-modal-card > .form-grid + .modal-wide-field {
  margin-top: 0;
}

.admin-modal-card label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.admin-modal-card input,
.admin-modal-card select,
.admin-modal-card textarea {
  width: 100%;
  border: 1px solid #dfe6f1;
  border-radius: 9px;
  background: #f8fafc;
  color: #172033;
}

.admin-modal-card input,
.admin-modal-card select {
  height: 44px;
  padding: 0 12px;
}

.admin-modal-card textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.admin-modal-card .admin-detail-panel {
  padding: 18px;
}

.admin-modal-card .admin-detail-panel > .flow-card-head:first-child {
  margin: -18px -18px 0;
  padding: 18px 18px 0;
}

.admin-list-detail-card,
.admin-list-bulk-card {
  width: min(860px, calc(100vw - 32px));
}

.admin-list-detail-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: min(58vh, 520px);
  overflow: auto;
  margin: 18px;
  padding-right: 2px;
}

.admin-list-detail-body label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.admin-list-detail-body textarea {
  min-height: 48px;
  resize: vertical;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
  background: #f8fafc;
  color: #172033;
  padding: 9px 10px;
  font-size: 13px;
  line-height: 1.4;
}

.admin-list-detail-body textarea:not([readonly]) {
  background: #fff;
  border-color: #b8c7ff;
}

.admin-list-bulk-card #adminListBulkTemplate,
.admin-list-bulk-card #adminListBulkText {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre;
  overflow: auto;
}

.admin-list-bulk-card #adminListBulkFile {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.employee-form-body {
  padding: 18px;
}

.employee-form-body .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.employee-form-body label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.employee-form-body input,
.employee-form-body select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dfe6f1;
  border-radius: 9px;
  background: #f8fafc;
  color: #172033;
}

.admin-modal-card > .form-actions {
  padding: 0 18px 18px;
}

.admin-drawer {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
  background: transparent;
}

.admin-drawer.hidden {
  display: none;
}

.admin-drawer-mask {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, .32);
  cursor: pointer;
}

.admin-drawer-panel {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 48px));
  min-width: min(560px, calc(100vw - 48px));
  height: min(86vh, calc(100vh - 48px));
  min-height: 420px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  resize: both;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .24);
  animation: drawerSlideIn .22s ease-out;
}

@keyframes drawerSlideIn {
  from {
    transform: translateY(14px) scale(.985);
    opacity: .6;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.admin-drawer-panel.activity-config-drawer,
.admin-drawer-panel.mall-product-drawer {
  width: min(1080px, calc(100vw - 48px));
}

.admin-drawer-panel.marketing-config-drawer {
  width: min(1180px, calc(100vw - 48px));
}

.admin-drawer-head,
.admin-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid #e5eaf2;
}

.admin-drawer-head p {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.admin-drawer-head h3 {
  margin: 0;
  color: #172033;
  font-size: 22px;
  line-height: 1.3;
}

.admin-drawer-body {
  min-height: 0;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 18px;
  overflow: auto;
}

.marketing-config-drawer .admin-drawer-body {
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  overflow: hidden;
}

.admin-drawer-body label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.admin-drawer-body textarea,
.admin-drawer-body input,
.admin-drawer-body select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dbe4f0;
  border-radius: 9px;
  background: #f8fafc;
  color: #172033;
  padding: 10px 12px;
}

.admin-drawer-body textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.mall-product-drawer .admin-drawer-body {
  padding-bottom: 88px;
}

.mall-image-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 90px;
  gap: 12px;
  align-items: end;
}

.mall-upload-field {
  display: grid;
  gap: 8px;
}

.mall-upload-field input[type="file"] {
  display: none;
}

.mall-upload-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mall-upload-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.mall-image-preview {
  width: 92px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e8f0ff;
  color: var(--brand);
  font-size: 30px;
  font-weight: 900;
}

.mall-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mall-rich-editor {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.mall-editor-toolbar {
  min-height: 38px;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.mall-editor-toolbar span {
  min-width: 28px;
  min-height: 26px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.mall-rich-editor textarea {
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.mall-inline-toggle {
  width: fit-content;
}

.table-link-btn.danger {
  color: #dc2626;
}

.marketing-config-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.marketing-config-summary div {
  min-width: 0;
}

.marketing-config-summary span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.marketing-config-summary strong {
  display: block;
  margin-top: 4px;
  color: #172033;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.marketing-config-table {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.marketing-config-rows {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.marketing-config-head,
.marketing-config-row {
  display: grid;
  grid-template-columns: minmax(88px, .55fr) minmax(104px, .44fr) minmax(0, 1.45fr) minmax(136px, .62fr) minmax(148px, .68fr);
  gap: 12px;
  align-items: center;
}

.marketing-config-head {
  min-height: 42px;
  padding: 0 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.marketing-config-row {
  padding: 14px;
  border-bottom: 1px solid #edf2f7;
}

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

.marketing-config-row strong {
  color: #172033;
  font-size: 14px;
}

.marketing-config-row textarea,
.marketing-config-row input,
.marketing-config-row select {
  min-width: 0;
}

.marketing-config-row textarea {
  min-height: 88px;
}

.marketing-config-row.is-disabled {
  background: #f8fafc;
}

.marketing-config-row.is-disabled strong {
  color: #94a3b8;
}

.marketing-config-row.is-disabled textarea,
.marketing-config-row.is-disabled input {
  color: #94a3b8;
  background: #f1f5f9;
  cursor: not-allowed;
}

.marketing-rich-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
}

.marketing-points-field {
  margin: 0;
  display: grid !important;
}

.marketing-example-field {
  margin: 0;
  display: grid;
}

.marketing-points-btn,
.marketing-example-btn {
  min-height: 58px;
  padding: 8px 12px;
  display: grid;
  place-items: center;
  gap: 2px;
  line-height: 1.25;
}

.marketing-points-btn span,
.marketing-example-btn span {
  color: #172033;
  font-size: 15px;
  font-weight: 900;
}

.marketing-points-btn small,
.marketing-example-btn small {
  max-width: 100%;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-config-row.is-disabled .marketing-points-btn {
  color: #94a3b8;
  background: #f1f5f9;
  cursor: not-allowed;
}

.marketing-config-row.is-disabled .marketing-example-btn {
  color: #94a3b8;
  background: #f1f5f9;
  cursor: not-allowed;
}

.marketing-config-row.is-disabled .marketing-points-btn span,
.marketing-config-row.is-disabled .marketing-points-btn small,
.marketing-config-row.is-disabled .marketing-example-btn span,
.marketing-config-row.is-disabled .marketing-example-btn small {
  color: #94a3b8;
}

.marketing-rich-cell small {
  min-width: 0;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-rich-editor-card {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 48px));
}

#marketingPointsModal {
  z-index: 520;
  justify-items: center;
  align-items: center;
}

#marketingExampleModal {
  z-index: 540;
  justify-items: center;
  align-items: center;
}

#pointsHelpModal {
  z-index: 560;
  justify-items: center;
  align-items: center;
}

.marketing-points-modal-card,
.marketing-example-modal-card {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 32px));
  min-width: min(420px, calc(100vw - 32px));
  resize: none;
}

.points-config-form,
.marketing-example-form {
  margin: 18px;
  display: grid;
  gap: 14px;
}

.marketing-example-form > label {
  display: grid;
  gap: 8px;
  color: #172033;
  font-size: 14px;
  font-weight: 900;
}

.marketing-example-form select,
.marketing-example-form input,
.marketing-example-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dbe4f0;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.marketing-example-form textarea {
  min-height: 128px;
  padding: 12px;
  resize: vertical;
}

.marketing-example-form .is-hidden {
  display: none;
}

.points-config-form > label,
.points-rule-details {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.points-config-form > label {
  display: grid;
  gap: 10px;
  color: #172033;
  font-size: 14px;
  font-weight: 900;
}

.points-inline-field {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) auto minmax(126px, .7fr);
  gap: 10px;
  align-items: center;
}

.points-inline-field span {
  color: #334155;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.points-segmented,
.points-rule-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.points-segmented label,
.points-rule-options label {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dfe6f1;
  border-radius: 999px;
  background: #fff;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
}

.points-segmented input,
.points-rule-options input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: #6d5cf6;
}

.points-rule-details {
  color: #172033;
}

.points-rule-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.points-rule-details summary span {
  color: #6d5cf6;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.points-rule-options {
  margin-top: 12px;
}

.points-help-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.points-help-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.points-help-modal-card {
  width: min(560px, calc(100vw - 32px));
  min-width: min(360px, calc(100vw - 32px));
  min-height: 0;
  resize: none;
}

.points-help-content {
  margin: 18px;
  display: grid;
  gap: 10px;
}

.points-help-content p {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  line-height: 1.6;
}

.points-help-content strong {
  color: #172033;
}

.wang-editor-shell {
  margin: 18px;
  overflow: hidden;
  border: 1px solid #dfe6f1;
  border-radius: 12px;
  background: #fff;
}

.wang-editor-shell .w-e-toolbar {
  border-bottom: 1px solid #dfe6f1;
}

.wang-editor-shell .w-e-text-container {
  min-height: 360px;
  border: 0 !important;
}

.wang-editor-shell .w-e-text-container [data-slate-editor] {
  min-height: 360px;
}

.rich-editor-field {
  display: grid;
  gap: 10px;
}

.rich-editor-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.rich-editor-field-head span {
  color: #172033;
  font-weight: 900;
}

.rich-editor-field-head small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.rich-editor-shell {
  overflow: hidden;
  border: 1px solid #dfe6f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .05);
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #e7edf6;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
}

.rich-editor-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.rich-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 3px;
  border: 1px solid #dfe6f1;
  border-radius: 9px;
  background: rgba(255, 255, 255, .86);
}

.rich-tool-btn,
.rich-editor-toolbar .rich-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.rich-tool-btn:hover,
.rich-editor-toolbar .rich-tool-btn:hover {
  background: #eef3ff;
  color: #3f5fea;
  box-shadow: inset 0 0 0 1px rgba(79, 115, 246, .16);
}

.rich-tool-text {
  min-width: auto;
  padding: 0 10px;
}

.rich-select-label,
.rich-color-btn {
  min-height: 36px;
  padding: 3px 8px;
  border: 1px solid #dfe6f1;
  border-radius: 9px;
  background: rgba(255, 255, 255, .86);
}

.rich-select-label span,
.rich-color-btn span {
  color: #64748b;
  font-size: 12px;
}

.rich-editor-toolbar select,
.rich-editor-toolbar input[type="color"] {
  height: 30px;
}

.rich-editor-toolbar select {
  min-width: 82px;
  border: 0;
  background: transparent;
  color: #172033;
  font-weight: 900;
}

.rich-editor-toolbar input[type="color"] {
  width: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.rich-file-input,
.rich-editor-toolbar > input[type="file"] {
  display: none !important;
}

.rich-upload-btn {
  cursor: pointer;
}

.rich-editor-upload {
  cursor: pointer;
}

.rich-editor-surface {
  min-height: 260px;
  padding: 16px;
  border: 1px solid #dfe6f1;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  line-height: 1.7;
  overflow: auto;
}

.rich-editor-shell .rich-editor-surface {
  min-height: 300px;
  border: 0;
  border-radius: 0;
}

.rich-editor-surface:focus {
  border-color: #6d5cf6;
  outline: 3px solid rgba(79, 115, 246, .14);
}

.rich-editor-shell .rich-editor-surface:focus {
  outline: 0;
  box-shadow: inset 0 0 0 2px rgba(79, 115, 246, .18);
}

.rich-editor-surface:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
}

.rich-editor-surface p,
.rich-editor-surface ul,
.rich-editor-surface ol,
.rich-editor-surface blockquote {
  margin: 0 0 10px;
}

.rich-editor-surface ul,
.rich-editor-surface ol {
  padding-left: 22px;
}

.rich-editor-surface img,
.rich-editor-surface video {
  display: block;
  max-width: 100%;
  margin: 10px 0;
  border-radius: 8px;
}

.rich-html-field {
  display: grid;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.admin-drawer-footer {
  justify-content: flex-end;
  border-top: 1px solid #e5eaf2;
  border-bottom: 0;
  background: #fff;
  box-shadow: 0 -10px 28px rgba(15, 23, 42, .06);
}

.admin-drawer-footer .primary-btn,
.admin-drawer-footer .secondary-btn {
  flex: 0 0 auto;
  min-width: 116px;
}

.drawer-channel-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

@media (max-width: 860px) {
  .admin-drawer-panel {
    width: calc(100vw - 24px);
    min-width: 0;
    height: calc(100vh - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .drawer-channel-fields {
    grid-template-columns: 1fr;
  }

  .marketing-config-summary,
  .marketing-config-head,
  .marketing-config-row {
    grid-template-columns: 1fr;
  }

  .marketing-config-head {
    display: none;
  }
}

/* Hotspot micro page builder, matched to the referenced three-column editor. */
body.hotspot-builder-mode {
  background: #eef1f6;
}

body.hotspot-builder-mode .admin-shell {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
}

body.hotspot-builder-mode .admin-sidebar,
body.hotspot-builder-mode .admin-topbar {
  display: none;
}

body.hotspot-builder-mode .admin-content {
  grid-column: 1;
  grid-row: 1;
  padding: 0;
  overflow: hidden;
}

body.hotspot-builder-mode .admin-view:not(#hotspotPagesAdminView) {
  display: none !important;
}

#hotspotPagesAdminView.active {
  gap: 0;
}

#hotspotPagesAdminView > .section-head:first-child {
  min-height: 58px;
  margin: 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5eaf2;
  background: #fff;
}

#hotspotPagesAdminView > .section-head:first-child h2 {
  margin: 0;
  font-size: 18px;
}

#hotspotPagesAdminView > .section-head:first-child p {
  display: none;
}

.hotspot-builder {
  height: calc(100vh - 58px);
  margin: 0;
  display: grid;
  grid-template-columns: 280px minmax(420px, 1fr) 380px;
  overflow: hidden;
  border-top: 1px solid #edf0f5;
  background: #eef1f6;
}

.hotspot-component-panel,
.hotspot-settings-panel {
  min-height: 0;
  overflow-y: auto;
  background: #fff;
}

.hotspot-component-panel {
  padding: 18px;
  border-right: 1px solid #e5eaf2;
}

.hotspot-panel-title {
  margin: 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f2937;
}

.hotspot-panel-title strong {
  font-size: 15px;
}

.hotspot-panel-title span {
  color: #8a94a6;
  font-size: 12px;
}

.hotspot-component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 26px;
}

.hotspot-component-grid button {
  height: 96px;
  border: 1px solid #edf0f5;
  border-radius: 3px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: #fff;
  color: #2d3748;
  cursor: pointer;
}

.hotspot-component-grid button:hover {
  border-color: #74aec4;
  color: #3187a0;
}

.hotspot-component-grid span {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #12384a;
  font-weight: 900;
}

.hotspot-component-grid strong {
  font-size: 14px;
  font-weight: 500;
}

.hotspot-canvas-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: start center;
  padding: 32px 28px 64px;
  background: #eef1f6;
}

.hotspot-phone {
  width: 376px;
  min-height: 720px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.hotspot-phone-status {
  height: 34px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.hotspot-phone-status b {
  width: 74px;
  height: 14px;
  display: block;
  background:
    radial-gradient(circle at 8px 7px, #111 0 3px, transparent 4px),
    radial-gradient(circle at 24px 7px, #111 0 3px, transparent 4px),
    radial-gradient(circle at 40px 7px, #111 0 3px, transparent 4px),
    linear-gradient(#111, #111) right center / 24px 10px no-repeat;
}

.hotspot-phone-title {
  height: 54px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #e5eaf2;
  font-size: 17px;
  font-weight: 800;
}

.hotspot-stage-shell {
  min-height: 620px;
  background: #f8fafc;
}

.hotspot-stage {
  position: relative;
  width: 100%;
  min-height: 620px;
  touch-action: none;
  user-select: none;
}

.hotspot-bg-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 620px;
  object-fit: cover;
}

.hotspot-empty-state {
  min-height: 620px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #8a94a6;
  text-align: center;
}

.hotspot-empty-state strong {
  color: #263445;
  font-size: 17px;
}

.hotspot-area {
  position: absolute;
  z-index: 2;
  min-width: 24px;
  min-height: 20px;
  border: 2px solid rgba(42, 139, 166, 0.92);
  border-radius: 2px;
  padding: 0;
  overflow: visible;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background: rgba(54, 160, 190, 0.18);
  color: #fff;
  cursor: move;
}

.hotspot-area.active {
  border-color: #ff8a24;
  background: rgba(255, 138, 36, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 138, 36, 0.28);
}

.hotspot-area span {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  background: #2a8ba6;
  font-size: 12px;
  font-weight: 900;
}

.hotspot-area.active span {
  background: #ff8a24;
}

.hotspot-area strong {
  max-width: calc(100% - 20px);
  padding: 2px 5px;
  overflow: hidden;
  color: #fff;
  background: rgba(17, 24, 39, 0.5);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}

.hotspot-resize-handle {
  position: absolute;
  z-index: 3;
  width: 10px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 2px;
  background: #ff8a24;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
}

.hotspot-resize-handle.nw {
  left: -5px;
  top: -5px;
  cursor: nwse-resize;
}

.hotspot-resize-handle.ne {
  right: -5px;
  top: -5px;
  cursor: nesw-resize;
}

.hotspot-resize-handle.n {
  left: calc(50% - 5px);
  top: -5px;
  cursor: ns-resize;
}

.hotspot-resize-handle.e {
  right: -5px;
  top: calc(50% - 5px);
  cursor: ew-resize;
}

.hotspot-resize-handle.w {
  left: -5px;
  top: calc(50% - 5px);
  cursor: ew-resize;
}

.hotspot-resize-handle.sw {
  left: -5px;
  bottom: -5px;
  cursor: nesw-resize;
}

.hotspot-resize-handle.se {
  right: -5px;
  bottom: -5px;
  cursor: nwse-resize;
}

.hotspot-resize-handle.s {
  left: calc(50% - 5px);
  bottom: -5px;
  cursor: ns-resize;
}

.hotspot-settings-panel {
  padding: 20px 24px 36px;
  border-left: 1px solid #e5eaf2;
  color: #4b5563;
}

.hotspot-settings-head {
  margin: -20px -24px 20px;
  padding: 17px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5eaf2;
}

.hotspot-settings-head strong {
  color: #1f2937;
  font-size: 18px;
}

.hotspot-settings-head span {
  color: #8a94a6;
  font-size: 12px;
}

.hotspot-settings-panel label,
.hotspot-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #6b7280;
  font-size: 14px;
}

.hotspot-settings-panel input,
.hotspot-settings-panel select,
.hotspot-form input,
.hotspot-form select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #e5eaf2;
  border-radius: 3px;
  background: #fff;
  color: #263445;
}

.hotspot-settings-panel input[readonly] {
  background: #f3f4f6;
  color: #9aa2af;
}

.hotspot-template-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 4px 0 16px;
  border: 1px solid #e5eaf2;
  border-radius: 4px;
  overflow: hidden;
}

.hotspot-template-row button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid #e5eaf2;
  background: #fff;
  color: #596273;
  cursor: pointer;
}

.hotspot-template-row button:last-child {
  border-right: 0;
}

.hotspot-template-row button.active {
  color: #2a8ba6;
  background: #eef9fc;
  box-shadow: inset 0 0 0 1px #68b8cf;
}

.hotspot-upload-card,
.hotspot-list-card {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #edf0f5;
  border-radius: 3px;
  background: #fff;
}

.hotspot-upload-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hotspot-upload-card strong,
.hotspot-list-card h3 {
  color: #263445;
  font-size: 14px;
}

.hotspot-upload-card span {
  display: block;
  margin-top: 4px;
  color: #9aa2af;
  font-size: 12px;
}

.hotspot-upload-card input[type="file"] {
  display: none;
}

.hotspot-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.hotspot-list button {
  min-height: 56px;
  padding: 8px;
  border: 1px solid #edf0f5;
  border-radius: 3px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  background: #fff;
  text-align: left;
}

.hotspot-list button.active {
  border-color: #68b8cf;
  background: #eef9fc;
}

.hotspot-list button > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2a8ba6;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.hotspot-list strong,
.hotspot-list small {
  display: block;
}

.hotspot-list small {
  margin-top: 3px;
  color: #8a94a6;
}

.hotspot-form {
  padding-top: 16px;
  border-top: 1px solid #edf0f5;
}

.hotspot-link-hint {
  margin: -6px 0 14px;
  padding: 9px 10px;
  border: 1px solid #dbeef5;
  border-radius: 4px;
  background: #f2fbfe;
  color: #5f7184;
  font-size: 12px;
  line-height: 1.5;
}

.hotspot-form.is-disabled {
  opacity: 0.58;
}

.hotspot-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hotspot-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  margin: 8px 0 18px;
}

.hotspot-switch-list {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
}

.hotspot-switch-list label {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hotspot-switch-list input {
  width: 42px;
  min-height: 24px;
  accent-color: #2a8ba6;
}

.hotspot-range-list {
  padding-top: 16px;
}

.hotspot-range-list input {
  padding: 0;
  accent-color: #2a8ba6;
}

.mini-hotspot-page {
  margin: 12px 0 18px;
}

.mini-hotspot-title {
  color: #263445;
  font-size: 17px;
  font-weight: 800;
}

.mini-hotspot-bar {
  min-height: 36px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-hotspot-back {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #5261f6;
  font-size: 13px;
  font-weight: 900;
}

.mini-hotspot-image-wrap {
  position: relative;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 35, 60, 0.08);
}

.mini-hotspot-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.mini-hotspot-area {
  position: absolute;
  border: 0;
  border-radius: 0;
  background: rgba(42, 139, 166, 0.01);
}

.mini-hotspot-area:active {
  background: rgba(42, 139, 166, 0.16);
}

@media (max-width: 1280px) {
  .hotspot-builder {
    grid-template-columns: 220px minmax(360px, 1fr) 340px;
  }

  .hotspot-phone {
    width: 344px;
  }
}

.activity-editor-grid {
  display: grid;
  gap: 14px;
}

.activity-mode-card {
  display: grid;
  gap: 14px;
}

.activity-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.activity-mode-tabs button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.activity-mode-tabs button.active {
  border-color: #6d5cf6;
  background: #eef3ff;
  color: #4b48d9;
}

.activity-admin-layout.is-detail .activity-editor-card {
  width: 100%;
}

.activity-admin-layout.is-detail .activity-editor-grid {
  grid-template-columns: minmax(0, 1fr);
}

.activity-admin-layout.is-detail .config-group .form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.activity-admin-layout.is-detail .config-group:nth-child(3) .form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.activity-admin-layout.is-detail .config-group textarea {
  min-height: 96px;
}

.config-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  background: #fbfdff;
}

.config-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5eaf2;
}

.config-group-head span {
  color: #172033;
  font-size: 15px;
  font-weight: 900;
}

.config-group-head small {
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

.activity-marketing-summary,
.activity-checkin-summary {
  min-height: 64px;
  padding: 14px;
  display: grid;
  gap: 5px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.activity-marketing-summary strong,
.activity-checkin-summary strong {
  color: #172033;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.activity-marketing-summary small,
.activity-checkin-summary small {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.activity-config-drawer [data-activity-config-step-panel="details"] {
  gap: 16px;
  background: #f8fbff;
}

.activity-config-drawer [data-activity-config-step-panel="details"] > label {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.activity-config-drawer [data-activity-config-step-panel="details"] textarea {
  min-height: 118px;
}

.activity-config-drawer .rich-editor-field {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.activity-config-drawer .rich-editor-field-head {
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f7;
}

.activity-config-drawer .modern-rich-editor {
  border-radius: 10px;
  box-shadow: none;
}

.activity-config-drawer .modern-rich-editor .rich-editor-toolbar {
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
}

.activity-config-drawer .modern-rich-editor .rich-toolbar-group {
  flex: 0 0 auto;
  min-height: 34px;
}

.activity-config-drawer .modern-rich-editor .rich-tool-btn,
.activity-config-drawer .modern-rich-editor .rich-select-label,
.activity-config-drawer .modern-rich-editor .rich-color-btn {
  flex: 0 0 auto;
}

.activity-config-drawer .modern-rich-editor .rich-tool-text {
  min-width: 56px;
  padding-inline: 11px;
}

.activity-config-drawer .modern-rich-editor .rich-select-label {
  width: 132px;
}

.activity-config-drawer .modern-rich-editor .rich-editor-surface {
  min-height: 240px;
  background: #fff;
}

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

.feature-toggle {
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.feature-toggle input {
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  accent-color: #6d5cf6;
}

.feature-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.feature-toggle-with-note,
.feature-toggle-action {
  align-items: flex-start;
  flex-wrap: wrap;
}

.feature-toggle-with-note input,
.feature-toggle-action input {
  margin-top: 2px;
}

.feature-toggle-with-note span,
.feature-toggle-action span {
  padding-top: 2px;
}

.feature-toggle-with-note small {
  flex-basis: 100%;
  padding-left: 26px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.makeup-rule-inline-btn {
  min-height: 24px;
  margin-left: auto;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 900;
}

.makeup-rule-modal-card {
  width: min(620px, calc(100vw - 32px));
  min-height: 0;
  resize: none;
}

#makeupRuleModal {
  z-index: 150;
}

.makeup-rule-modal-card .form-actions {
  margin: 0 18px 18px;
}

.makeup-rule-hint {
  margin: 0 18px 18px;
  padding: 10px 12px;
  border: 1px solid #dfe7ff;
  border-radius: 10px;
  background: #f6f8ff;
  color: #64748b;
  font-size: 13px;
}

.marketing-channel-panels {
  display: grid;
  gap: 10px;
}

.marketing-channel-config {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.24s ease;
}

.marketing-channel-config.is-open {
  max-height: 520px;
  opacity: 1;
  transform: translateY(0);
}

.marketing-channel-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-left: 4px solid #6d5cf6;
  border-radius: 8px;
  background: #f8fafc;
}

.marketing-channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.marketing-channel-head strong {
  color: #172033;
  font-size: 15px;
}

.marketing-channel-head small {
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

.marketing-incentive-block {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 700;
}

.marketing-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-pill {
  width: fit-content;
  min-height: 34px;
  padding: 7px 10px;
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 6px !important;
  border: 1px solid #d8e1ee;
  border-radius: 999px !important;
  background: #fff;
  color: #172033 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.radio-pill input {
  width: 16px !important;
  height: 16px !important;
  padding: 0 !important;
  accent-color: #6d5cf6;
}

.marketing-channel-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.visit-purpose-group {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 700;
}

.visit-purpose-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visit-purpose-option {
  width: fit-content;
  min-width: 96px;
  background: #f8fafc;
}

.visit-photo-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.visit-photo-thumb {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.visit-photo-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}

.visit-photo-thumb figcaption {
  display: grid;
  gap: 2px;
  padding: 8px;
  color: #172033;
  font-size: 12px;
  font-weight: 800;
}

.visit-photo-thumb small {
  color: #64748b;
  font-weight: 700;
}

.record-empty.compact {
  min-height: 64px;
  padding: 14px;
}

[data-incentive-field] {
  display: none !important;
}

[data-incentive-field].is-visible {
  display: grid !important;
}

.admin-shell .form-card select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
  color: var(--text);
}

.activity-flow-grid,
.shop-ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

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

.activity-flow-card,
.ledger-panel {
  min-width: 0;
  align-self: start;
}

.activity-flow-card .record-list,
.ledger-panel .record-list {
  max-height: none;
  overflow: auto;
}

.shop-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  gap: 16px;
  align-items: start;
}

.shop-code-form {
  margin-bottom: 0;
}

.ledger-row {
  padding: 14px;
}

@media (max-width: 1280px) {
  .activity-summary-grid,
  .shop-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-admin-layout,
  .activity-admin-layout.is-detail .config-group .form-grid,
  .activity-admin-layout.is-detail .config-group:nth-child(3) .form-grid,
  .shop-workspace,
  .activity-flow-grid,
  .admin-grid.two-col {
    grid-template-columns: 1fr;
  }

  .market-calendar-year {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .market-calendar-workbench {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .activity-summary-grid,
  .shop-summary-grid,
  .market-metrics-grid,
  .feature-toggle-grid,
  .activity-theme-image-row,
  .marketing-channel-fields,
  .employee-form-body .form-grid,
  .visit-photo-preview,
  .activity-mode-tabs,
  .shop-ledger-grid {
    grid-template-columns: 1fr;
  }

  .layer-head,
  .activity-admin-card-head,
  .flow-card-head,
  .config-group-head,
  .marketing-channel-head,
  .activity-admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .config-group-head small,
  .marketing-channel-head small {
    text-align: left;
  }

  .market-calendar-panel {
    overflow-x: auto;
  }

  .market-calendar-weekdays,
  .market-calendar-month {
    min-width: 720px;
  }
}

/* Front app visual polish */
.miniapp-shell {
  --front-ink: #152033;
  --front-muted: #6b778c;
  --front-border: #e2e8f3;
  --front-surface: rgba(255, 255, 255, .94);
  --front-blue: #6d5cf6;
  --front-violet: #6d5cf6;
  --front-teal: #4b48d9;
  --front-coral: #ff765e;
  --front-amber: #f59e0b;
  background:
    linear-gradient(180deg, #f7f5ff 0%, #f5f4fb 48%, #fbfbff 100%);
  color: var(--front-ink);
}

.miniapp-shell .view {
  padding: 14px 18px 96px;
}

.mp-navbar {
  height: 66px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(226, 232, 243, .9);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 28px rgba(34, 48, 82, .07);
  backdrop-filter: blur(18px);
}

.mp-navbar strong {
  color: var(--front-ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.mp-logo {
  width: 60px;
  height: 42px;
}

.mp-capsule {
  height: 38px;
  border: 1px solid rgba(210, 218, 232, .95);
  border-radius: 19px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75), 0 8px 20px rgba(24, 35, 66, .08);
}

.partner-hero {
  position: relative;
  margin-top: 14px;
  padding: 24px;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 44%),
    linear-gradient(135deg, #6d5cf6 0%, #755df4 58%, #4b48d9 135%);
  box-shadow: 0 20px 42px rgba(56, 74, 150, .22);
}

.partner-hero .store-avatar {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: #fff;
  color: var(--front-blue);
  font-size: 30px;
  box-shadow: 0 16px 28px rgba(28, 38, 74, .2);
}

.partner-hero .hero-store strong,
.partner-hero #storeName {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.partner-hero .hero-store p,
.partner-hero #identityLine {
  color: rgba(255, 255, 255, .82);
}

.partner-hero .vip-badge {
  min-height: 40px;
  padding: 0 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.home-dashboard,
.hot-function-grid {
  gap: 14px;
}

.home-card,
.hot-card,
.my-card,
.activity-card,
.profile-service-card,
.profile-stat-card {
  border: 1px solid rgba(226, 232, 243, .92);
  background: var(--front-surface);
  box-shadow: 0 16px 38px rgba(28, 38, 74, .08);
}

.home-card,
.hot-card,
.my-card {
  border-radius: 22px;
}

.checkin-card {
  min-height: 232px;
  padding: 32px 24px;
  border: 0;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 42%),
    linear-gradient(145deg, #526df5 0%, #6b5df6 58%, #13b7a7 132%);
  box-shadow: 0 22px 42px rgba(63, 82, 170, .24);
}

.hot-card {
  background:
    linear-gradient(145deg, rgba(255, 246, 229, .82), rgba(255, 255, 255, .96) 68%);
}

.my-card {
  background:
    linear-gradient(145deg, rgba(235, 253, 249, .78), rgba(255, 255, 255, .96) 70%);
}

.home-dashboard {
  grid-template-columns: 1.08fr 1fr;
  grid-template-rows: repeat(2, minmax(106px, 1fr));
  gap: 14px;
  margin: 16px 0 20px;
}

.home-card {
  isolation: isolate;
  min-height: 112px;
  padding: 18px 20px;
  display: grid;
  align-content: start;
  border-radius: 24px;
}

.home-card span,
.home-card strong,
.home-card .home-card-badge {
  position: relative;
  z-index: 3;
}

.home-card span {
  color: #6b7280;
  font-size: 14px;
  letter-spacing: 0;
}

.home-card strong {
  max-width: 150px;
  margin-top: 10px;
  color: #182238;
  font-size: 25px;
  line-height: 1.1;
}

.home-card p {
  display: none;
}

.home-card-badge {
  width: fit-content;
  min-height: 30px;
  margin-top: 14px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, .68);
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, .8);
}

.checkin-card {
  min-height: 238px;
  padding: 30px 24px;
  align-content: start;
  border-radius: 28px;
  background:
    radial-gradient(circle at 76% 74%, rgba(255, 255, 255, .34) 0 54px, transparent 55px),
    linear-gradient(150deg, #6579ff 0%, #6554f3 50%, #4b48d9 118%);
  box-shadow: 0 24px 48px rgba(63, 82, 170, .24);
}

.checkin-card span {
  color: rgba(255, 255, 255, .9);
  font-size: 16px;
}

.checkin-card strong {
  max-width: none;
  margin-top: 18px;
  color: #fff;
  font-size: 58px;
  line-height: .95;
}

.checkin-card strong::after {
  content: "已连续签到";
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.checkin-card .home-card-badge {
  margin-top: auto;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34);
  backdrop-filter: blur(8px);
}

.checkin-card .asset-model {
  width: 132px;
  height: 108px;
  right: -22px;
  bottom: 12px;
  opacity: .74;
}

.hot-card,
.my-card {
  min-height: 112px;
  overflow: hidden;
}

.hot-card {
  background:
    radial-gradient(circle at 84% 24%, rgba(255, 165, 77, .35) 0 28px, transparent 29px),
    linear-gradient(145deg, #fff8ed 0%, #fff 68%);
}

.my-card {
  background:
    radial-gradient(circle at 86% 82%, rgba(18, 184, 166, .18) 0 34px, transparent 35px),
    linear-gradient(145deg, #ecfffb 0%, #fff 72%);
}

.hot-card strong,
.my-card strong {
  max-width: calc(100% - 8px);
  padding-right: 0;
  font-size: 24px;
  white-space: nowrap;
}

.hot-card .home-card-badge,
.my-card .home-card-badge {
  position: absolute;
  right: 16px;
  top: 16px;
  margin: 0;
}

.hot-card .home-card-badge {
  background: #ff8a3d;
  color: #fff;
  box-shadow: 0 10px 18px rgba(255, 138, 61, .22);
}

.my-card .home-card-badge {
  background: #6d5cf6;
  color: #fff;
  box-shadow: 0 10px 18px rgba(109, 92, 246, .22);
}

.hot-card .asset-model,
.my-card .asset-model {
  width: 108px;
  height: 88px;
  right: -22px;
  bottom: -18px;
  opacity: .78;
}

@media (max-width: 370px) {
  .home-dashboard {
    gap: 10px;
  }

  .home-card {
    padding: 16px;
    border-radius: 20px;
  }

  .checkin-card {
    min-height: 218px;
    padding: 24px 18px;
  }

  .checkin-card strong {
    font-size: 48px;
  }

  .checkin-card .asset-model {
    width: 116px;
    height: 94px;
    right: -24px;
    bottom: 14px;
  }

  .home-card strong {
    font-size: 21px;
  }

  .hot-card strong,
  .my-card strong {
    max-width: calc(100% - 4px);
    padding-right: 0;
    font-size: 20px;
  }

  .hot-card .asset-model,
  .my-card .asset-model {
    width: 84px;
    height: 68px;
    right: -20px;
  }
}

.hot-function-grid button {
  min-height: 96px;
  padding: 18px;
  grid-template-columns: 48px 1fr;
  border: 1px solid rgba(226, 232, 243, .92);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(28, 38, 74, .06);
}

.hot-function-grid span {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.hot-function-grid strong {
  color: var(--front-ink);
  font-size: 17px;
  font-weight: 900;
}

#profileView {
  margin-left: calc(-1 * var(--space-page));
  margin-right: calc(-1 * var(--space-page));
  padding-top: 0;
  background: linear-gradient(180deg, #f5f8ff 0%, #f8fbff 100%);
}

#profileView .profile-list {
  gap: 0;
}

#profileServiceView {
  margin-left: calc(-1 * var(--space-page));
  margin-right: calc(-1 * var(--space-page));
  padding: 0 18px 24px;
  background: linear-gradient(180deg, #f5f8ff 0%, #f8fbff 100%);
}

.profile-service-page {
  display: grid;
  gap: 14px;
}

.profile-service-head {
  margin: 0 -18px;
  padding: 26px 24px 78px;
  border-radius: 0 0 30px 30px;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #6d5cf6 0%, #755df4 60%, #4b48d9 142%);
  color: #fff;
  box-shadow: 0 22px 44px rgba(56, 74, 150, .18);
}

.profile-service-head p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
  font-weight: 900;
}

.profile-service-head h2 {
  margin: 0;
  color: #fff;
  font-size: 26px;
  line-height: 1.22;
}

.profile-service-body {
  position: relative;
  z-index: 1;
  margin-top: -58px;
  padding: 18px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(226, 232, 243, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 36px rgba(28, 38, 74, .1);
}

.profile-hero-panel {
  position: relative;
  min-height: 206px;
  padding: 34px 24px 82px;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #6d5cf6 0%, #755df4 60%, #4b48d9 142%);
  color: #fff;
  box-shadow: 0 22px 44px rgba(56, 74, 150, .2);
}

.profile-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: #fff;
  color: var(--front-blue);
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(24, 35, 66, .22);
}

.profile-hero-copy span {
  display: inline-flex;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  font-weight: 800;
}

.profile-hero-content strong {
  color: #fff;
  font-size: 24px;
  line-height: 1.22;
}

.profile-hero-content p {
  margin-top: 7px;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
}

.profile-hero-content .profile-info-btn {
  min-width: 76px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 900;
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.profile-stat-card {
  position: relative;
  z-index: 2;
  margin: -54px 18px 16px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border-radius: 24px;
}

.profile-stat-card.has-scope-switch {
  padding-top: 12px;
}

.profile-scope-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(226, 232, 243, .95);
  border-radius: 18px;
  background: #eef3f8;
}

.profile-scope-switch button,
.profile-stat-grid button {
  min-width: 0;
  border: 0;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.profile-scope-switch button {
  min-height: 46px;
  padding: 6px 8px;
  display: grid;
  place-items: center;
  gap: 1px;
  border-radius: 14px;
  background: transparent;
  color: var(--front-muted);
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-scope-switch button.active {
  background:
    linear-gradient(135deg, #4b48d9 0%, #6d5cf6 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(109, 92, 246, .24);
}

.profile-scope-switch button:active,
.profile-stat-grid button:active,
.profile-service-list button:active {
  transform: translateY(1px);
}

.profile-scope-switch span {
  color: currentColor;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}

.profile-scope-switch small {
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  opacity: .72;
  line-height: 1.1;
}

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

.profile-stat-grid button {
  min-height: 76px;
  padding: 10px 4px;
  display: grid;
  place-items: center;
  gap: 5px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
}

.profile-stat-grid strong {
  color: var(--front-blue);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
}

.profile-stat-grid span {
  color: var(--front-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.profile-banner {
  margin: 0 18px 18px;
  min-height: 96px;
  padding: 20px 24px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, 0) 44%),
    linear-gradient(135deg, #fff2dc 0%, #ffd9cf 58%, #ff765e 132%);
  box-shadow: 0 18px 34px rgba(255, 118, 94, .18);
}

.profile-banner span {
  color: #ef5c22;
  font-size: 18px;
  font-weight: 900;
}

.profile-banner strong {
  margin-top: 8px;
  color: var(--front-ink);
  font-size: 14px;
  line-height: 1.3;
}

.profile-banner b {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--front-coral);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 118, 94, .28);
}

.profile-service-card {
  margin: 0 18px 18px;
  padding: 22px 18px 12px;
  border-radius: 26px;
}

.profile-service-card h3 {
  margin-bottom: 16px;
  color: var(--front-ink);
  font-size: 20px;
  font-weight: 900;
}

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

.profile-service-list button {
  min-height: 78px;
  padding: 12px 6px 12px 0;
  display: grid;
  grid-template-columns: 60px 1fr 24px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 243, .72);
  border-radius: 0;
  background: transparent;
}

.profile-service-list button:last-child {
  border-bottom: 0;
}

.profile-service-list button > span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #edf3ff;
  color: var(--front-blue);
  font-weight: 900;
}

.profile-service-list button:nth-child(2n) > span {
  background: #fff6df;
  color: var(--front-amber);
}

.profile-service-list button:nth-child(3n) > span {
  background: #e9fbf7;
  color: var(--front-teal);
}

.profile-service-list strong {
  color: var(--front-ink);
  font-size: 17px;
  font-weight: 900;
}

.profile-service-list small {
  margin-top: 3px;
  color: var(--front-muted);
  font-size: 12px;
}

.profile-service-list i {
  color: #9aa6b7;
  font-size: 26px;
  font-style: normal;
}

.miniapp-shell .mini-tabbar {
  height: 74px;
  padding: 8px 18px 10px;
  border-top: 1px solid rgba(226, 232, 243, .95);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 -14px 36px rgba(28, 38, 74, .1);
  backdrop-filter: blur(18px);
}

.miniapp-shell .mini-tabbar .tab {
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  color: var(--front-muted);
}

.miniapp-shell .mini-tabbar .tab.active {
  border: 0;
  background: #eef3ff;
  color: var(--front-blue);
  box-shadow: none;
}

.miniapp-shell .mini-tabbar .tab-icon,
.miniapp-shell .mini-tabbar .tab.active .tab-icon {
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: transparent;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  box-shadow: none;
}

@media (max-width: 520px) {
  .miniapp-shell,
  .miniapp-shell .mini-tabbar {
    width: 100%;
  }

  .profile-hero-panel {
    padding-left: 26px;
    padding-right: 26px;
  }
}
