/* One inherited animated length keeps columns, shadows and panel anchors in step. */
@property --staging-navigation-width {
  syntax: "<length>";
  inherits: true;
  initial-value: 276px;
}
@property --staging-client-reveal {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

/* Staging experiment: portal-style navigation. No effect until the environment gate succeeds. */
.staging-sidebar-enabled {
  --staging-sidebar-width: 276px;
  /* Four 40px controls and three 25px gaps; edit sits beside the active card. */
  --staging-client-column-width: calc(300px + 2 * var(--sidebar-column-padding) + 1px);
  --staging-navigation-width: var(--staging-sidebar-width);
  --sidebar-column-padding: 25px;
  --navigation-column-padding:var(--sidebar-column-padding);
  --sidebar-content-top: 80px;
  --sidebar-button-padding: 15px;
  --staging-task-column-width: 300px;
  --staging-header-height: 75px;
  --staging-workspace-top-padding: 25px;
  --staging-divider-inset: 25px;
  --staging-sidebar-occupied-width: calc(var(--staging-navigation-width) + var(--staging-client-column-width) * var(--staging-client-reveal));
  --layout-left-padding: calc(var(--staging-sidebar-occupied-width) + 75px);
  --employee-rail-menu-left: 250px;
  --employee-rail-secondary-left: 275px;
  --sidebar-icon-size: 20px;
  --sidebar-icon-gap: 10px;
  --sidebar-row-height: var(--navigation-row-height);
  --sidebar-row-gap: var(--navigation-row-gap);
  --sidebar-secondary-font-size: 11px;
  --sidebar-row-pitch: calc(var(--sidebar-row-height) + var(--sidebar-row-gap));
  --sidebar-divider-color: #d9d9d9;
  --sidebar-brass-color: #e1c16e;
  --sidebar-static-icon-color: #203220;
  --sidebar-card-surface: #fff;
  --sidebar-column-surface: #f8f8f8;
  --staging-navigation-shadow: 5px 0 10px rgba(0, 0, 0, 0.2);
  --staging-editor-layer: 1300;
  /* The shared divider and its protruding control sit above rail drawers,
     without lifting client cards or overtaking blocking dialogs. */
  --navigation-divider-layer: calc(var(--staging-editor-layer) + 2);
  --staging-editor-slide-duration: 620ms;
  --layout-col-3-content-left: calc(var(--layout-left-padding) + var(--layout-col-2) + var(--layout-gap) + var(--column-card-inset));
}
.staging-sidebar-enabled:has(.task-rail-overview) {
  --layout-col-3-content-left: calc(var(--layout-left-padding) + var(--layout-col-1) + var(--layout-col-2) + var(--layout-gap) * 2 + var(--column-card-inset));
}
#stagingSidebar {
  position: absolute;
  top: var(--staging-header-height);
  bottom: 0;
  left: 0;
  width: var(--staging-sidebar-occupied-width);
  display: flex;
  z-index: auto;
}
#stagingSidebar .sidebar-column {
  flex: 0 0 var(--staging-sidebar-width);
  width: var(--staging-sidebar-width);
  min-width: 0;
  padding: 50px var(--sidebar-column-padding);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  border-right: 1px solid var(--sidebar-divider-color);
  background: var(--sidebar-column-surface);
}
/* Paint outside the scrolling sidebar columns without trapping their menu
   controls inside a new stacking context or intercepting adjacent clicks. */
#stagingSidebar::after {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: var(--staging-sidebar-width); box-shadow: var(--staging-navigation-shadow);
  pointer-events: none; z-index: 1;
}
#stagingSidebar::after {
  left: var(--staging-navigation-width); width:var(--staging-client-column-width); display: none;
  transform:translateX(calc((var(--staging-client-reveal) - 1) * var(--staging-client-column-width)));
  opacity:var(--staging-client-reveal);
  /* The client column casts onto the next column, never back over the navigation edge. */
  clip-path:inset(-20px -20px -20px 100%);
}
#stagingSidebar #stagingNavigationColumn {
  flex-basis: var(--staging-navigation-width); width: var(--staging-navigation-width);
  display: flex; flex-direction: column; padding-bottom: 25px; overflow: visible;
}
#stagingSidebar #stagingNavigationColumn > :is(.sidebar-navigation-header, #leftActionRail, #stagingNavigationActions) { flex-shrink: 0; }
#stagingSidebar .sidebar-footer-actions { display: flex; flex-shrink:0; align-items: center; justify-content: flex-start; padding-top: var(--sidebar-row-gap); }
.staging-sidebar-enabled.staging-navigation-collapsed {
  --staging-navigation-width: var(--navigation-collapsed-width);
}
#stagingSidebar .sidebar-navigation-header { display: flex; align-items: center; justify-content: space-between; height: 15px; margin-bottom: 15px; padding-left: var(--sidebar-button-padding); }
#stagingSidebar .sidebar-navigation-header .sidebar-heading { margin: 0; }
.staging-navigation-collapsed #stagingSidebar .sidebar-navigation-header { justify-content: flex-start; }
.staging-navigation-collapsed #stagingSidebar :is(.sidebar-navigation-header .sidebar-heading, .sidebar-rail-label, #notificationUnreadBadge) { display: none; }
#stagingSidebar:has(#stagingClientColumn:not([hidden]))::after { display: block; }
#stagingSidebar .sidebar-footer-menu {
  flex: 0 1 auto; min-height: 0; margin-top: auto; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin;
}
#stagingSidebar .sidebar-footer-menu.hidden + .sidebar-footer-actions { margin-top: auto; }
#stagingSidebar #stagingMenuColumn #employeeRailMenu {
  border-top: 0; padding-top: var(--sidebar-row-gap);
}
#stagingSidebar #employeeMenuAdminDivider { display: none; }
.staging-sidebar-enabled .staging-column-motion {
  clip-path: inset(-25px -25px -25px 0);
}
/* Keep the source column's existing shadow above the drawer throughout its
   opening and closing slide. Mobile drawers cover the sidebar instead. */
