:root {
  --sidebar: #dff3e7;
  --sidebar-dark: #c9ead7;
  --active: #72d69a;
  --topbar: #bce9cf;
  --primary: #38b66f;
  --accent: #1d9a59;
  --text: #263247;
  --muted: #7b8496;
  --line: #dcefe4;
  --page: #eef8f2;
  --content-scale: 0.8;
  --sidebar-width: 240px;
}

* { box-sizing: border-box; }

html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  overflow: hidden;
  background: var(--page);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.route-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 100%;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #26a866, #78dda1, #26a866);
  box-shadow: 0 4px 16px rgba(35, 166, 96, 0.28);
}

body.route-pending .route-progress {
  opacity: 1;
  animation: route-progress-run 1.05s cubic-bezier(.22, .72, .24, 1) infinite;
}

button,
.btn,
.small-btn,
.product-card,
.support-card,
.partner-card,
.notice-card,
.wallet-card,
.profile-card {
  transition:
    background-color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease,
    opacity .18s ease,
    transform .18s ease;
}

button:not(:disabled):active,
.btn:not(:disabled):active,
.small-btn:not(:disabled):active {
  transform: translateY(1px) scale(.99);
}

.route-clicked {
  transform: translateY(1px) scale(.99);
  box-shadow: inset 0 0 0 999px rgba(20, 138, 77, .07);
}

