:root {
  --bg: #18130d;
  --surface: rgba(25, 21, 17, 0.92);
  --border: rgba(255, 193, 120, 0.2);
  --text: #fff7ef;
  --muted: #d3baa2;
  --accent: #ff7a00;
  --accent-strong: #ff9a2f;
  --accent-pale: #ffd0a0;
  --success: #1eca7b;
  --warning: #ffd166;
  --danger: #ff6f61;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --font-ui: "Segoe UI Variable Display", "Noto Sans Thai", "Leelawadee UI", Tahoma,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 0, 0.14), transparent 35%),
    radial-gradient(circle at top right, rgba(255, 209, 102, 0.08), transparent 25%),
    linear-gradient(180deg, #21160d 0%, #130f0c 55%, #0d0b09 100%);
  color: var(--text);
  font-family: var(--font-ui);
}

body.customer-overlay-active {
  overflow: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, 0.02) 44% 47%, transparent 47% 100%),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.015) 0,
      rgba(255, 255, 255, 0.015) 12px,
      transparent 12px,
      transparent 24px
    );
}

body::after {
  background:
    linear-gradient(180deg, rgba(11, 8, 5, 0.72), rgba(11, 8, 5, 0.86)),
    url("https://img1.pic.in.th/images/ChatGPT-Image-2-..-2569-20_55_31.png") center / cover
      no-repeat;
  opacity: 0.38;
}

.ambient {
  position: fixed;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.6;
  pointer-events: none;
}

.ambient-left {
  top: -5rem;
  left: -5rem;
  background: rgba(255, 122, 0, 0.24);
}

.ambient-right {
  right: -4rem;
  bottom: 8rem;
  background: rgba(255, 221, 153, 0.16);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.payment-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 10, 10, 0.38);
  backdrop-filter: blur(16px);
}

.payment-success-modal {
  width: min(420px, 100%);
  padding: 2rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(30, 202, 123, 0.2), rgba(255, 255, 255, 0.08)),
    rgba(18, 18, 18, 0.86);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
  text-align: center;
}

.payment-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6rem;
  height: 6rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgba(30, 202, 123, 0.92);
  border: 6px solid rgba(255, 255, 255, 0.92);
  font-size: 2.8rem;
}

.payment-success-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: #ffffff;
}

.payment-success-copy {
  margin: 0.7rem 0 0;
  color: #e8fff2;
  font-size: 1.05rem;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 8, 8, 0.46);
  backdrop-filter: blur(14px);
}

.confirm-modal {
  width: min(460px, 100%);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 122, 0, 0.16), rgba(255, 255, 255, 0.05)),
    rgba(18, 18, 18, 0.94);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  text-align: center;
}

.cash-modal {
  width: min(620px, 100%);
  text-align: left;
}

.cash-summary-grid,
.cash-preset-grid {
  display: grid;
  gap: 0.75rem;
}

.cash-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.cash-summary-card {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.cash-summary-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.cash-summary-card strong {
  font-size: 1.6rem;
}

.cash-preset-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.cash-preset-button {
  min-height: 3.25rem;
}

.cash-input-field {
  margin-top: 1rem;
}

.cash-status-message {
  margin: 0.85rem 0 0;
  min-height: 1.6rem;
}

.confirm-eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-pale);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.confirm-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.confirm-copy {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.2), rgba(255, 122, 0, 0.04) 45%, rgba(255, 255, 255, 0.05)),
    rgba(15, 12, 9, 0.78);
  box-shadow: var(--shadow);
}

.hero-compact {
  margin-bottom: 1.3rem;
}

