:root {
  --page: #fff9f3;
  --surface: #ffffff;
  --surface-soft: #fffaf6;
  --ink: #2c1d17;
  --muted: #8d837e;
  --line: #eadfd7;
  --line-strong: #ddcec4;
  --orange: #ff7100;
  --orange-dark: #ed5d00;
  --coral: #ff365c;
  --green: #36a956;
  --green-soft: #e9f8ed;
  --amber: #f0a116;
  --amber-soft: #fff7df;
  --red: #e94b4b;
  --red-soft: #fff0ef;
  --shadow: 0 22px 60px rgba(91, 54, 32, 0.09);
  --shadow-small: 0 8px 24px rgba(91, 54, 32, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --focus: 0 0 0 4px rgba(255, 113, 0, 0.13);
  color-scheme: light;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; color: var(--ink); background: var(--page); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.site-header,
.admin-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 249, 243, 0.92);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 20;
}

.brand { display: inline-flex; align-items: center; gap: 14px; font-size: 21px; font-weight: 760; letter-spacing: -0.02em; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, #efffe7, #dfffd0); color: white;
  box-shadow: 0 8px 20px rgba(64, 190, 8, 0.2); overflow: hidden;
}
.brand-mark img { display: block; width: 88%; height: 88%; object-fit: contain; }
.trust-note { display: inline-flex; align-items: center; gap: 8px; color: #5d514a; font-size: 14px; }
.trust-note svg { width: 19px; height: 19px; }
.customer-tools { display: flex; align-items: center; gap: 18px; }
.lookup-entry { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid #b9ddb9; border-radius: 10px; color: #2f7d3c; background: #f5fff4; cursor: pointer; font-size: 13px; font-weight: 720; transition: 180ms ease; }
.lookup-entry:hover { color: #246b32; border-color: #84c889; background: #edffeb; transform: translateY(-1px); }
.lookup-entry:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(54,169,86,.14); }
.lookup-entry svg { width: 17px; height: 17px; }
.accent-rail { position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, #ff9e2f 0%, #ffb14a 30%, var(--coral) 100%); }

/* Customer */
.customer-page { min-height: 100vh; display: flex; flex-direction: column; }
.customer-main {
  flex: 1; width: min(100% - 32px, 760px); margin: 0 auto; padding: clamp(42px, 7vh, 76px) 0 32px;
  display: flex; flex-direction: column; align-items: center;
}
.redemption-shell {
  position: relative; width: 100%; min-height: 680px; overflow: hidden; border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow);
}
.redemption-state { padding: 54px clamp(24px, 7vw, 72px) 46px; animation: state-in 380ms cubic-bezier(.2,.8,.2,1); }
@keyframes state-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.state-heading { text-align: center; margin-bottom: 34px; }
.state-heading h1, .result-state h1 { margin: 0; font-size: clamp(32px, 4.3vw, 45px); line-height: 1.2; letter-spacing: -0.035em; font-weight: 820; }
.state-heading p, .result-state > p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.stepper { list-style: none; display: flex; align-items: flex-start; justify-content: space-between; margin: 0 12px 34px; padding: 0; counter-reset: steps; }
.step { flex: 1; position: relative; display: grid; justify-items: center; gap: 9px; color: #a29a95; font-size: 13px; font-weight: 600; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 1px; background: #ded7d2; }
.step span { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #d8d0ca; background: white; display: grid; place-items: center; z-index: 1; font-weight: 700; transition: 220ms ease; }
.step strong { font-weight: 650; }
.step.is-active { color: var(--orange); }
.step.is-active span { color: white; border-color: var(--orange); background: var(--orange); box-shadow: 0 5px 14px rgba(255,113,0,.22); }
.step.is-complete { color: var(--green); }
.step.is-complete span { color: white; border-color: var(--green); background: var(--green); font-size: 0; }
.step.is-complete span::after { content: "✓"; font-size: 15px; }
.step.is-complete:not(:last-child)::after { background: var(--green); }
.field { display: block; margin-bottom: 19px; }
.field-label { display: block; font-weight: 700; font-size: 14px; margin: 0 0 8px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg, .input-wrap > .icon-button { position: absolute; right: 15px; color: #7c7774; }
.input-wrap > svg { pointer-events: none; }
.input-wrap input {
  width: 100%; height: 55px; padding: 0 50px 0 16px; border: 1px solid #ddd5cf; border-radius: var(--radius-md);
  background: white; color: var(--ink); outline: none; transition: 180ms ease; font-size: 15px;
}
.input-wrap input::placeholder { color: #aaa39f; }
.input-wrap input:hover { border-color: #cfc2b8; }
.input-wrap input:focus { border-color: var(--orange); box-shadow: var(--focus); }
.field.has-error .input-wrap input { border-color: var(--red); }
.field-error { display: block; min-height: 0; color: var(--red); font-size: 12px; margin-top: 5px; }
.field-error:empty { display: none; }
.icon-button { border: 0; padding: 6px; background: transparent; display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.icon-button:hover { background: #f7eee8; }
.icon-button:focus-visible { outline: none; box-shadow: var(--focus); }
.check-row { display: flex; align-items: center; gap: 9px; width: fit-content; cursor: pointer; margin: 4px 0 23px; user-select: none; font-size: 14px; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.custom-check { width: 19px; height: 19px; display: grid; place-items: center; border: 1.5px solid #aaa19a; border-radius: 5px; transition: 160ms ease; }
.custom-check svg { width: 14px; height: 14px; opacity: 0; color: white; stroke-width: 2.6; }
.check-row input:checked + .custom-check { border-color: var(--orange); background: var(--orange); }
.check-row input:checked + .custom-check svg { opacity: 1; }
.check-row input:focus-visible + .custom-check { box-shadow: var(--focus); }
.primary-button, .secondary-button, .outline-button {
  min-height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 20px; border: 1px solid transparent; cursor: pointer; font-weight: 720; transition: 180ms ease; font-size: 14px;
}
.primary-button { color: white; background: linear-gradient(100deg, #ff922f, var(--orange) 68%, #ff6500); box-shadow: 0 10px 22px rgba(255, 113, 0, 0.16); }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(255, 113, 0, 0.22); filter: saturate(1.04); }
.primary-button:active:not(:disabled) { transform: translateY(0); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.secondary-button, .outline-button { color: var(--orange-dark); background: white; border-color: #f2b17c; box-shadow: none; }
.danger-outline-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 17px; border: 1px solid #efb1ae; border-radius: 10px; color: var(--danger); background: white; font: inherit; font-weight: 700; cursor: pointer; }
.danger-outline-button:hover:not(:disabled) { background: #fff4f3; border-color: var(--danger); }
.danger-outline-button:disabled { opacity: .46; cursor: not-allowed; }
.danger-outline-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.trash-type { display: inline-flex; min-width: 48px; justify-content: center; padding: 4px 9px; border-radius: 999px; color: #8a5a35; background: #fff2e7; font-size: 11px; font-weight: 800; }
.trash-type.cdk { color: #52606d; background: #eef2f5; }
.secondary-button:hover, .outline-button:hover { background: #fff8f2; border-color: var(--orange); }
.primary-button:focus-visible, .secondary-button:focus-visible, .outline-button:focus-visible { outline: none; box-shadow: var(--focus); }
.wide { width: 100%; }
.compact { min-height: 42px; padding: 0 18px; }
.primary-button svg, .secondary-button svg, .outline-button svg { width: 18px; height: 18px; }
.button-spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .button-spinner, .table-loading .button-spinner { display: inline-block; }
.is-loading > span:first-child { opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-hint { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 15px 0 0; color: var(--muted); font-size: 13px; }
.form-hint svg { width: 16px; height: 16px; }
.message-banner { padding: 12px 15px; border-radius: 10px; margin: -12px 0 18px; font-size: 13px; }
.message-banner.error { color: #a92f2f; background: var(--red-soft); border: 1px solid #f4cac6; }
.message-banner.info { color: #875600; background: var(--amber-soft); border: 1px solid #f3d99b; }
.message-banner.success { color: #247d3d; background: var(--green-soft); border: 1px solid #bce4c6; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.auth-switch button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: #837872; cursor: pointer; font-size: 13px; font-weight: 680; transition: 180ms ease; }
.auth-switch button:hover { color: var(--ink); }
.auth-switch button.is-active { color: var(--orange-dark); background: white; box-shadow: 0 4px 14px rgba(91,54,32,.08); }
.auth-switch button:focus-visible { outline: none; box-shadow: var(--focus); }
.phone-input-row, .sms-code-row { display: flex; gap: 10px; }
.country-code { width: 72px; height: 55px; flex: 0 0 72px; display: grid; place-items: center; border: 1px solid #ddd5cf; border-radius: var(--radius-md); background: var(--surface-soft); font-weight: 700; }
.phone-input, .sms-code-row .input-wrap { flex: 1; }
.sms-send-button { min-width: 132px; min-height: 55px; flex: 0 0 132px; padding-inline: 12px; }
.sms-privacy { margin: -7px 0 18px; color: var(--muted); font-size: 12px; }
.account-state { padding-top: 42px; }
.account-preview-heading { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 15px; margin-bottom: 25px; }
.account-success-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, #ff9e55, #ff6d4e); box-shadow: 0 8px 20px rgba(255,109,78,.18); }
.account-success-mark svg { width: 23px; height: 23px; stroke-width: 2.5; }
.account-kicker { display: block; margin: 0 0 3px; color: var(--orange-dark); font-size: 12px; font-weight: 760; letter-spacing: .04em; }
.account-preview-heading h1 { margin: 0; font-size: 29px; line-height: 1.2; letter-spacing: -.03em; }
.account-preview-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.product-pill { align-self: center; padding: 6px 11px; border: 1px solid #ffc697; border-radius: 999px; color: var(--orange-dark); background: #fff8f1; font-size: 12px; font-weight: 720; white-space: nowrap; }
.account-state > .message-banner { margin: 0 0 14px; }
.account-detail-list { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; }
.account-detail-list > div { min-height: 58px; display: grid; grid-template-columns: 115px minmax(0, 1fr) 38px; align-items: center; gap: 10px; padding: 0 13px 0 17px; border-bottom: 1px solid #efe6df; }
.account-detail-list > div:last-child { border-bottom: 0; }
.account-detail-list dt, .account-detail-list dd { margin: 0; }
.account-detail-list dt { color: #7d716a; font-size: 13px; font-weight: 680; }
.account-detail-list dd { min-width: 0; overflow-wrap: anywhere; font-weight: 680; }
.account-copy { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: #7c6f67; background: white; cursor: pointer; }
.account-copy:hover { color: var(--orange-dark); border-color: #f1b98e; background: #fff8f2; }
.account-copy svg { width: 17px; height: 17px; }
.account-safety-note { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0; padding: 11px 13px; border: 1px solid #c7e5ce; border-radius: 11px; color: #347547; background: var(--green-soft); font-size: 12px; }
.account-safety-note svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }
.account-state.is-member .account-safety-note { color: #875600; border-color: #f3d99b; background: var(--amber-soft); }
.account-actions { display: grid; grid-template-columns: 1.25fr .75fr; gap: 11px; padding-top: 3px; }
.account-actions button { min-height: 52px; }
.result-state { min-height: 678px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 56px; }
.result-icon { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, #51c96d, #2c9f4a); box-shadow: 0 0 0 14px #eaf8ed, 0 0 0 26px #f4fbf6; margin: 0 0 38px; }
.result-icon svg { width: 50px; height: 50px; stroke-width: 2.5; }
.result-list { width: 100%; margin: 38px 0 32px; padding: 3px 20px; border: 1px solid #bce1c5; border-radius: 16px; background: #fbfefc; text-align: left; }
.result-list > div { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d9e8dc; }
.result-list > div:last-child { border-bottom: 0; }
.result-list dt { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.result-list dt svg { width: 20px; height: 20px; color: var(--green); }
.result-list dd { margin: 0; text-align: right; font-weight: 650; }
.result-state .secondary-button { margin-top: 10px; }
.result-state.is-uncertain .result-icon { background: linear-gradient(145deg, #ffc357, var(--amber)); box-shadow: 0 0 0 14px #fff7e3, 0 0 0 26px #fffbf1; }
.result-state.is-failed .result-icon { background: linear-gradient(145deg, #ff7676, #e5484d); box-shadow: 0 0 0 14px #fff0f0, 0 0 0 26px #fff7f7; }
.success-text { color: var(--green) !important; }
.warning-text { color: var(--amber) !important; }
.danger-text { color: var(--red) !important; }
.muted-number { color: #7f8790 !important; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 13px; margin: 22px 0 0; }
.privacy-note svg { width: 16px; height: 16px; }
.site-footer { width: min(100% - 32px, 1160px); margin: 0 auto; padding: 22px 0 28px; border-top: 1px solid var(--line); text-align: center; color: #9a8f88; font-size: 12px; }

.lookup-dialog { width: min(calc(100% - 28px), 560px); max-height: min(90vh, 820px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: white; box-shadow: 0 28px 90px rgba(44,29,23,.22); overflow-x: hidden; overflow-y: auto; }
.lookup-dialog::backdrop { background: rgba(44,29,23,.38); backdrop-filter: blur(4px); }
.lookup-dialog-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 21px 22px; border-bottom: 1px solid var(--line); background: #fbfff9; }
.lookup-dialog-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.lookup-dialog-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.lookup-dialog-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: var(--green); background: var(--green-soft); }
.lookup-form { padding: 22px; }
.lookup-form .field { margin-bottom: 15px; }
.lookup-dialog > .message-banner { margin: 0 22px 22px; }
.lookup-result { margin: 0 22px 22px; padding: 18px; border: 1px solid #c7e5ce; border-radius: 14px; background: #f8fdf9; }
.lookup-result-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.lookup-result-top strong { font-size: 16px; letter-spacing: .04em; }
.lookup-status { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border-radius: 999px; color: #6f625a; background: #eee9e5; font-size: 12px; font-weight: 760; }
.lookup-status.is-available { color: #247d3d; background: var(--green-soft); }
.lookup-status.is-used { color: #6d747b; background: #edf0f2; }
.lookup-status.is-reserved, .lookup-status.is-uncertain, .lookup-status.is-unbound { color: #8b5900; background: var(--amber-soft); }
.lookup-status.is-error { color: #a92f2f; background: var(--red-soft); }
.lookup-result > p { margin: 13px 0 15px; color: #4f6f57; font-size: 13px; }
.lookup-result dl { margin: 0; border-top: 1px solid #d9e8dc; }
.lookup-result dl > div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid #e3eee6; }
.lookup-result dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.lookup-result dt, .lookup-result dd { margin: 0; font-size: 12px; }
.lookup-result dt { color: var(--muted); }
.lookup-result dd { text-align: right; font-weight: 680; }

/* Subaccount redemption portal */
.subaccount-badge { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 5px 0 13px; border: 1px solid #c7e5ce; border-radius: 11px; color: #347547; background: #f6fff7; font-size: 13px; font-weight: 720; }
.subaccount-badge button { min-height: 28px; padding: 0 9px; border: 0; border-radius: 8px; color: #75685f; background: white; cursor: pointer; font: inherit; font-size: 12px; }
.customer-portal-main { width: min(100% - 32px, 1040px); }
.portal-login-shell { width: min(100%, 650px); min-height: 510px; }
.portal-workspace { width: 100%; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); background: white; box-shadow: var(--shadow); }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.workspace-heading h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.workspace-heading p, .panel-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.inventory-summary { padding: 9px 13px; border-radius: 10px; color: #247d3d; background: var(--green-soft); font-size: 13px; font-weight: 760; }
.portal-workspace > .message-banner { margin: 20px 0 -4px; }
.workspace-toolbar { display: grid; grid-template-columns: minmax(250px, 1fr) 340px; align-items: end; gap: 22px; padding: 24px 0 20px; }
.tier-picker { display: grid; gap: 7px; color: #665a53; font-size: 13px; font-weight: 700; }
.tier-picker select { width: 100%; height: 48px; padding: 0 42px 0 14px; border: 1px solid #ddd5cf; border-radius: 12px; color: var(--ink); background: white; outline: none; }
.tier-picker select:focus { border-color: var(--orange); box-shadow: var(--focus); }
.workspace-mode { margin: 0; }
.workspace-panel { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: #fffdfb; }
.panel-heading { margin-bottom: 22px; }
.panel-heading h2, .account-preview-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.workspace-panel #redemptionForm { width: 100%; max-width: 680px; margin: 0 auto; }
.workspace-panel #accountState, .workspace-panel #resultState { max-width: 760px; margin: 0 auto; }
.compact-result { min-height: 0; padding: 28px 0 0; }
.compact-result .result-icon { width: 72px; height: 72px; margin-bottom: 28px; box-shadow: 0 0 0 10px #eaf8ed, 0 0 0 19px #f4fbf6; }
.compact-result .result-icon svg { width: 38px; height: 38px; }
.compact-result .result-list { margin: 28px 0 24px; }
.batch-account-input { width: 100%; min-height: 210px; resize: vertical; padding: 16px; border: 1px solid #ddd5cf; border-radius: 13px; color: var(--ink); background: white; outline: none; font: 13px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.batch-account-input:focus { border-color: var(--orange); box-shadow: var(--focus); }
.batch-action-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 15px; color: var(--muted); font-size: 13px; }
.batch-action-buttons { display: flex; align-items: center; gap: 10px; }
.batch-progress { height: 7px; overflow: hidden; margin: 22px 0 12px; border-radius: 99px; background: #f1ebe7; }
.batch-progress > div { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--coral)); transition: width 250ms ease; }
.batch-metrics { display: flex; justify-content: flex-end; gap: 24px; margin-bottom: 15px; color: var(--muted); font-size: 12px; }
.batch-metrics strong { margin-left: 5px; font-size: 16px; }
.batch-result-table { max-height: 410px; overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: white; }
.batch-result-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.batch-result-table th, .batch-result-table td { padding: 12px 14px; border-bottom: 1px solid #f0e8e2; text-align: left; }
.batch-result-table th { position: sticky; top: 0; z-index: 1; color: #6e625b; background: #fffaf6; }
.batch-status.success { color: var(--green); font-weight: 750; }
.batch-status.failed { color: var(--red); font-weight: 750; }
.batch-status.uncertain { color: var(--amber); font-weight: 750; }
.batch-status.cancelled { color: var(--muted); font-weight: 750; }

@media (max-width: 760px) {
  .site-header { padding-inline: 16px; }
  .site-header .trust-note { display: none; }
  .brand { font-size: 17px; gap: 9px; }
  .brand-mark { width: 36px; height: 36px; }
  .portal-workspace { padding: 22px 16px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; }
  .workspace-toolbar { grid-template-columns: 1fr; gap: 14px; }
  .workspace-panel { padding: 20px 14px; }
  .batch-action-row { align-items: stretch; flex-direction: column; }
  .batch-action-buttons > button { flex: 1; }
  .batch-metrics { justify-content: space-between; gap: 8px; }
  .account-actions { grid-template-columns: 1fr; }
}

/* Admin shell */
.admin-page { height: 100vh; overflow: hidden; background: #fffaf6; }
.admin-header { height: 68px; padding: 0 24px; }
.admin-header .brand { font-size: 19px; }
.admin-header .brand-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.admin-user .trust-note { margin-right: 20px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: white; font-weight: 750; }
.header-action { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #71665f; cursor: pointer; font-size: 12px; }
.header-action:hover { color: var(--orange-dark); border-color: #f0b486; background: #fff8f2; }
.header-action svg { width: 16px; height: 16px; }
.admin-layout { height: calc(100vh - 68px); display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.sidebar { background: #fffcf9; border-right: 1px solid var(--line); padding: 24px 14px 18px; display: flex; flex-direction: column; justify-content: space-between; z-index: 15; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar button { position: relative; height: 47px; border: 0; border-radius: 11px; display: flex; align-items: center; gap: 13px; padding: 0 15px; color: #625850; background: transparent; cursor: pointer; text-align: left; font-size: 14px; }
.sidebar button svg { width: 20px; height: 20px; }
.sidebar button:hover { background: #fff6ee; }
.sidebar button.is-active { color: var(--orange-dark); background: #fff3e9; font-weight: 700; }
.sidebar button.is-active::before { content: ""; position: absolute; left: 0; width: 4px; height: 28px; border-radius: 3px; background: var(--orange); }
.sidebar-back { display: flex; align-items: center; gap: 9px; color: var(--muted); padding: 0 10px; font-size: 13px; }
.sidebar-back span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 22px; }
.sidebar-back em { font-style: normal; }
.admin-main { position: relative; overflow: auto; background: white; padding: 0 clamp(24px, 3.2vw, 46px) 32px; }
.admin-main > .accent-rail { position: sticky; top: 0; z-index: 5; margin: 0 calc(clamp(24px, 3.2vw, 46px) * -1); }
.page-heading { min-height: 124px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.page-heading h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -0.025em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.summary-band { min-height: 98px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; border-bottom: 1px solid var(--line); }
.summary-band > div { padding: 10px 16px; border-right: 1px solid #f0e8e2; }
.summary-band > div:first-child { padding-left: 0; }
.summary-band > div:last-child { border-right: 0; }
.summary-band span { display: block; color: #776d66; font-size: 12px; margin-bottom: 7px; }
.summary-band strong { font-size: 23px; line-height: 1; letter-spacing: -0.02em; }
.data-section { padding-top: 24px; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 15px; }
.search-box { width: min(280px, 30vw); height: 42px; position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 13px; width: 18px; height: 18px; color: #99918b; }
.search-box input, .table-toolbar select, .pagination select { width: 100%; height: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: white; outline: none; }
.search-box input { padding: 0 14px 0 40px; font-size: 13px; }
.search-box input:focus, .table-toolbar select:focus, .pagination select:focus { border-color: var(--orange); box-shadow: var(--focus); }
.table-toolbar select { width: 140px; height: 42px; padding: 0 34px 0 13px; color: #514842; font-size: 13px; }
.toolbar-spacer { flex: 1; }
.table-wrap { position: relative; min-height: 330px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th { height: 49px; padding: 0 14px; text-align: left; background: #fffaf6; color: #4b4039; font-size: 12px; font-weight: 720; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { height: 54px; padding: 0 14px; border-bottom: 1px solid #eee6e0; color: #514842; font-size: 12px; white-space: nowrap; }
.message-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.product-name, .store-product-id { display: block; }
.store-product-id { max-width: 320px; margin-top: 4px; overflow: hidden; color: #948981; font: 10px/1.25 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; }
.store-product-id.is-missing { color: var(--red); font-family: inherit; }
.tier-identifier { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffaf5; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11.5px; letter-spacing: -0.02em; }
.copy-code { border: 0; padding: 5px 0; background: transparent; color: #423832; cursor: pointer; }
.copy-code:hover { color: var(--orange); }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.success { color: var(--green); }
.status.warning { color: var(--amber); }
.status.danger { color: var(--red); }
.status.neutral { color: #7f8790; }
.row-action { border: 0; background: transparent; padding: 5px 7px; color: var(--orange-dark); font-size: 12px; cursor: pointer; }
.row-action:is(a) { display: inline-block; text-decoration: none; }
.row-action.muted { color: #8d837e; }
.row-action.danger { color: var(--red); }
.row-action:hover { text-decoration: underline; }
.actions-cell { min-width: 270px; }
.export-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; color: #8f5f18; background: var(--amber-soft); font-size: 11px; font-weight: 700; white-space: nowrap; }
.export-badge.is-exported { color: #617078; background: #edf1f3; }
.export-time { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.cdk-selection-cell { width: 42px; padding-right: 2px; text-align: center; }
.cdk-select { width: 17px; height: 17px; margin: 0; accent-color: var(--orange); cursor: pointer; }
tr.is-selected td { background: #fff5ec; }
.unbound-label { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: var(--amber-soft); color: #9a6a0f; font-size: 11px; }
.table-loading, .empty-state { position: absolute; inset: 49px 0 0; background: rgba(255,255,255,.93); display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; }
.table-loading .button-spinner { border-color: rgba(255,113,0,.2); border-top-color: var(--orange); }
.empty-state { flex-direction: column; }
.empty-state > svg { width: 40px; height: 40px; color: #c6bbb3; margin-bottom: 4px; }
.empty-state strong { color: #695f58; font-size: 15px; }
.empty-state span { font-size: 12px; }
.pagination { min-height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; align-items: center; gap: 10px; }
.pagination button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; font-size: 20px; }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination select { justify-self: end; width: 90px; height: 34px; padding: 0 8px; font-size: 12px; }
.inline-notice { margin-bottom: 12px; padding: 10px 12px; border-radius: 9px; background: var(--amber-soft); color: #7d570d; }

/* Batch redemption */
.batch-section { padding: 24px 0 40px; }
.batch-guide { min-height: 94px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 4px 2px 22px; }
.batch-kicker { display: block; margin-bottom: 5px; color: var(--orange-dark); font-size: 11px; font-weight: 780; letter-spacing: .09em; }
.batch-guide h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.batch-guide p { max-width: 680px; margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.batch-limit { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #f2c79f; border-radius: 999px; color: var(--orange-dark); background: #fff8f1; font-size: 11px; font-weight: 700; }
.batch-input-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.batch-card, .batch-preview-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 8px 24px rgba(91,54,32,.04); }
.batch-card > header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fffaf6; }
.batch-card > header div { display: grid; gap: 3px; }
.batch-card > header strong { font-size: 14px; }
.batch-card > header small, .batch-card > header > span { color: var(--muted); font-size: 10px; }
.batch-card textarea { width: 100%; min-height: 220px; display: block; resize: vertical; padding: 15px 16px; border: 0; outline: none; color: var(--ink); background: white; font: 12px/1.8 "SFMono-Regular", Consolas, monospace; }
.batch-card textarea:focus { box-shadow: inset 0 0 0 2px rgba(255,113,0,.26); }
.batch-card textarea::placeholder { color: #b0a8a3; }
.batch-card > footer { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 15px; border-top: 1px solid var(--line); color: var(--muted); background: #fffdfb; font-size: 10px; }
.batch-card code { padding: 3px 7px; border-radius: 6px; color: #7f4b22; background: #fff1e4; font-size: 10px; }
.batch-section > .inline-notice { margin: 14px 0 0; }
.batch-section > .inline-notice.error { color: #a92f2f; background: var(--red-soft); border: 1px solid #f4cac6; }
.batch-section > .inline-notice.success { color: #247d3d; background: var(--green-soft); border: 1px solid #bce4c6; }
.batch-preview-card { margin-top: 16px; }
.batch-preview-card > header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.batch-preview-card h3 { margin: 0; font-size: 15px; }
.batch-preview-card header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.batch-stats { display: flex; gap: 8px; margin: 0; }
.batch-stats > div { min-width: 62px; padding: 6px 10px; border-left: 1px solid var(--line); }
.batch-stats dt, .batch-stats dd { margin: 0; }
.batch-stats dt { color: var(--muted); font-size: 9px; }
.batch-stats dd { margin-top: 2px; font-size: 17px; font-weight: 760; }
.batch-table-wrap { max-height: 390px; overflow: auto; }
.batch-table { min-width: 760px; }
.batch-table th { position: sticky; top: 0; z-index: 1; }
.batch-table td:nth-child(2), .batch-table td:nth-child(5) { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.batch-empty { height: 120px; color: var(--muted); text-align: center; }
.batch-actions { min-height: 74px; display: flex; align-items: center; justify-content: flex-end; gap: 22px; padding: 13px 18px; border-top: 1px solid var(--line); background: #fffaf7; }
.batch-confirm { margin: 0 auto 0 0; }
.batch-actions .primary-button { min-width: 154px; }

/* Upload drawer */
.drawer-overlay { position: fixed; inset: 68px 0 0; background: rgba(44, 29, 23, 0.18); z-index: 29; backdrop-filter: blur(1px); }
.upload-drawer { position: fixed; z-index: 30; top: 68px; right: 0; bottom: 0; width: min(390px, 100vw); display: flex; flex-direction: column; background: #fffdfb; border-left: 1px solid var(--line); box-shadow: -20px 0 50px rgba(57,38,26,.09); transform: translateX(104%); transition: transform 300ms cubic-bezier(.2,.8,.2,1); }
.upload-drawer.is-open { transform: translateX(0); }
.upload-drawer > header { height: 64px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); }
.upload-drawer h2 { margin: 0; font-size: 20px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.drawer-body section { margin-bottom: 24px; }
.drawer-body h3 { margin: 0 0 11px; font-size: 13px; }
.drop-zone { min-height: 178px; border: 1.5px dashed #ff9e55; border-radius: 14px; background: #fffaf5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; transition: 180ms ease; padding: 20px; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--orange); background: #fff4ea; transform: translateY(-1px); }
.drop-zone > svg { width: 48px; height: 48px; color: var(--orange); margin-bottom: 16px; stroke-width: 1.5; }
.drop-zone strong { font-size: 12px; font-weight: 650; }
.drop-zone strong span { color: var(--orange); }
.drop-zone small { margin-top: 9px; color: var(--muted); font-size: 11px; }
.selected-file { margin-top: 12px; min-height: 64px; border: 1px solid var(--line); border-radius: 11px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 9px 12px; }
.file-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green); }
.file-icon svg { width: 21px; height: 21px; }
.selected-file strong, .selected-file small { display: block; }
.selected-file strong { font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file small { color: var(--muted); margin-top: 2px; font-size: 10px; }
.import-summary { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; }
.import-summary > div { min-height: 38px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eee7e1; }
.import-summary > div:last-child { border-bottom: 0; }
.import-summary dt, .import-summary dd { margin: 0; font-size: 12px; }
.import-summary dd { font-weight: 720; }
.progress-track { height: 7px; border-radius: 10px; overflow: hidden; background: #f1e9e3; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff9631, var(--orange)); transition: width 400ms ease; }
#uploadStatus { color: var(--muted); font-size: 11px; margin: 9px 0 0; }
.upload-drawer > footer { flex: 0 0 auto; padding: 16px 24px 20px; border-top: 1px solid var(--line); display: grid; gap: 9px; background: white; }
.toast-region { position: fixed; z-index: 50; right: 22px; bottom: 22px; display: grid; gap: 10px; }
.toast { min-width: 220px; max-width: 360px; padding: 12px 15px; border: 1px solid #bfe0c6; border-radius: 11px; background: #f2fbf4; box-shadow: var(--shadow-small); color: #247c3b; font-size: 13px; animation: toast-in 220ms ease; }
.toast.error { border-color: #f0c5c1; background: #fff3f2; color: #aa3838; }
.toast.info { border-color: #ead5a4; background: #fffaf0; color: #856016; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }
.mobile-menu { display: none; border: 0; background: transparent; padding: 7px; }

/* Admin login */
.admin-login-page { min-height: 100vh; overflow: auto; background: radial-gradient(circle at 15% 15%, #fff0df 0, transparent 34%), radial-gradient(circle at 86% 85%, #ffe8df 0, transparent 32%), #fff9f3; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.login-card { position: relative; width: min(100%, 460px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 28px 80px rgba(92,52,29,.13); }
.login-card > header { min-height: 82px; display: flex; align-items: center; gap: 13px; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.login-card > header > div { display: grid; }
.login-card > header strong { font-size: 18px; line-height: 1.2; }
.login-card > header small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.login-copy { padding: 38px 38px 24px; text-align: center; }
.login-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; color: #347b48; background: var(--green-soft); font-size: 11px; font-weight: 700; }
.login-badge svg { width: 15px; height: 15px; }
.login-copy h1 { margin: 18px 0 8px; font-size: 34px; letter-spacing: -.035em; }
.login-copy p { max-width: 340px; margin: 0 auto; color: var(--muted); font-size: 13px; }
.login-card form { padding: 0 38px 34px; }
.login-card .message-banner { margin: -5px 0 14px; }
.login-card > footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 28px; border-top: 1px solid var(--line); color: var(--muted); background: #fffaf6; font-size: 11px; }
.login-card > footer a:hover { color: var(--orange-dark); }

/* Bind modal */
.modal-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(43,28,21,.34); backdrop-filter: blur(3px); }
.admin-modal { width: min(100%, 500px); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 28px 80px rgba(44,29,23,.2); animation: modal-in 180ms ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.admin-modal > header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 21px 22px; border-bottom: 1px solid var(--line); }
.admin-modal h2 { margin: 0; font-size: 19px; }
.admin-modal header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.modal-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: var(--orange); background: #fff2e7; }
.modal-icon svg { width: 22px; height: 22px; }
.modal-body { padding: 22px; }
.modal-select { width: 100%; height: 48px; padding: 0 40px 0 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: white; outline: none; }
.modal-select:focus { border-color: var(--orange); box-shadow: var(--focus); }
.modal-hint { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.proxy-status-card { margin-bottom: 17px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf7; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.proxy-status-card.is-active { border-color: #b9dfc5; background: #f1fbf4; color: #238648; }
.proxy-modal { width: min(100%, 620px); }
.proxy-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px 14px; }
.proxy-field { min-width: 0; display: grid; gap: 8px; }
.proxy-field-full { grid-column: 1 / -1; }
.proxy-form-grid select.modal-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #85776e 50%), linear-gradient(135deg, #85776e 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.proxy-password-wrap { position: relative; display: block; }
.proxy-password-wrap .modal-select { padding-right: 66px; }
.proxy-password-toggle { position: absolute; top: 50%; right: 7px; min-width: 48px; height: 34px; padding: 0 9px; border: 0; border-radius: 8px; color: var(--orange-dark); background: #fff2e7; font-size: 12px; font-weight: 700; transform: translateY(-50%); cursor: pointer; }
.proxy-password-toggle:hover { background: #ffe5d0; }
.proxy-password-toggle:focus-visible { outline: 2px solid rgba(255,119,35,.35); outline-offset: 1px; }
@media (max-width: 640px) {
  .proxy-form-grid { grid-template-columns: 1fr; }
  .proxy-field-full { grid-column: auto; }
}
.generate-modal { width: min(100%, 560px); }
.generate-form { display: grid; gap: 17px; }
.generate-form label { display: grid; gap: 8px; }
.generate-form input.modal-select { padding-right: 13px; }
.generate-form .modal-hint { margin: -2px 0 0; padding: 11px 13px; border-radius: 9px; background: #fff8f1; line-height: 1.55; }
.admin-modal > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fffaf7; }
.admin-modal > footer button { min-height: 42px; }

/* Unified form controls */
.input-wrap input,
.search-box input,
input.modal-select,
.batch-account-input,
.batch-card textarea {
  border-color: #ded3ca;
  background: linear-gradient(180deg, #fff 0%, #fffdfb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(71,43,29,.025);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.input-wrap input:hover,
.search-box input:hover,
input.modal-select:hover,
.batch-account-input:hover,
.batch-card textarea:hover { border-color: #edb98f; }
.input-wrap input:focus,
.search-box input:focus,
input.modal-select:focus,
.batch-account-input:focus,
.batch-card textarea:focus {
  border-color: #ff8a35;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,113,0,.11), 0 5px 16px rgba(97,54,25,.06);
}
.search-box:focus-within svg { color: var(--orange); }
.input-wrap input:disabled,
.search-box input:disabled,
input.modal-select:disabled,
textarea:disabled { color: #a49b95; background: #f6f2ef; cursor: not-allowed; }

/* Custom select: replaces the Windows native popup while preserving the real select value. */
.pretty-select { position: relative; display: inline-flex; min-width: 0; vertical-align: middle; }
.pretty-select[hidden] { display: none !important; }
.pretty-select-native {
  display: none !important;
}
.pretty-select-trigger {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 0 14px;
  overflow: hidden;
  border: 1px solid #ded3ca;
  border-radius: 12px;
  color: #463c36;
  background: linear-gradient(180deg, #fff 0%, #fffdfb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(71,43,29,.035);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}
.pretty-select-trigger:hover { border-color: #efaa75; background: #fff; box-shadow: 0 4px 13px rgba(101,55,22,.07); }
.pretty-select-trigger:focus-visible,
.pretty-select.is-open .pretty-select-trigger {
  border-color: #ff7d20;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,113,0,.12), 0 6px 18px rgba(103,56,21,.08);
  outline: none;
}
.pretty-select.is-open .pretty-select-trigger { transform: translateY(-1px); }
.pretty-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pretty-select-value.is-placeholder { color: #6f655f; }
.pretty-select-chevron { width: 18px; height: 18px; flex: 0 0 18px; color: #766a63; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 180ms ease, color 180ms ease; }
.pretty-select.is-open .pretty-select-chevron { color: var(--orange); transform: rotate(180deg); }
.pretty-select-trigger:disabled { color: #a49b95; border-color: #e6dfda; background: #f5f2ef; box-shadow: none; cursor: not-allowed; }
.pretty-select-portal { position: fixed; z-index: 300; filter: drop-shadow(0 18px 28px rgba(61,36,23,.16)); }
.pretty-select-portal[hidden] { display: none; }
.pretty-select-menu {
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid rgba(225,210,199,.95);
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  animation: pretty-select-in 150ms cubic-bezier(.2,.8,.2,1);
  scrollbar-width: thin;
  scrollbar-color: #e1c4ae transparent;
}
.pretty-select-portal.opens-above .pretty-select-menu { transform-origin: bottom center; }
@keyframes pretty-select-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: none; } }
.pretty-select-option {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border: 0;
  border-radius: 9px;
  color: #4d433d;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 610;
  text-align: left;
  transition: color 120ms ease, background 120ms ease, transform 120ms ease;
}
.pretty-select-option + .pretty-select-option { margin-top: 2px; }
.pretty-select-option:hover,
.pretty-select-option:focus-visible { color: #d95900; background: #fff2e7; outline: none; }
.pretty-select-option:active { transform: scale(.99); }
.pretty-select-option.is-selected { color: #d95900; background: linear-gradient(90deg, #fff0e3, #fff8f2); font-weight: 760; }
.pretty-select-option svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: 0; fill: none; stroke: currentColor; stroke-width: 2.35; stroke-linecap: round; stroke-linejoin: round; }
.pretty-select-option.is-selected svg { opacity: 1; }
.pretty-select-option:disabled { color: #aaa19b; cursor: not-allowed; }

.table-toolbar > .pretty-select { width: 140px; height: 42px; flex: 0 0 140px; }
.table-toolbar > .pretty-select .pretty-select-trigger { height: 42px; border-radius: 10px; }
.pagination .pretty-select { width: 132px; height: 34px; justify-self: end; }
.pagination .pretty-select-trigger { width: 100%; height: 34px; padding-inline: 10px; border-radius: 9px; font-size: 12px; }
.pagination .pretty-select-option span { white-space: nowrap; }

.row-icon-action {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #f1c39d;
  border-radius: 9px;
  color: var(--orange-dark);
  background: #fff8f2;
  cursor: pointer;
  vertical-align: middle;
}
.row-icon-action:hover { color: white; border-color: var(--orange); background: var(--orange); }
.row-icon-action:focus-visible { outline: none; box-shadow: var(--focus); }
.row-icon-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.row-icon-action:disabled { opacity: .55; cursor: wait; }
.row-icon-action.is-loading svg { animation: spin .7s linear infinite; }
.account-refresh-action { margin-left: 5px; color: #2e8d49; border-color: #c8e5cf; background: #f5fff7; }
.account-refresh-action:hover { border-color: #35a653; background: #35a653; }
.tier-picker .pretty-select,
.admin-modal .pretty-select,
.upload-drawer .pretty-select { width: 100%; }
.tier-picker .pretty-select-trigger,
.admin-modal .pretty-select-trigger,
.upload-drawer .pretty-select-trigger { height: 48px; }
.account-search-box { min-width: 220px; }
.account-detail-modal { width: min(100%, 860px); max-height: min(88vh, 760px); display: flex; flex-direction: column; }
.account-detail-modal > header, .account-detail-modal > footer { flex: 0 0 auto; }
.account-detail-icon { color: #28a950; background: #eefaf1; }
.account-detail-body { min-height: 0; flex: 1 1 auto; overflow: auto; }
.account-detail-loading { min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.account-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-detail-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fffdfb; }
.account-detail-panel > h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); color: #4d4039; background: #fff8f2; font-size: 14px; }
.account-detail-panel dl { margin: 0; }
.account-detail-panel dl > div { min-height: 46px; display: grid; grid-template-columns: 118px minmax(0, 1fr); align-items: center; gap: 12px; padding: 9px 16px; border-bottom: 1px solid #f1e9e3; }
.account-detail-panel dl > div:last-child { border-bottom: 0; }
.account-detail-panel dt, .account-detail-panel dd { margin: 0; }
.account-detail-panel dt { color: var(--muted); font-size: 12px; font-weight: 680; }
.account-detail-panel dd { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; font-weight: 680; }
.account-detail-panel dd.is-accent { color: #2a9d4b; }
.account-detail-panel.is-wide { grid-column: 1 / -1; }
.account-course-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.account-course-item { min-width: 0; padding: 12px 13px; border: 1px solid #eee4dc; border-radius: 10px; background: #fffaf6; }
.account-course-item strong, .account-course-item span { display: block; overflow-wrap: anywhere; }
.account-course-item strong { color: var(--ink); font-size: 13px; }
.account-course-item span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.account-course-empty { margin: 0; padding: 22px 16px; color: var(--muted); font-size: 12px; text-align: center; }
.account-detail-message { grid-column: 1 / -1; padding: 13px 15px; border: 1px solid #c8e8d0; border-radius: 12px; color: #287542; background: #f3fcf5; font-size: 13px; line-height: 1.6; }

/* Dashboard */
.dashboard-section { padding: 30px 0 42px; }
.dashboard-welcome { min-height: 92px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 0 2px 28px; border-bottom: 1px solid var(--line); }
.dashboard-welcome-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg, #efffe7, #dcffd0); box-shadow: 0 10px 24px rgba(64,190,8,.18); }
.dashboard-welcome-mark img { width: 48px; height: 48px; object-fit: contain; }
.dashboard-welcome-copy h1 { margin: 0; font-size: 25px; line-height: 1.25; letter-spacing: -.025em; }
.dashboard-welcome-copy p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.dashboard-actions { display: flex; align-items: center; gap: 10px; }
.dashboard-main-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 22px; }
.dashboard-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 10px 30px rgba(91,54,32,.045); }
.dashboard-metric-grid article { min-height: 112px; display: flex; align-items: center; gap: 13px; padding: 18px; border-right: 1px solid #eee6e0; border-bottom: 1px solid #eee6e0; }
.dashboard-metric-grid article:nth-child(4n) { border-right: 0; }
.dashboard-metric-grid article:nth-last-child(-n + 4) { border-bottom: 0; }
.dashboard-metric-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; }
.dashboard-metric-icon svg { width: 19px; height: 19px; }
.dashboard-metric-icon.green { color: #2d984b; background: #eaf8ed; }
.dashboard-metric-icon.amber { color: #b77b0b; background: #fff5d7; }
.dashboard-metric-icon.slate { color: #69747e; background: #eef2f4; }
.dashboard-metric-icon.coral { color: #d95063; background: #fff0f2; }
.dashboard-metric-icon.orange { color: var(--orange-dark); background: #fff0e2; }
.dashboard-metric-grid small { display: block; margin-bottom: 7px; color: #7e746e; font-size: 11px; font-weight: 650; }
.dashboard-metric-grid strong { display: block; font-size: 23px; line-height: 1; letter-spacing: -.025em; }
.dashboard-login-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 10px 30px rgba(91,54,32,.045); }
.dashboard-login-panel > header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 17px; border-bottom: 1px solid var(--line); background: #fffaf6; }
.dashboard-login-panel h2, .dashboard-tier-panel h2 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.dashboard-login-panel header p, .dashboard-tier-panel header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.dashboard-login-panel header > span { min-width: 34px; height: 28px; display: grid; place-items: center; padding: 0 8px; border-radius: 9px; color: #2b8643; background: var(--green-soft); font-size: 12px; font-weight: 800; }
.dashboard-login-list { min-height: 154px; }
.dashboard-login-row { min-height: 51px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 17px; border-bottom: 1px solid #f0e9e4; }
.dashboard-login-row:last-child { border-bottom: 0; }
.dashboard-login-row strong, .dashboard-login-row small { display: block; }
.dashboard-login-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4c423c; font-size: 11px; }
.dashboard-login-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.dashboard-login-row time { color: #746b65; font: 10px/1.4 "SFMono-Regular", Consolas, monospace; white-space: nowrap; }
.dashboard-empty { padding: 28px 16px !important; color: var(--muted) !important; text-align: center !important; font-size: 12px !important; }
.dashboard-tier-panel { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 10px 30px rgba(91,54,32,.04); }
.dashboard-tier-panel > header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fffdfb; }
.dashboard-tier-search { width: min(320px, 38vw); height: 40px; position: relative; display: flex; align-items: center; }
.dashboard-tier-search svg { position: absolute; left: 13px; width: 17px; height: 17px; color: #9b918b; pointer-events: none; }
.dashboard-tier-search input { width: 100%; height: 100%; padding: 0 14px 0 39px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; color: var(--ink); background: white; font-size: 12px; }
.dashboard-tier-search input:focus { border-color: var(--orange); box-shadow: var(--focus); }
.dashboard-tier-table-wrap { overflow-x: auto; }
.dashboard-tier-table { min-width: 860px; }
.dashboard-tier-table th { height: 44px; color: #655b55; background: #fffaf6; }
.dashboard-tier-table td { height: 50px; }
.dashboard-tier-table td:nth-child(n + 3) { font-variant-numeric: tabular-nums; }
.dashboard-tier-name { font-weight: 750; }
.dashboard-tier-id { display: block; max-width: 390px; overflow: hidden; color: #958a82; font: 10px/1.3 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-number-success { color: var(--green); font-weight: 780; }
.dashboard-number-danger { color: var(--red); font-weight: 780; }

@media (max-width: 980px) {
  .admin-layout { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar button { justify-content: center; padding: 0; }
  .sidebar button span, .sidebar-back em { display: none; }
  .sidebar-back { justify-content: center; padding: 0; }
  .summary-band { grid-template-columns: repeat(5, minmax(100px, 1fr)); overflow-x: auto; }
  .table-toolbar { flex-wrap: wrap; }
  .search-box { width: min(330px, 55vw); }
  .toolbar-spacer { display: none; }
  .admin-user .trust-note { display: none; }
  .batch-input-grid { grid-template-columns: 1fr; }
  .dashboard-main-grid { grid-template-columns: 1fr; }
  .dashboard-login-panel { min-height: 0; }
}

@media (max-width: 720px) {
  .account-detail-grid { grid-template-columns: 1fr; }
  .account-detail-message { grid-column: auto; }
  .account-detail-panel.is-wide { grid-column: auto; }
  .account-course-list { grid-template-columns: 1fr; }
  .account-detail-panel dl > div { grid-template-columns: 104px minmax(0, 1fr); }
  .account-search-box { min-width: 100%; }
  .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metric-grid article:nth-child(4n) { border-right: 1px solid #eee6e0; }
  .dashboard-metric-grid article:nth-child(2n) { border-right: 0; }
  .dashboard-metric-grid article:nth-last-child(-n + 4) { border-bottom: 1px solid #eee6e0; }
  .dashboard-metric-grid article:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 1300px) {
  .toolbar-spacer { display: none; }
  .search-box { flex: 1 1 260px; width: auto; }
}

@media (max-width: 720px) {
  .site-header { height: 62px; padding: 0 18px; }
  .brand { font-size: 18px; gap: 10px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
  .site-header .trust-note span { display: none; }
  .site-header .trust-note { display: none; }
  .customer-tools { gap: 8px; }
  .lookup-entry { min-height: 36px; padding-inline: 10px; font-size: 12px; }
  .customer-main { width: min(100% - 24px, 560px); padding-top: 24px; }
  .redemption-shell { min-height: 0; }
  .redemption-state { padding: 42px 20px 30px; }
  .state-heading h1, .result-state h1 { font-size: 30px; }
  .state-heading p { font-size: 14px; }
  .stepper { margin-inline: 0; }
  .step { font-size: 11px; }
  .step strong { max-width: 72px; text-align: center; }
  .result-state { min-height: 620px; }
  .result-list { padding: 3px 12px; }
  .result-list > div { align-items: flex-start; padding: 16px 0; }
  .result-list dd { max-width: 52%; word-break: break-word; }
  .result-icon { width: 80px; height: 80px; margin-bottom: 30px; box-shadow: 0 0 0 11px #eaf8ed, 0 0 0 20px #f4fbf6; }
  .result-icon svg { width: 42px; height: 42px; }
  .lookup-dialog-head { padding: 18px; }
  .lookup-form { padding: 18px; }
  .lookup-dialog > .message-banner, .lookup-result { margin-left: 18px; margin-right: 18px; }
  .privacy-note { text-align: center; }
  .sms-code-row { align-items: stretch; }
  .sms-send-button { min-width: 118px; flex-basis: 118px; font-size: 12px; }
  .account-state { padding-top: 32px; }
  .account-preview-heading { grid-template-columns: auto 1fr; }
  .account-preview-heading h1 { font-size: 25px; }
  .product-pill { grid-column: 2; justify-self: start; margin-top: -3px; }
  .account-detail-list > div { grid-template-columns: 88px minmax(0, 1fr) 34px; padding-left: 13px; }
  .account-detail-list dt { font-size: 12px; }
  .account-detail-list dd { font-size: 13px; }
  .account-actions { grid-template-columns: 1fr; }
  .account-actions .secondary-button { order: 2; }

  .admin-page { overflow: auto; }
  .admin-header { height: 62px; padding: 0 14px; }
  .admin-header .brand { font-size: 16px; }
  .admin-user > span:not(.avatar) { display: none; }
  .header-action { font-size: 0; width: 34px; padding: 0; justify-content: center; }
  .mobile-menu { display: grid; place-items: center; }
  .admin-layout { height: auto; min-height: calc(100vh - 62px); display: block; }
  .sidebar { position: fixed; left: 0; top: 62px; bottom: 0; width: 230px; transform: translateX(-104%); transition: transform 220ms ease; box-shadow: 20px 0 40px rgba(44,29,23,.12); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar button { justify-content: flex-start; padding: 0 15px; }
  .sidebar button span, .sidebar-back em { display: block; }
  .sidebar-back { justify-content: flex-start; padding: 0 10px; }
  .admin-main { overflow: visible; min-height: calc(100vh - 62px); padding: 0 16px 24px; }
  .admin-main > .accent-rail { margin-left: -16px; margin-right: -16px; }
  .page-heading { min-height: 112px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { max-width: 210px; }
  .page-heading .outline-button { padding: 0 12px; min-height: 42px; }
  .page-heading .outline-button svg { display: none; }
  .dashboard-section { padding-top: 22px; }
  .dashboard-welcome { grid-template-columns: auto minmax(0, 1fr); padding-bottom: 22px; }
  .dashboard-welcome-mark { width: 48px; height: 48px; border-radius: 14px; }
  .dashboard-welcome-mark img { width: 40px; height: 40px; }
  .dashboard-welcome-copy h1 { font-size: 21px; }
  .dashboard-welcome-copy p { font-size: 11px; }
  .dashboard-actions { grid-column: 1 / -1; width: 100%; }
  .dashboard-actions button { flex: 1; }
  .dashboard-metric-grid article { min-height: 96px; padding: 14px; }
  .dashboard-metric-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .dashboard-metric-grid strong { font-size: 20px; }
  .dashboard-tier-panel > header { align-items: stretch; flex-direction: column; }
  .dashboard-tier-search { width: 100%; }
  .summary-band { grid-template-columns: repeat(5, 120px); margin-right: -16px; }
  .summary-band > div { padding: 10px 12px; }
  .table-toolbar { align-items: stretch; }
  .search-box { width: 100%; }
  .table-toolbar select { flex: 1; }
  .table-toolbar > .pretty-select { width: auto; flex: 1 1 132px; }
  .table-toolbar .primary-button, .table-toolbar .outline-button, .table-toolbar .danger-outline-button { flex: 1; padding-inline: 11px; }
  .pagination { grid-template-columns: 1fr auto; }
  .pagination select { display: none; }
  .pagination .pretty-select { display: none; }
  .batch-guide, .batch-preview-card > header, .batch-actions { align-items: stretch; flex-direction: column; }
  .batch-limit { align-self: flex-start; }
  .batch-card textarea { min-height: 180px; }
  .batch-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
  .batch-stats > div { min-width: 0; }
  .batch-actions { gap: 14px; }
  .batch-confirm { margin: 0; }
  .batch-actions .primary-button { width: 100%; }
  .drawer-overlay { top: 62px; }
  .upload-drawer { top: 62px; }
  .login-copy { padding: 32px 24px 22px; }
  .login-card form { padding: 0 24px 28px; }
  .login-card > footer { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Production exchange landing */
.exchange-page {
  --exchange-page: #fff9f3;
  --exchange-surface: #fff;
  --exchange-ink: #2c1d17;
  --exchange-muted: #8d837e;
  --exchange-line: #eadfd7;
  --exchange-orange: #ff7100;
  --exchange-orange-deep: #e85d00;
  --exchange-peach: #fff2e8;
  min-height: 100vh;
  color: var(--exchange-ink);
  background: var(--exchange-page);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.exchange-page svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.exchange-header { height: 82px; display: flex; align-items: center; padding: 0 max(28px, calc((100vw - 1500px) / 2)); border-bottom: 1px solid var(--exchange-line); background: rgba(255,255,255,.9); }
.exchange-brand { display: inline-flex; align-items: center; gap: 13px; }
.exchange-brand-mark { width: 48px; height: 48px; display: grid; place-items: center; color: white; border-radius: 14px; background: linear-gradient(145deg, #ff8d22, #ff4f12); box-shadow: 0 10px 24px rgba(255,113,0,.2); }
.exchange-brand-mark svg { width: 28px; height: 28px; stroke-width: 1.8; }
.exchange-brand strong, .exchange-brand small { display: block; }
.exchange-brand strong { font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.exchange-brand small { margin-top: 5px; color: #887e79; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .2em; }
.exchange-main { width: min(calc(100% - 56px), 1500px); margin: 0 auto; padding: 58px 0 42px; }
.exchange-hero { min-height: 650px; display: grid; grid-template-columns: minmax(420px,.9fr) minmax(560px,1.1fr); align-items: center; gap: clamp(48px,7vw,116px); }
.exchange-copy { position: relative; z-index: 1; padding-left: clamp(0px,3vw,48px); }
.exchange-copy-ring { position: absolute; z-index: -1; width: 430px; height: 430px; left: -115px; top: 50%; transform: translateY(-53%); border: 48px solid rgba(255,113,0,.055); border-radius: 50%; }
.exchange-kicker { width: fit-content; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; margin-bottom: 26px; color: var(--exchange-orange-deep); border: 1px solid #ffd6bc; border-radius: 999px; background: rgba(255,248,242,.94); font-size: 13px; font-weight: 760; }
.exchange-kicker svg { width: 17px; height: 17px; }
.exchange-copy h1 { margin: 0; font-size: clamp(54px,5.4vw,82px); line-height: 1.06; letter-spacing: -.065em; font-weight: 880; }
.exchange-copy h1 em { color: var(--exchange-orange-deep); font-style: normal; }
.exchange-copy > p { margin: 29px 0 0; color: #746963; font-size: clamp(17px,1.25vw,20px); line-height: 1.9; }
.exchange-workspace { min-height: 600px; padding: 34px clamp(30px,3.8vw,58px) 42px; border: 1px solid #e2d9d2; border-radius: 28px; background: var(--exchange-surface); box-shadow: 0 28px 65px rgba(75,48,30,.1); }
.exchange-steps { list-style: none; display: flex; align-items: flex-start; margin: 0 0 36px; padding: 0; }
.exchange-steps li { flex: 1; position: relative; display: grid; justify-items: center; gap: 9px; color: #aaa19c; font-size: 12px; }
.exchange-steps li:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: calc(50% + 23px); right: calc(-50% + 23px); height: 1px; background: #ddd5cf; }
.exchange-steps span { z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #d9d1cb; border-radius: 50%; background: white; font-weight: 750; transition: 180ms ease; }
.exchange-steps strong { font-weight: 700; }
.exchange-steps li.is-active { color: var(--exchange-orange-deep); }
.exchange-steps li.is-active span { color: white; border-color: var(--exchange-orange); background: var(--exchange-orange); box-shadow: 0 7px 18px rgba(255,113,0,.22); }
.exchange-steps li.is-complete { color: var(--exchange-orange-deep); }
.exchange-steps li.is-complete span { color: white; border-color: var(--exchange-orange); background: var(--exchange-orange); font-size: 0; }
.exchange-steps li.is-complete span::after { content: "✓"; font-size: 15px; }
.exchange-steps li.is-complete:not(:last-child)::after { background: var(--exchange-orange); }
.exchange-message { margin: -14px 0 22px; }
.exchange-state { animation: exchange-state-in 240ms ease; }
@keyframes exchange-state-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.exchange-state-title { display: grid; grid-template-columns: 50px minmax(0,1fr); align-items: center; gap: 16px; margin-bottom: 30px; }
.exchange-state-title h2 { margin: 0; font-size: clamp(25px,2.1vw,31px); line-height: 1.2; letter-spacing: -.035em; }
.exchange-state-title p { margin: 7px 0 0; color: var(--exchange-muted); font-size: 13px; }
.exchange-state-icon { width: 50px; height: 50px; display: grid; place-items: center; color: var(--exchange-orange-deep); border-radius: 14px; background: var(--exchange-peach); }
.exchange-state-icon svg { width: 25px; height: 25px; }
.exchange-state-icon.is-success { color: #2f9850; background: #edf8ef; }
.exchange-field { display: block; margin-bottom: 19px; }
.exchange-field > span:first-child { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 760; }
.exchange-field input { width: 100%; height: 58px; padding: 0 18px; color: var(--exchange-ink); border: 1px solid #ddd5cf; border-radius: 13px; background: white; outline: none; font-size: 15px; transition: 170ms ease; }
.exchange-field input::placeholder { color: #aaa19c; }
.exchange-field input:hover { border-color: #cabcb2; }
.exchange-field input:focus { border-color: var(--exchange-orange); box-shadow: 0 0 0 4px rgba(255,113,0,.12); }
.exchange-primary, .exchange-secondary { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 22px; border-radius: 13px; font: 760 15px/1 inherit; cursor: pointer; transition: 180ms ease; }
.exchange-primary { width: 100%; color: white; border: 0; background: linear-gradient(100deg, #ff8c20, var(--exchange-orange) 62%, #ff580f); box-shadow: 0 13px 26px rgba(255,113,0,.2); }
.exchange-primary > svg { width: 20px; height: 20px; margin-left: auto; }
.exchange-primary > span:first-child { margin-left: auto; }
.exchange-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(255,113,0,.26); }
.exchange-primary:focus-visible, .exchange-secondary:focus-visible, .validated-code button:focus-visible, .exchange-auth-switch button:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(255,113,0,.14); }
.exchange-primary:disabled, .exchange-secondary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.exchange-secondary { color: var(--exchange-orange-deep); border: 1px solid #f0b387; background: white; }
.exchange-secondary:hover:not(:disabled) { border-color: var(--exchange-orange); background: #fff8f2; }
.validated-code { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; padding: 14px 16px; border: 1px solid #f1d2bd; border-radius: 13px; background: #fff9f4; }
.validated-code small, .validated-code strong, .validated-code span { display: block; }
.validated-code small { color: #96877d; font-size: 11px; }
.validated-code strong { margin-top: 2px; font: 800 15px/1.3 "SFMono-Regular", Consolas, monospace; letter-spacing: .06em; }
.validated-code span { margin-top: 3px; color: var(--exchange-orange-deep); font-size: 11px; font-weight: 700; }
.validated-code button { flex: 0 0 auto; padding: 7px 10px; color: var(--exchange-orange-deep); border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; }
.validated-code button:hover { background: var(--exchange-peach); }
.exchange-auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; margin-bottom: 20px; border: 1px solid var(--exchange-line); border-radius: 13px; background: #fffaf6; }
.exchange-auth-switch button { min-height: 42px; color: #887d76; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.exchange-auth-switch button.is-active { color: var(--exchange-orange-deep); background: white; box-shadow: 0 5px 14px rgba(75,48,30,.08); }
.exchange-sms-row { display: grid; grid-template-columns: minmax(0,1fr) 126px; gap: 10px; }
.exchange-sms-row .exchange-secondary { min-height: 58px; padding: 0 13px; font-size: 12px; }
.exchange-privacy { margin: 15px 0 0; color: var(--exchange-muted); text-align: center; font-size: 11px; line-height: 1.6; }
.exchange-account-list { margin: 0 0 24px; padding: 0 17px; border: 1px solid var(--exchange-line); border-radius: 15px; background: #fffdfb; }
.exchange-account-list > div { min-height: 48px; display: grid; grid-template-columns: 92px minmax(0,1fr); align-items: center; gap: 14px; border-bottom: 1px solid #f0e7e1; }
.exchange-account-list > div:last-child { border-bottom: 0; }
.exchange-account-list dt, .exchange-account-list dd { margin: 0; }
.exchange-account-list dt { color: var(--exchange-muted); font-size: 12px; }
.exchange-account-list dd { overflow-wrap: anywhere; text-align: right; font-size: 13px; font-weight: 720; }
.exchange-actions { display: grid; grid-template-columns: 1.35fr .65fr; gap: 11px; }
.exchange-actions .exchange-secondary { width: 100%; }
.exchange-result { text-align: center; }
.exchange-result-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 6px auto 20px; color: white; border-radius: 50%; background: #39a85b; box-shadow: 0 0 0 10px #edf8ef; font-size: 35px; font-weight: 800; }
.exchange-result.is-uncertain .exchange-result-icon { background: #e2a22a; box-shadow: 0 0 0 10px #fff6df; }
.exchange-result.is-failed .exchange-result-icon { background: #e94b4b; box-shadow: 0 0 0 10px #fff0ef; }
.exchange-result h2 { margin: 0; font-size: 30px; }
.exchange-result > p { margin: 8px 0 24px; color: var(--exchange-muted); font-size: 14px; }
.exchange-guide { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; margin-top: 34px; }
.exchange-guide article { min-height: 156px; display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: center; gap: 18px; padding: 24px; border: 1px solid var(--exchange-line); border-radius: 20px; background: rgba(255,255,255,.72); }
.exchange-guide article > span { width: 58px; height: 58px; display: grid; place-items: center; color: var(--exchange-orange-deep); border-radius: 50%; background: var(--exchange-peach); font-size: 19px; font-weight: 850; }
.exchange-guide h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.exchange-guide p { margin: 7px 0 0; color: var(--exchange-muted); font-size: 12px; line-height: 1.7; }
.exchange-footer { padding: 26px; color: #a0958e; border-top: 1px solid var(--exchange-line); background: rgba(255,255,255,.55); text-align: center; font-size: 11px; }

@media (max-width: 1080px) {
  .exchange-main { width: min(calc(100% - 40px), 820px); }
  .exchange-hero { grid-template-columns: 1fr; gap: 38px; }
  .exchange-copy { padding: 10px 24px 0; text-align: center; }
  .exchange-copy-ring { left: 50%; top: 40%; transform: translate(-50%,-50%); }
  .exchange-kicker { margin-bottom: 20px; }
  .exchange-copy h1 { font-size: clamp(48px,8vw,68px); }
  .exchange-copy > p { font-size: 17px; }
  .exchange-workspace { min-height: 580px; }
}

@media (max-width: 720px) {
  .exchange-header { height: 68px; padding: 0 18px; }
  .exchange-brand { gap: 10px; }
  .exchange-brand-mark { width: 40px; height: 40px; border-radius: 12px; }
  .exchange-brand-mark svg { width: 23px; height: 23px; }
  .exchange-brand strong { font-size: 18px; }
  .exchange-brand small { font-size: 8px; }
  .exchange-main { width: min(calc(100% - 24px), 540px); padding-top: 30px; }
  .exchange-hero { min-height: 0; gap: 28px; }
  .exchange-copy { padding: 0 8px; text-align: left; }
  .exchange-copy-ring { width: 270px; height: 270px; left: -90px; top: 52%; transform: translateY(-50%); border-width: 30px; }
  .exchange-kicker { padding: 7px 11px; margin-bottom: 16px; font-size: 11px; }
  .exchange-copy h1 { font-size: clamp(39px,12vw,54px); line-height: 1.08; }
  .exchange-copy > p { margin-top: 18px; font-size: 14px; line-height: 1.75; }
  .exchange-workspace { min-height: 0; padding: 24px 18px 26px; border-radius: 22px; }
  .exchange-steps { margin-bottom: 28px; }
  .exchange-steps li { gap: 7px; font-size: 10px; }
  .exchange-steps span { width: 30px; height: 30px; }
  .exchange-steps li:not(:last-child)::after { top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); }
  .exchange-state-title { grid-template-columns: 43px minmax(0,1fr); gap: 12px; margin-bottom: 23px; }
  .exchange-state-icon { width: 43px; height: 43px; border-radius: 12px; }
  .exchange-state-icon svg { width: 22px; height: 22px; }
  .exchange-state-title h2 { font-size: 23px; }
  .exchange-state-title p { font-size: 11px; }
  .exchange-field input { height: 54px; }
  .exchange-primary { min-height: 52px; font-size: 14px; }
  .exchange-sms-row { grid-template-columns: minmax(0,1fr) 112px; }
  .exchange-sms-row .exchange-secondary { min-height: 54px; padding-inline: 8px; }
  .exchange-actions { grid-template-columns: 1fr; }
  .exchange-actions .exchange-secondary { order: 2; }
  .exchange-guide { grid-template-columns: 1fr; gap: 0; padding: 4px 18px; border: 1px solid var(--exchange-line); border-radius: 18px; background: rgba(255,255,255,.72); }
  .exchange-guide article { min-height: 112px; padding: 18px 2px; border: 0; border-bottom: 1px solid var(--exchange-line); border-radius: 0; background: transparent; }
  .exchange-guide article:last-child { border-bottom: 0; }
  .exchange-guide article > span { width: 48px; height: 48px; font-size: 16px; }
  .exchange-footer { margin-top: 28px; }
}