@keyframes route-progress-run {
  0% {
    transform: scaleX(0);
    opacity: .45;
  }
  46% {
    transform: scaleX(.72);
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: .15;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

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

.app-shell {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  overflow: hidden;
  transition: grid-template-columns .22s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.sidebar {
  background: var(--sidebar);
  color: #1f5e3a;
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  transition: opacity .18s ease, transform .22s ease;
}

.app-shell.sidebar-collapsed .sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.brand {
  height: 112px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 26px;
  background: rgba(255, 255, 255, 0.32);
}

.logo-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #35bd71, #8de6b0);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 12px 25px rgba(42, 117, 73, 0.16);
}

.brand-name {
  font-size: 29px;
  font-weight: 800;
  color: #1f7d4c;
}

.menu-group { border-top: 1px solid rgba(32, 120, 72, 0.12); }

.menu-title {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 24px;
}

.menu-icon { width: 20px; color: #2e8c58; }
.submenu { background: var(--sidebar-dark); }

.submenu button,
.menu-group.single > button {
  width: 100%;
  height: 54px;
  padding: 0 30px 0 64px;
  border: 0;
  background: transparent;
  color: #21563a;
  text-align: left;
  cursor: pointer;
}

.menu-group.single > button { padding-left: 56px; background: var(--sidebar); }
.submenu button.active, .menu-group.single > button.active { background: var(--active); color: #133820; font-weight: 700; }
.submenu button:hover,
.menu-group.single > button:hover {
  background: #c9efd9;
  color: #103b25;
}
.top-actions button:hover,
.toolbar button:hover,
.search-row button:hover,
.wallet-tabs button:hover,
.auth-tabs button:hover {
  filter: brightness(.98);
  box-shadow: 0 6px 14px rgba(31, 130, 78, .1);
}
.menu-group.admin { margin-top: 18px; opacity: 0.96; }

.main {
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  overflow: hidden;
}

.content-frame {
  position: relative;
  flex: 0 0 calc((100vh - 58px) / var(--content-scale));
  min-height: 0;
  height: calc((100vh - 58px) / var(--content-scale));
  width: calc(100% / var(--content-scale));
  overflow: auto;
  transform: scale(var(--content-scale));
  transform-origin: top left;
}

.content-frame::before,
.content-frame::after {
  content: "";
  position: fixed;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.content-frame::before {
  inset: 44px 0 0 0;
  z-index: 28;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(1px);
}

.content-frame::after {
  top: 50%;
  left: 50%;
  z-index: 29;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid rgba(45, 87, 168, .18);
  border-top-color: #4054b2;
  border-radius: 50%;
  animation: spinner-rotate .72s linear infinite;
}

body.route-pending .content-frame::before,
body.route-pending .content-frame::after {
  opacity: 1;
}

body.route-switching .content-frame > * {
  opacity: .52;
  transition: opacity .16s ease;
}

body.route-pending .content-frame:has(.modal-backdrop.open)::before,
body.route-pending .content-frame:has(.modal-backdrop.open)::after {
  opacity: 0;
}

.number-content-frame {
  overflow: hidden;
}

.topbar {
  flex: 0 0 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: var(--topbar);
  color: #19472e;
}

.hamburger {
  width: 36px;
  height: 28px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #21643f;
  cursor: pointer;
  padding: 0 10px 0 0;
  position: relative;
}

.hamburger span {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform .18s ease, opacity .18s ease, width .18s ease;
}

.hamburger::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(-135deg);
  transform-origin: center;
  transition: transform .18s ease, right .18s ease;
}

.hamburger:hover {
  color: #146b3c;
  transform: scale(1.06);
}

.app-shell.sidebar-collapsed .hamburger span:nth-child(1) {
  transform: none;
}

.app-shell.sidebar-collapsed .hamburger span:nth-child(2) {
  opacity: 1;
}

.app-shell.sidebar-collapsed .hamburger span:nth-child(3) {
  transform: none;
}

.app-shell.sidebar-collapsed .hamburger::after {
  right: 5px;
  transform: translateY(-50%) rotate(45deg);
}

.top-actions { display: flex; align-items: center; gap: 10px; }
.language-toggle {
  height: 32px;
  border: 0;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.78);
  color: #1d5738;
  cursor: pointer;
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #28a960, #93e6b2);
  color: #fff;
  font-weight: 800;
}
.avatar.large {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  font-size: 30px;
}

.breadcrumb {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 22px;
  background: #fff;
  color: #667466;
  border-bottom: 1px solid #edf0f4;
}

.content { width: calc(100% - 36px); margin: 18px; }
.number-content {
  height: calc((100vh - 58px) / var(--content-scale) - 44px - 36px);
  overflow: visible;
}
.number-store-page {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
}

.notice {
  flex: 0 0 auto;
  background: #f3fbf6;
  border: 1px solid #cfeedd;
  color: #287a4c;
  font-size: 1.2em;
  line-height: 1.5;
  margin-bottom: 12px;
  padding: 15px 22px;
}

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

.notice p {
  margin: 0 0 10px;
}

.notice p:last-child {
  margin-bottom: 0;
}

.store-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.store-toolbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 325px 250px minmax(430px, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  font-size: 1.08em;
}

.store-toolbar.real-toolbar {
  grid-template-columns: 325px minmax(340px, 460px);
  justify-content: start;
}

.store-toolbar.virtual-toolbar {
  grid-template-columns: 300px 250px minmax(340px, 460px);
  justify-content: start;
}

.country-select, .search-row, .table-search {
  height: 51px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 18px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.country-select {
  position: relative;
  gap: 14px;
  padding-right: 12px;
  overflow: visible;
}
.country-select:focus-within,
.country-select.open,
.search-row:focus-within,
.table-search:focus-within {
  border-color: #79dba2;
  box-shadow: 0 8px 22px rgba(31, 130, 78, .08);
}
.country-field-label {
  color: var(--muted);
  white-space: nowrap;
}
.country-picker-trigger {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.country-choice {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.country-choice-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.country-picker-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid #4c6b58;
  border-bottom: 2px solid #4c6b58;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease, border-color .16s ease;
}
.country-select.open .country-picker-caret {
  transform: rotate(225deg) translate(-2px, -1px);
  border-color: #0f7c4b;
}
.country-menu {
  position: absolute;
  z-index: 60;
  left: -1px;
  right: -1px;
  top: calc(100% + 7px);
  padding: 6px;
  border: 1px solid #ccebd8;
  background: #fff;
  box-shadow: 0 14px 30px rgba(30, 101, 63, .16);
}
.country-option {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: #fff;
  color: #1f3448;
  padding: 0 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}
.country-option:hover {
  background: #c9efd9;
  color: #103b25;
  box-shadow: inset 3px 0 0 #35b76d;
}
.country-option:hover {
  transform: translateX(2px);
}
.country-option.active {
  background: #dcf7e7;
  color: #103b25;
  box-shadow: inset 3px 0 0 #35b76d;
}
.store-toolbar select,
.store-toolbar input,
.store-toolbar button {
  font-size: inherit;
}
.country-select select, .search-row input, .table-search input, .admin-product-card input, textarea {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
}

.toolbar-segmented {
  height: 51px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid #cfeedd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  padding: 4px;
}

.toolbar-segmented button {
  border: 0;
  border-radius: 4px;
  background: #f3fbf6;
  color: #4f6d5e;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.toolbar-segmented button:last-child {
  border-right: 0;
}

.toolbar-segmented button.active {
  background: linear-gradient(135deg, #35b76d, #72d69a);
  color: #fff;
  box-shadow: 0 6px 14px rgba(38, 152, 86, 0.22);
}

.search-row {
  gap: 10px;
  padding-right: 4px;
  min-width: 0;
  background: linear-gradient(180deg, #fff, #fbfffc);
}
.search-row input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding-left: 2px;
}
.search-row input::placeholder {
  color: #7f9188;
}
.search-row .btn { white-space: nowrap; }

.btn {
  height: 47px;
  border: 0;
  padding: 0 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn.ghost { background: #e7f6ed; color: #1f7d4c; }

.products-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 18px 18px;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.product-card {
  position: relative;
  min-height: 152px;
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(33, 100, 63, 0.08);
  cursor: pointer;
}

.product-card:hover {
  z-index: 2;
  border-color: #44bd74;
  background: #d5f3e2;
  box-shadow: 0 14px 30px rgba(38, 150, 84, 0.23);
  transform: translateY(-4px) scale(1.065);
}
.product-card.selected {
  z-index: 1;
  border-color: #50c77b;
  background: #e6f9ee;
  box-shadow: 0 14px 30px rgba(38, 150, 84, 0.18);
}

.product-card:active {
  transform: translateY(0) scale(.995);
}

.product-card > div {
  min-width: 0;
}

.product-icon {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #29a860, #7bd99f);
  color: #fff;
  font-size: 42px;
  font-weight: 800;
  border: 4px solid #f6f7fb;
  box-shadow: 0 2px 8px rgba(38, 90, 61, 0.16);
}

.product-icon.product-image {
  background: #fff;
  padding: 12px;
}

.product-icon.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-icon.small { width: 54px; height: 54px; font-size: 22px; border-width: 2px; }

.product-name { font-size: 22px; font-weight: 700; margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-country { display: flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 10px; }
.meta-row { display: flex; gap: 12px; align-items: baseline; color: var(--muted); margin-top: 8px; }
.meta-row strong { color: #263247; font-size: 18px; font-weight: 500; }

.mini-flag { width: 24px; height: 16px; display: inline-block; flex: 0 0 auto; border: 1px solid #d3ded8; background: #fff center / cover no-repeat; box-shadow: 0 1px 2px rgba(15, 42, 31, 0.08); }
.mini-flag.us { background-image: url("./assets/flags/us.svg?v=final20260524b"); }
.mini-flag.ca { background: linear-gradient(90deg, #d52b1e 0 28%, #fff 28% 72%, #d52b1e 72%); }
.mini-flag.uk { background-image: url("./assets/flags/uk.svg?v=final20260524b"); }
.mini-flag.hk { background-image: url("./assets/flags/hk.svg?v=final20260524b"); }
.country-with-flag { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.country-with-flag .mini-flag { width: 24px; height: 16px; }

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

.stat-card {
  min-height: 104px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  color: #1d5738;
}

.stat-value { font-size: 28px; font-weight: 800; margin-top: 8px; }
.stat-label { color: var(--muted); font-weight: 700; }

.table-toolbar, .admin-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.table-search { width: 360px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { height: 58px; padding: 0 16px; border-bottom: 1px solid #f0f3f8; text-align: left; white-space: nowrap; }
th { background: #f8fffb; color: #637568; font-weight: 700; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; }
.amount.green { color: #1dbb70; font-weight: 700; }
.amount.orange { color: #ef8a2e; font-weight: 700; }
.amount.blue { color: #5d78e8; font-weight: 700; }
.status { padding: 6px 10px; background: #dcf8e8; color: #139454; font-weight: 700; }
.status.success { background: #dcf8e8; color: #139454; }
.status.warning { background: #fff4cf; color: #a36400; }
.status.danger { background: #ffe3e3; color: #d93030; }
.status.muted { background: #edf1f5; color: #64748b; }
.kind-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; background: #e9f8ef; color: #167a47; font-weight: 800; }
.kind-pill.virtual { background: #edf4ff; color: #315db8; }
.orders-record-toolbar {
  gap: 18px;
}
.orders-toolbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
}
.orders-toolbar-left h2 {
  margin: 0;
  white-space: nowrap;
}
.order-kind-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.order-kind-filter {
  height: 44px;
  min-width: 172px;
  border: 2px solid #d7e8dd;
  border-radius: 4px;
  background: #fff;
  color: #4f6d5e;
  font-weight: 800;
  font-size: 1.04em;
  cursor: pointer;
}
.order-kind-filter.all.active {
  border-color: #4f6d5e;
  background: #4f6d5e;
  color: #fff;
}
.order-kind-filter.real {
  border-color: #38b66f;
  color: #167a47;
}
.order-kind-filter.real.active {
  background: #38b66f;
  color: #fff;
}
.order-kind-filter.virtual {
  border-color: #5d78e8;
  color: #315db8;
}
.order-kind-filter.virtual.active {
  background: #5d78e8;
  color: #fff;
}
.orders-pagination {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0 26px;
}
.record-page-area {
  position: relative;
  min-height: 120px;
}
.record-page-area.page-area-loading {
  pointer-events: none;
}
.record-page-area.page-area-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(1px);
  animation: page-area-fade .14s ease both;
}
.record-page-area.page-area-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: min(220px, 48%);
  z-index: 4;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 3px solid rgba(56, 182, 111, 0.18);
  border-top-color: #38b66f;
  border-radius: 50%;
  animation: page-area-spin .68s linear infinite;
}
@keyframes page-area-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes page-area-spin {
  to { transform: rotate(360deg); }
}
.finance-pagination {
  margin-bottom: 34px;
}
.page-size-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #637568;
  font-weight: 800;
}
.page-size-control::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -6px;
  border-right: 2px solid #1f7d4c;
  border-bottom: 2px solid #1f7d4c;
  pointer-events: none;
  transform: rotate(45deg);
}
.page-size-control select {
  height: 38px;
  min-width: 98px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fbfffc;
  color: var(--text);
  padding: 0 34px 0 12px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(56, 182, 111, 0.06);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.page-size-control select:hover {
  border-color: #b5e5ca;
  background: #f6fff9;
}
.page-size-control select:focus {
  border-color: #38b66f;
  box-shadow: 0 0 0 3px rgba(56, 182, 111, 0.12);
}
.page-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.page-buttons-empty {
  min-height: 34px;
}
.page-number-list {
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-btn,
.page-number {
  height: 34px;
  min-width: 34px;
  border: 1px solid #cfeedd;
  background: #fff;
  color: #1f7d4c;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.page-btn {
  padding: 0 12px;
}
.page-btn:not(:disabled):hover,
.page-number:not(.active):hover {
  border-color: #9fdcbc;
  background: #effaf4;
  color: #126c3e;
  box-shadow: 0 4px 10px rgba(31, 125, 76, 0.1);
  transform: translateY(-1px);
}
.page-btn:not(:disabled):active,
.page-number:not(.active):active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(31, 125, 76, 0.08);
}
.page-btn:focus-visible,
.page-number:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(56, 182, 111, 0.16);
}
.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.page-number.active {
  border-color: #38b66f;
  background: #38b66f;
  color: #fff;
  box-shadow: 0 4px 10px rgba(56, 182, 111, 0.16);
}
.page-ellipsis {
  min-width: 24px;
  text-align: center;
  color: #7b8496;
  font-weight: 800;
}
.small-btn { height: 32px; border: 0; padding: 0 12px; background: #e7f0eb; color: #244a37; cursor: pointer; }
.small-btn.primary { background: var(--primary); color: #fff; }
.small-btn.modal-action { width: 100%; height: 42px; margin: 0 0 12px; font-weight: 800; }

.admin-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; }
.admin-product-card { background: #fff; border: 1px solid var(--line); padding: 22px; }
.admin-product-head { display: flex; gap: 16px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.admin-product-head h3 { margin: 0 0 6px; }
.admin-product-head span { color: var(--muted); }
.admin-product-card label { display: block; color: var(--muted); margin: 14px 0 8px; }
.admin-product-card input, textarea { min-height: 40px; border: 1px solid var(--line); padding: 10px; }
textarea { height: 90px; resize: vertical; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.empty-inline { min-height: 220px; display: grid; place-items: center; grid-column: 1 / -1; color: var(--muted); border: 1px dashed var(--line); background: #fbfffc; }
.empty-inline.loading-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: panel-fade-in .18s ease both;
}
.empty-inline.loading-inline::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(56, 182, 111, .2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner-rotate .72s linear infinite;
}
.empty-inline.loading-inline.spinner-only::before {
  width: 34px;
  height: 34px;
  border-width: 3px;
}
.wallet-address { margin: 12px 0; padding: 14px; border: 1px solid var(--line); background: #f8fffb; font-family: Consolas, monospace; }

.renewal-page {
  min-height: calc(100vh - 170px);
  display: grid;
  align-content: start;
  gap: 22px;
}

.renewal-notice {
  width: 100%;
  border: 1px solid #bcd2ff;
  background: #eef3ff;
  color: #234a82;
  padding: 18px 22px;
  line-height: 1.8;
}

.renewal-notice strong {
  display: block;
  margin-bottom: 6px;
}

.renewal-notice p {
  margin: 2px 0;
}

.renewal-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.renewal-tabs button {
  min-width: 150px;
  height: 44px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.renewal-tabs button.active,
.renewal-tabs button:hover {
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
  background: #effaf4;
}

.renewal-choice-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 360px));
  justify-content: center;
  gap: 22px;
}

.renewal-choice-wrap.single {
  grid-template-columns: minmax(260px, 420px);
  min-height: 240px;
  align-items: center;
}

.renewal-choice-card {
  min-height: 150px;
  border: 1px solid #cfe3d8;
  background: #fff;
  box-shadow: 0 6px 18px rgba(32, 120, 72, 0.08);
  cursor: pointer;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 28px;
  text-align: left;
  color: var(--text);
}

.renewal-choice-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 26px rgba(32, 120, 72, 0.14);
}

.renewal-choice-card strong {
  font-size: 24px;
  color: #184b30;
}

.renewal-choice-card span {
  color: var(--muted);
  line-height: 1.6;
}

.renewal-inline-card {
  width: 100%;
  justify-self: stretch;
  display: grid;
  gap: 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.renewal-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 4px 0 14px;
}

.renewal-inline-head h2 {
  margin: 0;
  color: #184b30;
  font-size: 22px;
}

.renewal-inline-head span {
  color: var(--muted);
  font-weight: 700;
}

.renewal-page-message {
  width: min(760px, 100%);
  justify-self: center;
}

.renewal-modal {
  width: min(900px, calc((100vw - 300px) / var(--content-scale)));
}

.renewal-modal-body {
  display: grid;
  gap: 16px;
  padding: 20px 22px 24px;
  overflow: visible;
}

.renewal-top-tip {
  border: 1px solid #cfe3d8;
  background: #f3fbf6;
  color: #17613b;
  padding: 13px 15px;
  font-weight: 800;
}

.renewal-form-grid {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(320px, 1fr);
  gap: 18px;
}

.renewal-form-grid label,
.renewal-number-input {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.renewal-form-grid select,
.renewal-number-input textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.renewal-form-grid select {
  height: 44px;
}

.renewal-number-input textarea {
  min-height: 168px;
  padding: 12px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
}

.renewal-price-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  border: 1px solid #e0ece6;
  background: #fbfffd;
  padding: 12px 14px;
}

.renewal-price-box span,
.renewal-price-box em {
  color: var(--muted);
  font-style: normal;
}

.renewal-price-box strong {
  color: var(--primary);
  font-size: 18px;
}

.renewal-validation {
  border: 1px solid #d8e5df;
  padding: 12px 14px;
  background: #fff;
}

.renewal-validation.ok {
  border-color: #bfe8cf;
  background: #f4fff8;
}

.renewal-validation.bad {
  border-color: #ffd5d5;
  background: #fff8f8;
}

.renewal-validation-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-weight: 800;
}

.renewal-validation.ok strong { color: #139454; }
.renewal-validation.bad strong { color: #c83232; }

.renewal-invalid-list {
  display: grid;
  gap: 6px;
  max-height: 110px;
  overflow: auto;
  margin-top: 8px;
}

.renewal-invalid-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #822;
}

.renewal-balance-warning {
  margin: 10px 0 0;
  color: #c83232;
  font-weight: 800;
}

.renewal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.renewal-actions button:disabled {
  border-color: #d7dedb;
  background: #eef2f0;
  color: #8c9993;
  cursor: not-allowed;
}

.renewal-history-card {
  width: 100%;
  justify-self: center;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 22px rgba(32, 120, 72, 0.08);
}

.renewal-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
}

.renewal-history-head h2 {
  margin: 0 0 14px;
}

.renewal-number-cell {
  min-width: 190px;
  max-width: 240px;
  vertical-align: top;
}

.renewal-number-list {
  display: grid;
  gap: 6px;
}

.renewal-number-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.renewal-number-scroll {
  max-height: 108px;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: #f8fcfa;
  padding: 6px 8px;
}

.renewal-number-scroll span {
  display: block;
  line-height: 1.65;
  white-space: nowrap;
  font-family: Consolas, "Courier New", monospace;
  color: #24334d;
}

.renewal-records-panel {
  display: grid;
  gap: 18px;
}

.renewal-record-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
}

.renewal-record-stats div {
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px 18px;
  box-shadow: 0 8px 20px rgba(32, 120, 72, 0.06);
}

.renewal-record-stats span {
  color: var(--muted);
  font-weight: 800;
}

.renewal-record-stats strong {
  display: block;
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 22px;
}

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

.renewal-record-table {
  min-width: 1280px;
  border-collapse: collapse;
}

.renewal-record-table th {
  background: #eef8f2;
  color: #355946;
}

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

@media (max-width: 900px) {
  .renewal-choice-wrap,
  .renewal-form-grid {
    grid-template-columns: 1fr;
  }
  .renewal-modal {
    width: calc(100vw - 28px);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  bottom: auto;
  min-height: 100vh;
  height: 100vh;
  padding: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  z-index: 1000;
}

.content-frame .modal-backdrop {
  height: calc((100vh - 58px) / var(--content-scale));
  min-height: calc((100vh - 58px) / var(--content-scale));
}

.modal-backdrop.open { display: flex; }
.order-modal { position: relative; z-index: 1001; width: min(1060px, calc((100vw - 260px) / var(--content-scale))); max-height: calc((100vh - 24px) / var(--content-scale)); overflow: visible; background: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24); display: flex; flex-direction: column; }
.order-modal.small-modal { width: min(860px, calc((100vw - 300px) / var(--content-scale))); }
.order-modal.order-details-modal { width: min(1074px, calc((100vw - 180px) / var(--content-scale))); }
body > .modal-backdrop.viewport-order-details {
  z-index: 1000;
  padding: 24px;
}
body > .modal-backdrop.viewport-order-details .legacy-order-modal {
  width: min(calc(1074px * var(--content-scale)), calc(100vw - 48px));
  max-height: calc(99vh - 48px);
}
body > .modal-backdrop.viewport-order-details .details-body {
  max-height: calc(99vh - 106px);
}
.modal-title { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: var(--topbar); color: #17492d; font-weight: 800; }
.close-btn { border: 0; background: transparent; color: #1d5738; font-size: 28px; cursor: pointer; }
.modal-body { max-height: none; overflow: visible; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(330px, 360px); gap: 18px; padding: 18px; }
.modal-left, .modal-right, .note-box { border: 1px solid var(--line); background: #fff; }
.modal-product { display: grid; grid-template-columns: 210px 1fr; gap: 20px; padding: 22px; }
.modal-product .product-icon { width: 190px; height: 190px; font-size: 66px; }
.detail-table { border-left: 1px solid var(--line); }
.detail-table div { min-height: 48px; display: grid; grid-template-columns: 90px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.detail-table span { color: var(--muted); }
.note-box { margin-top: 18px; min-height: 210px; padding: 24px; line-height: 1.8; }
.note-box p { white-space: pre-line; }
.modal-right { padding: 18px; }

.modal-backdrop.open,
.platform-notice-backdrop.open,
.notice-modal-backdrop.open,
.confirm-backdrop.open,
.legacy-modal-backdrop.open {
  animation: overlay-soft-in .14s ease-out;
}

.legacy-order-modal,
.platform-notice-modal,
.notice-detail-modal,
.confirm-modal {
  animation: modal-soft-in .16s cubic-bezier(.2, .74, .26, 1);
}

.modal-backdrop.modal-entry {
  animation: overlay-soft-in .18s ease-out;
}

.order-modal.modal-entry {
  animation: modal-soft-in .22s cubic-bezier(.2, .76, .24, 1);
}

.modal-backdrop.modal-stable,
.order-modal.modal-stable {
  animation: none !important;
}

#purchase-success-modal,
#purchase-success-modal .feedback-modal,
#purchase-error-modal,
#purchase-error-modal .feedback-modal,
#order-details-modal.viewport-order-details,
#order-details-modal.viewport-order-details .legacy-order-modal {
  animation: none !important;
}

@keyframes overlay-soft-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-soft-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.balance-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.balance-line strong { color: var(--accent); font-size: 22px; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0; }
.choice-row.single { grid-template-columns: 1fr; }
.choice-row button { height: 42px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.choice-row button.active { color: var(--primary); border-color: var(--primary); font-weight: 700; }
.choice-row button small { margin-left: 4px; color: #d05a1f; font-weight: 800; }
.choice-row button.active small { color: #b14415; }
.field { height: 48px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); margin-bottom: 14px; padding: 0 14px; color: var(--muted); }
.field.has-error { border-color: #ff5a5f; }
.field-error { margin: -10px 0 14px; color: #ff3b3f; font-size: 13px; line-height: 1.4; }
.field-error.hidden { display: none; }
.modal-input { width: 100%; border: 0; outline: none; }
.voice-price-note { margin-left: 6px; color: #d05a1f; font-weight: 800; }
.modal-control {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}
.modal-control select,
.modal-control input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}
.designated-input {
  width: 100%;
  min-height: 138px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  padding: 12px;
  resize: vertical;
  outline: none;
}
.inventory-status {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.inventory-status.danger,
.inventory-status.balance-warning {
  color: #d82727;
  font-weight: 700;
}
.inventory-status.success {
  color: var(--accent);
}
.inventory-status.balance-warning strong,
.inventory-status.balance-warning .money-highlight {
  color: var(--accent);
  font-weight: 800;
}
.designated-price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid #b7ecd0;
  background: #f3fbf6;
  color: #315b43;
  padding: 9px 11px;
  font-size: 14px;
}
.designated-price-line strong {
  color: #168552;
  font-size: 15px;
}
.designated-price-line em {
  margin-left: auto;
  color: #0f6c42;
  font-style: normal;
  font-weight: 700;
}
.designated-hint {
  margin-bottom: 12px;
  border: 1px dashed #a9dfc2;
  background: #f8fffb;
  color: #42614f;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
}
.option-block,
.inventory-picker {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}
.modal-right .option-block:not(.dropdown-block) > span {
  display: none;
}
.option-chips,
.segment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.option-chip,
.segment-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: #315342;
  padding: 0 10px;
  cursor: pointer;
}
.option-chip.active,
.segment-chip.active {
  border-color: var(--primary);
  background: #e9fbf0;
  color: var(--accent);
  font-weight: 800;
}
.dropdown-block {
  position: relative;
}
.select-trigger {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid #18bfa5;
  border-radius: 8px;
  background: #fff;
  color: #243247;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.select-trigger:hover,
.select-trigger:focus {
  border-color: #55d994;
  box-shadow: 0 8px 22px rgba(31, 130, 78, .08);
}
.select-trigger span:last-child {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.select-icon {
  color: #94a7bb;
  font-size: 20px;
  text-align: center;
}
.select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  z-index: 40;
  max-height: 318px;
  overflow: auto;
  border: 1px solid #ccebd8;
  border-top: 0;
  background: #fff;
  box-shadow: 0 14px 30px rgba(30, 101, 63, .16);
}
.select-menu.single {
  max-height: 190px;
}
.select-option {
  width: 100%;
  min-height: 36px;
  border: 0;
  background: #fff;
  color: #0d1f38;
  padding: 0 60px;
  text-align: left;
  cursor: pointer;
}
.select-option:hover:not(.disabled):not(:disabled),
#order-modal .select-option:hover:not(.disabled):not(:disabled) {
  background: #c9efd9;
  color: #103b25;
  box-shadow: inset 3px 0 0 #35b76d;
}
.select-option.active,
#order-modal .select-option.active {
  background: #dcf7e7;
  color: #103b25;
  font-weight: 800;
  box-shadow: inset 3px 0 0 #35b76d;
}
.select-option.disabled,
.select-option:disabled,
.select-option.disabled:hover,
.select-option:disabled:hover {
  background: #f1f5f3;
  color: #98a8a0;
  cursor: not-allowed;
}

#order-modal .order-modal {
  width: min(1220px, calc((100vw - 180px) / var(--content-scale)));
  font-size: 16.5px;
}

#order-modal .modal-title {
  height: 66px;
  padding: 0 26px;
  font-size: 18px;
}

#order-modal .close-btn {
  font-size: 32px;
}

#order-modal .modal-body {
  grid-template-columns: minmax(0, 1.58fr) minmax(390px, 420px);
  gap: 22px;
  padding: 22px;
}

#order-modal .modal-left,
#order-modal .modal-right,
#order-modal .note-box {
  font-size: 16.5px;
}

#order-modal .modal-product {
  grid-template-columns: 242px 1fr;
  gap: 24px;
  padding: 26px;
}

#order-modal .modal-product .product-icon {
  width: 218px;
  height: 218px;
  font-size: 76px;
}

#order-modal .detail-table div {
  min-height: 57px;
  grid-template-columns: 116px 1fr;
  column-gap: 18px;
  padding: 0 18px;
}

#order-modal .detail-table span {
  padding-left: 4px;
}

#order-modal .detail-table strong {
  font-size: 16.5px;
  line-height: 1.45;
}

#order-modal .note-box {
  margin-top: 22px;
  min-height: 242px;
  padding: 28px;
}

#order-modal .modal-right {
  padding: 22px;
}

#order-modal .balance-line {
  margin-bottom: 13px;
}

#order-modal .balance-line strong {
  font-size: 25px;
}

#order-modal .choice-row {
  gap: 10px;
  margin: 21px 0;
}

#order-modal .choice-row button {
  height: 48px;
  font-size: 16px;
}

#order-modal .field {
  height: 55px;
  margin-bottom: 16px;
  padding: 0 18px;
}

#order-modal .modal-input {
  font-size: 16.5px;
}

#order-modal .option-block,
#order-modal .inventory-picker {
  gap: 10px;
  margin-bottom: 15px;
  font-size: 16px;
}

#order-modal .select-trigger {
  min-height: 55px;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  padding: 12px 17px;
  font-size: 16.5px;
}

#order-modal .select-icon {
  font-size: 23px;
}

#order-modal .select-menu {
  max-height: 365px;
}

#order-modal .select-menu.single {
  max-height: 238px;
}

#order-modal .select-option {
  min-height: 44px;
  padding: 0 72px;
  font-size: 16px;
}

#order-modal .select-option.option-with-parts {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  white-space: nowrap;
}

#order-modal .select-option.option-with-parts .option-main {
  min-width: 110px;
  flex: 0 0 auto;
}

