:root {
  --tonsores-loyalty-ink: #11100f;
  --tonsores-loyalty-paper: #f4efe7;
  --tonsores-loyalty-gold: #c8893b;
  --tonsores-loyalty-green: #207a4a;
  --tonsores-loyalty-red: #a93631;
}

.tonsores-loyalty {
  color: var(--tonsores-loyalty-paper);
  background: #151311;
  border: 1px solid rgba(200, 137, 59, 0.35);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.tonsores-loyalty__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 48px);
  background: radial-gradient(circle at 85% 15%, rgba(200, 137, 59, 0.22), transparent 34%), #151311;
}

.tonsores-loyalty__hero h2,
.tonsores-loyalty__hero p,
.tonsores-loyalty__panel h3,
.tonsores-loyalty__panel p { color: inherit; }
.tonsores-loyalty__hero h2 { margin: 5px 0 10px; font-size: clamp(30px, 5vw, 54px); }
.tonsores-loyalty__hero p { max-width: 620px; margin: 0; color: rgba(244, 239, 231, 0.78); }
.tonsores-loyalty__eyebrow { text-transform: uppercase; letter-spacing: 0.18em; color: var(--tonsores-loyalty-gold) !important; font-size: 12px; font-weight: 700; }
.tonsores-loyalty__balance { min-width: 150px; padding: 22px; text-align: center; border: 1px solid var(--tonsores-loyalty-gold); border-radius: 50%; aspect-ratio: 1; display: grid; place-content: center; }
.tonsores-loyalty__balance strong { font-size: 44px; line-height: 1; color: #fff; }
.tonsores-loyalty__balance span { margin-top: 7px; color: var(--tonsores-loyalty-gold); text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; }

.tonsores-loyalty__tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: #090909; border-block: 1px solid rgba(255,255,255,.08); }
.tonsores-loyalty__tabs button { min-height: 52px; border: 0; border-bottom: 3px solid transparent; color: rgba(255,255,255,.68); background: transparent; font-weight: 700; cursor: pointer; }
.tonsores-loyalty__tabs button.is-active { color: #fff; border-color: var(--tonsores-loyalty-gold); }
.tonsores-loyalty__tabs button:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
.tonsores-loyalty__panel { padding: clamp(22px, 5vw, 44px); }

.tonsores-loyalty__qr-card { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; align-items: center; gap: clamp(22px, 5vw, 54px); padding: clamp(20px, 4vw, 38px); color: var(--tonsores-loyalty-ink); background: var(--tonsores-loyalty-paper); border-radius: 18px; }
.tonsores-loyalty__qr { width: 100%; max-width: 260px; padding: 12px; background: #fff; border-radius: 14px; }
.tonsores-loyalty__qr svg { display: block; width: 100%; height: auto; }
.tonsores-loyalty__qr-card h3 { color: var(--tonsores-loyalty-ink); font-size: clamp(25px, 4vw, 38px); margin: 0 0 8px; }
.tonsores-loyalty__qr-card p { color: #4f4943; margin: 0; }

.tonsores-loyalty__earn-grid,
.tonsores-loyalty__reward-grid,
.tonsores-loyalty__voucher-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.tonsores-loyalty__earn-grid article,
.tonsores-loyalty__reward,
.tonsores-loyalty__voucher { padding: 22px; border: 1px solid rgba(200, 137, 59, .32); border-radius: 16px; background: #1d1a17; }
.tonsores-loyalty__earn-grid strong { display: block; color: var(--tonsores-loyalty-gold); font-size: 32px; }
.tonsores-loyalty__earn-grid span { display: block; font-weight: 700; }
.tonsores-loyalty__earn-grid small { display: block; margin-top: 8px; color: rgba(255,255,255,.58); }
.tonsores-loyalty__reward-cost { color: var(--tonsores-loyalty-gold) !important; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.tonsores-loyalty__reward h3 { margin: 8px 0; }
.tonsores-loyalty__reward form button { min-height: 46px; width: 100%; border: 0; border-radius: 8px; background: var(--tonsores-loyalty-gold); color: #101010; font-weight: 800; cursor: pointer; }
.tonsores-loyalty__missing { color: #e0b97e !important; font-weight: 700; }
.tonsores-loyalty__voucher > p { color: var(--tonsores-loyalty-green) !important; font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .12em; }
.tonsores-loyalty__voucher.is-used { opacity: .58; }
.tonsores-loyalty__voucher strong,
.tonsores-loyalty__voucher small { display: block; margin-top: 10px; }

.tonsores-loyalty__history { margin-top: 34px; }
.tonsores-loyalty__history ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.12); }
.tonsores-loyalty__history li { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.tonsores-loyalty__history li span,
.tonsores-loyalty__history li small { display: block; }
.tonsores-loyalty__history li small { color: rgba(255,255,255,.55); }
.tonsores-loyalty__history b { font-size: 20px; }
.tonsores-loyalty__history b.is-positive { color: #6ac994; }
.tonsores-loyalty__history b.is-negative { color: #e58c85; }
.tonsores-loyalty__notice { margin: 0 0 18px; padding: 14px 18px; border-left: 4px solid; border-radius: 8px; color: #111; background: #fff; }
.tonsores-loyalty__notice.is-success { border-color: var(--tonsores-loyalty-green); }
.tonsores-loyalty__notice.is-error { border-color: var(--tonsores-loyalty-red); }

.tonsores-loyalty-admin__search { display: flex; align-items: end; gap: 10px; margin: 22px 0; }
.tonsores-loyalty-admin__search label,
.tonsores-loyalty-admin__award label { display: grid; gap: 7px; font-weight: 700; }
.tonsores-loyalty-admin__search input { min-width: min(420px, 60vw); }
.tonsores-loyalty-admin__card { max-width: 860px; padding: 26px; background: #fff; border: 1px solid #dcdcde; border-radius: 14px; }
.tonsores-loyalty-admin__card header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid #ddd; }
.tonsores-loyalty-admin__card header h2 { margin: 4px 0; font-size: 30px; }
.tonsores-loyalty-admin__card header > strong { font-size: 40px; color: #8d5f25; }
.tonsores-loyalty-admin__card header small { font-size: 13px; }
.tonsores-loyalty-admin__award { display: grid; gap: 16px; margin-top: 22px; }
.tonsores-loyalty-admin__award input,
.tonsores-loyalty-admin__award select { width: 100%; max-width: none; min-height: 44px; }
.tonsores-loyalty-admin__vouchers { display: grid; gap: 12px; max-width: 860px; }
.tonsores-loyalty-admin__vouchers article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; background: #fff; border: 1px solid #dcdcde; border-radius: 10px; }
.tonsores-loyalty-admin table input[type="text"],
.tonsores-loyalty-admin table input[type="number"],
.tonsores-loyalty-admin table select,
.tonsores-loyalty-admin table textarea { width: 100%; }

@media (max-width: 720px) {
  .tonsores-loyalty__hero { align-items: flex-start; }
  .tonsores-loyalty__balance { min-width: 104px; padding: 12px; }
  .tonsores-loyalty__balance strong { font-size: 32px; }
  .tonsores-loyalty__qr-card { grid-template-columns: 1fr; }
  .tonsores-loyalty__qr { margin-inline: auto; }
  .tonsores-loyalty__earn-grid,
  .tonsores-loyalty__reward-grid,
  .tonsores-loyalty__voucher-grid { grid-template-columns: 1fr; }
  .tonsores-loyalty__tabs button { padding-inline: 7px; font-size: 13px; }
  .tonsores-loyalty-admin__search,
  .tonsores-loyalty-admin__card header,
  .tonsores-loyalty-admin__vouchers article { align-items: stretch; flex-direction: column; }
  .tonsores-loyalty-admin__search input { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tonsores-loyalty *, .tonsores-loyalty *::before, .tonsores-loyalty *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