@media (min-width: 901px) {
  .app:has(.staging-client-editor-drawer, .staging-client-create-drawer) #stagingSidebar::after {
    transition: z-index 0s linear var(--staging-editor-slide-duration);
  }
  .app:has(.staging-client-editor-drawer.is-open, .staging-client-create-drawer.is-open) #stagingSidebar::after {
    z-index: calc(var(--staging-editor-layer) + 1); transition-delay: 0s;
  }
}
#stagingSidebar :is(#stagingNavigationColumn, #stagingClientColumn) { border-right-color: var(--sidebar-brass-color); }
/* The continuous SVG edge supplies the divider, rounded joins and button outline. */
#stagingSidebar #stagingNavigationColumn {
  border-right-color:transparent;
}
#stagingSidebar #stagingClientColumn { flex-basis:var(--staging-client-column-width); width:var(--staging-client-column-width); display: flex; flex-direction: column; overflow: hidden; }
.staging-client-transition #stagingClientColumn {
  transform:translateX(calc((var(--staging-client-reveal) - 1) * var(--staging-client-column-width)));
  /* Occlude the travelling column at Navigation's edge without trapping its menus. */
  clip-path:inset(0 0 0 calc((1 - var(--staging-client-reveal)) * var(--staging-client-column-width)));
}
/* Card-local elevation must never escape above menus covering this column. */
#stagingSidebar #stagingClientColumn { isolation:isolate; }
#stagingSidebar #stagingClientColumn > .sidebar-heading { flex: 0 0 auto; }
#stagingSidebar #stagingClientActions,
.staging-sidebar-enabled .reporting-section-actions {
  flex: 0 0 auto; display: grid; gap: var(--sidebar-row-gap);
  margin: 0; padding: 0;
}
#stagingSidebar #stagingClientActions {
  display:grid; grid-template-columns:minmax(0,1fr); gap:var(--sidebar-row-gap); padding-top:var(--sidebar-row-gap);
}
/* Reserve the 30px heading and fixed footer; only the client list yields space. */
#stagingSidebar #stagingClientAddMenu { flex-shrink:0; max-height:calc(100% - 30px - var(--crm-raised-control-face-height) - var(--sidebar-row-gap)); }
#stagingSidebar .sidebar-add-menu-row.is-selected { background:#fff; }
.staging-sidebar-enabled .reporting-section-actions::before,
.staging-sidebar-enabled .staging-completed-task-divider {
  content: ""; display: block; height: var(--sidebar-row-pitch);
  background: linear-gradient(to bottom, transparent calc(50% - .5px), var(--sidebar-divider-color) calc(50% - .5px), var(--sidebar-divider-color) calc(50% + .5px), transparent calc(50% + .5px));
}
.staging-sidebar-enabled .staging-completed-task-divider { flex: 0 0 auto; width: 100%; }
#stagingSidebar[hidden], #stagingSidebar .sidebar-column[hidden], #stagingSidebar #stagingClientColumn[hidden],
#stagingSidebar #stagingClientActions[hidden] { display: none; }
#stagingSidebar .sidebar-footer-actions[hidden] { display:none; }
.staging-sidebar-enabled .topbar { height: var(--staging-header-height); padding: 0 50px; justify-content: flex-start; }
.staging-sidebar-enabled .top-employee { display: none; }
.staging-sidebar-enabled #topStatus { position: static; width: auto; margin: 0; justify-content: flex-start; }
.staging-brand { display: flex; align-items: center; gap: 25px; color: #fff; }
.staging-brand .top-logo { flex: none; }
.staging-brand-name { font-size: 10px; letter-spacing: .15em; }
.staging-brand-name small { display: block; margin-top: 5px; font-size: 9px; color: #e1c16e; }
.staging-sidebar-enabled #mainLayout {
  height: calc(100% - var(--staging-header-height)); padding-top: var(--staging-workspace-top-padding);
}
#stagingSidebar #employeeRailSupportBtn { display: none; }
#stagingSidebar #clientList .sidebar-client-status { flex: 0 0 var(--sidebar-icon-size); width: var(--sidebar-icon-size); height: var(--sidebar-icon-size); background: none; border: 0; fill: none; }
#stagingSidebar .sidebar-client-status.status-green { color: var(--task-status-success); }
#stagingSidebar .sidebar-client-status.status-orange { color: #ffb400; }
#stagingSidebar .sidebar-client-status.status-red { color: #ff2000; }
#stagingSidebar .sidebar-client-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Reveal labels within the animated column instead of reflowing their text. */
#stagingSidebar .sidebar-rail-label {
  flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden;
}
#stagingSidebar .sidebar-heading {
  color: #636963; font-size: 10px; font-weight: 600; letter-spacing: .12em;
  margin: 0 0 15px; line-height: 1.5;
}
#stagingSidebar #clientList { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; gap: var(--sidebar-row-gap); padding: 0; flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
#stagingSidebar .client-list-entry { position:relative; margin: 0; padding: 0; width: 100%; min-width: 0; }
#stagingSidebar .sidebar-client {
  display:grid; grid-template-columns:minmax(0,1fr) var(--crm-raised-control-face-height);
  gap:10px; align-items:center; background:transparent;
}
#stagingSidebar .sidebar-link,
.staging-sidebar-enabled .reporting-section-actions .sidebar-link,
#stagingSidebar .left-action-rail-glyph,
#stagingSidebar .employee-rail-menu-action {
  display: flex; align-items: center; gap: var(--sidebar-icon-gap); text-align: left;
  position: relative; inset: auto; justify-content: flex-start; width: 100%; min-width: 0; min-height: var(--sidebar-row-height); height: var(--sidebar-row-height);
  margin: 0; padding: 10px var(--sidebar-button-padding); border: 0; border-radius: 3px; text-indent: 0;
  background: transparent; color: #000; font: 400 14px/20px Raleway, sans-serif;
  box-shadow: none; transform: none; animation: none; white-space: normal;
  overflow-wrap: anywhere; transition: color 180ms, background-color 180ms;
}
#stagingSidebar .sidebar-link:hover,
.staging-sidebar-enabled .reporting-section-actions .sidebar-link:hover,
#stagingSidebar .left-action-rail-glyph:hover,
#stagingSidebar .employee-rail-menu-action:hover { background: #e1c16e25; }
#stagingSidebar .sidebar-link.active,
#stagingSidebar .sidebar-link.is-selected,
#stagingSidebar .left-action-rail-glyph.toggle-active,
#stagingSidebar .employee-rail-menu-action.toggle-active { background: #203220; color: #e1c16e; }
#stagingSidebar :is(#employeeRailClientsViewBtn, #employeeRailTasksViewBtn, #employeeRailReportingViewBtn).toggle-active {
  background: #fff; color: #000;
}
#stagingSidebar #clientList .client-list-item { font-size:14px; box-shadow: none; transform: none; animation: none; }
#stagingSidebar button:focus-visible,
.staging-sidebar-enabled .reporting-section-actions button:focus-visible { outline: 2px solid #e1c16e; outline-offset: -2px; }
#stagingSidebar #leftActionRail { position: relative; inset: auto; z-index: 1100; display: grid; gap: 0; padding: 0; width: 100%; height: auto; background: none; border: 0; box-shadow: none; pointer-events: auto; }
#stagingSidebar #leftActionRail > .left-action-rail-glyph:not(:first-child) { margin-top: var(--sidebar-row-gap); }
#stagingSidebar .left-action-rail-icon,
#stagingSidebar .sidebar-action-icon,
.staging-sidebar-enabled .reporting-section-actions .sidebar-action-icon { flex: 0 0 var(--sidebar-icon-size); width: var(--sidebar-icon-size); height: var(--sidebar-icon-size); }
#stagingSidebar .sidebar-action-icon,
.staging-sidebar-enabled .reporting-section-actions .sidebar-action-icon { overflow: hidden; }
#stagingSidebar #stagingClientActions button:disabled { opacity: .45; cursor: default; background: transparent; }
#stagingSidebar .left-action-rail-glyph::before,
#stagingSidebar #employeeRailMenu .employee-rail-menu-action::before { content: none; }
/* Settings live inside Navigation, not in an additional column. */
#stagingSidebar #employeeRailMenu {
  display: grid !important; position: static !important; width: 100% !important;
  height: auto !important; min-height: 0; max-height: none !important;
  margin: 0; padding: 0; border: 0; box-shadow: none;
  background: transparent; color: #000; transform: none; overflow: visible; gap: var(--sidebar-row-gap);
}
#stagingSidebar .employee-rail-menu-divider { height: var(--sidebar-row-pitch); }
#stagingSidebar .employee-rail-menu-divider::before { background: var(--sidebar-divider-color); }
#stagingSidebar .employee-rail-menu-action.hidden { display: none; }
#stagingSidebar #employeeRailMenu .employee-rail-menu-action.toggle-active { background: #fff; }
.staging-sidebar-enabled #mainLayout:not(.task-rail-overview) { grid-template-columns: var(--layout-col-2) var(--layout-col-3); }
.staging-sidebar-enabled #mainLayout:not(.task-rail-overview):not(.reporting-rail-overview) {
  grid-template-columns: repeat(2, var(--staging-task-column-width)) var(--layout-col-3);
  overflow-x: auto; overflow-y: hidden;
}
.staging-sidebar-enabled:has(#mainLayout:not(.task-rail-overview):not(.reporting-rail-overview)) {
  --layout-col-3-content-left: calc(var(--layout-left-padding) + var(--staging-task-column-width) * 2 + var(--layout-gap) * 2 + var(--column-card-inset));
}
.staging-sidebar-enabled #stagingTodoColumn {
  position: relative; display: flex; flex-direction: column; min-height: 0; padding-top: 25px;
}
.staging-sidebar-enabled #stagingTodoColumn::before {
  content: ""; position: absolute; left: calc(var(--layout-gap) / -2);
  width: 1px; background: var(--sidebar-divider-color); pointer-events: none;
}
.staging-sidebar-enabled #mainLayout:not(.task-rail-overview):not(.reporting-rail-overview) :is(#taskList, #stagingTodoList) .task-card {
  width: 100%;
}
.staging-sidebar-enabled #mainLayout:not(.task-rail-overview):not(.reporting-rail-overview) #taskMonthBottom {
  width: calc(100% - 50px); flex-basis: calc(100% - 50px);
}
.staging-sidebar-enabled #mainLayout:not(.task-rail-overview):not(.reporting-rail-overview) :is(#taskList, #stagingTodoList) .task-duration-inline {
  grid-template-columns: 25px minmax(0, 1fr) 20px 35px 25px;
}
.staging-sidebar-enabled #mainLayout:not(.task-rail-overview):not(.reporting-rail-overview) :is(#taskList, #stagingTodoList) .task-duration-inline-label {
  width: auto; height: auto; white-space: normal; line-height: 1.25;
}
.staging-sidebar-enabled #mainLayout:is(.task-rail-overview, .reporting-rail-overview) #stagingTodoColumn { display: none; }
.staging-sidebar-enabled #stagingTodoList {
  flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 25px 25px;
}
.staging-sidebar-enabled #mainLayout:not(.task-rail-overview) #clientColumn { display: none; }
.staging-sidebar-enabled #mainLayout:not(.task-rail-overview) #taskColumn::before { content: none; }
.staging-sidebar-enabled #stagingTaskWeekList { overflow: auto; min-height: 0; padding: 50px 50px 16px 0; }
.staging-sidebar-enabled #employeeMenuBackdrop { left: var(--staging-navigation-width); top: var(--staging-header-height); }
.staging-sidebar-enabled #notificationPanel {
  position: fixed; left: var(--staging-navigation-width); top: var(--staging-header-height); bottom: 0;
  width: var(--staging-task-column-width); max-width: calc(100vw - var(--staging-navigation-width));
  height: auto; max-height: none; padding: var(--sidebar-content-top) 25px 25px; gap: 0;
  border-radius: 0; box-shadow: var(--staging-navigation-shadow);
}
#stagingSidebar #notificationToggleBtn.toggle-active { background: #fff; color: #000; }
.staging-sidebar-enabled .staging-notification-heading {
  flex: 0 0 auto; margin: 0 0 15px; height: 15px;
  font: 500 10px/15px Raleway, sans-serif; letter-spacing: .1em; color: #58615b;
}
.staging-sidebar-enabled #notificationList {
  flex: 1 1 auto; width: calc(100% + 25px); height: auto; max-height: none;
  margin: 0; padding: 0 25px 0 0; gap: var(--sidebar-row-gap);
}
.staging-sidebar-enabled #notificationPanel .notification-panel-actions {
  flex: 0 0 40px; width: 100%; height: 40px; margin-top: 25px;
  border-top: 1px solid var(--sidebar-divider-color); padding-top: 15px;
}
.staging-sidebar-enabled #notificationPanel :is(.notification-card-entry, .notification-card, .notification-card-summary) { width: 100%; }
.staging-sidebar-enabled #notificationPanel .notification-card {
  min-height: 0; background: var(--sidebar-card-surface); box-shadow: none; transform: none;
}
.staging-sidebar-enabled #notificationPanel .notification-card-summary {
  grid-template-columns: minmax(0, 1fr) 6px; grid-template-rows: 20px 15px; column-gap: 10px;
  height: auto; padding: 10px 15px;
}
.staging-sidebar-enabled #notificationPanel .notification-card-client-name {
  grid-column: 1; grid-row: 1; font: 400 12px/20px Raleway, sans-serif;
}
.staging-sidebar-enabled #notificationPanel .notification-card-metadata {
  display: flex; align-items: center; gap: 6px; min-width: 0; grid-column: 1; grid-row: 2;
}
.staging-sidebar-enabled #notificationPanel :is(.notification-card-actor, .notification-card-summary-time, .notification-card-metadata-divider) {
  margin: 0; padding: 0; font: 400 11px/15px Raleway, sans-serif; text-align: left;
}
.staging-sidebar-enabled #notificationPanel .notification-card-actor { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staging-sidebar-enabled #notificationPanel :is(.notification-card-summary-time, .notification-card-metadata-divider) { flex: 0 0 auto; white-space: nowrap; }
.staging-sidebar-enabled #notificationPanel .notification-card-metadata-divider { display: block; }
.staging-sidebar-enabled #notificationPanel .notification-card-unread-dot {
  display: block; grid-column: 2; grid-row: 1 / 3; align-self: center;
  width: 6px; height: 6px; border-radius: 50%; background: var(--sidebar-static-icon-color);
}
.staging-sidebar-enabled #notificationPanel .notification-card-details-inner { padding-left: 15px; padding-right: 15px; }
.staging-sidebar-enabled #notificationPanel .notification-card-drawer { width: calc(100% - 30px); margin-left: 15px; margin-right: 15px; padding-left: 15px; padding-right: 15px; }
.staging-sidebar-enabled #notificationPanel .notification-card-drawer-actions { width: 100%; }
.staging-sidebar-enabled #notificationPanel :is(.notification-list-scroll-fade, .notification-list-scroll-fade-top) { width: calc(100% - 50px); }
.staging-sidebar-enabled #notificationPanel .notification-list-scroll-fade { top: auto; bottom: var(--notification-column-list-bottom); }
.staging-sidebar-enabled #notificationPanel .notification-list-scroll-fade-top { top: var(--notification-column-list-top); }
.staging-sidebar-enabled #notificationPanel .notification-scroll-indicator { top: var(--notification-column-list-top); bottom: var(--notification-column-list-bottom); height: auto; }
.staging-sidebar-enabled #employeeRailSystemPanel,
.staging-sidebar-enabled #employeeRailPasswordPanel,
.staging-sidebar-enabled #employeeRailAddClientPanel {
  left: var(--staging-navigation-width); top: var(--staging-header-height); bottom: 0;
  height: var(--employee-rail-panel-height); min-height: 0;
  max-height: var(--employee-rail-panel-height); border-radius: 0;
}
.staging-sidebar-enabled :is(#employeeRailSystemPanel, #employeeRailThirdPanel, #employeeRailPasswordPanel, #employeeRailAddClientPanel) {
  --crm-fixed-panel-height: calc(100dvh - var(--staging-header-height));
  --crm-fixed-panel-content-height: calc(var(--crm-fixed-panel-height) - var(--crm-action-row-reserve));
  --crm-fixed-panel-content-track-height: calc(var(--crm-fixed-panel-content-height) - var(--crm-action-row-height));
  --employee-rail-panel-height: var(--crm-fixed-panel-height);
  --employee-rail-content-height: var(--crm-fixed-panel-content-height);
  --employee-rail-content-with-action-height: var(--crm-fixed-panel-content-track-height);
}
.staging-sidebar-enabled #clientInfoPanel { max-width: calc(100vw - var(--staging-sidebar-occupied-width) - 50px); }
/* Rail settings reuse the light navigation surface and row geometry. Content
   widths and action-row sizing remain owned by their existing form standards. */
