:root {
  font: 16px/1.55 system-ui, sans-serif;
  color: #092347;
  background: #f7f9fb;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 48rem; margin: auto; padding: 1.25rem; }
header { padding: .5rem 0 1.25rem; }
header img { display: block; height: auto; }
.panel {
  background: white;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid #e1e7ed;
  border-radius: 1rem;
  box-shadow: 0 12px 35px #0923470e;
}
h1 { margin: 0 0 1rem; font-size: clamp(1.55rem, 5vw, 2.25rem); line-height: 1.2; }
form, label { display: grid; gap: .55rem; }
form { gap: 1rem; }
label { font-weight: 650; }
input, select, button {
  color: inherit;
  font: inherit;
  padding: .65rem .8rem;
  border: 1px solid #b9c6d3;
  border-radius: .55rem;
  width: 100%;
  background: white;
}
button {
  width: fit-content;
  padding-inline: 1.35rem;
  color: white;
  background: #092347;
  border-color: #092347;
  border-radius: 99rem;
  font-weight: 700;
  cursor: pointer;
}
:focus-visible { outline: 3px solid #638c20; outline-offset: 3px; }
.error, .notice { padding: .75rem; border-radius: .5rem; }
.error { background: #fff0ec; }
.notice { background: #eef7e7; overflow-wrap: anywhere; }
.bookings { list-style: none; padding: 0; }
.bookings li { padding: .8rem 0; border-bottom: 1px solid #e1e7ed; overflow-wrap: anywhere; }

.admin-nav { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 1rem; }
.admin-nav a { color: #092347; font-weight: 650; }
.admin-section { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e1e7ed; }
.admin-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .85rem; }
.inline-form { display: inline; }
.inline-form button { margin: .2rem .45rem; padding: .25rem .65rem; font-size: .875rem; }
details summary { cursor: pointer; margin-bottom: .6rem; }

.site-header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.language { display: flex; gap: .15rem; border-radius: 99rem; border: 1px solid #e1e7ed; padding: .18rem; }
.language a { color: #092347; text-decoration: none; font-weight: 700; padding: .22rem .6rem; border-radius: 99rem; font-size: .875rem; }
.language a[aria-current="page"] { background: #eef7e7; color: #315915; }

.calendar-controls, .calendar-range { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; }
.calendar-controls { justify-content: space-between; }
.calendar-range a { color: #092347; font-weight: 650; }
.calendar-filter { display: flex; align-items: end; gap: .5rem; }
.calendar-caption { color: #526477; }
.calendar-scroll { overflow: auto; max-height: 34rem; border: 1px solid #e1e7ed; border-radius: .7rem; }
.calendar-grid { width: 100%; min-width: 850px; border-spacing: 0; table-layout: fixed; }
.calendar-grid th, .calendar-grid td { padding: .4rem; border-bottom: 1px solid #e1e7ed; border-right: 1px solid #e1e7ed; vertical-align: top; text-align: left; }
.calendar-grid thead th { position: sticky; z-index: 1; top: 0; background: #f0f4f8; }
.calendar-grid thead th:first-child { width: 4rem; }
.calendar-grid thead .calendar-today { background: #e3f2d4; }
.calendar-grid tbody th { font-size: .82rem; }
.calendar-slot { margin-bottom: .25rem; padding: .35rem; border-radius: .35rem; font-size: .78rem; overflow-wrap: anywhere; }
.calendar-slot span { display: block; }
.calendar-slot.available { background: #eef7e7; }
.calendar-slot.booked { background: #092347; color: white; }
.calendar-slot.past { background: #e9edf2; }

.admin-workspace { max-width: 90rem; }
.admin-menu { padding: .7rem; background: #edf4fa; border-radius: .75rem; align-items: center; }
.admin-menu a, .admin-menu summary, .calendar-toolbar a, .calendar-toolbar summary { padding: .4rem .65rem; cursor: pointer; }
.admin-menu details, .calendar-toolbar details { position: relative; }
.admin-menu summary, .calendar-toolbar summary { margin: 0; font-weight: 650; }
.admin-account { margin-inline-start: auto; }
.admin-menu-panel { position: absolute; z-index: 4; min-width: 12rem; right: 0; display: grid; padding: .5rem; background: white; border: 1px solid #e1e7ed; border-radius: .7rem; box-shadow: 0 12px 28px #09234722; }
.admin-menu-panel a { color: #092347; }
.calendar-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .8rem; }
.calendar-toolbar a { color: #092347; font-weight: 650; }
.calendar-modes { display: flex; flex-wrap: wrap; gap: .2rem; }
.calendar-modes a[aria-current="page"] { background: #e3f2d4; border-radius: .45rem; }
.calendar-filter { flex-wrap: wrap; }
.calendar-grid.calendar-day { min-width: 260px; }
.calendar-month { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .55rem; }
.calendar-month article, .calendar-agenda article { border: 1px solid #e1e7ed; border-radius: .55rem; padding: .55rem; }
.calendar-agenda { display: grid; gap: .55rem; }
.calendar-slot.blocked { background: #fff0ec; color: #7a2920; }
.admin-operations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr)); gap: .9rem 1.4rem; }