.hero-brand-block {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.brand-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.55rem;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.brand-logo-customer {
  width: 112px;
  height: 112px;
  border-radius: 28px;
}

.page-customer-minimal {
  min-height: 100vh;
  overflow: hidden;
}

.page-admin {
  height: 100vh;
  overflow: hidden;
}

.page-admin .shell {
  height: 100vh;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

.page-admin .hero {
  padding: 1.2rem 1.4rem;
}

.page-admin .hero-copy {
  margin-top: 0.45rem;
}

.page-admin .brand-logo {
  width: 72px;
  height: 72px;
}

.page-admin .admin-grid {
  flex: 1;
  margin-top: 0.85rem;
}

.page-admin .card {
  padding: 1rem;
}

.page-admin .card-heading {
  margin-bottom: 0.75rem;
}

.page-admin .pricing-console {
  gap: 0.75rem;
}

.page-admin .price-target {
  min-height: 5rem;
  padding: 0.9rem 1rem;
}

.page-admin .price-target-value {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
}

.page-admin .keypad-grid {
  gap: 0.6rem;
}

.page-admin .keypad-button {
  min-height: 3.45rem;
  font-size: 1.35rem;
}

.page-admin .keypad-actions {
  gap: 0.6rem;
}

.page-admin .preview-ribbon,
.page-admin .button-row {
  margin-top: 0.75rem;
}

.page-admin .preview-ribbon > div,
.page-admin .summary-box > div {
  padding: 0.85rem 0.95rem;
}

.page-admin .button-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.page-admin button {
  min-height: 2.95rem;
  padding: 0.7rem 0.85rem;
}

.page-admin .inline-help {
  margin-top: 0.55rem;
}

.customer-minimal-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.customer-display-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 3rem);
  padding: 2.2rem 2rem;
  border: 1px solid var(--border);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 122, 0, 0.08), rgba(255, 255, 255, 0.03)),
    var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(12px);
}

.customer-display-side {
  width: 100%;
}

.customer-display-side-qr {
  display: none;
}

.customer-display-card.has-qr {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 1.4rem;
  align-items: center;
  text-align: left;
}

.customer-display-card.has-qr .customer-display-side-amount {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.customer-display-card.has-qr .customer-display-side-qr {
  display: block;
}

.customer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.customer-display-card.has-qr .customer-brand {
  align-items: flex-start;
}

.customer-brand-caption {
  margin: 0;
  color: var(--accent-pale);
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.customer-amount-label {
  margin: 0;
  color: var(--accent-pale);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.customer-amount {
  margin: 0.8rem 0 1.4rem;
  font-size: clamp(2.8rem, 10vw, 5rem);
  line-height: 1;
  color: #fff0df;
}

.customer-display-card.has-qr .customer-amount {
  margin-bottom: 0;
  font-size: clamp(3.2rem, 7vw, 5.4rem);
}

.customer-box-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.85rem auto 0;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.09);
  color: #ffe0b7;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.4;
}

.customer-display-card.has-qr .customer-box-note {
  justify-content: flex-start;
  margin-left: 0;
  margin-right: 0;
}

.customer-mode-note {
  margin: 0.75rem auto 0;
  color: var(--accent-pale);
  font-size: 0.95rem;
  font-weight: 700;
}

.customer-display-card.has-qr .customer-mode-note {
  margin-left: 0;
  margin-right: 0;
}

.customer-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 1.25rem;
  border-radius: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.18), transparent 48%),
    rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: translateY(26px) scale(0.94);
  transform-origin: center;
}

.customer-display-card.qr-ready .customer-qr-frame {
  animation: qrCardReveal 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.customer-qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  max-width: 16rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

.customer-qr-placeholder strong,
.qr-placeholder strong {
  font-size: 2rem;
  color: #ffffff;
  line-height: 1.1;
}

.customer-qr-placeholder span,
.qr-placeholder span {
  display: block;
}

.success-placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: rgba(30, 202, 123, 0.9);
  border: 4px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 40px rgba(30, 202, 123, 0.22);
  font-size: 2.3rem;
}

.angpao-placeholder-icon {
  background: rgba(255, 122, 0, 0.9);
  box-shadow: 0 20px 40px rgba(255, 122, 0, 0.22);
}

.customer-qr-image {
  width: min(100%, 360px);
  border-radius: 28px;
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.24);
}

.customer-recipient-name {
  margin: 1rem 0 0;
  color: #ffe0b7;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.customer-display-card.has-qr .customer-recipient-name {
  text-align: center;
}

.customer-display-card.is-angpao .customer-recipient-name {
  display: none;
}

.customer-display-card.is-paid {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  text-align: center;
}

.customer-display-card.is-paid .customer-brand,
.customer-display-card.is-paid .customer-display-side-amount {
  align-items: center;
  text-align: center;
}

.customer-display-card.is-paid .customer-display-side-qr {
  display: block;
}

.customer-display-card.is-paid .customer-box-note,
.customer-display-card.is-paid .customer-mode-note,
.customer-display-card.is-paid .customer-recipient-name {
  display: none;
}

.customer-facing-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, rgba(11, 8, 5, 0.48), rgba(11, 8, 5, 0.68)),
    rgba(11, 8, 5, 0.34);
  backdrop-filter: blur(14px);
}

.customer-facing-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 1;
  min-height: 2.7rem;
  padding-inline: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(20, 18, 15, 0.76);
  color: #fff7ef;
}

