* {
  box-sizing: border-box;
}

/* Order feedback */
.order-success-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-action {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #e5483b;
  border-radius: 8px;
  background: #fff;
  color: #d9362b;
  font-weight: 700;
  cursor: pointer;
}

.feedback-action.pending {
  border-color: #d99b21;
  color: #9a6500;
  background: #fff8e8;
}

.feedback-action.handled {
  border-color: #4b65a7;
  color: #28457f;
  background: #f2f6ff;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(17, 24, 39, .58);
}

.feedback-modal.open { display: flex; }

.feedback-panel {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
}

.feedback-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e7e9ef;
}

.feedback-head h2 { margin: 0; font-size: 20px; }
.feedback-head p { margin: 5px 0 0; color: #6b7280; font-size: 13px; }

.feedback-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.feedback-body[hidden], .feedback-result[hidden] { display: none; }
.feedback-body label { display: grid; gap: 7px; color: #374151; font-size: 14px; font-weight: 700; }
.feedback-body select,
.feedback-body textarea,
.feedback-body input[type="file"] {
  width: 100%;
  border: 1px solid #cfd5df;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font: inherit;
}
.feedback-body select { min-height: 42px; padding: 0 11px; }
.feedback-body textarea { padding: 10px 11px; resize: vertical; }
.feedback-body input[type="file"] { padding: 9px; font-weight: 400; }
.feedback-body small { color: #7b8494; font-weight: 400; }

.feedback-submit {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: #eb4035;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.feedback-submit:disabled { opacity: .6; cursor: wait; }

.feedback-preview,
.feedback-result-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feedback-preview img,
.feedback-result-images img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid #d9dee8;
  border-radius: 6px;
}

.feedback-result { padding: 20px; }
.feedback-result dl { margin: 14px 0 0; display: grid; gap: 10px; }
.feedback-result dl div { display: grid; grid-template-columns: 78px 1fr; gap: 10px; }
.feedback-result dt { color: #6b7280; }
.feedback-result dd { margin: 0; color: #1f2937; word-break: break-word; }
.feedback-status { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: #eef2f7; font-weight: 800; }
.feedback-status.pending { color: #976100; background: #fff4d6; }
.feedback-status.refunded { color: #08785c; background: #e6f8f2; }
.feedback-status.rejected { color: #bd3028; background: #fff0ef; }

@media (max-width: 640px) {
  #ordersPage .section-head { margin-bottom: 10px; }
  #ordersPage .section-head .eyebrow { font-size: 11px; }
  #ordersPage .section-head h1 { font-size: 22px; }
  #ordersPage .section-head p { font-size: 13px; line-height: 1.5; }
  .order-search { padding: 10px; gap: 8px; border-radius: 8px; }
  .order-search label { gap: 5px; font-size: 12px; }
  .order-search input { min-height: 40px; padding: 0 11px; font-size: 15px; }
  .order-search button { min-height: 38px; padding: 0 18px; font-size: 14px; }
  .order-list { gap: 9px; }
  .order-item { padding: 12px; gap: 9px; border-radius: 8px; }
  .order-item > div:first-child strong { font-size: 15px; line-height: 1.35; }
  .order-item > div:first-child span { margin-top: 3px; font-size: 12px; line-height: 1.4; }
  .order-detail { padding-top: 8px; gap: 4px; font-size: 12px; line-height: 1.45; }
  .coupon-action,
  .feedback-action,
  .order-refresh-action { min-height: 34px; padding: 0 12px; font-size: 12px; }
  .order-success-actions { gap: 6px; }
  .feedback-modal { padding: 12px; align-items: flex-end; }
  .feedback-panel { max-height: calc(100vh - 24px); }
  .feedback-head { padding: 15px 16px; }
  .feedback-head h2 { font-size: 18px; }
  .feedback-body, .feedback-result { padding: 16px; }
}

/* Admin feedback management */
.feedback-admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.feedback-admin-summary div { padding: 14px; border: 1px solid #dbe3ef; background: #f8fafc; }
.feedback-admin-summary span { display: block; color: #64748b; font-size: 13px; }
.feedback-admin-summary strong { display: block; margin-top: 5px; color: #172554; font-size: 24px; }
.feedback-type-list { display: grid; gap: 8px; margin-top: 12px; }
.feedback-type-row { display: grid; grid-template-columns: minmax(180px, 1fr) 90px 110px auto auto; gap: 8px; align-items: end; }
.feedback-type-row label { margin: 0; }
.feedback-admin-list { display: grid; gap: 12px; margin-top: 16px; }
.feedback-admin-item { border: 1px solid #dbe3ef; background: #fff; }
.feedback-admin-item-head { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #f6f8fb; border-bottom: 1px solid #e3e8f0; }
.feedback-admin-item-head h3 { margin: 0; font-size: 16px; }
.feedback-admin-item-head p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.feedback-admin-item-body { padding: 14px 16px; }
.feedback-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.feedback-admin-grid div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.feedback-admin-grid dt { color: #64748b; }
.feedback-admin-grid dd { margin: 0; word-break: break-word; }
.feedback-admin-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.feedback-admin-thumb { padding: 0; border: 1px solid #cad3df; background: #fff; cursor: zoom-in; }
.feedback-admin-thumb img { display: block; width: 76px; height: 76px; object-fit: cover; }
.feedback-admin-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e8ecf2; }
.feedback-admin-actions form { display: flex; align-items: flex-end; gap: 8px; margin: 0; }
.feedback-admin-actions input { min-width: 280px; }
.feedback-image-lightbox { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 18, 32, .84); }
.feedback-image-lightbox.open { display: flex; }
.feedback-image-lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.feedback-image-lightbox button { position: fixed; top: 18px; right: 18px; width: 42px; height: 42px; border: 0; background: #fff; color: #111827; font-size: 24px; cursor: pointer; }

@media (max-width: 820px) {
  .feedback-admin-summary { grid-template-columns: 1fr; }
  .feedback-type-row { grid-template-columns: 1fr 80px; }
  .feedback-type-row > *:nth-child(n+3) { grid-column: auto; }
  .feedback-admin-grid { grid-template-columns: 1fr; }
  .feedback-admin-actions input { min-width: 180px; }
}

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --line: #e5e7ef;
  --text: #1f2937;
  --muted: #667085;
  --red: #d7352e;
  --red-dark: #9f241f;
  --gold: #d9a441;
  --gold-soft: #fff5d9;
  --red-soft: #fff1ed;
  --blue-soft: #eef4ff;
  --shadow: 0 14px 34px rgba(31, 41, 55, 0.08);
  --shadow-strong: 0 22px 54px rgba(31, 41, 55, 0.14);
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(217, 164, 65, 0.16), transparent 360px),
    radial-gradient(circle at top left, rgba(215, 53, 46, 0.08), transparent 320px),
    linear-gradient(180deg, #ffffff 0, var(--bg) 280px);
  letter-spacing: 0;
}

body {
  padding-bottom: 92px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}

body.subpage-active .site-shell {
  display: block;
}

body.subpage-active .sidebar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  padding: 18px 12px;
  box-shadow: 8px 0 28px rgba(31, 41, 55, 0.05);
}

.brand {
  display: grid;
  gap: 0;
  padding: 12px 10px 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
}

.brand strong {
  color: var(--red);
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand span {
  display: none;
}

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

.category-btn {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.category-btn:hover,
.category-btn.active {
  color: var(--red);
  background: var(--red-soft);
}

.category-btn.active {
  box-shadow: inset 3px 0 0 var(--red);
}

.category-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.82;
}

.content {
  min-width: 0;
  padding: 22px 24px 38px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 18px;
  align-items: end;
  padding: 10px 0 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 70%, rgba(255, 255, 255, 0));
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.16;
  color: #151b2b;
}

#pageSummary {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

#pageSummary:empty {
  display: none;
}

.search-box {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.search-box input {
  width: 100%;
  height: 42px;
  border: 1px solid #d9deea;
  border-radius: 7px;
  outline: none;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0 12px;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.06);
}

.search-box input:focus {
  border-color: rgba(215, 53, 46, 0.55);
  box-shadow: 0 0 0 4px rgba(215, 53, 46, 0.1);
}

.mobile-categories {
  display: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(215, 53, 46, 0.34);
  box-shadow: var(--shadow-strong);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.96;
  overflow: hidden;
  background: #eef1f6;
  cursor: zoom-in;
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.media-missing {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  background: #eef1f6;
}

.sold-out .card-media img,
.sold-out .card-media video {
  filter: grayscale(0.22) opacity(0.55);
}

.sold-out-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(245, 238, 231, 0.38);
  pointer-events: none;
}

.sold-out-mask span {
  width: min(138px, 70%);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 3px solid rgba(44, 33, 28, 0.72);
  border-radius: 50%;
  color: rgba(44, 33, 28, 0.82);
  font-size: clamp(23px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
  transform: rotate(-7deg);
  background: rgba(255, 250, 245, 0.1);
}

.video-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(44, 33, 28, 0.75);
  color: #fff;
  font-size: 12px;
}

.card-info {
  display: grid;
  gap: 10px;
  padding: 12px 13px 13px;
}

.card-title {
  min-height: 42px;
  margin: 0;
  color: #202638;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: grid;
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
}

.view-btn,
.copy-btn,
.load-more {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--red);
  color: #fff9ec;
  padding: 0 12px;
  font-weight: 700;
}

.copy-btn {
  background: linear-gradient(135deg, var(--red), #ef5b43);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 9px 18px rgba(215, 53, 46, 0.18);
}

.copy-btn:disabled {
  cursor: not-allowed;
  border-color: #e4d5c9;
  background: #eee4dc;
  color: var(--muted);
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

.section-head {
  padding: 8px 0 20px;
}

.section-head p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 24;
  width: min(680px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(215, 53, 46, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(31, 41, 55, 0.18);
}

.bottom-nav button,
.bottom-nav a {
  height: 58px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.bottom-nav button::before,
.bottom-nav a::before {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.bottom-nav button[data-page="homePage"]::before,
.bottom-nav a[data-page="homePage"]::before {
  content: "⌂";
}

.bottom-nav button[data-page="ordersPage"]::before,
.bottom-nav a[data-page="ordersPage"]::before {
  content: "≡";
}

.bottom-nav button[data-page="minePage"]::before,
.bottom-nav a[data-page="minePage"]::before {
  content: "♡";
}

.bottom-nav button:hover,
.bottom-nav a:hover {
  color: var(--red);
  background: rgba(255, 241, 237, 0.8);
}

.bottom-nav button.active,
.bottom-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #f05a45);
  box-shadow: 0 9px 20px rgba(215, 53, 46, 0.22);
  transform: translateY(-1px);
}

.order-search {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 128px;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.05);
}

.order-search button {
  width: 128px;
}

.order-search label,
.redeem-body label,
.admin-form label,
.admin-grid-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.order-search input,
.redeem-body input,
.admin-form input,
.admin-grid-form input,
.inline-form input,
.inline-form select {
  height: 40px;
  border: 1px solid #d9deea;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 0 11px;
}

.order-search button,
.redeem-body button,
.admin-form button,
.admin-grid-form button,
.inline-form button,
.admin-link {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--red), #ef5b43);
  color: #fff9ec;
  padding: 0 15px;
  font-weight: 700;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(31, 41, 55, 0.06);
}

.order-item strong {
  color: #202638;
  font-size: 16px;
}

.order-item strong,
.order-item span {
  display: block;
}

.order-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.order-state {
  align-self: start;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.order-state.done {
  color: #11673a;
  background: #dcf7e8;
}

.order-state.wait {
  color: #8f5a00;
  background: #fff1cc;
}

.order-state.fail {
  color: #9c2520;
  background: #ffe3df;
}

.coupon-action {
  align-self: start;
  min-width: 92px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  font-weight: 800;
}

.coupon-action.ready {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ef5b43);
  box-shadow: 0 8px 18px rgba(215, 53, 46, 0.18);
}

.coupon-action.wait {
  color: #8f5a00;
  background: var(--gold-soft);
}

.coupon-action.fail {
  color: #9c2520;
  background: #ffe3df;
}

.coupon-action.refund {
  color: #fff;
  background: linear-gradient(135deg, #8b1d18, #d7352e);
  box-shadow: 0 8px 18px rgba(139, 29, 24, 0.16);
}

.order-fail-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.order-pending-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.order-pending-actions .coupon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.order-refresh-action {
  min-width: 86px;
  min-height: 34px;
  border: 1px solid rgba(217, 52, 43, 0.22);
  border-radius: 999px;
  padding: 0 14px;
  color: #d9342b;
  background: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(217, 52, 43, 0.08);
}

.order-refresh-action:disabled {
  color: #9aa4b2;
  background: #f4f6f8;
  border-color: #e5eaf2;
  box-shadow: none;
  cursor: wait;
}

.order-fail-actions span {
  color: #b91c1c;
  font-weight: 800;
}

.admin-order-fail {
  justify-content: flex-start;
}

.coupon-action:disabled {
  cursor: not-allowed;
}

.order-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.placeholder-panel {
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.04);
}

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

.account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px;
  box-shadow: var(--shadow);
}

.auth-card {
  max-width: 520px;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px;
  border-radius: 8px;
  background: #f3f5f9;
}

.auth-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-switch button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ef5b43);
}

.account-form {
  display: none;
  gap: 12px;
}

.account-form.active,
.account-form:not([hidden]).password-form,
.generate-card-form {
  display: grid;
}

.account-form h3,
.level-panel h3,
.user-data-grid h3 {
  margin: 0;
  color: #202638;
}

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

.account-form input,
.account-form select {
  min-height: 40px;
  border: 1px solid #d9deea;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 0 11px;
}

.account-form button,
.account-actions button,
.account-actions a,
.level-row button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--red), #ef5b43);
  color: #fff;
  padding: 0 14px;
  font-weight: 800;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 8px;
  align-items: center;
}

.captcha-row img {
  width: 120px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.user-summary {
  display: grid;
  gap: 16px;
}

.user-summary h2 {
  margin: 0;
  color: #202638;
  font-size: 24px;
}

.user-summary p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.account-stats div {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-stats span {
  color: var(--muted);
  font-size: 12px;
}

.account-stats strong {
  color: var(--red);
  font-size: 22px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.password-form {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.form-message.ok {
  color: #11673a;
}

.user-center {
  display: grid;
  gap: 18px;
}

.user-center-grid,
.user-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.level-panel,
.mini-table {
  display: grid;
  gap: 10px;
}

.level-row,
.mini-table > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.level-row.active {
  border-color: rgba(215, 53, 46, 0.35);
  background: var(--red-soft);
}

.level-row strong,
.mini-table strong,
.mini-table code {
  display: block;
  color: #202638;
  overflow-wrap: anywhere;
}

.level-row span,
.mini-table span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.level-row button:disabled {
  cursor: not-allowed;
  background: #cbd5e1;
}

.empty-state {
  display: none;
  place-items: center;
  gap: 8px;
  min-height: 260px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.04);
}

.empty-state strong {
  color: var(--text);
}

.load-wrap {
  display: grid;
  place-items: center;
  padding: 28px 0 0;
}

.load-more {
  min-width: 168px;
  height: 42px;
  box-shadow: 0 9px 18px rgba(215, 53, 46, 0.16);
}

.load-more[hidden] {
  display: none;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(17, 24, 39, 0.68);
}

.viewer.open {
  display: grid;
}

.redeem-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(17, 24, 39, 0.68);
}

.redeem-modal.open {
  display: grid;
}

.coupon-modal {
  position: fixed;
  inset: 0;
  z-index: 38;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(17, 24, 39, 0.68);
}

.coupon-modal.open {
  display: grid;
}

.coupon-panel {
  width: min(660px, 100%);
  max-height: min(860px, 92vh);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.coupon-head {
  height: 68px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 60px;
  align-items: center;
  border-bottom: 14px solid #f0f0f0;
}

.coupon-head h2 {
  margin: 0;
  text-align: center;
  font-size: 24px;
}

.coupon-back {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 38px;
  line-height: 1;
}

.coupon-body {
  overflow-y: auto;
  padding: 28px;
}

.coupon-code-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 20px 0 28px;
  border-bottom: 1px solid var(--line);
  font-size: 26px;
}

.coupon-code-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 400;
}

.coupon-code-row button {
  min-width: 98px;
  height: 46px;
  border: 1px solid #d7d0ca;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 20px;
}

.coupon-note {
  padding-top: 28px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.8;
}

.coupon-note h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 400;
}

.coupon-note p {
  margin: 0;
}

.coupon-guide {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.coupon-guide h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
}

.coupon-guide img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.redeem-panel {
  width: min(520px, 100%);
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.redeem-body {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--red);
  line-height: 1.5;
}

.empty-state.inline {
  display: grid;
  min-height: 180px;
}

.admin-body {
  padding-bottom: 0;
}

.admin-shell {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 38px;
}

.admin-login,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-login {
  width: min(420px, 100%);
  margin: 12vh auto 0;
  padding: 24px;
}

.admin-login h1,
.admin-card h2 {
  margin: 0 0 12px;
}

.admin-login p {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.admin-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-head > div {
  flex: 1;
}

.admin-card {
  padding: 16px;
  margin-bottom: 14px;
}

.admin-grid-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.admin-grid-form.compact {
  grid-template-columns: minmax(240px, 420px) auto;
  align-items: end;
  margin-bottom: 16px;
}

.admin-grid-form.user-rule-form {
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
}

.check-line {
  min-height: 40px;
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  padding: 0 10px;
  border: 1px solid #d9deea;
  border-radius: 7px;
  background: #fff;
}

.check-line input {
  width: 16px;
  height: 16px;
}

.user-balance-form input[name="remark"] {
  width: 150px;
}

.table-wrap td input {
  min-height: 34px;
  border: 1px solid #d9deea;
  border-radius: 6px;
  padding: 0 9px;
}

.notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #dcf7e8;
  color: #11673a;
}

.notice.error {
  background: #ffe3df;
  color: #9c2520;
}

.help-text {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--muted);
  background: #fff6ee;
}

code {
  font-family: Consolas, Monaco, monospace;
}

.inline-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 0 6px 6px 0;
}

.inline-form input {
  width: 78px;
}

.danger-btn {
  background: #7c1f1b !important;
  white-space: nowrap;
  line-height: 1.1;
}

.admin-body {
  min-height: 100vh;
  background: #f4f7fb;
}

.admin-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #e5eaf2;
  background: #ffffff;
  box-shadow: 6px 0 22px rgba(30, 41, 59, 0.05);
}

.admin-logo {
  display: grid;
  gap: 6px;
  padding: 22px 24px 20px;
  border-bottom: 1px solid #edf1f6;
  min-height: 88px;
  box-sizing: border-box;
}

.admin-logo strong {
  color: #172033;
  font-size: 19px;
}

.admin-logo span {
  color: #8a96a8;
  font-size: 12px;
}

.admin-menu {
  display: grid;
  gap: 4px;
  padding: 14px 14px 24px;
}

.admin-menu-title {
  padding: 12px 12px 5px;
  color: #8a96a8;
  font-size: 12px;
  font-weight: 700;
}

.admin-menu a {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 7px;
  color: #334155;
  text-decoration: none;
  font-weight: 700;
}

.admin-menu a:hover,
.admin-menu a.active {
  color: #2361dc;
  background: #eaf2ff;
}

.admin-main {
  min-width: 0;
  padding: 26px 28px 40px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -26px -28px 26px;
  padding: 18px 28px;
  border-bottom: 1px solid #e5eaf2;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(30, 41, 59, 0.06);
  backdrop-filter: blur(12px);
  min-height: 88px;
  box-sizing: border-box;
}

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

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #334155;
}

.admin-top-actions a {
  color: #334155;
  text-decoration: none;
  font-weight: 700;
}

.admin-top-actions .top-home-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .08);
}

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

.admin-stats div {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 41, 59, 0.06);
}

.admin-stats span {
  color: #64748b;
  font-size: 13px;
}

.admin-stats strong {
  color: #172033;
  font-size: 28px;
}

.admin-card {
  border-color: #e5eaf2;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 41, 59, 0.07);
}

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

.admin-section-head p {
  margin: 0;
  color: #64748b;
}

.admin-count-badge {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  color: #2563eb;
  background: #eaf2ff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

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

.admin-danger-btn {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, #991b1b, #ef4444);
  font-weight: 800;
  cursor: pointer;
}

.admin-danger-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pager-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 0;
  color: #64748b;
  font-size: 13px;
}

.pager-row select {
  height: 32px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
}

.pager-row button {
  min-width: 64px;
  height: 32px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  color: #2563eb;
  background: #fff;
  cursor: pointer;
}

.pager-row button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.admin-primary-btn,
.admin-secondary-btn {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  color: #fff;
  font-weight: 800;
}

.admin-primary-btn {
  background: #16a34a;
}

.admin-secondary-btn {
  background: #64748b;
}

.admin-primary-btn.small,
.admin-secondary-btn.small,
.admin-danger-btn.small {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
}

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

.inline-actions form {
  margin: 0;
}

.status-pill {
  display: inline-grid;
  place-items: center;
  white-space: nowrap;
  min-width: 64px;
  min-height: 24px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.ok {
  color: #047857;
  background: #d1fae5;
}

.status-pill.off {
  color: #b91c1c;
  background: #fee2e2;
}

.admin-mini-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.admin-mini-info div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-mini-info span {
  color: #64748b;
  font-size: 12px;
}

.admin-mini-info strong {
  color: #172033;
  overflow-wrap: anywhere;
}

.table-link {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.inline-details {
  margin-top: 6px;
}

.inline-details summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 800;
}

.inline-form.vertical {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
}

.bulk-form,
.admin-filter-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #f8fafc;
}

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

.admin-filter-form label {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.admin-filter-form input,
.admin-filter-form select,
.bulk-form select {
  min-height: 36px;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
}

.bulk-form button,
.admin-filter-form button,
.mini-btn {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
}

.mini-btn {
  margin: 2px;
  background: #64748b;
  white-space: nowrap;
  min-width: 64px;
}

.order-refund-btn {
  min-width: 76px;
  height: 30px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
}

.order-complete-pill {
  min-width: 76px;
  min-height: 30px;
  padding: 0 12px;
}

.mini-usage-list,
.message-list {
  display: grid;
  gap: 10px;
}

.mini-usage-list div,
.message-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fff;
}

.mini-usage-list span,
.message-item span {
  color: #64748b;
  font-size: 12px;
}

.message-item.unread {
  border-color: #fecaca;
  background: #fff7f5;
}

.message-item p {
  margin: 0;
  color: #334155;
  line-height: 1.7;
}

.admin-modal-panel.wide {
  width: min(760px, 100%);
}

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

.detail-grid div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #f8fafc;
}