.staging-sidebar-enabled #employeeRailSystemPanel .employee-rail-settings-panel {
  grid-template-columns: var(--staging-sidebar-width) max-content;
  width: max-content; border-radius: 0;
  background: #fff; box-shadow: 8px 0 16px rgba(0, 0, 0, .22);
}
.staging-sidebar-enabled #employeeRailSystemPanel .employee-rail-settings-tabs {
  width: var(--staging-sidebar-width); background: #f8f8f8; color: #000;
  border-radius: 0; border-right: 1px solid var(--sidebar-divider-color);
  grid-auto-rows: var(--sidebar-row-height); row-gap: var(--sidebar-row-gap);
  overflow: hidden; padding-top: var(--sidebar-content-top);
}
.staging-sidebar-enabled #employeeRailSystemPanel .employee-rail-global-stats-panel { border-radius: 0; }
/* The detail panel owns this surface; do not slide an empty white duplicate
   out with the submenu before the real content follows. */
.staging-sidebar-enabled #employeeRailSystemPanel.staging-rail-external-content .employee-rail-settings-panel {
  background: transparent; box-shadow: none;
}
.staging-sidebar-enabled #employeeRailSystemPanel.staging-rail-external-content .employee-rail-settings-tabs {
  box-shadow: 8px 0 16px rgba(0, 0, 0, .22);
}
.staging-sidebar-enabled #employeeRailSystemPanel.staging-rail-external-content :is(.employee-rail-settings-content, .employee-rail-settings-action-row--empty) {
  visibility: hidden;
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-employees-tabs, .employee-rail-teams-tabs) {
  grid-template-rows: minmax(0, 1fr) var(--sidebar-row-height);
}
.staging-sidebar-enabled #employeeRailSystemPanel .employee-rail-employees-tabs:has(.employee-rail-teams-entry) {
  grid-template-rows: minmax(0, 1fr) var(--sidebar-row-height) auto;
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-emails-tabs, .employee-rail-tasks-tabs) {
  grid-template-rows: minmax(0, 1fr);
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-employees-list, .employee-rail-teams-list, .employee-rail-emails-list, .employee-rail-tasks-list) {
  width: 100%; height: auto; min-height: 0; gap: var(--sidebar-row-gap);
  grid-auto-rows: max-content; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin;
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-settings-tab, .employee-rail-employee-subtab, .employee-rail-secondary-subaction, .employee-rail-employees-add-button, .employee-rail-teams-add-button) {
  display: flex; align-items: center; justify-content: flex-start;
  width: 100%; min-width: 0; max-width: none; height: var(--sidebar-row-height);
  min-height: var(--sidebar-row-height); padding: 10px 15px;
  border: 0; border-radius: 3px; background: transparent; box-shadow: none;
  color: #000; font: 400 14px/20px Raleway, sans-serif; text-align: left;
  transition: background-color 180ms, color 180ms;
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-settings-tab, .employee-rail-employee-subtab, .employee-rail-secondary-subaction, .employee-rail-employees-add-button, .employee-rail-teams-add-button):hover {
  background: #e1c16e25; color: #000;
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-settings-tab, .employee-rail-employee-subtab, .employee-rail-secondary-subaction, .employee-rail-employees-add-button, .employee-rail-teams-add-button):is(.is-selected, .toggle-active) {
  background: #fff; color: #000;
}
.staging-sidebar-enabled #employeeRailSystemPanel .employee-rail-settings-tab::before { content: none; }
.staging-sidebar-enabled #employeeRailSystemPanel .employee-rail-settings-tab .employee-rail-settings-tab-label {
  height: auto; min-width: 0; max-width: 100%; line-height: 20px;
  transform: none; animation: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-employees-add-row, .employee-rail-teams-add-row) {
  width: 100%; height: var(--sidebar-row-height);
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-employees-add-button, .employee-rail-teams-add-button) > span { text-align: left; }
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-employee-tab-group, .employee-rail-secondary-group) {
  width: 100%; height: auto; min-height: 0; max-height: none;
  grid-template-rows: var(--sidebar-row-height) 0fr;
  transition: grid-template-rows 520ms cubic-bezier(.2, .85, .22, 1);
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-employee-tab-group, .employee-rail-secondary-group).is-expanded {
  grid-template-rows: var(--sidebar-row-height) 1fr;
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-employee-subrow, .employee-rail-secondary-subrow) {
  grid-row: 2; grid-template-rows: minmax(0, 1fr); width: 100%;
  height: auto; min-height: 0; max-height: none; overflow: hidden;
  opacity: 1; transform: none; transition: none;
}
.staging-sidebar-enabled #employeeRailSystemPanel :is(.employee-rail-employee-subgrid, .employee-rail-secondary-subgrid) {
  grid-row: 1; grid-template-rows: none; grid-auto-rows: var(--sidebar-row-height);
  width: auto; min-height: 0; margin: 0 0 0 15px;
  padding-top: var(--sidebar-row-gap); gap: var(--sidebar-row-gap);
}
.staging-sidebar-enabled #employeeRailSystemPanel .employee-rail-secondary-subspacer { display: none; }
.staging-sidebar-enabled .staging-task-settings-status {
  grid-column: 1 / -1; min-width: 0; max-width: 100%; white-space: normal;
  font: 400 12px/1.4 Raleway, sans-serif; color: #666;
}
.staging-sidebar-enabled :is(#employeeRailSystemPanel, #employeeRailThirdPanel, #employeeRailPasswordPanel, #employeeRailAddClientPanel) :is(.employee-rail-settings-label, .employee-rail-employee-label, .employee-rail-password-label, .employee-rail-settings-input, .employee-rail-employee-input, .employee-rail-password-input, .employee-rail-password-select) {
  font-size: 12px; font-weight: 400; color: #000;
}
.staging-sidebar-enabled :is(#employeeRailThirdPanel, #employeeRailPasswordPanel, #employeeRailAddClientPanel) {
  background: #fff; border: 0; box-shadow: 8px 0 16px rgba(0, 0, 0, .22);
}
/* Task rows share the client-row geometry; the original completion input and
   editor bindings remain in place. Production keeps its original card layout. */