#order-modal .select-option.option-with-parts .option-stock {
  min-width: 92px;
  flex: 0 0 auto;
}

#order-modal .select-option.option-with-parts .option-adjust {
  min-width: 58px;
  flex: 0 0 auto;
  font-weight: 800;
}

#order-modal .select-option.segment-option-row .option-main {
  min-width: 104px;
}

#order-modal .select-option.segment-option-row .option-stock {
  min-width: 118px;
}

#order-modal .purchase-footer {
  gap: 10px;
  margin: 10px 0 25px;
}

#order-modal .purchase-hint {
  font-size: 15px;
}
.feedback-backdrop {
  z-index: 1200;
}
.feedback-modal {
  width: min(430px, calc(100vw - 40px));
  background: #fff;
  border: 1px solid #d8eee0;
  box-shadow: 0 18px 44px rgba(30, 83, 56, 0.22);
  padding: 30px 28px 26px;
  text-align: center;
}
.feedback-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}
.feedback-modal.success .feedback-mark { background: #35b96d; }
.feedback-modal.error .feedback-mark { background: #e05252; }
.feedback-modal h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 21px;
}
.feedback-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.renewal-confirm-modal {
  position: relative;
  text-align: left;
}

.renewal-confirm-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
}

.renewal-confirm-modal h3 {
  text-align: center;
  margin-right: 24px;
}