.detail-grid .wide {
  grid-column: 1 / -1;
}

.detail-grid span {
  color: #64748b;
  font-size: 12px;
}

.detail-grid strong {
  overflow-wrap: anywhere;
}

.modal-mini-table {
  max-height: 60vh;
  overflow: auto;
}

/* Premium visual polish */
:root {
  --bg: #f7f3ef;
  --line: #eadfd6;
  --text: #20202a;
  --muted: #766d66;
  --red: #d9342b;
  --red-dark: #9e221d;
  --gold: #d8a640;
  --ink: #151928;
  --shadow: 0 18px 42px rgba(87, 54, 34, 0.1);
  --shadow-strong: 0 26px 70px rgba(87, 54, 34, 0.18);
}

body:not(.admin-body) {
  background:
    radial-gradient(circle at 76% 0%, rgba(224, 172, 59, 0.22), transparent 360px),
    radial-gradient(circle at 6% 8%, rgba(217, 52, 43, 0.12), transparent 320px),
    linear-gradient(180deg, #fffdfb 0, #fbf5ee 340px, #f4f6fb 100%);
}

.sidebar {
  border-right-color: rgba(234, 223, 214, 0.88);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 242, 0.92));
  box-shadow: 10px 0 34px rgba(92, 58, 35, 0.07);
}

.brand strong {
  background: linear-gradient(135deg, #d9342b, #a46b14);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.category-btn {
  border-radius: 8px;
}

.category-btn:hover,
.category-btn.active {
  background: linear-gradient(135deg, #fff1ed, #fff8eb);
}

.topbar {
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.96) 70%, rgba(255, 253, 250, 0));
  backdrop-filter: blur(14px);
}

h1 {
  color: var(--ink);
}

.search-box input {
  border-color: rgba(216, 166, 64, 0.28);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(120, 75, 42, 0.08);
}

.card {
  border-color: rgba(234, 223, 214, 0.94);
  background: linear-gradient(180deg, #ffffff, #fffaf5);
  box-shadow: 0 18px 42px rgba(87, 54, 34, 0.1);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 166, 64, 0.58);
  box-shadow: 0 28px 72px rgba(87, 54, 34, 0.17);
}

.card-media {
  background: linear-gradient(135deg, #f4e7dc, #eef5ff);
}

.card-info {
  padding: 14px;
}

.card-title {
  color: #231f20;
  font-weight: 900;
}

.card-meta {
  border-top-color: rgba(234, 223, 214, 0.95);
  color: #81736b;
}

.copy-btn,
.viewer-redeem-btn,
.redeem-body button {
  background: linear-gradient(135deg, #d9342b, #f05a45);
  box-shadow: 0 12px 24px rgba(217, 52, 43, 0.2);
}

.bottom-nav {
  border-color: rgba(216, 166, 64, 0.28);
  background: rgba(255, 253, 250, 0.93);
  box-shadow: 0 18px 48px rgba(64, 45, 33, 0.18);
}

.bottom-nav button.active,
.bottom-nav a.active {
  background: linear-gradient(135deg, #d9342b, #e9a43a);
  box-shadow: 0 12px 26px rgba(217, 52, 43, 0.24);
}

.admin-body {
  background:
    radial-gradient(circle at 88% 0%, rgba(47, 128, 237, 0.12), transparent 360px),
    radial-gradient(circle at 10% 10%, rgba(22, 163, 74, 0.1), transparent 300px),
    #eef3f8;
}

.admin-sidebar {
  border-right-color: #dfe8f3;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.96));
  box-shadow: 10px 0 32px rgba(30, 41, 59, 0.07);
}

.admin-logo strong {
  color: #0f172a;
  font-size: 21px;
}

.admin-menu a {
  border-radius: 8px;
}

.admin-menu a:hover,
.admin-menu a.active {
  color: #1d4ed8;
  background: linear-gradient(135deg, #eaf2ff, #f4f7ff);
  box-shadow: inset 3px 0 0 #3b82f6;
}

.admin-topbar {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(30, 41, 59, 0.08);
}

.admin-card {
  border: 1px solid #dfe8f3;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(30, 41, 59, 0.08);
}

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

.admin-stats .stat-card {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  border: 0;
  color: #fff;
  padding: 22px 24px;
  box-shadow: 0 18px 42px rgba(30, 41, 59, 0.16);
}

.admin-stats .stat-card::after {
  content: none;
}

.admin-stats .stat-card span,
.admin-stats .stat-card em,
.admin-stats .stat-card strong {
  position: relative;
  z-index: 1;
  color: #fff;
}

.admin-stats .stat-card span {
  font-size: 14px;
  opacity: 0.92;
}

.admin-stats .stat-card strong {
  font-size: 28px;
}

.admin-stats .stat-card em {
  font-style: normal;
  font-size: 12px;
  opacity: 0.88;
}

.stat-card-action {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: auto;
  bottom: 20px;
  min-width: 74px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
}

.stat-card-action:hover {
  background: rgba(255, 255, 255, .32);
}

.stat-card .stat-icon {
  position: absolute;
  z-index: 1;
  right: 24px;
  top: 34px;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .23);
  color: #fff;
  font-style: normal;
  font-weight: 900;
  font-size: 20px;
}

.stat-card .stat-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-card-action.recharge-action {
  left: 24px;
  right: auto;
  bottom: 18px;
  min-width: 96px;
  border: 0;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, .28);
}

.stat-card.balance-stat strong {
  margin-bottom: 8px;
}

.stat-card.balance-stat em {
  min-height: 38px;
}

.level-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 24px 24px;
}

.level-help-grid div {
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

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

.level-help-grid strong {
  margin-bottom: 6px;
  color: #172033;
  font-size: 15px;
}

.level-help-grid span {
  color: #475569;
  line-height: 1.7;
}

.system-notice-item {
  cursor: pointer;
}

.system-notice-item:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.system-notice-detail {
  display: grid;
  gap: 16px;
  line-height: 1.8;
  word-break: break-word;
}

.system-notice-detail img,
.notice-thumb {
  display: block;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.notice-editor-form textarea {
  width: 100%;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 12px;
  resize: vertical;
  font: inherit;
}

.notice-table table {
  min-width: 980px;
}

.notice-table table th,
.notice-table table td {
  vertical-align: middle;
}

.notice-table table th {
  height: 50px;
}

.notice-table table td {
  height: 54px;
}

.notice-editor-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 18px;
  padding: 22px 24px 24px;
}

.notice-editor-main,
.notice-editor-side {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .98));
  box-shadow: 0 14px 36px rgba(15, 23, 42, .05);
}

.notice-editor-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--admin-line);
}

.notice-editor-block-head strong {
  color: var(--admin-ink);
  font-size: 18px;
  font-weight: 950;
}

.notice-editor-block-head span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.notice-editor-panel label {
  display: grid;
  gap: 8px;
  color: #53627a;
  font-size: 13px;
  font-weight: 900;
}

.notice-editor-panel input,
.notice-editor-panel select,
.notice-editor-panel textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d6e0ee;
  border-radius: 10px;
  background: #fff;
  color: var(--admin-ink);
  font: 800 14px/1.4 "Microsoft YaHei UI", sans-serif;
}

.notice-editor-panel textarea {
  min-height: 300px;
  padding: 14px;
}

.notice-editor-panel input:focus,
.notice-editor-panel select:focus,
.notice-editor-panel textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
  outline: 0;
}

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

.notice-editor-panel .color-field {
  grid-template-columns: 1fr 72px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d6e0ee;
  border-radius: 12px;
  background: #fff;
}

.notice-editor-panel .color-field input {
  min-height: 36px;
  height: 36px;
  padding: 3px;
  border-radius: 8px;
}

.notice-editor-tip {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(239, 246, 255, .95), rgba(255, 247, 237, .82));
}

.notice-editor-tip strong {
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 950;
}

.notice-editor-tip span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 800;
}

.notice-editor-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 2px 0 0;
}

.notice-editor-actions .admin-primary-btn,
.notice-editor-actions .admin-secondary-btn {
  min-width: 126px;
  height: 44px;
  border-radius: 10px;
}

@media (max-width: 1100px) {
  .notice-editor-panel {
    grid-template-columns: 1fr;
  }
}

/* 2026-09-04 polished order and feedback layouts */
#ordersPage {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-bottom: 120px;
}

#ordersPage .section-head {
  margin-bottom: 16px;
}

#ordersPage .section-head h1 {
  margin-bottom: 6px;
}

#ordersPage .section-head p {
  max-width: 720px;
}

#ordersPage .order-search {
  width: min(720px, 100%);
  grid-template-columns: minmax(260px, 1fr) 112px;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e6ddd7;
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(84, 48, 36, .06);
}

#ordersPage .order-search label {
  gap: 7px;
  color: #5f6672;
  font-size: 13px;
  font-weight: 700;
}

#ordersPage .order-search input {
  min-height: 42px;
  border: 1px solid #d9dce3;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

#ordersPage .order-search input:focus {
  border-color: #e5483b;
  box-shadow: 0 0 0 3px rgba(229, 72, 59, .1);
}