.staging-sidebar-enabled:has(#mainLayout) {
  --layout-left-padding: var(--staging-sidebar-occupied-width);
  --layout-gap: 0px;
}
.staging-sidebar-enabled #mainLayout :is(#taskColumn, #stagingTodoColumn, #processColumn)::before {
  left: 0;
}
.staging-sidebar-enabled #mainLayout.task-rail-overview .task-card { width: 100%; }
.staging-sidebar-enabled:has(#mainLayout.reporting-rail-overview) {
  --layout-col-2: var(--staging-task-column-width);
}
.staging-sidebar-enabled #mainLayout.reporting-rail-overview #taskColumn { padding-top: 25px; }
/* The staging sidebar already owns the client column. Expanded preview must
   retain the sections column rather than applying the old three-column layout. */
.staging-sidebar-enabled #mainLayout.reporting-rail-overview.reporting-preview-expanded:not(.reporting-preview-fullscreen) {
  grid-template-columns: var(--layout-col-2) minmax(0, 1fr);
}
.staging-sidebar-enabled #mainLayout.reporting-rail-overview.reporting-preview-expanded #taskColumn { display: flex; }
.staging-sidebar-enabled #mainLayout.reporting-rail-overview.reporting-preview-expanded:not(.reporting-preview-fullscreen) #processColumn { min-width: 0; }
.staging-sidebar-enabled #mainLayout.reporting-rail-overview.reporting-preview-expanded:not(.reporting-preview-fullscreen) :is(#processList, #processColumn .column-title-row, .reporting-preview-column-status) {
  width: calc(100% - 50px); min-width: 0;
}
.staging-sidebar-enabled #mainLayout.reporting-rail-overview.reporting-preview-expanded:not(.reporting-preview-fullscreen) .reporting-pdf-pan-viewport {
  min-height: 0;
  height: var(--reporting-preview-scaled-page-footprint-height);
}
.staging-sidebar-enabled #mainLayout:not(.reporting-rail-overview) :is(#taskColumn, #processColumn),
.staging-sidebar-enabled #mainLayout.task-rail-overview :is(#clientColumn, #processColumn) { padding-top: 25px; }
.staging-sidebar-enabled #mainLayout:not(.reporting-rail-overview) :is(#taskColumn, #processColumn) .column-title,
.staging-sidebar-enabled #mainLayout.reporting-rail-overview #taskColumn .column-title,
.staging-sidebar-enabled #mainLayout.task-rail-overview :is(#clientColumn, #processColumn) .column-title,
.staging-sidebar-enabled #stagingTodoColumn .column-title,
.staging-sidebar-enabled #taskList .client-section-label {
  color: #636963; font-size: 10px; font-weight: 600; letter-spacing: .12em;
  line-height: 15px; text-transform: uppercase; margin: 0 0 15px; padding: 0 25px;
}
.staging-sidebar-enabled #mainLayout #taskColumn #taskList,
.staging-sidebar-enabled #stagingTaskWeekList,
.staging-sidebar-enabled #mainLayout:not(.reporting-rail-overview) #processColumn .content { padding: 0 25px 25px; }
.staging-sidebar-enabled #mainLayout :is(#taskColumn, #stagingTodoColumn, #processColumn)::before {
  top: calc(var(--staging-divider-inset) - var(--staging-workspace-top-padding));
  bottom: calc(var(--staging-divider-inset) - var(--main-layout-bottom-padding));
}
.staging-sidebar-enabled #mainLayout:not(.reporting-rail-overview) #processColumn .column-title-row { min-height: 0; }
.staging-sidebar-enabled #taskList .client-section-divider { height: 15px; margin: 25px 0 15px; padding: 0; }
.staging-sidebar-enabled #taskList .client-section-divider::before { content: none; }
.staging-sidebar-enabled #taskList .client-section-label { margin: 0; padding: 0; }
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting),
.staging-sidebar-enabled .reporting-section-card {
  --staging-task-surface: var(--sidebar-card-surface);
  --task-card-height: var(--sidebar-row-height);
  display: grid; grid-template-columns: var(--sidebar-icon-size) minmax(0, 1fr);
  grid-template-rows: 20px; grid-auto-rows: auto; gap: 0 var(--sidebar-icon-gap);
  align-items: center; width: 370px; min-height: var(--sidebar-row-height); height: auto;
  padding: 10px 15px; margin-bottom: var(--sidebar-row-gap);
  background: var(--staging-task-surface); color: #000; border: 0; border-radius: 3px;
  box-shadow: none; transform: none;
  transition: background-color 180ms, color 180ms, margin-bottom 900ms cubic-bezier(0.2, .85, .22, 1);
}
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting).active,
.staging-sidebar-enabled .reporting-section-card.is-selected {
  color: #e1c16e;
}
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting) :is(.task-stack, .task-top) { display: contents; }
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting) :is(.task-status-marker, .task-column-gap, .task-toggle-gap, .task-client-row, .task-completion-date) { display: none; }
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting) .task-main {
  display: block; grid-column: 2; grid-row: 1; width: auto; max-width: none; min-width: 0; height: 20px;
}
.staging-task-date { display: none; }
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting) .task-title-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px;
  align-items: center; height: 20px;
}
.staging-sidebar-enabled .task-card .staging-task-date {
  display: block; justify-self: end; white-space: nowrap;
  font: 400 12px/1 Raleway, sans-serif; color: var(--muted); text-align: right;
}
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting) .task-title,
.staging-sidebar-enabled .reporting-section-title {
  display: block; width: auto; max-width: none; height: 20px;
  font: 400 12px/20px Raleway, sans-serif; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.staging-sidebar-enabled .reporting-section-card { width: 100%; }
.staging-sidebar-enabled .reporting-section-card:has(+ .reporting-section-actions) { margin-bottom: 0; }
.staging-sidebar-enabled .reporting-section-card-copy { display: block; grid-column: 2; grid-row: 1; }
.staging-sidebar-enabled .reporting-section-account { display: none; }
.staging-sidebar-enabled .reporting-section-row-icon { grid-column: 1; grid-row: 1; }
.staging-sidebar-enabled .reporting-section-card.is-drop-before::before { top: calc((var(--sidebar-row-gap) + 2px) / -2); }
.staging-sidebar-enabled .reporting-section-card.is-drop-after::after { bottom: calc((var(--sidebar-row-gap) + 2px) / -2); }
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting) .task-toggle-slot { grid-column: 1; grid-row: 1; width:var(--sidebar-icon-size); height:var(--sidebar-icon-size); }
.staging-sidebar-enabled .task-card.task { --staging-task-tone: var(--task-status-success); }
.staging-sidebar-enabled .task-card.task:has(.task-status-marker.status-orange) { --staging-task-tone: #ffb400; }
.staging-sidebar-enabled .task-card.task:has(.task-status-marker.status-red) { --staging-task-tone: #ff2000; }
.staging-sidebar-enabled .task-card .task-complete-toggle > svg { display: none; }
.staging-sidebar-enabled .task-card .task-complete-toggle { width:var(--sidebar-icon-size); height:var(--sidebar-icon-size); flex:none; }
.task-complete-toggle > .staging-todo-icon { display: none; }
.staging-sidebar-enabled .task-card.todo:not(.support) .task-complete-toggle > .staging-todo-icon {
  display: block; width: var(--sidebar-icon-size); height: var(--sidebar-icon-size);
  color: var(--sidebar-static-icon-color);
}
.staging-sidebar-enabled .task-card.todo:not(.support) .task-complete-toggle::after { content: none; }
.staging-sidebar-enabled .task-card:is(.todo, .support).active { --sidebar-static-icon-color: #e1c16e; }
.staging-sidebar-enabled .task-card.todo .task-complete-toggle:has(input:checked) .staging-todo-circle {
  fill: currentColor; stroke: currentColor;
}
.staging-sidebar-enabled .task-card.todo .task-complete-toggle:has(input:checked) .staging-todo-check { stroke: #fff; }
.staging-sidebar-enabled .task-card.todo .task-complete-toggle:has(input:focus-visible) > .staging-todo-icon {
  outline: 2px solid #e1c16e; outline-offset: 3px; border-radius: 50%;
}
.staging-sidebar-enabled .task-card .task-complete-toggle::after {
  content: ""; display: block; width: var(--sidebar-icon-size); height: var(--sidebar-icon-size);
  box-sizing: border-box; border: var(--ui-icon-stroke-width,1.5px) solid var(--staging-task-tone); border-radius: 50%;
  background: transparent; transition: background-color 180ms, border-color 180ms;
}
.staging-sidebar-enabled .task-card .task-complete-toggle:has(input:checked)::after {
  border-color: var(--task-status-success); background: var(--task-status-success);
}
.staging-sidebar-enabled .task-card .task-complete-toggle:has(input:focus-visible)::after { outline: 2px solid #e1c16e; outline-offset: 3px; }
.staging-support-icon { display: none; }
.staging-sidebar-enabled .task-card.support .staging-support-icon {
  display: block; width: var(--sidebar-icon-size); height: var(--sidebar-icon-size);
  color: var(--sidebar-static-icon-color);
}
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting) :is(.task-desc, .subtasks-inline) {
  grid-column: 2; margin: 10px 0 0; min-width: 0; width: auto; color: inherit;
}
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting) .task-desc {
  margin: 0; padding: 0; border: 0;
  font: 400 var(--sidebar-secondary-font-size)/20px Raleway, sans-serif; overflow-wrap: anywhere;
}
.staging-sidebar-enabled .task-card.support .task-desc { display: none; }
/* Two compact lines share one standard row; names cannot change its pitch. */
.staging-sidebar-enabled #mainLayout.task-rail-overview :is(#stagingTaskWeekList, #taskList, #processList) {
  /* Overflow must scroll, not compress the cards' intrinsic text rows. */
  grid-auto-rows: min-content;
}
.staging-sidebar-enabled #mainLayout.task-rail-overview .task-card {
  --staging-overview-line-height: 15px;
  grid-template-rows: calc(var(--staging-overview-line-height) * 2);
  padding-block: calc((var(--sidebar-row-height) - var(--staging-overview-line-height) * 2) / 2);
}
.staging-sidebar-enabled #mainLayout.task-rail-overview .task-card .task-main {
  grid-row: 1; height: auto;
}
.staging-sidebar-enabled #mainLayout.task-rail-overview .task-card :is(.task-title-row, .task-title) {
  height: var(--staging-overview-line-height); line-height: var(--staging-overview-line-height);
}
.staging-sidebar-enabled #mainLayout.task-rail-overview .task-card .task-client-row {
  display: block; height: var(--staging-overview-line-height);
}
.staging-sidebar-enabled #mainLayout.task-rail-overview .task-card .task-client-name {
  display: block; width: auto; max-width: none; height: var(--staging-overview-line-height); margin: 0;
  font: 400 var(--sidebar-secondary-font-size)/var(--staging-overview-line-height) Raleway, sans-serif; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting):is(.has-duration-input, .is-duration-closing) {
  animation: none; transform: none; background: transparent;
}
/* Keep the drawer's overlap behind an opaque row face. display:contents on the
   old stack cannot establish a stacking context, so layer the visible grid items. */
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting):is(.has-duration-input, .is-duration-closing)::before {
  background: var(--staging-task-surface); box-shadow: none; animation: none;
}
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting):is(.has-duration-input, .is-duration-closing) :is(.task-main, .task-toggle-slot, .task-desc, .subtasks-inline) {
  position: relative; z-index: 3;
}
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting).has-duration-input { margin-bottom: calc(var(--sidebar-row-gap) + var(--task-duration-visible-height)); }
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting).is-duration-closing { margin-bottom: var(--sidebar-row-gap); }
.staging-sidebar-enabled .task-card:is(.task, .todo, .meeting) .task-duration-inline { grid-column: 1 / -1; left: 25px; right: 25px; }
/* Process headers use the same row grid while their existing body accordion and
   separate edit action retain their behavior. Body padding belongs to the body. */