.renewal-confirm-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.renewal-confirm-summary div {
  border: 1px solid #d8eee0;
  background: #f6fbf8;
  padding: 12px;
}

.renewal-confirm-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.renewal-confirm-summary strong {
  color: var(--primary);
  font-size: 20px;
}

.renewal-confirm-modal p {
  text-align: center;
}
.feedback-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}
.option-empty {
  min-height: 46px;
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  background: #fbfffd;
  color: var(--muted);
  padding: 0 12px;
}
.option-empty.loading-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.option-empty.loading-inline::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(56, 182, 111, .22);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner-rotate .72s linear infinite;
}
@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}
.inventory-list {
  max-height: 150px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #fbfffc;
}
.inventory-number {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
  border: 1px solid #d7ecdf;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
}
.inventory-number small {
  color: var(--muted);
}
.buy-btn { width: 100%; height: 56px; border: 0; background: var(--primary); color: #fff; font-size: 17px; font-weight: 800; cursor: pointer; }
.buy-btn.disabled,
.buy-btn:disabled { background: #b9c7bd; color: #f4fff8; cursor: not-allowed; box-shadow: none; }
.buy-btn.loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #2fad6a;
  color: #fff;
  opacity: 0.94;
}
.buy-btn.loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinner-rotate .72s linear infinite;
}
.purchase-footer { display: grid; gap: 8px; margin: 8px 0 22px; }
.purchase-hint { min-height: 20px; font-size: 13px; line-height: 1.5; }
.purchase-hint.ok { color: #168552; }
.purchase-hint.danger { color: #d93030; }
.order-total-line strong { font-size: 18px; }
.service-lines { display: grid; gap: 14px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.55; }
.details-body {
  max-height: calc(88vh - 58px);
  overflow: auto;
  padding: 18px;
}
.legacy-order-modal { width: min(1220px, calc(100vw - 36px)); border-radius: 8px; }
.legacy-order-body { display: grid; gap: 16px; }
.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.6px;
}
.order-summary-grid div {
  min-height: 35px;
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.order-summary-grid div:nth-child(2n) { border-right: 0; }
.order-summary-grid span { color: var(--muted); }
.order-summary-grid strong { color: var(--text); overflow-wrap: anywhere; font-size: 13.6px; }
.details-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.details-copy-toast {
  min-height: 24px;
  justify-self: end;
  margin-top: -8px;
  color: #17824d;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.details-copy-toast.visible {
  opacity: .82;
  transform: translateY(0);
}
.legacy-number-box {
  min-height: 180px;
  max-height: 310px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fbfffc;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.6;
}
.legacy-number-line {
  display: block;
  min-width: 100%;
  width: max-content;
  padding: 2px 0;
}
.legacy-number-line span {
  white-space: nowrap;
  word-break: normal;
  overflow: visible;
  user-select: text;
}
.legacy-number-line small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

#order-details-modal.viewport-order-details .legacy-order-modal {
  width: min(calc(1074px * var(--content-scale)), calc(100vw - 48px));
  max-height: calc(99vh - 48px);
  font-size: 14.5px;
}

#order-details-modal.viewport-order-details .modal-title {
  height: 58px;
  padding: 0 23px;
  font-size: 16px;
}

#order-details-modal.viewport-order-details .close-btn {
  font-size: 29px;
}

#order-details-modal.viewport-order-details .details-body {
  max-height: calc(99vh - 106px);
  padding: 20px;
  gap: 16px;
}

#order-details-modal.viewport-order-details .legacy-order-body {
  gap: 16px;
}

#order-details-modal.viewport-order-details .order-summary-grid {
  font-size: 13.2px;
}

#order-details-modal.viewport-order-details .order-summary-grid div {
  min-height: 37px;
  grid-template-columns: 99px 1fr;
  gap: 12px;
  padding: 7px 14px;
}

#order-details-modal.viewport-order-details .order-summary-grid strong {
  font-size: 13.6px;
}

#order-details-modal.viewport-order-details .details-actions {
  gap: 11px;
  margin-bottom: 11px;
}

#order-details-modal.viewport-order-details .details-copy-toast {
  min-height: 21px;
  margin-top: -7px;
  font-size: 13.2px;
}

#order-details-modal.viewport-order-details .details-actions .small-btn {
  min-height: 35px;
  padding: 0 15px;
  font-size: 13.2px;
}

#order-details-modal.viewport-order-details .legacy-number-box {
  min-height: 202px;
  max-height: 317px;
  padding: 14px;
  font-size: 13.4px;
  line-height: 1.65;
}

#order-details-modal.viewport-order-details .legacy-number-line small {
  font-size: 12.5px;
}
.sms-log-section {
  display: grid;
  gap: 10px;
}
.sms-log-section h3 {
  margin: 4px 0 0;
  font-size: 16px;
}
.hidden-copy-source {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}
.receive-cell {
  max-width: 340px;
  display: grid;
  gap: 6px;
  line-height: 1.45;
  word-break: break-all;
}
.receive-cell a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.receive-cell small {
  color: var(--muted);
}
.inline-success {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #bdeed0;
  background: #effcf4;
  color: #167a47;
  font-weight: 800;
}

.muted { color: var(--muted); line-height: 1.7; }
.form-grid { display: grid; gap: 12px; margin: 14px 0; }
.form-grid label { color: var(--muted); }
.form-grid input { width: 100%; height: 42px; margin-top: 8px; border: 1px solid var(--line); padding: 0 12px; outline: none; }
.table-toolbar.compact { margin-bottom: 10px; }

.notice-items { display: grid; gap: 14px; }
.notice-item { padding: 18px; border: 1px solid var(--line); background: #fbfffc; }
.notice-title-item { padding: 0; }
.notice-title-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 18px;
  text-align: left;
  cursor: pointer;
}
.notice-title-button:hover { background: #f0fbf5; color: var(--accent); }
.notice-title-button span { color: var(--muted); font-size: 13px; }
.notice-item div { display: flex; justify-content: space-between; gap: 20px; }
.notice-item span { color: var(--muted); }
.notice-item p { margin-bottom: 0; line-height: 1.7; }
.platform-notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  background: rgba(24, 48, 38, 0.32);
  padding: 24px;
}
.platform-notice-modal {
  width: min(900px, calc(100vw - 48px));
  min-height: 540px;
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) auto;
  background: #fff;
  border: 1px solid #d9efe2;
  box-shadow: 0 18px 48px rgba(24, 83, 56, 0.26);
}
.platform-notice-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--topbar);
  color: #17492d;
  font-size: 22px;
  font-weight: 800;
}
.platform-notice-close {
  border: 0;
  background: transparent;
  color: #1d5738;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.platform-notice-body {
  overflow: auto;
  padding: 34px 32px 26px;
  color: #59636d;
  line-height: 1.8;
}
.platform-notice-body h2 {
  margin: 0 0 24px;
  text-align: center;
  color: #202b3d;
  font-size: 24px;
}
.platform-notice-time {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: #8390a3;
}
.platform-notice-content {
  display: grid;
  gap: 14px;
  text-align: center;
  font-size: 17px;
}
.platform-notice-content p { margin: 0; }
.platform-notice-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 28px 24px;
}
.notice-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: #293447;
}
.notice-switch input { display: none; }
.notice-switch span {
  width: 52px;
  height: 28px;
  position: relative;
  border-radius: 999px;
  background: #d9dee8;
  transition: background 0.2s ease;
}
.notice-switch span::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease;
}
.notice-switch input:checked + span { background: var(--primary); }
.notice-switch input:checked + span::after { transform: translateX(24px); }
.notice-switch em { font-style: normal; }