.customer-display-card-admin {
  width: min(1100px, calc(100vw - 4rem));
  min-height: min(720px, calc(100vh - 4rem));
  padding: 2.5rem;
}

.customer-display-card-admin.has-qr {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 2rem;
}

.customer-display-card-admin .customer-amount {
  font-size: clamp(4rem, 8vw, 6.2rem);
}

.customer-display-card-admin .customer-qr-frame {
  min-height: 420px;
}

.customer-display-card-admin .customer-qr-image {
  width: min(100%, 420px);
}

.customer-display-card-admin .customer-qr-placeholder strong {
  font-size: 2.3rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-pale);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.hero-copy,
.inline-help,
.status-message,
.timeline-item p,
.qr-placeholder,
.notice-banner,
.warning-banner {
  color: var(--muted);
  line-height: 1.6;
}

.hero-copy {
  max-width: 48rem;
  margin: 0.85rem 0 0;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.ghost-link,
.ghost-link:visited {
  color: var(--accent-pale);
  text-decoration: none;
}

.ghost-link:hover {
  text-decoration: underline;
}

.ghost-button-inline {
  min-height: 2.6rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255, 208, 160, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-pale);
}

.ghost-button-inline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.status-pill {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.status-neutral {
  background: rgba(255, 255, 255, 0.1);
}

.status-pending {
  background: rgba(255, 209, 102, 0.16);
  color: var(--warning);
}

.status-paid {
  background: rgba(30, 202, 123, 0.16);
  color: var(--success);
}

.status-expired,
.status-error {
  background: rgba(255, 111, 97, 0.16);
  color: var(--danger);
}

.status-live {
  background: rgba(30, 202, 123, 0.18);
  color: var(--success);
}

.status-reconnecting {
  background: rgba(255, 209, 102, 0.16);
  color: var(--warning);
}

.tag {
  background: rgba(255, 122, 0, 0.18);
  color: var(--accent-pale);
}

.customer-grid,
.admin-grid {
  display: grid;
  gap: 1.35rem;
  margin-top: 1.35rem;
}

.customer-grid {
  grid-template-columns: 1.15fr 0.95fr;
}

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

.workflow-card {
  grid-column: 1 / -1;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 20%),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.card::before {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), rgba(255, 209, 102, 0.65), transparent);
  content: "";
}

.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.section-label {
  margin: 0 0 0.45rem;
  color: var(--accent-pale);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.feature-card h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff0df;
}

.price-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.price-cell,
.detail-card,
.timeline-item,
.mini-display-grid > div {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.price-cell span,
.detail-card span,
.preview-ribbon span,
.mini-display-grid span,
.summary-box span,
.mini-display-top span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.price-cell strong,
.detail-card strong,
.preview-ribbon strong,
.mini-display-grid strong,
.summary-box strong,
.mini-display-top strong {
  font-size: 1.2rem;
}

.notice-banner,
.warning-banner {
  margin: 1rem 0 0;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 209, 102, 0.18);
}

.notice-banner {
  background: rgba(255, 122, 0, 0.08);
}

.warning-banner {
  background: rgba(255, 111, 97, 0.12);
  border-color: rgba(255, 111, 97, 0.18);
  color: #ffd6d1;
}

.summary-box,
.preview-ribbon,
.mini-display-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.summary-box > div,
.preview-ribbon > div {
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.08), rgba(255, 255, 255, 0.04));
}

.qr-panel {
  display: flex;
  flex-direction: column;
}

.qr-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 1rem;
  border-radius: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.16), transparent 45%),
    rgba(255, 255, 255, 0.03);
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 18rem;
  text-align: center;
}

.qr-image {
  width: min(100%, 300px);
  border-radius: 26px;
  background: #ffffff;
  padding: 0.85rem;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.24);
}

.paid-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 999px;
  background: rgba(30, 202, 123, 0.9);
  border: 6px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 44px rgba(30, 202, 123, 0.3);
  font-size: 3rem;
}

.details-grid,
.form-grid,
.button-row,
.timeline,
.mini-display-grid {
  display: grid;
  gap: 0.9rem;
}

.details-grid,
.mini-display-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

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

.timeline-item {
  position: relative;
  padding-top: 1.25rem;
}

.timeline-item span {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  display: inline-flex;
  width: 2.1rem;
  height: 2.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 122, 0, 0.14);
  color: var(--accent-pale);
  font-weight: 700;
}

.status-message {
  margin: 1rem 0 0;
}

.control-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pricing-console {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 1rem;
  align-items: start;
}