.staging-sidebar-enabled .process-card {
  grid-template-columns: var(--sidebar-icon-size) minmax(0, 1fr);
  column-gap: var(--sidebar-icon-gap); width: 370px; min-height: var(--sidebar-row-height);
  padding: 0 15px; margin-bottom: var(--sidebar-row-gap);
  background: var(--sidebar-card-surface); color: #000; box-shadow: none;
  transition: background-color 180ms, color 180ms;
}
.staging-sidebar-enabled .process-card:is(.active, .is-closing) { background: var(--sidebar-card-surface); color: #000; }
.staging-sidebar-enabled .process-card .process-column-gap,
.staging-sidebar-enabled .process-card .process-edit-gap { display: none; }
.staging-sidebar-enabled .process-card .process-status-marker {
  grid-column: 1; grid-row: 1; width: var(--sidebar-icon-size); height: var(--sidebar-icon-size);
  min-height: 0; margin-top: calc((var(--sidebar-row-height) - var(--sidebar-icon-size)) / 2);
  border: 0; border-radius: 0; background: transparent; color: var(--sidebar-static-icon-color);
}
.staging-sidebar-enabled .process-status-marker .staging-process-icon,
.staging-sidebar-enabled .staging-process-icon svg { display: block; width: var(--sidebar-icon-size); height: var(--sidebar-icon-size); }
.staging-sidebar-enabled .process-card .process-stack { grid-column: 2; min-width: 0; width: auto; min-height: var(--sidebar-row-height); }
.staging-sidebar-enabled .process-card .process-head {
  grid-template-columns: minmax(0, 1fr);
  height: var(--sidebar-row-height); padding: 10px 0;
}
.staging-sidebar-enabled .process-card .process-head-copy { height: 20px; }
.staging-sidebar-enabled .process-card .process-name {
  height: 20px; font: 400 12px/20px Raleway, sans-serif; color: inherit;
}
.staging-sidebar-enabled .process-card .process-card-edit-link { color: inherit; }
.staging-sidebar-enabled .process-card .process-desc { font-size: 12px; }
.staging-sidebar-enabled .process-card:is(.active, .is-closing) :is(.process-desc, .process-stamp) { color: #000; }
.staging-sidebar-enabled .process-card .process-body > .process-edit-slot {
  width: 100%; height: var(--crm-action-row-height); margin-top: 25px; justify-content: flex-end;
}
@media (max-width: 650px) {
  .staging-sidebar-enabled { --staging-sidebar-width: 175px; --staging-client-column-width: 175px; --sidebar-column-padding: 15px; }
  #stagingSidebar .sidebar-column { padding: 25px var(--sidebar-column-padding); }
  .staging-sidebar-enabled .topbar { padding: 0 25px; }
  .staging-sidebar-enabled #employeeRailSystemPanel,
  .staging-sidebar-enabled #employeeRailPasswordPanel,
  .staging-sidebar-enabled #employeeRailAddClientPanel,
  .staging-sidebar-enabled #clientInfoPanel { left: 25px; max-width: calc(100vw - 50px); z-index: 1300; }
}

/* A clipped, fixed layer makes the retained client editor emerge from column
   two without moving the workspace or painting over the sidebar. */
.staging-sidebar-enabled .staging-editor-drawer {
  position: fixed; left: var(--staging-sidebar-occupied-width);
  top: var(--staging-header-height); bottom: 0;
  width: min(var(--staging-editor-max-width,1050px), calc(100vw - var(--staging-sidebar-occupied-width)));
  z-index: var(--staging-editor-layer); overflow: hidden; pointer-events: none;
  visibility: hidden; transition: visibility 0s linear var(--staging-editor-slide-duration);
}
.staging-sidebar-enabled .staging-editor-drawer.is-open { visibility: visible; transition-delay: 0s; }
.staging-sidebar-enabled .staging-editor-drawer :is(#clientInfoPanel, #taskFormPanel, #reportingSectionEditorPanel, #employeeRailAddTaskPanel) {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: calc(100% - 25px); max-width: none; height: 100%; max-height: none;
  grid-template-columns: var(--staging-sidebar-width) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  padding: 0; margin: 0; gap: 0;
  border-radius: 0 3px 3px 0; visibility: inherit; pointer-events: none;
  box-shadow: 8px 0 16px rgba(0, 0, 0, .22);
  transform: translateX(-100%);
  transition: transform var(--staging-editor-slide-duration) cubic-bezier(.2, .85, .22, 1);
}
.staging-sidebar-enabled .staging-editor-drawer.is-open :is(#clientInfoPanel, #taskFormPanel, #reportingSectionEditorPanel, #employeeRailAddTaskPanel) {
  transform: translateX(0); pointer-events: auto;
}
.staging-sidebar-enabled .app.client-editor-open #editBackdrop {
  left: var(--staging-sidebar-occupied-width); top: var(--staging-header-height);
}
.staging-sidebar-enabled .staging-client-create-drawer {
  width: min(475px, calc(100vw - var(--staging-sidebar-occupied-width)));
}
.staging-sidebar-enabled .staging-client-create-drawer #employeeRailAddTaskPanel {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 15px minmax(0, 1fr) var(--crm-action-row-height);
  padding: 50px 25px 25px; row-gap: 15px; justify-items: stretch;
  min-height: 0; background: #fff;
}
.staging-sidebar-enabled #employeeRailAddTaskPanel > .sidebar-heading {
  margin: 0; font: 600 10px/15px Raleway, sans-serif;
  letter-spacing: .12em; text-transform: uppercase; color: #636963;
}
.staging-sidebar-enabled .staging-client-create-body {
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 25px; min-height: 0; min-width: 0;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
}
.staging-sidebar-enabled .staging-client-create-body .employee-rail-add-task-subtasks { grid-template-columns: minmax(0, 1fr); }
.staging-sidebar-enabled .staging-client-create-body .employee-rail-add-task-process-rich-field :is(.rich-text-toolbar, .rich-text-editor) { width: 100%; min-width: 0; }
.staging-sidebar-enabled .staging-client-create-body .employee-rail-add-task-label { font-size: 12px; }
.staging-sidebar-enabled .staging-client-create-drawer #employeeRailAddTaskPanel .employee-rail-add-task-action-row {
  position: static; width: 100%; min-width: 0; align-self: end;
}
.staging-sidebar-enabled .staging-client-create-body .employee-rail-add-task-row {
  width: 100%; grid-template-columns: 100px 25px minmax(0, 1fr);
}
.staging-sidebar-enabled .staging-client-create-body .employee-rail-add-task-repeat-row {
  grid-template-columns: 100px 25px var(--crm-raised-control-face-height) 25px minmax(0, 1fr) 25px minmax(0, 1fr);
}
.staging-sidebar-enabled .staging-client-create-body :is(input, select, textarea, .employee-rail-add-task-process-rich-field, .employee-rail-add-task-subtasks, .employee-rail-add-task-subtask-field, .employee-rail-add-task-subtask-add) {
  min-width: 0; max-width: 100%;
}
.staging-sidebar-enabled .app.staging-client-create-open #employeeMenuBackdrop {
  left: var(--staging-sidebar-occupied-width);
}
@media (max-width: 900px) {
  .staging-sidebar-enabled .staging-client-create-drawer { left: 0; width: 100vw; }
  .staging-sidebar-enabled .staging-client-create-drawer #employeeRailAddTaskPanel { width: 100%; padding-inline: 15px; }
  .staging-sidebar-enabled .staging-client-create-body .employee-rail-add-task-row { grid-template-columns: 80px 15px minmax(0, 1fr); }
  .staging-sidebar-enabled .staging-client-create-body .employee-rail-add-task-repeat-row { grid-template-columns: 80px 15px var(--crm-raised-control-face-height) 10px minmax(0, 1fr) 10px minmax(0, 1fr); }
  .staging-sidebar-enabled .staging-client-create-body .employee-rail-add-task-label { width: 80px; }
  .staging-sidebar-enabled .app.staging-client-create-open #employeeMenuBackdrop { left: 0; }
}
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-tabbar,
.staging-sidebar-enabled .staging-task-editor-menu {
  grid-row: 1; width: auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 50px 25px 25px; gap: var(--sidebar-row-gap); justify-items: stretch;
  background: #f8f8f8; border-radius: 0; border-right: 1px solid var(--sidebar-divider-color);
}
.staging-sidebar-enabled .staging-client-editor-heading,
.staging-sidebar-enabled .staging-task-editor-menu #taskFormTitle {
  font: 600 10px/15px Raleway, sans-serif; letter-spacing: .12em;
  text-transform: uppercase; color: #636963; margin-bottom: 5px;
}
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-primary-tab.btn.subtle,
.staging-sidebar-enabled .staging-task-editor-tab {
  width: 100%; min-height: var(--sidebar-row-height); height: var(--sidebar-row-height);
  padding: 10px 15px; font: 400 14px/20px Raleway, sans-serif;
  color: var(--client-edit-tab-color, #000); text-indent: 0; white-space: normal; text-align: left;
  background: transparent; box-shadow: none; transform: none; animation: none;
  transition: background-color 180ms, color 180ms;
}
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-primary-tab.btn.subtle::before { content: none; }
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-primary-tab.btn.subtle:hover,
.staging-sidebar-enabled .staging-task-editor-tab:hover { background: #e1c16e25; }
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-primary-tab.btn.subtle.toggle-active,
.staging-sidebar-enabled .staging-task-editor-tab.toggle-active { background: #fff; color: var(--client-edit-tab-color, #000); }
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-tabbody {
  grid-row: 1; padding: 50px 25px 25px; min-width: 0;
}
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel :is(.client-edit-pane, .client-1720-details-fields) {
  grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0;
}
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-inline-field:not(.client-onboarding-contact,.client-onboarding-check) {
  width: 100%; min-width: 0; grid-template-columns: 100px minmax(0, 1fr);
}
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-inline-field .field-wrap {
  width: 100%; max-width: none; min-width: 0;
}
@media (max-width: 900px) {
  .staging-sidebar-enabled .staging-client-editor-drawer { left: 0; width: 100vw; }
  .staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel { width: 100%; }
}
@media (max-width: 650px) {
  .staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel { grid-template-columns: 140px minmax(0, 1fr); }
  .staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-tabbar { padding: 25px 15px; }
  .staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-tabbody { padding: 25px 15px; }
  .staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-inline-field:not(.client-onboarding-contact,.client-onboarding-check) { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .staging-sidebar-enabled { --staging-editor-slide-duration: 0ms; }
}

.staging-sidebar-enabled .staging-task-editor-drawer {
  left: var(--staging-task-editor-left, 0px); width: min(700px, 100vw);
}
.staging-sidebar-enabled .staging-reporting-editor-drawer {
  left: var(--staging-reporting-editor-left, 0px); width: min(475px, 100vw);
}
.staging-sidebar-enabled .staging-reporting-editor-drawer #reportingSectionEditorPanel {
  left: 0 !important; padding: 50px 25px 25px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) var(--crm-action-row-height); gap: 25px;
}
.staging-sidebar-enabled #reportingSectionEditorBackdrop {
  position: fixed; top: var(--staging-header-height); z-index: calc(var(--staging-editor-layer) - 1);
}
.staging-sidebar-enabled #reportingSectionEditorBackdrop[hidden] { display: none; }
.staging-sidebar-enabled .reporting-section-editor-body { padding: 0; }
.staging-sidebar-enabled #reportingSectionEditorPanel label { color: #000; font-size: 12px; }
.staging-sidebar-enabled .reporting-editor-field,
.staging-sidebar-enabled .reporting-editor-account-heading { grid-template-columns: 100px minmax(0, 1fr); }
.staging-sidebar-enabled .reporting-budget-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.staging-sidebar-enabled .reporting-budget-month { grid-template-columns: 30px minmax(0, 1fr); }
@media (max-width: 650px) {
  .staging-sidebar-enabled .staging-reporting-editor-drawer #reportingSectionEditorPanel { width: 100%; }
  .staging-sidebar-enabled .reporting-editor-field,
  .staging-sidebar-enabled .reporting-editor-account-heading { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .staging-sidebar-enabled .reporting-budget-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.staging-sidebar-enabled .staging-task-editor-menu {
  display: grid; grid-column: 1; grid-auto-rows: min-content; align-content: start;
}
.staging-sidebar-enabled .staging-task-editor-menu #taskFormTitle { height: auto; margin: 0 0 5px; }
.staging-sidebar-enabled .staging-task-editor-tab { border: 0; border-radius: 3px; cursor: pointer; }
.staging-sidebar-enabled .staging-task-editor-drawer #taskFormPanel .editor-modal-header { display: none; }
.staging-sidebar-enabled .staging-task-editor-drawer #taskFormPanel .task-form-divider { display: none; }
.staging-sidebar-enabled .staging-task-editor-drawer #taskFormPanel .task-editor-shell {
  grid-column: 2; grid-row: 1; padding: 50px 25px 25px; min-width: 0;
}
.staging-sidebar-enabled .staging-task-editor-pane { display: grid; gap: 25px; align-content: start; min-width: 0; }
.staging-sidebar-enabled .staging-task-editor-pane[hidden],
.staging-sidebar-enabled .staging-task-editor-tab[hidden] { display: none; }
.staging-sidebar-enabled .staging-task-editor-menu[hidden] { display: none; }
.staging-sidebar-enabled .staging-task-editor-drawer.staging-editor-without-menu { width: min(475px, 100vw); }
.staging-sidebar-enabled .staging-task-editor-drawer.staging-editor-without-menu #taskFormPanel { grid-template-columns: minmax(0, 1fr); }
.staging-sidebar-enabled .staging-task-editor-drawer.staging-editor-without-menu #taskFormPanel .task-editor-shell { grid-column: 1; }
.staging-sidebar-enabled #taskFormPanel.staging-task-duration-only .staging-task-editor-pane > :not(#taskCompletedDurationWrap),
.staging-sidebar-enabled #taskFormPanel.staging-task-duration-only :is(#removeTaskBtn, #removeTaskSeriesBtn) { display: none; }
.staging-sidebar-enabled #taskFormPanel .task-scope-row:has(.scope-toggle.hidden) { display: none; }
.staging-sidebar-enabled #taskFormPanel .staging-task-editor-pane > .full:first-child { display: grid; gap: 25px; }
.staging-sidebar-enabled #taskFormPanel .staging-task-editor-pane label:not(.ios-switch) { font-size: 12px; }
.staging-sidebar-enabled .app.staging-task-editor-open #editBackdrop {
  left: var(--staging-task-editor-left, 0px); top: var(--staging-header-height);
}
@media (max-width: 650px) {
  .staging-sidebar-enabled .staging-task-editor-drawer #taskFormPanel { width: 100%; grid-template-columns: 140px minmax(0, 1fr); }
  .staging-sidebar-enabled .staging-task-editor-menu { padding: 25px 15px; }
  .staging-sidebar-enabled .staging-task-editor-drawer #taskFormPanel .task-editor-shell { padding: 25px 15px; }
  .staging-sidebar-enabled .staging-task-editor-drawer #taskFormPanel :is(.task-title-inline, .deadline-inline, .repeat-under-deadline, #taskDescriptionWrap, #taskCompletedDurationWrap, #taskSubtasksWrap, .repeat-inline-row, .subtask-add) {
    grid-template-columns: minmax(0, 1fr); gap: 5px;
  }
}

