:root {
  --ctr-blue: #5c78a6;
  --ctr-red: #BC3726;
  --ctr-yellow: #E1A521;
}
body { background: #f7f7f7; }
.app-navbar { background: var(--ctr-blue); }
.card-header { font-weight: 600; }
.status-active { background: #198754; }
.status-disabled, .status-inactive { background: #ffc107; color: #000; }
.status-deleted, .status-archived { background: #dc3545; }
pre { background: #f1f1f1; padding: 12px; border-radius: 6px; white-space: pre-wrap; font-size: 13px; }
.field-row { border: 1px solid #ddd; border-radius: 8px; padding: 12px; margin-bottom: 10px; background: #fff; }
.tree-row-child { padding-left: 24px; border-left: 3px solid #ddd; }
.small-muted { font-size: 0.875rem; color: #6c757d; }

/* WorkMesh usability/theme foundation */
:root {
  --workmesh-font-scale: 1;
  --workmesh-primary: #5c78a6;
  --workmesh-secondary: #BC3726;
  --workmesh-accent: #E1A521;
  --workmesh-nav-bg: #212529;
  --workmesh-nav-text: #ffffff;
  --workmesh-radius: .375rem;
}
body { font-size: calc(1rem * var(--workmesh-font-scale)); }
.navbar.bg-dark { background-color: var(--workmesh-nav-bg) !important; }
.navbar-dark .navbar-nav .nav-link, .navbar-dark .navbar-brand { color: var(--workmesh-nav-text) !important; }
.btn-primary { background-color: var(--workmesh-primary); border-color: var(--workmesh-primary); border-radius: var(--workmesh-radius); }
.btn-outline-primary { color: var(--workmesh-primary); border-color: var(--workmesh-primary); border-radius: var(--workmesh-radius); }
.btn-outline-primary:hover { background-color: var(--workmesh-primary); border-color: var(--workmesh-primary); }
.workmesh-dark-mode { background:#121416; color:#e9ecef; }
.workmesh-dark-mode .card, .workmesh-dark-mode .modal-content, .workmesh-dark-mode .dropdown-menu, .workmesh-dark-mode .bg-white { background-color:#1c2126 !important; color:#e9ecef; }
.workmesh-dark-mode .table { color:#e9ecef; }
.workmesh-dark-mode .text-muted { color:#adb5bd !important; }
.workmesh-dark-mode .form-control, .workmesh-dark-mode .form-select { background-color:#15191d; color:#e9ecef; border-color:#495057; }
.workmesh-high-contrast .card, .workmesh-high-contrast .modal-content, .workmesh-high-contrast .form-control, .workmesh-high-contrast .form-select { border:2px solid #000; }
.workmesh-compact-tables .table > :not(caption) > * > * { padding:.25rem .35rem; }
.workmesh-reduce-motion *, .workmesh-reduce-motion *::before, .workmesh-reduce-motion *::after { transition:none !important; animation:none !important; scroll-behavior:auto !important; }
.heatmap-matrix-table .form-control-color { width:2.5rem; height:2rem; padding:.15rem; }
.heatmap-matrix-table .hm-cell-value, .heatmap-matrix-table .cell-value { max-width:5.5rem; }

/* WorkMesh bottom drawer form foundation */
.workmesh-drawer-open { overflow: hidden; }
.workmesh-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 2540;
}
.workmesh-bottom-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -18px 55px rgba(15, 23, 42, 0.28);
  z-index: 2541;
  display: flex;
  flex-direction: column;
  animation: workmeshDrawerIn 160ms ease-out;
}
.workmesh-drawer-header,
.workmesh-drawer-footer {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.workmesh-drawer-footer {
  border-bottom: 0;
  border-top: 1px solid #e5e7eb;
  justify-content: flex-end;
}
.workmesh-drawer-body {
  padding: 1rem 1.25rem;
  overflow: auto;
}
@keyframes workmeshDrawerIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.view-as-banner {
  background: #fff3cd;
  color: #664d03;
  border-bottom: 1px solid #ffecb5;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

/* WorkMesh public landing page */
.workmesh-landing-page {
  min-height: 100vh;
  margin: 0;
  color: #172033;
  background:
    radial-gradient(circle at top left, rgba(225, 165, 33, 0.22), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(92, 120, 166, 0.26), transparent 34rem),
    linear-gradient(135deg, #f8fafc 0%, #eef3f8 48%, #fff8e8 100%);
}
.workmesh-landing-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0;
}
.workmesh-landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #172033;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.workmesh-landing-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.14);
}
.workmesh-landing-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 1.05rem;
  color: #fff;
  background: var(--workmesh-primary, #5c78a6);
  border: 1px solid rgba(92, 120, 166, 0.45);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(92, 120, 166, 0.28);
}
.workmesh-landing-login:hover,
.workmesh-landing-login:focus {
  color: #fff;
  background: #4d688f;
  text-decoration: none;
}
.workmesh-landing-main {
  min-height: calc(100vh - 6rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 5rem;
}
.workmesh-landing-hero {
  width: min(780px, 100%);
  padding: clamp(2rem, 6vw, 4.5rem);
  text-align: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(92, 120, 166, 0.16);
  border-radius: 32px;
  box-shadow: 0 30px 90px rgba(23, 32, 51, 0.14);
  backdrop-filter: blur(14px);
}
.workmesh-landing-hero-logo {
  width: 118px;
  height: 118px;
  margin-bottom: 1.4rem;
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(23, 32, 51, 0.16);
}
.workmesh-landing-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--workmesh-secondary, #BC3726);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.workmesh-landing-hero h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(3rem, 10vw, 5.7rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.96;
}
.workmesh-landing-copy {
  max-width: 620px;
  margin: 1.15rem auto 0;
  color: #475569;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.55;
}
@media (max-width: 575.98px) {
  .workmesh-landing-header { width: min(100% - 1.25rem, 1120px); }
  .workmesh-landing-logo { width: 36px; height: 36px; border-radius: 10px; }
  .workmesh-landing-brand { font-size: 1rem; }
  .workmesh-landing-login { min-height: 38px; padding: 0.45rem 0.9rem; }
  .workmesh-landing-hero { border-radius: 24px; }
  .workmesh-landing-hero-logo { width: 92px; height: 92px; border-radius: 22px; }
}

/* Patch 140: editable dataset grids and combination timephased view */
.systems-inline-input,
.systems-timephase-input {
  min-width: 92px;
}
.systems-timephase-grid-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: .5rem;
}
.systems-timephase-grid {
  min-width: 1200px;
  margin-bottom: 0;
}
.systems-timephase-grid th,
.systems-timephase-grid td {
  white-space: nowrap;
}
.systems-timephase-period,
.systems-timephase-cell {
  min-width: 120px;
  text-align: right;
}
.systems-left-field,
.systems-left-field-cell {
  min-width: 170px;
}
.systems-sticky-col {
  position: sticky;
  z-index: 4;
  background: #fff;
}
.systems-timephase-grid thead .systems-sticky-col {
  z-index: 5;
}
.systems-sticky-col-1 {
  left: 0;
  min-width: 72px;
}
.systems-sticky-col-2 {
  left: 72px;
  min-width: 110px;
  box-shadow: 4px 0 6px rgba(0,0,0,.05);
}
.systems-timephase-input {
  text-align: right;
}

/* Patch 141: dataset builder toolbox usability */
.systems-dataset-builder-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.systems-field-toolbox-card,
.systems-schema-card {
  position: sticky;
  top: 1rem;
}
.systems-field-toolbox-scroll {
  max-height: calc(100vh - 17rem);
  min-height: 18rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: .25rem;
}
.systems-schema-card-body {
  max-height: calc(100vh - 14rem);
  overflow: auto;
}
.systems-dataset-drop-zone {
  min-height: 24rem;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.systems-field-tool-group {
  margin-bottom: .75rem;
}
.systems-field-tool-group-title {
  margin: .15rem .25rem .35rem;
  color: #6c757d;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.systems-field-tool-grid {
  display: grid;
  gap: .35rem;
}
.systems-field-tool {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: .5rem;
  width: 100%;
  min-height: 2.8rem;
  padding: .35rem .45rem;
  line-height: 1.15;
  cursor: grab;
}
.systems-field-tool:active {
  cursor: grabbing;
}
.systems-field-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 .25rem;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: .45rem;
  background: #f8f9fa;
  color: #212529;
  font-size: .78rem;
  font-weight: 700;
}
.systems-field-tool-main {
  min-width: 0;
  display: block;
}
.systems-field-tool-main strong,
.systems-field-tool-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.systems-field-tool-main strong {
  font-size: .86rem;
}
.systems-field-tool-main span {
  color: #6c757d;
  font-size: .72rem;
}
.workmesh-dark-mode .systems-field-tool-icon {
  background: #15191d;
  color: #e9ecef;
  border-color: #495057;
}
.workmesh-dark-mode .systems-field-tool-main span,
.workmesh-dark-mode .systems-field-tool-group-title {
  color: #adb5bd;
}
@media (max-width: 991.98px) {
  .systems-dataset-builder-layout {
    grid-template-columns: 1fr;
  }
  .systems-field-toolbox-card,
  .systems-schema-card {
    position: static;
  }
  .systems-field-toolbox-scroll,
  .systems-schema-card-body {
    max-height: none;
    overflow: visible;
  }
  .systems-field-tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
}

/* Patch 143: timephased summary and fixed left pane refinements */
.systems-left-locked-col {
  position: sticky;
  z-index: 6;
  background: #fff;
  box-shadow: 1px 0 0 rgba(0,0,0,.04);
}
.systems-timephase-grid thead .systems-left-locked-col {
  z-index: 8;
  background: #f8f9fa;
}
.systems-timephase-grid tbody .systems-left-locked-col,
.systems-timephase-grid tfoot .systems-left-locked-col {
  z-index: 6;
}
.systems-row-sum-col {
  background: #f8f9fa !important;
  box-shadow: 4px 0 6px rgba(0,0,0,.06);
}
.systems-total-row td,
.systems-subtotal-row td {
  background: #f8f9fa !important;
  border-top: 2px solid rgba(0,0,0,.15);
}
.systems-subtotal-row td {
  background: #fff8e1 !important;
}
.systems-timephase-grid tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 7;
}
.systems-timephase-grid tfoot .systems-left-locked-col {
  z-index: 9;
}

/* Patch 144: live summary visibility and sticky header alignment */
.systems-timephase-grid thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  background: #f8f9fa;
  box-shadow: 0 1px 0 rgba(0,0,0,.12);
}
.systems-timephase-grid thead .systems-left-locked-col {
  z-index: 12;
  background: #eef2f7;
}
.systems-timephase-grid tbody .systems-left-locked-col {
  z-index: 6;
}
.systems-timephase-grid tfoot .systems-left-locked-col {
  z-index: 11;
}
.systems-timephase-grid .systems-row-sum-col {
  background: #fff3cd !important;
  border-left: 1px solid rgba(177, 132, 20, .35);
  border-right: 1px solid rgba(177, 132, 20, .35);
}
.systems-total-row td {
  background: #ffe8a1 !important;
  border-top: 2px solid rgba(177, 132, 20, .45);
  border-bottom: 1px solid rgba(177, 132, 20, .35);
}
.systems-subtotal-row td {
  background: #fff3cd !important;
  border-top: 2px solid rgba(177, 132, 20, .35);
}
.workmesh-dark-mode .systems-timephase-grid thead th,
.workmesh-dark-mode .systems-timephase-grid thead .systems-left-locked-col {
  background: #1f2937;
  color: #f8f9fa;
}
.workmesh-dark-mode .systems-total-row td,
.workmesh-dark-mode .systems-subtotal-row td,
.workmesh-dark-mode .systems-timephase-grid .systems-row-sum-col {
  background: #3a2f12 !important;
  color: #fff7db;
}


.systems-inline-readonly-cell {
  min-width: 9rem;
  padding: .35rem .5rem;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: .35rem;
  background: rgba(248, 250, 252, .9);
}
.systems-inline-select {
  min-width: 10rem;
}
.systems-timephase-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  min-width: 0;
  position: relative;
}
.systems-timephase-header-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.systems-subtotal-header-button {
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.45rem;
  padding: 0;
  line-height: 1.1;
  font-weight: 700;
}
.systems-subtotal-header-button.is-active,
.systems-subtotal-active-header .systems-subtotal-header-button {
  border-color: rgba(92, 120, 166, .9);
  background: rgba(225, 165, 33, .25);
  color: #5c78a6;
}
.systems-subtotal-active-header {
  box-shadow: inset 0 -2px 0 rgba(225, 165, 33, .75), 1px 0 0 rgba(0,0,0,.04);
}
.systems-subtotal-header-menu {
  display: none;
  position: absolute;
  top: calc(100% + .25rem);
  right: 0;
  min-width: 13rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: .35rem;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: .45rem;
  background: #fff;
  z-index: 40;
}
.systems-subtotal-header-menu.show {
  display: grid;
  gap: .2rem;
}
.systems-subtotal-header-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: .35rem;
  padding: .35rem .45rem;
  background: transparent;
  color: inherit;
  font-size: .82rem;
  text-align: left;
}
.systems-subtotal-header-option:hover,
.systems-subtotal-header-option.is-active {
  background: rgba(92, 120, 166, .12);
}
.workmesh-dark-mode .systems-subtotal-header-menu {
  background: #1f2937;
  border-color: #495057;
}
.workmesh-dark-mode .systems-subtotal-header-option:hover,
.workmesh-dark-mode .systems-subtotal-header-option.is-active {
  background: rgba(225, 165, 33, .2);
}


.reference-table-register-row,
.reference-data-row {
  cursor: pointer;
}
.reference-table-register-row:hover,
.reference-data-row:hover {
  outline: 1px solid rgba(92, 120, 166, .28);
  outline-offset: -1px;
}
.systems-row-actions-item.is-primary {
  color: #5c78a6;
  font-weight: 600;
}

/* Patch 148 replacement: timephased table header controls, fixed controls and timesheet day highlighting */
.systems-timephase-view-card {
  overflow: visible;
}
.systems-timephase-card-header {
  position: sticky;
  left: 0;
  z-index: 18;
  background: var(--bs-card-cap-bg, #f8f9fa);
}
.systems-timephase-grid-wrap {
  position: relative;
}
.systems-timephase-grid .systems-timephase-header-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  overflow: visible;
}
.systems-timephase-grid .systems-table-heading-label {
  display: inline-block;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.systems-timephase-grid .systems-timephase-period .systems-table-heading-label {
  max-width: 9rem;
}
.systems-timephase-grid .systems-timephase-heading-button {
  text-decoration: none;
  color: inherit;
}
.systems-timephase-grid .systems-timephase-filter-menu {
  z-index: 80;
}
.systems-timephase-grid tbody tr[data-record-id][style*="display: none"] + .systems-subtotal-row {
  display: none;
}
.ts-weekend-col,
#myTimesheetGrid th.ts-weekend-col,
#myTimesheetGrid td.ts-weekend-col {
  background: #fff3cd !important;
  border-left: 1px solid rgba(177, 132, 20, .22);
  border-right: 1px solid rgba(177, 132, 20, .22);
}
.ts-holiday-col,
#myTimesheetGrid th.ts-holiday-col,
#myTimesheetGrid td.ts-holiday-col {
  background: #ffe8a1 !important;
  border-left: 1px solid rgba(177, 132, 20, .35);
  border-right: 1px solid rgba(177, 132, 20, .35);
}
.ts-day-note {
  font-size: .7rem;
  color: #6c757d;
  white-space: nowrap;
}
.ts-holiday-col .ts-day-note {
  color: #7a5b00;
  font-weight: 600;
}
.ts-foundation-card .table-sm td,
.ts-foundation-card .table-sm th {
  vertical-align: middle;
}
.workmesh-dark-mode .systems-timephase-card-header {
  background: #1f2937;
}
.workmesh-dark-mode .ts-weekend-col,
.workmesh-dark-mode #myTimesheetGrid th.ts-weekend-col,
.workmesh-dark-mode #myTimesheetGrid td.ts-weekend-col,
.workmesh-dark-mode .ts-holiday-col,
.workmesh-dark-mode #myTimesheetGrid th.ts-holiday-col,
.workmesh-dark-mode #myTimesheetGrid td.ts-holiday-col {
  background: #3a2f12 !important;
  color: #fff7db;
}

/* Patch 152: leave application workflow foundation */
.ts-leave-col,
#myTimesheetGrid th.ts-leave-col,
#myTimesheetGrid td.ts-leave-col {
  background: #e7f1ff !important;
  border-left: 1px solid rgba(13, 110, 253, .22);
  border-right: 1px solid rgba(13, 110, 253, .22);
}
.ts-leave-col .ts-day-note {
  color: #084298;
  font-weight: 600;
}
.ts-leave-row { cursor: pointer; }
.ts-leave-row:hover { background: rgba(13, 110, 253, .04); }
.workmesh-dark-mode .ts-leave-col,
.workmesh-dark-mode #myTimesheetGrid th.ts-leave-col,
.workmesh-dark-mode #myTimesheetGrid td.ts-leave-col {
  background: #112b46 !important;
  color: #d9ecff;
}

/* Patch 168: dataset workflow polish, guided builder and spreadsheet-style editing helpers */
.systems-workflow-guide-card {
  border-color: rgba(92, 120, 166, .28);
  box-shadow: 0 .25rem .8rem rgba(15, 23, 42, .04);
}
.systems-workflow-guide-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .75rem;
}
.systems-workflow-step {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .75rem;
  border: 1px solid rgba(108, 117, 125, .2);
  border-radius: .65rem;
  background: rgba(248, 249, 250, .75);
}
.systems-workflow-step.is-done {
  border-color: rgba(25, 135, 84, .28);
  background: rgba(25, 135, 84, .06);
}
.systems-workflow-step-marker {
  width: 1.55rem;
  min-width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(92, 120, 166, .14);
  color: #3f5d87;
  font-weight: 700;
}
.systems-workflow-step.is-done .systems-workflow-step-marker {
  background: rgba(25, 135, 84, .18);
  color: #146c43;
}
.systems-schema-change-notice {
  border-left: .35rem solid rgba(92, 120, 166, .85);
}
.systems-inline-help-panel {
  border-left: .35rem solid rgba(225, 165, 33, .8) !important;
}
.systems-timephase-toolbar-card {
  position: sticky;
  top: .25rem;
  z-index: 14;
  box-shadow: 0 .25rem .75rem rgba(15, 23, 42, .05);
}
.systems-sticky-action-bar {
  position: sticky;
  top: .25rem;
  z-index: 16;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(4px);
  border-radius: .5rem;
  padding: .25rem;
}
.systems-inline-cell-touched {
  box-shadow: inset 0 0 0 1px rgba(225, 165, 33, .75);
  background-color: rgba(225, 165, 33, .08) !important;
}
.systems-timephase-input:focus,
.systems-inline-input:focus {
  box-shadow: 0 0 0 .15rem rgba(92, 120, 166, .22);
  border-color: rgba(92, 120, 166, .75);
}
.systems-timephase-grid-wrap {
  max-height: min(72vh, 780px);
}
.systems-dataset-filter-card {
  box-shadow: 0 .2rem .65rem rgba(15, 23, 42, .035);
}
.workmesh-dark-mode .systems-workflow-guide-card,
.workmesh-dark-mode .systems-workflow-step,
.workmesh-dark-mode .systems-inline-help-panel,
.workmesh-dark-mode .systems-timephase-toolbar-card,
.workmesh-dark-mode .systems-dataset-filter-card {
  background: #111827;
  border-color: #374151;
}
.workmesh-dark-mode .systems-workflow-step.is-done {
  background: rgba(25, 135, 84, .12);
}
.workmesh-dark-mode .systems-sticky-action-bar {
  background: rgba(17, 24, 39, .92);
}
.workmesh-dark-mode .systems-inline-cell-touched {
  background-color: rgba(225, 165, 33, .12) !important;
}

/* Patch 169 - dataset/form setup workflow polish */
.systems-dataset-start-options .form-check {
  min-height: 1.75rem;
}
.systems-dataset-setup-journey .systems-workflow-step {
  align-items: center;
}
.systems-dataset-setup-journey .systems-workflow-step.is-muted {
  opacity: 0.62;
}
.systems-dataset-setup-journey .systems-workflow-step .btn {
  white-space: nowrap;
}
.systems-workflow-guide-card .badge.bg-primary-subtle {
  background: rgba(92, 120, 166, 0.12) !important;
}
.form-section-card input.section-title,
.form-section-card textarea.section-description {
  max-width: 100%;
}
.form-field-card[data-form-field-id=""] {
  border-left: 3px solid rgba(92, 120, 166, 0.5);
}
@media (max-width: 768px) {
  .systems-dataset-setup-journey .systems-workflow-step {
    align-items: flex-start;
  }
  .systems-dataset-setup-journey .systems-workflow-step .btn {
    width: 100%;
    margin-top: .5rem;
  }
}

/* Patch 170 - click-through dataset/form workflow and form layout builder */
.systems-clickthrough-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.systems-clickthrough-step {
  border: 1px solid var(--bs-border-color, #dee2e6);
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  border-radius: 999px;
  padding: .45rem .8rem;
  font-size: .875rem;
  line-height: 1.1;
  cursor: pointer;
}
.systems-clickthrough-step.is-active {
  background: var(--bs-primary, #0d6efd);
  border-color: var(--bs-primary, #0d6efd);
  color: #fff;
  box-shadow: 0 0 0 .15rem rgba(13,110,253,.15);
}
.systems-clickthrough-step.is-done:not(.is-active) {
  border-color: rgba(25,135,84,.45);
  background: rgba(25,135,84,.08);
}
.systems-clickthrough-step.is-disabled,
.systems-clickthrough-step:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.form-layout-grid {
  display: grid;
  gap: .75rem;
}
.form-layout-cols-1 { grid-template-columns: minmax(0, 1fr); }
.form-layout-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-layout-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-layout-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-layout-grid .form-field-card {
  min-width: 0;
}
.form-layout-grid .field-span-1 { grid-column: span 1; }
.form-layout-grid .field-span-2 { grid-column: span 2; }
.form-layout-grid .field-span-3 { grid-column: span 3; }
.form-layout-grid .field-span-4 { grid-column: span 4; }
.section-preview.has-divider {
  border-top: 1px solid var(--bs-border-color, #dee2e6);
  padding-top: .75rem;
  margin-top: .5rem;
}
@media (max-width: 991.98px) {
  .form-layout-cols-2,
  .form-layout-cols-3,
  .form-layout-cols-4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-layout-grid .field-span-1,
  .form-layout-grid .field-span-2,
  .form-layout-grid .field-span-3,
  .form-layout-grid .field-span-4 {
    grid-column: span 1;
  }
}

/* Patch 171 - appearance-item form builder refinement */
.form-builder-palette .form-palette-item {
  cursor: grab;
}
.form-builder-palette .form-palette-item:active {
  cursor: grabbing;
}
.section-fields.is-drag-over {
  outline: 2px dashed var(--bs-primary, #0d6efd);
  outline-offset: 4px;
  background: rgba(13, 110, 253, .04);
}
.form-appearance-card {
  border-left: 3px solid rgba(92, 120, 166, .7);
}
.form-appearance-preview {
  margin-top: .25rem;
  color: var(--bs-body-color, #212529);
}
.form-appearance-heading {
  font-weight: 700;
}
.form-appearance-text {
  white-space: pre-wrap;
}
.form-appearance-divider span,
.form-runtime-divider {
  display: block;
  width: 100%;
  border: 0;
  border-top: 2px solid currentColor;
  opacity: .5;
  margin: .5rem 0;
}
.form-appearance-spacer,
.form-runtime-spacer {
  min-height: 1rem;
}
.form-appearance-size-small { font-size: .875rem; }
.form-appearance-size-normal { font-size: 1rem; }
.form-appearance-size-large { font-size: 1.25rem; }
.form-appearance-size-xlarge { font-size: 1.5rem; }
.form-layout-cols-3,
.form-layout-cols-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-layout-grid .field-span-3,
.form-layout-grid .field-span-4 {
  grid-column: span 2;
}
.form-runtime-heading {
  font-weight: 700;
  line-height: 1.2;
}
.form-runtime-text {
  white-space: pre-wrap;
}

/* Patch 172: form tile builder */
.form-builder-canvas {
  align-items: start;
}
.form-builder-tile {
  cursor: grab;
  border: 1px solid rgba(92, 120, 166, 0.25);
  border-radius: 0.75rem !important;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.form-builder-tile:active { cursor: grabbing; }
.form-builder-tile:hover,
.form-builder-tile.is-selected {
  border-color: #5c78a6;
  box-shadow: 0 4px 14px rgba(92, 120, 166, 0.16);
}
.form-builder-tile.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}
.form-builder-tile.is-drop-target {
  border-color: #BC3726;
  box-shadow: 0 0 0 3px rgba(188, 55, 38, 0.12);
}
.form-tile-meta:empty { display: none; }
.form-layout-grid.form-layout-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-layout-grid .field-span-2 {
  grid-column: 1 / -1;
}
.form-layout-grid .field-span-1 {
  grid-column: span 1;
}
.form-appearance-blank_row {
  min-height: 2.25rem;
  border: 1px dashed rgba(92, 120, 166, 0.3);
  border-radius: 0.5rem;
  background: rgba(92, 120, 166, 0.04);
}
@media (max-width: 768px) {
  .form-layout-grid.form-layout-cols-2 {
    grid-template-columns: 1fr;
  }
  .form-layout-grid .field-span-1,
  .form-layout-grid .field-span-2 {
    grid-column: 1 / -1;
  }
}

/* Patch 178 - embedded dataset notification step and consistent workflow header */
.systems-embedded-workflow-header .systems-clickthrough-stepper,
.systems-workflow-guide-card .systems-clickthrough-stepper {
  margin-top: .25rem;
}
.systems-notification-setup-card textarea {
  min-height: 8rem;
}

/* Patch 179 - dataset notification rule builder */
.systems-notification-builder-card {
  border-color: rgba(92, 120, 166, 0.22);
}
.systems-notification-rule-list {
  max-height: 640px;
  overflow: auto;
}
.systems-notification-rule-list .list-group-item.active .text-muted {
  color: rgba(255,255,255,0.8) !important;
}
.systems-notification-builder-card textarea.font-monospace {
  font-size: 0.86rem;
  line-height: 1.35;
}
.systems-notification-builder-card .form-text {
  font-size: 0.78rem;
}


/* Patch 180 - notification builder layout fix */
.systems-notification-workflow-body {
  display: block;
}
.systems-notification-workflow-body .systems-notification-workflow-stepper {
  margin-bottom: 1rem;
}
.systems-notification-workflow-body .systems-clickthrough-stepper {
  justify-content: flex-start;
}
.systems-notification-workflow-body .systems-notification-workflow-grid {
  align-items: stretch;
}
.systems-notification-workflow-body .systems-notification-workflow-alert {
  margin-bottom: 1rem;
}
@media (min-width: 1200px) {
  .systems-notification-workflow-body .systems-notification-rules-column {
    max-width: 380px;
  }
}

/* Patch 182 - single dataset workflow card navigation */
.systems-workflow-step.is-current {
  border-color: rgba(92, 120, 166, .55);
  box-shadow: 0 0 0 .14rem rgba(92, 120, 166, .10);
}
.systems-notification-workflow-body .systems-notification-workflow-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.systems-embedded-workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}

/* Patch 194: timesheet reminder preview and mobile responsive timesheet views */
.ts-review-reminder-card {
  border: 1px solid rgba(92, 120, 166, .18);
  border-radius: .65rem;
  background: rgba(92, 120, 166, .045);
  padding: .75rem;
}
.ts-reminder-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, .52);
}
.ts-reminder-modal {
  width: min(980px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: hidden;
}
.ts-reminder-modal .card-body {
  overflow: auto;
}
#myTimesheetGrid {
  min-width: 1120px;
}
#myTimesheetGrid .ts-hour {
  min-width: 4.8rem;
}
.ts-review-table-wrap table,
#timesheetingPanel .table-responsive table {
  min-width: 760px;
}
@media (max-width: 768px) {
  #timesheetingPanel .nav,
  #timesheetProjectTabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .25rem;
  }
  #timesheetingPanel .nav-link,
  #timesheetProjectTabs .nav-link {
    white-space: nowrap;
  }
  #timesheetingPanel .card-header.d-flex,
  .ts-review-card > .card-header {
    flex-direction: column;
    align-items: stretch !important;
  }
  .ts-review-reminder-card .form-control,
  .ts-review-reminder-card .btn,
  .ts-reminder-actions .btn {
    width: 100%;
  }
  .ts-reminder-actions {
    width: 100%;
  }
  .ts-reminder-modal-backdrop {
    align-items: flex-end;
    padding: .5rem;
  }
  .ts-reminder-modal {
    max-height: 92vh;
    border-radius: 1rem 1rem .5rem .5rem;
  }
  #myTimesheetGrid {
    min-width: 980px;
    font-size: .86rem;
  }
  #myTimesheetGrid th,
  #myTimesheetGrid td {
    padding: .35rem;
  }
  #myTimesheetGrid .form-select-sm,
  #myTimesheetGrid .form-control-sm {
    font-size: .82rem;
  }
}

