:root{--bg:#f6f7fb;--panel:#fff;--panel-alt:#f5f6fc;--ink:#20283c;--muted:#687287;--line:#e5e8f1;--accent:#303c88;--accent-dark:#25316f;--accent-soft:#edf0fc;--sidebar:#fff;--shadow:0 3px 12px #273a7204;--warning-soft:#fff7d8;--paid-soft:#e4f5ff}
body.trax-booking{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:13px;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}:focus-visible{outline:3px solid #008dce;outline-offset:3px}.skip-link{position:fixed;top:-100px;left:12px;background:white;padding:12px;z-index:100}.skip-link:focus{top:12px}.app-shell{display:block;padding-left:244px}.sidebar{position:fixed;inset:0 auto 0 0;width:244px;padding:28px 18px 20px;gap:0;overflow-y:auto;background:#fff;color:var(--ink);border-right:1px solid var(--line);z-index:20}.brand{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:0 12px 28px}.trax-logo{width:154px;height:58px;object-fit:cover;object-position:center}.brand-caption{font-size:12px;color:var(--muted)}.nav-caption{font-size:10px;letter-spacing:.13em;font-weight:700;color:#858d9e;margin:6px 12px 14px}.nav-list{display:flex;flex-direction:column;gap:5px}.nav-item{color:#647085;min-height:43px;padding:9px 12px;gap:11px;font-size:12px;border:0;border-radius:9px;position:relative}.nav-item>span{margin-right:auto}.nav-icon{width:19px;height:19px;flex-shrink:0}.nav-item strong{min-width:21px;background:#f0f2f8;color:#69738a;border-radius:6px;padding:2px 6px;font-size:10px;font-weight:600}.nav-item:hover{background:#f4f5fa;border:0;color:#303c88}.nav-item.active{background:#303c88;border:0;color:#fff}.nav-item.active:before{content:"";position:absolute;left:0;width:3px;height:21px;background:#ffdb00;border-radius:3px}.nav-item.active strong{background:#ffffff25;color:#fff}.sidebar-panel{margin-top:28px;background:#fafbfe;border:1px solid var(--line);padding:16px;border-radius:12px;gap:13px;color:var(--ink);font-size:11px}.panel-label{font-size:9px;color:#7b8498;letter-spacing:.1em;font-weight:700}.metric-row.muted{font-size:11px;color:#7b8498}.meter{background:#e9ecf5;height:6px}.meter span{background:#008dce}.sidebar-footer{display:grid;gap:5px;color:#8b93a4;font-size:10px;padding:24px 12px 0}.main-content{padding:0 30px 30px;min-width:0}.topbar{background:#fff;border-bottom:1px solid var(--line);margin:0 -30px 28px;padding:24px 30px;min-height:96px;gap:16px}.topbar h2{font-size:24px;line-height:1.3;letter-spacing:-.025em}.eyebrow{font-size:9px;letter-spacing:.14em;font-weight:700}.topbar .eyebrow{margin-bottom:7px;color:#8790a2}.topbar-actions{gap:8px;flex-direction:row}.primary-action,.secondary-button,.danger-button,.whatsapp-button{border-radius:9px;min-height:39px;font-size:12px;font-weight:600;padding:0 13px}.primary-action{background:#303c88;color:white}.primary-action:hover{background:#25316f}.secondary-button{color:#5e6980;border-color:var(--line)}.secondary-button:hover{background:#f6f7fb;color:#303c88}.topbar-actions #newBookingButton{background:#ffdb00;color:#293468;border-color:#ffdb00}.topbar-actions #newBookingButton:hover{background:#f1cd00}.topbar-actions #newSpaceButton{border-color:transparent;background:#f2f4fa}.save-status:empty{display:none}.save-status{min-width:0;font-size:10px}.notification-button span{font-size:9px;min-width:17px;height:17px;background:#edf0fc;color:#303c88}.booking-menu{display:none}.toolbar{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:none;padding:17px 20px;margin-bottom:25px;gap:14px}.toolbar label{font-size:10px;font-weight:600;color:#748096;gap:8px}.toolbar input,.toolbar select{min-height:39px;border-radius:7px;background:#fafbfe;font-weight:400;font-size:12px;color:#3f4b64;border-color:var(--line)}label{color:#667287;font-size:12px}input,select,textarea{border-color:var(--line);border-radius:8px;min-height:38px;background:#fff;color:var(--ink)}.schedule-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.schedule-heading h3{font-size:22px;letter-spacing:-.025em;margin:7px 0}.schedule-heading p{font-size:12px;color:#7b8599;margin:0}.schedule-heading .eyebrow{font-size:9px;color:#8790a2}.day-controls{display:flex;gap:6px;flex-shrink:0}.day-controls button{min-height:34px;font-size:11px}.schedule-legend{display:flex;align-items:center;gap:17px;flex-wrap:wrap;color:#748096;font-size:10px;margin:0 0 12px}.schedule-legend span{display:flex;align-items:center;gap:6px}.schedule-legend i{width:7px;height:7px;border-radius:50%;background:#303c88}.schedule-legend .legend-padel{background:#008dce}.schedule-legend .legend-event{background:#e2b800}.schedule-legend .legend-cancelled{background:#e49c9b}.schedule-legend small{margin-left:auto;font-size:10px;color:#8b94a6}.dashboard-scroll{box-shadow:none;border-radius:12px;max-height:calc(100vh - 360px);min-height:270px;border-color:var(--line)}.dashboard-header,.dashboard-time,.dashboard-corner{background:#f8f9fd;border-color:#e2e6ef}.dashboard-header{font-size:11px;line-height:1.3;padding:6px;font-weight:600}.dashboard-header strong{font-weight:650;color:#354162}.dashboard-header span{font-size:9px;color:#8b93a6}.dashboard-time{font-size:10px;color:#65718a;font-weight:500}.dashboard-time.half-hour{color:#9ba4b5}.dashboard-cell{border-color:#edf0f6}.selectable-cell:hover,.selected-cell{background:#e7effc;outline-color:#008dce}.dashboard-booking{border-radius:5px;border:1px solid #cdd3eb;color:#303c88;font-size:9px;font-weight:500;padding:4px;line-height:1.35}.dashboard-booking.tone-court{background:#e9edfc;color:#303c88}.dashboard-booking.tone-padel{background:#e2f4fc;color:#086d99;border-color:#b6e0f1}.dashboard-booking.tone-birthday{background:#fff7cc;color:#716022;border-color:#f0df98}.dashboard-booking.tone-cancelled{background:#fff0ef;color:#a45d61;border-color:#f1d5d2}.dashboard-booking.dashboard-blocked{background:repeating-linear-gradient(135deg,#f3f5fa,#f3f5fa 4px,#e8ecf5 4px,#e8ecf5 5px);border-color:#d7ddea;color:#8992a7}.table-wrap,.admin-panel,.report-panel,.resource-card,.event-card,.website-request-card{border-radius:12px;box-shadow:none;border-color:var(--line)}table{font-size:12px}th{font-size:9px;background:#f9fafe;color:#8490a5;padding:14px 16px;font-weight:650;border-color:var(--line)}td{padding:14px 16px;border-color:#eef0f6}td p{font-size:11px}.status{font-size:10px;min-height:24px;font-weight:600;padding:3px 9px}.report-metrics article,.event-metrics article{border-radius:12px;box-shadow:none;border-color:var(--line);padding:22px}.report-metrics strong,.event-metrics strong{color:#303c88;font-size:27px}.report-metrics span,.event-metrics span{font-size:9px;color:#7b8599}.report-grid,.report-table-grid,.accounting-layout{gap:18px}.report-bar-track{background:#edf0f8}.report-bar-track span{background:#008dce}.empty-request-state,.event-empty{border:1px dashed #d8dfed;background:#fff;border-radius:12px;color:#8490a5;padding:35px}.crm-toolbar,.report-toolbar{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px}.notification-panel{border-radius:12px;box-shadow:none;border-color:var(--line)}dialog{border-radius:16px;border:1px solid var(--line);box-shadow:0 30px 90px #273a7220;max-width:calc(100vw - 28px);max-height:calc(100vh - 40px)}dialog::backdrop{background:#17214477}.booking-form{padding:28px}.modal-header{padding-bottom:20px;border-bottom:1px solid var(--line);margin-bottom:23px}.modal-header h3{font-size:24px;color:#303c88}.modal-header .eyebrow{font-size:9px}.modal-actions{padding-top:20px;border-top:1px solid var(--line)}.sso-redirect{background:#f6f7fb}.sso-card{border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 45px #303c880a;padding:35px;gap:20px}.sso-card .brand{padding:0 0 10px}.sso-card .eyebrow{color:#8b93a4}.sso-card h2{color:#303c88}.sso-card>p{font-size:13px;color:#7b8599}.booking-backdrop{position:fixed;inset:0;border:0;background:#17214466;z-index:19;padding:0;width:100%;height:100%}
@media(max-width:1180px){.app-shell{padding-left:218px}.sidebar{width:218px;padding-left:14px;padding-right:14px}.main-content{padding:0 22px 22px}.topbar{margin:0 -22px 24px;padding:22px}.topbar-actions{gap:6px}.topbar-actions .secondary-button,.topbar-actions .primary-action{font-size:11px;padding:0 10px}}
@media(max-width:900px){.app-shell{padding-left:0}.sidebar{position:fixed;width:244px;transform:translateX(-100%);transition:transform .18s;padding:28px 18px 20px}.booking-nav-open .sidebar{transform:none}.booking-nav-open{overflow:hidden}.booking-menu{display:inline-flex;min-width:39px;padding:0}.topbar{flex-direction:row;align-items:center;flex-wrap:wrap;min-height:90px}.topbar>div:first-of-type{margin-right:auto}.topbar-actions{width:100%;justify-content:flex-end;align-items:center;flex-direction:row}.nav-list{display:flex;flex-direction:column;overflow:visible}.nav-item{min-width:0;flex:0 0 auto}.sidebar>.brand{align-items:flex-start;justify-content:flex-start}.sidebar-panel{display:grid}.toolbar{grid-template-columns:repeat(2,minmax(0,1fr));padding:16px}.schedule-legend small{display:none}.dashboard-scroll{max-height:65vh}.schedule-heading h3{font-size:20px}.accounting-layout,.admin-grid,.report-grid,.report-table-grid{grid-template-columns:1fr}.report-metrics,.event-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-toolbar{grid-template-columns:1fr}.sidebar-footer{display:grid}}
@media(max-width:620px){.main-content{padding:0 16px 20px}.topbar{margin:0 -16px 20px;padding:18px 16px;gap:10px}.topbar h2{font-size:22px}.topbar .eyebrow{font-size:8px}.topbar-actions{gap:5px;justify-content:flex-start;flex-direction:row}.topbar-actions #logoutButton{margin-left:auto}.topbar-actions .primary-action,.topbar-actions .secondary-button{font-size:10px;min-height:34px;padding:0 10px}.notification-button{font-size:10px}.toolbar{gap:12px;border-radius:10px;margin-bottom:22px}.toolbar input,.toolbar select{width:100%;min-width:0;font-size:11px}.schedule-heading{flex-direction:column;align-items:flex-start;gap:13px}.schedule-heading p{font-size:11px;line-height:1.6}.schedule-legend{gap:10px;font-size:9px}.day-controls{align-self:flex-end;margin-top:-5px}.dashboard-scroll{max-height:65vh;min-height:320px}.booking-form{padding:20px}.modal-header{flex-direction:row;align-items:center}.modal-actions{flex-wrap:wrap}.form-grid{grid-template-columns:1fr}.two-col{grid-template-columns:1fr}.customer-profile-summary,.customer-profile-insights{grid-template-columns:repeat(2,minmax(0,1fr))}.sso-redirect{place-items:center}.sso-card{margin:0}.resource-card-header,.event-actions{flex-direction:row;flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}

.dashboard-booking{font-size:10px;line-height:1.4}.dashboard-booking strong{font-size:10px}.dashboard-time{font-size:11px}.dashboard-header{font-size:12px}.dashboard-header span{font-size:10px}
@media(max-width:620px){.topbar .booking-menu{width:39px;flex:0 0 39px}.topbar-actions>.primary-action,.topbar-actions>.secondary-button{width:auto;flex:0 0 auto}.day-controls .secondary-button{width:auto}.dashboard-scroll,.table-wrap{margin-inline:0;border-radius:10px}.modal-actions>.primary-action,.modal-actions>.secondary-button,.modal-actions>.danger-button,.modal-actions>.whatsapp-button{width:auto}.modal-actions{gap:7px;justify-content:flex-end}.resource-card-header>.primary-action,.resource-card-header>.secondary-button,.event-actions>.primary-action,.event-actions>.secondary-button{width:auto}}

/* Booking status colours take precedence over space/category colours. */
.dashboard-booking[class*="booking-status-"]{background:#f1f3f7;color:#526079;border-color:#d6dce6;border-left-width:4px}
.dashboard-booking.booking-status-confirmed{background:#e3f4e9;color:#17633a;border-color:#94cfac;border-left-color:#259257}
.dashboard-booking.booking-status-pending{background:#fff4cf;color:#805d06;border-color:#edcf78;border-left-color:#d9a018}
.dashboard-booking.booking-status-paid{background:#e4efff;color:#235a9a;border-color:#9cc0ee;border-left-color:#357ec3}
.dashboard-booking.booking-status-cancelled,.dashboard-booking.booking-status-canceled{background:#fde7e6;color:#a02e32;border-color:#eaa3a5;border-left-color:#d4474c}
.schedule-legend .legend-confirmed{background:#259257}.schedule-legend .legend-pending{background:#d9a018}.schedule-legend .legend-paid{background:#357ec3}.schedule-legend .legend-cancelled{background:#d4474c}.schedule-legend .legend-blocked{background:#929cad}
.status.confirmed{background:#e3f4e9;color:#17633a}.status.pending{background:#fff4cf;color:#805d06}.status.paid{background:#e4efff;color:#235a9a}.status.cancelled,.status.canceled{background:#fde7e6;color:#a02e32}

/* Compact schedule: keep filters and navigation immediately below the page title. */
body:has(#scheduleView.active) .topbar{min-height:66px;padding-block:12px;margin-bottom:10px}
body:has(#scheduleView.active) .topbar .eyebrow{display:none}
body:has(#scheduleView.active) .toolbar{grid-template-columns:135px 170px 115px minmax(120px,1fr) auto;padding:8px 12px;gap:10px;margin-bottom:8px}
body:has(#scheduleView.active) .toolbar label{gap:3px;font-size:9px}
body:has(#scheduleView.active) .toolbar input,body:has(#scheduleView.active) .toolbar select{min-height:32px;height:32px}
.toolbar>.day-controls{display:none}
body:has(#scheduleView.active) .toolbar>.day-controls{display:flex;align-self:end;margin:0}
.toolbar>.day-controls button{min-height:32px;padding-inline:10px}
.schedule-heading{display:none}
.schedule-legend{margin-bottom:7px;gap:14px;min-height:18px}
body:has(#scheduleView.active) .dashboard-scroll{max-height:calc(100dvh - 190px);height:calc(100dvh - 190px);min-height:0}
@media(max-width:1100px){body:has(#scheduleView.active) .toolbar{grid-template-columns:125px 145px 100px minmax(100px,1fr) auto}}
@media(max-width:900px){body:has(#scheduleView.active) .topbar{min-height:0;padding-block:10px;gap:8px}body:has(#scheduleView.active) .toolbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px}body:has(#scheduleView.active) .toolbar>.day-controls{grid-column:1/-1;justify-content:flex-end}body:has(#scheduleView.active) .dashboard-scroll{height:calc(100dvh - 355px);max-height:calc(100dvh - 355px)}}

@media(max-width:620px){body:has(#scheduleView.active) .topbar-actions{gap:4px}body:has(#scheduleView.active) .topbar-actions>.secondary-button,body:has(#scheduleView.active) .topbar-actions>.primary-action{padding-inline:7px;font-size:9px}}

@media (min-width: 901px) {
  .topbar { flex-wrap: wrap; }
  .topbar > div:first-of-type { margin-right: auto; }
  .booking-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    padding: 0;
    flex: 0 0 36px;
  }
  .booking-sidebar-collapsed .app-shell { padding-left: 0; }
  .booking-sidebar-collapsed .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
  }
}

.dashboard-header { padding: 4px; }
.dashboard-header strong {
  font-size: 11px;
  line-height: 14px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.dashboard-header span { font-size: 9px; line-height: 12px; }
.dashboard-booking:not(.dashboard-blocked) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 1px;
  padding: 2px 3px;
  min-width: 0;
}
.dashboard-booking:not(.dashboard-blocked) strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11px;
  line-height: 14px;
  white-space: normal;
  overflow-wrap: anywhere;
  flex-shrink: 0;
  letter-spacing: 0;
}
.dashboard-booking:not(.dashboard-blocked) > span:first-of-type {
  font-size: 10px;
  line-height: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.dashboard-booking:not(.dashboard-blocked) > span:last-child {
  white-space: nowrap;
  min-height: 0;
}
.dashboard-booking.booking-short-label > span:last-child { display: none; }
.dashboard-booking.booking-half-slot { padding-block: 0; gap: 0; }
.dashboard-booking.booking-half-slot strong { -webkit-line-clamp: 1; line-height: 12px; }