/* Navigation and editor columns share the first-option baseline. */
#stagingSidebar #stagingClientColumn { padding-bottom:25px; }
#stagingSidebar #employeeRailMenu .employee-rail-menu-action > svg { flex:0 0 var(--sidebar-icon-size); width:var(--sidebar-icon-size); height:var(--sidebar-icon-size); }
.staging-navigation-collapsed #employeeRailMenu .sidebar-rail-label { display:none; }
#stagingSidebar #employeeMenuTeamsBtn { display:none; }
.employee-rail-teams-entry { margin-top:25px; padding-top:25px; border-top:1px solid #d9d9d9; }
.employee-rail-teams-entry #employeeMenuTeamsBtn { width:100%; min-height:40px; padding:10px 15px; background:transparent; color:#000; text-align:left; }
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-tabbody,
.staging-sidebar-enabled .staging-task-editor-menu,
.staging-sidebar-enabled .staging-task-editor-drawer #taskFormPanel .task-editor-shell { padding-top:var(--sidebar-content-top); }
.staging-sidebar-enabled #employeeRailSystemPanel .employee-rail-settings-panel[data-employee-rail-shared-panel] > .employee-rail-settings-content,
.staging-sidebar-enabled :is(#employeeRailThirdPanel, #employeeRailPasswordPanel, #employeeRailAddClientPanel),
.staging-sidebar-enabled .staging-client-create-drawer #employeeRailAddTaskPanel,
.staging-sidebar-enabled .staging-reporting-editor-drawer #reportingSectionEditorPanel { padding-top:var(--sidebar-content-top); }

/* Profile keeps the existing password form and action handlers in a content
   column beside its sub-navigation, without duplicating credential fields. */
.staging-sidebar-enabled #employeeRailPasswordPanel.sidebar-profile-panel {
  width: min(736px, calc(100vw - var(--staging-navigation-width)));
  max-width: calc(100vw - var(--staging-navigation-width));
  padding: 0; gap: 0; grid-template-columns: 276px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr); overflow: hidden;
}
.sidebar-profile-tabs {
  background: #f8f8f8; border-right: 1px solid var(--sidebar-divider-color);
  padding: var(--sidebar-content-top) 25px 25px; min-width: 0;
}
.sidebar-profile-tab {
  display: block; width: 100%; height: var(--sidebar-row-height); padding: 10px 15px;
  border: 0; border-radius: 3px; background: #fff; color: #000;
  font: 400 14px/20px Raleway, sans-serif; text-align: left;
}
.sidebar-profile-tab:focus-visible { outline: 2px solid #e1c16e; outline-offset: -2px; }
.sidebar-profile-content {
  position: relative; min-width: 0; overflow: auto;
  padding: var(--sidebar-content-top) 25px calc(var(--crm-action-row-reserve) + 25px);
  display: grid; grid-auto-rows: max-content; align-content: start; gap: 25px;
}
.staging-sidebar-enabled #employeeRailPasswordPanel .sidebar-profile-content .employee-rail-password-row {
  grid-template-columns: minmax(0, 185px) minmax(0, 225px);
}
.staging-sidebar-enabled #employeeRailPasswordPanel .sidebar-profile-content .employee-rail-password-input { width: 100%; }
@media (max-width: 900px) {
  .staging-sidebar-enabled #employeeRailPasswordPanel.sidebar-profile-panel {
    width: calc(100vw - 50px); max-width: calc(100vw - 50px);
    grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr);
  }
  .sidebar-profile-tabs { padding-inline: 15px; }
  .staging-sidebar-enabled #employeeRailPasswordPanel .sidebar-profile-content .employee-rail-password-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}
