:root {
  --brown: #5C3317;
  --brown-2: #7a4723;
  --brown-3: #3f210f;
  --gold: #D4A017;
  --gold-2: #f3c95a;
  --cream: #fff7e7;
  --cream-2: #f8ead0;
  --paper: #fffdf8;
  --surface: #ffffff;
  --ink: #22150d;
  --muted: #75685e;
  --line: #eadbc3;
  --line-strong: #d8bf95;
  --success: #147a4d;
  --success-soft: #eaf8ef;
  --danger: #b42318;
  --danger-soft: #fff1ef;
  --info: #245d8c;
  --info-soft: #e9f3fb;
  --shadow: 0 22px 70px rgba(65, 36, 18, 0.12);
  --shadow-soft: 0 14px 34px rgba(65, 36, 18, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(212, 160, 23, 0.24), transparent 340px),
    linear-gradient(135deg, rgba(92, 51, 23, 0.08), rgba(255, 247, 231, 0) 44%),
    linear-gradient(180deg, #fffaf0 0%, #fffdf8 45%, #f8ead0 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  background: linear-gradient(180deg, var(--brown-2), var(--brown));
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(92, 51, 23, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(92, 51, 23, 0.24);
}

button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(92, 51, 23, 0.18);
}

button.secondary {
  color: var(--brown);
  background: linear-gradient(180deg, #fff6d9, #ffeab1);
  box-shadow: none;
  border: 1px solid #e8c971;
}

button.ghost {
  color: var(--brown);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
  border: 1px solid var(--line);
}

button.danger {
  background: linear-gradient(180deg, #c83a2f, var(--danger));
}

button:disabled,
button.is-loading {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  filter: saturate(0.82);
}

a {
  color: var(--brown);
  font-weight: 900;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(255, 250, 240, 0.92);
  border-bottom: 1px solid rgba(216, 191, 149, 0.66);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brown);
  font-size: clamp(1.18rem, 4vw, 1.7rem);
  font-weight: 950;
  letter-spacing: 0;
  text-decoration: none;
}

.brand img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(92, 51, 23, 0.18);
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(232, 201, 113, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.nav a {
  border-radius: 8px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--brown);
  background: transparent;
}

.nav a[aria-current="page"] {
  background: var(--brown);
  color: #fff;
  box-shadow: 0 10px 22px rgba(92, 51, 23, 0.22);
}

.app-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 42px);
}

.panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(216, 191, 149, 0.78);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow-soft);
}

.panel.compact {
  padding: 18px;
}

.stack {
  display: grid;
  gap: 16px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

h1 {
  margin-bottom: 12px;
  color: var(--brown);
  font-size: clamp(2.25rem, 7vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  color: var(--brown);
  font-size: clamp(1.35rem, 3.4vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  color: var(--brown);
  font-size: 1.15rem;
  letter-spacing: 0;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.5;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--brown);
  background: #fff1bf;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 8px;
  color: var(--brown);
  font-size: 1.02rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 58px;
  border: 2px solid #dcc49d;
  border-radius: 8px;
  padding: 13px 15px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 1.12rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  outline: 4px solid rgba(212, 160, 23, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.status {
  min-height: 28px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}

.status[data-type="success"] {
  color: var(--success);
}

.status[data-type="error"] {
  color: var(--danger);
}

.status[data-type="info"] {
  color: var(--info);
}

.login-panel {
  max-width: 1040px;
  margin: clamp(12px, 6vh, 62px) auto;
}

.client-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: clamp(20px, 4vw, 42px);
  align-items: stretch;
}

.entry-copy {
  position: relative;
  display: grid;
  min-height: 430px;
  align-content: end;
  overflow: hidden;
  border-radius: 8px;
  padding: clamp(24px, 5vw, 42px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(63, 33, 15, 0.2), rgba(63, 33, 15, 0.9)),
    linear-gradient(135deg, var(--brown), #9b602e 58%, var(--gold));
  box-shadow: var(--shadow);
}

.entry-copy::before {
  content: "";
  position: absolute;
  inset: 24px 24px auto auto;
  width: 132px;
  height: 132px;
  border: 18px solid rgba(255, 235, 178, 0.4);
  border-radius: 50%;
}

.entry-copy > * {
  position: relative;
}

.entry-copy h1,
.entry-copy .lead,
.entry-copy .eyebrow {
  color: #fff;
}

.entry-copy h1,
.cashier-command h1 {
  text-wrap: balance;
}

.entry-copy .eyebrow {
  background: rgba(255, 255, 255, 0.16);
}

.login-card {
  display: grid;
  align-content: center;
}

.login-perks {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.login-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 850;
}

.login-perks span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--brown);
  background: #fff1bf;
  font-weight: 950;
}

.dashboard-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.headline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.headline-row h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.9rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--brown);
  background: #fff0bf;
  font-size: 0.95rem;
  font-weight: 950;
}

