/* The Rock Productions — boekingssysteem
   Alle kleuren staan hieronder als variabelen. Wijzig ze hier, de rest volgt. */

@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/lato-latin-900-normal.woff2") format("woff2"); }

:root {
  --bg: #0E0E10;
  --surface: #17171B;
  --surface-2: #1F1F24;
  --line: #2C2C33;
  --text: #F2F2F3;
  --muted: #A3A3AD;
  --faint: #6E6E78;
  --accent: #D62828;
  --accent-hover: #E63A3A;
  --accent-soft: rgba(214, 40, 40, .14);
  --ok: #3FB27F;
  --warn: #E0A030;
  --radius: 10px;
  --wrap: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 "Lato", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-bottom: 48px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 900; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Kop en voet ---- */
.testbar { background: repeating-linear-gradient(-45deg, #3a2a00, #3a2a00 12px, #2f2200 12px, #2f2200 24px); color: #F6C35B; text-align: center; font-size: .82rem; font-weight: 700; padding: 5px 12px; letter-spacing: .02em; }
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand img { width: 92px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .nav .linklike { color: var(--muted); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 8px 10px; border-radius: 6px; }
.nav a:hover, .nav .linklike:hover { color: var(--text); background: var(--surface); }
.nav a.is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-form { margin: 0; }
@media (max-width: 599px) { .nav-logout { display: none; } .nav a { padding: 8px 7px; } }
.nowrap { white-space: nowrap; }
.linklike { background: none; border: 0; cursor: pointer; font: inherit; }
.subnav { border-top: 1px solid var(--line); background: var(--surface); }
.subnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav a { white-space: nowrap; padding: 10px 12px; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 700; }
.subnav a.is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; padding: 28px 0 36px; border-bottom: 4px solid var(--accent); }
.footer-inner { display: grid; gap: 20px; grid-template-columns: 1fr; }
.footer-inner strong { color: var(--text); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-sv { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--faint); font-size: .8rem; }
@media (min-width: 760px) {
  .brand img { width: 112px; }
  .footer-inner { grid-template-columns: 1.3fr 1fr auto; align-items: start; }
}

/* ---- Meldingen ---- */
.flash { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border-left: 4px solid var(--muted); }
.flash-ok { border-color: var(--ok); }
.flash-error { border-color: var(--accent); background: var(--accent-soft); }
.flash-info { border-color: var(--warn); }

/* ---- Knoppen en formulieren ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 700 1rem/1.2 "Lato", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--muted); color: #fff; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { border-color: var(--accent); color: #FF8A8A; background: transparent; }
.btn-danger:hover { background: var(--accent-soft); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.form { display: grid; gap: 16px; max-width: 520px; }
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 700; font-size: .95rem; }
.field .hint { color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 90px; resize: vertical; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle { position: absolute; top: 0; right: 0; width: 46px; height: 46px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--text); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.pw-toggle svg { width: 22px; height: 22px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.narrow { max-width: 560px; }
.page-title { padding: 28px 0 8px; }

/* ---- Intro boekingspagina ---- */
.intro { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.intro::before { content: ""; position: absolute; inset: 0; background: var(--hero) center/cover no-repeat; opacity: .35; }
.intro::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 15%, rgba(14,14,16,.55) 70%, rgba(14,14,16,.3)); }
.intro .wrap { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 36px; }
.intro p { color: #D5D5DA; max-width: 560px; font-size: 1.08rem; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.facts li { border: 1px solid #3a3a42; background: rgba(23,23,27,.75); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .92rem; }
.facts li span { color: var(--muted); font-weight: 400; }

.rooms { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding: 20px 0 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.room-card { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.room-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.room-card div { padding: 10px 14px 14px; }
.room-card h3 { margin: 0 0 2px; }
.room-card p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---- Weekkalender ---- */
.week-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 26px 0 14px; flex-wrap: wrap; }
.week-head h2 { margin: 0; }
.week-nav { display: flex; gap: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--line); }
.legend .l-free { background: var(--surface-2); border-color: #44444d; }
.legend .l-sel { background: var(--accent); border-color: var(--accent); }
.legend .l-mine { background: transparent; border: 2px solid var(--accent); }
.legend .l-taken { background: repeating-linear-gradient(-45deg, #1a1a1e, #1a1a1e 3px, #24242a 3px, #24242a 6px); }

.days { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .days { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1060px) { .days { grid-template-columns: 1fr 1fr 1fr; } }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; }
.day.is-today { border-color: #4a4a52; }
.day-title { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-size: 1rem; }
.day-title small { color: var(--muted); font-weight: 400; }
.day-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); }
.day-row:first-of-type { border-top: 0; }
.day-row .room { font-weight: 700; font-size: .92rem; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.slot span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 92px; min-height: 46px; padding: 4px 8px; border-radius: 7px; font-size: .82rem; line-height: 1.2; text-align: center; border: 1px solid #44444d; background: var(--surface-2); }
.slot span b { font-size: .88rem; }
.slot span em { font-style: normal; color: var(--muted); font-size: .76rem; }
.slot.free:hover span { border-color: var(--text); }
.slot input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.slot input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot input:checked + span em { color: #ffe2e2; }
.slot.taken span, .slot.blocked span { background: repeating-linear-gradient(-45deg, #1a1a1e, #1a1a1e 4px, #222227 4px, #222227 8px); border-color: var(--line); color: var(--faint); }
.slot.past span, .slot.closed span { background: transparent; border-color: var(--line); color: var(--faint); opacity: .6; }
.slot.mine span { background: transparent; border: 2px solid var(--accent); color: var(--text); }

.cartbar { position: sticky; bottom: 0; z-index: 15; margin-top: 18px; background: rgba(14,14,16,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
.cartbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.cartbar .sum { font-weight: 700; }
.cartbar .sum span { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; }

/* ---- Tabellen en lijsten ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface); }
table.list tr:last-child td { border-bottom: 0; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.badge-ok { color: var(--ok); }
.badge-warn { color: var(--warn); }
.badge-muted { color: var(--faint); }

.booking-list { display: grid; gap: 10px; }
.booking-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.booking-item .when { font-weight: 700; }
.booking-item .what { color: var(--muted); font-size: .92rem; }
.booking-item form { margin: 0; }

.summary { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.summary td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary td:last-child { text-align: right; white-space: nowrap; }
.summary tr.total td { border-bottom: 0; font-weight: 900; font-size: 1.15rem; padding-top: 14px; }

/* ---- Beheer: planningraster ---- */
.plan { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .85rem; min-width: 760px; }
.plan th, .plan td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px; vertical-align: top; }
.plan th { background: var(--surface); position: sticky; top: 0; text-align: left; }
.plan td.dayname { white-space: nowrap; font-weight: 700; background: var(--surface); }
.plan td.dayname small { display: block; color: var(--muted); font-weight: 400; }
.plan .cell { display: block; min-height: 40px; border-radius: 6px; padding: 5px 7px; text-decoration: none; color: inherit; }
.plan .cell.free { color: var(--faint); border: 1px dashed var(--line); }
.plan .cell.free:hover { border-color: var(--muted); color: var(--muted); }
.plan .cell.booked { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.plan .cell.booked.admin { background: rgba(63,178,127,.12); border-left-color: var(--ok); }
.plan .cell.pending { background: rgba(224,160,48,.12); border-left: 3px solid var(--warn); }
.plan .cell.blocked { background: repeating-linear-gradient(-45deg, #1a1a1e, #1a1a1e 4px, #222227 4px, #222227 8px); color: var(--muted); }
.plan .cell b { display: block; }
.plan .blk { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.stack > * + * { margin-top: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 8px 0 18px; }
.toolbar .field { min-width: 160px; }