@media (max-width: 500px) {
  .staging-sidebar-enabled #employeeRailPasswordPanel.sidebar-profile-panel {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  }
  .sidebar-profile-tabs { padding: 25px; border-right: 0; border-bottom: 1px solid var(--sidebar-divider-color); }
  .sidebar-profile-content { padding-top: 25px; }
}

/* Collapsed navigation never expands action labels, including hover and feedback. */
.staging-navigation-collapsed #stagingNavigationActions .system-standard-raised-action.has-action-icon { width:var(--crm-raised-control-face-height) !important; }
.staging-navigation-collapsed #stagingNavigationActions .system-standard-action-label { display:none; }

.client-vat-options,.client-vat-extra-options { display:flex; flex-direction:column; gap:25px; }
.client-vat-extra-options > .annual-toggle-row { margin:0; }
.client-integration-payroll-section { border-top:1px solid var(--sidebar-divider-color,#d9d9d9); padding-top:25px; }

.client-payroll-provider { display:block; }


/* Shared row geometry, including empty list states and collapsed navigation. */
.staging-sidebar-enabled #stagingTodoList .empty { margin:0; }
.staging-navigation-collapsed #stagingSidebar .sidebar-navigation-header { padding-left:10px; }
.staging-sidebar-enabled .staging-client-editor-drawer #clientInfoPanel .client-edit-tabbar > [hidden] { display:none; }
.sidebar-profile-content[hidden] { display:none; }
#sidebarProfilePassword { display:flex; flex-direction:column; padding:0; gap:0; overflow:hidden; }
#sidebarProfilePassword[hidden] { display:none; }
.sidebar-profile-fields {
  flex:1 1 auto; min-height:0; overflow:auto; padding:var(--sidebar-content-top) 25px 25px;
  display:grid; grid-auto-rows:max-content; align-content:start; gap:25px;
}
.staging-sidebar-enabled #employeeRailPasswordPanel #sidebarProfilePassword > .employee-rail-settings-action-row {
  position:static; flex:0 0 var(--crm-action-row-height); width:auto; margin:0 25px 25px;
}
.sidebar-profile-tab { background:transparent; margin-bottom:var(--sidebar-row-gap); }
.sidebar-profile-tab[aria-selected="true"] { background:#fff; }
.sidebar-profile-content > .actions-row { position:absolute; bottom:25px; left:25px; right:25px; margin:0; justify-content:flex-end; }
.staging-sidebar-enabled .task-card.meeting .meeting-calendar { grid-column:1; grid-row:1; width:20px; height:20px; color:#203220; }
.staging-sidebar-enabled .task-card.meeting .meeting-calendar svg { width:100%; height:100%; }

#stagingSidebar { --navigation-divider-column-width:var(--staging-navigation-width); }
