/* Hepstein Booking: shared styles for the booking page and admin (dark, Neo Matrix accents). */
:root {
  --bg: #050807;
  --panel: #0c1210;
  --panel-2: #111a17;
  --line: #1f2d28;
  --text: #e6efe9;
  --muted: #8fa39a;
  --accent: #39e58c;
  --accent-ink: #03150b;
  --warn: #f5c451;
  --danger: #ff6b6b;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 16px 64px; }
.wrap.wide { max-width: 1000px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0 0 12px; }
p.lead { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.step { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .1em; margin-bottom: 6px; }

.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { background: none; border: 0; color: var(--muted); padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; min-height: 36px; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

.days { display: grid; gap: 10px; }
.day { text-align: left; width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--text); font: inherit; cursor: pointer; }
.day[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.day .d { font-weight: 700; }
.day .a { color: var(--muted); font-size: 14px; }
.day .n { color: var(--accent); font-size: 13px; margin-top: 4px; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.time { min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.time[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.time:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.time.taken { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1.2; padding: 4px; opacity: 1; text-decoration: none; border-style: dashed; }
.time.taken .town { font-size: 11px; font-weight: 700; color: var(--accent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time.taken .tt { font-size: 13px; color: var(--muted); text-decoration: line-through; }

label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; font: inherit; min-height: 48px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 16px; }
.check input { width: 22px; min-height: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.block { width: 100%; margin-top: 18px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid #5a2626; }
.btn:disabled { opacity: .5; cursor: wait; }
.btn:active { transform: scale(.98); }

.notice { border-left: 3px solid var(--warn); padding: 10px 12px; background: #1a1608; border-radius: 8px; font-size: 14px; margin-top: 12px; }
.error { color: var(--danger); font-size: 14px; margin-top: 10px; min-height: 1em; }
ul.list { margin: 0; padding-left: 20px; }
ul.list li { margin: 4px 0; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.ref { font-family: ui-monospace, Menlo, monospace; font-size: 26px; letter-spacing: .12em; color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
footer { color: var(--muted); font-size: 12px; text-align: center; margin-top: 28px; }
[hidden] { display: none !important; }

/* admin */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.dayhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.new { color: var(--warn); border-color: #5a4a1a; }
.tag.confirmed { color: var(--accent); border-color: #1d5a3a; }
.tag.done { color: #8ab4ff; border-color: #24406e; }
.tag.cancelled { color: var(--danger); border-color: #5a2626; }
.tag.closed { color: var(--danger); }
.row { border-top: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.row .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.row.free .who { color: var(--muted); }
.row.gap { color: var(--muted); font-size: 13px; padding: 4px 0; }
.who .name { font-weight: 700; }
.who .tag { margin-left: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; }

/* weekday picker (admin) */
.weekdays { display: flex; flex-wrap: wrap; margin: 0 -4px; }
.weekdays .wd { margin: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; align-items: center; }

/* calendar (booking page) */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head .m { font-weight: 700; font-size: 17px; }
.cal-nav { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 20px; cursor: pointer; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .wk { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal .c { position: relative; aspect-ratio: 1 / 1; min-height: 40px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; }
.cal .c.open { background: var(--panel-2); border-color: var(--line); color: var(--text); font-weight: 700; cursor: pointer; }
.cal .c.open::after { content: ''; position: absolute; bottom: 6px; width: 60%; height: 4px; border-radius: 2px; background: var(--rc, var(--accent)); }
.cal .c.full { color: var(--muted); text-decoration: line-through; cursor: not-allowed; }
.cal .c.full::after { opacity: .35; }
.cal .c.today { border-color: var(--muted); }
.cal .c[aria-pressed="true"] { border-color: var(--rc, var(--accent)); box-shadow: 0 0 0 1px var(--rc, var(--accent)) inset; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 14px; height: 4px; border-radius: 2px; background: var(--rc); margin-right: 6px; vertical-align: middle; }
.daypick { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--panel-2); border-left: 4px solid var(--rc, var(--accent)); }
.daypick .d { font-weight: 700; }
.daypick .a { color: var(--muted); font-size: 14px; }
.upcoming { margin-top: 14px; }
.upcoming h3 { font-size: 14px; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.upcoming button { display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font: inherit; font-size: 14px; padding: 10px 0; cursor: pointer; min-height: 44px; }
.upcoming button b { color: var(--rc); font-weight: 700; }