.badge[data-online="false"] {
  color: #fff;
  background: var(--danger);
}

.client-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(300px, 0.86fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.balance-ticket {
  position: relative;
  display: grid;
  min-height: 360px;
  align-content: space-between;
  overflow: hidden;
  border-radius: 8px;
  padding: clamp(24px, 4vw, 36px);
  color: #fff;
  background:
    linear-gradient(140deg, rgba(63, 33, 15, 0.96), rgba(92, 51, 23, 0.9) 48%, rgba(212, 160, 23, 0.72)),
    var(--brown);
  box-shadow: var(--shadow);
}

.balance-ticket::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -62px;
  width: 230px;
  height: 230px;
  border: 34px solid rgba(255, 239, 191, 0.18);
  border-radius: 50%;
}

.balance-ticket > * {
  position: relative;
  z-index: 1;
}

.balance-ticket h1,
.balance-ticket .lead,
.balance-ticket .summary-line {
  color: #fff;
}

.balance-amount {
  display: grid;
  gap: 6px;
  margin-top: 26px;
}

.balance-amount span {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 850;
}

.balance-amount strong {
  color: #fff;
  font-size: clamp(3.6rem, 12vw, 7.2rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.client-actions button {
  min-width: 130px;
}

.client-side {
  display: grid;
  gap: 18px;
}

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

.metric {
  display: grid;
  gap: 7px;
  min-height: 120px;
  align-content: center;
  padding: 20px;
  border: 1px solid rgba(216, 191, 149, 0.8);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 247, 231, 0.82), rgba(255, 255, 255, 0.98));
}

.metric span {
  color: var(--muted);
  font-weight: 900;
}

.metric strong {
  color: var(--brown);
  font-size: clamp(1.55rem, 5vw, 2.6rem);
  line-height: 1;
}

.compact-metric {
  min-height: 94px;
  padding: 16px;
}

.compact-metric strong {
  font-size: clamp(1.35rem, 4vw, 1.95rem);
}

.qr-panel {
  display: grid;
  justify-items: center;
  text-align: center;
}

.qr-box {
  display: grid;
  place-items: center;
  width: min(280px, 100%);
  min-height: 280px;
  border: 3px solid var(--brown);
  border-radius: 8px;
  background: #fffaf0;
  padding: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 0 8px rgba(212, 160, 23, 0.08);
}

.qr-box img,
.qr-box canvas {
  width: 240px;
  height: 240px;
}

.qr-fallback {
  overflow-wrap: anywhere;
  text-align: left;
  font-size: 0.72rem;
}

.mini {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.reward-focus {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.next-reward {
  display: grid;
  min-height: 240px;
  place-items: center;
  gap: 8px;
  text-align: center;
  border: 1px solid rgba(216, 191, 149, 0.76);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.next-reward span {
  font-size: 4rem;
}

.next-reward strong {
  color: var(--brown);
  font-size: 1.45rem;
}

.next-reward small {
  color: var(--muted);
  font-weight: 850;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  margin-top: 18px;
}

.rewards-panel {
  margin-top: 18px;
}

.reward-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.reward-row.is-unlocked {
  border-color: rgba(20, 122, 77, 0.38);
  background: var(--success-soft);
}

.reward-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reward-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #fff0bf;
  font-size: 1.55rem;
}

.reward-copy strong,
.reward-copy small {
  display: block;
}

.reward-copy strong {
  color: var(--brown);
}

.reward-copy small {
  color: var(--muted);
  font-weight: 850;
}

.progress-track {
  height: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadcc7;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--success));
}

