:root {
  --ink: #182226;
  --ink-strong: #0f1719;
  --muted: #627276;
  --subtle: #899699;
  --paper: #ffffff;
  --surface: #ffffff;
  --soft: #f5f8f7;
  --soft-strong: #eef3f1;
  --line: #dfe7e4;
  --line-strong: #cbd7d3;
  --teal: #0b6e66;
  --teal-dark: #07544e;
  --teal-soft: #eaf5f2;
  --orange: #d4682d;
  --orange-soft: #fff5ed;
  --red: #b43b3b;
  --red-soft: #fff3f1;
  --shadow: 0 14px 34px rgb(24 34 38 / 7%);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a,
button {
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header,
.admin-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--teal);
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link,
.quiet-link {
  color: #405054;
  font-size: 13px;
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-link:hover,
.quiet-link:hover {
  color: var(--teal);
}

.quiet-link {
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line-strong);
}

.service-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #218c67;
  box-shadow: 0 0 0 4px rgb(33 140 103 / 10%);
}

.service-state.is-offline .state-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgb(180 59 59 / 10%);
}

main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel-kicker {
  color: var(--orange);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.catalog-section {
  padding: 46px 0 72px;
  scroll-margin-top: 82px;
}

.catalog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.catalog-heading h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #218c67;
  box-shadow: 0 0 0 4px rgb(33 140 103 / 9%);
}

.sync-state.is-loading .sync-dot {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgb(212 104 45 / 10%);
  animation: sync-pulse 1.1s ease-in-out infinite;
}

.sync-state.is-error .sync-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgb(180 59 59 / 10%);
}

@keyframes sync-pulse {
  50% {
    opacity: 0.35;
  }
}

.catalog-controls {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.catalog-filter {
  display: inline-flex;
  flex: 0 0 164px;
}

.catalog-filter select {
  height: 42px;
  padding: 0 34px 0 12px;
  border-color: #9fc4df;
  border-radius: 4px;
  color: #364f60;
  background-color: #f7fbfe;
  font-size: 13px;
  cursor: pointer;
}

.catalog-search {
  display: grid;
  grid-template-columns: minmax(220px, 330px) auto;
  flex: 0 1 410px;
  margin-left: auto;
}

.catalog-actions {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.catalog-actions .catalog-search {
  margin-left: 0;
}

.catalog-search input {
  height: 42px;
  border-color: #d6dedc;
  border-radius: 4px 0 0 4px;
  border-right: 0;
}

.catalog-search button {
  min-width: 74px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ink-strong);
  border-radius: 0 4px 4px 0;
  color: #ffffff;
  background: var(--ink-strong);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 150ms ease;
}

.catalog-search button:hover {
  background: #29363a;
}

.catalog-action-button {
  flex: 0 0 auto;
  min-width: 82px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--teal);
  border-radius: 4px;
  color: #ffffff;
  background: var(--teal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease;
}

.catalog-action-button:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.catalog-board {
  overflow: hidden;
  border: 1px solid #d7dfdc;
  border-radius: 4px;
  background: var(--surface);
}

.catalog-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.catalog-result-bar p {
  margin: 0;
  color: #4f6064;
  font-size: 13px;
}

.refresh-button {
  flex: 0 0 auto;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid #a3b2af;
  color: #55666a;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.refresh-button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.48;
}

.catalog-error {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  margin: 0 18px 16px;
  padding: 12px 14px;
  border: 1px solid #efd3cd;
  border-left: 3px solid var(--red);
  border-radius: 5px;
  color: #773b3b;
  background: var(--red-soft);
  font-size: 13px;
}

.catalog-error .secondary-button {
  min-height: 34px;
  padding: 0 12px;
  background: #ffffff;
}

.table-wrap {
  overflow-x: auto;
  border-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid #e8eeec;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: #657579;
  background: #f7faf9;
  font-size: 11px;
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.catalog-table {
  table-layout: fixed;
}

.catalog-table th,
.catalog-table td {
  padding: 8px 12px;
  white-space: normal;
}

.catalog-table th:nth-child(1) {
  width: 8%;
}

.catalog-table th:nth-child(2) {
  width: 47%;
}

.catalog-table th:nth-child(3) {
  width: 11%;
}

.catalog-table th:nth-child(4) {
  width: 14%;
}

.catalog-table th:nth-child(5) {
  width: 20%;
}

.catalog-table tbody tr {
  cursor: pointer;
  transition: background 130ms ease;
}

.catalog-table tbody tr:hover,
.catalog-table tbody tr:focus-visible {
  background: #fbfdfc;
}

.catalog-table tbody tr:focus-visible {
  outline: 2px solid rgb(11 110 102 / 42%);
  outline-offset: -2px;
}

.catalog-table tbody tr.is-selected {
  background: var(--teal-soft);
}

.catalog-table tbody tr.is-selected:hover {
  background: #e3f2ee;
}

.catalog-table tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--teal);
}

.catalog-id {
  color: #596b70;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.product-name-cell {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.product-logo {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #e0e7e5;
  border-radius: 4px;
  background: #f7f9f8;
}

.product-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #38484c;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.catalog-type {
  color: #5e6f73;
  font-size: 11px;
}

.catalog-note {
  color: #68787c;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.catalog-table-message {
  height: 180px;
  color: var(--muted);
  text-align: center;
}

.catalog-empty {
  margin: 0;
  padding: 48px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 62px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: #fcfdfc;
}