#ordersPage .order-search button {
  width: 112px;
  min-height: 42px;
  border-radius: 6px;
  box-shadow: none;
}

#ordersPage .order-list {
  gap: 12px;
}

#ordersPage .order-item.order-card {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e5e1df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(61, 40, 32, .055);
}

#ordersPage .order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px 14px;
}

#ordersPage .order-card-primary {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
}

#ordersPage .order-card-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #eadfd9;
  border-radius: 7px;
  background: #f7f2ee;
  color: #a28b7d;
  font-size: 12px;
  font-weight: 700;
}

#ordersPage .order-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#ordersPage .order-card-summary {
  min-width: 0;
}

#ordersPage .order-card-summary > strong {
  display: block;
  margin: 0;
  color: #182033;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

#ordersPage .order-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 5px;
  color: #7a7f89;
  font-size: 13px;
  line-height: 1.5;
}

#ordersPage .order-card-meta time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#ordersPage .order-card-actions {
  flex: 0 0 auto;
}

#ordersPage .order-success-actions,
#ordersPage .order-pending-actions,
#ordersPage .order-fail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

#ordersPage .coupon-action,
#ordersPage .feedback-action,
#ordersPage .order-refresh-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  min-width: 104px;
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

#ordersPage .feedback-action {
  border: 1px solid #e5483b;
  background: #fff;
  color: #d9362b;
}

#ordersPage .coupon-action.ready {
  border: 1px solid #e5483b;
  background: #e94437;
}

#ordersPage .order-detail {
  display: grid;
  gap: 8px;
  margin: 0 18px;
  padding: 13px 0 16px;
  border-top: 1px solid #eee7e3;
  color: #626873;
  font-size: 13px;
}

#ordersPage .order-detail-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

#ordersPage .order-detail-row > span {
  color: #8a8f98;
}

#ordersPage .order-detail-row code,
#ordersPage .order-detail-row p {
  min-width: 0;
  margin: 0;
  color: #515762;
  font-family: inherit;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.feedback-type-create {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #f7f9fc;
}

.feedback-type-create-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 92px 116px;
  align-items: end;
  gap: 10px;
  max-width: 720px;
}

.feedback-type-create-form label,
.feedback-type-item label {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: #546175;
  font-size: 12px;
  font-weight: 700;
}

.feedback-type-create-form input,
.feedback-type-item input,
.feedback-type-item select {
  width: 100%;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid #cad4e2;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  font-size: 14px;
  outline: none;
}

.feedback-type-create-form input:focus,
.feedback-type-item input:focus,
.feedback-type-item select:focus {
  border-color: #4f7ee8;
  box-shadow: 0 0 0 3px rgba(47, 103, 229, .1);
}

.feedback-type-create-form button,
.feedback-type-actions button {
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.feedback-type-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #fff;
}

.feedback-type-list-head,
.feedback-type-item {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 90px 110px 176px;
  align-items: center;
  gap: 12px;
}

.feedback-type-list-head {
  min-height: 42px;
  padding: 0 14px;
  background: #eef3f9;
  color: #526076;
  font-size: 12px;
  font-weight: 800;
}

.feedback-type-item {
  padding: 12px 14px;
  border-top: 1px solid #e5eaf1;
}

.feedback-type-item:first-of-type {
  border-top: 0;
}

.feedback-type-item label > span {
  display: none;
}

.feedback-type-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.feedback-type-actions .danger-btn {
  border: 1px solid #e8b4b0;
  background: #fff4f3;
  color: #c5302a;
}

.feedback-type-actions .admin-secondary-btn {
  border: 1px solid #b9c9df;
  background: #fff;
  color: #27436d;
}

.admin-body .feedback-type-actions button.danger-btn {
  border: 1px solid #dc2626 !important;
  background: #dc2626 !important;
  color: #fff !important;
}

.admin-body .feedback-type-actions button.danger-btn:hover {
  background: #b91c1c !important;
  color: #fff !important;
}

@media (max-width: 700px) {
  #ordersPage {
    padding-bottom: 132px;
  }

  #ordersPage .section-head {
    margin-bottom: 12px;
  }

  #ordersPage .section-head h1 {
    font-size: 25px;
    line-height: 1.25;
  }

  #ordersPage .section-head p {
    font-size: 13px;
    line-height: 1.55;
  }

  #ordersPage .order-search {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
    padding: 13px;
  }

  #ordersPage .order-search input {
    min-height: 42px;
  }

  #ordersPage .order-search button {
    width: 100%;
    min-height: 42px;
  }

  #ordersPage .order-card-head {
    display: grid;
    gap: 12px;
    padding: 14px 14px 12px;
  }

  #ordersPage .order-card-summary > strong {
    font-size: 16px;
    line-height: 1.45;
  }

  #ordersPage .order-card-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    margin-top: 5px;
    font-size: 12px;
  }

  #ordersPage .order-card-actions,
  #ordersPage .order-success-actions,
  #ordersPage .order-pending-actions,
  #ordersPage .order-fail-actions {
    width: 100%;
  }

  #ordersPage .order-success-actions,
  #ordersPage .order-pending-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #ordersPage .coupon-action,
  #ordersPage .feedback-action,
  #ordersPage .order-refresh-action {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    font-size: 13px;
  }

  #ordersPage .order-detail {
    gap: 7px;
    margin: 0 14px;
    padding: 11px 0 14px;
    font-size: 12px;
  }

  #ordersPage .order-detail-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px;
  }

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

  .feedback-admin-summary div {
    padding: 10px 8px;
  }

  .feedback-admin-summary strong {
    font-size: 20px;
  }

  .feedback-type-create {
    padding: 12px;
  }

  .feedback-type-create-form {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 9px;
  }

  .feedback-type-create-form label:first-of-type {
    grid-column: 1 / -1;
  }

  .feedback-type-create-form button {
    width: 100%;
  }

  .feedback-type-list-head {
    display: none;
  }

  .feedback-type-list {
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .feedback-type-item {
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dce4ef;
    border-radius: 7px;
    background: #fff;
  }

  .feedback-type-item:first-of-type {
    border-top: 1px solid #dce4ef;
  }

  .feedback-type-item .feedback-name-field {
    grid-column: 1 / -1;
  }

  .feedback-type-item label > span {
    display: block;
  }

  .feedback-type-actions {
    grid-column: 1 / -1;
  }

  .feedback-type-actions button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .notice-setting-grid {
    grid-template-columns: 1fr;
  }
}

.sort-badge {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 26px;
  border-radius: 7px;
  background: #dbeafe;
  color: #2563eb;
  font-weight: 800;
}

.logo-input-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.logo-preview {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-config-form small {
  color: #64748b;
}

.admin-notice-list .message-item {
  align-items: start;
}

.admin-user-menu {
  position: relative;
}

.admin-user-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px 0 8px;
  border-radius: 999px;
  background: rgba(248, 250, 252, .92);
  border: 1px solid rgba(226, 232, 240, .86);
  cursor: pointer;
}

.admin-user-menu summary::-webkit-details-marker {
  display: none;
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #c7d2fe);
  color: #334155;
  font-weight: 900;
}

.admin-user-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 170px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
}

.admin-user-menu > div a,
.admin-user-menu > div button {
  display: flex;
  width: 100%;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.admin-user-menu > div a:hover,
.admin-user-menu > div button:hover {
  background: #f8fafc;
}

.admin-user-menu .danger-link {
  color: #ef4444;
}

.card-tools-row,
.card-tools-row .inline-tool-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.card-manager-head {
  align-items: center;
}

.card-manager-head .admin-actions-row {
  flex: 1;
  justify-content: flex-end;
  gap: 8px;
}

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

.admin-head-search input {
  width: 210px;
  min-height: 38px;
  border: 1px solid var(--admin-line, #dbe3ee);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.card-tools-row .inline-tool-form {
  margin: 0;
}

.simple-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 300px;
  margin: 0 24px 12px;
  padding: 46px 30px 18px 42px;
  border-top: 1px solid rgba(226, 232, 240, .78);
  background:
    repeating-linear-gradient(to top, transparent 0, transparent 39px, rgba(148, 163, 184, .24) 40px),
    linear-gradient(to right, rgba(148, 163, 184, .22) 1px, transparent 1px);
  background-size: 100% 40px, calc(100% / 7) 100%;
  border-radius: 0 0 10px 10px;
}

.chart-day {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  color: #64748b;
  font-size: 12px;
}

.chart-day:hover::after,
.chart-day:focus-within::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: 56px;
  z-index: 5;
  min-width: 120px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .9);
  color: #fff;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  white-space: pre-line;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .22);
}

.chart-bars {
  height: 190px;
  display: flex;
  align-items: end;
  gap: 8px;
}

.chart-values {
  display: none;
  gap: 3px;
  min-height: 50px;
  color: #334155;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.chart-values.single {
  min-height: 18px;
  font-weight: 800;
}

.bar {
  display: block;
  width: 18px;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
}

.bar.users,
.chart-legend .users {
  background: #4f46e5;
}

.bar.recharge,
.chart-legend .recharge {
  background: #f59e0b;
}

.bar.redeems,
.chart-legend .redeems {
  background: #10b981;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  color: #64748b;
  font-size: 13px;
  padding-bottom: 18px;
}

.chart-legend span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.pay-box-modal {
  padding: 6px 0 0;
}

.pay-amount-box {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 14px;
  border-radius: 9px;
  background: #eef2ff;
  color: #64748b;
}

.pay-amount-box input {
  width: 160px;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  outline: 0;
}

.pay-box-modal p {
  margin: 14px 0 8px;
  color: #64748b;
  text-align: center;
}

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

.pay-method-grid button,
.pay-cancel-btn {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: #f8fafc;
  color: #2563eb;
  font-weight: 900;
}

.pay-method-grid b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 6px;
  color: #fff;
  background: #2563eb;
}

.pay-method-grid b.wx {
  background: #22c55e;
}

.pay-cancel-btn {
  width: 100%;
  margin-top: 18px;
  color: #475569;
}

.account-settings-grid,
.price-rule-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0 24px 24px;
}

.account-panel {
  margin: 0 !important;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #f8fafc);
}

.account-panel strong {
  font-size: 18px;
  color: #172033;
}

.account-panel p {
  color: #64748b;
  margin: 4px 0 12px;
}

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

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

.stat-card.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-card.green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.stat-card.orange {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.stat-card.pink {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
}

.stat-card.cyan {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
}

.stat-card.violet {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.quick-card {
  margin-bottom: 16px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions-grid a,
.quick-actions-grid button {
  min-height: 74px;
  display: grid;
  gap: 6px;
  align-content: center;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  color: #0f172a;
  background: linear-gradient(135deg, #edf5ff, #f8fbff);
  box-shadow: inset 0 0 0 1px #dfe8f3;
}

.quick-actions-grid a:nth-child(2),
.quick-actions-grid button:nth-child(2) {
  background: linear-gradient(135deg, #eafaf0, #f7fff9);
}

.quick-actions-grid a:nth-child(3),
.quick-actions-grid button:nth-child(3) {
  background: linear-gradient(135deg, #fff7df, #fffdf5);
}

.quick-actions-grid a:nth-child(4),
.quick-actions-grid button:nth-child(4) {
  background: linear-gradient(135deg, #f5edff, #fcf8ff);
}

.quick-actions-grid a:nth-child(5),
.quick-actions-grid button:nth-child(5) {
  background: linear-gradient(135deg, #edf1ff, #f8faff);
}

.quick-actions-grid a:nth-child(6),
.quick-actions-grid button:nth-child(6) {
  background: linear-gradient(135deg, #fff0f6, #fffafd);
}

.quick-actions-grid span {
  font-weight: 900;
}

.quick-actions-grid strong {
  color: #64748b;
  font-size: 12px;
}

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

.admin-section-head.compact {
  margin-bottom: 10px;
}

.status-switch-list,
.dashboard-list {
  display: grid;
  gap: 10px;
}

.status-switch-list div,
.dashboard-list div {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5edf7;
}

.status-switch-list span,
.dashboard-list span {
  color: #334155;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-switch-list strong,
.dashboard-list strong {
  color: #0f766e;
  font-size: 13px;
}

.hidden-category-form {
  display: grid;
  gap: 16px;
}

.hidden-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.hidden-option {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.hidden-option:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.hidden-option.is-hidden {
  border-color: #fecaca;
  background: #fff5f5;
}

.hidden-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.hidden-check input {
  width: 16px;
  height: 16px;
}

.hidden-check span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.hidden-check strong {
  overflow: hidden;
  color: #172033;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden-check em {
  color: #64748b;
  font-style: normal;
  font-size: 12px;
}

.display-name-field {
  display: grid;
  gap: 6px;
}

.display-name-field small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.display-name-field input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  padding: 0 10px;
  color: #172033;
  outline: none;
}

.display-name-field input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.28);
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
}

.hidden-product-table {
  margin-top: 10px;
}

.empty-table-cell {
  color: #64748b;
  text-align: center;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.admin-modal.open {
  display: grid;
}

.admin-modal-panel {
  width: min(520px, 100%);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

.admin-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
  border-bottom: 1px solid #e5eaf2;
}

.admin-modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.admin-modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 30px;
  line-height: 1;
}

.admin-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.admin-modal-body label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  overflow: hidden;
  color: #172033;
  font-weight: 700;
}

.admin-modal-body input {
  min-height: 42px;
  border: 0;
  border-left: 1px solid #dbe3ee;
  padding: 0 12px;
  outline: none;
}

.admin-modal-body label {
  padding-left: 12px;
}

.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

.generated-cards-modal {
  z-index: 90;
}

.generated-cards-panel {
  width: min(680px, calc(100vw - 28px));
  overflow: hidden;
  border-radius: 14px;
}

.generated-cards-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  border-bottom: 1px solid #dbeafe;
}

.generated-cards-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
}

.generated-cards-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.generated-cards-head .admin-modal-close {
  color: #64748b;
}

.generated-cards-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
}

.generated-success-tip {
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
  padding: 13px 15px;
}

.generated-card-box {
  overflow: hidden;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
}

.generated-card-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px 10px 16px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
}

.generated-card-list {
  display: grid;
  gap: 10px;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding: 14px 16px 16px;
}

.generated-card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fffaf0;
  padding: 10px 12px;
}

.generated-card-key {
  min-height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e7d5a5;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  padding: 0 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

.generated-copy-all,
.generated-copy-one {
  white-space: nowrap;
}

.generated-copy-status {
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  background: #ecfdf5;
  color: #047857;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  padding: 10px 14px;
  text-align: center;
}

.generated-copy-status.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.generated-copy-status[hidden] {
  display: none !important;
}

.generated-copy-all.copy-ok,
.generated-copy-one.copy-ok {
  border-color: #16a34a !important;
  background: #16a34a !important;
  color: #fff !important;
}

.generated-cards-actions {
  padding: 0;
}


.user-card-confirm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #fff7ed, #eff6ff);
  border-bottom: 1px solid #e2e8f0;
}

.user-card-confirm-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
}

.user-card-confirm-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.confirm-eyebrow {
  display: none;
}

.user-card-confirm-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 8px;
}

.user-card-confirm-main {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #7c2d12;
}

.user-card-confirm-main strong {
  font-size: 18px;
  color: #9a3412;
}

.user-card-confirm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.user-card-confirm-grid div {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
}

.user-card-confirm-grid span {
  color: #64748b;
  font-size: 12px;
}

.user-card-confirm-grid strong {
  color: #0f172a;
  font-size: 17px;
}

.user-card-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 22px;
}