.history-list,
.confirmation-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.history-list li,
.confirmation-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.confirmation-list li {
  align-items: flex-start;
}

.history-list strong,
.history-list span,
.confirmation-list strong {
  color: var(--brown);
  font-weight: 950;
}

.history-list small,
.confirmation-list small {
  display: block;
  color: var(--muted);
  font-weight: 750;
}

.confirmation-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 150px;
}

.confirmation-links a {
  border: 1px solid #e8c971;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff7db;
  text-decoration: none;
  font-size: 0.88rem;
}

.empty {
  justify-content: center;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.cashier-screen {
  display: grid;
  gap: 18px;
}

.cashier-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
  border-radius: 8px;
  padding: clamp(22px, 4vw, 36px);
  color: #fff;
  background:
    linear-gradient(125deg, rgba(63, 33, 15, 0.98), rgba(92, 51, 23, 0.93) 54%, rgba(212, 160, 23, 0.72)),
    var(--brown);
  box-shadow: var(--shadow);
}

.cashier-command h1,
.cashier-command .lead,
.cashier-command .eyebrow {
  color: #fff;
}

.cashier-command .lead {
  max-width: 34ch;
}

.cashier-command .eyebrow {
  background: rgba(255, 255, 255, 0.16);
}

.command-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}

.command-actions button {
  min-height: 62px;
}

.wallet-card {
  display: grid;
  gap: 5px;
  min-height: 86px;
  align-content: center;
  border: 1px solid rgba(255, 239, 191, 0.36);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.wallet-card span,
.wallet-card small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.wallet-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 1.05rem;
}

.cashier-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.scanner-panel,
.checkout-panel {
  min-height: 100%;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.toolbar h2,
.toolbar h3 {
  margin-bottom: 0;
}

.wallet-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.reader {
  position: relative;
  width: 100%;
  min-height: 335px;
  display: grid;
  place-items: center;
  border: 2px dashed #d6bd91;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(92, 51, 23, 0.05), rgba(212, 160, 23, 0.1)),
    #fffdf8;
  overflow: hidden;
}

.reader::before,
.reader::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  border-color: var(--gold);
  opacity: 0.8;
}

.reader::before {
  top: 18px;
  left: 18px;
  border-top: 5px solid;
  border-left: 5px solid;
  border-radius: 8px 0 0 0;
}

.reader::after {
  right: 18px;
  bottom: 18px;
  border-right: 5px solid;
  border-bottom: 5px solid;
  border-radius: 0 0 8px 0;
}

.native-video {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 8px;
  background: #1b120c;
}

.quick-form {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.customer-search {
  display: grid;
  gap: 14px;
}

.customer-search + .toolbar {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.customer-results {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.customer-result-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  width: 100%;
  min-height: 70px;
  justify-items: start;
  align-items: center;
  padding: 12px 14px;
  color: var(--brown);
  background: #fffdf8;
  border: 1px solid var(--line);
  box-shadow: none;
  text-align: left;
}

.customer-result-button strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.08rem;
}

.customer-result-button small {
  grid-column: 1;
  color: var(--muted);
  font-weight: 800;
}

.customer-result-button span {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--brown);
  background: #fff1bf;
  font-weight: 950;
}

.client-summary {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(216, 191, 149, 0.76);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 241, 191, 0.72), rgba(255, 255, 255, 0.9));
}

.client-summary strong {
  color: var(--brown);
  font-size: clamp(1.7rem, 5vw, 2.45rem);
  line-height: 1.05;
}

.summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-weight: 850;
}

.wallet-address-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(216, 191, 149, 0.7);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.68);
}

.wallet-address-line span {
  color: var(--muted);
  font-weight: 900;
}

.wallet-address-line strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

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

