/* =========================================================
   AKABER MAINTENANCE UI V1
========================================================= */

.maintenance-page-head p,
.maintenance-stat-alert {
  border-right: 4px solid #dc2626;
}

.maintenance-stat-warning {
  border-right: 4px solid #d97706;
}

.maintenance-filters {
  display: flex;
  gap: 10px;
  align-items: center;
}

.maintenance-search {
  position: relative;
}

.maintenance-search i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.maintenance-search input {
  width: 330px;
  max-width: 45vw;
  padding-right: 36px;
}

.maintenance-filters input,
.maintenance-filters select,
.maintenance-form-grid input,
.maintenance-form-grid select,
.maintenance-form-grid textarea {
  border: 1px solid #d7dee6;
  background: #fff;
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  color: #172033;
  outline: none;
}

.maintenance-filters input:focus,
.maintenance-filters select:focus,
.maintenance-form-grid input:focus,
.maintenance-form-grid select:focus,
.maintenance-form-grid textarea:focus {
  border-color: #0f766e;
  box-shadow:
    0 0 0 3px rgba(15,118,110,.10);
}

.maintenance-request-row:hover {
  background: #fbfdfd;
}

.maintenance-customer-name {
  color: #172033;
  font-weight: 700;
}

.maintenance-subtext {
  color: #94a3b8;
  font-size: 11px;
  margin-top: 3px;
}

.maintenance-link-button {
  border: 0;
  background: transparent;
  color: #0f766e;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
}

.maintenance-link-button:hover {
  text-decoration: underline;
}

.maintenance-lift-code {
  display: inline-flex;
  direction: ltr;
  font-weight: 800;
  color: #1e3a5f;
}

.maintenance-warning-text {
  color: #b45309;
  font-weight: 700;
}

.maintenance-priority,
.maintenance-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.maintenance-priority-normal {
  background: #f1f5f9;
  color: #475569;
}

.maintenance-priority-low {
  background: #eff6ff;
  color: #2563eb;
}

.maintenance-priority-high {
  background: #fff7ed;
  color: #c2410c;
}

.maintenance-priority-urgent,
.maintenance-priority-emergency {
  background: #fef2f2;
  color: #dc2626;
}

.maintenance-status {
  background: #f1f5f9;
  color: #475569;
}

.maintenance-status-new {
  background: #eff6ff;
  color: #1d4ed8;
}

.maintenance-status-ready_for_dispatch,
.maintenance-status-coverage_decided {
  background: #f0fdf4;
  color: #15803d;
}

.maintenance-status-dispatched,
.maintenance-status-visit_scheduled {
  background: #ecfeff;
  color: #0e7490;
}

.maintenance-status-in_progress {
  background: #fff7ed;
  color: #c2410c;
}

.maintenance-status-visit_completed,
.maintenance-status-report_completed,
.maintenance-status-completed {
  background: #ecfdf5;
  color: #047857;
}

.maintenance-status-cancelled,
.maintenance-status-closed {
  background: #f8fafc;
  color: #64748b;
}

.maintenance-issue-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maintenance-message {
  display: none;
  margin-bottom: 16px;
  border-radius: 10px;
  padding: 11px 14px;
}

.maintenance-message:not(:empty) {
  display: block;
}

.maintenance-message-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.maintenance-message-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.maintenance-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.35);
  z-index: 1090;
  opacity: 0;
  visibility: hidden;
  transition: .18s ease;
}

.maintenance-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.maintenance-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(560px, 96vw);
  background: #fff;
  z-index: 1100;
  padding: 24px;
  overflow-y: auto;
  box-shadow:
    18px 0 45px rgba(15,23,42,.16);
  transform: translateX(-105%);
  transition: transform .22s ease;
}

.maintenance-drawer.open {
  transform: translateX(0);
}

.maintenance-drawer-header,
.maintenance-details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.maintenance-drawer-header h3,
.maintenance-details-header h3 {
  margin: 4px 0 0;
}

.maintenance-icon-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  color: #475569;
}

.maintenance-form-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.maintenance-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.maintenance-form-grid label > span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.maintenance-form-wide {
  grid-column: 1 / -1;
}

.maintenance-form-grid textarea {
  resize: vertical;
}