@media (max-width: 640px) {
  .generated-cards-modal,
  .user-card-confirm-modal {
    padding: 12px;
  }

  .generated-cards-head,
  .user-card-confirm-head {
    padding: 16px;
  }

  .generated-cards-head h2,
  .user-card-confirm-head h2 {
    font-size: 19px;
  }

  .generated-cards-body,
  .user-card-confirm-body {
    padding: 14px;
  }

  .generated-card-box-head {
    padding: 8px 10px 8px 12px;
  }

  .generated-card-row {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 8px;
    padding: 8px;
  }

  .generated-card-key {
    font-size: 14px;
    padding: 0 9px;
  }

  .generated-copy-one {
    min-width: 74px;
    padding-inline: 10px;
  }

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

.text-action {
  border: 0;
  background: transparent;
  color: #334155;
  font-weight: 700;
  padding: 0;
}

.user-admin-body {
  padding-bottom: 0;
}

.user-admin-layout.login-only {
  display: block;
}

.user-admin-layout.login-only .admin-sidebar {
  display: none;
}

.user-admin-layout.login-only .admin-top-actions span,
.user-admin-layout.login-only .admin-top-actions [data-user-logout] {
  display: none;
}

.user-admin-login {
  margin: 46px auto 0;
}

.user-console-form {
  display: grid;
  max-width: 620px;
}

.user-console-form button {
  justify-self: start;
}

.user-level-list {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.user-admin-body .admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.user-admin-body .admin-top-actions button {
  min-height: auto;
}

.ecommerce-link-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(420px, 1.35fr);
  align-items: center;
  gap: 28px;
  position: relative;
  min-height: 136px;
  margin-bottom: 22px;
  padding: 28px 34px;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, .35);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, .42) 0 12%, transparent 30%),
    linear-gradient(135deg, #13b971 0%, #16a85f 46%, #0e8f62 100%);
  box-shadow: 0 22px 54px rgba(15, 118, 110, 0.18), inset 0 1px 0 rgba(255, 255, 255, .32);
  color: #fff;
}

.ecommerce-link-card::before,
.ecommerce-link-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.ecommerce-link-card::before {
  width: 220px;
  height: 220px;
  right: -62px;
  top: -92px;
  background: rgba(255, 255, 255, .14);
}

.ecommerce-link-card::after {
  width: 160px;
  height: 160px;
  left: 34%;
  bottom: -112px;
  background: rgba(255, 255, 255, .1);
}

.ecommerce-link-card strong {
  display: block;
  position: relative;
  z-index: 1;
  color: #f8fff9;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(5, 46, 22, .18);
}

.ecommerce-link-card span {
  display: block;
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: rgba(255, 255, 255, .88);
  font-size: 15px;
  font-weight: 700;
}

.ecommerce-link-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}

.ecommerce-link-card code {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .95);
  color: #087344;
  border: 1px solid rgba(255, 255, 255, .7);
  font: 900 clamp(28px, 3.6vw, 54px)/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
  box-shadow: 0 14px 28px rgba(6, 95, 70, .18);
  white-space: nowrap;
}

.ecommerce-copy-btn {
  height: 54px;
  min-width: 120px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font: 800 14px/1 "Microsoft YaHei UI", sans-serif;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(29, 78, 216, .3);
  transition: transform .18s ease, box-shadow .18s ease;
}

.ecommerce-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(29, 78, 216, .36);
}

.viewer-panel {
  width: min(1120px, 100%);
  max-height: min(900px, 92vh);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.viewer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.viewer-head h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.4;
}

.viewer-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.viewer-redeem-btn {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  background: linear-gradient(135deg, #d7352e, #f04d3e);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(215, 53, 46, 0.18);
}

.viewer-redeem-btn:disabled {
  cursor: not-allowed;
  background: #cbd5e1;
  box-shadow: none;
}

.viewer-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.viewer-body {
  overflow: auto;
  display: block;
  padding: 10px;
}

.media-carousel {
  position: relative;
  min-height: 0;
  display: block;
  touch-action: pan-y;
}

.carousel-stage {
  position: relative;
  min-height: min(70vh, 740px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0e6de;
}

.carousel-stage img,
.carousel-stage video {
  width: 100%;
  max-height: min(70vh, 740px);
  object-fit: contain;
  display: block;
  background: #f0e6de;
}

.viewer-video-wrap {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  background: #f0e6de;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.viewer-video-wrap video::-webkit-media-controls,
.viewer-video-wrap video::-webkit-media-controls-enclosure,
.viewer-video-wrap video::-webkit-media-controls-panel {
  display: none !important;
}

.viewer-play-toggle {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.88);
  color: var(--red);
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.viewer-video-wrap.playing .viewer-play-toggle {
  opacity: 0.18;
}

.viewer-video-wrap.playing .viewer-play-toggle:hover,
.media-carousel.controls-visible .viewer-video-wrap.playing .viewer-play-toggle {
  opacity: 0.72;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 70px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--red);
  font-size: 38px;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(6px);
}

.carousel-btn.prev {
  left: 8px;
}

.carousel-btn.next {
  right: 8px;
}

.media-carousel.controls-visible .carousel-btn:not(:disabled),
.media-carousel:hover .carousel-btn:not(:disabled) {
  opacity: 1;
  pointer-events: auto;
}

.media-carousel.controls-visible .carousel-btn:not(:disabled):hover,
.media-carousel:hover .carousel-btn:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.9);
}

.carousel-btn:disabled {
  opacity: 0;
  cursor: default;
}

.detail-body {
  min-height: 100vh;
  background: #f8efe6;
}

.detail-body.detail-with-bottom-nav {
  padding-bottom: 96px;
}

.detail-body.detail-redeem-open .detail-media-shell {
  visibility: hidden;
  pointer-events: none;
}

.detail-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.detail-with-bottom-nav .detail-page,
.detail-with-bottom-nav .redeem-page {
  min-height: calc(100vh - 96px);
}

.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px clamp(12px, 4vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.96);
  backdrop-filter: blur(10px);
}

.detail-back {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.detail-topbar h1 {
  margin: 0;
  font-size: clamp(18px, 4.8vw, 26px);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-redeem-btn {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: linear-gradient(135deg, #d7352e, #f04d3e);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(215, 53, 46, 0.2);
}

.detail-media-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding: clamp(10px, 3vw, 24px);
}

.detail-media-stage {
  position: relative;
  min-height: min(78vh, 860px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0e6de;
  touch-action: pan-y;
}

.detail-media-stage img,
.detail-media-stage video {
  width: 100%;
  max-height: min(78vh, 860px);
  object-fit: contain;
  display: block;
  background: #f0e6de;
}

.detail-video-wrap {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  background: #f0e6de;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.detail-video-wrap video::-webkit-media-controls,
.detail-video-wrap video::-webkit-media-controls-enclosure,
.detail-video-wrap video::-webkit-media-controls-panel {
  display: none !important;
}

.detail-play-toggle {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 76px;
  height: 76px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.88);
  color: var(--red);
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.detail-video-wrap.playing .detail-play-toggle {
  opacity: 0.18;
}

.detail-media-stage.controls-visible .detail-video-wrap.playing .detail-play-toggle,
.detail-video-wrap.playing .detail-play-toggle:hover {
  opacity: 0.72;
}

.detail-nav-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 74px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--red);
  font-size: 42px;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(6px);
}

.detail-nav-btn.prev {
  left: 10px;
}

.detail-nav-btn.next {
  right: 10px;
}

.detail-media-stage.controls-visible .detail-nav-btn:not(:disabled),
.detail-media-stage:hover .detail-nav-btn:not(:disabled) {
  opacity: 1;
  pointer-events: auto;
}

.detail-nav-btn:disabled {
  opacity: 0;
  cursor: default;
}

.detail-counter {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-swipe-guide {
  min-width: min(100%, 360px);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px dashed rgba(215, 53, 46, 0.34);
  border-radius: 8px;
  padding: 7px 12px;
  background: rgba(255, 252, 248, 0.88);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(105, 65, 35, 0.08);
}

.detail-swipe-guide.has-more {
  color: #9a3412;
}

.detail-swipe-copy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.detail-swipe-copy::before,
.detail-swipe-copy::after {
  color: var(--red);
  font-size: 20px;
  line-height: 1;
}

.detail-swipe-copy::before {
  content: "‹";
}

.detail-swipe-copy::after {
  content: "›";
}

.detail-count-pill {
  min-width: 48px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(45, 36, 32, 0.78);
  color: #fff;
  text-align: center;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}

.detail-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.detail-loading strong,
.detail-loading span {
  display: block;
}

.redeem-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.redeem-page-shell {
  min-height: 0;
  display: grid;
  place-items: start center;
  padding: clamp(18px, 5vw, 42px) clamp(12px, 4vw, 28px);
}

.standalone-redeem-panel {
  width: min(100%, 560px);
  position: static;
  transform: none;
  max-height: none;
  overflow: visible;
  box-shadow: 0 18px 46px rgba(105, 65, 35, 0.14);
}

.standalone-redeem-panel .viewer-head {
  align-items: flex-start;
}

.standalone-redeem-panel .viewer-head p span {
  color: var(--muted);
}

.redeem-top-home {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

@media (max-width: 640px) {
  .detail-topbar {
    gap: 9px;
    padding: 10px 10px;
  }

  .detail-back {
    width: 38px;
    height: 38px;
    font-size: 31px;
  }

  .detail-redeem-btn {
    min-height: 38px;
    padding: 0 14px;
    font-size: 15px;
  }

  .detail-topbar h1 {
    font-size: 18px;
  }

  .detail-topbar p {
    font-size: 12px;
  }

  .detail-media-shell {
    padding: 8px;
  }

  .detail-media-stage {
    min-height: calc(100vh - 128px);
  }

  .detail-media-stage img,
  .detail-media-stage video {
    max-height: calc(100vh - 128px);
  }

  .detail-nav-btn {
    width: 36px;
    height: 66px;
    font-size: 36px;
  }

  .detail-nav-btn.prev {
    left: 6px;
  }

  .detail-nav-btn.next {
    right: 6px;
  }

  .detail-play-toggle {
    width: 64px;
    height: 64px;
    font-size: 27px;
  }

  .detail-counter {
    min-height: 42px;
  }

  .detail-swipe-guide {
    width: 100%;
    min-height: 36px;
    justify-content: space-between;
    padding: 7px 10px;
  }

  .redeem-page-shell {
    padding: 14px 10px 24px;
  }

  .standalone-redeem-panel {
    width: 100%;
  }

  .redeem-top-home {
    min-height: 38px;
    padding: 0 12px;
    font-size: 15px;
  }
}

@media (max-width: 900px) {
  .site-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 14px 10px 88px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 6px 0 10px;
    background: transparent;
  }

  .mobile-categories {
    position: sticky;
    top: 0;
    z-index: 9;
    display: block;
    margin: 0 -10px 12px;
    padding: 8px 10px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 250, 245, 0.96);
    backdrop-filter: blur(14px);
  }

  .mobile-categories > div {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .mobile-categories .category-btn {
    flex: 0 0 auto;
    width: auto;
    border: 1px solid var(--line);
    background: #fff;
  }

  .mobile-categories .category-name {
    max-width: 128px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card-info {
    padding: 8px;
  }

  .card-title {
    min-height: 39px;
    font-size: 13px;
  }

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

  .viewer {
    padding: 10px;
  }

  .order-search {
    grid-template-columns: 1fr;
  }

  .order-detail {
    grid-template-columns: 1fr;
  }

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

  .admin-layout {
    display: block;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #e5eaf2;
  }

  .admin-logo {
    padding: 16px;
  }

  .admin-menu {
    display: flex;
    overflow-x: auto;
    padding: 8px 10px 12px;
  }

  .admin-menu-title {
    display: none;
  }

  .admin-menu a {
    flex: 0 0 auto;
    min-height: 36px;
    white-space: nowrap;
  }

  .admin-main {
    padding: 16px 12px 32px;
  }

  .admin-topbar {
    position: static;
    margin: 0 0 14px;
    padding: 14px;
    border: 1px solid #e5eaf2;
    border-radius: 8px;
    flex-wrap: wrap;
  }

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

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

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

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

  .account-stats,
  .user-center-grid,
  .user-data-grid {
    grid-template-columns: 1fr;
  }

  .level-row,
  .mini-table > div {
    grid-template-columns: 1fr;
  }

  .admin-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-modal-body label {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 12px;
  }

  .admin-modal-body input {
    border: 1px solid #dbe3ee;
    border-radius: 6px;
  }

  .admin-head {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .viewer-body {
    padding: 8px;
  }

  .media-carousel {
    display: block;
  }

  .carousel-stage {
    min-height: 66vh;
  }

  .carousel-stage img,
  .carousel-stage video {
    max-height: 66vh;
  }

  .carousel-btn {
    width: 36px;
    height: 64px;
    font-size: 34px;
  }

  .carousel-btn.prev {
    left: 6px;
  }

  .carousel-btn.next {
    right: 6px;
  }

  .viewer-play-toggle {
    width: 62px;
    height: 62px;
    font-size: 26px;
  }
}

/* Unified gallery-style backend navigation */
.admin-body .admin-sidebar {
  width: 238px;
  padding: 0 12px 18px;
  border-right: 1px solid rgba(234, 223, 214, 0.9);
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 52, 43, 0.09), transparent 190px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 242, 0.96));
  box-shadow: 10px 0 34px rgba(92, 58, 35, 0.08);
}

.admin-body .admin-logo {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 -12px 10px;
  padding: 24px 22px 18px;
  border-bottom: 1px solid rgba(234, 223, 214, 0.95);
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(255, 248, 242, 0.95));
  backdrop-filter: blur(14px);
}

.admin-body .admin-logo strong {
  display: block;
  background: linear-gradient(135deg, #d9342b, #a46b14);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 22px;
  letter-spacing: 0;
}

.admin-body .admin-logo span {
  margin-top: 4px;
  color: #8f7c70;
  font-size: 12px;
  font-weight: 700;
}

.admin-body .admin-menu {
  gap: 8px;
  padding: 0 0 18px;
}

.admin-body .admin-menu-title {
  margin-top: 10px;
  padding: 10px 10px 2px;
  color: #9a8a7c;
  font-size: 12px;
  letter-spacing: 0;
}

.admin-body .admin-menu a {
  position: relative;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #2b2a2a;
  background: rgba(255, 255, 255, 0.52);
  font-size: 15px;
  font-weight: 800;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.admin-body .admin-menu a::before {
  content: "";
  width: 4px;
  height: 18px;
  margin-right: 10px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.18s ease, height 0.18s ease;
}

.admin-body .admin-menu a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .admin-menu a:hover {
  color: #c52f28;
  border-color: rgba(216, 166, 64, 0.35);
  background: linear-gradient(135deg, #fff6ef, #fffaf0);
  box-shadow: 0 12px 26px rgba(120, 75, 42, 0.08);
  transform: translateX(2px);
}

.admin-body .admin-menu a.active {
  color: #d9342b;
  border-color: rgba(217, 52, 43, 0.18);
  background: linear-gradient(135deg, #fff0ea, #fff6e6);
  box-shadow: 0 14px 32px rgba(217, 52, 43, 0.12);
}

.admin-body .admin-menu a.active::before {
  height: 24px;
  background: linear-gradient(180deg, #d9342b, #e9a43a);
}

.admin-body .admin-main {
  background:
    radial-gradient(circle at 95% 0%, rgba(216, 166, 64, 0.16), transparent 360px),
    linear-gradient(180deg, rgba(255, 253, 250, 0.58), rgba(244, 246, 251, 0));
}

.user-admin-body .admin-sidebar {
  background:
    radial-gradient(circle at 18% 0%, rgba(47, 128, 237, 0.1), transparent 190px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.96));
}

.user-admin-body .admin-logo strong {
  background: linear-gradient(135deg, #2f80ed, #d9342b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.user-admin-body .admin-menu a.active {
  color: #1d4ed8;
  border-color: rgba(47, 128, 237, 0.2);
  background: linear-gradient(135deg, #eef5ff, #fff4ed);
  box-shadow: 0 14px 32px rgba(47, 128, 237, 0.11);
}

.user-admin-body .admin-menu a.active::before {
  background: linear-gradient(180deg, #2f80ed, #d9342b);
}

@media (max-width: 900px) {
  .admin-body .admin-sidebar {
    width: auto;
    padding: 0;
    border-bottom: 1px solid rgba(234, 223, 214, 0.9);
  }

  .admin-body .admin-logo {
    margin: 0;
    padding: 14px 16px 10px;
  }

  .admin-body .admin-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 12px 12px;
  }

  .admin-body .admin-menu a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
  }

  .admin-body .admin-menu a::before {
    display: none;
  }
}

@media (max-width: 380px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* Frontend account center */
body.mine-active {
  background:
    radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.16), transparent 340px),
    radial-gradient(circle at 12% 10%, rgba(217, 52, 43, 0.12), transparent 300px),
    linear-gradient(180deg, #fffdfb 0, #f7f5fb 360px, #eef3f8 100%);
}

body.mine-active #minePage .section-head {
  display: none;
}

.mine-panel {
  max-width: 980px;
  margin: 0 auto;
  padding-top: 10px;
}

.mine-console {
  display: grid;
  gap: 14px;
}

.mine-console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
}

.mine-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #182033;
  font-size: 18px;
  font-weight: 900;
}

.mine-brand-mark span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #ef4444);
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.22);
}

.mine-balance-pill,
.mine-pill-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #1f2937;
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
  text-decoration: none;
  font-weight: 900;
}

