* { box-sizing: border-box; }
:root {
    font-family: system-ui, sans-serif;
    color: #19283a;
    background: #f3f7fa;
    line-height: 1.5;
    --ink: #19283a;
    --muted: #4b5d70;
    --line: #d9e5ec;
    --accent: #087565;
    --accent-dark: #065c50;
    --accent-soft: #e2f4ee;
}
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.15; letter-spacing: -.035em; }
h2 { font-size: 1.25rem; margin-bottom: 1rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
.shell { width: min(70rem, calc(100% - 2rem)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.nav, .nav-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.nav { min-height: 4.25rem; justify-content: space-between; padding-block: .75rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); font-size: 1.15rem; font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .65rem; color: #fff; background: var(--accent); }
.nav-actions a { text-decoration: none; }
.nav-actions [aria-current] { padding: .35rem .65rem; border-radius: .45rem; background: var(--accent-soft); font-weight: 700; }
main { flex: 1; padding-block: 2rem 4rem; }
.site-footer { padding-block: .85rem; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .875rem; }
.site-footer a { color: inherit; }
.page-heading { margin-bottom: 1.5rem; }
.page-heading p, .login p { margin-top: .6rem; color: var(--muted); }
.page-heading > a { display: inline-block; margin-bottom: .75rem; }
.booking-heading { padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid #cfe6e4; border-radius: 1rem; background: linear-gradient(115deg, #daf3eb, #e6effb); }
.booking-heading p { color: #37596a; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.card { background: #fff; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 3px 10px #233e5910; }
.section-title { display: flex; align-items: center; gap: .6rem; }
.section-title .icon { color: var(--accent); }
.booking-card { border-top: 3px solid var(--accent); }
.booking-card form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.booking-card :is(.checkbox, .booking-rules, .booking-feedback, button) { grid-column: 1 / -1; }
.booking-rules { font-size: .9rem; }
.booking-feedback { padding: .6rem .75rem; border-radius: .5rem; background: #eef4f9; }
.reservations { margin-top: 1rem; }
.gatekeeper-room { border-top: 1px solid var(--line); padding: .65rem 0; }
.gatekeeper-room h3 { margin: 0; }
.gatekeeper-booking { display: flex; flex-wrap: wrap; gap: .1rem .75rem; margin-top: .25rem; }
.gatekeeper-booking strong { font-variant-numeric: tabular-nums; }
.form-card, .login { max-width: 34rem; }
.login { margin: clamp(1rem, 8vw, 5rem) auto; }
.login .button { margin-top: 1.5rem; }
.form-grid { display: grid; gap: .85rem; }
.time-fields, .room-date-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: .3rem; min-width: 0; font-size: .9rem; font-weight: 650; }
input, select, textarea, button { font: inherit; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; color: var(--ink); background-color: #fff; border: 1px solid #a8b7c7; border-radius: .4rem; padding: .55rem .65rem; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .4rem; }
[data-booking-room-fields] { grid-column: 1 / -1; }
[data-field] + [data-field] { border-top: 1px solid var(--line); padding-top: .85rem; }
.reservations dd { white-space: pre-wrap; overflow-wrap: anywhere; }
select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, #405671 50%), linear-gradient(135deg, #405671 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.search-select { position: relative; display: grid; gap: .3rem; min-width: 0; }
.search-select input { font-size: .9rem; font-weight: 650; }
.search-select-popup { position: absolute; z-index: 5; top: calc(100% + .25rem); inset-inline: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .55rem; background: #fff; box-shadow: 0 .4rem 1.2rem #233e5922; }
.search-select-options { max-height: 15rem; overflow: auto; margin: 0; padding: .25rem; list-style: none; }
.search-select-options li { padding: .45rem .55rem; border-radius: .3rem; font-size: .9rem; overflow-wrap: anywhere; cursor: pointer; }
.search-select-options li:hover, .search-select-options li[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-dark); }
.search-select-status { padding: .45rem .8rem; color: var(--muted); font-size: .875rem; }
.checkbox { display: flex; align-items: baseline; font-weight: 500; gap: .6rem; }
.checkbox input { accent-color: var(--accent); }
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: .65rem; width: fit-content; border: 1px solid transparent; border-radius: .5rem; padding: .55rem .9rem; color: white; background: var(--accent); font-weight: 650; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: var(--accent-dark); }
button:disabled, select:disabled { color: var(--muted); background-color: #edf3f7; cursor: not-allowed; }
.secondary { background: white; border-color: #a8b7c7; color: var(--ink); }
.secondary:hover, .text-button:hover { background: #edf3f9; }
.text-button { background: transparent; padding: .25rem .4rem; }
.danger { color: #9b2534; }
:focus-visible { outline: 3px solid #279887; outline-offset: 3px; }
.notice { padding: .75rem 1rem; margin-bottom: 1rem; border-radius: .4rem; background: #e2f5eb; color: #135135; }
.notice.error { background: #fce9ec; color: #801a2a; }
.notice ul { margin: 0; padding-left: 1.2rem; }
.busy-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border-top: 1px solid var(--line); padding: .6rem 0; }
.muted { color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; text-align: left; border-collapse: collapse; }
th, td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #ebf5f3; font-size: .875rem; }
.icon { display: inline-block; position: relative; width: 1rem; height: 1rem; flex: 0 0 auto; }
.icon-calendar { border: 1.5px solid currentColor; border-radius: .2rem; }
.icon-calendar::before { content: ''; position: absolute; inset: .25rem 0 auto; border-top: 1.5px solid currentColor; }
.icon-calendar::after { content: ''; position: absolute; left: .22rem; top: .48rem; width: .14rem; height: .14rem; border-radius: 50%; background: currentColor; box-shadow: .29rem 0 currentColor; }
.icon-plus::before, .icon-plus::after { content: ''; position: absolute; inset: calc(50% - .06rem) .13rem auto; height: .12rem; border-radius: 1rem; background: currentColor; }
.icon-plus::after { transform: rotate(90deg); }
.icon-list::before, .icon-list::after { content: ''; position: absolute; top: .18rem; height: .12rem; border-radius: 1rem; background: currentColor; box-shadow: 0 .29rem currentColor, 0 .58rem currentColor; }
.icon-list::before { left: 0; width: .12rem; }
.icon-list::after { left: .29rem; right: 0; }
.icon-clock { border: 1.5px solid currentColor; border-radius: 50%; }
.icon-clock::before { content: ''; position: absolute; top: .17rem; left: 50%; width: .23rem; height: .3rem; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.icon-average { background: linear-gradient(currentColor, currentColor) 10% 85% / 18% 32% no-repeat, linear-gradient(currentColor, currentColor) 50% 85% / 18% 58% no-repeat, linear-gradient(currentColor, currentColor) 90% 85% / 18% 80% no-repeat; }
.row-actions form { display: inline; }
.row-actions a { margin-right: .4rem; }
.pagination { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.user-search { margin-bottom: 1rem; }
.user-bookings { padding: .25rem .55rem; }
.user-role { color: var(--accent-dark); }
.stats-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.stats-filters > label, .stats-filters > .search-select { flex: 1 1 12rem; max-width: 26rem; }
.stats-note { margin: 1rem .15rem; }
.stats-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.stats-metrics .card { position: relative; overflow: hidden; isolation: isolate; }
.stats-metrics dt { color: var(--muted); font-size: .9rem; }
.stats-metrics dd { margin: .3rem 0 0; color: var(--accent-dark); font-size: 1.35rem; font-weight: 750; }
.stat-icon { position: absolute; z-index: -1; top: .75rem; right: .85rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; color: var(--accent); opacity: .14; pointer-events: none; }
.stat-icon .icon { transform: scale(2.35); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .stat-icon { transition: transform .2s ease, opacity .2s ease; }
    .stats-metrics .card:hover .stat-icon { transform: scale(1.12); opacity: .2; }
}
.stats-day-summary { margin-bottom: .85rem; }
.weekday-chart { display: grid; gap: .75rem; margin: 0; }
.weekday-row { display: grid; grid-template-columns: 5rem 1fr; align-items: center; gap: .4rem; font-size: .9rem; }
.weekday-row dd { display: grid; grid-template-columns: minmax(1.5rem, 1fr) auto; align-items: center; gap: .55rem; margin: 0; }
.weekday-row dd > span:last-child { min-width: 5.5rem; text-align: end; }
.weekday-track { height: .6rem; overflow: hidden; border-radius: 1rem; background: var(--accent-soft); }
.weekday-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.room-chart { width: min(11rem, 100%); aspect-ratio: 1; margin: 0 auto 1rem; border-radius: 50%; background: conic-gradient(var(--room-slices)); }
.room-chart-legend { list-style: none; margin: 0; padding: 0; }
.room-chart-legend li { display: grid; grid-template-columns: .65rem minmax(0, 1fr) auto 3.5rem; align-items: center; gap: .5rem; border-top: 1px solid var(--line); padding: .5rem 0; font-size: .9rem; }
.room-chart-legend li > span:nth-child(2) { overflow-wrap: anywhere; }
.room-chart-legend li > span:last-child { text-align: end; }
.room-swatch { width: .65rem; height: .65rem; border-radius: 50%; background: var(--room-color); }
.microsoft-icon { display: grid; grid-template-columns: 7px 7px; grid-auto-rows: 7px; gap: 2px; }
.microsoft-icon i:nth-child(1) { background: #f25022; }
.microsoft-icon i:nth-child(2) { background: #7fba00; }
.microsoft-icon i:nth-child(3) { background: #00a4ef; }
.microsoft-icon i:nth-child(4) { background: #ffb900; }
@media (max-width: 44rem) {
    .columns, .booking-card form { grid-template-columns: 1fr; }
    .stats-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