.maintenance-form-error {
  min-height: 22px;
  margin-top: 12px;
  color: #b91c1c;
  font-size: 13px;
}

.maintenance-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid #edf1f4;
}

.maintenance-detail-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.maintenance-detail-grid > div,
.maintenance-detail-block {
  border: 1px solid #e8edf2;
  border-radius: 10px;
  padding: 12px 14px;
}

.maintenance-detail-grid span,
.maintenance-detail-block > span {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  margin-bottom: 5px;
}

.maintenance-detail-grid strong {
  color: #273449;
}

.maintenance-detail-block {
  margin-bottom: 12px;
}

.maintenance-detail-block p {
  margin: 0;
  line-height: 1.8;
  color: #334155;
}

.maintenance-next-step {
  margin-top: 20px;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  color: #115e59;
  padding: 14px;
  line-height: 1.8;
}

@media (max-width: 900px) {
  .maintenance-page-head,
  .maintenance-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .maintenance-search input {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .maintenance-stats,
  .maintenance-form-grid,
  .maintenance-detail-grid {
    grid-template-columns: 1fr;
  }

  .maintenance-form-wide {
    grid-column: auto;
  }

  .maintenance-head-actions }

/* =========================================================
   AKABER MAINTENANCE ASSET RESOLUTION V1.1
========================================================= */

.maintenance-asset-resolution-slot {
  margin-top: 20px;
}

.maintenance-resolve-card {
  border: 1px solid #dbe7e5;
  border-radius: 12px;
  background: #f8fffd;
  padding: 16px;
}

.maintenance-resolve-head {
  margin-bottom: 6px;
}

.maintenance-resolve-head h4 {
  margin: 3px 0 0;
  color: #173a37;
  font-size: 16px;
}

.maintenance-resolve-help {
  margin: 0 0 15px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.8;
}

.maintenance-resolve-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.maintenance-resolve-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.maintenance-resolve-field > span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.maintenance-resolve-field select {
  width: 100%;
  border: 1px solid #d7dee6;
  background: #fff;
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  color: #172033;
  outline: none;
}

.maintenance-resolve-field select:focus {
  border-color: #0f766e;
  box-shadow:
    0 0 0 3px rgba(15,118,110,.10);
}

.maintenance-resolve-field select:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.maintenance-resolve-lift-info {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.maintenance-resolve-info-row {
  border: 1px solid #e4ebe9;
  background: #fff;
  border-radius: 9px;
  padding: 9px 11px;
}

.maintenance-resolve-info-row span {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  margin-bottom: 3px;
}

.maintenance-resolve-info-row strong {
  color: #334155;
  font-size: 12px;
}

.maintenance-resolve-warning {
  grid-column: 1 / -1;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 9px;
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.8;
}

.maintenance-resolve-message {
  min-height: 0;
  margin-top: 12px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.7;
}

.maintenance-resolve-message:not(:empty) {
  padding: 10px 12px;
}

.maintenance-resolve-message-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.maintenance-resolve-message-warning {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.maintenance-resolve-message-success {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.maintenance-resolve-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.maintenance-resolve-linked {
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 10px;
  padding: 12px 14px;
}

.maintenance-resolve-linked-detail {
  margin-top: 4px;
  font-size: 12px;
  direction: ltr;
  text-align: right;
}

@media (max-width: 600px) {
  .maintenance-resolve-lift-info {
    grid-template-columns: 1fr;
  }

  .maintenance-resolve-actions
  .maintenance-button {
    width: 100%;
  }
}


/* =========================================================
   AKABER MAINTENANCE INTAKE SEARCH V1
========================================================= */

.maintenance-intake-search-field {
  position: relative;
}

.maintenance-intake-search-results {
  margin-top: 6px;
  border: 1px solid #dce4e9;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
  box-shadow:
    0 10px 28px rgba(15,23,42,.10);
}

.maintenance-intake-search-results.hidden,
.maintenance-intake-selected.hidden {
  display: none;
}

.maintenance-intake-result {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  background: #fff;
  text-align: right;
  padding: 11px 12px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.maintenance-intake-result:last-child {
  border-bottom: 0;
}

.maintenance-intake-result:hover {
  background: #f8fbfa;
}

.maintenance-intake-result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.maintenance-intake-result-top strong {
  color: #172033;
}

.maintenance-intake-result-type {
  display: inline-flex;
  border-radius: 999px;
  background: #edf8f1;
  color: #27894d;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
}

.maintenance-intake-result-contact,
.maintenance-intake-result-context {
  color: #718096;
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.6;
}

.maintenance-intake-result-warning {
  margin-top: 7px;
  color: #9a3412;
  background: #fff7ed;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 10px;
}

.maintenance-intake-search-empty {
  padding: 14px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.7;
}

.maintenance-intake-selected {
  margin-top: 7px;
  border: 1px solid #bbdfc8;
  background: #f1faf4;
  border-radius: 8px;
  padding: 9px 10px;
}

.maintenance-intake-selected strong,
.maintenance-intake-selected span,
.maintenance-intake-selected small {
  display: block;
}

.maintenance-intake-selected strong {
  color: #176b38;
}

.maintenance-intake-selected span {
  color: #577065;
  font-size: 11px;
  margin-top: 2px;
}

.maintenance-intake-selected small {
  color: #9a3412;
  margin-top: 5px;
}

/* =========================================================
   AKABER MAINTENANCE PORTAL ALIGNMENT V2
   Only Maintenance-specific layout adjustments remain here.
========================================================= */

.maintenance-page-head {
  margin-bottom: 20px;
}

.maintenance-page-head .page-tag {
  margin-bottom: 8px;
}

.maintenance-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.maintenance-stat-alert {
  border-inline-start: 3px solid #dc2626;
}

.maintenance-stat-warning {
  border-inline-start: 3px solid #d97706;
}

.maintenance-workspace {
  overflow: hidden;
}

.maintenance-workspace-header {
  align-items: center;
}

.maintenance-filters {
  display: flex;
  gap: 10px;
  align-items: center;
}

.maintenance-table td,
.maintenance-table th {
  white-space: nowrap;
}

.maintenance-issue-cell {
  min-width: 220px;
  max-width: 320px;
  white-space: normal !important;
}

@media (max-width: 900px) {
  .maintenance-page-head,
  .maintenance-workspace-header {
    align-items: stretch;
  }
}

/* Maintenance page subtitle must not inherit
   decorative border/accent markers. */
.maintenance-page-head p {
  border: 0 !important;
  border-inline-start: 0 !important;
  border-inline-end: 0 !important;
  padding-inline-start: 0 !important;
  padding-inline-end: 0 !important;
}

/* =========================================================
   AKABER MAINTENANCE DISPATCH UI V1
========================================================= */

.maintenance-dispatch-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dce8e1;
  border-radius: 12px;
  background: #fbfefc;
}

.maintenance-dispatch-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 15px;
}

.maintenance-dispatch-head h3 {
  margin: 5px 0 0;
}

.maintenance-dispatch-request-number {
  color: #087f5b;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.maintenance-dispatch-form {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.maintenance-dispatch-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.maintenance-dispatch-form label > span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.maintenance-dispatch-form select,
.maintenance-dispatch-form input,
.maintenance-dispatch-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7dee6;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  padding: 10px 11px;
  font: inherit;
  outline: none;
}

.maintenance-dispatch-form select:focus,
.maintenance-dispatch-form input:focus,
.maintenance-dispatch-form textarea:focus {
  border-color: #27894d;
  box-shadow:
    0 0 0 3px
    rgba(39,137,77,.10);
}

.maintenance-dispatch-wide {
  grid-column: 1 / -1;
}

.maintenance-dispatch-error {
  color: #b91c1c;
  font-size: 12px;
  min-height: 18px;
}

.maintenance-dispatch-result {
  display: none;
}

.maintenance-dispatch-result.success {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #a7f3d0;
  border-radius: 9px;
  color: #047857;
  background: #ecfdf5;
}

.maintenance-dispatch-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 700px) {
  .maintenance-dispatch-form {
    grid-template-columns: 1fr;
  }

  .maintenance-dispatch-wide {
    grid-column: auto;
  }

  .maintenance-dispatch-form
  input,
  .maintenance-dispatch-form
  select {
    min-height: 44px;
    font-size: 16px;
  }

  .maintenance-dispatch-actions
  .primary-action {
    width: 100%;
    min-height: 44px;
  }
}


/* =========================================================
   Maintenance Service History V1
========================================================= */

.maintenance-history-view {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.maintenance-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 18px;

  border: 1px solid #e1e8e4;
  border-radius: 14px;

  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #f8fcf9 100%
    );
}

.maintenance-history-head h3 {
  margin: 4px 0;
  font-size: 20px;
}

.maintenance-history-head p {
  margin: 0;
  color: #64748b;
  font-size: 11px;
}

.maintenance-history-eyebrow {
  color: #21864b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.maintenance-history-kpis {
  display: flex;
  gap: 8px;
}

.maintenance-history-kpis > div {
  min-width: 105px;

  padding: 10px 12px;

  border: 1px solid #dfe8e2;
  border-radius: 11px;

  background: #fff;
}

.maintenance-history-kpis strong {
  display: block;

  color: #167343;
  font-size: 21px;
}

.maintenance-history-kpis span {
  color: #64748b;
  font-size: 9px;
}

.maintenance-history-table-wrap {
  overflow-x: auto;

  border: 1px solid #e1e8e4;
  border-radius: 13px;

  background: #fff;
}

.maintenance-history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.maintenance-history-table th {
  padding: 11px 12px;

  color: #64748b;
  background: #f8faf9;

  border-bottom: 1px solid #e5ebe7;

  font-size: 9px;
  font-weight: 900;
  text-align: right;
}

.maintenance-history-table td {
  padding: 12px;

  border-bottom: 1px solid #edf1ee;

  color: #172033;
  font-size: 11px;
}

.maintenance-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.maintenance-history-table tbody tr:hover {
  background: #fbfdfc;
}

.maintenance-history-number {
  display: block;

  color: #16814e;
  font-size: 10px;
  font-weight: 900;
}

.maintenance-history-number + small {
  display: block;
  margin-top: 3px;

  color: #94a3b8;
  font-size: 8px;
}

.maintenance-history-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.maintenance-history-button,
.maintenance-history-icon-button {
  min-height: 34px;

  border: 1px solid #d8e3dc;
  border-radius: 8px;

  color: #315044;
  background: #fff;

  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
}

.maintenance-history-button {
  padding: 7px 10px;
}

.maintenance-history-button.primary {
  color: #fff;
  border-color: #21864b;
  background: #21864b;
}

.maintenance-history-icon-button {
  width: 34px;
}

.maintenance-history-button:hover,
.maintenance-history-icon-button:hover {
  border-color: #a9cdb7;
  background: #f6faf7;
}

.maintenance-history-button.primary:hover {
  background: #176d3d;
}

.maintenance-history-button:disabled {
  opacity: .55;
  cursor: default;
}

.maintenance-history-empty,
.maintenance-history-loading,
.maintenance-history-error {
  padding: 28px;
  text-align: center;
  color: #64748b;
}

.maintenance-history-error {
  color: #b42318;
}

@media (max-width: 760px) {
  .maintenance-history-head {
    flex-direction: column;
    align-items: stretch;
  }

  .maintenance-history-kpis {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .maintenance-history-kpis > div {
    min-width: 0;
  }
}


/* ==========================================================
   Maintenance report delivery
   ========================================================== */

.maintenance-history-send-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.maintenance-history-channel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  min-height: 34px;

  padding:
    7px
    10px;

  border:
    1px solid
    #dce6df;

  border-radius:
    8px;

  background:
    #ffffff;

  color:
    #34453b;

  font: inherit;
  font-size:
    12px;

  font-weight:
    700;

  cursor:
    pointer;
}

.maintenance-history-channel-button.whatsapp {
  color:
    #167343;

  border-color:
    #b9ddc7;

  background:
    #f1fbf5;
}

.maintenance-history-channel-button.email {
  color:
    #335d8c;

  border-color:
    #cadbea;

  background:
    #f5f9fd;
}

.maintenance-history-channel-button:disabled {
  opacity:
    .38;

  cursor:
    not-allowed;
}

.maintenance-history-delivery-feedback {
  display:
    block;

  width:
    100%;

  min-height:
    16px;

  margin-top:
    2px;

  color:
    #64748b;

  font-size:
    11px;
}

.maintenance-history-delivery-feedback[data-state="sent"] {
  color:
    #167343;
}

.maintenance-history-delivery-feedback[data-state="failed"] {
  color:
    #b42318;
}

.maintenance-history-delivery-feedback[data-state="pending"] {
  color:
    #8a6500;
}


/* ==========================================================
   Maintenance history report actions — alignment pass
   ========================================================== */

.maintenance-history-table td:last-child {
  vertical-align: middle;
}

.maintenance-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;

  min-width: max-content;
}

