:root {
  color-scheme: light;
  --paper: #f7f8fa;
  --surface: #ffffff;
  --ink: #15233b;
  --muted: #647188;
  --navy: #173f73;
  --navy-soft: #eaf0f7;
  --line: #d9e0e8;
  --green: #2f725d;
  --red: #9d3d43;
}

.plan-picker legend { margin-bottom: 8px; color: var(--navy); font-size: 14px; font-weight: 700; }
* { box-sizing: border-box; }
html { font-family: Inter, "Microsoft YaHei", system-ui, sans-serif; background: var(--paper); color: var(--ink); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
button, input, textarea { font: inherit; }

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(23, 63, 115, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 63, 115, .025) 1px, transparent 1px),
    radial-gradient(circle at 11% 8%, rgba(72, 111, 156, .09), transparent 27%);
  background-size: 32px 32px, 32px 32px, auto;
}

.topbar {
  position: relative;
  max-width: 1160px;
  margin: auto;
  padding: 25px 28px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--navy);
  background: var(--surface);
  color: var(--navy);
  font: 700 24px/1 Georgia, "Times New Roman", serif;
}
.brand strong, .brand small { display: block; }
.brand strong { font-family: "Noto Serif SC", SimSun, serif; font-size: 17px; letter-spacing: .04em; }
.brand small { margin-top: 4px; color: #7a8597; font: 10px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .13em; }
.connection { display: flex; gap: 8px; align-items: center; color: var(--green); font-size: 13px; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.shell {
  position: relative;
  max-width: 1160px;
  margin: auto;
  padding: 68px 28px 82px;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  gap: 72px;
  align-items: center;
}

.intro { max-width: 650px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #9baabd;
  padding: 0 0 8px;
  color: #59677c;
  font-size: 13px;
  letter-spacing: .08em;
}
.eyebrow span { color: var(--navy); font: 700 12px/1 Georgia, serif; }
h1 {
  margin: 23px 0 20px;
  color: var(--ink);
  font-family: "Noto Serif SC", STSong, SimSun, Georgia, serif;
  font-size: clamp(42px, 5vw, 62px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.045em;
}
.intro h1 span { display: block; margin-top: 7px; color: var(--navy); font-size: .66em; letter-spacing: -.025em; }
.intro > p { margin: 0; max-width: 600px; color: var(--muted); font-size: 16px; line-height: 1.9; }

.stepper { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 590px; border-top: 1px solid var(--line); }
.stepper li { position: relative; display: flex; align-items: center; gap: 10px; padding-top: 16px; color: #8993a2; font-size: 14px; }
.stepper li::before { content: ""; position: absolute; top: -2px; left: 0; width: 0; height: 3px; background: var(--navy); transition: width .25s ease; }
.stepper b { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #c9d2dd; background: #fff; color: #778397; border-radius: 50%; font: 600 12px/1 Georgia, serif; }
.stepper li.active { color: var(--ink); }
.stepper li.active::before, .stepper li.done::before { width: 72%; }
.stepper li.active b { border-color: var(--navy); background: var(--navy); color: #fff; }
.stepper li.done b { border-color: #8cad9f; background: #edf6f2; color: var(--green); }

.panel-wrap { position: relative; }
.panel-wrap::before { content: ""; position: absolute; inset: 13px -12px -13px 12px; border: 1px solid #cbd4de; background: #eef2f6; }
.panel {
  position: relative;
  border: 1px solid #cbd4de;
  border-top: 4px solid var(--navy);
  background: rgba(255, 255, 255, .96);
  padding: 31px;
  box-shadow: 0 18px 50px rgba(30, 53, 78, .1);
}
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 27px; }
.panel-heading small { color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.panel h2 { margin: 8px 0 0; color: var(--ink); font-family: "Noto Serif SC", STSong, SimSun, serif; font-size: 25px; font-weight: 600; letter-spacing: -.01em; }
.panel-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: #f7f9fb; color: var(--navy); font-size: 22px; }

label { display: block; margin-bottom: 9px; color: #35445a; font-size: 14px; font-weight: 600; }
input, textarea { width: 100%; border: 1px solid #bdc8d5; border-radius: 2px; outline: none; background: #fbfcfd; color: var(--ink); padding: 0 15px; transition: .2s; }
input { height: 50px; }
textarea { min-height: 150px; padding: 14px 15px; resize: vertical; font-family: ui-monospace, Consolas, monospace; line-height: 1.6; }
input:focus, textarea:focus { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(23, 63, 115, .09); }
::placeholder { color: #98a3b2; }

button { border: 0; border-radius: 2px; cursor: pointer; transition: .2s; font-weight: 650; }
button:disabled { cursor: wait; opacity: .65; }
.primary { width: 100%; height: 50px; margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(23, 63, 115, .16); }
.primary:hover:not(:disabled) { background: #24588f; transform: translateY(-1px); }
.secondary { height: 50px; padding: 0 18px; border: 1px solid #b9c4d0; background: #fff; color: #536176; }
.secondary:hover { border-color: var(--navy); color: var(--navy); }
.actions { display: grid; grid-template-columns: auto 1fr; gap: 11px; }
.actions .primary { margin: 0; }
.light { width: 100%; height: 46px; margin-top: 20px; border: 1px solid var(--navy); background: #fff; color: var(--navy); }
.light:hover { background: var(--navy-soft); }

.valid-badge, .waiting-badge, .expired-badge { border: 1px solid #9ebbac; background: #eff7f3; padding: 7px 11px; color: var(--green); font-size: 12px; }
.waiting-badge { border-color: #b6a879; background: #fffaf0; color: #7e681f; }
.expired-badge { border-color: #dcb7ba; background: #fff4f4; color: var(--red); }
.price-tag { padding: 8px 12px; border: 1px solid var(--navy); background: var(--navy-soft); color: var(--navy); font: 700 15px/1 ui-monospace, Consolas, monospace; }
.plan-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; padding: 0; border: 0; }
.plan-picker label { position: relative; margin: 0; cursor: pointer; }
.plan-picker input { position: absolute; opacity: 0; pointer-events: none; }
.plan-picker span { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; min-height: 82px; padding: 15px; border: 2px solid var(--line); background: #fff; transition: border-color .16s, background .16s, box-shadow .16s; }
.plan-picker b { grid-column: 1 / -1; color: var(--ink); font-size: 15px; line-height: 1.4; word-break: keep-all; }
.plan-picker small { grid-column: 1; color: var(--muted); font-size: 12px; }
.plan-picker strong { grid-column: 2; grid-row: 2; align-self: center; color: var(--navy); font: 700 18px/1 ui-monospace, Consolas, monospace; }
.plan-picker input:checked + span { border-color: var(--navy); background: var(--navy-soft); box-shadow: inset 4px 0 0 var(--navy); }
.plan-picker input:focus-visible + span { outline: 3px solid rgba(31, 69, 110, .22); outline-offset: 2px; }
.plan-picker input:disabled + span { opacity: .55; cursor: not-allowed; }
.discount-plan-picker label { grid-column: 1 / -1; }
.product-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; margin-bottom: 20px; border: 1px solid var(--line); background: #f7f9fb; }
.referral-entry { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 9px 0 2px; color: var(--muted); font-size: 12px; }
.referral-entry button { padding: 4px 0; background: transparent; color: var(--navy); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.product-card small, .product-card strong { display: block; }
.product-card small { color: #788599; }
.product-card strong { margin-top: 5px; color: var(--ink); font-size: 14px; line-height: 1.45; word-break: keep-all; }
.hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.beginner-guide { margin: 0 0 5px; padding: 14px 15px; border: 1px solid #c7d2df; border-left: 4px solid var(--navy); background: #f5f8fc; }
.beginner-guide > strong { color: var(--navy); font-family: "Noto Serif SC", STSong, SimSun, serif; font-size: 14px; }
.beginner-guide ol { margin: 9px 0 0; padding-left: 20px; color: #536176; font-size: 12px; line-height: 1.75; }
.beginner-guide li::marker { color: var(--navy); font-weight: 700; }
.sold-out { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 13px 14px; border: 1px solid #dcb7ba; border-left: 4px solid var(--red); background: #fff4f4; color: var(--red); font-size: 13px; line-height: 1.55; }
.sold-out strong { flex: 0 0 auto; font-family: "Noto Serif SC", STSong, SimSun, serif; }
.sold-out.is-manual-stock { flex-direction: column; align-items: flex-start; border-color: #e3c578; border-left-color: #b58b13; background: #fff9e9; color: #765806; }
.sold-out.is-manual-stock button { margin: 0; }
.manual-stock-notice { margin-top: 14px; padding: 14px; border: 1px solid #e3c578; border-left: 4px solid #b58b13; background: #fff9e9; }
.manual-stock-notice strong { display: block; color: #765806; font-size: 14px; line-height: 1.6; }
.manual-stock-notice p { margin: 6px 0 12px; color: #765806; font-size: 13px; line-height: 1.75; }
.manual-stock-notice .secondary { width: auto; margin: 0; padding: 9px 12px; font-size: 13px; }
.direct-recharge { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin-top: 11px; border: 1px solid #aebdce; background: #fff; color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 650; transition: .2s; }
.direct-recharge:hover { border-color: var(--navy); background: var(--navy-soft); }
.pending-order { margin-top: 15px; padding: 14px; border: 1px solid #b8c6d6; background: #f3f7fb; }
.pending-order > div:first-child strong, .pending-order > div:first-child span { display: block; }
.pending-order > div:first-child strong { color: var(--navy); font-family: "Noto Serif SC", STSong, SimSun, serif; }
.pending-order > div:first-child span { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.pending-order > div:last-child { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.pending-order .secondary { height: 40px; }
.text-button { padding: 8px 4px; background: transparent; color: #7a5860; font-size: 13px; font-weight: 500; }
.text-button:hover { color: var(--red); }
.payment-back { width: 100%; margin-top: 15px; }
.amount-box { padding: 18px 17px; border: 2px solid #c98136; border-left-width: 6px; background: #fff9eb; text-align: center; box-shadow: 0 8px 22px rgba(174,112,31,.1); }
.amount-box small { color: #7b561d; font-size: 14px; font-weight: 750; letter-spacing: .04em; }
.amount-box strong { display: flex; justify-content: center; align-items: baseline; gap: 5px; margin: 8px 0 5px; color: var(--navy); }
.amount-box strong span { font-size: 20px; }
.amount-box strong b { font: 800 42px/1 ui-monospace, Consolas, monospace; }
.amount-box p { margin: 11px auto 0; padding-top: 10px; border-top: 1px solid #e4c995; color: var(--red); font-size: 14px; font-weight: 650; line-height: 1.55; }
.amount-box p b { display: inline-block; margin-right: 6px; padding: 1px 6px; background: var(--red); color: #fff; }
.order-reference { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-top: 0; background: #f7f9fb; color: var(--muted); font-size: 12px; }
.order-reference b { margin-left: 5px; color: var(--navy); font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.order-reference button, .issued-order-reference button { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #b9c4d0; background: #fff; color: var(--navy); font-size: 11px; }
.deadline-warning { margin: 14px 0 0; padding: 10px 12px; border: 1px solid #e0b7ba; background: #fff5f5; color: var(--red); text-align: center; font-size: 13px; font-weight: 650; line-height: 1.55; }
.deadline-warning b { margin-right: 5px; }
.payment-code { display: block; width: min(100%, 290px); max-height: 330px; object-fit: cover; object-position: center 70%; margin: 18px auto; border: 1px solid var(--line); }
.mobile-pay-tip { margin: -7px 0 14px; color: #59677b; text-align: center; font-size: 12px; line-height: 1.65; }
.mobile-pay-tip b { color: var(--navy); }
.payment-meta { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.payment-meta strong { min-width: 64px; color: var(--navy); text-align: right; font: 800 17px/1 ui-monospace, Consolas, monospace; }
.payment-meta strong.is-urgent { color: var(--red); animation: countdown-pulse 1s ease-in-out infinite; }
@keyframes countdown-pulse { 50% { opacity: .58; } }
.expired-order { padding: 22px 18px; border: 1px solid #d59b9f; border-top: 4px solid var(--red); background: #fff4f4; color: #71383c; text-align: center; }
.expired-order > span { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 11px; border: 2px solid var(--red); border-radius: 50%; color: var(--red); font-size: 22px; font-weight: 800; }
.expired-order h3 { margin: 0; color: var(--red); font-family: "Noto Serif SC", STSong, SimSun, serif; font-size: 21px; }
.expired-order p { margin: 10px auto 0; max-width: 420px; font-size: 13px; line-height: 1.75; }
.expired-order p b { color: var(--red); font-family: ui-monospace, Consolas, monospace; }
.payment-note { display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 0; color: #647188; font-size: 12px; line-height: 1.6; }
.payment-note i { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #e9f3ef; }
#payment-stage.is-expired .payment-note { padding: 11px 12px; border: 1px solid #e0b7ba; background: #fff8f8; color: var(--red); font-weight: 650; }
#payment-stage.is-expired .payment-note i { background: var(--red); box-shadow: 0 0 0 4px #f9e9ea; }
.payment-check { width: 100%; margin-top: 14px; border-color: var(--navy); color: var(--navy); }
.issued-order-reference { display: flex; align-items: center; gap: 9px; margin: -11px 0 13px; color: var(--muted); font-size: 12px; }
.issued-order-reference b { color: var(--navy); font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.issued-card { padding: 18px; border: 1px solid #9ebbac; background: #f2f8f5; }
.issued-card > small { color: #5d756c; font-size: 13px; font-weight: 650; }
.issued-card > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-top: 10px; }
.issued-card code { min-width: 0; overflow-wrap: anywhere; padding: 12px; border: 1px dashed #84a998; background: #fff; color: #174c3d; font: 700 16px/1.5 ui-monospace, Consolas, monospace; user-select: all; }
.issued-card .secondary { height: 48px; }
.preserve-warning { margin-top: 15px; padding: 14px; border: 1px solid #d8c78d; border-left: 4px solid #b0912a; background: #fffbef; color: #66551e; }
.preserve-warning strong { font-family: "Noto Serif SC", STSong, SimSun, serif; }
.preserve-warning p { margin: 6px 0 0; font-size: 13px; line-height: 1.7; }
.handoff-note { margin: 11px 0 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.consent { display: flex; gap: 10px; margin: 15px 0 20px; color: #67758a; font-size: 13px; line-height: 1.6; font-weight: 400; cursor: pointer; }
.consent input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--navy); }

.status-card { border: 1px solid var(--line); background: #f8fafc; padding: 19px; }
.progress-label { display: flex; justify-content: space-between; color: #657287; font-size: 13px; }
.progress-label strong { color: var(--navy); font-family: ui-monospace, monospace; }
.progress-track { height: 7px; margin-top: 12px; overflow: hidden; background: #dce3eb; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--navy); transition: width .45s ease; }
.status-card p { margin: 16px 0 0; color: #435168; font-size: 14px; line-height: 1.65; }
.status-card > small { display: block; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); color: #778397; font-family: ui-monospace, monospace; }
.status-card > small:empty { display: none; }
.status-steps { margin-top: 13px; }
.status-step { display: flex; align-items: center; gap: 10px; padding: 8px 4px; color: #58667b; font-size: 13px; }
.status-step i { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #8290a4; font-style: normal; }
.status-step.done i { border-color: #a6c2b5; background: #eff7f3; color: var(--green); }
.spinner { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error { display: flex; align-items: flex-start; gap: 10px; margin-top: 17px; padding: 12px; border: 1px solid #dcb7ba; background: #fff4f4; color: var(--red); font-size: 13px; }
.error span { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-weight: 800; }
.error p { margin: 0; line-height: 1.5; }
.support-card { margin-top: 16px; padding: 15px; border: 1px solid #dcb7ba; border-left: 4px solid var(--red); background: #fff7f7; color: #71383c; }
.support-card strong { font-family: "Noto Serif SC", STSong, SimSun, serif; }
.support-card p { margin: 7px 0 0; font-size: 13px; line-height: 1.65; }
.support-card img { display: block; width: min(100%, 260px); max-height: 330px; margin: 14px auto 0; object-fit: contain; border: 1px solid #ead4d5; background: #fff; }
.privacy { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); color: #7b8798; font-size: 12px; }

.admin-body { background: #eef2f6; }
.admin-shell { width: min(1480px, calc(100% - 36px)); margin: 48px auto; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid #bdc8d5; }
.admin-header small { color: var(--navy); font: 700 12px/1 ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.admin-header h1 { margin: 10px 0 8px; font-size: clamp(30px, 5vw, 45px); }
.admin-header p { margin: 0; color: var(--muted); line-height: 1.7; }
.admin-header > span { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #b89499; background: #fff4f4; color: var(--red); font-size: 13px; }
.inventory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.inventory-grid > div { padding: 20px; border: 1px solid #cbd4de; background: #fff; }
.inventory-grid > .metric-primary { border-top: 3px solid var(--navy); background: #f7fafe; }
.inventory-grid small, .inventory-grid strong { display: block; }
.inventory-grid small { color: var(--muted); font-size: 13px; }
.inventory-grid strong { margin-top: 8px; color: var(--navy); font: 700 28px/1 ui-monospace, Consolas, monospace; }
.anomaly-panel { margin: 22px 0; }
.anomaly-count { padding: 7px 10px; border: 1px solid #c5ced8; background: #f5f7fa; color: var(--muted); font-size: 12px; white-space: nowrap; }
.anomaly-count.has-anomalies { border-color: #dcb7ba; background: #fff4f4; color: var(--red); font-weight: 700; }
.anomaly-table { min-width: 900px; }
.anomaly-table-wrap { margin-top: 16px; max-height: 360px; overflow: auto; }
.anomaly-table .card-status { min-width: 118px; text-align: center; }
.anomaly-table td:nth-child(2) { color: var(--red); font: 750 14px/1.5 ui-monospace, Consolas, monospace; white-space: nowrap; }
.admin-panel { padding: 28px; border: 1px solid #cbd4de; border-top: 4px solid var(--navy); background: #fff; box-shadow: 0 18px 50px rgba(30,53,78,.08); }
.admin-panel .panel-heading { align-items: center; }
.admin-panel .secondary { height: 40px; }
.admin-help { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.admin-result { margin-top: 17px; padding: 13px; border: 1px solid #9ebbac; background: #eff7f3; color: var(--green); font-size: 14px; }
.admin-result.error-state { border-color: #dcb7ba; background: #fff4f4; color: var(--red); }
.generated-codes { margin-top: 17px; padding: 18px; border: 1px solid #9ebbac; background: #f4faf7; }
.generated-codes > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.generated-codes small, .generated-codes strong { display: block; }
.generated-codes small { color: var(--muted); font-size: 12px; }
.generated-codes strong { margin-top: 4px; color: var(--green); }
.generated-codes textarea { min-height: 130px; margin-top: 14px; background: #fff; color: var(--navy); font-size: 14px; }
.generated-codes p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.library-panel { margin-top: 22px; }
.library-actions { display: flex; align-items: center; gap: 12px; }
.auto-refresh-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 12px; white-space: nowrap; }
.auto-refresh-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #e9f3ef; }
.auto-refresh-badge.refresh-error { color: var(--red); }
.auto-refresh-badge.refresh-error i { background: var(--red); box-shadow: 0 0 0 4px #f9e9ea; }
.sensitive-note { margin: -12px 0 16px; color: #8a5d18; }
.daily-sales { margin: 0 0 20px; padding: 18px; border: 1px solid #b8c6d5; background: #f8fafc; }
.daily-sales-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.daily-sales-heading small, .daily-sales-heading h3 { display: block; }
.daily-sales-heading small { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.daily-sales-heading h3 { margin: 5px 0 0; color: var(--navy); font-size: 18px; }
.daily-sales-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.daily-sales-heading label { flex: 0 0 190px; color: var(--muted); font-size: 12px; }
.daily-sales-heading input { width: 100%; height: 40px; margin-top: 6px; border: 1px solid #bdc8d5; background: #fff; color: var(--ink); padding: 0 10px; }
.daily-sales-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0; }
.daily-sales-metrics > div { padding: 13px; border: 1px solid var(--line); background: #fff; }
.daily-sales-metrics small, .daily-sales-metrics strong { display: block; }
.daily-sales-metrics small { color: var(--muted); font-size: 12px; }
.daily-sales-metrics strong { margin-top: 5px; color: var(--navy); font: 700 21px/1.2 ui-monospace, Consolas, monospace; }
.daily-sales-metrics .daily-success { border-left: 3px solid var(--green); }
.daily-sales-metrics .daily-failed { border-left: 3px solid var(--red); }
.daily-sales-table { min-width: 1380px; }
.daily-sales-table-wrap { max-height: 420px; overflow: auto; }
.daily-sales-table th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
.daily-outcome { display: inline-block; min-width: 58px; padding: 5px 8px; border: 1px solid #ccb77b; background: #fff9e9; color: #87670e; text-align: center; white-space: nowrap; font-size: 12px; }
.daily-outcome-success { border-color: #9ebbac; background: #eff7f3; color: var(--green); }
.daily-outcome-failed { border-color: #dcb7ba; background: #fff4f4; color: var(--red); }
.daily-detail-cell { min-width: 240px; }
.daily-detail-cell strong, .daily-detail-cell span { display: block; }
.daily-detail-cell strong { color: var(--ink); font-size: 12px; }
.daily-detail-cell span { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.card-filters { display: grid; grid-template-columns: minmax(190px, 230px) minmax(170px, 220px) minmax(210px, 260px) auto 1fr; align-items: end; gap: 12px; margin: 0 0 16px; padding: 15px; border: 1px solid var(--line); background: #f7f9fb; }
.card-filters label { margin-bottom: 6px; font-size: 12px; }
.card-filters input, .card-filters select { width: 100%; height: 40px; border: 1px solid #bdc8d5; border-radius: 2px; background: #fff; color: var(--ink); padding: 0 11px; }
.card-filters .secondary { height: 40px; }
.card-filters > p { align-self: center; margin: 16px 0 0; color: var(--muted); text-align: right; font-size: 12px; line-height: 1.5; }
.card-table-wrap { overflow-x: auto; border: 1px solid var(--line); scrollbar-color: #8ea0b5 #edf1f5; scrollbar-width: auto; }
.card-table-wrap::-webkit-scrollbar { width: 14px; height: 14px; }
.card-table-wrap::-webkit-scrollbar-track { background: #edf1f5; }
.card-table-wrap::-webkit-scrollbar-thumb { border: 3px solid #edf1f5; background: #8ea0b5; }
.library-panel .card-table-wrap { max-height: 70vh; overflow: scroll; scrollbar-gutter: stable both-edges; }
.card-table { width: 100%; min-width: 2110px; border-collapse: collapse; background: #fff; }
.card-table th { padding: 11px 12px; border-bottom: 1px solid var(--line); background: #f4f7fa; color: var(--muted); text-align: left; font-size: 12px; font-weight: 650; }
.library-panel .card-table th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
.card-table td { padding: 12px; border-bottom: 1px solid #e3e8ee; color: #435168; font-size: 13px; vertical-align: top; }
.card-table tr:last-child td { border-bottom: 0; }
.card-code { display: flex; align-items: flex-start; gap: 8px; }
.card-code code { min-width: 0; color: var(--navy); font: 600 12px/1.55 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.copy-code { flex: 0 0 auto; padding: 4px 7px; border: 1px solid #c6d0db; background: #fff; color: var(--muted); font-size: 11px; }
.copy-code:hover { border-color: var(--navy); color: var(--navy); }
.destroy-card { min-width: 72px; padding: 7px 9px; border: 1px solid #c99198; background: #fff4f4; color: var(--red); white-space: nowrap; font-size: 12px; }
.destroy-card:hover:not(:disabled) { border-color: var(--red); background: #fdebed; }
.destroy-card:disabled { border-color: #d8dee5; background: #f4f6f8; color: #9aa5b3; cursor: not-allowed; }
.invalidate-card { min-width: 104px; padding: 7px 9px; border: 1px solid #b88b32; background: #fff9e9; color: #7b580e; white-space: nowrap; font-size: 12px; }
.invalidate-card:hover:not(:disabled) { border-color: #8e6717; background: #fff1c8; }
.invalidate-card:disabled { border-color: #d8dee5; background: #f4f6f8; color: #9aa5b3; cursor: not-allowed; }
.invalidated-note { max-width: 260px; margin-top: 7px; padding: 5px 7px; border-left: 3px solid var(--red); background: #fff2f2; color: var(--red); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.card-status { display: inline-block; padding: 5px 8px; border: 1px solid #c5ced8; background: #f5f7fa; color: #5b687a; white-space: nowrap; font-size: 12px; }
.status-unused { border-color: #9ebbac; background: #eff7f3; color: var(--green); }
.status-waiting_payment, .status-issued, .status-verifying, .status-reserved, .status-processing { border-color: #ccb77b; background: #fff9e9; color: #87670e; }
.status-used { border-color: #9badc4; background: #f0f5fb; color: var(--navy); }
.status-failed, .status-disabled { border-color: #dcb7ba; background: #fff4f4; color: var(--red); }
.payment-amount-cell { white-space: nowrap; color: var(--navy) !important; font: 700 13px/1.5 ui-monospace, Consolas, monospace; }
.email-cell { min-width: 190px; overflow-wrap: anywhere; color: var(--navy) !important; }
.provider-picker { width: min(100%, 420px); margin: 7px 0 14px; }
.provider-routing { display: grid; grid-template-columns: 1fr minmax(180px, 260px) auto; align-items: center; gap: 12px; margin: 4px 0 0; padding: 14px; border: 1px solid #b8c6d5; background: #f5f8fb; }
.provider-routing small, .provider-routing strong { display: block; }
.provider-routing small { color: var(--muted); font-size: 12px; }
.provider-routing strong { margin-top: 3px; color: var(--navy); font-size: 15px; }
.zovo-generator { display: grid; grid-template-columns: 1fr 240px 100px auto; align-items: end; gap: 12px; margin-top: 16px; padding: 16px; border: 1px solid #91b6a7; border-left: 4px solid var(--green); background: #f1f8f5; }
.zovo-generator small, .zovo-generator strong, .zovo-generator span { display: block; }
.zovo-generator small { color: var(--muted); font-size: 12px; }
.zovo-generator strong { margin-top: 4px; color: var(--green); font-size: 16px; }
.generation-status { margin-top: 5px; color: #9a6a13; font-size: 12px; }
.generation-status.is-ready { color: var(--green); }
.zovo-generator label { margin: 0; color: var(--muted); font-size: 12px; }
.zovo-generator input, .zovo-generator select { margin-top: 5px; }
.provider-badge { display: inline-flex; min-width: 68px; justify-content: center; padding: 5px 8px; border: 1px solid #9aadc2; background: #f3f7fb; color: var(--navy); font-size: 12px; font-weight: 700; white-space: nowrap; }
.provider-badge.provider-zovo { border-color: #91b6a7; background: #f1f8f5; color: #17604a; }
.channel-stock { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.channel-stock span { padding: 4px 8px; border: 1px solid var(--line); background: #f7f9fb; color: var(--muted); font-size: 12px; }
.channel-stock b { margin-left: 4px; color: var(--navy); }
.card-note-input { width: 220px; height: 34px; padding: 0 9px; border: 1px solid #c5ced8; background: #fff; font-size: 12px; }
.final-status-select { min-width: 100px; height: 34px; border: 1px solid #c5ced8; border-radius: 2px; background: #fff; color: #5b687a; padding: 0 8px; font-size: 12px; }
.final-status-select.final-pending { border-color: #ccb77b; background: #fff9e9; color: #87670e; }
.final-status-select.final-completed { border-color: #9ebbac; background: #eff7f3; color: var(--green); }
.final-status-select.final-refunded, .final-status-select.final-replaced { border-color: #9badc4; background: #f0f5fb; color: var(--navy); }
.final-status-select:disabled { background: #f4f6f8; color: #9aa5b3; }
.order-cell { max-width: 160px; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; }
.card-table-empty { margin: 0; padding: 30px; background: #fff; color: var(--muted); text-align: center; }
.lookup-panel { margin-top: 22px; }
.lookup-result { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 18px; border: 1px solid var(--line); background: var(--line); }
.lookup-result > div { min-width: 0; padding: 12px; background: #f9fbfc; }
.lookup-result span, .lookup-result strong { display: block; }
.lookup-result span { color: var(--muted); font-size: 12px; }
.lookup-result strong { margin-top: 5px; overflow-wrap: anywhere; color: var(--ink); font: 600 13px/1.5 ui-monospace, Consolas, monospace; }
.lookup-result.error-state { display: block; padding: 13px; border-color: #dcb7ba; background: #fff4f4; color: var(--red); }

footer { position: relative; max-width: 1160px; margin: auto; border-top: 1px solid var(--line); padding: 24px 28px; display: flex; justify-content: space-between; gap: 20px; color: #748095; font-size: 12px; }
footer p { margin: 0; }
.maintenance-screen { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 28px; background: rgba(247,248,250,.97); text-align: center; }
.maintenance-screen > div { width: min(560px, 100%); padding: 54px 35px; border: 1px solid #cbd4de; border-top: 5px solid var(--navy); background: #fff; box-shadow: 0 22px 70px rgba(30,53,78,.12); }
.maintenance-screen span { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; border: 1px solid var(--navy); color: var(--navy); font-size: 30px; }
.maintenance-screen small { color: var(--navy); font: 700 12px/1 ui-monospace, Consolas, monospace; letter-spacing: .14em; }
.maintenance-screen h1 { margin: 16px 0 13px; font-size: clamp(30px, 6vw, 43px); letter-spacing: -.025em; }
.maintenance-screen p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.support-fab { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 17px; border: 1px solid var(--navy); background: var(--navy); color: #fff; box-shadow: 0 10px 28px rgba(23,63,115,.22); font-size: 14px; }
.support-fab:hover { background: #0f315d; transform: translateY(-1px); }
.support-fab span { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; font-weight: 800; }
.plan-announcement { margin: 24px 0; padding: 18px 20px; border: 1px solid #c7d2df; border-left: 4px solid var(--navy); background: #f5f8fc; }
.plan-announcement-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--navy); font-size: 15px; }
.plan-announcement-head button { padding: 4px 0; background: transparent; color: var(--navy); font-size: 12px; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.plan-multipliers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.plan-multipliers > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.plan-multipliers dt { color: var(--ink); font-size: 14px; font-weight: 700; }
.plan-multipliers dd { margin: 0; color: var(--navy); font: 800 18px/1.2 ui-monospace, Consolas, monospace; }
.plan-announcement > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.plan-announcement > p + p { margin-top: 8px; }
.home-invite { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--green); background: var(--surface); text-align: left; }
.home-invite h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--ink); font: 700 18px/1.4 "Noto Serif SC", SimSun, serif; }
.home-invite h2 .member-icon { color: var(--green); }
.home-invite p { margin: 5px 0; color: #47566a; font-size: 13px; line-height: 1.75; }
#home-invite-action { margin-top: 8px; padding: 9px 15px; color: white; background: var(--navy); font-size: 13px; }
#home-invite-action:hover { background: #24588f; }
.home-partner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 15px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.home-partner button { padding: 5px 0; color: var(--navy); background: transparent; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.notice-references { margin-top: 14px; border-top: 1px solid #c7d2df; padding-top: 12px; }
.notice-references summary { cursor: pointer; color: var(--navy); font-size: 13px; font-weight: 700; }
.notice-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.notice-gallery figure { min-width: 0; margin: 0; border: 1px solid var(--line); background: #fff; }
.notice-gallery a { display: block; position: relative; color: #fff; background: #101820; text-decoration: none; }
.notice-gallery img { display: block; width: 100%; height: 132px; object-fit: contain; }
.notice-gallery a > span { display: block; padding: 6px 8px; color: #fff; background: #203247; font-size: 11px; text-align: center; }
.notice-gallery a:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.notice-gallery figcaption { padding: 10px 12px; }
.notice-gallery figcaption strong, .notice-gallery figcaption span { display: block; font-size: 12px; line-height: 1.6; }
.notice-gallery figcaption strong { color: var(--ink); }
.notice-gallery figcaption span { margin-top: 3px; color: var(--muted); }
.notice-reference-section { margin-top: 20px; }
.notice-reference-section h3 { margin: 0; color: var(--ink); font-size: 15px; }
.notice-reference-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.notice-reference-note a { color: var(--navy); text-underline-offset: 2px; }
.plan-notice { width: min(650px, calc(100% - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 1px solid #aebccc; border-top: 5px solid var(--navy); background: #fff; color: var(--ink); box-shadow: 0 28px 80px rgba(20,39,67,.3); }
.plan-notice[open] { display: flex; flex-direction: column; }
.plan-notice-body { min-height: 0; overflow: auto; padding: 24px 26px; }
.plan-notice-footer { flex-shrink: 0; padding: 14px 26px 18px; border-top: 1px solid var(--line); background: #fff; }
.plan-notice::backdrop { background: rgba(18,35,58,.6); }
.plan-notice-body > small { color: var(--navy); font-size: 12px; font-weight: 800; }
.plan-notice h2 { margin: 10px 0 14px; font-size: 25px; }
.plan-notice-body > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.plan-notice-body .notice-plain-note { margin-bottom: 14px; font-size: 12px; }
.plan-notice .plan-region-note { padding: 12px 14px; border-left: 3px solid var(--navy); background: var(--navy-soft); color: var(--ink); }
.plan-notice-footer button { width: 100%; margin: 0; }
.account-reminder { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; padding: 28px; border: 1px solid #c9b87e; border-top: 5px solid #b58b13; background: #fff; color: var(--ink); text-align: center; box-shadow: 0 28px 80px rgba(20,39,67,.3); }
.account-reminder::backdrop { background: rgba(18,35,58,.66); }
.account-reminder small { color: #765806; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.account-reminder h2 { margin: 10px 0 14px; font-size: 26px; }
.account-reminder h2:focus { outline: none; }
.account-reminder p { margin: 0 0 18px; padding: 14px; background: #fff9e9; color: #5f4a14; font-size: 15px; line-height: 1.8; text-align: left; }
.account-reminder .account-reminder-upgrade { background: #f0f5fb; color: #29486b; }
.account-reminder-upgrade strong { display: block; margin-bottom: 4px; font-weight: 700; }
.account-reminder .account-reminder-regions { background: #f5f7fa; color: #405570; font-size: 14px; line-height: 1.75; }
.account-reminder-regions strong { display: block; margin-bottom: 4px; color: var(--navy); }
.account-reminder a { display: inline-block; margin-bottom: 14px; color: var(--navy); font-size: 13px; font-weight: 700; }
.account-reminder .primary { width: 100%; }
.amount-reminder { width: min(430px, calc(100% - 32px)); padding: 28px; border: 1px solid #d7a9a9; border-top: 5px solid var(--red); background: #fff; color: var(--ink); text-align: center; box-shadow: 0 28px 80px rgba(20,39,67,.3); }
.amount-reminder::backdrop { background: rgba(18,35,58,.66); }
.amount-reminder small { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.amount-reminder h2 { margin: 10px 0 16px; font-size: 26px; }
.amount-reminder-value { display: block; padding: 15px 8px; border: 1px solid #ecd2a0; background: #fff9eb; color: var(--navy); font: 800 clamp(36px, 9vw, 48px)/1.2 ui-monospace, Consolas, monospace; }
.amount-reminder p { margin: 18px 0 22px; color: var(--red); font-size: 16px; font-weight: 750; line-height: 1.7; }
.amount-reminder .primary { width: 100%; }
.support-dialog { width: min(470px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 1px solid #aebccc; border-top: 4px solid var(--navy); border-radius: 2px; background: #fff; color: var(--ink); box-shadow: 0 28px 80px rgba(20,39,67,.3); }
.support-dialog::backdrop { background: rgba(18,35,58,.46); }
.support-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 15px; border-bottom: 1px solid var(--line); }
.support-dialog-head small { color: var(--navy); font: 700 11px/1 ui-monospace, Consolas, monospace; letter-spacing: .1em; }
.support-dialog-head h2 { margin: 6px 0 0; font-size: 25px; }
.support-dialog-head button { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 24px; font-weight: 400; }
.support-dialog > p { margin: 18px 24px 12px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.support-refund-notice { display: block; margin: 0 24px 14px; padding: 12px 14px; border: 1px solid #e3c578; border-left: 4px solid #b58b13; background: #fff9e9; color: #765806; font-size: 16px; font-weight: 800; line-height: 1.65; }
.support-wechat-list { display: grid; gap: 16px; margin: 0 24px; }
.support-wechat-list figure { margin: 0; padding: 13px; border: 1px solid var(--line); background: #f8fafc; text-align: center; }
.support-wechat-list figure.is-recommended { border-color: #a6c2b5; background: #eff7f3; }
.support-wechat-list figcaption { margin-bottom: 10px; color: var(--navy); font-size: 14px; font-weight: 800; }
.support-wechat-list figcaption b { margin-left: 6px; padding: 3px 7px; background: var(--green); color: #fff; font-size: 11px; }
.support-wechat-list figcaption span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.support-wechat-list img { display: block; width: min(310px, 100%); max-height: 430px; margin: 0 auto; object-fit: contain; }
.support-dialog-tip { display: block; margin: 13px 24px 22px; color: #748095; text-align: center; }
.service-control { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 22px 0; padding: 20px 24px; border: 1px solid #9ebbac; border-left: 5px solid var(--green); background: #f4faf7; }
.service-control > div { min-width: 0; }
.service-control small, .service-control strong { display: block; }
.service-control small { color: var(--muted); font-size: 12px; }
.service-control strong { margin-top: 6px; color: var(--green); font-size: 20px; }
.service-control p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.service-control.is-paused { border-color: #dcb7ba; border-left-color: var(--red); background: #fff4f4; }
.service-control.is-paused strong { color: var(--red); }
.customer-redemption-control { margin-top: -10px; border-color: #c7b77f; border-left-color: #a77a1d; background: #fffaf0; }
.customer-redemption-control strong { color: #76530c; }
.customer-redemption-control.is-paused { border-color: #dcb7ba; border-left-color: var(--red); background: #fff4f4; }
.customer-redemption-control.is-paused strong { color: var(--red); }
.alipay-monitor-control { align-items: flex-start; }
.alipay-monitor-control.is-alert { border-color: #dcb7ba; border-left-color: var(--red); background: #fff4f4; }
.alipay-monitor-control.is-alert strong { color: var(--red); }
.alipay-monitor-control.is-warning { border-color: #d8c78d; border-left-color: #b0912a; background: #fffbef; }
.alipay-monitor-control.is-warning strong { color: #806819; }
.monitor-details { flex: 0 0 min(54%, 720px); display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 8px; margin: 0; }
.monitor-details > div { min-width: 0; padding: 9px 11px; border: 1px solid rgba(80, 100, 125, .18); background: rgba(255,255,255,.68); }
.monitor-details dt { color: var(--muted); font-size: 11px; }
.monitor-details dd { overflow-wrap: anywhere; margin: 4px 0 0; color: var(--navy); font: 650 12px/1.4 ui-monospace, Consolas, monospace; }
.internal-site-panel { display: grid; grid-template-columns: minmax(320px, 1fr) auto; align-items: center; gap: 18px 34px; margin-top: -10px; padding: 24px 28px; border-left: 5px solid #526f94; background: #f8fafd; }
.internal-site-panel > div { min-width: 280px; }
.internal-site-panel small { display: inline-flex; padding: 5px 8px; border: 1px solid #bdc9d7; background: #fff; color: #526f94; font: 700 11px/1 ui-monospace, Consolas, monospace; letter-spacing: .08em; white-space: nowrap; }
.internal-site-panel h2 { margin: 9px 0 0; color: var(--navy); font-size: 22px; line-height: 1.3; white-space: nowrap; }
.internal-site-panel .admin-help { max-width: 760px; margin: 7px 0 0; font-size: 14px; line-height: 1.7; }
.internal-site-link { display: inline-flex; align-items: center; justify-content: center; min-width: 168px; min-height: 44px; padding: 0 20px; text-decoration: none; white-space: nowrap; }
.danger-action { flex: 0 0 auto; min-width: 120px; height: 42px; padding: 0 17px; border: 1px solid var(--red); background: var(--red); color: #fff; }
.danger-action:hover:not(:disabled) { background: #7e2f35; }
.danger-action.resume-action { border-color: var(--green); background: var(--green); }
.danger-action.resume-action:hover:not(:disabled) { background: #245c4b; }
[hidden] { display: none !important; }

@media (max-width: 850px) {
  .shell { grid-template-columns: 1fr; padding-top: 40px; gap: 54px; }
  .intro { text-align: center; margin: auto; }
  .intro > p { margin: auto; }
  .stepper { margin-left: auto; margin-right: auto; text-align: left; }
  .panel-wrap { width: min(100%, 560px); margin: auto; }
  .internal-site-panel { grid-template-columns: 1fr; }
  .internal-site-panel > div { min-width: 0; }
  .internal-site-link { justify-self: start; }
}

@media (max-width: 540px) {
  .account-reminder { padding: 20px; }
  .plan-notice-body { padding: 20px; }
  .plan-notice-footer { padding: 12px 20px 16px; }
  .notice-gallery { grid-template-columns: 1fr; }
  .notice-gallery img { height: 150px; }
  .plan-picker { grid-template-columns: 1fr; }
  .topbar, .shell, footer { padding-left: 18px; padding-right: 18px; }
  .connection { display: none; }
  .shell { padding-top: 28px; }
  .eyebrow { font-size: 12px; }
  h1 { font-size: 39px; }
  .intro > p { font-size: 15px; }
  .stepper li { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px; }
  .panel { padding: 23px; }
  .panel h2 { font-size: 22px; }
  .internal-site-panel { gap: 16px; padding: 22px; }
  .internal-site-link { width: 100%; }
  .product-card { grid-template-columns: 1fr; }
  .payment-code { max-height: 300px; }
  .issued-card > div { grid-template-columns: 1fr; }
  .admin-shell { margin: 24px auto; }
  .admin-header { display: block; }
  .admin-header > span { display: inline-block; margin-top: 16px; }
  .inventory-grid { grid-template-columns: repeat(2, 1fr); }
  .provider-routing { grid-template-columns: 1fr; }
  .zovo-generator { grid-template-columns: 1fr; align-items: stretch; }
  .generated-codes > div { align-items: flex-start; }
  .lookup-result { grid-template-columns: 1fr; }
  .admin-panel { padding: 22px; }
  .card-filters { grid-template-columns: 1fr; }
  .daily-sales-heading { align-items: stretch; flex-direction: column; }
  .daily-sales-heading label { flex-basis: auto; }
  .daily-sales-metrics { grid-template-columns: repeat(2, 1fr); }
  .card-filters > p { margin: 0; text-align: left; }
  .service-control { align-items: stretch; flex-direction: column; gap: 16px; }
  .monitor-details { flex-basis: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-actions { align-items: flex-end; flex-direction: column; gap: 7px; }
  .danger-action { width: 100%; }
  footer { flex-direction: column; text-align: center; }
  .support-fab { right: 14px; bottom: 14px; }
}
.payment-card-fields { margin: 20px 0; }
.pro-record-tools { display: flex; align-items: flex-end; gap: 20px; margin: 18px 0; }
.pro-record-panel .card-table { min-width: 1000px; table-layout: fixed; }
.pro-record-panel .card-table th:nth-child(1) { width: 115px; }
.pro-record-panel .card-table th:nth-child(2) { width: 205px; }
.pro-record-panel .card-table th:nth-child(3) { width: 120px; }
.pro-record-panel .card-table th:nth-child(4) { width: 200px; }
.pro-record-panel .card-table th:nth-child(5) { width: 95px; }
.pro-record-panel .card-table th:nth-child(6) { width: 105px; }
.pro-record-panel .card-table th:nth-child(7) { width: 65px; }
.pro-record-panel .card-table th:nth-child(8) { width: 135px; }
.pro-record-panel .card-code { flex-wrap: wrap; }

.usage-announcement { border-left-width: 4px; }
.usage-announcement-highlight, .usage-notice-highlight { display: flex; align-items: center; gap: 18px; }
.usage-announcement-highlight { margin: 18px 0 14px; }
.usage-announcement-highlight > strong { color: var(--navy); font: 800 44px/1 ui-monospace, Consolas, monospace; }
.usage-announcement-highlight b { color: var(--navy); font-size: 15px; }
.usage-announcement-highlight p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.usage-notice { width: min(720px, calc(100% - 32px)); }
.usage-notice h2 { margin-bottom: 20px; font-size: 29px; }
.usage-notice-highlight { padding: 20px; border: 1px solid #cfdded; background: #edf4fc; }
.usage-notice-highlight > strong { flex: 0 0 auto; color: var(--navy); font: 800 60px/1 ui-monospace, Consolas, monospace; letter-spacing: -.05em; }
.usage-notice-highlight b { display: block; color: var(--navy); font-size: 17px; }
.usage-notice-highlight p { margin: 7px 0 0; color: #405570; font-size: 14px; line-height: 1.7; }
.usage-plan-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.usage-plan-tags span { padding: 7px 12px; border: 1px solid #d3deeb; color: var(--navy); background: #f7fafe; font-size: 13px; font-weight: 700; }
.usage-notice-body, .usage-notice-figure { min-width: 0; }
.plan-notice-body > .usage-notice-scope { font-size: 12px; line-height: 1.7; }
.usage-notice-figure { margin: 20px 0 0; }
.usage-notice-figure a { display: block; background: #080808; border: 1px solid #d5dce5; }
.usage-notice-figure img { display: block; width: 100%; height: auto; }
.usage-notice-figure figcaption { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
@media (max-width: 540px) {
  .usage-notice h2 { font-size: 25px; }
  .usage-notice-highlight { align-items: flex-start; gap: 14px; padding: 16px; }
  .usage-notice-highlight > strong { font-size: 46px; }
  .usage-notice-highlight b { font-size: 15px; }
  .usage-announcement-highlight { gap: 14px; }
  .usage-announcement .plan-announcement-head { align-items: flex-start; }
  .usage-announcement .plan-announcement-head strong { font-size: 14px; }
}
.pro-record-panel .card-code code { width: 100%; font-size: 13px; word-break: break-all; }
.pro-record-panel td small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 400; overflow-wrap: anywhere; }
.pro-record-panel td.pro-remaining { color: var(--green); font-weight: 750; }
.pro-record-panel td.pro-exhausted { color: var(--red); }
.pro-record-panel .card-table-wrap { max-height: 60vh; overflow: auto; }
.pro-record-tools label { display: grid; gap: 8px; flex: 1; max-width: 500px; margin: 0; }
.pro-record-tools input { width: 100%; padding: 12px; border: 1px solid #d9dfe6; border-radius: 8px; }
@media (max-width: 800px) { .pro-record-tools { display: block; } }
.payment-card-fields fieldset { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.payment-card-fields fieldset { min-width: 0; padding: 18px; border: 1px solid var(--line, #d9dfe6); }
.payment-card-fields legend { padding: 0 8px; font-weight: 700; }
.payment-card-fields label { display: grid; gap: 8px; margin: 0; align-content: start; min-width: 0; }
.payment-card-fields label:last-child { margin-bottom: 0; }
.payment-card-fields select { width: 100%; min-width: 0; padding: 12px; background: #fff; color: #182a40; border: 1px solid #d9dfe6; }
.payment-card-pool { min-width: 0; padding: 14px; background: #f6f8fb; border: 1px solid #d9dfe6; border-radius: 12px; }
.payment-card-pool h3 { margin: 0 0 14px; font-size: 17px; }
.payment-card-priority { padding: 0; margin: 0; list-style: none; }
.payment-card-priority li { padding: 10px 0; border-bottom: 1px solid #d9dfe6; }
.payment-card-priority li > span { display: block; font-size: 14px; overflow-wrap: anywhere; }
.payment-card-usage { display: block; margin-top: 5px; color: #52657b; line-height: 1.6; }
.payment-card-usage.cooling { color: #ae571a; }
.payment-card-row-actions { display: flex; gap: 6px; margin-top: 8px; }
.payment-card-row-actions { flex-wrap: wrap; }
.payment-card-hidden { margin: 12px 0; color: #5b6675; }
.payment-card-hidden summary { cursor: pointer; font-size: 13px; }
.payment-card-row-actions .secondary { padding: 6px 9px; font-size: 12px; }
.payment-card-pool .admin-help { margin: 12px 0; }
.payment-card-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.payment-card-actions .admin-help { flex: 1; }
.payment-card-actions .primary { width: auto; flex: 0 0 auto; }
@media (max-width: 800px) { .payment-card-fields fieldset { grid-template-columns: 1fr; } .payment-card-actions { flex-direction: column; align-items: stretch; } }
