:root {
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-050: #eff4ff;
  --ink: #0b1220;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e6eaf2;
  --line-2: #eef1f7;
  --bg: #f6f8fc;
  --card: #ffffff;
  --ok: #16a34a;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 30px rgba(16, 24, 40, 0.06);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- layout ---------- */
.wrap { max-width: 960px; margin: 0 auto; padding: 24px; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

/* Brand logo is the "RSV" wordmark image — show it height-based, hide redundant text. */
.brandbar { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.brandbar img { height: 24px; width: auto; }
.brandbar b { display: none; }
.brandbar .muted { color: var(--ink-3); font-weight: 500; }

/* Public-facing centered brand header + hero */
.pub-header { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin: 12px 0 22px; }
.pub-header img { height: 46px; width: auto; }
.pub-header .wordmark { display: none; }
.tagline { font-style: italic; color: var(--ink-2); font-size: 15px; line-height: 1.5; max-width: 460px; margin: 0 auto; }
.tagline b { color: var(--brand-600); font-weight: 600; font-style: normal; }
.warm { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.eyebrow-soft { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: .01em; }

/* ---------- card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-pad { padding: 28px; }
.split { display: grid; grid-template-columns: 320px 1fr; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.split .aside { border-right: 1px solid var(--line); padding: 28px; }
@media (max-width: 760px) { .split .aside { border-right: none; border-bottom: 1px solid var(--line); } }

/* ---------- typography ---------- */
h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 6px; }
h2 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 4px; }
h3 { font-size: 15px; margin: 0 0 8px; color: var(--ink-2); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); font-size: 14px; }
.meta { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; margin: 6px 0; }
.meta svg { flex: none; opacity: 0.7; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 11px 18px; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  cursor: pointer; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-600); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #dc2626; }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 12px; font-size: 14px; }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050);
}
textarea { min-height: 84px; resize: vertical; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.field-hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ---------- day navigator (public booking) ---------- */
.daynav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 6px; }
.daynav-label { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; text-align: center; flex: 1; }
.daynav-btn { width: 50px; height: 50px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--brand); background: var(--brand-050); border-radius: 14px; cursor: pointer;
  font-size: 26px; font-weight: 800; line-height: 1; color: var(--brand-600); box-shadow: var(--shadow-sm); transition: all .12s; }
.daynav-btn:hover:not(:disabled) { background: var(--brand); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37,99,235,.28); }
.daynav-btn:active:not(:disabled) { transform: translateY(0); }
.daynav-btn:disabled { opacity: .3; cursor: default; box-shadow: none; }
.noslots { padding: 28px 0; text-align: center; color: var(--ink-3); font-size: 15px; }

/* ---------- tooltips (data-tip on any element) ---------- */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  background: #0b1220; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.35; text-align: center;
  padding: 7px 10px; border-radius: 8px; width: max-content; max-width: 230px; z-index: 60; pointer-events: none;
  box-shadow: 0 6px 20px rgba(11,18,32,.28); white-space: normal;
}
[data-tip]:hover::before {
  content: ''; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #0b1220; z-index: 60; pointer-events: none;
}
[data-tip].tip-below:hover::after { bottom: auto; top: calc(100% + 9px); }
[data-tip].tip-below:hover::before { bottom: auto; top: calc(100% + 4px); border-top-color: transparent; border-bottom-color: #0b1220; }
/* touch devices: tooltips are hover-based, so hide the arrow cue there is fine */

/* ---------- mobile ---------- */
@media (max-width: 680px) {
  .wrap { padding: 16px; }
  .card-pad { padding: 20px; }
  .row { flex-direction: column; gap: 0; }
  .row > * { width: 100%; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .navlinks { flex-wrap: wrap; gap: 4px; }
  .navlinks a { padding: 7px 10px; font-size: 13px; }
  .split .aside { padding: 20px; }
  h1 { font-size: 22px; }
  .pub-header img { height: 40px; }
  .tagline { font-size: 14px; }
  .slotgrid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
  [data-tip]:hover::after, [data-tip]:hover::before { display: none; } /* avoid stuck tooltips on tap */
}

/* ---------- slots / calendar ---------- */
.days { display: flex; flex-direction: column; gap: 22px; }
.day h3 { position: sticky; top: 0; }
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.slot {
  padding: 12px 8px; text-align: center; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  cursor: pointer; transition: border-color .12s, background .12s;
}
.slot:hover { border-color: var(--brand); color: var(--brand); }
.slot.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: var(--brand-050); color: var(--brand-600); }
.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.badge.ok { background: #ecfdf3; color: #067647; }
.badge.cancelled { background: #fef3f2; color: #b42318; }

/* ---------- misc ---------- */
.notice { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin: 14px 0; }
.notice.err { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.notice.ok { background: #ecfdf3; color: #067647; border: 1px solid #a6f4c5; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.btn.ghost .spinner, .spinner.dark { border-color: rgba(37,99,235,.25); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.stack > * + * { margin-top: 10px; }
hr.sep { border: none; border-top: 1px solid var(--line-2); margin: 20px 0; }
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list .item { padding: 14px 16px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.list .item:last-child { border-bottom: none; }
.tabs { display: inline-flex; gap: 4px; background: var(--line-2); padding: 4px; border-radius: 10px; margin-bottom: 16px; }
.tabs button { border: none; background: transparent; font: inherit; font-weight: 600; font-size: 14px;
  padding: 7px 14px; border-radius: 7px; cursor: pointer; color: var(--ink-2); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.navlinks { display: flex; gap: 6px; }
.navlinks a { padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.navlinks a.active, .navlinks a:hover { background: #fff; color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); }