.maintenance-history-send-group {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;

  width: auto;
}

/*
 * All report controls share one geometry.
 */
.maintenance-history-button,
.maintenance-history-icon-button,
.maintenance-history-channel-button {
  box-sizing: border-box;

  height: 36px;
  min-height: 36px;

  margin: 0;

  border-radius: 8px;

  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;

  white-space: nowrap;
}

.maintenance-history-button,
.maintenance-history-channel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 6px;

  padding:
    0
    11px;
}

.maintenance-history-icon-button {
  display: inline-grid;
  place-items: center;

  width: 36px;
  min-width: 36px;

  padding: 0;
}

.maintenance-history-button i,
.maintenance-history-channel-button i,
.maintenance-history-icon-button i {
  margin: 0;

  font-size: 12px;
  line-height: 1;
}

/*
 * View is the primary document action.
 * Delivery channels are visually secondary.
 */
.maintenance-history-button {
  color: #315044;
  background: #ffffff;
}

.maintenance-history-channel-button.whatsapp {
  color: #167343;
  border-color: #b9ddc7;
  background: #f4fbf6;
}

.maintenance-history-channel-button.email {
  color: #335d8c;
  border-color: #cadbea;
  background: #f7fafd;
}

/*
 * Delivery result occupies its own second line so it never
 * changes the vertical alignment of the action buttons.
 */