.mine-balance-pill span {
  color: #8a96a8;
  font-size: 12px;
}

.mine-hero-card {
  overflow: hidden;
  padding: 18px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.18), transparent 160px),
    linear-gradient(135deg, #6d4df2 0%, #9d3fe5 48%, #e42972 100%);
  color: #fff;
  box-shadow: 0 24px 58px rgba(124, 58, 237, 0.24);
}

.mine-profile-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.mine-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: linear-gradient(135deg, #fff7ed, #fce7f3);
  color: #d9342b;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(43, 19, 82, 0.2);
}

.mine-profile-main h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 24px;
}

.mine-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mine-tags span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.mine-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mine-hero-actions a {
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.mine-hero-actions a:last-child {
  background: linear-gradient(135deg, #ff7a18, #ff3d4f);
}

.mine-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.mine-metric-grid div {
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.mine-metric-grid strong {
  color: #fff;
  font-size: 26px;
}

.mine-metric-grid span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.mine-feature-card,
.mine-auth-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(31, 41, 55, 0.08);
}

.mine-feature-card h3 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  color: #1f2937;
  font-size: 16px;
}

.mine-feature-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
}

.mine-feature-grid a {
  position: relative;
  min-height: 88px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #1f2937;
  text-decoration: none;
  font-weight: 800;
}

.mine-feature-grid span {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 900;
}

.mine-feature-grid .green { background: #dcfce7; color: #059669; }
.mine-feature-grid .purple { background: #ede9fe; color: #7c3aed; }
.mine-feature-grid .blue { background: #dbeafe; color: #4f46e5; }
.mine-feature-grid .gold { background: #fef3c7; color: #b7791f; }
.mine-feature-grid .pink { background: #fce7f3; color: #db2777; }

.mine-feature-grid em {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-style: normal;
}

.mine-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mine-action-row a,
.mine-action-row button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #d9342b, #f05a45);
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.mine-action-row button:nth-child(2) {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.mine-action-row button:nth-child(3) {
  background: #334155;
}

.mine-console .password-form {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
}

@media (max-width: 760px) {
  .mine-panel {
    padding: 0 2px 74px;
  }

  .mine-console-top,
  .mine-profile-row {
    grid-template-columns: 1fr;
  }

  .mine-profile-row {
    text-align: center;
  }

  .mine-avatar {
    margin: 0 auto;
  }

  .mine-hero-actions {
    justify-content: center;
  }

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

@media (max-width: 460px) {
  .mine-metric-grid,
  .mine-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mine-brand-mark strong {
    font-size: 16px;
  }
}

/* Admin console unified table style */
.admin-body {
  --admin-bg: #f3f5f8;
  --admin-panel: #ffffff;
  --admin-line: #e4e9f0;
  --admin-soft: #f7f9fc;
  --admin-soft-2: #fbfcfe;
  --admin-text: #172033;
  --admin-muted: #66758a;
  --admin-blue: #2563eb;
  --admin-green: #16a34a;
  --admin-red: #dc2626;
  --admin-amber: #d97706;
  --admin-shadow: 0 10px 30px rgba(18, 32, 54, 0.08);
  --admin-shadow-soft: 0 8px 22px rgba(18, 32, 54, 0.06);
  background: linear-gradient(180deg, #f8fafc 0, var(--admin-bg) 210px, #eef3f8 100%);
  color: var(--admin-text);
}

.admin-body .admin-main {
  padding: 28px 30px 46px;
  background:
    radial-gradient(circle at 94% 0%, rgba(37, 99, 235, 0.08), transparent 360px),
    radial-gradient(circle at 12% 0%, rgba(22, 163, 74, 0.06), transparent 320px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(243, 245, 248, 0));
}

.admin-body .admin-topbar {
  min-height: 84px;
  margin: -28px -30px 28px;
  padding: 18px 30px;
  border-bottom: 1px solid var(--admin-line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 22px rgba(18, 32, 54, 0.06);
}

.admin-body .admin-topbar h1 {
  color: var(--admin-text);
  font-size: 26px;
  letter-spacing: 0;
}

.admin-body .eyebrow {
  color: #d9342b;
  font-size: 12px;
  letter-spacing: 0.11em;
}

.admin-body .admin-top-actions {
  gap: 16px;
  color: #334155;
  font-size: 15px;
  font-weight: 800;
}

.admin-body .admin-card,
.admin-body .admin-login {
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--admin-shadow);
}

.admin-body .admin-card {
  padding: 0;
  margin-bottom: 18px;
}

.admin-body .admin-card > h2,
.admin-body .admin-card > p,
.admin-body .admin-card > .help-text,
.admin-body .admin-card > form:not(.admin-filter-form):not(.bulk-form),
.admin-body .admin-card > .admin-mini-info,
.admin-body .admin-card > .user-level-list,
.admin-body .admin-card > .message-list,
.admin-body .admin-card > .dashboard-list,
.admin-body .admin-card > .status-switch-list,
.admin-body .admin-card > .hidden-category-form,
.admin-body .admin-card > .hidden-product-table,
.admin-body .admin-card > .table-wrap {
  margin-left: 24px;
  margin-right: 24px;
}

.admin-body .admin-card > .table-wrap {
  margin-bottom: 20px;
}

.admin-body .admin-section-head {
  min-height: 82px;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-line);
  background: var(--admin-panel);
}

.admin-body .admin-section-head.compact {
  min-height: 70px;
  padding: 18px 24px;
}

.admin-body .admin-section-head h2,
.admin-body .admin-card h2 {
  margin: 0 0 7px;
  color: var(--admin-text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.admin-body .admin-section-head p {
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.55;
}

.admin-body .admin-actions-row {
  justify-content: flex-end;
  gap: 8px;
}

.admin-body .admin-actions-row form {
  margin: 0;
}

.admin-body .admin-primary-btn,
.admin-body .admin-secondary-btn,
.admin-body .bulk-form button,
.admin-body .admin-filter-form button,
.admin-body .admin-form-actions button,
.admin-body .account-form button,
.admin-body .level-row button,
.admin-body .mini-btn {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.admin-body .admin-primary-btn {
  background: var(--admin-green);
}

.admin-body .admin-secondary-btn {
  background: #334155;
}

.admin-body .admin-secondary-btn:nth-of-type(1),
.admin-body .admin-actions-row form .admin-secondary-btn {
  background: #d98908;
}

.admin-body .bulk-form button,
.admin-body .admin-filter-form button {
  background: var(--admin-blue);
}

.admin-body .danger-btn,
.admin-body button.danger-btn,
.admin-body .admin-secondary-btn.danger-btn {
  background: var(--admin-red) !important;
}

.admin-body .admin-primary-btn:hover,
.admin-body .admin-secondary-btn:hover,
.admin-body .bulk-form button:hover,
.admin-body .admin-filter-form button:hover,
.admin-body .mini-btn:hover {
  filter: brightness(0.96);
}

.admin-body .bulk-form,
.admin-body .admin-filter-form {
  margin: 18px 24px 16px;
  padding: 14px 16px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: var(--admin-soft);
  gap: 10px;
}

.admin-body .bulk-form {
  justify-content: space-between;
}

.admin-body .compact-filter {
  align-items: end;
}

.admin-body .admin-filter-form label,
.admin-body .admin-grid-form label,
.admin-body .account-form label,
.admin-body .display-name-field small {
  color: #536579;
  font-size: 13px;
  font-weight: 800;
}

.admin-body .admin-filter-form input,
.admin-body .admin-filter-form select,
.admin-body .admin-grid-form input,
.admin-body .admin-grid-form select,
.admin-body .bulk-form select,
.admin-body .account-form input,
.admin-body .account-form select,
.admin-body .display-name-field input,
.admin-body .table-wrap td input,
.admin-body .inline-form select {
  min-height: 36px;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  padding: 0 12px;
  outline: none;
}

.admin-body .admin-filter-form input:focus,
.admin-body .admin-filter-form select:focus,
.admin-body .admin-grid-form input:focus,
.admin-body .admin-grid-form select:focus,
.admin-body .account-form input:focus,
.admin-body .account-form select:focus,
.admin-body .display-name-field input:focus {
  border-color: #93b4f8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.admin-body .table-wrap {
  border: 0;
  border-radius: 0;
  background: #fff;
}

.admin-body table {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.admin-body th,
.admin-body td {
  min-height: 56px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--admin-line);
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.45;
  vertical-align: middle;
}

.admin-body th {
  height: 48px;
  color: #536579;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.admin-body tbody tr:hover td {
  background: #fbfdff;
}

.admin-body code {
  color: #163b76;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-body .status-pill {
  min-width: auto;
  min-height: 24px;
  border-radius: 7px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.admin-body .status-pill.ok {
  color: #047857;
  background: #d8f8e6;
}

.admin-body .status-pill.off {
  color: #dc2626;
  background: #ffe1e1;
}

.admin-body .admin-count-badge {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  color: #2563eb;
  background: #eaf2ff;
  font-size: 13px;
  font-weight: 900;
}

.admin-body .mini-btn {
  min-width: 52px;
  min-height: 28px;
  margin: 2px 3px;
  padding: 0 10px;
  border-radius: 7px;
  background: #0f9f55;
  font-size: 12px;
}

.admin-body .inline-form {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 6px 6px 0;
  vertical-align: middle;
}

.admin-body .inline-form input {
  width: 82px;
  min-height: 32px;
}

.admin-body .inline-form select {
  min-height: 32px;
}

.admin-body .inline-form button {
  min-height: 28px;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-body .order-refund-btn,
.admin-body .order-complete-pill {
  width: 72px;
  min-width: 72px;
  height: 30px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 7px;
  line-height: 1;
}

.admin-body .order-complete-pill {
  color: #047857;
  background: #d8f8e6;
}

.admin-body .order-refund-btn {
  color: #fff;
  background: #8b1d1a !important;
}

.admin-body .admin-stats {
  gap: 16px;
  margin-bottom: 18px;
}

.admin-body .admin-stats .stat-card {
  min-height: 116px;
  border-radius: 12px;
  padding: 20px 22px;
}

.admin-body .quick-actions-grid {
  padding: 18px 24px 22px;
  gap: 10px;
}

.admin-body .quick-actions-grid a,
.admin-body .quick-actions-grid button {
  min-height: 78px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--admin-line);
}

.admin-body .dashboard-grid {
  gap: 18px;
}

.admin-body .status-switch-list,
.admin-body .dashboard-list,
.admin-body .message-list,
.admin-body .user-level-list,
.admin-body .mini-usage-list {
  padding: 18px 0 20px;
}

.admin-body .status-switch-list div,
.admin-body .dashboard-list div,
.admin-body .message-item,
.admin-body .mini-usage-list div,
.admin-body .level-row,
.admin-body .mini-table > div {
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: var(--admin-soft-2);
}

.admin-body .admin-mini-info {
  padding: 18px 0 20px;
}

.admin-body .admin-mini-info div,
.admin-body .detail-grid div {
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: var(--admin-soft-2);
}

.admin-body .hidden-category-form {
  padding: 18px 0 22px;
}

.admin-body .hidden-option {
  border-color: var(--admin-line);
  border-radius: 10px;
}

.admin-body .admin-form-actions {
  padding: 2px 0 0;
}

.admin-body .admin-modal-panel {
  border-radius: 12px;
  box-shadow: 0 30px 100px rgba(15, 23, 42, 0.28);
}

.admin-body .admin-modal-head {
  padding: 18px 22px;
}

.admin-body .admin-modal-body {
  padding: 20px 22px 22px;
}

.admin-body .admin-modal-body label {
  border-radius: 8px;
}

.admin-body .text-action,
.admin-body .table-link {
  color: var(--admin-blue);
  font-weight: 900;
}

.user-admin-body .admin-primary-btn,
.user-admin-body .admin-filter-form button,
.user-admin-body .bulk-form button {
  background: #2563eb;
}

.user-admin-body .admin-card .admin-section-head {
  background: #fff;
}

.admin-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 4px 24px 24px;
}

.admin-product-card {
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--admin-shadow-soft);
}

.admin-product-card.is-hidden {
  opacity: 0.72;
}

.admin-product-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 0.9;
  overflow: hidden;
  background: #f1f5f9;
  text-decoration: none;
}

.admin-product-media img,
.admin-product-asset-preview img,
.admin-product-asset-preview video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.admin-product-media .media-missing {
  height: 100%;
  display: grid;
  place-items: center;
}

.product-soldout-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.58);
  color: #1f2937;
  font-size: 28px;
  font-weight: 900;
}

.admin-product-info {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.admin-product-info h3 {
  min-height: 42px;
  margin: 0;
  color: var(--admin-text);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 900;
  overflow: hidden;
}

.admin-product-info p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
}

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

.admin-product-metrics span,
.admin-product-detail-summary div {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  background: #f8fafc;
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-product-metrics strong,
.admin-product-detail-summary strong {
  color: var(--admin-text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.product-cost-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 0;
}

.product-cost-form input {
  width: 100% !important;
}

.admin-product-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 48px;
  padding-top: 4px;
}

.admin-product-actions form {
  margin: 0;
}

.admin-product-actions .admin-secondary-btn,
.admin-product-actions button {
  height: 36px;
  min-width: 92px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  text-decoration: none;
  border-radius: 8px;
  line-height: 1;
}

.product-filter-form input,
.product-filter-form select {
  min-width: 180px;
}

.product-filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.product-filter-actions .admin-secondary-btn,
.product-filter-actions button {
  height: 38px;
  min-width: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.product-limit-tip {
  margin-top: 0;
  margin-bottom: 14px;
}

.admin-product-load-more {
  padding: 0 24px 28px;
}

.admin-product-load-more .load-more {
  max-width: 260px;
  margin: 0 auto;
}

.product-empty {
  grid-column: 1 / -1;
  padding: 28px;
}

.admin-product-detail-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 24px 6px;
}

.admin-product-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 18px 24px 24px;
}

.admin-product-asset {
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--admin-shadow-soft);
}

.admin-product-asset-preview {
  aspect-ratio: 1 / 0.82;
  background: #f1f5f9;
}

.admin-product-asset-preview img,
.admin-product-asset-preview video {
  object-fit: contain;
  background: #f1f5f9;
}

.admin-product-asset-info {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.admin-product-asset-info strong {
  color: var(--admin-text);
}

.admin-product-asset-info span,
.admin-product-asset-info code {
  color: var(--admin-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-product-asset-info form {
  margin-top: 4px;
}

.admin-product-asset-info button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  color: #fff;
  font-weight: 900;
}

.recharge-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 24px 18px;
  padding: 18px;
  border: 1px solid rgba(239, 68, 68, .14);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 54%, #eff6ff 100%);
}

.recharge-panel strong {
  display: block;
  color: #172033;
  font-size: 18px;
  margin-bottom: 4px;
}

.recharge-panel span {
  color: var(--admin-muted);
  font-size: 13px;
}

.user-card-filter {
  align-items: end;
  margin-bottom: 24px !important;
}

.user-card-filter .user-card-delete-hint {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: #b45309;
  font-weight: 800;
  font-size: 13px;
}

.user-admin-body .table-wrap td code,
.admin-body .table-wrap td code {
  font-size: 14px;
  font-weight: 900;
}

.user-admin-body .table-wrap td:first-child code,
.admin-body .table-wrap td:nth-child(2) code {
  letter-spacing: 0;
}

.recharge-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 130px 112px;
  gap: 10px;
  align-items: center;
}

.recharge-form input,
.recharge-form select {
  height: 40px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
}

.recharge-form button {
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-weight: 900;
}

.recharge-open-btn {
  height: 42px;
  min-width: 118px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(239, 68, 68, .18);
  cursor: pointer;
}

.recharge-open-btn:disabled {
  cursor: not-allowed;
  opacity: .55;
  box-shadow: none;
}

.recharge-orders {
  margin: 0 24px 18px;
}

.pay-return-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff7ed, #eff6ff);
}

.pay-result-card {
  width: min(92vw, 420px);
  padding: 34px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .16);
  text-align: center;
}

.pay-result-card strong {
  display: block;
  color: #111827;
  font-size: 26px;
  margin-bottom: 10px;
}

.pay-result-card p {
  color: #64748b;
  margin-bottom: 22px;
}

.pay-result-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-weight: 900;
}

@media (max-width: 900px) {
  .admin-body .admin-main {
    padding: 14px 12px 34px;
  }

  .admin-body .admin-topbar {
    margin: 0 0 14px;
    min-height: auto;
  }

  .admin-body .admin-section-head {
    min-height: auto;
    padding: 16px;
  }

  .admin-body .bulk-form,
  .admin-body .admin-filter-form {
    margin: 14px 16px;
  }

  .admin-body .admin-card > h2,
  .admin-body .admin-card > p,
  .admin-body .admin-card > .help-text,
  .admin-body .admin-card > form:not(.admin-filter-form):not(.bulk-form),
  .admin-body .admin-card > .admin-mini-info,
  .admin-body .admin-card > .user-level-list,
  .admin-body .admin-card > .message-list,
  .admin-body .admin-card > .dashboard-list,
  .admin-body .admin-card > .status-switch-list,
  .admin-body .admin-card > .hidden-category-form,
  .admin-body .admin-card > .hidden-product-table,
  .admin-body .admin-card > .table-wrap {
    margin-left: 16px;
    margin-right: 16px;
  }

  .admin-body th,
  .admin-body td {
    padding: 12px 14px;
  }

  .admin-product-grid,
  .admin-product-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 16px;
    padding-right: 16px;
  }

  .admin-product-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 16px;
    padding-right: 16px;
  }

  .recharge-panel {
    align-items: stretch;
    flex-direction: column;
    margin-left: 16px;
    margin-right: 16px;
  }

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

@media (max-width: 520px) {
  .admin-product-grid,
  .admin-product-media-grid {
    grid-template-columns: 1fr;
  }
}

.admin-body .admin-logo,
.user-admin-body .admin-logo {
  min-height: 88px;
}

.admin-body .admin-topbar,
.user-admin-body .admin-topbar {
  min-height: 88px;
}

.user-admin-body .admin-stats {
  margin-bottom: 16px;
}

.user-admin-body .admin-stats .stat-card em:empty {
  display: none;
}

.user-admin-body .stat-card-action.recharge-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: static;
  min-width: 104px;
  height: 34px;
  margin-top: 2px;
  border-radius: 999px;
  background: #ffffff;
  color: #ef4444;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}

.user-admin-body .balance-stat em {
  display: block;
  opacity: 1;
}

@media (max-width: 760px) {
  .ecommerce-link-card {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
    padding: 22px;
    gap: 18px;
    border-radius: 20px;
  }

  .ecommerce-link-main {
    grid-template-columns: 1fr;
  }

  .ecommerce-link-card code {
    min-height: 60px;
    font-size: clamp(24px, 9vw, 38px);
  }

  .ecommerce-copy-btn {
    width: 100%;
  }

  .level-help-grid {
    grid-template-columns: 1fr;
  }
}

/* User dashboard e-commerce link banner. Keep this after the generic admin-card rules. */
.user-admin-body .ecommerce-link-card.admin-card,
.user-admin-body .ecommerce-link-card {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 10px;
  min-height: 132px;
  margin: 0 0 16px;
  padding: 20px 30px 22px;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(165, 180, 252, .42);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 20%, rgba(251, 191, 36, .22) 0 10%, transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(236, 72, 153, .20) 0 11%, transparent 30%),
    linear-gradient(135deg, #1e1b4b 0%, #4338ca 48%, #7c3aed 100%);
  box-shadow: 0 18px 42px rgba(49, 46, 129, .24), inset 0 1px 0 rgba(255, 255, 255, .24);
  color: #fff;
}

.user-admin-body .ecommerce-link-card::before {
  width: 210px;
  height: 210px;
  right: -68px;
  top: -112px;
  background: rgba(255, 255, 255, .13);
}

.user-admin-body .ecommerce-link-card::after {
  width: 150px;
  height: 150px;
  left: -58px;
  bottom: -94px;
  background: rgba(251, 191, 36, .13);
}

.user-admin-body .ecommerce-link-copy {
  position: relative;
  z-index: 1;
}

.user-admin-body .ecommerce-link-card strong {
  color: #ffffff;
  font-size: clamp(28px, 2.5vw, 44px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 8px 24px rgba(30, 27, 75, .38);
}

.user-admin-body .ecommerce-link-card span {
  margin-top: 6px;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 900;
}

.user-admin-body .ecommerce-link-main {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: auto;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.user-admin-body .ecommerce-link-card code {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  font: 950 clamp(34px, 4vw, 60px)/1.02 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(30, 27, 75, .42);
}

.user-admin-body .ecommerce-copy-btn {
  height: 42px;
  min-width: 118px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #fff;
  font: 900 14px/1 "Microsoft YaHei UI", sans-serif;
  box-shadow: 0 12px 26px rgba(194, 65, 12, .34);
}

.user-admin-body .ecommerce-copy-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .user-admin-body .ecommerce-link-card.admin-card,
  .user-admin-body .ecommerce-link-card {
    min-height: 150px;
    padding: 22px 18px;
    border-radius: 20px;
  }

  .user-admin-body .ecommerce-link-main {
    display: grid;
    width: 100%;
    gap: 14px;
  }

  .user-admin-body .ecommerce-link-card code {
    font-size: clamp(32px, 9vw, 48px);
    white-space: normal;
    word-break: break-word;
  }

  .user-admin-body .ecommerce-copy-btn {
    width: min(220px, 100%);
    justify-self: center;
  }
}

/* Guest front only has Home and Orders, so keep the bottom navigation visually centered. */
body.guest-front .bottom-nav {
  width: min(520px, calc(100% - 28px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 9px;
}

body.guest-front .bottom-nav button {
  min-width: 0;
}

body.guest-front .bottom-nav a {
  min-width: 0;
}

@media (max-width: 640px) {
  body.guest-front .bottom-nav {
    width: min(360px, calc(100% - 24px));
    gap: 8px;
  }
}

/* Admin system settings: structured two-column configuration panel. */
.admin-body .site-config-form.settings-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px 24px 24px;
}

.admin-body .settings-group {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .98));
  box-shadow: 0 14px 36px rgba(15, 23, 42, .05);
}

.admin-body .settings-group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-body .settings-group-head strong {
  color: var(--admin-ink);
  font-size: 18px;
  font-weight: 950;
}

.admin-body .settings-group-head span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.admin-body .site-config-form.settings-panel label {
  display: grid;
  gap: 8px;
  color: #53627a;
  font-size: 13px;
  font-weight: 900;
}

.admin-body .site-config-form.settings-panel input,
.admin-body .site-config-form.settings-panel textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d6e0ee;
  border-radius: 10px;
  background: #fff;
  color: var(--admin-ink);
  font: 800 14px/1.4 "Microsoft YaHei UI", sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.admin-body .site-config-form.settings-panel textarea {
  min-height: 118px;
  resize: vertical;
  padding: 12px 14px;
}

.admin-body .site-config-form.settings-panel input:focus,
.admin-body .site-config-form.settings-panel textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
  outline: 0;
}

