:root{font-family:system-ui,Arial,sans-serif;color:#222;background:#f4f5f6;font-synthesis:none}*{box-sizing:border-box}body{margin:0}header{background:#0e0e0e;color:#fff;padding:14px max(18px,calc((100vw - 1150px)/2));display:flex;align-items:center;justify-content:space-between;gap:10px}.brand{display:flex;align-items:center;gap:12px}.brand strong{display:block;font-size:1.05rem}.brand small{display:block;color:#ffcc00;font-size:.7rem;letter-spacing:.11em;margin-top:3px}.star{color:#ffcc00;font-size:2rem}#identity{display:flex;align-items:center;gap:10px;font-size:.85rem;flex-wrap:wrap}main{max-width:1150px;margin:auto;padding:24px 16px 80px}h1{margin:0 0 10px;font-size:1.7rem}h2{margin:0 0 12px}p{line-height:1.5}button{border:0;border-radius:8px;background:#141414;color:#fff;padding:11px 15px;font:inherit;font-weight:600;cursor:pointer}button:hover{filter:brightness(1.25)}button:disabled{opacity:.45;cursor:default}.secondary{background:#e8eaed;color:#222}.danger{background:#932d36}.muted,small{color:#666}.panel{padding:22px;background:#fff;border:1px solid #ddd;border-radius:12px;margin-top:16px}.narrow{max-width:460px;margin:40px auto}.hidden{display:none!important}label{display:block;margin:12px 0;font-weight:600;font-size:.9rem}input,select,textarea{font:inherit;border:1px solid #b8bec5;border-radius:7px;padding:11px;width:100%;margin-top:6px;background:#fff;color:#222}textarea{min-height:100px;resize:vertical}form button{margin-top:12px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}.toolbar p{margin:0}nav{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:26px}nav button{background:#fff;color:#111;border:1px solid #ddd}nav .current{background:#ffcc00;border-color:#ffcc00}.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin-top:24px}.tile{background:white;color:#222;border:1px solid #ddd;padding:26px;text-align:left;display:flex;gap:8px;flex-direction:column;min-height:160px}.tile span{font-size:1.6rem}.tile b{font-size:1.08rem}.tile small{line-height:1.45}.future{opacity:.62}.monthnav{display:flex;align-items:center;justify-content:center;gap:22px;margin-bottom:20px}.monthnav h2{margin:0;min-width:200px;text-align:center}.monthnav button{font-size:1.6rem;padding:4px 16px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.weekday{text-align:center;font-weight:600;padding:8px 0;color:#555}.day{background:#f3f5f7;min-height:100px;padding:8px;min-width:0;border-radius:5px}.day.empty{background:#fafafa}.day.today{outline:2px solid #f4bf00}.day>strong{display:block;font-size:.87rem}.chip{font-size:.72rem;padding:5px;background:#dceafa;color:#173852;border-radius:4px;margin-top:5px;overflow-wrap:anywhere;cursor:pointer}.chip.cancelled{text-decoration:line-through;opacity:.55}.entry{padding:14px 0;border-bottom:1px solid #eee;display:flex;justify-content:space-between;gap:12px;align-items:center}.entry:last-child{border:0}.entry small{display:block;margin-top:4px}.entry .buttons{display:flex;flex-wrap:wrap;gap:6px}.entry .buttons button{padding:7px 10px;font-size:.8rem}.tag{display:inline-block;border-radius:30px;background:#f0f0f0;padding:4px 8px;font-size:.75rem;margin-left:5px}dialog{border:0;border-radius:14px;max-width:640px;width:calc(100vw - 24px);max-height:90vh;overflow:auto;padding:20px 24px;box-shadow:0 15px 90px #0005}dialog::backdrop{background:#0009}.modal-head{display:flex;justify-content:space-between;gap:12px;align-items:start}.modal-head h2{margin:0 0 18px}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.note{padding:12px;background:#fff7da;border-radius:8px;font-size:.88rem}#message{position:fixed;bottom:16px;right:16px;max-width:370px;background:#171717;color:white;padding:14px;border-radius:8px;display:none;box-shadow:0 6px 20px #0003}#message.show{display:block}#message.error{background:#8c2830}#identity button{background:#3a3a3a;padding:7px 10px}@media(max-width:700px){main{padding:16px 10px 70px}.panel{padding:13px}.day{min-height:54px;padding:4px}.chip{font-size:0;width:7px;height:7px;padding:0;border-radius:50%;margin-top:4px}.day>strong{font-size:.76rem}.weekday{font-size:.72rem}.two{grid-template-columns:1fr}.entry{align-items:start;flex-direction:column}.toolbar{align-items:start}header{padding:12px}.brand strong{font-size:.9rem}}

/* Committee calendar update */
.day[data-date]{cursor:pointer}
.day[data-date]:focus-visible{outline:3px solid #ffcc00;outline-offset:-3px}
.day-entry{display:block;width:100%;margin:6px 0;text-align:left}
.custom-location.hidden{display:none}

/* Timed schedule and availability checks */
.chip{font-variant-numeric:tabular-nums;line-height:1.3}
.conflict-check{border:1px solid #ccd2d8;border-radius:9px;padding:12px;margin:16px 0}
.conflict-check h3{margin:0 0 10px;font-size:1rem}
.conflict-ok{color:#216044;font-size:.9rem}
.conflict-warning{display:block;background:#fff0e7;color:#7b2b12;border-left:4px solid #d44a24;border-radius:5px;padding:12px;font-size:.9rem}
.conflict-warning ul{padding-left:18px;margin:8px 0}.conflict-warning li{margin:5px 0}
.schedule-list{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.schedule-entry{display:grid;grid-template-columns:minmax(120px,190px) 1fr;width:100%;align-items:start;gap:14px;background:#f2f5f8;color:#161616;border:1px solid #dce1e6;text-align:left;border-radius:7px;padding:12px}
.schedule-entry:hover{background:#e6eef6}
.schedule-time{font-weight:700;font-variant-numeric:tabular-nums}
.schedule-details{display:flex;flex-direction:column;gap:4px}
.schedule-details small{color:#46505b}
.schedule-overlap{border-left:5px solid #d59620}
.schedule-clash{background:#fff0e7;border-left:5px solid #bf3922}
.schedule-warning{color:#922f19;font-size:.8rem}
@media(max-width:700px){.day .chip{font-size:.68rem;width:auto;height:auto;padding:4px;line-height:1.15;border-radius:4px}.schedule-entry{grid-template-columns:1fr;gap:5px}}
/* v4: clear, time-positioned daily schedule */
.time-schedule{display:grid;grid-template-columns:58px minmax(0,1fr);gap:8px;margin:16px 0 22px;overflow:visible;min-height:140px}
.schedule-hours{position:relative;color:#5e6571;font-size:11px;font-variant-numeric:tabular-nums}
.schedule-hours span{position:absolute;right:0;transform:translateY(-40%);white-space:nowrap}
.schedule-canvas{position:relative;min-width:0;border-left:2px solid #bbc3cb;background:repeating-linear-gradient(to bottom,#fff 0,#fff 50px,#e4e8ed 50px,#e4e8ed 51px)}
.timed-event{position:absolute;display:flex;flex-direction:column;gap:2px;text-align:left;padding:5px 7px;background:#dceafa;color:#173852;border:1px solid #4485b8;border-left:4px solid #4485b8;border-radius:5px;overflow:hidden;min-width:0;font-size:12px;line-height:1.2;z-index:2}
.timed-event b,.timed-event span,.timed-event small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.timed-event small{color:#34516a;font-size:10px}
.conflict-check{border:2px solid #cbd5e1;border-radius:9px;padding:12px;margin:16px 0}
.conflict-check h3{margin:0 0 8px}
.conflict-result{padding:10px 12px;border-radius:7px;font-size:14px}
.conflict-result.major{background:#fff0ec;color:#8a1c14;border:3px solid #c32f23}
.conflict-result.major>strong{font-size:17px;font-weight:800;display:block;letter-spacing:.02em}
.conflict-result.potential{background:#fff8e5;color:#815000;border:2px solid #d19a1e}
.conflict-result.clear{background:#edf7ef;color:#245b31;border:1px solid #acd3b4}
.conflict-result ul{padding-left:20px;margin:8px 0}.conflict-result li{margin:6px 0}
@media(max-width:700px){.time-schedule{grid-template-columns:45px minmax(0,1fr)}.timed-event{font-size:11px;padding:4px}.timed-event small{font-size:9px}}

/* v5: conditional conflict alert placed before booking dates, no idle panel */
.conflict-check[hidden]{display:none!important}
.conflict-check{border:0;padding:0;margin:10px 0 12px}
.conflict-result.major,.conflict-result.potential{padding:12px;border-radius:9px}
.conflict-result p{margin:7px 0}
/* Northway portal branding and usability update */
:root{--nw-gold:#ffcc00;--nw-blue:#78aedd;--nw-black:#101010;--nw-paper:#f5f6f8;--nw-border:#d7dce1}
body{background:var(--nw-paper);color:#17212b}header{border-bottom:4px solid var(--nw-gold);padding-block:17px;background:#101010}
.brand{gap:14px}.brand strong{font-size:clamp(1rem,2.5vw,1.23rem);letter-spacing:.01em}.brand small{color:var(--nw-gold);font-weight:700;letter-spacing:.1em}
.brand-mark{display:grid;place-items:center;width:46px;height:46px;border:2px solid var(--nw-gold);border-radius:10px;color:var(--nw-gold);font-size:1.65rem;font-weight:900;letter-spacing:-.07em}
.panel,.tile,dialog{border-color:var(--nw-border);box-shadow:0 3px 14px #17212b08}
.panel{border-radius:14px}.tile{border-radius:12px;transition:border-color .15s,transform .15s}.tile:not(.future):hover{border-color:#4a87bd;transform:translateY(-2px)}
button{transition:filter .15s,background-color .15s}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--nw-gold);outline-offset:2px}
nav .current{background:var(--nw-gold);color:var(--nw-black);font-weight:800}
#loginPanel{border-top:4px solid var(--nw-gold)}#loginPanel h1{color:#101010}
.helper-text{font-size:.89rem;line-height:1.5;color:#4d5d6b;background:#eef4f8;border-left:3px solid var(--nw-blue);padding:12px;border-radius:6px}
#invitationPanel{border-top:4px solid var(--nw-gold)}
@media(max-width:700px){header{padding:12px}.brand-mark{width:40px;height:40px;font-size:1.3rem}.brand small{font-size:.58rem}}

/* Northway official identity: logo and approved SPORT / COMMUNITY / SOCIAL strapline */
.brand .club-logo{width:72px;height:67px;object-fit:contain;flex-shrink:0;filter:none}
.brand strong{font-size:clamp(1rem,2.3vw,1.22rem);font-weight:750;color:white;line-height:1.25}
.brand small{font-size:.76rem;letter-spacing:.08em;color:#ffcc00;margin-top:4px}
.club-strapline{display:block;margin-top:5px;color:#fff;font-size:.68rem;font-weight:700;letter-spacing:.085em;word-spacing:.04em;white-space:nowrap}
.club-strapline b,.portal-footer b{color:#ffcc00;font-size:1.05em;vertical-align:middle;margin:0 .3em}
.portal-footer{max-width:1150px;margin:10px auto 28px;padding:20px 16px;border-top:2px solid #ffcc00;display:flex;gap:15px;align-items:center;color:#2b3541;font-size:.9rem}
.portal-footer img{object-fit:contain}.portal-footer strong,.portal-footer span,.portal-footer small{display:block;margin:2px 0}.portal-footer span{font-size:.7rem;letter-spacing:.07em;font-weight:700}.portal-footer a{color:#285e86}
@media(max-width:700px){.brand .club-logo{width:54px;height:52px}.brand strong{font-size:.88rem}.brand small{font-size:.65rem}.club-strapline{font-size:.52rem;letter-spacing:.02em;white-space:normal}.portal-footer{padding:14px}}

/* v10: optical centring for strapline stars and clear user-management sections */
.club-strapline{display:flex;align-items:center;flex-wrap:wrap;column-gap:.32em;row-gap:0;line-height:1.35}
.club-strapline b{display:inline-flex;align-items:center;justify-content:center;line-height:1;vertical-align:middle;font-size:1.05em;margin:0 .2em;transform:translateY(-.045em)}
#usersList details{margin-top:14px;border-top:1px solid #dde0e5;padding-top:10px}
#usersList summary{font-weight:650;cursor:pointer;padding:6px 0}
#usersList .removed-user{opacity:.82}
#usersList .user-empty{padding:12px 0;color:#667080}

/* Branded confirmation dialogs. All confirmations use this instead of native browser alerts. */
#confirmDialog{padding:0;max-width:480px;width:calc(100vw - 28px);border:1px solid #d5dbe0;overflow:hidden}
#confirmDialog .confirm-brand{background:#111;color:#fff;border-bottom:3px solid #ffcc00;display:flex;align-items:center;gap:12px;padding:12px 20px;font-weight:700}
#confirmDialog .confirm-brand img{object-fit:contain}
#confirmDialog .confirm-content{padding:24px}
#confirmDialog h2{font-size:1.3rem;margin:0 0 14px}
#confirmDialog p{white-space:pre-line;margin:0 0 25px;line-height:1.6}
#confirmDialog .confirm-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
#confirmDialog button{min-width:110px}

/* v12: align both branding stars on one visual baseline */
.club-strapline{display:flex;align-items:center;gap:.35em;line-height:1.3}
.club-strapline b{display:inline-flex;align-items:center;justify-content:center;line-height:1;margin:0 .18em;transform:none;vertical-align:middle}

/* v13: original-size logo artwork, sharp in high-DPI displays without CSS filters. */
.brand .club-logo{width:80px;height:auto;object-fit:contain;image-rendering:auto}
#confirmDialog .confirm-brand img{height:auto;object-fit:contain}
@media(max-width:700px){.brand .club-logo{width:63px;height:auto}}
#usersList .user-group{margin-top:14px;padding-top:8px;border-top:1px solid #dfe4e8}
#usersList .user-group summary{font-weight:700;padding:8px 4px;cursor:pointer}

/* v14: live password requirements and confirmation feedback */
.password-rules{display:grid;grid-template-columns:1fr;gap:7px;margin:2px 0 16px;padding:12px 14px;background:#f6f8fa;border:1px solid #dbe2e8;border-radius:9px}
.password-rules span{display:flex;align-items:center;gap:9px;font-size:.9rem;color:#596772;line-height:1.35}
.password-rules span::before{content:'○';font-weight:800;font-size:1.18em;line-height:1;color:#77838c;width:18px;flex-shrink:0;text-align:center}
.password-rules span.met{color:#17653a;font-weight:650}
.password-rules span.met::before{content:'✓';color:#17653a}
.password-match{font-size:.9rem;color:#64717c;margin:-3px 0 16px}
.password-match.met{color:#17653a;font-weight:650}
.password-match.met::before{content:'✓ ';font-weight:800}
.password-match.mismatch{color:#a12d31}
.password-match.mismatch::before{content:'✕ ';font-weight:800}
#invitationForm button:disabled,#passwordForm button:disabled{opacity:.48;cursor:not-allowed;filter:grayscale(.3)}

/* v15: clear action queue and room-by-room schedule in request review */
.request-count{display:inline-flex;width:max-content;background:#fff0b8;color:#302400;border-radius:14px;padding:3px 9px;font-size:12px;font-weight:700}
.request-detail{padding:8px 0 12px}.request-detail p{margin:6px 0;line-height:1.45}
.request-schedule-wrap{margin:14px 0 22px;border:1px solid #cdd4dd;border-radius:10px;overflow:hidden}
.request-schedule-heading{background:#f1f4f8;font-weight:700;padding:12px;border-bottom:1px solid #cdd4dd}
.request-conflict{padding:10px 13px;font-size:13px;border-bottom:1px solid #cdd4dd}
.request-conflict p{margin:4px 0}.request-conflict.critical{background:#fff0ed;color:#901a0c;border-left:5px solid #c82914}.request-conflict.caution{background:#fff4d9;border-left:5px solid #d59d29}
.request-room-grid{display:grid;grid-template-columns:50px repeat(3,minmax(140px,1fr));overflow-x:auto;min-width:530px}
.request-hour-labels{position:relative;background:#f7f8fa;border-right:1px solid #d3d9df}.request-hour-labels>b,.request-room>b{display:block;min-height:28px;padding:6px;font-size:11px;text-align:center;border-bottom:1px solid #d3d9df}
.request-hour-labels span{position:absolute;right:5px;font-size:10px;color:#68717d}
.request-room{border-right:1px solid #d3d9df;min-width:0}.request-room:last-child{border:0}
.request-room-timeline{position:relative;background:repeating-linear-gradient(to bottom,#fff 0,#fff 37px,#e9eef3 38px,#fff 39px)}
.request-block{position:absolute;z-index:1;left:3px;right:3px;box-sizing:border-box;overflow:hidden;padding:5px;background:#dceaff;border:1px solid #6591c4;border-left:3px solid #4e89b9;border-radius:4px;font-size:11px}
.request-block.proposed{z-index:2;background:#ffeb9c;border:2px solid #c89108;box-shadow:0 1px 3px #0003}.request-block b,.request-block small{display:block;line-height:1.25}
@media(max-width:640px){.request-schedule-wrap{overflow-x:auto}.request-room-grid{min-width:530px}}

/* More legible original club crest at actual display sizes */
.brand .club-logo{width:86px;height:auto;object-fit:contain;image-rendering:auto;flex-shrink:0}

#requestForm.is-cancel-request > label:not(.request-reason),#requestForm.is-cancel-request > .two,#requestForm.is-cancel-request > .conflict-check{display:none!important}

/* v16 request actions and history */
.tile .request-count{font-size:12px;line-height:1.35;white-space:normal;max-width:100%;padding:5px 9px;overflow-wrap:anywhere}
.request-choice-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.request-choice-actions button{flex:1 1 190px}
.booking-picker-results{max-height:370px;overflow:auto;border:1px solid #e0e4e9;border-radius:8px;padding:5px}
.booking-pick{display:block;width:100%;margin:0 0 4px;background:#fff;border:1px solid #e5e7eb;text-align:left;color:#222;font-weight:400}
.booking-pick:hover{background:#fff5d4;filter:none;border-color:#d8a600}
.booking-pick b,.booking-pick small{display:block;line-height:1.45}
.request-list-title{font-size:1rem;margin:4px 0 10px}
.request-entry{align-items:flex-start}.request-entry .buttons{align-items:center}
.request-history{margin-top:22px;border-top:1px solid #e5e7eb;padding-top:15px}
.request-history summary{cursor:pointer;font-weight:700}
.request-history .entry:last-child{border-bottom:0}
.request-status.rejected{background:#fbe9e7;color:#802016}
.request-status.approved{background:#e5f3e7;color:#20652b}
.request-status.needs_info{background:#fff0bf;color:#735200}

/* v18 calendar modes and single-block multi-room bookings */
.calendar-mode-picker{display:inline-flex;gap:3px;margin:0 8px;border-radius:9px;background:#eceff3;padding:3px}
.calendar-mode-picker button{background:white;color:#161616;padding:8px 12px;border-radius:7px}
.calendar-mode-picker button.current{background:#ffcc00;color:#111}
.monthnav{flex-wrap:wrap;gap:8px}
.timed-calendar-host{display:block!important;overflow-x:auto}
.timed-calendar{display:grid;grid-template-columns:47px repeat(7,minmax(125px,1fr));min-width:945px}
.timed-calendar.daily{grid-template-columns:47px minmax(280px,1fr);min-width:0}
.timed-hours{position:relative;background:#f9fafb;color:#616a75;font-size:10px}
.timed-heading-spacer{height:34px;border-bottom:1px solid #dee4eb}
.timed-hours span{position:absolute;right:4px;transform:translateY(-50%)}
.timed-day-column{min-width:0;border-left:1px solid #d7dde5}
.timed-day-heading{display:block;width:100%;min-height:34px;border-radius:0;background:#f2f5f8;color:#171b20;font-size:12px}
.timed-day-body{position:relative;background:repeating-linear-gradient(to bottom,#fff 0,#fff 47px,#e6eaf0 48px,#fff 49px)}
.timed-day-body .timed-event{overflow:hidden;padding:4px 5px;text-align:left}
.booking-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:15px 0}
.compare-card{border:1px solid #d1d7df;border-radius:9px;padding:12px;display:grid;align-content:start;gap:7px;overflow-wrap:anywhere;font-size:13px}
.compare-card>b{font-size:12px}.compare-card.after{background:#fff6d4;border-color:#e3b838}
.changed-field{font-weight:700}
.room-span-viewport{overflow-x:auto;min-width:500px}
.room-span-head{display:grid;grid-template-columns:45px repeat(3,minmax(140px,1fr));min-width:510px;background:#f1f4f8;font-size:11px;font-weight:700;text-align:center}
.room-span-head>div{border-right:1px solid #d6dce5;padding:8px 3px}
.room-span-body{display:grid;grid-template-columns:45px minmax(420px,1fr);min-width:510px}
.room-span-hours{position:relative;background:#f8fafc;font-size:10px;color:#6b7482}
.room-span-hours span{position:absolute;right:4px;transform:translateY(-50%)}
.room-span-canvas{position:relative;background:repeating-linear-gradient(to bottom,#fff 0,#fff 44px,#e4e8ed 45px,#fff 46px)}
.room-span-divider{position:absolute;top:0;bottom:0;width:1px;background:#d7dde5}
.room-span-block{position:absolute;z-index:1;box-sizing:border-box;overflow:hidden;background:#d9e9fc;border:1px solid #5c94c4;border-left:3px solid #4e89b9;border-radius:5px;padding:5px;font-size:11px}
.room-span-block.proposed{z-index:2;background:#ffe49a;border:2px solid #c89008}
.room-span-block b,.room-span-block small{display:block}
.request-status.booking_updated,.request-status.booking_cancelled{background:#e7edf3;color:#34516a}
@media(max-width:640px){.booking-comparison{grid-template-columns:1fr}.timed-calendar.daily{min-width:0}.monthnav{justify-content:center}}

/* v19: full-day calendars and room-aware overlapping bookings. */
.timed-calendar-host{max-height:72vh;overflow:auto;scrollbar-gutter:stable}
.timed-day-heading{position:sticky;top:0;z-index:8}
.room-span-viewport{max-height:58vh;overflow:auto;scrollbar-gutter:stable}
.room-span-head{position:sticky;top:0;z-index:10}
.room-span-block{display:block;text-align:left;color:#173852;cursor:pointer;line-height:1.2}
.room-span-block:hover,.room-span-block:focus-visible{z-index:4;outline:2px solid #224f83;outline-offset:-2px}
.room-span-block small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* v21: Northway What's On colours; readable booking-name-only overlaps. */
.chip.category-event,.timed-event.category-event,.room-span-block.category-event{
 background:var(--event-bg)!important;color:var(--event-ink)!important;
 border-color:rgba(0,0,0,.28)!important;
 border-left-color:rgba(0,0,0,.42)!important;
}
.room-span-block.category-event{padding:5px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.room-span-block.category-event b,.timed-event.category-event b{color:inherit!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:1.25}
.room-span-block.category-event:hover,.room-span-block.category-event:focus-visible{z-index:100!important;outline:3px solid #111;outline-offset:-2px}
.room-span-block.proposed.category-event{outline:2px dashed #181818;outline-offset:-3px}

/* Keep a whole-building label visible in the uncovered Committee Room. */
.room-span-block.whole-area-event b{text-align:right;padding-right:6px}

/* Membership application stays isolated from calendar styles inside its iframe. */

.membership-access-line{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:10px 0;padding:12px;border:1px solid #333;border-radius:10px;}
.membership-access-line select{min-width:150px;max-width:210px;}
@media(max-width:600px){.membership-access-line{flex-direction:column;align-items:stretch}.membership-access-line select{max-width:100%}}

/* Calendar colour key, collapsed by default on desktop and mobile. */
.category-legend{margin:10px 0 16px;padding:8px 12px;border:1px solid #555;border-radius:10px;}
.category-legend summary{cursor:pointer;font-weight:600;}
.category-legend-grid{display:flex;flex-wrap:wrap;gap:10px 16px;margin-top:12px;}
.category-legend-item{display:inline-flex;align-items:center;gap:7px;font-size:13px;}
.category-legend-item i{width:13px;height:13px;border-radius:3px;display:inline-block;border:1px solid #aaa;}


/* Northway unified dark cards, v22.8. Calendar grids and editable fields remain light. */
:root{--nw-card-bg:#090909;--nw-card-border:#78aedd;--nw-card-accent:#ffcc00;}
body .panel,body .tile{
  background:var(--nw-card-bg);color:#fff;border:1px solid var(--nw-card-border);
  border-top:3px solid var(--nw-card-accent);box-shadow:0 4px 15px #00000012;
}
body .panel :is(h1,h2,h3,h4),body .tile :is(b,strong){color:#fff;}
body .panel :is(.muted,small),body .tile small{color:#d4e1ed;}
body .panel .entry{border-bottom-color:#353c43;}
body .panel .entry:last-child{border-bottom:0;}
body .panel .membership-access-line{border-color:#626e78;}
body .panel :is(input,select,textarea),body .panel .booking-pick{background:#fff;color:#171b20;}
body .tile:not(.future):hover{border-color:var(--nw-card-accent);background:#171717;}
/* Keep nested status/notice panels and coloured booking markers readable. */
body .panel :is(.note,.helper-text,.conflict-result,.request-conflict,.request-status,.tag){color:#1b2630;}
body .panel .request-status.rejected,body .panel .request-conflict.critical{color:#802016;}
body .panel .request-status.approved{color:#20652b;}
body .panel .request-status.needs_info{color:#735200;}
body .panel .request-status.booking_updated,body .panel .request-status.booking_cancelled{color:#34516a;}
body .panel .request-conflict.caution{color:#7b5200;}
body .panel :is(.weekday,.timed-hours,.room-span-hours,.request-hour-labels){color:#3c4653;}
body .panel .calendar-grid .day{color:#17212b;}
/* Form labels, links and explanatory text remain visible in dark cards. */
body .panel a{color:#95cfff;}
body .panel button.secondary{background:#78aedd;color:#101010;}
body .panel button.danger{background:#aa3240;color:#fff;}
@media(max-width:700px){body .panel{padding:14px;}body .tile{padding:18px;}}

/* v22.9: grouped user permissions, consistent with portal dark cards */
.user-view-switch{display:inline-flex;gap:5px;flex-wrap:wrap;margin:14px 0;padding:5px;background:#1b1b1b;border:1px solid #78aedd;border-radius:10px}
.user-view-switch button{background:transparent;color:#fff;border:1px solid #666;font-size:.9rem}
.user-view-switch button.current{background:#ffcc00;color:#000;border-color:#ffcc00}
.users-access-layout{padding:15px 20px}
.users-access-layout .user-group{margin:0 0 16px;border-top:0}
.users-access-layout .user-group>summary{padding:12px 4px;color:inherit}
.user-access-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,370px),1fr));gap:12px;margin:10px 0 20px}
.user-access-card,.user-permission-section{background:#111;color:#fff;border:1px solid #78aedd;border-top:3px solid #ffcc00;border-radius:11px;padding:15px}
.user-access-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.user-access-card-head strong{display:block;font-size:1rem}
.user-access-card-head small,.user-permission-row small{display:block;color:#d4dce3;margin-top:4px;overflow-wrap:anywhere}
.user-status{color:#ffcc00;font-size:.78rem;white-space:nowrap}
.user-access-fields{display:grid;gap:9px;margin:14px 0}
.user-access-field{display:grid;grid-template-columns:minmax(85px,1fr) minmax(145px,1.5fr);align-items:center;gap:10px;margin:0!important;font-weight:600}
.user-access-field span{color:#fff}
.user-access-field select{width:100%;max-width:none;margin:0;color:#111;background:#fff;padding:9px;border-radius:7px}
.user-access-field select:disabled{opacity:.7}
.user-access-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding-top:9px;border-top:1px solid #444}
.user-access-actions:empty{display:none}
.user-access-actions button{font-size:.83rem;padding:8px 11px}
.user-permission-section{margin:10px 0 16px}
.user-permission-section h2{color:#ffcc00;margin:0 0 12px}
.user-permission-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 0;border-top:1px solid #333}
.user-permission-row>div{flex:1;min-width:0}
.user-permission-row .user-access-field{min-width:min(100%,330px);grid-template-columns:1fr}
.user-permission-row .user-access-field span{display:none}
@media(max-width:650px){.users-access-layout{padding:10px}.user-access-grid{grid-template-columns:1fr}.user-permission-row{align-items:stretch;flex-direction:column}.user-permission-row .user-access-field{width:100%}.user-access-field{grid-template-columns:1fr}.user-access-card-head{flex-wrap:wrap}}

/* v22.11: legible headings on the dark calendar panel and invisible month padding. */
body #calendar .calendar-grid > .weekday {color:#fff;font:700 .9rem/1.35 system-ui,Arial,sans-serif;letter-spacing:.012em;}
body #calendar .calendar-grid > .day.empty {visibility:hidden;background:transparent;border:0;box-shadow:none;pointer-events:none;}
@media(max-width:700px){body #calendar .calendar-grid > .weekday{font-size:.75rem;}}

/* v22.13: consistent hour-boundary grid and visible current day. */
.room-span-canvas {
 background:repeating-linear-gradient(to bottom,#ccd5df 0px,#ccd5df 1px,#ffffff 1px,#ffffff 45px);
}
.room-span-hours {
 background:repeating-linear-gradient(to bottom,#ccd5df 0px,#ccd5df 1px,#f8fafc 1px,#f8fafc 45px);
}
.room-span-hours span {color:#334155;font-weight:600;transform:translateY(-50%);}
.timed-hours span {color:#334155;font-weight:600;}
#calendarToday {background:#78aedd;color:#101820;border:1px solid #78aedd;font-size:.95rem;padding:9px 14px;}
#calendarToday:hover {filter:brightness(1.08);}
body .panel .calendar-grid .day.today {
 outline:3px solid #ffcc00;outline-offset:-3px;background:#fff6d1;box-shadow:inset 0 0 0 1px #b78e00;
}
body .panel .calendar-grid .day.today>strong {background:#ffcc00;color:#000;display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;border-radius:5px;padding:2px 5px;}
.timed-day-heading.is-today{background:#fff0ac;color:#111;border-bottom:3px solid #d1a500;font-weight:800;}
@media(max-width:700px){#calendarToday{padding:8px 12px;}}