.purchase-studio {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(216, 191, 149, 0.76);
  border-radius: 8px;
  padding: 18px;
  background: #fffdf8;
}

.purchase-studio input {
  min-height: 74px;
  color: var(--brown);
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 950;
  line-height: 1;
}

.amount-pad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.amount-pad button {
  min-height: 44px;
  padding: 0 10px;
  color: var(--brown);
  background: #fff7db;
  border: 1px solid #e8c971;
  box-shadow: none;
  font-size: 0.96rem;
}

.credit-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  align-items: baseline;
  border-radius: 8px;
  padding: 15px;
  background: linear-gradient(135deg, #fff1bf, #fff9e7);
  border: 1px solid #ecd17e;
}

.credit-preview span {
  color: var(--muted);
  font-weight: 900;
}

.credit-preview strong {
  color: var(--brown);
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  line-height: 1;
}

.credit-preview small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

.purchase-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.purchase-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 5px 12px;
  align-items: center;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
}

.purchase-steps li > span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #d6bd91;
  border-radius: 50%;
  background: #fffaf0;
}

.purchase-steps li > span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d6bd91;
}

.purchase-steps strong {
  color: var(--brown);
  font-size: 0.98rem;
}

.purchase-steps small {
  color: var(--muted);
  font-weight: 750;
}

.purchase-steps li[data-state="active"] {
  border-color: var(--gold);
  background: #fff9e7;
}

.purchase-steps li[data-state="active"] > span {
  border-color: var(--gold);
}

.purchase-steps li[data-state="active"] > span::before {
  background: var(--gold);
}

.purchase-steps li[data-state="done"] {
  border-color: rgba(20, 122, 77, 0.42);
  background: var(--success-soft);
}

.purchase-steps li[data-state="done"] > span {
  border-color: var(--success);
  background: var(--success);
}

.purchase-steps li[data-state="done"] > span::before {
  content: "";
  width: 11px;
  height: 7px;
  border-radius: 0;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: transparent;
  transform: rotate(-45deg) translateY(-1px);
}

.purchase-steps li[data-state="error"] {
  border-color: rgba(180, 35, 24, 0.42);
  background: var(--danger-soft);
}

.purchase-steps li[data-state="error"] > span {
  border-color: var(--danger);
}

.purchase-steps li[data-state="error"] > span::before {
  background: var(--danger);
}

.reward-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(440px, calc(100vw - 36px));
  border-radius: 8px;
  padding: 16px 18px;
  background: var(--brown);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 22px 44px rgba(36, 22, 13, 0.24);
}

.toast[data-type="success"] {
  background: var(--success);
}

.toast[data-type="error"] {
  background: var(--danger);
}

.toast[data-type="info"] {
  background: var(--info);
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .client-entry,
  .client-hero,
  .section-grid,
  .cashier-command,
  .cashier-workbench {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .grid.two,
  .grid.three,
  .dashboard-header,
  .form-row,
  .metric-strip,
  .customer-stats,
  .reward-panel,
  .command-actions {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1;
    text-align: center;
  }

  button {
    width: 100%;
  }

  .toolbar button,
  .wallet-strip button,
  .client-actions button {
    width: auto;
  }

  .wallet-strip {
    width: 100%;
  }

  .customer-search .badge {
    display: none;
  }

  .customer-result-button {
    grid-template-columns: 1fr;
  }

  .customer-result-button span {
    grid-column: 1;
    grid-row: auto;
  }

  .reader {
    min-height: 280px;
  }

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

  .history-list li,
  .confirmation-list li {
    display: grid;
  }

  .confirmation-links {
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding-inline: 14px;
  }

  .entry-copy,
  .balance-ticket,
  .cashier-command,
  .panel {
    padding: 18px;
  }

  .brand {
    font-size: 1.1rem;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .wallet-address-line,
  .credit-preview {
    grid-template-columns: 1fr;
  }

  .entry-copy h1,
  .cashier-command h1 {
    font-size: 2.15rem;
  }

  .entry-copy .lead,
  .cashier-command .lead {
    max-width: 28ch;
  }

  .purchase-studio input {
    font-size: 2rem;
  }
}