.admin-body .site-config-form.settings-panel .logo-input-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.admin-body .site-config-form.settings-panel .logo-preview {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d6e0ee;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef6ff, #fff7ed);
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.admin-body .site-config-form.settings-panel .logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-body .site-config-form.settings-panel small {
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.7;
}

.admin-body .settings-tip {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(239, 246, 255, .95), rgba(255, 247, 237, .82));
}

.admin-body .settings-tip strong {
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 950;
}

.admin-body .settings-tip span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 800;
}

.admin-body .site-config-form.settings-panel .admin-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding: 2px 0 0;
}

.admin-body .site-config-form.settings-panel .admin-primary-btn {
  min-width: 156px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #16a34a, #059669);
  box-shadow: 0 14px 28px rgba(5, 150, 105, .18);
}

@media (max-width: 980px) {
  .admin-body .site-config-form.settings-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

/* 2026-07-17 polish: dashboard, card tools, mobile tables and coupon dialog. */
.admin-body .admin-stats,
.user-admin-body .admin-stats {
  align-items: stretch;
}

.admin-body .admin-stats .stat-card,
.user-admin-body .admin-stats .stat-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 126px;
  border-radius: 13px;
}

.admin-body .admin-stats .stat-card strong,
.user-admin-body .admin-stats .stat-card strong {
  letter-spacing: 0;
  line-height: 1.05;
}

.admin-body .card-manager-head,
.user-admin-body .admin-section-head {
  gap: 18px;
}

.admin-body .card-manager-head .admin-actions-row,
.user-admin-body .admin-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

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

.admin-body .admin-head-search input {
  width: 210px;
  max-width: 100%;
}

.admin-body .card-tools-row,
.user-admin-body .user-card-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: #f7f9fc;
}

.admin-body .card-tools-row .inline-tool-form {
  margin: 0;
}

.user-card-delete-hint-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px 24px 20px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 13px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  color: #92400e;
}

.user-card-delete-hint-card strong {
  flex: 0 0 auto;
  font-weight: 950;
}

.user-card-delete-hint-card span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.nowrap-cell,
.nowrap-cell code,
.table-wrap td code {
  white-space: nowrap;
}

.nowrap-cell code,
.table-wrap td code {
  overflow-x: auto;
  max-width: 220px;
}

.coupon-code-row strong {
  white-space: nowrap;
  overflow-x: auto;
  overflow-wrap: normal;
}

.mine-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.mine-hero-actions a {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .admin-body .admin-stats,
  .user-admin-body .admin-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-body .admin-stats .stat-card,
  .user-admin-body .admin-stats .stat-card {
    min-height: 108px;
    padding: 18px 20px;
    border-radius: 10px;
  }

  .admin-body .admin-stats .stat-card span,
  .user-admin-body .admin-stats .stat-card span {
    font-size: 13px;
  }

  .admin-body .admin-stats .stat-card strong,
  .user-admin-body .admin-stats .stat-card strong {
    font-size: 27px;
  }

  .admin-body .card-manager-head,
  .user-admin-body .admin-section-head {
    display: grid;
    gap: 14px;
  }

  .admin-body .card-manager-head .admin-actions-row,
  .user-admin-body .admin-actions-row {
    justify-content: flex-start;
  }

  .admin-body .card-manager-head .admin-actions-row > *,
  .user-admin-body .admin-actions-row > * {
    flex: 0 1 auto;
  }

  .admin-body .admin-head-search {
    width: 100%;
  }

  .admin-body .admin-head-search input {
    flex: 1 1 180px;
    width: auto;
  }

  .admin-body .card-tools-row,
  .user-admin-body .user-card-filter {
    display: grid;
    grid-template-columns: 1fr;
    margin: 14px 16px 18px !important;
  }

  .admin-body .card-tools-row .inline-tool-form,
  .user-admin-body .user-card-filter label {
    width: 100%;
  }

  .admin-body .card-tools-row select,
  .admin-body .card-tools-row button,
  .user-admin-body .user-card-filter input,
  .user-admin-body .user-card-filter select,
  .user-admin-body .user-card-filter button {
    width: 100%;
    min-height: 44px;
  }

  .user-card-delete-hint-card {
    margin: -2px 16px 18px;
    align-items: flex-start;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-body table,
  .user-admin-body table {
    min-width: 900px;
  }

  .nowrap-cell code,
  .table-wrap td code {
    max-width: 180px;
  }
}

@media (max-width: 640px) {
  .coupon-panel {
    width: min(94vw, 430px);
    max-height: 86vh;
    border-radius: 14px;
  }

  .coupon-head {
    height: 56px;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    border-bottom-width: 10px;
  }

  .coupon-head h2 {
    font-size: 22px;
  }

  .coupon-back {
    font-size: 30px;
  }

  .coupon-body {
    padding: 22px 20px;
  }

  .coupon-code-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 14px 0 20px;
    font-size: 18px;
  }

  .coupon-code-row span {
    white-space: nowrap;
  }

  .coupon-code-row strong {
    font-size: 19px;
    line-height: 1.25;
    scrollbar-width: none;
  }

  .coupon-code-row strong::-webkit-scrollbar {
    display: none;
  }

  .coupon-code-row button {
    min-width: 68px;
    height: 38px;
    padding: 0 12px;
    font-size: 16px;
  }

  .coupon-note {
    padding-top: 22px;
    font-size: 17px;
    line-height: 1.7;
  }

  .coupon-note h3,
  .coupon-guide h3 {
    font-size: 20px;
  }

  .mine-console {
    padding: 14px;
  }

  .mine-console-top {
    gap: 10px;
  }

  .mine-hero-card {
    border-radius: 16px;
    padding: 18px;
  }

  .mine-profile-row {
    align-items: flex-start;
  }

  .mine-hero-actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 10px;
  }

  .mine-hero-actions a {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
  }

  .mine-action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.user-card-confirm-panel {
  width: min(520px, calc(100vw - 28px));
  overflow: hidden;
  border-radius: 14px;
}

.user-card-confirm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #fff7ed, #eff6ff);
  border-bottom: 1px solid #e2e8f0;
}

.user-card-confirm-head h2 {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
}

.confirm-eyebrow {
  color: #dc2626;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.user-card-confirm-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 8px;
}

.user-card-confirm-main {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #7c2d12;
}

.user-card-confirm-main strong {
  font-size: 18px;
  color: #9a3412;
}

.user-card-confirm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.user-card-confirm-grid div {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
}

.user-card-confirm-grid span {
  color: #64748b;
  font-size: 12px;
}

.user-card-confirm-grid strong {
  color: #0f172a;
  font-size: 17px;
}

.user-card-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 22px;
}

@media (max-width: 640px) {
  .user-card-confirm-grid {
    grid-template-columns: 1fr;
  }

  .user-card-confirm-head h2 {
    font-size: 19px;
  }
}


/* 202607191122 card modal polish overrides */
.user-card-confirm-head h2 {
  margin: 0;
}

.user-card-confirm-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.user-card-confirm-head .admin-modal-close,
.generated-cards-head .admin-modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
  color: #64748b;
  font-size: 22px;
  line-height: 1;
}

.user-card-confirm-grid strong,
.generated-card-key {
  white-space: nowrap;
}


/* 202607191143 generate card input modal polish */
.generate-card-modal-shell {
  display: grid;
  gap: 14px;
}

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

