.reservation-resources,.reservation-toolbar,.reservation-mobile-days{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px}.reservation-toolbar{justify-content:space-between}.reservation-toolbar .form-actions{margin:0}.reservation-grid{display:grid;grid-template-columns:90px repeat(5,minmax(0,1fr));gap:1px;background:#dce7ef;border:1px solid #dce7ef;border-radius:16px;overflow:hidden}.schedule-corner,.schedule-day,.schedule-hour{padding:16px;background:#f6f9fc;color:#19334d}.schedule-day{text-align:center;font-weight:700}.schedule-day small,.schedule-hour small{display:block;margin-top:5px;color:#59748a;font-size:12px}.schedule-cell{background:white;min-width:0}.reservation-slot{border:0;border-radius:0;background:#f8fcfc;width:100%;min-height:88px;text-align:left;padding:13px;display:flex;flex-direction:column;gap:7px;color:#214c51;cursor:pointer;font:inherit;font-size:13px;overflow-wrap:anywhere}.reservation-slot strong{font-size:14px}.reservation-slot:hover:not(:disabled){background:#e4f4f1;box-shadow:inset 0 0 0 2px #008a83}.reservation-slot:disabled{cursor:default;opacity:1}.reservation-slot.full,.reservation-slot.blocked{background:#eef1f5;color:#536575}.reservation-slot.limited{background:#fff9ed;color:#786328}.reservation-slot.past{background:#f5f6f8;color:#82909b}.slot-booking{font-size:12px}.slot-booking.mine{font-weight:700;text-decoration:underline}.reservation-mobile-days,.mobile-hour{display:none}.reservation-list-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 0;border-bottom:1px solid #e6edf3}.reservation-list-row p{margin:5px 0}.reservation-device-choices{max-height:260px;overflow:auto}.reservation-device-choices label{font-size:14px}.reservation-device-choices input[type=checkbox]{width:auto}.reservation-dialog-body{padding:28px;min-width:0}.reservation-dialog-heading{display:flex;justify-content:space-between;gap:15px;align-items:center}.reservation-dialog-heading h2{margin:0;font-size:23px}#reservation-dialog{border:1px solid #dce7ef;border-radius:18px;width:min(520px,calc(100vw - 28px));max-height:88vh;padding:0;color:#16334c;box-shadow:0 25px 90px #10263d30}#reservation-dialog::backdrop{background:#10263d70}.quantity-control{display:flex;align-items:center;gap:10px}.quantity-control input{width:110px;text-align:center}.reservation-dialog-body label{display:block;margin:14px 0}.reservation-dialog-body input,.reservation-dialog-body select{max-width:100%}.reservation-dialog-body input[type=checkbox]{width:auto}#reservation-form>button[type=submit]{margin-top:15px}.reservation-mobile-days .button{padding:9px;font-size:12px}
@media(max-width:760px){.reservation-mobile-days{display:flex;gap:5px}.reservation-grid{display:block;background:white}.schedule-corner,.schedule-day,.schedule-hour,.schedule-cell:not(.mobile-selected){display:none}.mobile-hour{display:block;font-size:12px;color:#526e7f}.reservation-slot{min-height:100px;border-bottom:1px solid #dce7ef}.reservation-toolbar{font-size:13px;gap:8px}.reservation-resources{gap:6px}.reservation-resources .button{font-size:13px;padding:10px}.reservation-dialog-body{padding:20px}.reservation-list-row{align-items:flex-start}.reservation-dialog-heading h2{font-size:20px}}

.schedule-hour{padding:12px}.schedule-hour small{font-size:11px;white-space:nowrap}

.reservation-resources .button{white-space:normal;max-width:100%;overflow-wrap:anywhere}.reservation-list-row>div{min-width:0;overflow-wrap:anywhere}.reservation-dialog-heading h2{min-width:0;overflow-wrap:anywhere}.reservation-dialog-heading>.button{flex-shrink:0}
/* Shared slot presentation: timetable only; no changes to the Hub shell. */
.reservation-legend{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 18px;font-size:12px}.reservation-legend>span{padding:6px 10px;border-radius:7px;border:1px solid transparent}.legend-past{background:#e7ebef;color:#6a7885}.legend-free{background:#eff9f1;color:#246b48}.legend-mine{background:#cceee7;color:#126457}.legend-occupied{background:#fff0f0;color:#945056}
.reservation-grid{gap:8px;padding:10px;background:#fff;border-color:#dce7ef}.schedule-corner,.schedule-day,.schedule-hour{border-radius:8px;background:#f5f8fb}.schedule-hour{display:flex;flex-direction:column;justify-content:center}.schedule-cell{display:flex;background:transparent}.reservation-slot{--slot-bg:#eff9f1;--slot-ink:#246b48;--slot-border:#d7eadb;background:var(--slot-bg);color:var(--slot-ink);padding:0;min-height:112px;height:100%;border:1px solid var(--slot-border);border-radius:10px;overflow:hidden;cursor:default}.reservation-slot.state-past,.reservation-slot.state-blocked{--slot-bg:#e7ebef;--slot-ink:#6a7885;--slot-border:#dbe1e6}.reservation-slot.state-mine{--slot-bg:#cceee7;--slot-ink:#126457;--slot-border:#9bd2c7}.reservation-slot.state-occupied{--slot-bg:#fff0f0;--slot-ink:#945056;--slot-border:#f1d7d7}.reservation-slot:hover:not(:disabled){background:var(--slot-bg);box-shadow:none}.slot-main{border:0;width:100%;padding:14px;text-align:left;display:flex;flex-direction:column;gap:8px;background:transparent;color:inherit;font:inherit;cursor:pointer;flex:1;overflow-wrap:anywhere}.slot-main:disabled{cursor:default;color:inherit;opacity:1}.slot-main:hover:not(:disabled){background:#ffffff35}.state-free .slot-main:hover,.state-mine .slot-main:hover{box-shadow:inset 0 0 0 2px #008a8360;border-radius:9px}.slot-main:focus-visible,.slot-reserve:focus-visible{outline:3px solid #006e71;outline-offset:-3px}.slot-status{display:flex;gap:8px;align-items:center;font-size:14px;font-weight:750}.slot-status>span{font-size:17px;flex-shrink:0}.slot-capacity{font-weight:650;font-size:13px}.slot-hint{font-size:11px;line-height:1.5}.slot-booking{font-size:12px;line-height:1.5}.slot-booking.mine{font-weight:650;text-decoration:none}.slot-reserve{margin:0 10px 10px;padding:7px 8px;border:1px solid #008a8330;border-radius:6px;background:#ffffff90;color:#126457;font:inherit;font-size:11px;cursor:pointer;text-align:left}.slot-reserve:hover:not(:disabled){background:#fff;border-color:#008a83}.slot-reserve:disabled{border-color:transparent;background:transparent;color:inherit;cursor:default;opacity:.8}
@media(max-width:760px){.reservation-grid{padding:8px}.schedule-cell.mobile-selected{display:flex;margin-bottom:8px}.reservation-slot{width:100%;min-height:106px}.slot-main{padding:14px}.reservation-legend{gap:6px;font-size:11px}.reservation-legend>span{padding:5px 7px}.schedule-cell:not(.mobile-selected){display:none}}
.reservation-resources .button svg,.reservation-dialog-heading h2 svg{flex-shrink:0}.reservation-dialog-heading h2 svg{vertical-align:middle;margin-right:10px}.reservation-list-row p svg{vertical-align:middle;margin-right:8px}.reservation-legend>span{display:inline-flex;align-items:center;gap:5px}.legend-teaching{background:#e9f1fb;color:#385d88}.legend-blocked{background:#fff3d7;color:#7b5b20}.reservation-slot.state-teaching{--slot-bg:#e9f1fb;--slot-ink:#385d88;--slot-border:#cbdcf0}.reservation-slot.state-blocked{--slot-bg:#fff3d7;--slot-ink:#7b5b20;--slot-border:#ecd9a8}.reservation-slot.is-current{box-shadow:inset 0 0 0 1px #008a83;border-color:#83bdb8}.reservation-quantity{border:1px solid #dce7ef;border-radius:10px;padding:12px 14px;margin:16px 0}.reservation-quantity legend{font-weight:700;font-size:14px;padding:0 5px}.reservation-dialog-body label.quantity-mode{display:flex;gap:9px;align-items:center;margin:10px 0}.quantity-mode input[type=radio]{width:auto}.quantity-control[hidden]{display:none}.reservation-dialog-body #reservation-remaining{margin:12px 0 0}
@media(max-width:760px){.reservation-toolbar .form-actions{gap:5px}.reservation-toolbar .form-actions .button{font-size:11px;padding:9px}.reservation-toolbar .form-actions{width:100%}}
.reservation-dialog-body label.quantity-mode{flex-direction:row;justify-content:flex-start;text-align:left}.quantity-mode input[type=radio]{width:18px;height:18px;min-height:18px;flex:0 0 18px;accent-color:var(--teal)}.quantity-mode input:focus-visible{outline:2px solid var(--teal);outline-offset:3px}
/* The timetable is the working surface; scoped to Reservations. */
.reservation-page-heading{margin:0 0 20px}.reservation-page-heading h1{font-size:1.8rem;line-height:1.2;margin:0}.reservation-resources{margin-bottom:14px}.reservation-toolbar{margin-bottom:14px}.reservation-legend{gap:8px;margin-bottom:12px}.reservation-grid .reservation-slot{min-height:96px}.slot-main{padding:12px;gap:6px;transition:background .15s ease}.reservation-slot.state-mine{--slot-bg:#c2ebe3;--slot-border:#63b7a8;border-left:4px solid #008a83}.state-mine .slot-status{font-weight:800}.state-mine .slot-booking.mine{font-size:14px;font-weight:750;order:-1}.state-mine .slot-status{order:-2}.state-mine .slot-capacity{font-size:12px;font-weight:500}.state-mine .slot-hint{font-size:11px}.reservation-modal-entry{padding:16px 0;border-bottom:1px solid var(--line)}.reservation-modal-entry:last-child{border-bottom:0}.reservation-modal-entry h3{display:flex;align-items:center;gap:8px;margin:0 0 12px}.reservation-detail-summary{font-size:18px;font-weight:700}.reservation-change{margin:16px 0;padding:14px;border:1px solid #ecd9a8;background:#fff8e8;border-radius:8px}.reservation-change .button{margin:4px}.reservation-agenda-heading{display:none}
@media(max-width:1100px){.reservation-grid{display:block;background:white}.schedule-corner,.schedule-day,.schedule-hour,.schedule-cell:not(.mobile-selected){display:none}.schedule-cell.mobile-selected{display:flex;margin-bottom:8px}.reservation-mobile-days{display:flex;gap:5px}.mobile-hour{display:block;font-size:12px;color:inherit}.reservation-agenda-heading{display:block;text-transform:capitalize;font-size:17px;margin:18px 0 12px}.reservation-grid .reservation-slot{min-height:100px}.reservation-page-heading h1{font-size:1.5rem}.reservation-legend{font-size:11px}.reservation-legend>span{padding:4px 6px}}
@media(prefers-reduced-motion:reduce){.slot-main{transition:none}}
.slot-main .mobile-hour{order:-3}
/* Date navigation and resource context stay inside the refreshed toolbar. */
.reservation-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:10px}
.reservation-date-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;min-width:0}
.reservation-week-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:10px;width:min(100%,320px);min-width:0}
.reservation-week-nav strong{text-align:center;overflow-wrap:anywhere}
.reservation-week-nav .button{padding:10px;min-height:44px;font-size:20px}
.reservation-resource-meta{display:flex;flex-wrap:wrap;gap:4px 20px;font-size:13px;color:#59748a;line-height:1.5}
.reservation-resource-meta>span{min-width:0;overflow-wrap:anywhere}
@media(max-width:1100px){.reservation-mobile-days{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.reservation-mobile-days .button{min-width:0;min-height:44px;padding:8px 2px;flex-direction:column;gap:2px}.reservation-mobile-days .button>span{max-width:100%;overflow-wrap:anywhere}}
@media(max-width:760px){.reservation-date-controls{flex-direction:column;align-items:flex-start;gap:8px}.reservation-week-nav{width:100%;gap:6px}.reservation-resource-meta{flex-direction:column;gap:3px}}

/* Compact timetable only: keep the existing daily agenda and booking workflow. */
.reservation-grid .slot-booking-identity{display:block;font-size:12px;font-weight:500}
.reservation-grid .state-mine{border-left-width:1px;--slot-border:#91c9bd}
.reservation-grid .state-past{--slot-bg:#f3f5f7;--slot-ink:#657585;--slot-border:#e5eaf0}
@media(min-width:1101px){
 .reservation-page-heading{margin-bottom:14px}
 .reservation-resources{gap:8px;margin-bottom:10px}
 .reservation-resources .button{padding:9px 14px;min-height:40px}
 .reservation-toolbar{flex-direction:row;align-items:center;gap:8px 20px;margin-bottom:12px}
 .reservation-date-controls{gap:8px 12px}
 .reservation-week-nav{grid-template-columns:36px minmax(0,1fr) 36px;width:290px;gap:8px}
 .reservation-week-nav .button{padding:6px;min-height:36px;font-size:18px}
 .reservation-resource-meta{gap:4px 14px;font-size:12px;text-align:right;justify-content:flex-end}
 .reservation-grid{gap:5px;padding:8px;border-radius:12px;grid-template-columns:80px repeat(5,minmax(0,1fr))}
 .reservation-grid .schedule-corner,.reservation-grid .schedule-day,.reservation-grid .schedule-hour{padding:8px;border-radius:6px;font-size:13px}
 .reservation-grid .schedule-day small,.reservation-grid .schedule-hour small{margin-top:2px;font-size:11px}
 .reservation-grid .reservation-slot{min-height:60px;border-radius:7px}
 .reservation-grid .slot-main{padding:7px 9px;gap:3px;line-height:1.35;justify-content:center}
 .reservation-grid .slot-status{gap:6px;font-size:13px;line-height:18px}
 .reservation-grid .slot-status svg{width:16px;height:16px}
 .reservation-grid .slot-capacity,.reservation-grid .slot-booking,.reservation-grid .state-mine .slot-booking.mine{font-size:12px;line-height:16px}
 .reservation-grid .slot-booking-identity{display:inline;font-size:12px}
 .reservation-grid .slot-booking-identity::before{content:' · '}
 .reservation-grid .slot-hint{font-size:11px;line-height:15px}
 .reservation-grid .state-free .slot-main:hover,.reservation-grid .state-mine .slot-main:hover{box-shadow:inset 0 0 0 1px #008a8360;border-radius:6px}
 .reservation-grid .slot-reserve{margin:0 7px 5px;padding:3px 5px}
}

/* Resource choices use the same pill shape as the account control. */
.reservation-resources .button{border-radius:999px}

.reservation-page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.reservation-page-heading h1{margin:0}.reservation-import-link{border-radius:999px;max-width:100%;white-space:normal}

/* Week navigation belongs to the calendar surface, with quieter compact controls. */
.reservation-calendar{background:#fff;border:1px solid #dce7ef;border-radius:14px;overflow:hidden}
.reservation-calendar .reservation-toolbar{margin:0;padding:10px 12px;border-bottom:1px solid #e6edf3;flex-direction:row;align-items:center;gap:8px 16px}
.reservation-calendar .reservation-date-controls{flex-direction:row;align-items:center;gap:8px;max-width:100%}
.reservation-calendar .reservation-week-nav{grid-template-columns:32px minmax(0,1fr) 32px;width:256px;max-width:100%;gap:4px}
.reservation-calendar .reservation-week-nav strong{font-size:14px;line-height:20px}
.reservation-calendar .reservation-week-nav .button{min-height:32px;padding:4px;font-size:18px;background:transparent;border-color:transparent}
.reservation-calendar .reservation-week-nav .button:hover{background:#edf5f6;border-color:#b8d7d5}
.reservation-calendar [data-action=reservation-today]{min-height:32px;padding:5px 10px;font-size:12px}
.reservation-calendar .reservation-resource-meta{font-size:12px}
.reservation-calendar .reservation-grid{border:0;border-radius:0;margin:0}
@media(max-width:1100px){.reservation-calendar .reservation-mobile-days{margin:0;padding:10px 8px 0}.reservation-calendar .reservation-agenda-heading{margin:12px 12px 4px;font-size:15px}.reservation-calendar .reservation-resource-meta{flex-direction:row;gap:4px 12px}}

/* School timetable: days down the left, lesson periods across the top. */
@media(min-width:1101px){
 .reservation-grid{grid-template-columns:80px repeat(var(--period-count,8),minmax(0,1fr))}
 .reservation-grid .schedule-hour{text-align:center;align-items:center}
 .reservation-grid .schedule-day{display:flex;flex-direction:column;justify-content:center;text-align:left}
 .reservation-grid .reservation-slot{min-height:78px}
}
.reservation-resources .reservation-import-link{margin-left:auto;background:#e6ebef;color:#435a6b;border:1px solid #c8d2da;gap:8px}.reservation-resources .reservation-import-link:hover{background:#dbe3e9;border-color:#aebdc8}.resource-editor-panel #resource-pool-fields[hidden]{display:none}.resource-editor-panel .editor-heading{padding-bottom:12px;border-bottom:1px solid #d3e1e7}.resource-editor-panel .form-actions{padding-top:12px}
@media(max-width:760px){.reservation-resources .reservation-import-link{margin-left:0}}
#resource-pool-fields{border:0;padding:0;margin:0;min-width:0}

.timetable-advanced { margin-block: 12px; }
.timetable-advanced > summary { width: fit-content; color: var(--teal-dark); cursor: pointer; font-weight: 650; }
.timetable-advanced[open] > summary { margin-bottom: 12px; }