.support-panel { max-width: 1040px; margin-inline: auto; }
.support-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 18px; }
.support-card { min-height: 380px; padding: 22px; border: 1px solid var(--line); background: #fbfffc; display: flex; flex-direction: column; align-items: stretch; text-align: center; gap: 16px; text-decoration: none; color: inherit; box-shadow: 0 10px 28px rgba(44, 108, 72, .07); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.support-card-link { cursor: pointer; }
.support-card-link:hover { border-color: #57c788; box-shadow: 0 14px 30px rgba(41, 132, 84, .12); transform: translateY(-1px); }
.support-image-wrap { width: 100%; height: 260px; display: grid; place-items: center; border: 1px solid #d7ecdf; background: #fff; overflow: hidden; }
.support-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center center; border-radius: 6px; background: #fff; }
.support-image-wrap > img.support-image { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.support-image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; border: 1px dashed var(--line); color: #1d9a59; font-size: 44px; font-weight: 900; }
.support-card-body { width: 100%; display: grid; align-content: start; justify-items: center; gap: 9px; }
.support-card span { color: var(--muted); font-weight: 800; }
.support-card p { margin: 0; color: #546273; line-height: 1.65; }
.support-card strong { width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: #f6fbf8; font-size: 16px; color: #1d5738; overflow-wrap: anywhere; }
.support-card em { width: max-content; margin-top: 4px; padding: 6px 10px; background: #e5f7ed; color: #167a47; font-style: normal; font-weight: 800; }
.support-card-link strong { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1100px) {
  .support-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

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

.partner-panel { max-width: 1040px; margin-inline: auto; }
.partner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: center; gap: 28px; margin-top: 18px; }
.partner-card { min-height: 360px; padding: 22px; border: 1px solid var(--line); background: #fbfffc; display: flex; flex-direction: column; align-items: stretch; text-align: center; gap: 16px; color: inherit; text-decoration: none; box-shadow: 0 10px 28px rgba(44, 108, 72, .07); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.partner-card-link { cursor: pointer; }
.partner-card-link:hover { border-color: #57c788; box-shadow: 0 14px 30px rgba(41, 132, 84, .12); transform: translateY(-1px); }
.partner-image-wrap { width: 100%; height: 210px; display: grid; place-items: center; border: 1px solid #d7ecdf; background: #fff; overflow: hidden; }
.partner-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center center; background: #fff; }
.partner-image-wrap > img.partner-image { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.partner-image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #1d9a59; font-size: 36px; font-weight: 900; border: 1px dashed var(--line); }
.partner-card-body { width: 100%; min-width: 0; display: grid; justify-items: center; gap: 9px; align-content: start; }
.partner-card strong { color: #1d5738; font-size: 17px; overflow-wrap: anywhere; }
.partner-card p { margin: 0; color: #546273; line-height: 1.55; overflow-wrap: anywhere; }
.partner-card span { width: max-content; max-width: 100%; padding: 6px 10px; background: #e5f7ed; color: #167a47; font-weight: 800; }

@media (max-width: 1180px) {
  .partner-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

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

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background:
    radial-gradient(circle at 16% 16%, rgba(119, 222, 160, 0.16), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(58, 183, 111, 0.12), transparent 30%),
    linear-gradient(135deg, #f8fffb 0%, #eef9f3 48%, #e8f6ee 100%);
}

.auth-stage {
  width: min(1520px, calc(100vw - 96px));
  display: grid;
  grid-template-columns: minmax(320px, 0.52fr) minmax(760px, 1040px);
  gap: 46px;
  align-items: center;
}

.auth-api-wall {
  display: grid;
  gap: 26px;
  align-content: center;
  min-width: 0;
}

.auth-api-wall div {
  color: #168451;
  font-family: Consolas, "SFMono-Regular", "Courier New", monospace;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.auth-floating-logo {
  position: fixed;
  top: 26px;
  right: 34px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #155a36;
  font-size: 20px;
  font-weight: 900;
  animation: auth-logo-bounce 1.8s ease-in-out infinite;
}

.auth-floating-logo .logo-mark {
  width: 46px;
  height: 46px;
  box-shadow: 0 12px 28px rgba(35, 173, 96, 0.22);
}

.auth-shell {
  position: relative;
  width: min(1040px, calc(100vw - 72px));
  min-height: 620px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  zoom: var(--content-scale);
  overflow: hidden;
  border: 1px solid rgba(75, 170, 112, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(35, 105, 66, 0.12);
  -webkit-font-smoothing: subpixel-antialiased;
  text-rendering: optimizeLegibility;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.auth-shell::before {
  inset: 0;
  z-index: 8;
  background: rgba(255, 255, 255, .58);
}

.auth-shell::after {
  top: 50%;
  left: 50%;
  z-index: 9;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid rgba(56, 182, 111, .22);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner-rotate .72s linear infinite;
}

body.route-pending .auth-shell::before,
body.route-pending .auth-shell::after {
  opacity: 1;
}

body.route-switching .auth-shell > * {
  opacity: .58;
  transition: opacity .16s ease;
}

.auth-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  padding: 56px;
  background: linear-gradient(180deg, rgba(247, 255, 251, 0.96), rgba(236, 249, 242, 0.96));
  color: #173c2a;
  border-right: 1px solid rgba(91, 178, 125, 0.18);
  text-align: left;
}

.auth-logo-line {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 28px;
  font-weight: 900;
  color: #155a36;
}

.auth-logo-mark {
  width: 56px;
  height: 56px;
  border: 0;
  background: linear-gradient(135deg, #35b76d, #78d99f);
  box-shadow: 0 12px 30px rgba(35, 173, 96, 0.2);
}

.auth-intro h1 {
  max-width: 360px;
  margin: 0;
  font-size: 26px;
  line-height: 1.22;
  letter-spacing: 0;
  color: #1c4d33;
}

.auth-intro p {
  max-width: 430px;
  margin: -10px 0 0;
  color: #647568;
  font-size: 16px;
  line-height: 1.85;
}

.auth-service-list {
  width: 100%;
  display: grid;
  gap: 12px;
}

.auth-service-list span {
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(94, 196, 132, 0.28);
  border-radius: 10px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.68);
  color: #1d6a40;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(35, 105, 66, 0.06);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 48px 58px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 24% 18%, rgba(110, 212, 150, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 255, 251, 0.92));
  box-shadow: none;
}

.auth-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.auth-panel-head h2 {
  margin: 0 0 8px;
  color: #182a22;
  font-size: 30px;
  letter-spacing: 0;
}

.auth-panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-panel-head button {
  height: 44px;
  border: 1px solid #cfeedd;
  border-radius: 9px;
  background: #fff;
  color: #1e8650;
  padding: 0 20px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(35, 105, 66, 0.06);
  cursor: pointer;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #cfeedd;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.auth-tabs button {
  height: 52px;
  border: 0;
  background: transparent;
  color: #16804b;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tabs button.active {
  background: linear-gradient(135deg, #38bd73, #72d99c);
  color: #fff;
  box-shadow: 0 8px 18px rgba(42, 174, 103, 0.18);
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  color: #6b7480;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  height: 48px;
  border: 1px solid #d5eadf;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 0 17px;
  outline: none;
  box-shadow: 0 4px 12px rgba(35, 105, 66, 0.04);
}

.auth-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 182, 111, 0.12);
}

.auth-password-field {
  position: relative;
}

.auth-password-field input {
  padding-right: 58px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 40px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid #d8eee2;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f2fbf6);
  color: #6b8174;
  box-shadow: 0 4px 12px rgba(35, 105, 66, 0.06);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.auth-password-toggle:hover {
  transform: translateY(calc(-50% - 1px));
  border-color: #b9e8ca;
  background: linear-gradient(180deg, #ffffff, #edf9f2);
  color: #168451;
  box-shadow: 0 7px 16px rgba(35, 105, 66, 0.1);
}

.auth-password-toggle.active {
  border-color: #9fdfb9;
  background: linear-gradient(135deg, #eafaf1, #dff6e9);
  color: #168451;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 6px 14px rgba(35, 105, 66, 0.09);
}

.auth-eye-icon {
  position: relative;
  width: 21px;
  height: 14px;
  display: block;
}

.auth-eye-icon::before {
  content: "";
  position: absolute;
  inset: 1px 0;
  border: 2px solid currentColor;
  border-radius: 999px / 72%;
  opacity: .86;
}

.auth-eye-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6.5px;
  height: 6.5px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: currentColor;
}

.auth-password-toggle::after {
  content: "";
  position: absolute;
  width: 23px;
  height: 2px;
  transform: rotate(45deg);
  border-radius: 999px;
  background: currentColor;
  opacity: .72;
  box-shadow: 0 0 0 2px #f7fcf9;
  transition: opacity .16s ease, transform .16s ease;
}

.auth-password-toggle.active::after {
  opacity: 0;
  transform: rotate(45deg) scaleX(.55);
}

.captcha-row {
  display: grid;
  grid-template-columns: 132px 1fr 104px;
  gap: 12px;
}

.captcha-row strong {
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #d5eadf;
  border-radius: 10px;
  background: #ecf9f1;
  color: #149756;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(35, 105, 66, 0.04);
}

.captcha-row input {
  margin: 0;
}

.captcha-row button {
  height: 48px;
  border: 1px solid #cfeedd;
  border-radius: 10px;
  background: #fff;
  color: #1e8650;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(35, 105, 66, 0.04);
  cursor: pointer;
}

.captcha-row button:disabled {
  opacity: .62;
  cursor: wait;
}

.auth-submit {
  width: 100%;
  height: 52px;
  margin-top: 10px;
  border-radius: 10px;
  font-size: 17px;
  box-shadow: 0 10px 22px rgba(42, 174, 103, 0.2);
}
.auth-submit.loading,
.auth-submit:disabled {
  opacity: .72;
  cursor: wait;
}

.auth-bottom {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 26px;
}

.auth-bottom button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

@keyframes auth-logo-bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-8px); }
  70% { transform: translateY(2px); }
}

.wallet-tabs {
  display: flex;
  gap: 36px;
  padding: 0 0 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid #d9e4df;
}

.wallet-tabs button {
  height: 46px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #526a82;
  font-size: 20px;
  cursor: pointer;
}

.wallet-tabs button.active {
  border-color: #12bfa8;
  color: #08aa97;
  font-weight: 800;
}

.wallet-card {
  padding: 36px;
  background: #fff;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(29, 68, 102, 0.08);
}

.wallet-tip {
  padding: 26px;
  border: 1px solid #a9cbff;
  border-radius: 8px;
  background: #eef6ff;
  color: #0b48f0;
  line-height: 1.8;
  font-size: 16px;
}

.wallet-tip .danger,
.wallet-tip p.danger {
  color: #ef1d2f;
  font-weight: 800;
}

.recharge-form {
  display: grid;
  gap: 28px;
  margin-top: 42px;
  max-width: 720px;
}

.form-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 24px;
}

.form-row label {
  color: #223149;
  font-size: 18px;
  font-weight: 800;
}

.form-row em {
  color: #f23333;
  font-style: normal;
}

.pay-method {
  width: 240px;
  height: 58px;
  border: 2px solid #12bfa8;
  border-radius: 8px;
  background: #f5fffc;
  color: #087d71;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.pay-method span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-right: 8px;
  border-radius: 50%;
  background: #12bfa8;
  color: #fff;
}

.pay-method b {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  margin-left: 8px;
  border-radius: 50%;
  background: #12bfa8;
  color: #fff;
}

.amount-input {
  display: grid;
  grid-template-columns: 1fr 86px;
  width: 430px;
  height: 50px;
  border: 1px solid #d7e1ed;
  border-radius: 8px;
  overflow: hidden;
}

.amount-input.txid-input {
  grid-template-columns: 1fr;
  width: min(560px, 100%);
}

.amount-input input {
  border: 0;
  padding: 0 20px;
  outline: none;
}

.amount-input span {
  display: grid;
  place-items: center;
  background: #e4ebf4;
  color: #314c6d;
  font-weight: 800;
}

.submit-recharge {
  width: 140px;
  height: 50px;
  margin-left: 144px;
  border: 0;
  border-radius: 8px;
  background: #5547e8;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(85, 71, 232, 0.28);
  cursor: pointer;
}

.submit-recharge.loading,
.submit-recharge:disabled {
  opacity: .72;
  cursor: wait;
  box-shadow: none;
}

.recharge-active-card {
  padding: 28px;
}

.recharge-result-card {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
}

.recharge-result-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #25bf76;
  color: #fff;
  font-size: 52px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(37, 191, 118, 0.22);
}

.recharge-result-card.ended .recharge-result-icon {
  background: #e74b4b;
  box-shadow: 0 14px 30px rgba(231, 75, 75, 0.2);
}

.recharge-result-card h3 {
  margin: 0;
  color: #123424;
  font-size: 28px;
}

.recharge-result-card p {
  margin: 0;
  color: #607382;
  font-size: 17px;
  font-weight: 700;
}

.recharge-result-meta,
.recharge-result-txid {
  display: grid;
  gap: 6px;
  padding: 12px 18px;
  border: 1px solid #d8ede4;
  border-radius: 10px;
  background: #f7fffb;
}

.recharge-result-meta span,
.recharge-result-txid span {
  color: #6b7d8a;
  font-weight: 700;
}

.recharge-result-meta strong {
  color: #118f58;
  font-size: 24px;
  font-weight: 900;
}

.recharge-result-txid code {
  max-width: min(760px, 76vw);
  overflow-wrap: anywhere;
  color: #223149;
  font-family: Consolas, monospace;
}

.recharge-result-primary {
  width: auto;
  min-width: 130px;
  margin-left: 0;
  padding: 0 24px;
}

.recharge-active-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 28px;
  align-items: stretch;
}

.recharge-qr-panel {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  border: 1px solid #b8e8df;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6fffc 0%, #eefaf6 100%);
}

.recharge-qr {
  width: min(220px, 100%);
  aspect-ratio: 1;
  border: 10px solid #fff;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(18, 120, 96, 0.12);
}

.recharge-pay-amount,
.recharge-countdown {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.recharge-pay-amount span,
.recharge-countdown span {
  color: #5f7184;
  font-weight: 700;
}

.recharge-pay-amount strong {
  color: #e43b46;
  font-size: 28px;
  font-weight: 900;
}

.recharge-pay-amount em {
  color: #08aa97;
  font-size: 15px;
  font-style: normal;
}

.recharge-countdown strong {
  color: #223149;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
}

.recharge-payment-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.recharge-panel-title {
  color: #12223b;
  font-size: 22px;
  font-weight: 900;
}

.recharge-address-box {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d6e7e1;
  border-radius: 10px;
  background: #f8fbfa;
}

.recharge-address-box span {
  color: #5f7184;
  font-size: 14px;
  font-weight: 800;
}

.recharge-address-box code {
  color: #102033;
  font-size: 16px;
  font-weight: 800;
  word-break: break-all;
}

.recharge-copy-row,
.recharge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.recharge-copy-row button,
.secondary-action {
  min-width: 116px;
  height: 38px;
  border: 1px solid #12bfa8;
  border-radius: 8px;
  background: #f1fffb;
  color: #087d71;
  font-weight: 800;
  cursor: pointer;
}

.secondary-action {
  border-color: #d5e1de;
  background: #fff;
  color: #526a82;
}

.recharge-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px 20px 16px 34px;
  border-radius: 10px;
  background: #eef6ff;
  color: #223149;
  line-height: 1.6;
}

.recharge-steps b {
  color: #e43b46;
}

.waiting-recharge {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8e7;
  color: #9a6200;
  font-weight: 800;
}

.wallet-table-card {
  margin-bottom: 44px;
  overflow: hidden;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(29, 68, 102, 0.08);
}

.wallet-table-card th {
  height: 64px;
  background: #eef3f8;
  font-size: 18px;
}

.empty-cell {
  height: 130px;
  text-align: center;
  color: #526a82;
  font-size: 20px;
}

.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.finance-card {
  min-height: 130px;
  padding: 34px;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(38, 57, 77, 0.18);
}

.finance-card strong {
  display: block;
  margin-bottom: 18px;
  font-size: 28px;
  font-weight: 900;
}

.finance-card span {
  font-size: 16px;
  font-weight: 700;
}

.finance-card.green { background: #2ecc71; }
.finance-card.orange { background: #f39c12; }
.finance-card.purple { background: #9b59b6; }

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 18px;
}

.profile-card {
  min-height: 260px;
}

.profile-card h2 {
  margin: 0 0 14px;
  color: #214331;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.profile-head p {
  margin: 0;
  color: var(--muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card.compact {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
}

.stat-card.compact .stat-label {
  flex: 0 0 auto;
  line-height: 1.25;
}

.stat-card.compact .stat-value {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  line-height: 1;
  transform: translateY(1px);
}

.stat-card.compact.green .stat-value { color: #1dbb70; }
.stat-card.compact.blue .stat-value { color: #5d78e8; }
.stat-card.compact.orange .stat-value { color: #ef8a2e; }

.profile-table {
  display: grid;
  border: 1px solid var(--line);
  background: #fbfffc;
}

.profile-table div {
  min-height: 50px;
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.profile-table div:last-child {
  border-bottom: 0;
}

.profile-table span {
  color: var(--muted);
}

.profile-table strong {
  color: #263247;
}

.profile-form .btn {
  width: 180px;
}

.inline-error,
.inline-success {
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #ffd2d2;
  background: #fff7f7;
  color: #b42318;
  line-height: 1.5;
}

.inline-success {
  border-color: #bcebd1;
  background: #f1fff7;
  color: #138c50;
}

@media (max-width: 1180px) and (min-width: 821px) {
  :root {
    --sidebar-width: 220px;
  }

  .brand {
    padding: 0 20px;
    gap: 12px;
  }

  .brand-name {
    font-size: 30px;
  }

  .logo-mark {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    font-size: 31px;
  }

  .topbar {
    padding: 0 14px;
  }

  .top-actions {
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
  }

  .language-toggle {
    padding: 0 14px;
    white-space: nowrap;
  }

  .content {
    width: calc(100% - 28px);
    margin: 14px;
  }

  .notice {
    padding: 12px 17px;
    margin-bottom: 10px;
  }

  .store-toolbar {
    grid-template-columns: minmax(250px, 300px) minmax(190px, 230px) minmax(280px, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }

  .store-toolbar.real-toolbar {
    grid-template-columns: minmax(250px, 300px) minmax(300px, 420px);
  }

  .store-toolbar.virtual-toolbar {
    grid-template-columns: minmax(250px, 300px) minmax(190px, 230px) minmax(280px, 1fr);
  }

  .country-select,
  .search-row,
  .toolbar-segmented {
    height: 48px;
  }

  .btn {
    height: 44px;
    padding: 0 16px;
  }

  .products-scroll {
    padding: 12px 16px 18px;
  }

  .products {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 18px;
  }

  .product-card {
    min-width: 0;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 18px;
  }

  .product-icon {
    width: 100px;
    height: 100px;
    font-size: 38px;
  }

  .product-name {
    font-size: 20px;
  }
}

@media (max-width: 980px) and (min-width: 821px) {
  :root {
    --sidebar-width: 200px;
  }

  .brand {
    height: 96px;
    padding: 0 16px;
  }

  .brand-name {
    font-size: 26px;
  }

  .logo-mark {
    width: 52px;
    height: 52px;
    font-size: 27px;
  }

  .menu-group.single > button {
    height: 58px;
    padding-left: 42px;
    font-size: 17px;
  }

  .store-toolbar,
  .store-toolbar.virtual-toolbar {
    grid-template-columns: minmax(220px, 260px) minmax(170px, 210px) minmax(250px, 1fr);
  }

  .store-toolbar.real-toolbar {
    grid-template-columns: minmax(220px, 260px) minmax(270px, 380px);
  }

  .country-select,
  .search-row,
  .toolbar-segmented {
    padding-left: 14px;
    padding-right: 4px;
  }

  .products {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }

  .product-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 15px;
  }

  .product-icon {
    width: 88px;
    height: 88px;
    font-size: 34px;
  }

  .product-name {
    font-size: 18px;
  }
}

@media (max-width: 900px) {
  .recharge-active-grid { grid-template-columns: 1fr; }
  .recharge-active-card { padding: 18px; }
  .recharge-form { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 10px; }
  .amount-input { width: 100%; }
  .submit-recharge { margin-left: 0; }
  .order-summary-grid { grid-template-columns: 1fr; }
  .order-summary-grid div { border-right: 0; grid-template-columns: 96px 1fr; }
  .details-actions { justify-content: stretch; flex-wrap: wrap; }
  .details-actions .small-btn { flex: 1; min-width: 120px; }
  .legacy-number-line { padding: 2px 0; }
}

/* kksms mobile responsive patch */
@media (max-width: 820px) {
  :root {
    --content-scale: 1;
  }

  html,
  body {
    width: 100%;
    min-width: 0;
    height: 100%;
    overflow: hidden;
  }

  body {
    min-width: 0;
    font-size: 14px;
  }

  .app-shell {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
    grid-template-rows: 0 minmax(0, 1fr);
  }

  .sidebar {
    position: relative;
    z-index: 5;
    width: 100%;
    height: auto;
    max-height: 38dvh;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-shell.sidebar-collapsed .sidebar {
    max-height: 0;
    transform: translateY(-100%);
  }

  .brand {
    grid-column: 1 / -1;
    height: 64px;
    padding: 0 14px;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--sidebar-bg);
  }

  .logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 22px;
  }

  .brand-name {
    font-size: 24px;
  }

  .menu-group {
    border-top: 0;
    border-bottom: 1px solid rgba(64, 184, 116, 0.12);
  }

  .menu-group.single > button,
  .submenu button {
    height: 44px;
    padding: 0 8px;
    justify-content: center;
    text-align: center;
    font-size: 15px;
    white-space: nowrap;
  }

  .menu-group.single > button {
    border-left: 0;
  }

  .menu-group.single.active > button {
    border-left: 0;
    box-shadow: inset 0 -3px 0 var(--green);
  }

  .main {
    min-width: 0;
    min-height: 0;
    height: auto;
  }

  .topbar {
    height: 50px;
    min-height: 50px;
    padding: 0 10px;
  }

  .hamburger {
    width: 34px;
    font-size: 20px;
  }

  .top-actions {
    gap: 8px;
  }

  .top-actions button,
  .language-toggle,
  .logout-btn {
    height: 34px;
    padding: 0 12px;
    min-width: 0;
    font-size: 14px;
  }

  .user-chip {
    width: 36px;
    height: 36px;
  }

  .breadcrumb {
    min-height: 36px;
    height: auto;
    padding: 7px 12px;
    flex-wrap: wrap;
    font-size: 13px;
  }

  .content-frame {
    width: 100%;
    height: 100%;
    transform: none;
    transform-origin: center;
    overflow: auto;
  }

  .content {
    width: 100%;
    min-width: 0;
    padding: 12px;
    margin: 0;
  }

  .panel,
  .wallet-card,
  .profile-card,
  .notice-card,
  .admin-card {
    padding: 14px;
  }

  .section-title,
  .page-title,
  .wallet-title,
  .profile-title {
    font-size: 20px;
  }

  .notice-box,
  .tips-box,
  .number-tip {
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.55;
  }

  .notice-box p,
  .tips-box p,
  .number-tip p {
    margin: 6px 0;
  }

  .number-content {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .number-store-page {
    height: auto;
    min-height: 0;
    overflow: visible;
    gap: 12px;
  }

  .store-panel {
    min-height: 0;
    padding: 12px;
  }

  .store-toolbar,
  .real-toolbar,
  .virtual-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .country-select,
  .card-type-switch,
  .search-row,
  .store-search {
    width: 100%;
    min-width: 0;
  }

  .country-select {
    height: 42px;
  }

  .card-type-switch {
    height: auto;
    grid-template-columns: repeat(2, 1fr);
  }

  .card-type-switch button {
    height: 40px;
    font-size: 14px;
  }

  .search-row,
  .store-search {
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .search-row input,
  .store-search input {
    min-width: 0;
    height: 42px;
    font-size: 14px;
  }

  .search-row button,
  .store-search button {
    height: 42px;
    min-width: 64px;
    padding: 0 12px;
    font-size: 14px;
  }

  .products-scroll {
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .product-grid,
  .products-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .product-card,
  .app-card {
    min-width: 0;
    min-height: 114px;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .product-logo,
  .app-logo {
    width: 78px;
    height: 78px;
    font-size: 36px;
    border-radius: 9px;
  }

  .product-name,
  .app-name {
    font-size: 18px;
    line-height: 1.25;
  }

  .product-meta,
  .app-meta,
  .price-line,
  .stock-line {
    font-size: 14px;
    line-height: 1.55;
  }

  .modal-backdrop,
  .legacy-modal-backdrop,
  .notice-modal-backdrop,
  .confirm-backdrop {
    padding: 8px;
    align-items: center;
    justify-content: center;
  }

  .purchase-modal,
  .order-modal,
  .legacy-order-modal,
  .platform-notice-modal,
  .notice-detail-modal,
  .feedback-modal,
  .confirm-modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    margin: 0;
    overflow: hidden;
  }

  .modal-header,
  .legacy-modal-header,
  .platform-notice-header,
  .notice-detail-header {
    min-height: 52px;
    padding: 0 14px;
  }

  .modal-title,
  .legacy-modal-title,
  .platform-notice-title,
  .notice-detail-title {
    font-size: 18px;
  }

  .modal-body,
  .legacy-modal-body,
  .platform-notice-body,
  .notice-detail-body {
    max-height: calc(100dvh - 78px);
    padding: 14px;
    overflow: auto;
  }

  .purchase-body,
  .order-detail-grid,
  .legacy-detail-grid,
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .purchase-product,
  .modal-product {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
  }

  .option-row,
  .form-line,
  .purchase-line {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .option-control,
  .select-control,
  .input-control,
  .quantity-control {
    width: 100%;
    min-width: 0;
  }

  .dropdown-panel,
  .option-dropdown {
    max-height: 42dvh;
  }

  .selected-prefixes,
  .selected-tags {
    max-height: 120px;
    overflow-y: auto;
  }

  .modal-actions,
  .legacy-actions,
  .details-actions {
    gap: 8px;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .modal-actions button,
  .legacy-actions button,
  .details-actions button {
    flex: 1 1 120px;
    min-width: 0;
  }

  .detail-table,
  .order-detail-table,
  .legacy-detail-table {
    font-size: 13px;
  }

  .detail-table div,
  .order-detail-table div,
  .legacy-detail-table div {
    min-height: 34px;
    grid-template-columns: 84px minmax(0, 1fr);
    padding: 6px 8px;
  }

  .card-key-box,
  .legacy-cardkeys,
  .sms-link-box {
    max-height: 36dvh;
    overflow: auto;
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
  }

  .stats-grid,
  .stats,
  .finance-summary,
  .wallet-summary,
  .profile-grid,
  .profile-stats,
  .renewal-record-stats,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .wallet-tabs,
  .renewal-tabs,
  .notice-tabs {
    overflow-x: auto;
    white-space: nowrap;
    gap: 18px;
  }

  .wallet-tabs button,
  .renewal-tabs button,
  .notice-tabs button {
    flex: 0 0 auto;
  }

  .table-toolbar,
  .orders-toolbar,
  .records-toolbar,
  .admin-heading {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .table-search,
  .records-search,
  .admin-search {
    width: 100%;
  }

  .table-wrap,
  .records-table-wrap,
  .admin-table-wrap {
    overflow-x: auto;
  }

  table,
  .records-table,
  .orders-table,
  .admin-table {
    min-width: 720px;
  }

  .recharge-active-grid,
  .recharge-form,
  .wallet-form,
  .profile-table div {
    grid-template-columns: 1fr;
  }

  .wallet-tip {
    padding: 12px;
    font-size: 14px;
  }

  .amount-input,
  .submit-recharge,
  .profile-form .btn {
    width: 100%;
  }

  .support-grid,
  .partner-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .support-card,
  .partner-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .support-image,
  .partner-image {
    height: 220px;
  }

  .renewal-page {
    padding: 0;
  }

  .renewal-layout,
  .renewal-form-grid {
    grid-template-columns: 1fr;
  }

  .renewal-panel {
    padding: 14px 0 0;
    box-shadow: none;
    background: transparent;
  }

  .renewal-inline-card {
    padding: 12px;
  }

  .auth-page {
    padding: 78px 14px 14px;
    align-items: flex-start;
    overflow: auto;
  }

  .auth-stage {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .auth-api-wall {
    gap: 12px;
  }

  .auth-api-wall div {
    font-size: 12.5px;
    padding: 0 4px;
  }

  .auth-floating-logo {
    top: 16px;
    right: 18px;
    font-size: 18px;
  }

  .auth-floating-logo .logo-mark {
    width: 40px;
    height: 40px;
  }

  .auth-shell {
    width: 100%;
    min-height: auto;
    display: block;
    border-radius: 14px;
  }

  .auth-intro,
  .auth-panel {
    padding: 22px;
  }

  .auth-intro {
    align-items: flex-start;
    text-align: left;
  }

  .auth-panel {
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .auth-title {
    font-size: 28px;
  }

  .captcha-row {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 8px;
  }

  .captcha-row button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 42dvh;
  }

  .brand {
    height: 58px;
  }

  .brand-name {
    font-size: 22px;
  }

  .content {
    padding: 10px;
  }

  .topbar {
    padding: 0 8px;
  }

  .top-actions {
    gap: 6px;
  }

  .logout-btn,
  .language-toggle {
    padding: 0 9px;
    font-size: 13px;
  }

  .product-card,
  .app-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    min-height: 104px;
  }

  .product-logo,
  .app-logo {
    width: 64px;
    height: 64px;
    font-size: 30px;
  }

  .product-name,
  .app-name {
    font-size: 16px;
  }

  .search-row,
  .store-search {
    grid-template-columns: minmax(0, 1fr) 58px 58px;
  }

  .search-row button,
  .store-search button {
    min-width: 0;
    padding: 0 8px;
  }

  .support-image,
  .partner-image {
    height: 190px;
  }
}

@media (max-width: 820px) {
  .main {
    height: 100%;
    min-height: 0;
  }

  .content-frame .modal-backdrop,
  .modal-backdrop {
    height: 100dvh;
    min-height: 100dvh;
    padding: 8px;
    overflow: hidden;
  }

  .content-frame {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
  }

  .store-toolbar.real-toolbar,
  .store-toolbar.virtual-toolbar {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .order-modal,
  .order-modal.small-modal,
  .order-modal.order-details-modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    margin: 0;
    overflow: hidden;
  }

  .modal-body {
    width: 100%;
    min-width: 0;
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    overflow-x: hidden;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .modal-left,
  .modal-right,
  .note-box {
    min-width: 0;
    width: 100%;
  }

  .modal-product {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .modal-product .product-icon {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }

  .modal-right {
    padding: 12px;
  }

  .products {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .product-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 112px;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .product-card > div {
    min-width: 0;
  }

  .product-icon {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    border-width: 3px;
    font-size: 30px;
  }

  .product-icon.product-image {
    padding: 8px;
  }

  .product-name {
    max-width: 100%;
    font-size: 17px;
    line-height: 1.25;
    word-break: break-word;
  }

  .product-country,
  .meta-row {
    min-width: 0;
    font-size: 14px;
    line-height: 1.45;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .product-card {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .product-icon {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }
}

/* Mobile hardening: user-facing pages must scroll and fit narrow browsers. */
@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
  }

  #app {
    width: 100%;
    min-height: 100svh;
    overflow: visible;
  }

  .auth-page {
    min-height: 100svh;
    height: auto;
    align-items: flex-start;
    justify-content: center;
    padding: 76px 12px 18px;
    overflow: visible;
  }

  .auth-floating-logo {
    top: 12px;
    right: 12px;
    font-size: 17px;
  }

  .auth-floating-logo .logo-mark {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .auth-shell {
    width: 100%;
    max-width: 520px;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    zoom: 1 !important;
    overflow: visible;
    border-radius: 14px;
  }

  .auth-intro,
  .auth-panel {
    padding: 20px;
  }

  .auth-intro {
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(91, 178, 125, 0.18);
  }

  .auth-intro h1 {
    max-width: none;
    font-size: 21px;
  }

  .auth-intro p {
    max-width: none;
    font-size: 14px;
    line-height: 1.65;
  }

  .auth-service-list {
    gap: 8px;
  }

  .auth-service-list span {
    min-height: 40px;
    padding: 8px 12px;
    line-height: 1.35;
  }

  .auth-panel-head {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }

  .auth-panel-head h2 {
    font-size: 24px;
  }

  .auth-panel-head button {
    width: 100%;
  }

  .auth-tabs button,
  .auth-submit {
    height: 48px;
  }

  .auth-form {
    gap: 14px;
  }

  .auth-form input,
  .captcha-row strong,
  .captcha-row button {
    height: 46px;
  }

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

  .captcha-row button {
    width: 100%;
  }

  .app-shell,
  .app-shell.sidebar-collapsed {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 100svh;
    display: block;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: 42svh;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
  }

  .app-shell.sidebar-collapsed .sidebar {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: none;
  }

  .brand {
    grid-column: 1 / -1;
    height: 58px;
    padding: 0 12px;
    gap: 10px;
    background: rgba(255, 255, 255, 0.42);
  }

  .brand .logo-mark {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .brand-name {
    font-size: 22px;
  }

  .menu-group {
    border-top: 0;
  }

  .menu-group.single > button,
  .submenu button {
    height: 42px;
    padding: 0 6px;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
  }

  .main {
    height: auto;
    min-height: 100svh;
    display: block;
    overflow: visible;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    height: 50px;
    padding: 0 10px;
  }

  .top-actions {
    min-width: 0;
    gap: 6px;
  }

  .language-toggle {
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .breadcrumb {
    height: auto;
    min-height: 36px;
    padding: 7px 12px;
    flex-wrap: wrap;
    font-size: 13px;
  }

  .content-frame,
  .number-content-frame {
    flex: none;
    width: 100%;
    height: auto;
    min-height: calc(100svh - 50px);
    transform: none;
    overflow: visible;
  }

  .content,
  .number-content {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 12px;
    overflow: visible;
  }

  .panel {
    padding: 14px;
  }

  .number-store-page,
  .store-panel,
  .products-scroll {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .notice {
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.6;
  }

  .store-toolbar,
  .store-toolbar.real-toolbar,
  .store-toolbar.virtual-toolbar {
    width: 100%;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
  }

  .country-select,
  .search-row,
  .toolbar-segmented,
  .table-search {
    width: 100%;
    min-width: 0;
  }

  .country-select,
  .toolbar-segmented {
    height: 46px;
  }

  .search-row {
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 4px;
  }

  .search-row input {
    height: 40px;
  }

  .search-row .btn {
    height: 40px;
    min-width: 58px;
    padding: 0 10px;
  }

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

  .product-card {
    min-height: 112px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .product-card:hover,
  .product-card.selected {
    transform: none;
  }

  .product-icon {
    width: 66px;
    height: 66px;
    border-radius: 10px;
    border-width: 3px;
    font-size: 29px;
  }

  .product-icon.product-image {
    padding: 8px;
  }

  .product-name {
    margin-bottom: 8px;
    font-size: 17px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .product-country,
  .meta-row {
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 14px;
    line-height: 1.45;
  }

  .stats,
  .finance-summary,
  .profile-grid,
  .profile-stats,
  .renewal-record-stats {
    grid-template-columns: 1fr;
  }

  .table-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .orders-toolbar-left {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .order-kind-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .order-kind-filter {
    width: 100%;
    min-width: 0;
    height: 44px;
  }

  .orders-pagination {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .page-buttons,
  .page-number-list {
    justify-content: flex-start;
  }

  .page-size-control {
    width: 100%;
    justify-content: space-between;
  }

  .table-toolbar h2 {
    margin: 0;
  }

  .table-search {
    height: 44px;
  }

  .table-scroll,
  .wallet-table-card,
  .renewal-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-scroll table,
  .wallet-table-card table,
  .renewal-record-table {
    min-width: 760px;
  }

  th,
  td {
    height: 50px;
    padding: 0 12px;
    font-size: 13px;
  }

  .wallet-tabs,
  .renewal-tabs {
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wallet-tabs button,
  .renewal-tabs button {
    flex: 0 0 auto;
    min-width: max-content;
    font-size: 16px;
  }

  .wallet-card,
  .profile-card {
    padding: 16px;
    border-radius: 8px;
  }

  .wallet-tip {
    padding: 14px;
    font-size: 14px;
  }

  .recharge-form {
    max-width: none;
    gap: 18px;
    margin-top: 22px;
  }

  .form-row,
  .recharge-active-grid,
  .renewal-form-grid,
  .profile-table div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .amount-input,
  .pay-method,
  .submit-recharge,
  .profile-form .btn {
    width: 100%;
    margin-left: 0;
  }

  .finance-card {
    min-height: 110px;
    padding: 22px;
  }

  .profile-head {
    align-items: flex-start;
  }

  .stat-card.compact {
    justify-content: space-between;
    gap: 12px;
  }

  .profile-table div {
    padding: 10px 12px;
  }

  .profile-table strong {
    overflow-wrap: anywhere;
  }

  .renewal-page {
    min-height: 0;
    gap: 14px;
  }

  .renewal-notice {
    padding: 14px;
    line-height: 1.65;
  }

  .renewal-inline-head {
    display: grid;
    gap: 8px;
  }

  .renewal-record-stats div,
  .renewal-history-card {
    box-shadow: none;
  }

  .support-grid,
  .partner-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .support-card,
  .partner-card {
    min-height: 0;
    padding: 16px;
  }

  .support-image-wrap,
  .partner-image-wrap {
    height: 190px;
  }

  .platform-notice-backdrop,
  .modal-backdrop,
  .content-frame .modal-backdrop {
    height: 100dvh;
    min-height: 100dvh;
    padding: 8px;
    align-items: flex-start;
    overflow: auto;
  }

  .order-modal,
  .order-modal.small-modal,
  .order-modal.order-details-modal,
  .legacy-order-modal,
  .platform-notice-modal,
  .notice-detail-modal,
  #order-modal .order-modal,
  #order-details-modal.viewport-order-details .legacy-order-modal,
  body > .modal-backdrop.viewport-order-details .legacy-order-modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    margin: 0 !important;
    overflow: hidden;
  }

  .modal-title,
  #order-modal .modal-title,
  #order-details-modal.viewport-order-details .modal-title,
  .platform-notice-title {
    min-height: 54px;
    height: auto;
    padding: 10px 14px;
    font-size: 17px;
  }

  .modal-body,
  #order-modal .modal-body,
  .details-body,
  #order-details-modal.viewport-order-details .details-body,
  .platform-notice-body {
    width: 100%;
    max-height: calc(100dvh - 70px) !important;
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 12px;
    padding: 12px !important;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-product,
  #order-modal .modal-product {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    gap: 12px;
    padding: 12px !important;
  }

  .modal-product .product-icon,
  #order-modal .modal-product .product-icon {
    width: 62px;
    height: 62px;
    font-size: 28px;
  }

  .modal-left,
  .modal-right,
  .note-box,
  #order-modal .modal-left,
  #order-modal .modal-right,
  #order-modal .note-box {
    width: 100%;
    min-width: 0;
    font-size: 14px;
  }

  .modal-right,
  #order-modal .modal-right {
    padding: 12px;
  }

  .detail-table {
    border-left: 0;
  }

  .detail-table div,
  #order-modal .detail-table div {
    grid-template-columns: 84px minmax(0, 1fr);
    min-height: 40px;
    column-gap: 10px;
    padding: 7px 10px;
  }

  .detail-table strong,
  #order-modal .detail-table strong,
  .order-summary-grid strong {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .choice-row,
  #order-modal .choice-row {
    margin: 14px 0;
  }

  .select-trigger,
  #order-modal .select-trigger {
    min-height: 48px;
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 10px 12px;
    font-size: 14px;
  }

  .select-menu,
  #order-modal .select-menu {
    max-height: 42dvh;
  }

  .select-option,
  #order-modal .select-option {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }

  #order-modal .select-option.option-with-parts {
    gap: 8px;
    padding: 8px 12px;
    white-space: normal;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .details-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .details-actions .small-btn {
    flex: 1 1 120px;
  }

  .order-summary-grid {
    grid-template-columns: 1fr;
    font-size: 13px;
  }

  .order-summary-grid div,
  #order-details-modal.viewport-order-details .order-summary-grid div {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 40px;
    padding: 8px 10px;
    border-right: 0;
  }

  .legacy-number-box,
  #order-details-modal.viewport-order-details .legacy-number-box {
    min-height: 180px;
    max-height: 42dvh;
    padding: 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 68px 10px 14px;
  }

  .auth-intro,
  .auth-panel {
    padding: 16px;
  }

  .auth-intro p {
    display: none;
  }

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

  .top-actions {
    gap: 4px;
  }

  .language-toggle {
    padding: 0 8px;
    font-size: 12px;
  }

  .avatar {
    width: 30px;
    height: 30px;
  }

  .content,
  .number-content {
    padding: 10px;
  }

  .search-row {
    grid-template-columns: minmax(0, 1fr) 56px 56px;
  }

  .search-row .btn {
    min-width: 0;
    padding: 0 6px;
  }

  .product-card {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .product-icon {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }

  .modal-product,
  #order-modal .modal-product {
    grid-template-columns: 60px minmax(0, 1fr) !important;
  }

  .modal-product .product-icon,
  #order-modal .modal-product .product-icon {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }
}

/* Fixed record surfaces: headers and pagination stay visible; only rows scroll. */
.content:has(.record-fixed-page),
.content:has(.wallet-finance-mode),
.content:has(.renewal-records-fixed-page) {
  height: calc((100vh - 58px) / var(--content-scale) - 44px - 36px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.record-fixed-page,
.wallet-finance-mode,
.renewal-records-fixed-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.record-fixed-page .table-toolbar,
.record-fixed-page > .inline-error,
.record-fixed-page > .inline-success,
.wallet-finance-mode .wallet-tabs,
.wallet-finance-mode > .inline-error,
.wallet-finance-mode .finance-summary,
.renewal-records-fixed-page .renewal-notice,
.renewal-records-fixed-page .renewal-tabs,
.renewal-records-fixed-page .renewal-page-message,
.renewal-records-fixed-page .renewal-record-stats,
.renewal-history-head {
  flex: 0 0 auto;
}

.record-list-shell,
.renewal-records-fixed-page .renewal-records-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.record-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.record-table-scroll table {
  min-width: 980px;
}

.record-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.record-list-shell > .orders-pagination {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 0 18px;
  border-top: 1px solid #eef4f0;
  background: #fff;
}

.finance-record-shell,
.wallet-finance-mode .wallet-table-card,
.renewal-records-fixed-page .renewal-history-card {
  margin-bottom: 0;
}

.finance-record-shell > .orders-pagination,
.renewal-history-card > .orders-pagination {
  padding: 14px 18px 21px;
}

.finance-record-scroll table {
  min-width: 980px;
}

.renewal-records-fixed-page .renewal-records-panel {
  gap: 18px;
}

.renewal-records-fixed-page .renewal-notice {
  max-height: 74px;
  margin-bottom: 0;
  padding: 10px 14px;
  overflow: auto;
  font-size: 13px;
}

.renewal-records-fixed-page .renewal-notice p {
  margin-bottom: 4px;
}

.renewal-records-fixed-page .renewal-record-stats div {
  padding: 12px 16px;
}

.renewal-records-fixed-page .renewal-record-stats strong {
  margin-top: 4px;
  font-size: 20px;
}

.renewal-records-fixed-page .renewal-history-head {
  padding: 12px 18px 0;
}

.renewal-records-fixed-page .renewal-history-card {
  flex: 1 1 auto;
  min-height: 0;
}

.renewal-records-fixed-page .renewal-table-scroll {
  width: 100%;
}

.renewal-records-fixed-page .renewal-record-table {
  min-width: 1280px;
}

@media (max-width: 820px) {
  .content:has(.record-fixed-page),
  .content:has(.wallet-finance-mode),
  .content:has(.renewal-records-fixed-page) {
    height: calc(100svh - 50px - 36px - 24px);
    min-height: 540px;
    overflow: hidden;
  }

  .record-fixed-page,
  .wallet-finance-mode,
  .renewal-records-fixed-page {
    height: 100%;
  }

  .record-list-shell > .orders-pagination {
    padding: 12px 0 16px;
  }

  .finance-record-shell > .orders-pagination,
  .renewal-history-card > .orders-pagination {
    padding: 12px 12px 16px;
  }

  .record-table-scroll table,
  .finance-record-scroll table,
  .renewal-records-fixed-page .renewal-record-table {
    min-width: 760px;
  }
}
