/* AMW Med Spa member portal: dark luxury theme (charcoal, white text, restrained gold), fonts self-hosted. */
@font-face { font-family: 'Bodoni Moda'; src: url('/portal/fonts/bodoni-moda-latin-400-normal.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Bodoni Moda'; src: url('/portal/fonts/bodoni-moda-latin-400-italic.woff2') format('woff2'); font-style: italic; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/portal/fonts/jost-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/portal/fonts/jost-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #121014; --surface: #1b191e; --surface-2: #232026; --line: #34303a;
  --text: #f4f1ec; --text-2: #d9d3dc; --muted: #b3acb7;
  --gold: #c9a85c; --gold-soft: #e3cb8f; --gold-deep: #a8873f;
  --ok: #8fd6b0; --ok-bg: #16302a; --warn: #f2c27a; --warn-bg: #352712; --bad: #f2a3b8; --bad-bg: #3a1823;
  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --r: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold-soft); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: -0.005em; margin: 0 0 0.4em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 7vw, 3.4rem); }
h1 em { color: var(--gold); font-style: italic; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 0.9em; }

.demo { background: var(--gold); color: #121014; text-align: center; font-size: 0.85rem; font-weight: 500; padding: 6px 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px max(16px, calc((100% - 880px) / 2)); background: #0c0b0d; border-bottom: 1px solid var(--line); position: relative; }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent); }
.brand img { height: 36px; width: auto; }
.wrap { width: min(880px, 100% - 32px); margin: 32px auto 48px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.75rem; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 500; color: var(--gold); margin-bottom: 0.6rem; }
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--gold); }
.lede { color: var(--text-2); font-size: 1.08rem; }
.small { font-size: 0.9rem; color: var(--muted); }
.hello { margin-bottom: 20px; }
.block { margin-bottom: 34px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 4vw, 34px); margin-bottom: 20px; }
.card.narrow { max-width: 520px; margin-inline: auto; }