.maintenance-history-delivery-feedback {
  position: absolute;

  top: calc(100% + 5px);
  right: 0;

  width: max-content;
  max-width: 270px;

  min-height: 0;
  margin: 0;

  font-size: 9px;
  line-height: 1.35;

  white-space: normal;
}

.maintenance-history-send-group {
  position: relative;
}

/*
 * Give the row enough breathing room when a delivery status
 * is displayed beneath the channel controls.
 */
.maintenance-history-table tbody td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.maintenance-history-table tbody tr:has(
  .maintenance-history-delivery-feedback:not(:empty)
) td {
  padding-bottom: 28px;
}


@media (max-width: 900px) {

  .maintenance-history-actions {
    flex-wrap: wrap;
    min-width: 0;
  }

  .maintenance-history-send-group {
    flex-wrap: wrap;
  }

  .maintenance-history-delivery-feedback {
    position: static;

    width: 100%;
    max-width: none;

    margin-top: 3px;
  }
}


/* AKABER MAINTENANCE STABILIZATION V1 */

.maintenance-resolve-customer-search {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 9px;
  background: #f8fff9;
}

.maintenance-resolve-customer-search:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow:
    0 0 0 3px
    rgba(34, 197, 94, .12);
}

.maintenance-eligibility-result {
  margin-top: 10px;
  border-radius: 9px;
  line-height: 1.75;
  font-size: 13px;
}