/* Patch R2A - visual reporting workspace foundation */
.report-builder-rail {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .25rem;
}
.report-builder-step {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
  border: 1px solid #d9e0ea;
  border-radius: 999px;
  padding: .45rem .75rem;
  background: #fff;
  color: #5f6b7a;
  font-size: .875rem;
}
.report-builder-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid #d9e0ea;
  font-size: .75rem;
}
.report-builder-step.is-active {
  border-color: var(--bs-primary, #5c78a6);
  color: var(--bs-primary, #5c78a6);
  background: rgba(92, 120, 166, .08);
}
.report-library-hero,
.report-source-card,
.report-selected-source-card,
.report-field-pill,
.report-canvas-placeholder {
  border: 1px solid #d9e0ea;
  border-radius: .85rem;
  background: #fff;
}
.report-library-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(92, 120, 166, .08), rgba(225, 165, 33, .08));
}
.report-hero-actions,
.report-component-tray {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.report-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.report-library-card {
  border: 1px solid #d9e0ea;
  border-radius: 1rem;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 .125rem .35rem rgba(15, 23, 42, .05);
}
.report-card-preview {
  border: 1px dashed #d9e0ea;
  border-radius: .75rem;
  padding: .75rem;
  background: #f8fafc;
}
.report-card-preview-line {
  height: .55rem;
  border-radius: 999px;
  background: #d9e0ea;
  margin-bottom: .45rem;
}
.report-card-preview-chart {
  display: flex;
  align-items: end;
  gap: .35rem;
  height: 2.5rem;
}
.report-card-preview-chart span {
  display: block;
  width: 1.1rem;
  border-radius: .25rem .25rem 0 0;
  background: #5c78a6;
  opacity: .75;
}
.report-card-preview-chart span:nth-child(1) { height: 35%; }
.report-card-preview-chart span:nth-child(2) { height: 70%; }
.report-card-preview-chart span:nth-child(3) { height: 50%; }
.report-card-preview-chart span:nth-child(4) { height: 88%; }
.report-panel-title {
  font-weight: 700;
  margin-bottom: .5rem;
}
.report-source-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: .75rem;
  max-height: 560px;
  overflow: auto;
  padding-right: .25rem;
}
.report-source-card {
  padding: .85rem;
  cursor: grab;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.report-source-card:hover,
.report-field-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 .35rem .8rem rgba(15, 23, 42, .08);
}
.report-source-card.is-selected {
  border-color: var(--bs-primary, #5c78a6);
  background: rgba(92, 120, 166, .07);
}
.report-source-card.is-warning {
  border-style: dashed;
}
.report-selected-source-zone,
.report-field-lane {
  min-height: 160px;
  border: 2px dashed #d9e0ea;
  border-radius: 1rem;
  padding: .85rem;
  background: #f8fafc;
}
.report-selected-source-zone.is-drag-over,
.report-field-lane.is-drag-over {
  border-color: var(--bs-primary, #5c78a6);
  background: rgba(92, 120, 166, .08);
}
.report-selected-source-card {
  padding: .85rem;
  margin-bottom: .75rem;
}
.report-relationship-line {
  border-left: 4px solid #E1A521;
  padding-left: .75rem;
}
.report-drop-placeholder {
  text-align: center;
  color: #667085;
  padding: 2rem 1rem;
}
.report-field-lane {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.report-field-pill {
  display: flex;
  gap: .75rem;
  padding: .75rem;
  cursor: grab;
}
.report-field-pill.is-selected {
  border-color: rgba(92, 120, 166, .55);
}
.report-design-shell {
  border-color: rgba(92, 120, 166, .35);
}
.report-component {
  border: 1px solid #d9e0ea;
  border-radius: .75rem;
  padding: .65rem .85rem;
  background: #f8fafc;
  cursor: grab;
  font-weight: 600;
}
.report-canvas-placeholder {
  min-height: 170px;
  padding: 1.25rem;
  background: repeating-linear-gradient(45deg, #fff, #fff 12px, #f8fafc 12px, #f8fafc 24px);
}
@media (max-width: 768px) {
  .report-library-hero { align-items: stretch; flex-direction: column; }
  .report-source-card-grid { max-height: none; }
}


/* Reporting R2B relationship/query diagnostics */
.report-diagnostics-placeholder {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 0.85rem;
  color: #64748b;
  background: #f8fafc;
}
.report-diagnostics-panel {
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 0.9rem;
  background: #ffffff;
}
.report-query-plan,
.report-preview-plan {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.report-query-plan span,
.report-preview-plan span {
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  color: #334155;
}
.report-diagnostics-list {
  display: grid;
  gap: 0.4rem;
}
.report-diagnostic-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  font-size: 0.86rem;
}
.report-diagnostic-item.is-success { background: #f0fdf4; }
.report-diagnostic-item.is-warning { background: #fffbeb; }
.report-diagnostic-item.is-danger { background: #fef2f2; }
.report-relationship-suggestion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  margin-top: 0.4rem;
  background: #f8fafc;
}


/* Reporting R3 visual filter builder */
.report-filter-help {
  border: 1px solid rgba(92, 120, 166, 0.22);
  background: rgba(92, 120, 166, 0.06);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #44546a;
}
.report-filter-group-row {
  background: linear-gradient(180deg, rgba(225, 165, 33, 0.08), rgba(255,255,255,0.98));
  border-style: dashed !important;
}
.report-filter-row {
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.report-filter-row:hover {
  border-color: rgba(92, 120, 166, 0.45) !important;
}

/* Reporting R3A interactive design canvas hotfix */
.report-component {
  border: 1px solid #d9e0ea;
  border-radius: .75rem;
  padding: .65rem .85rem;
  background: #f8fafc;
  cursor: grab;
  font-weight: 600;
  appearance: none;
  color: inherit;
}
.report-component:focus-visible {
  outline: 3px solid rgba(92, 120, 166, .25);
  border-color: var(--bs-primary, #5c78a6);
}
.report-design-drop-canvas {
  min-height: 220px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: .85rem;
  align-items: stretch;
  border: 2px dashed #d9e0ea;
  border-radius: 1rem;
  padding: 1rem;
  background: repeating-linear-gradient(45deg, #fff, #fff 12px, #f8fafc 12px, #f8fafc 24px);
}
.report-design-drop-canvas.is-drag-over {
  border-color: var(--bs-primary, #5c78a6);
  background: rgba(92, 120, 166, .08);
}
.report-design-drop-canvas .report-drop-placeholder {
  grid-column: 1 / -1;
}
.report-canvas-item {
  min-height: 118px;
  border: 1px solid #d9e0ea;
  border-left: 5px solid var(--wm-widget-colour, #5c78a6);
  border-radius: .9rem;
  padding: .85rem;
  background: #fff;
  box-shadow: 0 .2rem .5rem rgba(15, 23, 42, .06);
  cursor: grab;
}
.report-canvas-item:hover {
  border-color: rgba(92, 120, 166, .6);
  box-shadow: 0 .35rem .8rem rgba(15, 23, 42, .1);
}
.report-canvas-table-hint {
  border-left-color: #E1A521;
}
.report-canvas-grip {
  color: #64748b;
  font-weight: 700;
  cursor: grab;
}
.visual-widget-row.is-selected {
  border-color: var(--bs-primary, #5c78a6) !important;
  box-shadow: 0 0 0 .2rem rgba(92, 120, 166, .18);
}

/* Reporting R4A split-screen visual builder */
.report-builder-screen-shell {
  min-height: calc(100vh - 160px);
}
.report-builder-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.report-screen-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.report-builder-details-card.is-compact .card-body {
  padding-top: .75rem;
  padding-bottom: .75rem;
}
.report-builder-split-screen {
  display: grid;
  grid-template-columns: minmax(260px, 330px) 1fr;
  gap: 1rem;
  min-height: 680px;
}
.report-left-palette,
.report-work-canvas {
  border: 1px solid #d9e0ea;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 .2rem .6rem rgba(15, 23, 42, .05);
}
.report-left-palette {
  padding: 1rem;
  overflow: auto;
  max-height: calc(100vh - 260px);
}
.report-palette-header {
  margin-bottom: .85rem;
}
.report-work-canvas {
  padding: 1rem;
  position: relative;
  min-width: 0;
}
.report-canvas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.report-source-card-grid.is-palette {
  max-height: none;
  grid-template-columns: 1fr;
}
.report-data-model-canvas {
  min-height: 280px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
  gap: .85rem;
  border: 2px dashed #d9e0ea;
  border-radius: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(92,120,166,.05), rgba(225,165,33,.05));
}
.report-data-model-canvas.is-drag-over,
.report-field-lane.is-drag-over {
  border-color: #5c78a6;
  background: rgba(92, 120, 166, .09);
}
.report-field-strip {
  border: 1px solid #e3e8ef;
  border-radius: .9rem;
  padding: .85rem;
  background: #f8fafc;
}
.report-field-lane.is-compact {
  max-height: 250px;
  overflow: auto;
}
.report-bottom-actions {
  position: sticky;
  bottom: 0;
  margin-top: 1rem;
  padding-top: .75rem;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  background: linear-gradient(180deg, rgba(255,255,255,.8), #fff 42%);
  z-index: 4;
}
.report-filter-panel {
  position: fixed;
  top: 96px;
  right: -620px;
  width: min(620px, 96vw);
  height: calc(100vh - 120px);
  background: #fff;
  border: 1px solid #d9e0ea;
  border-radius: 1rem 0 0 1rem;
  box-shadow: -0.5rem 0 1.5rem rgba(15, 23, 42, .18);
  z-index: 1085;
  transition: right .22s ease;
  display: flex;
  flex-direction: column;
}
.report-filter-panel.is-open {
  right: 0;
}
.report-filter-panel-header,
.report-filter-panel-footer,
.report-style-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #e3e8ef;
}
.report-filter-panel-footer {
  border-top: 1px solid #e3e8ef;
  border-bottom: 0;
}
.report-filter-panel-body {
  padding: 1rem;
  overflow: auto;
}
.report-component-tray.is-vertical {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}
.report-component-tray.is-vertical .report-component {
  width: 100%;
  text-align: left;
}
.report-design-drop-canvas.is-snap-grid {
  min-height: 480px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(118px, auto);
  align-items: stretch;
  background-size: 24px 24px;
}
.report-design-drop-canvas.is-snap-grid .report-canvas-item {
  grid-column: span 4;
}
.report-design-drop-canvas.is-snap-grid .report-canvas-item:nth-child(3n+1) {
  grid-column: span 6;
}
.report-design-drop-canvas.is-snap-grid .report-drop-placeholder {
  grid-column: 1 / -1;
}
.report-style-drawer {
  position: sticky;
  bottom: 0;
  margin-top: 1rem;
  border: 1px solid #d9e0ea;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 -.25rem 1rem rgba(15,23,42,.08);
  padding-bottom: .75rem;
}
.report-style-drawer[aria-hidden="true"] {
  display: none;
}
.report-style-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: .85rem 1rem 0;
}
.report-style-drawer-rows {
  max-height: 360px;
  overflow: auto;
  margin-top: 1rem;
}
.report-style-drawer-rows .visual-widget-row {
  background: #fff;
}
@media (max-width: 992px) {
  .report-builder-split-screen {
    grid-template-columns: 1fr;
  }
  .report-left-palette {
    max-height: none;
  }
  .report-design-drop-canvas.is-snap-grid .report-canvas-item {
    grid-column: 1 / -1;
  }
  .report-canvas-toolbar,
  .report-builder-topbar {
    flex-direction: column;
  }
}

/* H1-H3 Help Centre and screen sharing improvements */
.workmesh-help-centre .help-filter-card { border-color: rgba(92, 120, 166, 0.18); }
.help-article-list { max-height: 70vh; overflow-y: auto; padding-right: .25rem; }
.help-article-card { border: 1px solid rgba(0,0,0,.12); background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.help-article-card:hover { border-color: rgba(92, 120, 166, .45); box-shadow: 0 .35rem 1rem rgba(0,0,0,.08); transform: translateY(-1px); }
.help-article-card.active { border-color: #5c78a6; box-shadow: 0 0 0 .15rem rgba(92, 120, 166, .18); }
.help-article-detail { min-height: 60vh; }
.help-article-body h2, .help-article-body h3, .help-article-body h4 { margin-top: 1.25rem; margin-bottom: .6rem; }
.help-article-body p { margin-bottom: .85rem; }
.help-article-body ul { margin-bottom: 1rem; padding-left: 1.25rem; }
.help-article-body code { background: rgba(92, 120, 166, .12); color: #29435f; padding: .1rem .25rem; border-radius: .25rem; }
.help-screenshot-gallery figure { background: #f8f9fa; }
.workmesh-context-help-panel { position: fixed; top: 0; right: 0; width: min(520px, 100vw); height: 100vh; background: #fff; z-index: 2400; transform: translateX(105%); transition: transform .2s ease; display: flex; flex-direction: column; border-left: 1px solid rgba(0,0,0,.15); }
.workmesh-context-help-panel.show { transform: translateX(0); }
.context-help-header { padding: 1rem; border-bottom: 1px solid rgba(0,0,0,.12); display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.context-help-body { padding: 1rem; overflow:auto; }
#workmeshShareButton.btn-success, #workmeshShareButton.btn-warning, #workmeshShareButton.btn-danger { color: #fff; }
@media (max-width: 991.98px) {
  .help-article-list { max-height: none; overflow: visible; }
  .workmesh-context-help-panel { width: 100vw; }
}

/* WM255 compact data workspace and Excel-style table controls */
#appContent h1 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: .15rem;
}
#appContent h2 { font-size: 1.1rem; }
.workmesh-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin-bottom: .75rem;
}
.workmesh-page-header > div:first-child { min-width: 0; }
.workmesh-page-header h1 { margin: 0; }
.workmesh-page-header p {
  margin: .1rem 0 0;
  max-width: 72rem;
  color: #6c757d;
  font-size: .82rem;
  line-height: 1.25;
}
.workmesh-page-header .btn { white-space: nowrap; }
.workmesh-data-panel {
  background: var(--bs-body-bg, #fff);
  padding: .45rem 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.workmesh-inline-guidance { margin-bottom: .35rem !important; }
.systems-table-tool-header { position: relative; }
.systems-table-heading-wrap {
  display: flex;
  align-items: center;
  gap: .25rem;
  min-width: 0;
}
.systems-table-heading-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.systems-table-heading-button {
  flex: 0 0 auto;
  border: 0;
  border-radius: .25rem;
  background: transparent;
  color: inherit;
  padding: 0 .22rem;
  line-height: 1.35;
}
.systems-table-heading-button:hover,
.systems-table-heading-button:focus-visible { background: rgba(92,120,166,.14); }
.systems-table-tool-badge { font-size: .62rem; padding: .2rem .28rem; }
.systems-excel-filter-menu {
  position: fixed;
  z-index: 3200;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: .75rem;
  border: 1px solid rgba(0,0,0,.16);
  border-radius: .55rem;
  background: #fff;
  color: #212529;
}
.systems-excel-filter-title { font-weight: 700; margin-bottom: .55rem; }
.systems-excel-sort-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .3rem;
  margin-bottom: .65rem;
}
.systems-excel-sort-grid button {
  border: 1px solid rgba(0,0,0,.13);
  border-radius: .35rem;
  background: #fff;
  color: #212529;
  padding: .38rem .45rem;
  text-align: left;
  font-size: .78rem;
}
.systems-excel-sort-grid button:hover { background: #f3f6fa; border-color: rgba(92,120,166,.45); }
.systems-excel-values {
  max-height: 220px;
  overflow: auto;
  border-top: 1px solid rgba(0,0,0,.08);
  border-bottom: 1px solid rgba(0,0,0,.08);
  padding: .25rem 0;
}
.systems-excel-values label {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .25rem;
  padding: .28rem .15rem;
  cursor: pointer;
}
.systems-excel-values label:hover { background: #f5f7fa; }
.systems-excel-values label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.systems-excel-values label small { color: #6c757d; }
.workmesh-dark-mode .systems-excel-filter-menu { background: #1c2126; color: #e9ecef; border-color: #495057; }
.workmesh-dark-mode .systems-excel-sort-grid button { background: #252b31; color: #e9ecef; border-color: #495057; }
.workmesh-dark-mode .systems-excel-sort-grid button:hover,
.workmesh-dark-mode .systems-excel-values label:hover { background: #303840; }
.workmesh-dark-mode .systems-excel-values { border-color: #495057; }
@media (max-width: 767.98px) {
  .workmesh-page-header { align-items: stretch; }
  .workmesh-page-header > .d-flex { width: 100%; }
  .systems-excel-sort-grid { grid-template-columns: 1fr; }
}