.generate-card-summary > div {
  display: grid;
  gap: 7px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.generate-card-summary span,
.polished-generate-form label span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.generate-card-summary strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1.1;
}

.generate-card-summary small {
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.generate-card-tip {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
  color: #7c2d12;
}

.generate-card-tip strong {
  color: #9a3412;
  font-size: 16px;
}

.generate-card-tip p {
  margin: 0;
  color: #7c2d12;
  line-height: 1.7;
}

.polished-generate-form {
  display: grid !important;
  gap: 16px;
  max-width: none;
  padding: 16px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
}

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

.polished-generate-form label {
  display: grid;
  gap: 8px;
  margin: 0;
}

.polished-generate-form label.wide {
  grid-column: 1 / -1;
}

.polished-generate-form input,
.polished-generate-form select {
  min-height: 44px;
  border-radius: 11px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  padding: 0 13px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.polished-generate-form input:focus,
.polished-generate-form select:focus {
  outline: 2px solid rgba(37, 99, 235, .18);
  border-color: #93c5fd;
}

.generate-card-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.generate-card-actions button {
  min-width: 128px;
  min-height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 12px 24px rgba(239, 68, 68, .18);
}

@media (max-width: 640px) {
  .generate-card-summary,
  .generate-form-grid {
    grid-template-columns: 1fr;
  }

  .generate-card-summary > div {
    min-height: auto;
  }

  .polished-generate-form {
    padding: 12px;
  }

  .generate-card-actions button {
    width: 100%;
  }
}


/* 202607191158 user card toolbar button sizing */
.user-admin-body [data-open-card-generate],
.user-admin-body [data-copy-cards],
.user-admin-body [data-delete-selected-cards].user-card-delete-selected-btn {
  min-height: 36px;
  height: 36px;
  min-width: 94px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .user-admin-body [data-open-card-generate],
  .user-admin-body [data-copy-cards],
  .user-admin-body [data-delete-selected-cards].user-card-delete-selected-btn {
    min-height: 40px;
    height: 40px;
    min-width: 96px;
    line-height: 40px;
  }
}




/* 202607191416 generate card form aligned radio layout */
.polished-generate-form {
  padding: 16px;
  border-color: #d8e5f3;
  background: #f8fbff;
}

.generate-form-grid {
  gap: 10px 12px;
}

.polished-generate-form .generate-form-grid label {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 38px;
  margin: 0;
  border: 1px solid #d8e5f3;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}

.polished-generate-form .generate-form-grid label > span,
.polished-generate-form .card-uses-field > span {
  height: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #40516a;
  font-size: 13px;
  font-weight: 900;
  background: #f8fbff;
  white-space: nowrap;
}

.polished-generate-form .generate-form-grid label input,
.polished-generate-form .generate-form-grid label select {
  min-height: 38px;
  height: 38px;
  border: 0;
  border-left: 1px solid #d8e5f3;
  border-radius: 0;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  padding: 0 14px;
  box-shadow: none;
}

.polished-generate-form .generate-form-grid label input:focus,
.polished-generate-form .generate-form-grid label select:focus {
  outline: 0;
  background: #fbfdff;
}

.card-uses-field {
  grid-template-columns: 108px minmax(0, 1fr) !important;
  min-height: 100px !important;
  align-items: stretch !important;
}

.card-uses-field > span {
  align-self: stretch;
  justify-content: flex-start;
}

.card-uses-options {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  align-content: center;
  align-items: center;
  column-gap: 36px;
  row-gap: 16px;
  padding: 16px 20px;
  border: 0;
  background: transparent;
}

.card-uses-option {
  min-height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #253449;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: color .16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 0;
  white-space: nowrap;
  box-shadow: none;
  appearance: none;
}

.card-uses-option i {
  width: 14px;
  height: 14px;
  border: 1.7px solid #111827;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 3.5px #fff;
  flex: 0 0 auto;
}

.card-uses-option b {
  font: inherit;
  line-height: 1;
}

.card-uses-option:hover {
  color: #2563eb;
  box-shadow: none;
}

.card-uses-option:hover i {
  border-color: #2563eb;
}

.card-uses-option.active {
  border: 0;
  color: #253449;
  background: transparent;
  box-shadow: none;
}

.card-uses-option.active i {
  border-color: #111827;
  background: #111827;
}

.card-uses-custom-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: max-content minmax(118px, 170px) max-content;
  align-items: center;
  justify-content: start;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.card-uses-custom-row.active {
  border: 0;
  background: transparent;
}

.polished-generate-form .card-uses-custom {
  min-height: 38px !important;
  height: 38px !important;
  text-align: center;
  border: 1px solid #d8e5f3 !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  color: #0f172a;
  font-weight: 900;
}

.polished-generate-form .card-uses-custom:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.card-uses-unit {
  color: #40516a;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.level-row.lower {
  opacity: .72;
}

.level-row.lower button,
.level-row.active button {
  background: #cbd5e1;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .polished-generate-form {
    padding: 12px;
  }

  .polished-generate-form .generate-form-grid label,
  .card-uses-field {
    grid-template-columns: 92px minmax(0, 1fr) !important;
  }

  .polished-generate-form .generate-form-grid label > span,
  .polished-generate-form .card-uses-field > span {
    padding: 0 10px;
    font-size: 12px;
  }

  .card-uses-field {
    min-height: 112px !important;
  }

  .card-uses-options {
    grid-template-columns: repeat(2, max-content);
    column-gap: 38px;
    row-gap: 12px;
    padding: 14px 12px;
  }

  .card-uses-custom-row {
    grid-template-columns: max-content minmax(86px, 1fr) max-content;
    gap: 10px;
    width: 100%;
  }

  .card-uses-option {
    min-height: 28px;
    font-size: 15px;
  }
}

/* 202607191430 force generate card uses mockup layout */
.user-admin-body .polished-generate-form .card-uses-field {
  display: grid !important;
  grid-template-columns: 108px minmax(0, 1fr) !important;
  min-height: 100px !important;
  align-items: stretch !important;
  gap: 0 !important;
  border: 1px solid #d8e5f3 !important;
  border-radius: 9px !important;
  background: #fff !important;
  overflow: hidden !important;
}

.user-admin-body .polished-generate-form .card-uses-field > span {
  min-height: 100% !important;
  height: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 14px !important;
  color: #40516a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  background: #f8fbff !important;
  white-space: nowrap !important;
}

.user-admin-body .polished-generate-form .card-uses-options {
  display: grid !important;
  grid-template-columns: repeat(4, max-content) !important;
  align-content: center !important;
  align-items: center !important;
  justify-content: start !important;
  column-gap: 36px !important;
  row-gap: 16px !important;
  padding: 16px 20px !important;
  border: 0 !important;
  border-left: 1px solid #d8e5f3 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.user-admin-body .polished-generate-form .card-uses-option,
.user-admin-body .polished-generate-form .card-uses-option.active,
.user-admin-body .polished-generate-form .card-uses-option:hover,
.user-admin-body .polished-generate-form .card-uses-option:focus {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: #253449 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  text-align: left !important;
  box-shadow: none !important;
  transform: none !important;
}

.user-admin-body .polished-generate-form .card-uses-option i {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  border: 1.7px solid #111827 !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: inset 0 0 0 3.5px #fff !important;
  flex: 0 0 14px !important;
}

.user-admin-body .polished-generate-form .card-uses-option.active i {
  background: #111827 !important;
  border-color: #111827 !important;
}

.user-admin-body .polished-generate-form .card-uses-option b {
  display: inline !important;
  color: #253449 !important;
  font: inherit !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.user-admin-body .polished-generate-form .card-uses-custom-row {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: max-content 170px max-content !important;
  align-items: center !important;
  justify-content: start !important;
  gap: 12px !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.user-admin-body .polished-generate-form .card-uses-custom,
.user-admin-body .polished-generate-form .card-uses-custom:disabled {
  width: 170px !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid #d8e5f3 !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  text-align: center !important;
  box-shadow: none !important;
}

.user-admin-body .polished-generate-form .card-uses-custom-row.active .card-uses-custom {
  background: #fff !important;
  color: #0f172a !important;
}

.user-admin-body .polished-generate-form .card-uses-unit {
  color: #40516a !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

@media (max-width: 640px) {
  .user-admin-body .polished-generate-form .card-uses-field {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    min-height: 112px !important;
  }

  .user-admin-body .polished-generate-form .card-uses-field > span {
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .user-admin-body .polished-generate-form .card-uses-options {
    grid-template-columns: repeat(2, max-content) !important;
    column-gap: 38px !important;
    row-gap: 12px !important;
    padding: 14px 12px !important;
  }

  .user-admin-body .polished-generate-form .card-uses-custom-row {
    grid-template-columns: max-content minmax(86px, 1fr) max-content !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .user-admin-body .polished-generate-form .card-uses-custom,
  .user-admin-body .polished-generate-form .card-uses-custom:disabled {
    width: 100% !important;
  }

  .user-admin-body .polished-generate-form .card-uses-option,
  .user-admin-body .polished-generate-form .card-uses-option.active,
  .user-admin-body .polished-generate-form .card-uses-option:hover,
  .user-admin-body .polished-generate-form .card-uses-option:focus {
    font-size: 15px !important;
  }
}


/* 202607191520 final card generate radio exact layout */
.user-admin-body .polished-generate-form .generate-form-grid {
  gap: 10px 12px !important;
}
.user-admin-body .polished-generate-form .generate-form-grid > label:not(.wide) {
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0 !important;
  overflow: hidden !important;
  min-height: 38px !important;
  background: #ffffff !important;
  border: 1px solid #d8e5f3 !important;
  border-radius: 9px !important;
}
.user-admin-body .polished-generate-form .generate-form-grid > label:not(.wide) > span,
.user-admin-body .polished-generate-form .generate-form-grid > label.wide:not(.card-uses-field) > span {
  display: inline-flex !important;
  align-items: center !important;
  height: 100% !important;
  padding: 0 14px !important;
  color: #40516a !important;
  background: #f8fbff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}
.user-admin-body .polished-generate-form .generate-form-grid > label:not(.wide) input,
.user-admin-body .polished-generate-form .generate-form-grid > label.wide:not(.card-uses-field) select {
  height: 100% !important;
  min-height: 38px !important;
  border: 0 !important;
  border-left: 1px solid #d8e5f3 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #172033 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}
.user-admin-body .polished-generate-form .generate-form-grid > label.wide:not(.card-uses-field) {
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0 !important;
  min-height: 38px !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid #d8e5f3 !important;
  border-radius: 9px !important;
}
.user-admin-body .polished-generate-form .card-uses-field {
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr) !important;
  min-height: 100px !important;
  align-items: stretch !important;
  gap: 0 !important;
  border: 1px solid #d8e5f3 !important;
  border-radius: 9px !important;
  background: #fff !important;
  overflow: hidden !important;
}
.user-admin-body .polished-generate-form .card-uses-field > span {
  min-height: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  color: #40516a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  background: #f8fbff !important;
  white-space: nowrap !important;
}
.user-admin-body .polished-generate-form .card-uses-options {
  display: grid !important;
  grid-template-columns: repeat(4, max-content) !important;
  align-content: center !important;
  align-items: center !important;
  justify-content: start !important;
  column-gap: 36px !important;
  row-gap: 14px !important;
  padding: 16px 20px !important;
  border: 0 !important;
  border-left: 1px solid #d8e5f3 !important;
  border-radius: 0 !important;
  background: #fff !important;
}
.user-admin-body .polished-generate-form .card-uses-option,
.user-admin-body .polished-generate-form .card-uses-option.active,
.user-admin-body .polished-generate-form .card-uses-option:hover,
.user-admin-body .polished-generate-form .card-uses-option:focus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  min-width: 0 !important;
  width: auto !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #253449 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 24px !important;
  box-shadow: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.user-admin-body .polished-generate-form .card-uses-option i {
  flex: 0 0 14px !important;
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  border: 1.8px solid #111827 !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: inset 0 0 0 3px #fff !important;
}
.user-admin-body .polished-generate-form .card-uses-option.active i {
  background: #111827 !important;
}
.user-admin-body .polished-generate-form .card-uses-option b {
  color: #253449 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 24px !important;
}
.user-admin-body .polished-generate-form .card-uses-custom-row {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: max-content 170px max-content !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.user-admin-body .polished-generate-form .card-uses-custom {
  width: 170px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid #d8e5f3 !important;
  border-radius: 7px !important;
  background: #f3f7fb !important;
  color: #7b8aa1 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  text-align: center !important;
}
.user-admin-body .polished-generate-form .card-uses-custom:not(:disabled) {
  background: #fff !important;
  color: #172033 !important;
}
.user-admin-body .polished-generate-form .card-uses-unit {
  color: #40516a !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}
@media (max-width: 720px) {
  .user-admin-body .polished-generate-form .generate-form-grid > label:not(.wide),
  .user-admin-body .polished-generate-form .generate-form-grid > label.wide:not(.card-uses-field),
  .user-admin-body .polished-generate-form .card-uses-field {
    grid-template-columns: 96px minmax(0, 1fr) !important;
  }
  .user-admin-body .polished-generate-form .card-uses-options {
    grid-template-columns: repeat(4, max-content) !important;
    column-gap: 18px !important;
    row-gap: 13px !important;
    padding: 14px 12px !important;
  }
  .user-admin-body .polished-generate-form .card-uses-option b {
    font-size: 14px !important;
  }
  .user-admin-body .polished-generate-form .card-uses-custom-row {
    grid-template-columns: max-content minmax(110px, 150px) max-content !important;
  }
  .user-admin-body .polished-generate-form .card-uses-custom {
    width: 100% !important;
  }
}

/* Keep the mobile order page compact after all legacy responsive rules. */
@media (max-width: 640px) {
  #ordersPage .section-head {
    margin-bottom: 10px;
  }

  #ordersPage .section-head .eyebrow {
    font-size: 11px;
  }

  #ordersPage .section-head h1 {
    font-size: 25px;
    line-height: 1.25;
  }

  #ordersPage .section-head p {
    font-size: 13px;
    line-height: 1.5;
  }

  #ordersPage .order-search {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px;
    border-radius: 8px;
  }

  #ordersPage .order-search label {
    gap: 5px;
    font-size: 12px;
  }

  #ordersPage .order-search input {
    min-height: 40px;
    padding: 0 11px;
    font-size: 15px;
  }

  #ordersPage .order-search button {
    width: 100%;
    min-height: 42px;
    justify-self: stretch;
    padding: 0 18px;
    font-size: 14px;
  }

  #ordersPage .order-list {
    gap: 9px;
  }

  #ordersPage .order-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    align-items: start;
    gap: 10px;
    padding: 14px;
  }

  #ordersPage .order-card-primary {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  #ordersPage .order-card-thumb {
    width: 72px;
  }

  #ordersPage .order-card-actions,
  #ordersPage .order-success-actions,
  #ordersPage .order-pending-actions,
  #ordersPage .order-fail-actions {
    width: 82px;
  }

  #ordersPage .order-success-actions,
  #ordersPage .order-pending-actions,
  #ordersPage .order-fail-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  #ordersPage .order-fail-actions > span {
    white-space: normal;
    text-align: center;
    font-size: 11px;
  }

  #ordersPage .order-item {
    padding: 12px;
    gap: 9px;
    border-radius: 8px;
  }

  #ordersPage .order-item > div:first-child strong {
    font-size: 15px;
    line-height: 1.35;
  }

  #ordersPage .order-card-meta span {
    margin-top: 0;
    font-size: 12px;
    line-height: 1.4;
  }

  #ordersPage .order-detail {
    padding-top: 11px;
    gap: 7px;
    font-size: 12px;
    line-height: 1.45;
  }

  #ordersPage .coupon-action,
  #ordersPage .feedback-action,
  #ordersPage .order-refresh-action {
    width: 82px;
    min-width: 0;
    min-height: 36px;
    padding: 0 7px;
    font-size: 12px;
  }
}