.maintenance-eligibility-result.success {
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.maintenance-eligibility-result.warning {
  padding: 10px 12px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.maintenance-eligibility-error:not(:empty) {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fef2f2;
  color: #b91c1c;
}



/* AKABER MAINTENANCE HISTORY SEARCH V1 */

.maintenance-history-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.maintenance-history-searchbox {
  position: relative;
  flex: 1;
  max-width: 720px;
}

.maintenance-history-searchbox i {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.maintenance-history-searchbox input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 42px 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.maintenance-history-searchbox input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow:
    0 0 0 3px
    rgba(34, 197, 94, .12);
}

.maintenance-history-filter-count {
  color: #64748b;
  font-size: 13px;
}

.maintenance-history-search-empty {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  text-align: center;
}

.maintenance-history-search-empty.hidden,
.maintenance-history-table
tr.hidden {
  display: none;
}

@media (max-width: 700px) {
  .maintenance-history-searchbar {
    flex-direction: column;
    align-items: stretch;
  }

  .maintenance-history-searchbox {
    max-width: none;
  }
}



/* AKABER MANUAL COVERAGE UI V1 */

.maintenance-manual-coverage {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  background: #f8fafc;
}

.maintenance-manual-coverage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.maintenance-manual-coverage-head strong {
  display: block;
  color: #172033;
}

.maintenance-manual-coverage-head p {
  margin: 4px 0 0;
  color: #64748b;
  line-height: 1.7;
  font-size: 12px;
}

.maintenance-manual-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.maintenance-manual-coverage label {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.maintenance-manual-coverage label > span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.maintenance-manual-coverage select,
.maintenance-manual-coverage textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  font: inherit;
}

.maintenance-manual-coverage select:focus,
.maintenance-manual-coverage textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow:
    0 0 0 3px
    rgba(34, 197, 94, .12);
}

.maintenance-manual-coverage-preview {
  display: none;
  gap: 4px;
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 9px;
  background: #f0fdf4;
}

.maintenance-manual-coverage-preview.visible {
  display: grid;
}

.maintenance-manual-coverage-preview strong {
  color: #166534;
}

.maintenance-manual-coverage-preview span {
  color: #3f6212;
  font-size: 12px;
  line-height: 1.7;
}

.maintenance-manual-coverage-error:not(:empty) {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
}



/* AKABER MAINTENANCE COMPLAINT ORIGIN CARD V1 */

.maintenance-origin-complaint-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  padding: 15px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.maintenance-origin-complaint-card > div {
  display: grid;
  gap: 4px;
}

.maintenance-origin-eyebrow {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.maintenance-origin-complaint-card strong {
  color: #1d4ed8;
}

.maintenance-origin-status {
  color: #475569;
  font-size: 12px;
}

@media (max-width: 700px) {
  .maintenance-origin-complaint-card {
    align-items: stretch;
    flex-direction: column;
  }
}



/* AKABER MAINTENANCE OPERATIONAL CARD V1 */

.maintenance-operational-slot {
  margin: 16px 0;
}

.maintenance-operational-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.maintenance-operational-card.is-overdue {
  border-color: #fed7aa;
  background: #fffaf5;
}

.maintenance-operational-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.maintenance-operational-head > div {
  display: grid;
  gap: 4px;
}

.maintenance-operational-state {
  padding: 5px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.maintenance-operational-warning {
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 800;
}

.maintenance-operational-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.maintenance-operational-grid > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
}

.maintenance-operational-grid span,
.maintenance-operational-section > span,
.maintenance-operational-report > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.maintenance-operational-section {
  display: grid;
  gap: 7px;
}

.maintenance-operational-section p {
  margin: 0;
  white-space: pre-wrap;
}

.maintenance-operational-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.maintenance-operational-tech {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
}

.maintenance-operational-tech small {
  padding: 2px 5px;
  border-radius: 999px;
  background: #ffffff;
}

.maintenance-operational-flag {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ecfdf5;
}

.maintenance-operational-flag.warning {
  background: #fff7ed;
}

.maintenance-operational-report {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.maintenance-operational-loading,
.maintenance-operational-error {
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
}

.maintenance-operational-error {
  background: #fef2f2;
}

@media (max-width: 700px) {
  .maintenance-operational-grid {
    grid-template-columns: 1fr;
  }

  .maintenance-operational-head {
    align-items: flex-start;
    flex-direction: column;
  }
}



/* AKABER MAINTENANCE EXCEPTION MANAGEMENT V1 */

.maintenance-operational-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.maintenance-operational-editor {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.maintenance-operational-editor[hidden] {
  display: none;
}

.maintenance-operational-editor label {
  display: grid;
  gap: 5px;
}

.maintenance-operational-editor label span {
  font-size: 12px;
  font-weight: 800;
}

.maintenance-operational-editor button {
  align-self: end;
}

.maintenance-operational-action-error {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .maintenance-operational-editor {
    grid-template-columns: 1fr;
  }
}



/* =========================================================
   AKABER MAINTENANCE FOLLOW-UP V1
   Reuses operational editor / action design language.
========================================================= */

.maintenance-follow-up-notes {
  grid-column: 1 / -1;
}

.maintenance-follow-up-editor textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  box-sizing: border-box;
}

.maintenance-follow-up-editor-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.maintenance-follow-up-editor select,
.maintenance-follow-up-editor input,
.maintenance-follow-up-editor textarea {
  max-width: 100%;
  box-sizing: border-box;
}


/*
 * Mobile is a first-class Akaber platform target.
 * Follow-up management must remain usable without
 * horizontal scrolling or precision clicking.
 */
@media (max-width: 700px) {

  .maintenance-follow-up-notes,
  .maintenance-follow-up-editor-actions {
    grid-column: auto;
  }

  .maintenance-follow-up-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .maintenance-follow-up-editor-actions button,
  .maintenance-operational-actions
    [data-maintenance-follow-up-open] {
    width: 100%;
    min-height: 44px;
  }

  .maintenance-follow-up-editor select,
  .maintenance-follow-up-editor input,
  .maintenance-follow-up-editor textarea {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }
}



/* =========================================================
   AKABER MAINTENANCE PAYMENT REQUIRED V2
   Shared Customer 360 payment workflow trigger.
========================================================= */

.maintenance-payment-required-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e2e8e4;
  border-radius: 12px;
  background: #fff;
}

.maintenance-payment-required-copy {
  min-width: 0;
  flex: 1 1 280px;
}

.maintenance-payment-required-eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
}

.maintenance-payment-required-card strong {
  display: block;
}

.maintenance-payment-required-card p {
  margin: 5px 0 0;
}

.maintenance-payment-required-error {
  flex: 0 0 100%;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 700px) {

  .maintenance-payment-required-card {
    align-items: stretch;
    flex-direction: column;
  }

  .maintenance-payment-required-copy {
    flex-basis: auto;
  }

  .maintenance-payment-required-card
  .primary-action {
    width: 100%;
    min-height: 44px;
  }
}



/* =========================================================
   AKABER MAINTENANCE CANCELLATION UI V1
========================================================= */

.maintenance-cancel-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #ead7d4;
  border-radius: 12px;
  background: #fff;
}

