/* Maintenance and SET / ADMIN reuse the compact SR service workspace. */
body .maintenance-page .pc-content,
body .u-admin-page .pc-content { width: 100%; max-width: none; margin: 0; padding: 8px 12px !important; }
body .maintenance-page .maintenance-form { width: 100%; max-width: none; margin: 0; }
body .maintenance-page .o-service-panel { margin-bottom: 8px !important; }
body .maintenance-page .maintenance-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 12px; }
body .maintenance-page .service-form-field { grid-template-columns: 96px minmax(0, 1fr); }
body .maintenance-page .service-form-field > :not(label) { min-width: 0; width: 100%; }
body .maintenance-page .service-form-field > label { white-space: normal; line-height: 14px; }
body .maintenance-page .maintenance-full { grid-column: 1 / -1; min-width: 0; }
body .maintenance-page .maintenance-customer-select { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
body .maintenance-page .maintenance-customer-select > label:first-child { width: 96px; margin: 0; text-align: right; color: #62738a; font-size: 11px; font-weight: 600; }
body .maintenance-page .maintenance-customer-select > select { width: min(360px, 100%); }
body .maintenance-page .maintenance-customer-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; margin: 0; color: #62738a; }
body .maintenance-page .maintenance-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
body .maintenance-page .maintenance-search { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(160px, 1fr) auto; gap: 12px; align-items: center; }
body .maintenance-page .maintenance-search .service-filter-field { grid-template-columns: 48px minmax(0, 1fr); }
body .maintenance-page .maintenance-server { padding: 6px 0; border-top: 1px solid #edf0f5; }
body .maintenance-page .maintenance-server strong { color: #62738a; font-size: 12px; }
body .maintenance-page .maintenance-footer { margin: 0; padding-top: 8px; }
body .maintenance-page .maintenance-message { padding: 6px 10px; margin-bottom: 8px; border: 1px solid #f0d2ce; background: #fff4f2; color: #a13020; font-size: 12px; }
body .maintenance-page .alert { padding: 6px 10px; margin-bottom: 8px; font-size: 12px; }
body .maintenance-page .service-grid { height: clamp(320px, calc(100vh - 235px), 650px); }
body .maintenance-page #connections .card-body { display: block; }
body .maintenance-page #connections .card-body > .maintenance-toolbar { grid-column: 1 / -1; }
body .maintenance-page #connections h6 { display: none; }
body .maintenance-page #connections table { margin: 0; }
body .u-admin-page .card-title { margin: 0; }
body .u-admin-page .card-header { display: flex; align-items: center; gap: 8px; }
body .u-admin-page .row.mb-3 { margin-bottom: 6px !important; }
body .u-admin-page :is(.form-label, .col-form-label) { margin-bottom: 0; padding-top: 4px; padding-bottom: 4px; font-size: 12px; color: #62738a; }
@media (max-width: 1399.98px) {
 body .maintenance-page .maintenance-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
 body .maintenance-page .maintenance-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 body .maintenance-page #connections .card-body { display: block; }
 body .maintenance-page #connections .table-responsive + .table-responsive { margin-top: 8px; }
}
@media (max-width: 575.98px) {
 body .maintenance-page .maintenance-fields, body .maintenance-page .maintenance-search { grid-template-columns: minmax(0, 1fr); }
 body .maintenance-page .maintenance-customer-select > label:first-child { width: auto; }
 body .maintenance-page .maintenance-customer-select > select { width: 100%; }
}
/* Compact bordered maintenance workspace, matching the supplied reference. */
body .maintenance-page { color:#10233f; background:#f4f7fa; }
body .maintenance-page .pc-content { padding:14px !important; }
body .maintenance-page .o-service-header { margin-bottom:14px !important; padding:0 !important; border:0; background:transparent; box-shadow:none; }
body .maintenance-page .o-service-header h4 { color:#10233f; font-size:20px; font-weight:700; }
body .maintenance-page .maintenance-workspace { padding:15px; background:#fff; border:1px solid #d8dfe8; box-shadow:0 5px 18px #1835530a; }
body .maintenance-page .o-service-panel { border:0; border-radius:0; box-shadow:none; background:#fff; margin-bottom:16px !important; }
body .maintenance-page .o-service-panel > .card-header { display:flex; align-items:center; min-height:34px; padding:0 0 8px !important; border:0; background:#fff; }
body .maintenance-page .o-service-panel-title { color:#10233f; font-size:15px; font-weight:700; }
body .maintenance-page .o-service-panel > .card-body { padding:0 !important; }
body .maintenance-page .maintenance-fields { grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; border-top:1px solid #d8dfe8; border-left:1px solid #d8dfe8; }
body .maintenance-page .service-form-field { display:grid; grid-template-columns:108px minmax(0,1fr); align-items:stretch; gap:0; min-height:42px; padding:0; border-right:1px solid #d8dfe8; border-bottom:1px solid #d8dfe8; }
body .maintenance-page .service-form-field > label { display:flex; align-items:center; justify-content:flex-end; padding:6px 7px; margin:0; background:#f7f9fc; border-right:1px solid #d8dfe8; color:#203b63; font-size:12px; font-weight:600; line-height:16px; text-align:right; }
body .maintenance-page .service-form-field > :not(label) { width:calc(100% - 12px); min-width:0; margin:6px; align-self:center; }
body .maintenance-page :is(.form-control,.form-select,.mx-input) { min-height:28px; height:28px; padding:3px 7px; border:1px solid #c8ccd1; border-radius:0; background-color:#fff; box-shadow:none; font-size:12px; color:#203b63; }
body .maintenance-page :is(.form-control,.mx-input)::placeholder { color:#a7b3c4; }
body .maintenance-page :is(.form-control,.form-select,.mx-input):focus { border-color:#3aa5ee; outline:2px solid #3aa5ee26; box-shadow:none; }
body .maintenance-page .mx-datepicker { display:block; }
body .maintenance-page .mx-input-wrapper { width:100%; }
body .maintenance-page .maintenance-customer-select { min-height:42px; padding:6px; border-right:1px solid #d8dfe8; border-bottom:1px solid #d8dfe8; background:#f7f9fc; }
body .maintenance-page .maintenance-customer-select > label:first-child { width:95px; color:#203b63; font-size:12px; }
body .maintenance-page .maintenance-filter-panel { border:3px solid #dce1e8; padding:9px 10px; margin-bottom:8px; }
body .maintenance-page .maintenance-search { grid-template-columns:minmax(300px,1.6fr) minmax(200px,1fr) auto; gap:24px; }
body .maintenance-page .maintenance-search .service-filter-field { display:grid; grid-template-columns:65px minmax(0,1fr); align-items:center; gap:8px; }
body .maintenance-page .maintenance-search label { margin:0; text-align:right; color:#10233f; font-size:12px; font-weight:700; }
body .maintenance-page .maintenance-search-actions { display:flex; align-items:center; gap:5px; }
body .maintenance-page .service-results-panel { margin-bottom:0 !important; }
body .maintenance-page .service-results-panel > .card-header { justify-content:flex-end; min-height:20px; padding:0 0 5px !important; }
body .maintenance-page .service-result-count { color:#526780; font-size:12px; }
body .maintenance-page .service-result-count strong { color:#0876d9; }
body .maintenance-page .service-grid { --ag-font-size:12px; --ag-font-family:inherit; --ag-header-background-color:#f5f7f8; --ag-header-foreground-color:#526477; --ag-foreground-color:#10233f; --ag-border-color:#bbc4cf; --ag-row-border-color:#d5dae0; --ag-odd-row-background-color:#fafcfd; --ag-row-hover-color:#eef7ff; --ag-wrapper-border-radius:0; height:clamp(320px,calc(100vh - 260px),760px); }
body .maintenance-page .ag-root-wrapper { border:1px solid #bbc4cf; border-radius:0; }
body .maintenance-page .ag-cell { border-right:1px solid #d5dae0; }
body .maintenance-page .ag-header-cell { font-size:12px; font-weight:600; }
body .maintenance-page .service-cell-link { color:#269fff; text-decoration:underline; }
body .maintenance-page .service-grid-footer { padding:9px 0 0; font-size:12px; }
body .maintenance-page .maintenance-server { margin-top:10px; padding:12px; border:1px solid #d8dfe8; border-radius:7px; }
body .maintenance-page .maintenance-server strong { font-size:12px; color:#203b63; }
body .maintenance-page .maintenance-help { padding:12px; margin:0; color:#8391a3; font-size:12px; }
body .maintenance-page .maintenance-footer { justify-content:flex-start; display:flex; gap:16px; margin:20px -15px -15px; padding:15px; background:#f6f8fa; border-top:1px solid #edf0f3; }
body .maintenance-page #connections table { font-size:12px; border:1px solid #d8dfe8; }
body .maintenance-page #connections th { background:#f7f9fc; color:#526477; }
@media(max-width:1399.98px) { body .maintenance-page .maintenance-fields { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:991.98px) {
 body .maintenance-page .maintenance-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
 body .maintenance-page .maintenance-search { grid-template-columns:1fr 1fr; gap:10px; }
 body .maintenance-page .maintenance-search-actions { grid-column:1 / -1; justify-content:flex-end; }
}
@media(max-width:575.98px) {
 body .maintenance-page .pc-content { padding:8px !important; }
 body .maintenance-page .maintenance-workspace { padding:10px; }
 body .maintenance-page .maintenance-fields, body .maintenance-page .maintenance-search { grid-template-columns:minmax(0,1fr); }
 body .maintenance-page .service-form-field { grid-template-columns:105px minmax(0,1fr); }
 body .maintenance-page .maintenance-footer { margin:16px -10px -10px; padding:12px 10px; }
}

/* Section titles have no enclosing border; only the data regions are outlined. */
body .maintenance-page .o-service-panel,
body .maintenance-page .o-service-panel > .card-header { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
body .maintenance-page .service-grid .ag-root-wrapper { border: 1px solid #bbc4cf; border-radius: 0; }
body .maintenance-page .service-grid .ag-cell.maintenance-action-cell { display: flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; }
body .maintenance-page .service-cell-link { height: 26px !important; line-height: 26px !important; }
body .maintenance-page .maintenance-filter-panel { border-width: 1px; }
/* Registration uses real label/input table cells, like the supplied reference. */
body .maintenance-page .maintenance-form .maintenance-fields { display: block; border: 0; }
body .maintenance-page .maintenance-table-scroll { width: 100%; overflow-x: auto; }
body .maintenance-page .maintenance-entry-table { width: 100%; min-width: 1100px; table-layout: fixed; border-collapse: collapse; border: 1px solid #d8dfe8; font-size: 12px; }
body .maintenance-page .maintenance-label-col { width: 6.5%; }
body .maintenance-page .maintenance-input-col { width: 13.5%; }
body .maintenance-page .maintenance-entry-table :is(th, td) { height: 42px; border: 1px solid #d8dfe8; padding: 6px; vertical-align: middle; }
body .maintenance-page .maintenance-entry-table th { background: #f7f9fc; text-align: right; color: #203b63; font-weight: 600; }
body .maintenance-page .maintenance-entry-table th label { display: block; margin: 0; padding: 0; font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }
body .maintenance-page .maintenance-entry-table td { background: #fff; }
body .maintenance-page .maintenance-entry-table td > :is(input, select, .mx-datepicker) { display: block; width: 100%; min-width: 0; margin: 0; }
body .maintenance-page .maintenance-entry-table .maintenance-empty-cell { background: #fff; }
body .maintenance-page .maintenance-customer-select { border: 1px solid #d8dfe8; border-bottom: 0; }
body .maintenance-page .maintenance-server { border: 0; border-radius: 0; padding: 8px 0; }
body .maintenance-page #connections table { border: 1px solid #d8dfe8; border-collapse: collapse; }
body .maintenance-page #connections :is(th, td) { border: 1px solid #d8dfe8; }

/* Popup is appended to body: keep calendar navigation clear of global button padding. */
body .maintenance-date-popup .mx-calendar-header .mx-btn { height: 30px !important; min-height: 30px !important; padding: 0 4px !important; line-height: 30px !important; font-size: 12px !important; }
body .maintenance-date-popup .mx-calendar-header .mx-btn[class*="-icon-"] { width: 24px; padding: 0 !important; }
body .maintenance-date-popup .mx-calendar-header-label { display: flex; justify-content: center; align-items: center; white-space: nowrap; }
body .maintenance-date-popup .mx-calendar-header-label .mx-btn { flex: 0 0 auto; }

body .maintenance-page .maintenance-project-panel > .card-body {
  padding: 14px 16px !important;
  border: 1px solid #dce3ec;
  border-radius: 5px;
  background: #f8fafc;
}
.maintenance-project-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 14px;
  border: 0;
}
.maintenance-project-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #dce3ec;
  border-radius: 4px;
  background: #fff;
  color: #526780;
  font-size: 12px;
  cursor: pointer;
}
.maintenance-project-mode.is-active {
  border-color: #86abd1;
  background: #eef5fc;
  color: #203b63;
  font-weight: 600;
}
.maintenance-project-mode.is-disabled { opacity: .55; cursor: default; }
.maintenance-project-mode input { margin: 0; accent-color: #315c9b; }
.maintenance-project-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 12px 16px;
  max-width: 850px;
}
.maintenance-project-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.maintenance-project-field label { font-size: 12px; font-weight: 600; color: #203b63; }
.maintenance-project-field small { font-size: 11px; color: #687e96; }
.maintenance-project-picker { max-width: 620px; }
body .maintenance-page .maintenance-project-field :is(.form-control, .form-select) {
  height: 34px !important;
  min-height: 34px !important;
}
@media (max-width: 575.98px) {
  .maintenance-project-fields { grid-template-columns: minmax(0, 1fr); }
}

body .maintenance-page .ag-cell.maintenance-action-cell .hk-table-action.maintenance-sr-open {
    background-color: #fff4e5 !important;
    border-color: #e6bc82 !important;
    color: #854b13 !important;
}
body .maintenance-page .ag-cell.maintenance-action-cell .hk-table-action.maintenance-sr-open:hover,
body .maintenance-page .ag-cell.maintenance-action-cell .hk-table-action.maintenance-sr-open:focus-visible {
    background-color: #ffe8c7 !important;
}

.maintenance-sr-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}
.maintenance-sr-column { min-width: 0; }
.maintenance-sr-stat {
    overflow-wrap: anywhere;
    --sr-accent: #52647a;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid #d8dfe8;
    border-top: 3px solid var(--sr-accent);
    border-radius: 6px;
    background: #f7f9fc;
    color: var(--sr-accent);
}
.maintenance-sr-total { padding: 4px 10px; border-radius: 999px; color: #fff; background: #243e62; }
.maintenance-sr-stat[data-status="I"] { --sr-accent: #087580; }
.maintenance-sr-stat[data-status="N"] { --sr-accent: #245da6; }
.maintenance-sr-stat[data-status="R"] { --sr-accent: #985b18; }
.maintenance-sr-stat[data-status="C"] { --sr-accent: #25734f; }
.maintenance-sr-stat[data-status="S"] { --sr-accent: #a03c44; }
.maintenance-sr-stat[data-status="D"] { --sr-accent: #68529a; }
.maintenance-sr-stat strong { font-size: 1.5rem; line-height: 1.2; }
.maintenance-sr-stat small { margin-left: 3px; font-size: .75rem; font-weight: normal; }

.maintenance-office-dialog {
    width: min(680px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    padding: 16px;
    border: 1px solid #d8dfe8;
    border-radius: 6px;
    color: #203b63;
    background: #fff;
}
.maintenance-office-dialog::backdrop { background: rgb(16 35 63 / 40%); }
body .maintenance-page .maintenance-office-results .service-grid { height: min(260px, 48vh); }
body #scope-o-maintenance .maintenance-entry-table textarea#notes.form-control { display: block; box-sizing: border-box; width: 100%; height: 116px !important; min-height: 116px !important; max-height: none !important; resize: vertical; }

body #scope-o-maintenance .ag-cell[col-id="project_name"] .service-cell-link {
    text-decoration: none;
    font-weight: 400;
}