@media (max-width: 390px) {
  #ordersPage .order-card-head {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px;
    padding: 12px;
  }

  #ordersPage .order-card-primary {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
  }

  #ordersPage .order-card-thumb {
    width: 64px;
  }

  #ordersPage .order-card-actions,
  #ordersPage .order-success-actions,
  #ordersPage .order-pending-actions,
  #ordersPage .order-fail-actions,
  #ordersPage .coupon-action,
  #ordersPage .feedback-action,
  #ordersPage .order-refresh-action {
    width: 76px;
  }

  #ordersPage .order-card-summary > strong {
    font-size: 14px;
  }

  #ordersPage .order-card-meta {
    font-size: 11px;
  }
}


/* 202607191535 app generate card radio exact layout */
.generate-card-form .card-uses-field {
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr) !important;
  min-height: 100px !important;
  align-items: stretch !important;
  gap: 0 !important;
  border: 1px solid #d8e5f3 !important;
  border-radius: 9px !important;
  background: #fff !important;
  overflow: hidden !important;
}
.generate-card-form .card-uses-field > span {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  color: #40516a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  background: #f8fbff !important;
  white-space: nowrap !important;
}
.generate-card-form .card-uses-options {
  display: grid !important;
  grid-template-columns: repeat(4, max-content) !important;
  align-content: center !important;
  align-items: center !important;
  justify-content: start !important;
  column-gap: 36px !important;
  row-gap: 14px !important;
  padding: 16px 20px !important;
  border: 0 !important;
  border-left: 1px solid #d8e5f3 !important;
  border-radius: 0 !important;
  background: #fff !important;
}
.generate-card-form .card-uses-option,
.generate-card-form .card-uses-option.active,
.generate-card-form .card-uses-option:hover,
.generate-card-form .card-uses-option:focus {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  width: auto !important;
  min-width: 0 !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #253449 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 24px !important;
  box-shadow: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.generate-card-form .card-uses-option i {
  flex: 0 0 14px !important;
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  border: 1.8px solid #111827 !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: inset 0 0 0 3px #fff !important;
}
.generate-card-form .card-uses-option.active i { background: #111827 !important; }
.generate-card-form .card-uses-option b {
  color: #253449 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 24px !important;
}
.generate-card-form .card-uses-custom-row {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: max-content 170px max-content !important;
  align-items: center !important;
  gap: 10px !important;
}
.generate-card-form .card-uses-custom {
  width: 170px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid #d8e5f3 !important;
  border-radius: 7px !important;
  background: #f3f7fb !important;
  color: #7b8aa1 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  text-align: center !important;
}
.generate-card-form .card-uses-custom:not(:disabled) { background: #fff !important; color: #172033 !important; }
.generate-card-form .card-uses-unit { color: #40516a !important; font-size: 15px !important; font-weight: 900 !important; }


/* 20260720 homepage note and admin setting polish */
.cover-validity-note {
  display: inline-block;
  margin-left: 10px;
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 700;
  color: #2f261f;
  letter-spacing: 0;
  vertical-align: middle;
}
.logo-input-row {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.logo-preview {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8e2f0;
  border-radius: 12px;
  background: #f5f8fc;
  color: #64748b;
  overflow: hidden;
}
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  color: #fff;
  background: #2563eb;
  font-weight: 800;
  cursor: pointer;
}
.logo-upload-btn input { display: none; }
.settings-switch {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #f8fbff;
}
.auto-clear-panel {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #f7c78c;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
  color: #9a3412;
  font-weight: 700;
}
.polished-price-rules {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #dbe5f2;
  background: #f8fafc;
}
.polished-price-rules .price-rule-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(120px, .7fr);
  gap: 14px;
  align-items: end;
}
.polished-price-rules label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: #475569;
}
.polished-price-rules input {
  height: 42px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
}
@media (max-width: 720px) {
  .cover-validity-note {
    display: block;
    margin-left: 0;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
  }
  .logo-input-row,
  .polished-price-rules .price-rule-row {
    grid-template-columns: 1fr;
  }
}

/* 2026-07-30: settings, notice editor, product auto-clear polish */
.product-auto-clear-panel {
  margin: 18px 0 8px;
  padding: 18px;
  border: 1px solid #d8e4f3;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #fff7ed 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.product-auto-clear-panel .product-auto-clear-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, .8fr) auto;
  gap: 16px;
  align-items: end;
}
.product-auto-clear-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #fff;
  font-weight: 800;
  color: #1e3a8a;
}
.product-auto-clear-interval {
  display: grid;
  gap: 7px;
  color: #475569;
  font-weight: 800;
}
.product-auto-clear-interval input {
  height: 44px;
  border-radius: 11px;
  border: 1px solid #cbd5e1;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
}
.product-auto-clear-tip {
  margin-top: 12px;
  color: #64748b;
  line-height: 1.65;
}
.settings-note-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background: #f8fbff;
}
.settings-note-editor textarea {
  width: 100%;
  min-height: 112px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
  background: #fff;
  line-height: 1.7;
}
.settings-note-controls {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(140px, 180px);
  gap: 12px;
}
.settings-note-controls label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-weight: 800;
}
.settings-note-controls input[type="number"],
.settings-note-controls input[type="color"] {
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  padding: 0 10px;
}
.settings-note-controls input[type="color"] {
  padding: 4px;
  cursor: pointer;
}
.admin-body .site-config-form.settings-panel .logo-input-row.logo-input-row-inline {
  grid-template-columns: 58px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 12px;
}
.admin-body .site-config-form.settings-panel .logo-input-row.logo-input-row-inline input[type="text"] {
  min-height: 46px;
}
.admin-body .site-config-form.settings-panel .logo-upload-btn {
  height: 46px;
  min-width: 112px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
}
.admin-body .site-config-form.settings-panel .logo-upload-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}
.notice-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
.notice-tool-btn {
  height: 36px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 0 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
}
.notice-tool-btn:hover {
  background: #dbeafe;
}
.notice-editor-panel textarea#noticeContent {
  min-height: 360px;
  line-height: 1.75;
}
.admin-grid-form.user-rule-form,
.polished-price-rules {
  padding-bottom: 28px;
}
.admin-body .settings-group {
  padding-bottom: 28px;
}
@media (max-width: 720px) {
  .product-auto-clear-panel .product-auto-clear-row,
  .settings-note-controls,
  .admin-body .site-config-form.settings-panel .logo-input-row.logo-input-row-inline {
    grid-template-columns: 1fr;
  }
  .product-auto-clear-panel {
    padding: 14px;
  }
  .notice-toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .notice-editor-panel textarea#noticeContent {
    min-height: 260px;
  }
}

/* 2026-07-30: compact product auto-clear controls and persistent detail arrows */
.product-auto-clear-panel {
  margin: 12px 0 8px;
  padding: 14px 16px;
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  background: #f8fbff;
  box-shadow: none;
}

.product-auto-clear-panel .settings-switch.product-auto-clear-switch {
  min-height: 38px;
  padding: 0 12px;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-weight: 900;
  white-space: nowrap;
}

.product-auto-clear-panel .product-auto-clear-interval {
  min-width: 180px;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.product-auto-clear-panel .product-auto-clear-interval input {
  height: 38px;
  min-width: 150px;
  border-radius: 8px;
}

.product-auto-clear-panel .admin-secondary-btn {
  height: 38px;
  min-width: 88px;
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-auto-clear-panel .product-auto-clear-tip {
  margin: 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.detail-nav-btn:not(:disabled) {
  opacity: .92;
  pointer-events: auto;
}

.detail-media-stage.controls-visible .detail-nav-btn:not(:disabled),
.detail-media-stage:hover .detail-nav-btn:not(:disabled) {
  opacity: .92;
}

.detail-nav-btn:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.9);
}

.detail-nav-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 720px) {
  .product-auto-clear-panel {
    align-items: stretch;
  }

  .product-auto-clear-panel .settings-switch.product-auto-clear-switch,
  .product-auto-clear-panel .product-auto-clear-interval,
  .product-auto-clear-panel .admin-secondary-btn,
  .product-auto-clear-panel .product-auto-clear-tip {
    width: 100%;
  }
}

/* 2026-09-04: compact feedback administration and order identity row */
.admin-body .feedback-admin-page .admin-section-head {
  margin-bottom: 0;
  padding: 14px 18px 10px;
}

.admin-body .feedback-admin-page .admin-section-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.admin-body .feedback-admin-page .admin-section-head p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
}

.admin-body .feedback-admin-page .feedback-admin-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 18px 10px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #f8fafc;
}

.admin-body .feedback-admin-page .feedback-admin-summary div {
  min-height: 48px;
  padding: 7px 13px;
  border: 0;
  border-left: 1px solid #dbe3ef;
  background: transparent;
}

.admin-body .feedback-admin-page .feedback-admin-summary div:first-child {
  border-left: 0;
}

.admin-body .feedback-admin-page .feedback-admin-summary span {
  font-size: 12px;
}

.admin-body .feedback-admin-page .feedback-admin-summary strong {
  margin-top: 1px;
  font-size: 19px;
  line-height: 1.2;
}

.admin-body .feedback-admin-page .feedback-type-manager {
  margin: 0 18px 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #fff;
}

.admin-body .feedback-admin-page .feedback-type-manager-summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 12px;
  padding: 0 13px;
  color: #172033;
  cursor: pointer;
  list-style: none;
}

.admin-body .feedback-admin-page .feedback-type-manager-summary::-webkit-details-marker {
  display: none;
}

.admin-body .feedback-admin-page .feedback-type-manager-summary > span {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.admin-body .feedback-admin-page .feedback-type-manager-summary strong {
  font-size: 14px;
}

.admin-body .feedback-admin-page .feedback-type-manager-summary small {
  color: #6b778b;
  font-size: 12px;
  font-weight: 400;
}

.admin-body .feedback-admin-page .feedback-type-manager-summary b {
  margin-left: auto;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.admin-body .feedback-admin-page .feedback-type-manager-summary::after {
  content: "展开";
  min-width: 48px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.admin-body .feedback-admin-page .feedback-type-manager[open] .feedback-type-manager-summary::after {
  content: "收起";
}

.admin-body .feedback-admin-page .feedback-type-manager-body {
  padding: 0 12px 12px;
  border-top: 1px solid #e5eaf1;
}

.admin-body .feedback-admin-page .feedback-type-create {
  margin-top: 10px;
  padding: 10px;
}

.admin-body .feedback-admin-page .feedback-type-create-form input,
.admin-body .feedback-admin-page .feedback-type-item input,
.admin-body .feedback-admin-page .feedback-type-item select,
.admin-body .feedback-admin-page .feedback-type-create-form button,
.admin-body .feedback-admin-page .feedback-type-actions button {
  height: 34px;
  min-height: 34px;
}

.admin-body .feedback-admin-page .feedback-type-list {
  margin-top: 10px;
}

.admin-body .feedback-admin-page .feedback-type-list-head {
  min-height: 34px;
}

.admin-body .feedback-admin-page .feedback-type-item {
  padding: 7px 10px;
}

.admin-body .feedback-admin-page > .admin-filter-form {
  margin: 0 18px 10px;
  padding: 9px 11px;
}

.admin-body .feedback-admin-page .feedback-admin-list {
  margin: 0 18px 16px;
}

#ordersPage .order-detail {
  margin: 0 14px;
  padding: 10px 0 13px;
}

#ordersPage .order-detail-row {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#ordersPage .order-detail-row > span {
  font-weight: 700;
  white-space: nowrap;
}

#ordersPage .order-detail-row code {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  font-variant-numeric: tabular-nums;
  scrollbar-width: none;
}

#ordersPage .order-detail-row code::-webkit-scrollbar {
  display: none;
}

@media (max-width: 700px) {
  .admin-body .feedback-admin-page .feedback-type-manager-summary small {
    display: none;
  }

  .admin-body .feedback-admin-page .feedback-admin-summary,
  .admin-body .feedback-admin-page .feedback-type-manager,
  .admin-body .feedback-admin-page > .admin-filter-form,
  .admin-body .feedback-admin-page .feedback-admin-list {
    margin-left: 10px;
    margin-right: 10px;
  }

  #ordersPage .order-detail-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

/* 2026-09-04: one-row feedback management table */
.admin-body .feedback-admin-page .feedback-table-wrap {
  margin: 0 18px 16px;
  overflow-x: auto;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.admin-body .feedback-management-table {
  width: 100%;
  min-width: 1380px;
  table-layout: fixed;
  border-collapse: collapse;
  color: #253047;
  font-size: 12px;
}

.admin-body .feedback-management-table th {
  height: 40px;
  padding: 0 10px;
  border-bottom: 1px solid #dbe3ef;
  background: #eef3f9;
  color: #526076;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.admin-body .feedback-management-table td {
  height: 68px;
  padding: 8px 10px;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
  vertical-align: middle;
}

.admin-body .feedback-management-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-body .feedback-management-table tbody tr:hover td {
  background: #f8fbff;
}

.admin-body .feedback-management-table th:nth-child(1) { width: 78px; }
.admin-body .feedback-management-table th:nth-child(2) { width: 132px; }
.admin-body .feedback-management-table th:nth-child(3) { width: 170px; }
.admin-body .feedback-management-table th:nth-child(4) { width: 205px; }
.admin-body .feedback-management-table th:nth-child(5) { width: 108px; }
.admin-body .feedback-management-table th:nth-child(6) { width: 230px; }
.admin-body .feedback-management-table th:nth-child(7) { width: 150px; }
.admin-body .feedback-management-table th:nth-child(8) { width: 118px; }
.admin-body .feedback-management-table th:nth-child(9) { width: 188px; }

.admin-body .feedback-management-table .status-pill {
  min-width: 56px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  text-align: center;
}

.admin-body .feedback-time-cell time,
.admin-body .feedback-phone-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.admin-body .feedback-product-cell strong,
.admin-body .feedback-issue-cell strong,
.admin-body .feedback-product-cell small,
.admin-body .feedback-issue-cell small,
.admin-body .feedback-coupon-cell code,
.admin-body .feedback-identifiers-cell code {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .feedback-product-cell strong,
.admin-body .feedback-issue-cell strong {
  color: #172033;
  font-size: 13px;
}

.admin-body .feedback-product-cell small,
.admin-body .feedback-issue-cell small {
  margin-top: 4px;
  color: #6b778b;
  font-size: 11px;
  line-height: 1.35;
}

.admin-body .feedback-issue-cell .feedback-result-text {
  color: #a15c00;
}

.admin-body .feedback-identifiers-cell {
  display: grid;
  gap: 5px;
}

.admin-body .feedback-identifiers-cell span {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
}

.admin-body .feedback-identifiers-cell b {
  color: #7b8798;
  font-size: 11px;
  font-weight: 700;
}

.admin-body .feedback-identifiers-cell code,
.admin-body .feedback-coupon-cell code {
  color: #214d91;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
}

.admin-body .feedback-table-images {
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-body .feedback-table-images .feedback-admin-thumb {
  flex: 0 0 32px;
  width: 32px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
}

.admin-body .feedback-table-images .feedback-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-body .feedback-no-image {
  color: #98a2b3;
}

.admin-body .feedback-table-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.admin-body .feedback-table-actions form {
  margin: 0;
}

.admin-body .feedback-table-btn {
  height: 30px;
  min-width: 50px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.admin-body .feedback-table-btn.refund {
  background: #2563eb;
}

.admin-body .feedback-table-btn.reject {
  background: #d98200;
}

.admin-body .feedback-table-btn.delete {
  background: #dc2626;
}

.admin-body .feedback-table-btn:hover {
  filter: brightness(.92);
}

@media (max-width: 700px) {
  .admin-body .feedback-admin-page .feedback-table-wrap {
    margin-left: 10px;
    margin-right: 10px;
  }
}
