.auto-section { padding: 36px 0 8px; }
.auto-section h2 { margin: 0 0 12px; }
.auto-layout, .auto-grid, .auto-admin-grid { display: grid; gap: 12px; }
.auto-layout { grid-template-columns: minmax(0, 1fr) minmax(260px, .42fr); gap: 18px; }
.auto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auto-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0; }
.auto-card, .auto-panel { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 15px; }
.auto-card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.auto-card-title h3 { font-size: 1.04rem; font-weight: 800; letter-spacing: -.03em; }
.auto-badge { display: inline-grid; place-items: center; min-width: 44px; height: 43px; border-radius: 9px; background: #e0f3d4; color: #273b23; font-size: .875rem; font-weight: 800; }
.auto-badge.nvc { background: #ece5fc; color: #4d3777; }
.auto-badge.facebook { background: #e2ecfa; color: #204577; }
.auto-badge.tiktok { background: #f1e5eb; color: #593044; }
.auto-badge.instagram { background: #fae5ee; color: #7b2e58; }
.auto-options { display: flex; flex-wrap: wrap; gap: 6px; }
.auto-option { min-height: 39px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; color: var(--ink); font-weight: 700; }
.auto-option[aria-pressed="true"] { background: #e3f2d9; border-color: #7d9a68; }
.auto-price-line { min-height: 49px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px; }
.auto-price-line strong { font-size: 1.12rem; }
.auto-price-line span { color: var(--muted); font-size: .875rem; }
.auto-buy { width: 100%; }
.auto-wallet { background: #e3efd9; margin-bottom: 10px; }
.auto-wallet h2, .auto-orders h2 { font-size: 1.19rem; }
.auto-orders h2 { margin: 0 0 12px; }
.auto-wallet p, .auto-orders p { color: var(--muted); font-size: .875rem; }
.auto-wallet .cta { width: 100%; margin-top: 12px; }
.auto-message { padding: 8px 12px; margin: 8px 0; border-radius: 7px; background: #e8f2e3; }
.auto-back { text-decoration: underline; }
.auto-stock-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.auto-admin-grid fieldset { padding: 0; border: 0; margin: 0; }
.auto-admin-grid label { display: block; margin: 9px 0 4px; font-weight: 700; }
.auto-admin-grid textarea, .auto-admin-grid select { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.auto-admin-grid .cta { margin-top: 12px; }
@media(max-width:860px) { .auto-layout { grid-template-columns: minmax(0, 1fr); } }
@media(max-width:580px) { .auto-grid, .auto-admin-grid { grid-template-columns: minmax(0, 1fr); } }

.customer-link { min-width: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: .875rem; color: var(--green); }
.customer-page { max-width: 960px; padding: 34px 0 52px; }
.customer-page h1 { font-size: clamp(1.6rem,4vw,2.4rem); }
.customer-entry {
  display: grid;
  grid-template-columns: minmax(0,1.16fr) minmax(0,.84fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px #293d201a;
}
.customer-form-pane { align-self: center; min-width: 0; padding: clamp(24px,5vw,54px); }
.customer-form-pane h1 { margin: 0; font-size: clamp(2rem,4.4vw,3.1rem); line-height: 1.08; }
.customer-intro { margin: 10px 0 20px; color: var(--muted); }
.customer-form-pane .note { margin-top: 4px; }
.customer-form-pane .cta { width: 100%; min-height: 46px; }
.customer-page label { display: block; margin: 10px 0 4px; font-weight: 700; }
.customer-page input { width: 100%; min-width: 0; min-height: 44px; background: #fbfdfb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); }
.customer-page .cta { margin-top: 14px; }
.customer-notice, .customer-error { padding: 9px 12px; margin: 0 0 12px; border-radius: 8px; }
.customer-notice { color: #245827; background: #e8f4df; }
.customer-error { color: #8c2934; background: #fbecef; }
.customer-switch {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 23px;
  padding: clamp(24px,5vw,46px);
  background: radial-gradient(ellipse at 93% 14%,#425a34,transparent 72%), #202d20;
  color: #fafff4;
}
.customer-switch::before, .customer-switch::after {
  content: '';
  z-index: -1;
  position: absolute;
  right: -145px;
  top: -151px;
  width: 340px;
  height: 340px;
  border: 1px solid #deffc135;
  border-radius: 50%;
  pointer-events: none;
}
.customer-switch::after { right: -109px; top: -116px; width: 270px; height: 270px; }
.customer-switch-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--lime); color: var(--ink); font-size: 1.7rem; }
.customer-switch h2 { max-width: 10em; font-size: clamp(1.55rem,3vw,2.35rem); line-height: 1.13; }
.customer-switch p { margin-top: 10px; color: #ddebd5; }
.customer-switch-button { display: inline-flex; align-items: center; min-height: 46px; margin-top: 22px; padding: 9px 16px; border: 1px solid #dcf4bf; border-radius: 9px; font-weight: 750; }
.customer-switch-button:hover { background: #ffffff16; }
.customer-switch-button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.customer-summary { max-width: 540px; }
.customer-secondary { min-height: 41px; margin-top: 10px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 700; }
@media(max-width:670px) {
  .customer-page { width: calc(100% - 28px); padding: 15px 0 36px; }
  .customer-entry { grid-template-columns: minmax(0,1fr); border-radius: 18px; }
  .customer-form-pane { padding: 22px; }
  .customer-switch { display: block; grid-row: 1; padding: 14px 22px; }
  .customer-switch-mark, .customer-switch p { display: none; }
  .customer-switch-content { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
  .customer-switch h2 { max-width: none; margin: 0; font-size: 1rem; }
  .customer-switch-button { margin-top: 0; }
}
.customer-feedback:empty { display: none; }
.customer-feedback { margin-top: 8px; color: var(--muted); font-size: .875rem; }

.customer-captcha { margin: 14px 0 0; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px 10px; }
.customer-captcha legend { color: var(--green); font-size: .875rem; font-weight: 800; }
.customer-captcha label { margin-top: 3px; font-size: .875rem; }
.customer-captcha input:not([type="hidden"]) { width: 108px; }
.customer-captcha .cf-turnstile { margin-top: 6px; }

.admin-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.admin .admin-shortcuts a { text-decoration: none; }
.clone-prices { display: grid; grid-template-columns: repeat(auto-fit,minmax(135px,1fr)); gap: 10px 16px; }
.clone-prices input { width: 100%; }
.wallet-balance { display: block; font-size: 1.85rem; letter-spacing: -.04em; }
.auto-wallet .cta { text-align: center; }
.wallet-credit label, .wallet-dialog label { display: block; margin: 9px 0 4px; font-weight: 700; }
.wallet-credit input:not([type="checkbox"]), .wallet-dialog input, .wallet-dialog textarea { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
.wallet-credit .cta, .wallet-dialog .cta { margin-top: 12px; }
.wallet-history-filter { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.wallet-history-filter div { flex: 1 1 130px; }
.wallet-history-filter .wallet-history-query { flex: 3 1 260px; }
.wallet-history-filter .cta { margin-top: 0; min-height: 42px; }
.wallet-history-filter a { align-self: center; text-decoration: underline; }
.wallet-history-row { padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.wallet-history-line { display: flex; justify-content: space-between; gap: 12px; }
.wallet-history-line strong:last-child { white-space: nowrap; }
.wallet-history-row .note, .wallet-reversed { margin-top: 4px; }
.wallet-adjustment { margin: 12px 0; padding: 10px 12px; background: #f3f7ee; border: 1px solid var(--line); border-radius: 8px; }
.wallet-adjustment summary { cursor: pointer; color: var(--green); font-weight: 750; }
.wallet-adjustment select { width: 100%; min-height: 42px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }
.wallet-reversal { margin-top: 8px; }
.wallet-reversal summary { width: fit-content; cursor: pointer; color: #852a2a; font-weight: 750; }
.wallet-reversal form { background: #fff6f4; border: 1px solid #eac9c2; border-radius: 8px; padding: 10px; margin-top: 8px; }
.wallet-reversal-confirm { border-color: #d3a7a0; color: #852a2a; }
.wallet-reversed { color: #852a2a; }
.wallet-dialog { width: min(475px,calc(100% - 28px)); border: 1px solid var(--line); border-radius: 15px; padding: 18px; color: var(--ink); }
.wallet-dialog::backdrop { background: #1826199a; }
.shop-welcome h2 { margin: 0 0 12px; font-size: clamp(1.2rem, 5vw, 1.55rem); line-height: 1.25; }
.shop-welcome p { margin: 0 0 10px; line-height: 1.5; }
.shop-welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.shop-welcome-actions .cta, .shop-welcome-actions .customer-secondary { margin: 0; }
.wallet-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.wallet-dialog-head h2 { margin: 0; font-size: 1.25rem; }
.wallet-close { width: 36px; height: 36px; font-size: 1.25rem; background: white; border: 1px solid var(--line); border-radius: 7px; }
.auto-orders .customer-secondary { flex: none; margin: 0; }
.auto-orders .auto-stock-row { flex-wrap: wrap; align-items: flex-start; }
.orders-pagination:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.purchase-total { margin-top: 12px; }
#purchase-quantity { width: 100px; }
#receipt-account { resize: vertical; }
.order-times { display: grid; gap: 2px; margin-top: 6px; color: var(--muted); font-size: .85rem; }
.order-times time { white-space: nowrap; }
.receipt-code { overflow-wrap: anywhere; }
.wallet-order-table { overflow-x: auto; }
.wallet-order-table table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
.wallet-order-table th, .wallet-order-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.wallet-order-table time { white-space: nowrap; }
.wallet-ledger { margin-top: 12px; padding-top: 10px; border-top: 1px solid #cddbc7; }
.wallet-ledger summary { cursor: pointer; font-weight: 750; }
.ledger-entry { padding: 8px 0; border-bottom: 1px solid #cddbc7; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 8px; font-size: .875rem; }
.ledger-entry time { color: var(--muted); }
.ledger-entry p { text-align: right; }
.receipt-support, .stock-pagination { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: 12px; }
.receipt-support a, .stock-pagination a, .account-link a, .account-recovery a { text-decoration: underline; text-underline-offset: 3px; }
.stock-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stock-filter select, .warranty-editor { padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.stock-filter .customer-secondary, .stock-items .auto-stock-row .customer-secondary { margin: 0; }
.stock-items strong { overflow-wrap: anywhere; }
.warranty-editor { display: block; width: 100%; margin: 8px 0 12px; }
.warranty-policy { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 12px; }
.account-recovery { max-width: 540px; margin-top: 12px; overflow-wrap: anywhere; }
.topup-page { max-width: 730px; }
.topup-page .auto-panel, .topup-selection { margin-top: 12px; }
.topup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.topup-actions .customer-secondary { margin: 0; }
.topup-page .auto-stock-row { flex-wrap: wrap; }
.topup-page .auto-stock-row a { text-decoration: underline; }
.bank-topup-page { max-width: 900px; }
.bank-topup-grid { align-items: start; }
.bank-topup-grid .auto-panel { margin-top: 0; }
.bank-topup-grid ol { margin: 8px 0 12px; padding-left: 20px; }
.bank-topup-grid li + li { margin-top: 6px; }
.bank-topup-qr { display: block; width: min(260px,100%); height: auto; margin: 12px auto; }
.bank-field { display: flex; gap: 8px; align-items: center; }
.bank-field input { min-width: 0; background: #f7faf5; font-family: ui-monospace,monospace; }
.bank-field .customer-secondary { flex: none; margin: 0; }
.bank-topup-help { margin-top: 16px; padding: 12px; border-radius: 8px; background: #f0f5eb; }
.bank-topup-help h3 { margin: 0; font-size: 1rem; }
.bank-topup-help p { margin-top: 6px; line-height: 1.5; }