.maintenance-cancel-copy {
  flex: 1 1 300px;
  min-width: 0;
}

.maintenance-cancel-eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--danger);
}

.maintenance-cancel-copy strong {
  display: block;
}

.maintenance-cancel-copy p {
  margin: 5px 0 0;
}

.maintenance-cancel-error {
  flex: 0 0 100%;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.maintenance-operational-actions
.danger-button {
  min-height: 38px;
}

@media (max-width: 700px) {

  .maintenance-cancel-card {
    align-items: stretch;
    flex-direction: column;
  }

  .maintenance-cancel-copy {
    flex-basis: auto;
  }

  .maintenance-cancel-card
  .danger-button,
  .maintenance-operational-actions
  .danger-button {
    width: 100%;
    min-height: 44px;
  }
}



/* =========================================================
   AKABER MAINTENANCE CANCELLATION INLINE EDITOR V2
========================================================= */

.maintenance-cancel-editor {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
}

.maintenance-cancel-reason-field {
  grid-column: 1 / -1;
}

.maintenance-cancel-editor textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font: inherit;
}

.maintenance-cancel-editor-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 700px) {

  .maintenance-cancel-reason-field,
  .maintenance-cancel-editor-actions {
    grid-column: auto;
  }

  .maintenance-cancel-editor textarea {
    font-size: 16px;
  }

  .maintenance-cancel-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .maintenance-cancel-editor-actions button {
    width: 100%;
    min-height: 44px;
  }
}


/* AKABER MAINTENANCE NORMAL CLOSURE V1 */

.maintenance-close-actions {
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 700px) {
  .maintenance-close-actions
  .primary-action {
    width: 100%;
    min-height: 44px;
  }
}

/* =========================================================
   AKABER MAINTENANCE OVERDUE LIST VISIBILITY V1
========================================================= */

.maintenance-stat-overdue {
  border-inline-start: 3px solid #ea580c;
}

.maintenance-request-row.is-overdue {
  background: #fffaf5;
}

.maintenance-request-row.is-overdue:hover {
  background: #fff7ed;
}

.maintenance-list-status-stack {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.maintenance-list-overdue-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.maintenance-list-overdue-time {
  color: #9a3412;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .maintenance-list-overdue-badge {
    min-height: 28px;
  }

  .maintenance-list-overdue-time {
    white-space: normal;
  }
}
