:root {
  color-scheme: light;
  --bg: #e8edda;
  --panel: #f7f5ed;
  --panel-2: #e7ece5;
  --ink: #192e28;
  --muted: #53655d;
  --orange: #18533e;
  --green: #236239;
  --red: #a32935;
  --border: #ccd6cf;
  --tint: #e6eee6;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; padding: 24px 16px 48px; min-height: 100vh;
  background: var(--bg);
  color: var(--ink); font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
a { color: var(--orange); }
.head, main, .notice { max-width: 1240px; margin-left: auto; margin-right: auto; }
.head { margin-bottom: 20px; }
.eyebrow { margin: 0; color: var(--muted); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 8px 0 16px; font: 800 clamp(1.7rem, 4vw, 2.7rem)/1.15 system-ui, sans-serif; color: var(--ink); letter-spacing: -.04em; overflow-wrap: anywhere; }
h2 { margin: 0 0 4px; font-size: 1.15rem; }
.stat { margin: 0; color: var(--muted); }
.stat strong { color: var(--green); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.grid .card { margin-bottom: 0; }
.hint { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.hint.error { color: var(--red); }
.hint.warn { margin-top: 16px; color: #82500a; }
label { display: block; margin-bottom: 12px; font-weight: 600; font-size: .9rem; }
label small { color: var(--muted); font-weight: 400; }
input, textarea, select {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px;
  background: #fff; color: var(--ink); border: 1px solid #85998d; border-radius: 8px; font: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
input[type='checkbox'] { display: inline-block; width: auto; margin-right: 8px; }
fieldset { margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; }
#voucher-camera { width: 100%; max-height: 360px; }
textarea { resize: vertical; }
input[type='file'] { margin-bottom: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row form { margin: 0; }
.btn {
  display: inline-block; padding: 10px 18px; border: 2px solid var(--orange); border-radius: 999px;
  background: var(--orange); color: #fff; font: 700 .95rem system-ui, sans-serif; text-decoration: none; cursor: pointer; min-height: 44px;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--orange); }
.logo-preview {
  display: grid; place-items: center; height: 120px; margin-bottom: 12px;
  background: #fff; border-radius: 12px; color: #6b5a80; font-size: .9rem;
}
.logo-preview img { max-width: 90%; max-height: 100px; object-fit: contain; }
.qr { width: 180px; margin-bottom: 14px; background: #fff; border-radius: 12px; padding: 8px; }
.qr img { display: block; width: 100%; }
.notice { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.notice.ok { background: #e6f4e9; color: var(--green); }
.notice.error { background: #fce8e9; color: var(--red); }
.table-wrap {
  max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  background:
    linear-gradient(to right, var(--panel) 30%, transparent) left,
    linear-gradient(to left, var(--panel) 30%, transparent) right,
    radial-gradient(farthest-side at 0 50%, #192e2833, transparent) left,
    radial-gradient(farthest-side at 100% 50%, #192e2833, transparent) right;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 12px 100%, 12px 100%;
  background-attachment: local, local, scroll, scroll;
}
.copy-status, #press-copy-status { color: var(--ink); font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere; }
.copy-status:not(:empty), #press-copy-status:not(:empty) { margin-top: 12px; }
.copy-status:focus, #press-copy-status:focus, .error-summary:focus { outline: 3px solid var(--orange); outline-offset: 3px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }
tr.done td { background: #e9f4e9; }
tr.done td:first-child code { color: var(--green); }
input.copy { display: inline-block; width: auto; min-width: 220px; margin: 4px 0 0; padding: 4px 8px; font-size: .8rem; }
.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.pin { margin: 8px 0 12px; font: 800 2.6rem/1 ui-monospace, Menlo, monospace; letter-spacing: .2em; color: var(--green); }
td.actions { white-space: nowrap; }
td.actions form { display: block; margin: 2px 0 0; }
button.link { background: none; border: 0; padding: 0; color: var(--orange); font: inherit; text-decoration: underline; cursor: pointer; }
.pin-on { color: var(--green); }
.pin-off { color: #82500a; }
form.danger { margin-top: 24px; padding: 20px; border: 1px solid #dcb0b4; background: #fff4f4; border-radius: 12px; max-width: 520px; }
form.danger label { color: var(--muted); font-weight: 400; }
.steps { margin: 0; padding-left: 1.2em; line-height: 1.6; }
.steps li { margin-bottom: 6px; }
.qr svg { display: block; width: 100%; height: auto; }
.venue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.venue-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--tint); border-radius: 12px; min-width: 0; overflow-wrap: anywhere; }
.venue-list img, .venue-list .num { flex: none; width: 52px; height: 52px; border-radius: 10px; background: #fff; object-fit: contain; }
.venue-list .num { display: grid; place-items: center; background: var(--orange); color: #fff; font-weight: 800; }
.venue-list p { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.venue-list .links a { color: var(--orange); }
textarea[readonly] { cursor: text; }
.prize-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.prize-audit { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; }
input[type="checkbox"] { width: auto; display: inline-block; margin: 0 8px 0 0; }
button:disabled { opacity: .5; cursor: not-allowed; }
.page-prizes { --orange: #713e78; --tint: #f3eaf5; }
.page-vouchers { --orange: #235d8c; --tint: #e7f0f9; }
.page-venue, .page-business { --orange: #12665f; --tint: #e0f2ed; }
.page-auth { --orange: #153c32; --bg: #e8edda; font-family: 'Avenir Next', Avenir, 'Segoe UI', sans-serif; }
.page-auth .workspace-bar { max-width: 1160px; }
.auth-main { max-width: 480px; margin: 48px auto 0; }
.auth-card { background: #f7f5ed; border: 1px solid #bac8b8; border-radius: 24px; padding: 32px; box-shadow: 0 20px 70px #153c321a; }
.auth-spark { color: #a04926; font-size: 40px; line-height: 1; margin-bottom: 20px; }
.auth-card .eyebrow { color: #153c32; font-size: 11px; font-weight: 800; letter-spacing: 2px; margin-bottom: 12px; }
.auth-card h1 { font: 750 36px/1.12 'Avenir Next', Avenir, 'Segoe UI', sans-serif; letter-spacing: -1.7px; color: #153c32; margin: 0; }
.auth-description { color: var(--muted); line-height: 1.6; margin: 18px 0 24px; }
.auth-card label { margin: 18px 0 8px; }
.auth-card input { padding: 12px; font-size: 16px; border-radius: 10px; }
.auth-submit { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; margin-top: 24px; min-height: 48px; }
.auth-recovery, .auth-legacy { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 20px 0 0; }
.auth-register { border-top: 1px solid #d6dacc; padding-top: 20px; margin: 24px 0 0; font-size: 14px; }
.auth-register a { font-weight: 700; }
.auth-footer { max-width: 640px; margin: 20px auto 0; font-size: 12px; }
.auth-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; }
.auth-footer-group { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 20px; list-style: none; padding: 0; margin: 0; }
.auth-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 20; padding: 12px 18px; background: var(--panel); border: 2px solid var(--orange); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.error-summary { scroll-margin-top: 20px; }
.error-summary h2 { font-size: 1rem; }
.error-summary ul { margin-bottom: 0; padding-left: 20px; }
.field-error { display: block; color: var(--red); }
.enquiry-card { overflow-wrap: anywhere; }
.enquiry-message { white-space: pre-wrap; padding: 20px; border-radius: 12px; background: var(--tint); margin: 20px 0; }
@media (max-width: 600px) {
  .auth-main { margin-top: 20px; }
  .auth-card { padding: 28px 20px; }
  .auth-card h1 { font-size: 32px; }
}
.page-staff { --orange: #82500a; --tint: #fff0cf; }
.page-press { --orange: #a33e26; --tint: #f9e9de; }
.page-customer { --orange: #18533e; --tint: #e5eddc; }
.workspace-bar, .section-banner, .workspace-nav, .workflow { max-width: 1240px; margin: 0 auto; }
.workspace-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 0 0 20px; }
.audience { padding: 5px 12px; border: 1px solid var(--border); border-radius: 20px; font-size: .75rem; font-weight: 700; }
.section-banner { display: flex; gap: 16px; align-items: center; padding: 20px; border-radius: 16px; background: var(--tint); border-left: 5px solid var(--orange); margin-bottom: 16px; }
.section-banner p { margin: 0; }
.section-label { color: var(--orange); font-size: 1.1rem; font-weight: 800; }
.section-mark { display: grid; place-items: center; border: 2px solid var(--orange); border-radius: 12px; color: var(--orange); min-width: 44px; height: 44px; font-weight: 800; }
.workspace-nav { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 24px; }
.workspace-nav a { padding: 10px 16px; text-decoration: none; border-radius: 8px; font-weight: 650; }
.workspace-nav a[aria-current] { background: var(--orange); color: #fff; }
.workflow { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; padding: 12px 0 24px; }
.workflow li { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; }
.workflow [aria-current] { background: var(--orange); color: #fff; font-weight: 800; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.account-setup { color: var(--ink); width: min(94vw, 560px); max-height: 90vh; overflow-y: auto; margin: auto; }
.account-setup::backdrop { background: rgb(10 25 20 / 65%); }
.page-prizes .prize-grid .card { border-top: 4px solid var(--orange); background: var(--tint); }
.page-press .head h1 { font-family: Georgia, serif; font-weight: 500; }
.page-press .grid > .card:first-child { border-top: 5px solid var(--orange); }
.page-press .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid .wide { grid-column: 1 / -1; }
.page-customer main { max-width: 620px; }
.page-customer .head { max-width: 620px; text-align: center; }
.page-customer .card { border: 2px dashed #8ba382; background: #fffef9; }
.reward-ticket h2 { font-family: Georgia, serif; font-size: 1.7rem; }
.reward-qr { display: block; max-width: 100%; height: auto; margin: 24px auto; border: 1px solid var(--border); border-radius: 12px; }
.page-customer .section-banner { max-width: 620px; }
.page-customer .workspace-bar { max-width: 620px; }
.page-staff main { max-width: 860px; }
.page-venue .head { border-bottom: 2px solid var(--orange); padding-bottom: 16px; }
.prize-announcement { background: var(--tint); border-left: 4px solid var(--orange); padding: 16px; font-size: 1.1rem; }
.private-panel { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 24px; }
.breadcrumbs { max-width: 1240px; margin: 0 auto 16px; font-size: .85rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-grid article { background: var(--tint); padding: 20px; border-radius: 12px; }
.stat-grid span { display: block; color: var(--muted); font-weight: 650; }
.stat-grid strong { font-size: 2rem; }
@media (max-width: 640px) {
  body { padding: 16px 12px 32px; }
  .card { padding: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .page-press .grid { grid-template-columns: minmax(0, 1fr); }
  .section-banner { padding: 14px; align-items: flex-start; }
  .workspace-nav a { padding: 10px; }
  .row .btn { max-width: 100%; }
}
@media print {
  .page-customer { background: #fff; color: #000; padding: 0; }
  .page-customer .workspace-bar, .page-customer .section-banner { display: none; }
  .page-customer .card { border: 1px solid #333; box-shadow: none; }
  .page-customer main { max-width: 100%; }
  .reward-qr { break-inside: avoid; width: 220px; }
  .page-customer h1 { font-size: 24pt; }
}
.venue-feature-editor { min-width: 0; padding: 16px; }
.venue-feature-editor legend { padding: 0 8px; font-size: 1.05rem; font-weight: 750; }
.venue-feature-row { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(180px, 1.3fr) auto; gap: 12px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--border); }
.venue-feature-row .btn { margin-bottom: 12px; }
.feature-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.feature-suggestion { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--tint); font: 1.35rem system-ui, sans-serif; cursor: pointer; }
.feature-suggestion:hover { border-color: var(--orange); }
@media (max-width: 640px) {
  .venue-feature-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .venue-feature-row .btn { grid-column: 1 / -1; justify-self: start; }
}
