/* Optional personal Night theme; original design is unchanged when deselected. */
html[data-workspace-theme="night"] { color-scheme:dark; background:#0b1220; --ui-page-bg:#0b1220; --ui-panel:#131e30; --ui-soft:#1b2940; --ui-border:#314058; --ui-muted:#b1bfd3; --ui-ink:#edf2ff; --ui-accent:#a5adff; --ui-accent-soft:#293257; }
html[data-workspace-theme="night"] body {
  --primary:#a5adff; --primary-dark:#c4c9ff; --primary-light:#293257; --accent:#8b9cff;
  --bg:#0b1220; --bg-primary:#131e30; --bg-secondary:#17243a; --bg-tertiary:#1b2940; --bg-card:#131e30; --bg-muted:#1b2940;
  --text-primary:#edf2ff; --text-secondary:#b1bfd3; --text-muted:#a0b0c8; --text-tertiary:#a0b0c8;
  --border:#314058; --border-color:#314058; --border-light:#29374e; --glass-bg:#131e30; --glass-border:#314058;
  --danger:#ffaaa7; --success:#82e3bb; --warning:#ffd18a;
  background:radial-gradient(ellipse at 65% 0%,#1a2443 0%,#0b1220 65%) fixed!important;
  color:#edf2ff!important;
}
html[data-workspace-theme="night"] body :is(h1,h2,h3,h4,h5,h6) { color:#edf2ff!important; }
html[data-workspace-theme="night"] body :is(.sidebar,.sidebar-header,.sidebar-footer) { background:#0e1728!important; border-color:#2c3950!important; }
html[data-workspace-theme="night"] body :is(.sidebar-link,.sidebar-fav-link,.sidebar-school-name,.sidebar-user-name) { color:#d3def1!important; }
html[data-workspace-theme="night"] body .sidebar-category { color:#a8b8d2!important; }
html[data-workspace-theme="night"] body .sidebar-link:is(.active,:hover) { background:#28345a!important; color:#e4e7ff!important; }
html[data-workspace-theme="night"] body .sidebar-link.active { box-shadow:inset 3px 0 #a5adff!important; }
html[data-workspace-theme="night"] body .sidebar-link .sidebar-link-icon { filter:none; opacity:1; }
html[data-workspace-theme="night"] body :is(.pinboard-sidebar,.pinboard-header,.sidebar-tab-panel,.pinboard-content,.pinboard-article,.todo-item,.pinboard-edit-form,.notification-dropdown,.sidebar-action-menu,.credits-modal,.modal-content,.modal-body,.pc-dialog,.booking-editor,.workspace-preferences,.qe-modal,.qe-body,.qe-footer,.config-section,.dashboard-widget,.card,.home-pinboard-card,.home-focus-card,.home-todo,.home-demo-card,.home-module-card,.agenda-day,.agenda-slot,.slot-card,.room-browser-card,.booking-room-card,.pc-home-dashboard,.pc-main-view,.week-overview,.calendar-container,.home-hero-copy) {
  background:#131e30!important; color:#edf2ff!important; border-color:#314058!important;
}
html[data-workspace-theme="night"] body :is(.pinboard-article,.home-focus-card,.home-module-card,.config-section,.dashboard-widget,.pc-home-dashboard,.week-overview) { border-radius:14px!important; box-shadow:0 8px 24px #03091422!important; }
html[data-workspace-theme="night"] body :is(.pinboard-article-title,.pinboard-article-content,.sidebar-tab-btn,.home-focus-card strong,.home-module-card strong,.slot-card-title,.slot-card-name,.booking-workspace-title,.pc-time-day,.week-title,.room-tab,.category-tab,.calendar-day,.sidebar-user-role) { color:#e0e9f8!important; }
html[data-workspace-theme="night"] body :is(.home-hero,.room-hero-banner) { background:linear-gradient(125deg,#252b54,#17283a)!important; border-color:#3d4871!important; border-radius:20px!important; }
html[data-workspace-theme="night"] body .home-hero.has-user-background { background-image:linear-gradient(100deg,#080f1cb3,#080f1c66),var(--home-hero-image)!important; background-size:cover!important; }
html[data-workspace-theme="night"] body .home-hero:not(.has-user-background) .home-hero-copy { background:transparent!important; }
html[data-workspace-theme="night"] body :is(.home-module-icon,.home-pin-item > span) { background:#293257!important; border-radius:10px; }
html[data-workspace-theme="night"] body :is(.home-focus-card small,.home-module-card small,.home-hero p,.home-pin-item small,.sidebar-version,.booking-workspace-subtitle,.booking-workspace-subtitle strong,.pinboard-article-meta,.pc-dialog-hint,.form-hint) { color:#b1bfd3!important; }
html[data-workspace-theme="night"] body :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { background:#0e1829!important; color:#edf2ff!important; border-color:#43536e!important; border-radius:9px!important; }
html[data-workspace-theme="night"] body ::placeholder { color:#98a9c2!important; opacity:1; }
html[data-workspace-theme="night"] body :is(.btn,button,.pc-btn,.week-nav-arrow,.plan-view-switch a,.room-tab,.category-tab,.booking-editor-person,.workspace-design-button) { background:#1d2b42; color:#dce6f8; border-color:#42516a; }
html[data-workspace-theme="night"] body :is(.btn-secondary,.btn-outline-secondary,.btn-back,.aqb-item,.pc-btn,.plan-view-switch,.booking-editor-person,.booking-editor footer) { background:#1d2b42!important; color:#dce6f8!important; border-color:#42516a!important; }
html[data-workspace-theme="night"] body :is(.btn-primary,.config-btn-save,.btn-next,.btn-sub,.pc-btn-primary) { background:#a5adff!important; color:#10172d!important; border-color:#a5adff!important; font-weight:650!important; }
html[data-workspace-theme="night"] body :is(.btn-danger,.btn-reject,.btn-unblock) { background:#42272e!important; color:#ffb5b0!important; border-color:#75404b!important; }
html[data-workspace-theme="night"] body :is(.btn-success,.btn-approve) { background:#163d35!important; color:#a0f0d1!important; border-color:#34675a!important; }
html[data-workspace-theme="night"] body :is(.sidebar-tab-btn.active,.plan-view-switch a.active,.room-tab.active,.category-tab.active,.pc-view-switch button[aria-pressed="true"]) { background:#343d6b!important; color:#e8ebff!important; }
html[data-workspace-theme="night"] body :is(table:not(.week-table) th,.week-table th,.week-table .period-row-label,.pc-time-head,.pc-all-day,.pc-time-labels,.pc-calendar-list) { background:#17243a!important; color:#c6d2e7!important; border-color:#314058!important; }
html[data-workspace-theme="night"] body :is(table td,.week-table .day-name) { color:#dce6f8!important; border-color:#314058!important; }
html[data-workspace-theme="night"] body #bookingDashboardPage .week-table :is(th,.period-row-label) { background:#17243a!important; color:#c6d2e7!important; }
html[data-workspace-theme="night"] body #bookingDashboardPage .week-table .day-name { color:#edf2ff!important; }
html[data-workspace-theme="night"] body #bookingDashboardPage .slot-status-pill.status-available { color:#8eebcf!important; }
html[data-workspace-theme="night"] body #bookingDashboardPage .slot-status-pill.status-booked { color:#b4cbff!important; }
html[data-workspace-theme="night"] body #bookingDashboardPage .slot-status-pill.status-full { color:#ffb7af!important; }
html[data-workspace-theme="night"] body #bookingDashboardPage :is(.agenda-slot-time,.agenda-period,.agenda-time,.agenda-slot-period,.period-label) { background:#17243a!important; color:#c6d2e7!important; }
html[data-workspace-theme="night"] body :is(.week-range,.week-date-range,.week-dates) { color:#d2caff!important; background:#322d4b!important; }
html[data-workspace-theme="night"] body #bookingDashboardPage .day-date { color:#b1bfd3!important; }
html[data-workspace-theme="night"] body .booking-legend-dot { border:1px solid #9baac3; }
html[data-workspace-theme="night"] body .booking-legend-dot.is-free { background:#8eebcf; }
html[data-workspace-theme="night"] body .booking-legend-dot.is-booked { background:#b4cbff; }
html[data-workspace-theme="night"] body .booking-legend-dot.is-full { background:#ffb7af; }
html[data-workspace-theme="night"] body .booking-legend-dot.is-exclusive { background:#d2b5ff; }
html[data-workspace-theme="night"] body .booking-legend-dot.is-blocked { background:#e2c9a6; }
html[data-workspace-theme="night"] body table tr { background:transparent; }
html[data-workspace-theme="night"] body #bookingDashboardPage { --booking-status-free:#132e2d; --booking-status-booked:#20304b; --booking-status-full:#422c32; --booking-status-exclusive:#332b4c; --booking-status-blocked:#35332e; }
html[data-workspace-theme="night"] body #bookingDashboardPage :is(.slot-card,.agenda-slot) { color:#e6eefb!important; }
html[data-workspace-theme="night"] body .slot-card :is(.slot-card-name,.slot-student-name,.slot-teacher-name) { color:#e6eefb!important; }
html[data-workspace-theme="night"] body .pc-time-column { background-color:#101a2b; }
html[data-workspace-theme="night"] body :is(.pc-event-context,.pc-event-tooltip,.slot-context-menu,.booking-gear-dropdown,.agenda-gear-dropdown) { background:#1b2940!important; color:#edf2ff!important; border-color:#42516a!important; box-shadow:0 16px 40px #0008!important; }
html[data-workspace-theme="night"] body :is(.mobile-topbar,.mobile-bottom-nav,.mobile-pinboard-button,.credits-button,.notification-bell) { background:#131e30!important; color:#dce6f8!important; border-color:#314058!important; }
html[data-workspace-theme="night"] body :is(.mobile-topbar-name,.mobile-nav-item,.mobile-topbar-btn) { color:#e0e9ff!important; }
html[data-workspace-theme="night"] body :is(button,a,input,select,textarea,summary):focus-visible { outline:2px solid #c4c9ff!important; outline-offset:3px; }
@media(max-width:1024px) {
  html[data-workspace-theme="night"] body .mobile-topbar { border-bottom:1px solid #314058; box-shadow:0 8px 25px #0003!important; }
  html[data-workspace-theme="night"] body .mobile-pinboard-button { border-radius:16px; width:50px; height:50px; background:#a5adff!important; color:#10172d!important; }
  html[data-workspace-theme="night"] body :is(.btn,.workspace-design-button,.sidebar-link,.pc-btn,.sidebar-tab-btn) { min-height:44px!important; }
  html[data-workspace-theme="night"] body :is(input,select,textarea) { font-size:16px!important; }
  html[data-workspace-theme="night"] body .home-hero { min-height:150px; padding:22px!important; }
  html[data-workspace-theme="night"] body :is(.booking-editor,.pc-dialog,.workspace-preferences) { border-radius:20px; }
}
@media(prefers-reduced-motion:reduce) { html[data-workspace-theme="night"] * { scroll-behavior:auto!important; } }
@media print { html[data-workspace-theme="night"] body { background:#fff!important; color:#000!important; } }