.price-targets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.price-target {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-height: 6rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.price-target:hover {
  transform: translateY(-1px);
}

.price-target.is-active {
  border-color: rgba(255, 154, 47, 0.8);
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.08);
}

.price-target-label {
  color: var(--accent-pale);
  font-size: 0.95rem;
}

.price-target-value {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.05;
}

.keypad-panel {
  display: grid;
  gap: 0.9rem;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.keypad-button {
  min-height: 4.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
}

.keypad-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.keypad-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.field span {
  color: var(--accent-pale);
  font-size: 0.92rem;
}

.field input {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: rgba(255, 154, 47, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.12);
}

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

.angpao-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.angpao-panel button {
  min-width: 13rem;
}

button {
  cursor: pointer;
  min-height: 3.25rem;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 18px;
  font: inherit;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1c1208;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.danger-button {
  background: rgba(255, 111, 97, 0.18);
  color: #ffd6d1;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: end;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-panel .inline-help {
  grid-column: 1 / -1;
  margin: 0;
}

.mini-display {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mini-display-top strong {
  font-size: 2rem;
}

.mini-display-grid {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-qr-panel {
  display: none;
}

.hidden {
  display: none !important;
}

@keyframes qrCardReveal {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.94);
  }

  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .page-admin {
    height: auto;
    overflow: visible;
  }

  .page-admin .shell {
    height: auto;
    padding: 1rem 0 2rem;
    display: block;
  }

  .customer-grid,
  .admin-grid,
  .price-targets {
    grid-template-columns: 1fr;
  }

  .customer-display-card.has-qr {
    width: min(560px, 100%);
    grid-template-columns: 1fr;
    text-align: center;
  }

  .customer-display-card.has-qr .customer-brand {
    align-items: center;
  }

  .timeline,
  .price-strip,
  .details-grid,
  .mini-display-grid,
  .form-grid,
  .angpao-panel,
  .button-row,
  .summary-box,
  .preview-ribbon,
  .mini-display-top,
  .keypad-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .hero-meta {
    align-items: flex-start;
  }

  .hero-brand-block {
    flex-direction: column;
  }

  .pricing-console {
    grid-template-columns: 1fr;
  }

  .customer-display-card-admin,
  .customer-display-card-admin.has-qr {
    width: min(560px, 100%);
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (min-width: 981px) and (max-width: 1280px), (min-width: 981px) and (max-height: 920px) {
  .page-admin {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .page-admin .shell {
    height: auto;
    min-height: 100vh;
    padding: 0.85rem 0 1.5rem;
    display: block;
  }

  .page-admin .hero {
    padding: 1rem 1.15rem;
  }

  .page-admin .hero-copy {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .page-admin .card {
    padding: 0.9rem;
  }

  .page-admin .pricing-console {
    grid-template-columns: minmax(250px, 0.86fr) minmax(320px, 1fr);
    gap: 0.8rem;
  }

  .page-admin .price-target {
    min-height: 4.4rem;
    padding: 0.8rem 0.9rem;
  }

  .page-admin .price-target-value {
    font-size: clamp(1.15rem, 1.9vw, 1.65rem);
  }

  .page-admin .keypad-button {
    min-height: 3.1rem;
    font-size: 1.2rem;
  }

  .page-admin .preview-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .page-admin .preview-ribbon > div {
    padding: 0.75rem 0.85rem;
  }

  .page-admin .button-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .page-admin button {
    min-height: 2.75rem;
    padding: 0.62rem 0.78rem;
    font-size: 0.95rem;
  }

  .page-admin .angpao-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 1rem, 1220px);
    padding-top: 1rem;
  }

  .hero,
  .card {
    border-radius: 24px;
    padding: 1.15rem;
  }

  h1 {
    font-size: 2rem;
  }

  .qr-stage {
    min-height: 250px;
  }

  .customer-display-card {
    padding: 1.5rem 1rem;
    border-radius: 24px;
  }

  .customer-qr-frame {
    min-height: 280px;
    border-radius: 22px;
  }

  .brand-logo,
  .brand-logo-customer {
    width: 88px;
    height: 88px;
  }

  .customer-facing-overlay {
    padding: 0.8rem;
  }

  .customer-facing-close {
    top: 0.8rem;
    right: 0.8rem;
  }

  .customer-display-card-admin {
    width: min(100%, calc(100vw - 1.6rem));
    padding: 1.35rem 1rem;
  }

  .cash-summary-grid,
  .cash-preset-grid {
    grid-template-columns: 1fr;
  }
}
