/* Colours come from settings.js (theme). These are only the fallbacks. */
:root {
  --bg: #111014; --card: #1c1b22; --border: rgba(255,255,255,.16);
  --text: #fff; --muted: #a9a7b8; --accent: #f4c552; --accent-text: #141210; --badge: #e5484d;
  --head: "Plus Jakarta Sans", system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/24px var(--body); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.page { max-width: 480px; margin: 0 auto; padding: 0 16px 24px; min-height: 100svh; display: flex; flex-direction: column; }
.boot { min-height: 100svh; display: grid; place-items: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 19px; }
.link { color: var(--accent); font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }
.hint { color: var(--muted); font-size: 13px; line-height: 19px; min-height: 19px; margin: 0 0 10px; text-align: center; }

.mode-banner { background: var(--accent); color: var(--accent-text); font: 600 12px/16px var(--body); text-align: center; padding: 6px 12px; letter-spacing: .02em; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 12px 16px;
  background: var(--accent); color: var(--accent-text); border-radius: 10px; font: 600 16px/1.1 var(--body); text-align: center;
  transition: transform .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn.big { min-height: 60px; font-size: 18px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); margin-top: 10px; }
.btn.small-btn { width: auto; min-height: 38px; padding: 8px 14px; font-size: 14px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Store page ── */
.profile { text-align: center; padding-top: 46px; }
.avatar { width: 170px; height: 170px; border-radius: 50%; object-fit: cover; margin: 0 auto; background: var(--card); }
.profile h1 { font: 700 36px/1.25 var(--head); margin-top: 24px; overflow-wrap: anywhere; }
.tagline { font: 400 18px/1.2 var(--head); letter-spacing: -.45px; margin-top: 12px; }
.socials { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.social { width: 32px; height: 32px; border: 1px solid var(--text); border-radius: 999px; display: grid; place-items: center; transition: background .15s, color .15s; }
.social:hover { background: var(--text); color: var(--bg); }

.cards { display: grid; gap: 24px; margin-top: 48px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 15px; padding: 16px; display: grid; gap: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.card-top { display: flex; gap: 14px; align-items: flex-start; }
.thumb { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg); }
.card-text { min-width: 0; flex: 1; }
.card h2 { font: 700 18px/22.5px var(--head); }
.sub { font-size: 14px; line-height: 21px; color: var(--muted); margin-top: 6px; }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.price { font: 700 18px/23px var(--head); color: var(--accent); }
.badge { background: var(--badge); color: #fff; font: 600 12px/16px var(--body); padding: 3px 9px; border-radius: 999px; }

.foot { margin-top: auto; padding-top: 40px; display: flex; justify-content: center; gap: 10px; font: 500 14px/14px var(--body); color: var(--muted); }
.foot button:hover { color: var(--text); }

/* ── Product page ── */
.product { padding-bottom: 24px; }
.banner { position: relative; margin: 0 -16px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0 0 16px 16px; background: var(--card); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.back { position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.48); border: 1px solid rgba(255,255,255,.24); color: #fff; backdrop-filter: blur(6px); }
.head { padding: 12px 4px 16px; border-bottom: 1px solid var(--border); }
.head h1 { font: 600 24px/36px var(--head); }
.big-price { font: 600 24px/30px var(--head); margin-top: 12px; }
#flow > h2 { font: 600 24px/28.8px var(--head); margin: 40px 0 16px; }

.rich p { margin: 0 0 16px; }
.rich ul { margin: 0 0 16px; padding-left: 20px; }
.rich li { margin-bottom: 8px; }
.rich em { color: var(--muted); }
.desc { padding-top: 24px; }

.reviews { display: grid; gap: 12px; margin-top: 8px; }
.reviews blockquote { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stars { color: var(--accent); display: flex; gap: 2px; margin-bottom: 6px; }
.reviews cite { font-style: normal; color: var(--muted); font-size: 14px; }

/* month calendar + times */
.cal-title { font: 600 16px/24px var(--head); text-align: center; }
.tz { font: 400 14px/20px var(--head); font-style: italic; color: var(--muted); text-align: center; margin-top: 4px; }
.tz .link { font-style: normal; }
.tz-select { margin-top: 10px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.cal-month { font: 700 14px/20px var(--body); }
.cal-arrow { width: 40px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text); }
.cal-arrow.next svg { transform: rotate(180deg); }
.cal-arrow:hover:not([disabled]) { background: var(--card); }
.cal-arrow[disabled] { opacity: .3; cursor: default; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 40px); justify-content: space-between; }
.cal-head { margin-top: 24px; }
.cal-head span { font: 600 14px/20px var(--head); text-align: center; }
.cal-grid { row-gap: 10px; margin-top: 20px; min-height: 240px; }
.cal-grid > .spinner { grid-column: 1 / -1; justify-self: center; align-self: center; }
.day { width: 40px; height: 40px; border-radius: 999px; border: 1px solid transparent; font: 600 14px/1 var(--head); font-variant-numeric: tabular-nums;
  transition: background .12s, border-color .12s, color .12s; }
.day:hover:not([disabled]) { border-color: var(--accent); }
.day.today { border-color: var(--border); }
.day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.day[disabled] { color: var(--muted); opacity: .45; cursor: default; }
.day.outside[disabled] { opacity: .28; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 24px; }
.times > p { grid-column: 1 / -1; }
.time { min-height: 46px; border-radius: 10px; border: 1px solid var(--accent); font: 600 15px/1 var(--body); transition: background .12s, color .12s; }
.time:hover, .time.on { background: var(--accent); color: var(--accent-text); }
.locked { opacity: .55; pointer-events: none; }

/* form */
.field { border: 1px solid var(--accent); border-radius: 8px; background: var(--bg); margin-bottom: 16px; display: flex; min-height: 48px; }
.field:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.field input, .field textarea, .field select { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; padding: 12px 16px; font-size: 16px; line-height: 22px; }
.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--card); color: var(--text); }
.field textarea { resize: vertical; min-height: 120px; padding: 14px 16px; }
::placeholder { color: var(--muted); opacity: 1; }
.lbl { display: block; font: 500 14px/20px var(--body); margin: 4px 0 8px; }
.dial { position: relative; display: flex; align-items: center; padding: 0 12px 0 16px; border-right: 1px solid var(--border); flex: none; cursor: pointer; }
.dial-label { font-size: 15px; white-space: nowrap; }
.dial-label::after { content: "▾"; margin-left: 6px; color: var(--muted); font-size: 12px; }
.dial select { position: absolute; inset: 0; opacity: 0; width: 100%; padding: 0; font-size: 16px; }

.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 21px; margin-bottom: 14px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.box { flex: none; width: 20px; height: 20px; border-radius: 4px; border: 1px solid var(--muted); display: grid; place-items: center; transition: background .12s, border-color .12s; }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box::after { content: ""; width: 10px; height: 5px; border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg) translateY(-1px); }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }

.summary { margin: 28px 0 24px; font-size: 14px; }
.summary .row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.summary .val { color: var(--accent); text-align: right; }
.summary .total { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 16px; font: 700 16px/20.8px var(--head); }
.summary .total strong { color: var(--accent); }

.paybox { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--card); text-align: center; }
#pay { margin-top: 8px; }
#pay-card { min-height: 150px; margin-bottom: 12px; }
#pay-card > .spinner { display: block; margin: 60px auto 0; }
#pay-branding { margin-bottom: 14px; opacity: .8; }
.mock-card { border: 1px dashed var(--accent); border-radius: 8px; padding: 16px; display: grid; gap: 4px; font-size: 14px; line-height: 20px; }
#pay .hint { min-height: 0; margin: 0 0 12px; }
#pay .hint:empty { display: none; }
.paybox .link { display: inline-block; margin-top: 14px; font-size: 14px; }
.paybox-title { font: 700 16px/22px var(--head); margin-bottom: 6px; }
#pay-form .mock .muted { font-size: 13px; line-height: 19px; margin-bottom: 16px; }
.paybox .hint { margin: 10px 0 0; }