.catalog-pagination > span {
  min-width: 118px;
  color: #5b6c70;
  font-size: 12px;
  text-align: center;
}

.page-button {
  min-width: 80px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: #34484b;
  background: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 150ms ease, color 150ms ease;
}

.page-button:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.page-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.redeem-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(430px, 1.2fr);
  gap: 84px;
  align-items: center;
  padding: 82px 0 92px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 82px;
}

.redeem-copy {
  padding-left: 8px;
}

.redeem-copy h2 {
  margin-bottom: 18px;
  color: var(--ink-strong);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

.redeem-copy > p:not(.eyebrow) {
  max-width: 510px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.process-list {
  display: flex;
  gap: 24px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.process-list span {
  color: var(--orange);
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
}

.redeem-panel {
  position: relative;
  padding: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.selected-project {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -4px 0 20px;
  padding: 12px 13px;
  border: 1px solid #c4ded8;
  border-left: 3px solid var(--teal);
  border-radius: 5px;
  background: #f4faf8;
}

.selected-project-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.selected-project-copy > span {
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 700;
}

.selected-project-copy strong {
  overflow-wrap: anywhere;
  color: var(--ink-strong);
  font-size: 13px;
}

.selected-project-copy small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
}

.selected-project-clear {
  flex: 0 0 auto;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid #94aaa5;
  color: #516866;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

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

.panel-heading h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.secure-chip,
.batch-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 9px;
  border: 1px solid #c4ded8;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 11px;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.field > span {
  color: #3e4e52;
  font-size: 12px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input,
select {
  height: 48px;
  padding: 0 13px;
}

textarea {
  padding: 11px 13px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgb(11 110 102 / 9%);
}

input::placeholder,
textarea::placeholder {
  color: #a2adaa;
}

.advanced-fields {
  margin: -2px 0 18px;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.advanced-fields summary,
.raw-result summary {
  padding: 12px 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}

.advanced-body {
  padding-top: 10px;
}

.primary-button,
.secondary-button,
.copy-button,
.text-button,
.table-action {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: background 150ms ease, border-color 150ms ease, opacity 150ms ease,
    transform 150ms ease;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--teal);
}

.primary-button:hover {
  background: var(--teal-dark);
}

.primary-button:active,
.secondary-button:active,
.copy-button:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.table-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.button-arrow {
  font-size: 20px;
  font-weight: 400;
}

.form-footnote {
  margin: 16px 0 0;
  color: #879390;
  font-size: 11px;
  text-align: center;
}

.result-region {
  margin-top: 22px;
  padding: 17px;
  border: 1px solid #c2dfd8;
  border-radius: 6px;
  background: #f3fbf8;
}

.result-region.is-error {
  border-color: #eccdc7;
  background: var(--red-soft);
}

.result-status {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.result-icon {
  display: grid;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--teal);
  font-weight: 700;
}

.is-error .result-icon {
  background: var(--red);
}

.result-status strong {
  display: block;
  margin-bottom: 1px;
  font-size: 14px;
}

.result-status p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.code-result {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgb(11 110 102 / 14%);
}

.code-result > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.code-line {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.code-line code {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 41px;
  padding: 8px 11px;
  overflow-wrap: anywhere;
  border: 1px solid #c8ddd8;
  border-radius: 5px;
  background: #ffffff;
  font-size: 12px;
}

.copy-button {
  flex: 0 0 auto;
  padding: 0 13px;
  color: #ffffff;
  background: var(--ink-strong);
  font-size: 11px;
}

.result-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 11px;
  padding: 0 13px;
  border: 1px solid var(--teal);
  border-radius: 5px;
  color: var(--teal-dark);
  background: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.result-link:hover {
  background: var(--teal-soft);
}

.raw-result {
  margin-top: 10px;
}

.raw-result summary {
  padding-bottom: 0;
}

pre {
  max-width: 100%;
  margin: 9px 0 0;
  padding: 13px;
  overflow: auto;
  border: 1px solid #d9e2df;
  border-radius: 5px;
  background: #f8faf9;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  color: #7c898c;
  font-size: 11px;
}

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

.admin-header {
  width: 100%;
}

.brand-light {
  color: var(--ink-strong);
}

.text-button {
  padding: 7px 0;
  color: #4f5f62;
  background: transparent;
  font-size: 12px;
}

.text-button:hover {
  color: var(--teal);
}

.admin-main {
  width: min(1240px, calc(100% - 48px));
}

.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 80px;
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: 64px 0;
}

.login-copy h1,
.dashboard-heading h1 {
  margin-bottom: 16px;
  color: var(--ink-strong);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

.login-copy > p:last-child {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-message {
  min-height: 23px;
  margin: 12px 0 0;
  color: var(--teal-dark);
  font-size: 12px;
}

.form-message.is-error,
.is-error {
  color: var(--red);
}

.dashboard-view {
  padding: 52px 0 84px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-heading h1 {
  margin: 0;
  font-size: 44px;
}

.secondary-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
}

.secondary-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 34px 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.metric {
  min-height: 106px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

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

.metric strong {
  display: block;
  margin-top: 6px;
  color: var(--ink-strong);
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 500;
}

.metric-alert strong {
  color: var(--red);
}

.workbench,
.inventory-section {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-tabs {
  display: flex;
  gap: 2px;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.tool-tab {
  min-height: 40px;
  padding: 0 17px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.tool-tab.is-active {
  border-bottom-color: var(--teal);
  color: var(--teal-dark);
}

.tool-panel {
  padding: 28px;
}

.member-search-row {
  margin-bottom: 16px;
}

.member-search-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.member-search-field {
  display: grid;
  flex: 1 1 360px;
  gap: 7px;
  min-width: 0;
}

.member-search-field > span {
  color: #3e4e52;
  font-size: 12px;
  font-weight: 700;
}

.member-search-field input {
  height: 40px;
}

.member-search-form .secondary-button {
  flex: 0 0 auto;
}

.member-admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.55fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
}

.member-usage-layout {
  grid-template-columns: minmax(270px, 0.64fr) minmax(0, 1.8fr);
}

.member-directory {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #fbfcfc;
}

.member-directory-heading,
.member-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.member-directory-heading {
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.member-directory-heading strong {
  color: var(--ink-strong);
  font-size: 12px;
}

.member-directory-heading span,
.member-section-heading span {
  color: var(--muted);
  font-size: 10px;
}

.member-directory .table-wrap {
  max-height: 560px;
  overflow: auto;
}

.member-directory-table {
  width: 100%;
  min-width: 510px;
  font-size: 11px;
}

.member-directory-table th,
.member-directory-table td {
  padding: 10px 11px;
}

.member-directory-table th:first-child,
.member-directory-table td:first-child {
  min-width: 112px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.member-directory-table tbody tr {
  transition: background 130ms ease;
}

.member-directory-table tbody tr:hover,
.member-directory-table tbody tr.is-selected {
  background: var(--teal-soft);
}

.member-directory-table tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--teal);
}

.member-directory-table .table-action {
  min-height: 27px;
  padding: 0 9px;
  white-space: nowrap;
}

.member-empty {
  margin: 0;
  padding: 28px 16px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.member-detail-panel {
  min-width: 0;
  padding: 22px;
  background: #ffffff;
}

.member-placeholder {
  display: grid;
  min-height: 300px;
  margin: 0;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.member-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.member-detail-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--teal);
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
}

.member-detail-heading h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.member-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-detail-meta > strong {
  color: var(--teal-dark);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  white-space: nowrap;
}

.member-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.member-facts > div {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.member-facts > div:first-child {
  padding-left: 0;
}

.member-facts > div:last-child {
  border-right: 0;
}

.member-facts dt {
  color: var(--muted);
  font-size: 10px;
}

.member-facts dd {
  margin: 4px 0 0;
  color: #2f4144;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.member-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.member-stat-grid > div {
  min-width: 0;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
}

.member-stat-grid > div:last-child {
  border-right: 0;
}

.member-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.member-stat-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink-strong);
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.member-detail-section {
  margin-top: 24px;
}

.member-detail-section + .member-detail-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.member-section-heading {
  margin-bottom: 10px;
}

.member-section-heading h4 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 14px;
}

.member-detail-section .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.member-detail-table {
  width: max-content;
  min-width: 820px;
  font-size: 11px;
}

.member-detail-table th,
.member-detail-table td {
  padding: 9px 10px;
  white-space: nowrap;
}

.member-detail-table .member-note-cell {
  min-width: 160px;
  max-width: 280px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.member-detail-table .member-result-cell {
  min-width: 220px;
  max-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.member-amount-positive {
  color: var(--teal-dark);
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.member-amount-negative {
  color: var(--red);
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.tool-heading,
.issued-heading,
.inventory-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.tool-heading h2,
.issued-heading h2,
.inventory-heading h2 {
  margin-bottom: 3px;
  color: var(--ink-strong);
  font-size: 19px;
  font-weight: 700;
}

.tool-heading p,
.issued-heading p,
.inventory-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.order-heading {
  align-items: center;
}

.order-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fafcfb;
}

.order-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  color: #415256;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.order-select-all input,
.upstream-orders-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.order-selection-state {
  min-height: 36px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.order-note-field {
  display: grid;
  flex: 1 1 220px;
  grid-template-columns: auto minmax(140px, 320px);
  gap: 8px;
  align-items: center;
  min-width: 190px;
}

.order-note-field > span {
  color: #536367;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.order-note-field input {
  height: 36px;
}

.generate-button {
  margin-left: auto;
}

.order-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.upstream-orders-table {
  width: max-content;
  min-width: 1460px;
  table-layout: auto;
  font-size: 11px;
}

.upstream-orders-table th,
.upstream-orders-table td {
  padding: 9px 10px;
  white-space: nowrap;
  vertical-align: top;
}

.upstream-orders-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.upstream-orders-table tbody tr {
  transition: background 130ms ease;
}

.upstream-orders-table tbody tr:hover,
.upstream-orders-table tbody tr.is-selected {
  background: #f1f8f6;
}

.upstream-orders-table tbody tr.is-selected {
  box-shadow: inset 3px 0 0 var(--teal);
}

.order-check-column {
  width: 42px;
  padding-right: 4px !important;
  padding-left: 12px !important;
  text-align: center;
}

.order-project {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 220px;
  white-space: normal;
}

.order-project img {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid #e0e7e5;
  border-radius: 4px;
  background: #f7f9f8;
  object-fit: contain;
}

.order-project span {
  overflow-wrap: anywhere;
  color: #35474a;
  line-height: 1.45;
}

.order-secret-cell,
.order-appid-cell {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-amount-cell {
  color: var(--orange);
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.order-note-cell {
  min-width: 120px;
  max-width: 210px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.order-time-cell {
  color: #607174;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
}

.order-empty-state {
  margin: 0;
  padding: 34px 20px;
  border: 1px solid var(--line);
  border-top: 0;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  text-align: center;
}

.order-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 5px 5px;
  background: #fafcfb;
}

.order-pagination > span {
  min-width: 96px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

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

.project-selector {
  padding: 0;
}

.form-hint {
  min-height: 32px;
  margin: -5px 0 14px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

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

.issued-codes {
  margin: 0 28px 28px;
  padding: 20px;
  border: 1px solid #f0d2bd;
  border-left: 3px solid var(--orange);
  border-radius: 5px;
  background: var(--orange-soft);
}

.issued-code-list {
  margin-bottom: 0;
}

.inventory-section {
  margin-top: 26px;
}

.inventory-heading {
  margin: 0;
  padding: 24px 28px 17px;
}

.mono-cell {
  font-family: Consolas, "Courier New", monospace;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border: 1px solid #d6dfdc;
  border-radius: 999px;
  color: #526266;
  background: #f5f8f7;
  font-size: 10px;
}

.status-redeemed {
  border-color: #bdddd5;
  color: #116650;
  background: #eef9f5;
}

.status-review {
  border-color: #ebc8c1;
  color: var(--red);
  background: var(--red-soft);
}

.status-redeeming {
  border-color: #e6d3a8;
  color: #875d12;
  background: #fff9e9;
}

.status-completed {
  border-color: #bdddd5;
  color: #116650;
  background: #eef9f5;
}

.authorization-result {
  display: block;
  max-width: 340px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.table-action {
  min-height: 29px;
  padding: 0 10px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 11px;
}

.empty-state {
  margin: 0;
  padding: 38px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1020px) {
  .catalog-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-catalog-controls .catalog-actions {
    flex-wrap: wrap;
  }

  .customer-catalog-controls .catalog-actions .catalog-search {
    flex: 1 1 300px;
    width: auto;
  }

  .catalog-filter {
    flex-basis: auto;
    width: 100%;
  }

  .catalog-search {
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    flex-basis: auto;
    margin-left: 0;
  }

  .redeem-section {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .redeem-copy {
    padding-left: 0;
  }

  .login-view {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: auto;
  }

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

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .catalog-table-wrap {
    overflow-x: hidden;
  }

  .catalog-table {
    table-layout: fixed;
  }

  .catalog-table th,
  .catalog-table td {
    padding: 7px 4px;
    font-size: 10px;
  }

  .catalog-table th:nth-child(1) {
    width: 11%;
  }

  .catalog-table th:nth-child(2) {
    width: 39%;
  }

  .catalog-table th:nth-child(3) {
    width: 12%;
  }

  .catalog-table th:nth-child(4) {
    width: 18%;
  }

  .catalog-table th:nth-child(5) {
    width: 20%;
  }

  .product-name-cell {
    gap: 6px;
  }

  .product-logo {
    width: 30px;
    height: 30px;
  }

  .product-name {
    font-size: 10px;
    line-height: 1.4;
  }

  .catalog-id,
  .catalog-type,
  .catalog-note {
    font-size: 9px;
    line-height: 1.4;
  }

  .catalog-error {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .admin-header {
    min-height: 62px;
    padding: 11px 14px;
  }

  main,
  .admin-main,
  .site-footer {
    width: min(100% - 28px, 1240px);
  }

  .site-nav {
    gap: 12px;
  }

  .nav-link {
    display: none;
  }

  .service-state {
    display: none;
  }

  .catalog-section {
    padding: 32px 0 56px;
  }

  .catalog-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
  }

  .catalog-heading h1 {
    font-size: 36px;
  }

  .catalog-filter select {
    height: 40px;
    font-size: 12px;
  }

  .catalog-result-bar {
    min-height: 50px;
    padding: 0 14px;
  }

  .catalog-pagination {
    gap: 9px;
    padding: 12px;
  }

  .catalog-pagination > span {
    min-width: 88px;
    font-size: 11px;
  }

  .page-button {
    min-width: 70px;
    padding: 0 9px;
  }

  .redeem-section {
    padding: 56px 0 68px;
  }

  .redeem-copy h2 {
    font-size: 38px;
  }

  .process-list {
    gap: 15px;
    margin-top: 28px;
  }

  .redeem-panel {
    padding: 26px 20px;
  }

  .panel-heading h3 {
    font-size: 25px;
  }

  .site-footer {
    display: grid;
    gap: 5px;
    padding-bottom: 26px;
  }

  .dashboard-view {
    padding-top: 36px;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-heading h1 {
    font-size: 38px;
  }

  .metric {
    min-height: 92px;
    padding: 17px;
  }

  .tool-panel {
    padding: 22px 18px;
  }

  .tool-heading,
  .issued-heading,
  .inventory-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .issued-codes {
    margin: 0 18px 22px;
    padding: 17px;
  }

  .inventory-heading {
    padding: 21px 18px 14px;
  }

  .tool-tabs {
    overflow-x: auto;
  }

  .tool-tab {
    flex: 0 0 auto;
  }

  .login-view {
    padding: 46px 0;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .login-form {
    padding: 24px 19px;
  }
}

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

/* Member storefront */

.customer-body {
  min-height: 100vh;
  background: #ffffff;
}

.boot-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 100vh;
  color: var(--muted);
  background: #ffffff;
  font-size: 13px;
}

.boot-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--teal);
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
}

.auth-shell {
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(#f4f7f6 0, #f4f7f6 1px, transparent 1px) 0 0 / 100% 72px,
    #ffffff;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 12px max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
}

.auth-header-meta {
  display: flex;
  align-items: center;
  gap: 22px;
}

.auth-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 76px;
  align-items: center;
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 56px 0;
}

.auth-intro {
  min-width: 0;
}

.auth-kicker {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--teal);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
}

.auth-intro h1 {
  margin: 0 0 18px;
  color: var(--ink-strong);
  font-size: 48px;
  line-height: 1.08;
}

.auth-intro > p {
  max-width: 540px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}

.auth-points {
  display: grid;
  max-width: 540px;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: #425257;
  font-size: 13px;
}

.auth-points span {
  color: var(--orange);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
}

.auth-panel {
  padding: 26px 28px 30px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgb(24 34 38 / 8%);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: -26px -28px 24px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.auth-tab.is-active {
  border-bottom-color: var(--teal);
  color: var(--teal-dark);
  background: #f7fbf9;
}

.auth-panel-heading {
  margin-bottom: 22px;
}

.auth-panel-heading h2 {
  margin: 0 0 4px;
  color: var(--ink-strong);
  font-size: 24px;
}

.auth-panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-submit {
  margin-top: 2px;
}

.customer-app {
  min-height: 100vh;
  background: #ffffff;
}

.customer-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 97%);
  backdrop-filter: blur(12px);
}

.customer-brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #526267;
  background: #ffffff;
  cursor: pointer;
  font-size: 17px;
}

.topbar-icon-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.topbar-icon-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.topbar-icon-button.is-spinning {
  animation: header-spin 700ms linear infinite;
}

@keyframes header-spin {
  to {
    transform: rotate(360deg);
  }
}

.account-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.account-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 220px;
  min-height: 42px;
  padding: 4px 8px 4px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.account-trigger:hover,
.account-trigger[aria-expanded="true"] {
  border-color: var(--line);
  background: #f8faf9;
}

.account-avatar,
.member-profile-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #8c9597;
  font-size: 13px;
  font-weight: 700;
}

.account-name {
  min-width: 0;
  overflow: hidden;
  color: #314247;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chevron {
  color: #7e8b8e;
  font-size: 13px;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 236px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgb(24 34 38 / 14%);
}

.account-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.account-meta-row strong {
  color: #2c3d41;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.account-meta-row .account-balance {
  color: var(--orange);
  font-size: 14px;
}

.account-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  color: #435357;
  background: #ffffff;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.account-menu-item:hover {
  color: var(--teal-dark);
  background: #f4f9f7;
}

.account-menu-item.account-logout {
  border-bottom: 0;
  color: var(--red);
}

.customer-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.customer-sidebar {
  position: sticky;
  top: 64px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  border-right: 1px solid var(--line);
  background: #fbfcfb;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
  padding: 17px 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #536367;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.sidebar-link:hover {
  color: var(--teal-dark);
  background: #f2f7f5;
}

.sidebar-link.is-active {
  border-color: #cfe2dc;
  color: var(--teal-dark);
  background: #eaf5f2;
  font-weight: 700;
}

.sidebar-icon {
  display: inline-grid;
  width: 18px;
  place-items: center;
  color: #748386;
  font-size: 16px;
}

.sidebar-link.is-active .sidebar-icon {
  color: var(--teal);
}

.sidebar-foot {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 18px 18px 22px;
  border-top: 1px solid var(--line);
}

.sidebar-admin-link {
  color: #839093;
  font-size: 11px;
  text-decoration: none;
}

.sidebar-admin-link:hover {
  color: var(--teal);
}

.customer-main {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 30px 34px 52px;
  background: #ffffff;
}

.customer-view {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  min-height: 50px;
  margin-bottom: 18px;
}

.view-kicker {
  margin: 0 0 3px;
  color: var(--teal);
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
}

.view-heading h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 24px;
  line-height: 1.25;
}

.view-date {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.notice-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}

.notice-tools > span {
  color: #536468;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.contact-support-button {
  min-height: 36px;
  padding: 0 14px;
  border-color: #b9d6d0;
  color: var(--teal-dark);
  background: #f5fbf9;
  white-space: nowrap;
}

.contact-support-button:hover {
  background: var(--teal-soft);
}

.notice-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
}

.notice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #fafcfb;
}

.notice-heading h2 {
  margin: 0;
  color: #000000;
  font-family: "Times New Roman", "SimSun", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: normal;
}

.notice-heading span {
  color: #96a19f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
}

.notice-content {
  color: #000000;
  font-family: "Times New Roman", "SimSun", serif;
  font-size: 16px;
  line-height: normal;
  padding: 18px;
}

.notice-content h2 {
  margin: 19.92px 0;
  color: #000000;
  font-size: 24px;
  font-weight: 700;
  line-height: normal;
}

.notice-content h2:first-child {
  margin-top: 0;
}

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

.notice-content hr {
  height: 0;
  margin: 8px auto;
  overflow: hidden;
  border: 0;
  border-top: 1px solid #808080;
}

.notice-content strong {
  font-weight: bolder;
}

.notice-content p {
  margin: 0;
  color: #526267;
  font-size: 13px;
  line-height: 1.8;
}

.home-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.summary-item {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 134px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.summary-item:last-child {
  border-right: 0;
}

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

.summary-item > strong {
  color: var(--ink-strong);
  font-size: 25px;
  line-height: 1.25;
}

.summary-item > button {
  width: fit-content;
  margin-top: auto;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid #b8c4c1;
  color: var(--teal-dark);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.customer-catalog-controls {
  margin-top: 4px;
}

.member-catalog-table {
  min-width: 820px;
}

.member-catalog-table th:nth-child(1) {
  width: 4%;
}

.member-catalog-table th:nth-child(2) {
  width: 9%;
}

.member-catalog-table th:nth-child(3) {
  width: 42%;
}

.member-catalog-table th:nth-child(4) {
  width: 8%;
}

.member-catalog-table th:nth-child(5) {
  width: 12%;
}

.member-catalog-table th:nth-child(6) {
  width: 16%;
}

.member-catalog-table th:nth-child(7) {
  width: 9%;
}

.member-catalog-table .selection-column,
.member-catalog-table td:first-child {
  padding-right: 4px;
  text-align: center;
}

.project-select {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
  vertical-align: middle;
}

.member-catalog-table td:nth-child(7) {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .member-catalog-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .member-catalog-table {
    width: 820px;
  }
}

.project-price-cell {
  color: var(--orange);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
}

.project-price-cell.price-missing {
  color: #899496;
  font-family: inherit;
  font-weight: 500;
}

.member-project-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.member-project-actions .table-action {
  min-width: 49px;
  min-height: 28px;
  padding: 0 8px;
}

.table-text-button {
  min-height: 28px;
  padding: 0 5px;
  border: 0;
  border-radius: 4px;
  color: var(--teal-dark);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.table-text-button:hover {
  color: var(--orange);
}

.redeem-inline-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #cfe0dc;
  border-left: 3px solid var(--teal);
  border-radius: 4px;
  background: #f8fcfa;
}

.redeem-inline-panel h2 {
  margin: 0 0 4px;
  color: #2e4246;
  font-size: 15px;
}

.redeem-inline-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.redeem-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.redeem-inline-form input {
  height: 42px;
  border-radius: 4px 0 0 4px;
}

.primary-inline-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--teal);
  border-radius: 4px;
  color: #ffffff;
  background: var(--teal);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.primary-inline-button:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.primary-inline-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.redeem-inline-form .primary-inline-button {
  border-radius: 0 4px 4px 0;
}

.data-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
}

.data-board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafcfb;
}

.data-board-heading h2 {
  margin: 0 0 2px;
  color: #324347;
  font-size: 15px;
}

.data-board-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.ledger-balance {
  color: var(--orange);
  font-family: Consolas, "Courier New", monospace;
  font-size: 17px;
}

.member-data-table {
  min-width: 940px;
}

.member-data-table th,
.member-data-table td {
  padding: 10px 12px;
  font-size: 11px;
}

.member-data-table td:nth-child(2),
.member-data-table td:nth-child(6) {
  max-width: 260px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.authorization-result {
  display: block;
  max-width: 250px;
  overflow: hidden;
  color: #4d5f63;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-time {
  color: #637377;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
}

.order-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #d6dfdc;
  border-radius: 999px;
  color: #526266;
  background: #f5f8f7;
  font-size: 9px;
}

.status-processing {
  border-color: #ead4a7;
  color: #875d12;
  background: #fff9e9;
}

.status-refunded,
.status-review {
  border-color: #ebc8c1;
  color: var(--red);
  background: var(--red-soft);
}

.amount-credit {
  color: #14735c;
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.amount-debit {
  color: var(--red);
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.ledger-note {
  color: #5d6d70;
}

.member-account-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.member-profile {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.member-profile-avatar {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.member-profile h2 {
  margin: 0 0 2px;
  color: var(--ink-strong);
  font-size: 18px;
}

.member-profile p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.member-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.member-facts div {
  min-height: 82px;
  padding: 17px 20px;
  border-right: 1px solid var(--line);
}

.member-facts div:last-child {
  border-right: 0;
}

.member-facts dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}

.member-facts dd {
  margin: 0;
  color: #36474b;
  font-size: 12px;
  font-weight: 700;
}

.member-actions {
  display: flex;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fafcfb;
}

.recharge-guide {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) minmax(150px, auto) auto;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: 21px;
  border: 1px solid #e4dfd3;
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  background: #fffdf9;
}

.recharge-guide h2 {
  margin: 0;
  color: #3d4140;
  font-size: 17px;
}

.recharge-guide > p {
  margin: 0;
  color: #655f56;
  font-size: 12px;
}

.recharge-contact {
  display: grid;
  grid-template-columns: auto minmax(88px, auto);
  gap: 5px 10px;
  align-items: center;
  padding-left: 16px;
  border-left: 1px solid #e4dfd3;
}

.recharge-contact span {
  color: #7a7063;
  font-size: 10px;
  white-space: nowrap;
}

.recharge-contact strong {
  color: #39413f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  white-space: nowrap;
}

.customer-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.customer-dialog::backdrop {
  background: rgb(17 27 30 / 48%);
  backdrop-filter: blur(2px);
}

.dialog-card {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 24px 70px rgb(19 30 33 / 24%);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.dialog-heading h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 21px;
}

.dialog-close {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #6d7c7f;
  background: #ffffff;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--red);
  border-color: #e5c7c1;
}

.purchase-summary {
  display: grid;
  margin: 0 0 18px;
  border-top: 1px solid var(--line);
}

.purchase-summary div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.purchase-summary dt {
  color: var(--muted);
  font-size: 11px;
}

.purchase-summary dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #36474b;
  font-size: 12px;
  font-weight: 700;
}

.dialog-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.dialog-note.is-error {
  color: var(--red);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.dialog-actions .primary-inline-button,
.dialog-actions .secondary-button {
  min-width: 92px;
  min-height: 39px;
}

.topup-summary {
  display: grid;
  margin: 16px 0;
  border-top: 1px solid var(--line);
}

.topup-summary div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.topup-summary dt {
  color: var(--muted);
  font-size: 11px;
}

.topup-summary dd {
  min-width: 0;
  margin: 0;
  color: #36474b;
  font-size: 12px;
  font-weight: 700;
}

.topup-payment-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.topup-payment-head div {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
}

.topup-payment-head div + div {
  border-left: 1px solid var(--line);
}

.topup-payment-head span {
  color: var(--muted);
  font-size: 10px;
}

.topup-payment-head strong {
  color: var(--ink-strong);
  font-size: 15px;
}

.usdt-qr-wrap {
  display: grid;
  width: min(236px, 100%);
  margin: 0 auto 16px;
  padding: 10px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.usdt-qr-wrap img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.usdt-address-block {
  margin-bottom: 14px;
}

.usdt-address-block > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}

.usdt-address-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.usdt-address-line code {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  overflow-wrap: anywhere;
  border: 1px solid #ccdcd8;
  border-radius: 4px;
  background: #f8fbfa;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.usdt-address-line .copy-button {
  min-height: 42px;
}

.topup-deadline {
  margin-bottom: 0;
}

.message-dialog-copy {
  margin: 0;
  color: #4d5e62;
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.customer-dialog.is-error .dialog-card {
  color: var(--ink);
  border-color: #e7c9c2;
}

.customer-dialog.is-error #messageTitle {
  color: var(--red);
}

.authorization-delivery {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.authorization-delivery > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}

.delivery-code-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.delivery-code-line code {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  overflow-wrap: anywhere;
  border: 1px solid #ccdcd8;
  border-radius: 4px;
  background: #f8fbfa;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.delivery-code-line .copy-button {
  min-height: 42px;
}

#deliveryLink {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 10px;
  padding: 0 13px;
  border: 1px solid var(--teal);
  border-radius: 4px;
  color: var(--teal-dark);
  background: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 1040px) {
  .auth-main {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 40px;
  }

  .customer-layout {
    grid-template-columns: 176px minmax(0, 1fr);
  }

  .customer-main {
    padding-right: 24px;
    padding-left: 24px;
  }

  .redeem-inline-panel {
    grid-template-columns: 1fr;
  }

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

  .member-facts div:nth-child(2) {
    border-right: 0;
  }

  .member-facts div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .recharge-guide {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .recharge-contact {
    grid-column: 1 / -1;
  }

  .recharge-guide .primary-inline-button {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 800px) {
  .auth-header {
    padding-right: 18px;
    padding-left: 18px;
  }

  .auth-main {
    grid-template-columns: 1fr;
    gap: 34px;
    width: min(620px, calc(100% - 32px));
    min-height: auto;
    padding: 42px 0 52px;
  }

  .auth-intro h1 {
    font-size: 38px;
  }

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

  .auth-points li {
    display: grid;
    align-content: center;
    gap: 3px;
    min-height: 68px;
    padding: 10px;
    border-right: 1px solid var(--line);
    font-size: 11px;
  }

  .auth-points li:last-child {
    border-right: 0;
  }

  .customer-topbar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .customer-layout {
    display: block;
  }

  .customer-sidebar {
    position: sticky;
    top: 64px;
    z-index: 35;
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #fbfcfb;
  }

  .sidebar-nav {
    display: flex;
    gap: 2px;
    padding: 7px 10px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .sidebar-link {
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .sidebar-icon {
    display: none;
  }

  .sidebar-foot {
    display: none;
  }

  .customer-main {
    padding: 22px 18px 42px;
  }

  .home-summary {
    grid-template-columns: 1fr;
  }

  .summary-item {
    min-height: 104px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-item:last-child {
    border-bottom: 0;
  }

  .recharge-guide {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .recharge-contact {
    grid-column: auto;
    justify-self: start;
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid #e4dfd3;
    border-left: 0;
  }

  .recharge-guide .primary-inline-button {
    grid-column: auto;
  }

  .order-note-field {
    flex-basis: 100%;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .generate-button {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .auth-header {
    min-height: 60px;
    padding: 10px 14px;
  }

  .auth-header .brand {
    gap: 8px;
    font-size: 14px;
  }

  .auth-header .brand-mark {
    width: 31px;
    height: 31px;
    font-size: 12px;
  }

  .auth-header-meta {
    gap: 12px;
  }

  .auth-header .service-state {
    display: none;
  }

  .auth-main {
    width: min(100% - 24px, 520px);
    padding: 32px 0 42px;
  }

  .auth-intro h1 {
    font-size: 34px;
  }

  .auth-intro > p {
    font-size: 13px;
  }

  .auth-points {
    grid-template-columns: 1fr;
  }

  .auth-points li {
    display: flex;
    min-height: 42px;
    padding: 7px 4px;
    border-right: 0;
  }

  .auth-panel {
    padding: 22px 18px 24px;
  }

  .auth-tabs {
    margin: -22px -18px 20px;
  }

  .customer-topbar {
    min-height: 60px;
    padding: 8px 12px;
  }

  .customer-brand-area {
    gap: 7px;
  }

  .customer-brand-area .brand {
    gap: 7px;
    font-size: 13px;
  }

  .customer-brand-area .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .topbar-icon-button {
    width: 31px;
    height: 31px;
    font-size: 15px;
  }

  .account-trigger {
    gap: 6px;
    max-width: 145px;
    min-height: 38px;
    padding-right: 4px;
  }

  .account-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .account-name {
    max-width: 74px;
    font-size: 12px;
  }

  .account-menu {
    width: 224px;
  }

  .customer-sidebar {
    top: 60px;
  }

  .sidebar-nav {
    padding: 6px 8px;
  }

  .sidebar-link {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .customer-main {
    padding: 18px 12px 36px;
  }

  .view-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
  }

  .view-heading h1 {
    font-size: 21px;
  }

  .view-date {
    font-size: 10px;
  }

  .notice-heading {
    padding: 0 13px;
  }

  .notice-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .notice-content {
    padding: 14px;
  }

  .notice-content p {
    font-size: 12px;
  }

  .summary-item {
    min-height: 96px;
    padding: 16px;
  }

  .catalog-controls.customer-catalog-controls {
    gap: 9px;
    margin-bottom: 10px;
  }

  .customer-catalog-controls .catalog-filter {
    width: 100%;
  }

  .customer-catalog-controls .catalog-search {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .customer-catalog-controls .catalog-search button {
    min-width: 64px;
    padding: 0 11px;
  }

  .customer-catalog-controls .catalog-actions {
    gap: 6px;
  }

  .customer-catalog-controls .catalog-actions .catalog-search {
    flex-basis: 100%;
  }

  .catalog-action-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .catalog-result-bar {
    min-height: 43px;
    padding: 0 11px;
  }

  .catalog-result-bar p {
    font-size: 11px;
  }

  .catalog-pagination {
    gap: 8px;
    padding: 10px;
  }

  .catalog-pagination > span {
    min-width: 82px;
    font-size: 10px;
  }

  .page-button {
    min-width: 68px;
    padding: 0 8px;
  }

  .redeem-inline-panel {
    gap: 12px;
    padding: 14px;
  }

  .redeem-inline-form {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .redeem-inline-form input,
  .redeem-inline-form .primary-inline-button {
    border-radius: 4px;
  }

  .data-board-heading {
    min-height: 54px;
    padding: 9px 12px;
  }

  .ledger-balance {
    font-size: 15px;
  }

  .member-profile {
    padding: 16px;
  }

  .member-facts {
    grid-template-columns: 1fr;
  }

  .member-facts div {
    min-height: 68px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .member-facts div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .member-facts div:last-child {
    border-bottom: 0;
  }

  .member-actions {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .recharge-guide {
    padding: 16px;
  }

  .order-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .order-toolbar {
    align-items: stretch;
  }

  .order-select-all,
  .order-selection-state {
    flex: 1 1 auto;
  }

  .order-toolbar .secondary-button,
  .order-toolbar .generate-button {
    flex: 1 1 120px;
  }

  .order-pagination {
    gap: 8px;
    padding: 9px;
  }

  .order-pagination > span {
    min-width: 78px;
    font-size: 10px;
  }

  .dialog-card {
    padding: 20px 16px;
  }

  .dialog-heading {
    margin-bottom: 16px;
  }

  .dialog-heading h2 {
    font-size: 19px;
  }

  .purchase-summary div {
    grid-template-columns: 82px minmax(0, 1fr);
  }

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

  .dialog-actions > * {
    width: 100%;
  }

  .delivery-code-line {
    grid-template-columns: 1fr;
  }

  .topup-payment-head {
    grid-template-columns: 1fr;
  }

  .topup-payment-head div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .usdt-address-line {
    grid-template-columns: 1fr;
  }

  .usdt-address-line .copy-button {
    width: 100%;
  }
}

.status-active {
  border-color: #bdddd5;
  color: #116650;
  background: #eef9f5;
}

.status-disabled,
.status-unknown {
  border-color: #dfe4e3;
  color: var(--muted);
  background: #f5f7f6;
}

@media (max-width: 980px) {
  .member-admin-layout,
  .member-usage-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-directory {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .member-directory .table-wrap {
    max-height: 360px;
  }
}

@media (max-width: 640px) {
  .member-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .member-search-field {
    flex: 0 0 auto;
  }

  .member-search-form .secondary-button {
    width: 100%;
  }

  .member-detail-panel {
    padding: 18px 14px;
  }

  .member-detail-heading {
    flex-direction: column;
    gap: 10px;
  }

  .member-detail-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

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

  .member-facts > div,
  .member-facts > div:first-child {
    padding: 11px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .member-facts > div:nth-child(2n) {
    border-right: 0;
  }

  .member-facts > div:last-child {
    border-bottom: 0;
  }

  .member-stat-grid > div {
    border-bottom: 1px solid var(--line);
  }

  .member-stat-grid > div:nth-child(2n) {
    border-right: 0;
  }

  .member-stat-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}