.field { display: grid; gap: 6px; margin: 18px 0; font-weight: 500; font-size: 0.95rem; }
input, select, textarea { font: inherit; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); width: 100%; }
textarea { line-height: 1.5; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible, .link:focus-visible, summary:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
input[name="code"] { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border: 1px solid var(--gold); border-radius: 999px; background: var(--gold); color: #121014; font: 500 1rem var(--sans); letter-spacing: 0.04em; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn.ghost { background: transparent; color: var(--gold-soft); }
.btn.ghost:hover { background: rgba(201, 168, 92, 0.12); }
.link { background: none; border: 0; color: var(--gold-soft); font: 500 0.95rem var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.alert { background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 12px 16px; font-weight: 500; }
.notice { background: var(--ok-bg); color: var(--ok); border-radius: 16px; padding: 14px 18px; font-weight: 500; }
.democode { background: #2a2414; border: 1px dashed var(--gold); border-radius: 12px; padding: 12px 16px; }
.empty { color: var(--muted); }

/* Upcoming appointments */
.appt { display: grid; gap: 14px; padding: 16px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.appt-photo { width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.appt-photo img, .tcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.when { color: var(--gold); font-weight: 500; margin: 0 0 4px; font-size: 0.95rem; letter-spacing: 0.02em; }
.appt-head { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.appt h3 { margin: 0; font-size: 1.45rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline select { width: auto; min-height: 52px; padding: 0 12px; }
.status { margin: 0; color: var(--text-2); }
.status.ok { color: var(--ok); font-weight: 500; }
.status.warn { color: var(--warn); font-weight: 500; }

/* Treatment cards: compact, tap "Package details" to drill in */
.tcards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 14px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tcard-hero { position: relative; }
.tcard-photo { aspect-ratio: 16 / 9; background: var(--surface-2); position: relative; }
.tcard-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 16, 20, 0) 35%, rgba(18, 16, 20, 0.92) 100%); }
.tcard-title { position: absolute; left: 20px; right: 20px; bottom: 14px; display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.tcard-title h3 { margin: 0; font-size: 1.65rem; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.tcard-body { padding: 16px 20px 6px; display: grid; gap: 12px; }
.count { margin: 0; font-size: 1.15rem; color: var(--text); }
.count .rem { font-family: var(--display); font-weight: 400; font-size: 2.4rem; color: var(--gold); line-height: 1; margin-right: 4px; }
.count .of { color: var(--muted); font-size: 1rem; white-space: nowrap; }
.bar { height: 5px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.tcard.expired, .tcard.used-up { opacity: 0.72; }
.tcard .btn { width: 100%; }
details.more > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; color: var(--gold-soft); font-weight: 500; font-size: 1.02rem; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: '\203A'; font-size: 1.8rem; line-height: 1; transition: transform 0.15s; }
details.more[open] > summary::after { transform: rotate(90deg); }
.more-body { padding: 4px 0 18px; display: grid; gap: 14px; }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.facts dt { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 2px; }
.facts dd { margin: 0; color: var(--text); }
.soon { margin: 0; font-size: 0.88rem; }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; } .pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

/* Before / aftercare (works without JavaScript) */
details.care { border-top: 1px solid var(--line); }
details.care:last-of-type { border-bottom: 1px solid var(--line); }
details.care summary { list-style: none; cursor: pointer; padding: 14px 28px 14px 0; position: relative; font-weight: 500; color: var(--text); min-height: 52px; font-size: 1.02rem; }
details.care summary::-webkit-details-marker { display: none; }
details.care summary::after { content: '+'; position: absolute; right: 4px; top: 10px; color: var(--gold); font-size: 1.5rem; line-height: 1; }
details.care[open] summary::after { content: '\2212'; }
.care-body { padding: 0 0 14px; color: var(--text-2); font-size: 1rem; }
.care-body ul { margin: 0 0 0.9em; padding-left: 1.2em; } .care-body li { margin-bottom: 4px; }

.board { width: 100%; border-collapse: collapse; font-size: 1rem; }
.board th { text-align: left; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 0 10px 10px; }
.board td { padding: 14px 10px; border-top: 1px solid var(--line); }
.board tr.here td { background: #15241e; } .board tr.late td { background: #2a2113; }
form.approve { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

.foot { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 0 16px 40px; }
.foot p { margin: 0 0 6px; }

/* progress widths without inline styles (the security policy blocks inline styles) */
.w0{width:0}.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}.w40{width:40%}.w45{width:45%}.w50{width:50%}.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}

@media (max-width: 560px) {
  body { font-size: 18px; }
  .inline, .inline .btn { width: 100%; } .inline select { flex: 0 0 110px; }
  .actions { flex-direction: column; align-items: stretch; }
  .tcards { grid-template-columns: 1fr; }
  .board th:nth-child(3), .board td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Lobby check-in screen: big, calm, touch-first */
body.kiosk { font-size: 21px; }
body.kiosk .wrap { margin-top: 6vh; }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
input.big { font-size: 2rem; text-align: center; letter-spacing: 0.08em; padding: 20px; margin: 18px 0; }
.btn.big { width: 100%; min-height: 76px; font-size: 1.3rem; }
form.pick { margin: 14px 0; }
form.pick .btn { flex-direction: column; gap: 2px; line-height: 1.2; }
form.pick .btn span { font-size: 0.85rem; opacity: 0.85; letter-spacing: 0.08em; text-transform: uppercase; }
/* Specials Studio */
.sp-preview { max-width: 420px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface-2); padding: 0 0 16px; }
.sp-preview img { display: block; width: 100%; height: 200px; object-fit: cover; margin-bottom: 12px; }
.sp-preview > :not(img) { margin-left: 18px; margin-right: 18px; }
.sp-now { color: var(--gold); font-size: 1.6rem; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