.result { text-align: center; padding: 40px 8px 8px; display: grid; gap: 10px; justify-items: center; }
.result h2 { font: 700 26px/32px var(--head); }
.result .when { font: 600 18px/26px var(--head); }
.result .link { margin-top: 12px; }
.tick { width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; margin-bottom: 6px; animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
.extra { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-top: 10px; display: grid; gap: 12px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
.spinner.dark { width: 22px; height: 22px; border-color: rgba(0,0,0,.2); border-top-color: var(--accent-text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bottom sheet ── */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .18s ease; }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: 86svh; overflow: auto; background: var(--card); border-radius: 20px 20px 0 0; padding: 28px 20px 28px; animation: rise .24s cubic-bezier(.2,.9,.3,1); }
.sheet-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; font-size: 26px; line-height: 1; color: var(--muted); }
.waitlist h3 { font: 700 22px/28px var(--head); }
.waitlist > .muted { margin: 4px 0 18px; }
.done { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 16px 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

/* ── Dashboard ── */
.admin { max-width: 980px; padding-top: 24px; }
.admin-login { justify-content: center; }
.admin-login h1 { font: 700 28px/36px var(--head); margin-bottom: 18px; }
.admin h1 { font: 700 26px/32px var(--head); }
.admin h2 { font: 700 18px/24px var(--head); margin-bottom: 10px; }
.admin section { margin-top: 32px; }
.admin-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 2px; }
.stat span, .stat em { font-size: 13px; line-height: 18px; color: var(--muted); font-style: normal; }
.stat strong { font: 700 26px/32px var(--head); font-variant-numeric: tabular-nums; }
.stats + .small { margin-top: 8px; }
.needs { border: 1px solid var(--badge); background: color-mix(in srgb, var(--badge) 14%, transparent); border-radius: 12px; padding: 14px; }
.needs h2 { color: var(--badge); margin-bottom: 4px; }
.need { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--border); }
.call { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.call-when { font: 600 14px/20px var(--body); color: var(--accent); }
.problem { color: var(--muted); margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.setrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.setctl { display: flex; align-items: center; gap: 14px; flex: none; }
.spots { width: 56px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; margin-left: 4px; }
.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 38px; height: 22px; border-radius: 999px; background: #3fb96b; position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 19px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + span { background: var(--badge); }
.switch input:checked + span::after { left: 3px; }
.switch em { font-style: normal; font-size: 13px; width: 48px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 18px; white-space: nowrap; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--border); }
.pill.booked { background: rgba(63,185,107,.2); color: #6ddc97; }
.pill.needs_booking { background: var(--badge); color: #fff; }
.pill.refunded, .pill.grey { color: var(--muted); }

@media (min-width: 640px) {
  .profile { padding-top: 64px; }
  .product { padding-top: 30px; }
  .banner { margin: 0; border-radius: 15px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .spinner { animation-duration: 1.2s !important; }
}
