/* =========================================================
   AKABER TECHNICIAN MOBILE V1
========================================================= */

.technician-page {
  padding:
    28px
    clamp(20px, 5vw, 72px)
    48px;
}

.technician-shell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.technician-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.technician-header h1 {
  margin: 5px 0 4px;
}

.technician-header p {
  margin: 0;
  color: #64748b;
}

.technician-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #eef4f0;
}

.technician-tabs button {
  flex: 1;
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-weight: 700;
}

.technician-tabs button.active {
  background: #fff;
  color: #167343;
  box-shadow:
    0 1px 4px
    rgba(15,23,42,.08);
}

.technician-job-list,
.technician-history-list {
  display: grid;
  gap: 12px;
}

.technician-job-card {
  width: 100%;
  display: block;
  text-align: right;
  border: 1px solid #e2e8e4;
  border-radius: 14px;
  background: #fff;
  padding: 17px;
  cursor: pointer;
  font: inherit;
  color: #172033;
  box-shadow:
    0 3px 12px
    rgba(15,23,42,.035);
}

.technician-job-card:hover {
  border-color: #95c9a9;
}

.technician-job-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.technician-visit-number {
  color: #16814e;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.technician-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef8f1;
  color: #167343;
  font-size: 11px;
  font-weight: 800;
}

.technician-customer {
  display: block;
  font-size: 17px;
  margin-bottom: 10px;
}

.technician-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 8px;
}

.technician-job-meta span {
  display: flex;
  gap: 6px;
  align-items: center;
}

.technician-job-card > small {
  color: #94a3b8;
}

.technician-detail {
  display: grid;
  gap: 14px;
}

.technician-back {
  justify-self: start;
  border: 0;
  background: transparent;
  color: #167343;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.technician-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 19px;
  border: 1px solid #dce8e1;
  border-radius: 15px;
  background:
    linear-gradient(
      135deg,
      #f6fcf8,
      #fff
    );
}

.technician-detail-hero h2 {
  margin: 6px 0 2px;
}

.technician-detail-hero p {
  margin: 0;
  color: #64748b;
}

.technician-info-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0,1fr));
  gap: 9px;
}

.technician-info-grid > div {
  padding: 12px;
  border: 1px solid #e7ece9;
  border-radius: 11px;
  background: #fff;
}

.technician-info-grid span {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  margin-bottom: 4px;
}

.technician-section {
  padding: 17px;
  border: 1px solid #e3e9e5;
  border-radius: 14px;
  background: #fff;
}

.technician-section h3 {
  margin: 0 0 13px;
}

.technician-text {
  white-space: pre-wrap;
  line-height: 1.8;
  color: #475569;
  margin: 0;
}

.technician-main-action {
  width: 100%;
  min-height: 51px;
  border: 0;
  border-radius: 12px;
  background: #21864b;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  font-size: 15px;
}

.technician-main-action:disabled {
  opacity: .55;
  cursor: wait;
}

.technician-action-message {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: #167343;
  font-size: 12px;
}

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

.technician-media-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #bdd6c6;
  border-radius: 11px;
  background: #f9fcfa;
  cursor: pointer;
}

.technician-media-card > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.technician-media-card strong {
  font-size: 12px;
}

.technician-media-card strong em {
  color: #dc2626;
  font-style: normal;
}

.technician-media-card span {
  color: #64748b;
  font-size: 11px;
}

.technician-media-card input {
  display: none;
}

.technician-photo-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #dbe6df;
  color: #167343 !important;
  font-weight: 800;
}

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

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

.technician-form-grid label > span,
.technician-checklist label > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.technician-form-grid textarea,
.technician-checklist textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #d7dee6;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  padding: 10px;
  font: inherit;
}

.technician-wide {
  grid-column: 1 / -1;
}

.technician-checklist {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #edf1ef;
}

.technician-checklist h4 {
  margin: 0 0 3px;
}

.technician-checklist > label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: 9px;
}

.technician-checklist input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #21864b;
}

.technician-signature-pad {
  width: 100%;
  height: 190px;
  display: block;
  box-sizing: border-box;
  touch-action: none;
  border: 1px dashed #b8c9bf;
  border-radius: 11px;
  background:
    linear-gradient(
      #fff,
      #fbfdfc
    );
}

.technician-signature-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}

.technician-signature-saved {
  padding: 13px;
  border-radius: 10px;
  background: #ecfdf3;
  color: #167343;
  font-weight: 800;
}

.technician-complete-section small {
  display: block;
  text-align: center;
  color: #94a3b8;
  margin-top: 8px;
}

.technician-completed {
  text-align: center;
  background: #f5fbf7;
}

.technician-completed > i {
  color: #21864b;
  font-size: 34px;
  margin-bottom: 7px;
}

.technician-history-card {
  display: grid;
  grid-template-columns:
    1fr 1.5fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid #e3e9e5;
  border-radius: 11px;
  background: #fff;
}

.technician-loading,
.technician-empty,
.technician-error {
  padding: 30px 18px;
  text-align: center;
  border-radius: 12px;
}

.technician-loading,
.technician-empty {
  color: #64748b;
  background: #f8faf9;
}

.technician-empty {
  display: grid;
  gap: 6px;
}

.technician-empty i {
  color: #21864b;
  font-size: 30px;
}

.technician-error {
  color: #b91c1c;
  background: #fff5f5;
}

.hidden {
  display: none !important;
}


@media (max-width: 700px) {

  .technician-page {
    padding:
      16px
      12px
      calc(
        32px
        + env(
          safe-area-inset-bottom
        )
      );
  }

  .technician-header {
    align-items: center;
  }

  .technician-header h1 {
    font-size: 24px;
  }

  .technician-header p {
    font-size: 12px;
  }

  .technician-info-grid,
  .technician-media-grid,
  .technician-form-grid {
    grid-template-columns: 1fr;
  }

  .technician-wide {
    grid-column: auto;
  }

  .technician-detail-hero {
    padding: 15px;
  }

  .technician-section {
    padding: 14px;
  }

  .technician-job-card {
    padding: 14px;
  }

  .technician-job-meta {
    display: grid;
    gap: 7px;
  }

  .technician-form-grid textarea,
  .technician-checklist textarea {
    font-size: 16px;
  }

  .technician-signature-pad {
    height: 220px;
  }

  .technician-signature-actions {
    display: grid;
    grid-template-columns:
      1fr 1fr;
  }

  .technician-signature-actions button {
    min-height: 44px;
  }

  .technician-history-card {
    grid-template-columns:
      1fr 1fr;
  }

  .technician-main-action {
    position: sticky;
    bottom:
      calc(
        10px
        + env(
          safe-area-inset-bottom
        )
      );
    z-index: 10;

    box-shadow:
      0 8px 24px
      rgba(33,134,75,.24);
  }
}


/* =========================================================
   TECHNICIAN ROLE SHELL V1
========================================================= */

/*
 * Technicians should not see management/sales/finance
 * navigation items that they cannot access.
 */
.akaber-technician-role
#nav
.nav-item:not([data-page="technician-jobs"]) {
  display: none !important;
}


/*
 * The sidebar navigation itself must be scrollable.
 * This also helps other roles with long navigation menus.
 */
#nav {
  min-height: 0;
  max-height:
    calc(100dvh - 220px);

  overflow-y: auto;
  overflow-x: hidden;

  overscroll-behavior:
    contain;

  -webkit-overflow-scrolling:
    touch;

  scrollbar-width:
    thin;

  padding-bottom: 24px;
}

#nav::-webkit-scrollbar {
  width: 6px;
}

#nav::-webkit-scrollbar-thumb {
  background:
    rgba(255,255,255,.28);

  border-radius: 999px;
}

#nav::-webkit-scrollbar-track {
  background: transparent;
}


@media (max-width: 700px) {
  #nav {
    max-height:
      calc(100dvh - 170px);
  }
}


/* =========================================================
   PROGRESSIVE VISIT REPORT V1.1
========================================================= */

.technician-progress {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0,1fr));
  gap: 6px;
  margin-bottom: 2px;
}

.technician-progress-step {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #94a3b8;
  font-size: 10px;
  text-align: center;
}

.technician-progress-step b {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #e8efeb;
  color: #64748b;
  font-variant-numeric:
    tabular-nums;
}

.technician-progress-step.active b {
  color: #fff;
  background: #21864b;
}

.technician-stage-label {
  display: inline-flex;
  margin-bottom: 6px;
  color: #21864b;
  font-size: 10px;
  font-weight: 900;
}

.technician-stage-help {
  margin:
    -4px 0 14px;
  color: #7c8b83;
  font-size: 11px;
  line-height: 1.7;
}

.technician-stage-media {
  margin-top: 14px;
}

.technician-result-section {
  border-color: #b8dbc5;
  background:
    linear-gradient(
      180deg,
      #fbfefc,
      #fff
    );
}


@media (max-width: 700px) {
  .technician-progress {
    position: sticky;
    top: 0;
    z-index: 15;

    margin:
      0 -12px
      4px;

    padding:
      9px 10px;

    background:
      rgba(255,255,255,.96);

    border-bottom:
      1px solid #e6ece8;

    backdrop-filter:
      blur(8px);
  }

  .technician-progress-step span {
    font-size: 8px;
  }

  .technician-progress-step b {
    width: 24px;
    height: 24px;
  }
}


/* =========================================================
   MAINTENANCE COMPLETION V2A — INLINE EVIDENCE
========================================================= */

.technician-inline-media {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fill,
      minmax(150px, 1fr)
    );

  gap: 10px;

  margin-bottom: 10px;
}

.technician-inline-media figure {
  overflow: hidden;

  margin: 0;

  border:
    1px solid #dce7e0;

  border-radius: 11px;

  background: #f7faf8;
}

.technician-inline-media img {
  display: block;

  width: 100%;
  height: 170px;

  object-fit: cover;

  background: #eef2ef;
}

.technician-inline-media figcaption {
  padding: 7px 9px;

  color: #64748b;

  font-size: 10px;

  font-weight: 700;
}

.technician-media-placeholder {
  display: grid;

  place-items: center;

  height: 170px;

  color: #94a3b8;

  background: #eef2ef;
}

.technician-completed-evidence-section {
  margin-top: 16px;
}

.technician-completed-evidence-section h4 {
  margin:
    0 0 8px;

  color: #334155;
}

.technician-history-card {
  width: 100%;

  border:
    1px solid #e3e9e5;

  font: inherit;

  color: inherit;

  text-align: inherit;

  cursor: pointer;
}

.technician-history-card:hover {
  border-color: #94c6a6;
}


@media (max-width: 700px) {

  .technician-inline-media {
    grid-template-columns:
      repeat(2, minmax(0,1fr));
  }

  .technician-inline-media img,
  .technician-media-placeholder {
    height: 145px;
  }

}


/* =========================================================
   TECHNICIAN HISTORY + MAP V1
========================================================= */

.technician-record-field {
  padding: 11px 12px;

  border:
    1px solid #e4eae6;

  border-radius: 9px;

  background: #fbfdfc;
}

.technician-record-field > span {
  display: block;

  margin-bottom: 4px;

  color: #94a3b8;

  font-size: 10px;

  font-weight: 700;
}

.technician-record-field > strong {
  display: block;

  white-space: pre-wrap;

  line-height: 1.7;
}

.technician-record-checks {
  display: grid;

  grid-template-columns:
    repeat(2,minmax(0,1fr));

  gap: 8px;

  margin:
    14px 0;
}

.technician-record-checks > div {
  display: flex;

  align-items: center;

  justify-content:
    space-between;

  gap: 10px;

  padding:
    10px 11px;

  border:
    1px solid #e5ebe7;

  border-radius: 9px;

  background: #fbfdfc;
}

.technician-record-checks span {
  color: #64748b;

  font-size: 11px;

  font-weight: 700;
}

.technician-yes,
.technician-no,
.technician-na {
  display: inline-flex !important;

  width: auto;

  padding:
    4px 8px;

  border-radius: 999px;

  font-weight: 900 !important;
}

.technician-yes {
  color: #167343 !important;
  background: #e9f8ef;
}

.technician-no {
  color: #9f1239 !important;
  background: #fff1f2;
}

.technician-na {
  color: #64748b !important;
  background: #f1f5f9;
}


.technician-map-shell {
  overflow: hidden;

  border:
    1px solid #dce7e1;

  border-radius: 15px;

  background: #fff;
}

.technician-map-summary {
  display: flex;

  align-items: center;

  justify-content:
    space-between;

  gap: 12px;

  padding:
    12px 15px;

  border-bottom:
    1px solid #e5ebe7;

  background: #fbfdfc;
}

.technician-map-summary span {
  color: #64748b;

  font-size: 11px;
}

.technician-map {
  width: 100%;
  height:
    min(
      680px,
      calc(100dvh - 330px)
    );

  min-height: 430px;

  direction: ltr;
}


.akaber-map-marker-shell {
  border: 0 !important;

  background: transparent !important;
}

.akaber-map-marker {
  display: grid;

  place-items: center;

  width: 36px;
  height: 36px;

  border:
    3px solid #fff;

  border-radius:
    50% 50% 50% 5px;

  transform:
    rotate(-45deg);

  color: #fff;

  background: #21864b;

  box-shadow:
    0 4px 14px
    rgba(15,23,42,.25);
}

.akaber-map-marker i {
  transform:
    rotate(45deg);

  font-size: 13px;
}

.technician-map-tooltip {
  display: grid;

  gap: 3px;

  min-width: 120px;

  font-family: inherit;
}

.technician-map-tooltip span {
  color: #64748b;

  font-size: 11px;
}


@media (max-width: 700px) {

  .technician-record-checks {
    grid-template-columns:
      1fr;
  }

  .technician-map-shell {
    margin:
      0 -12px;

    border-left: 0;
    border-right: 0;

    border-radius: 0;
  }

  .technician-map {
    height:
      calc(100dvh - 285px);

    min-height: 500px;
  }

  .technician-map-summary {
    padding:
      10px 12px;
  }

}

/* =========================================================
   TECHNICIAN INSTALLATION V1
========================================================= */

.technician-installation-list,
.technician-installation-sections {
  display: grid;
  gap: 12px;
}

.technician-installation-section {
  overflow: hidden;
  border: 1px solid #e1e8e4;
  border-radius: 12px;
  background: #fff;
}

.technician-installation-section-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  padding: 13px;
  background: #f7faf8;
  color: #172033;
  text-align: start;
  cursor: pointer;
  font: inherit;
}

.technician-installation-section-head small {
  display: block;
  margin-top: 3px;
  color: #64748b;
}

.technician-installation-section-body {
  display: grid;
}

.technician-installation-section.collapsed
.technician-installation-section-body {
  display: none;
}

.technician-installation-section.collapsed
.technician-installation-section-head i {
  transform: rotate(90deg);
}

.technician-installation-item {
  padding: 12px 13px;
  border-top: 1px solid #edf1ef;
}

.technician-installation-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.technician-installation-item-head small {
  display: block;
}

.technician-installation-evidence {
  margin-top: 4px;
  color: #a16207;
}

.technician-installation-note {
  margin-top: 4px;
  color: #64748b;
}

.technician-installation-status {
  min-width: 125px;
  border: 1px solid #cfdcd5;
  border-radius: 9px;
  padding: 8px 9px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 12px;
}

.technician-installation-inline {
  margin-top: 9px;
}

.technician-installation-reason {
  border-radius: 10px;
  padding: 11px;
  background: #fff8e8;
  border: 1px solid #eed69a;
}

.technician-installation-reason label {
  display: grid;
  gap: 6px;
}

.technician-installation-reason textarea,
.technician-installation-field input,
.technician-installation-field select,
.technician-installation-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cedbd5;
  border-radius: 9px;
  padding: 10px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.technician-installation-reason-actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.technician-installation-reason-actions
.technician-main-action {
  width: auto;
  min-height: 40px;
  padding: 0 18px;
}

.technician-installation-lift-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.technician-installation-lift-head h3 {
  margin: 5px 0 0;
}

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

.technician-installation-field {
  display: grid;
  gap: 6px;
  margin-bottom: 11px;
}

.technician-installation-field > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.technician-installation-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0 14px;
}

.technician-installation-empty {
  padding: 13px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 650px) {
  .technician-installation-grid {
    grid-template-columns: 1fr;
  }

  .technician-installation-item-head {
    align-items: stretch;
    flex-direction: column;
  }

  .technician-installation-status {
    width: 100%;
  }
}

/* =========================================================
   TECHNICIAN INSTALLATION EVIDENCE V1
========================================================= */

.technician-installation-evidence-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d8e3dd;
}

.technician-installation-evidence-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.technician-installation-evidence-toolbar
.secondary-action {
  min-height: 38px;
}

.technician-installation-evidence-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef8f1;
  color: #167343;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.technician-installation-evidence-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.technician-installation-evidence-thumb {
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid #d6e1db;
  border-radius: 10px;
  padding: 0;
  background: #f7faf8;
  cursor: pointer;
}

.technician-installation-evidence-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.technician-installation-evidence-thumb.expanded {
  width: min(100%, 420px);
  height: auto;
  flex-basis: 100%;
}

.technician-installation-evidence-thumb.expanded img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  background: #111;
}

.technician-installation-evidence-loading,
.technician-installation-evidence-load-error {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #94a3b8;
}

.technician-installation-evidence-load-error {
  color: #b42318;
}

.technician-installation-no-evidence {
  color: #94a3b8;
}

/* Technician checklist issue v1 */

.technician-installation-item-actions {
  margin-top: 9px;
}

.technician-installation-item-issue {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #ead9d5;
  border-radius: 12px;
  background: #fff9f7;
}

.technician-installation-item-issue[hidden] {
  display: none;
}

.technician-installation-item-issue input[type="text"],
.technician-installation-item-issue textarea,
.technician-installation-item-issue select {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 9px;
}

.technician-installation-item-issue-options {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.technician-installation-item-issue-options label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.technician-installation-item-issue-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


/* ============================================================
   TECHNICIAN FIELD ISSUE UX V1.2
   Compact checkbox + prominent success confirmation
   ============================================================ */


/* Main Raise Field Issue checkbox */

label.technician-installation-checkbox {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;

  width: fit-content !important;
  max-width: 100% !important;

  margin: 2px 0 14px !important;
  padding: 0 !important;

  cursor: pointer;
}

label.technician-installation-checkbox
input[type="checkbox"] {
  display: inline-block !important;

  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;

  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;

  margin: 0 !important;
  padding: 0 !important;

  flex: 0 0 18px !important;

  cursor: pointer;
}

label.technician-installation-checkbox span {
  display: inline-block !important;

  width: auto !important;
  min-width: 0 !important;

  margin: 0 !important;
  padding: 0 !important;

  line-height: 1.45;
}


/* Checklist-item Raise Issue checkbox */

.technician-installation-item-issue-options label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;

  width: fit-content !important;
  max-width: 100% !important;

  margin: 0 !important;
  padding: 0 !important;

  cursor: pointer;
}

.technician-installation-item-issue-options
label
input[type="checkbox"] {
  display: inline-block !important;

  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;

  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;

  margin: 0 !important;
  padding: 0 !important;

  flex: 0 0 18px !important;
}


/* Successful issue submission */

.technician-action-message.is-success {
  display: block !important;

  width: 100%;
  box-sizing: border-box;

  margin-top: 12px;
  padding: 12px 14px;

  border: 1px solid #86d7a3;
  border-radius: 10px;

  background: #eaf8ef;

  color: #166534;

  font-weight: 700;
  line-height: 1.45;
}

.technician-action-message.is-success::before {
  content: "✓";

  display: inline-block;

  margin-inline-end: 7px;

  font-weight: 900;
}


/* Existing error state support */

.technician-action-message.is-error {
  display: block !important;

  width: 100%;
  box-sizing: border-box;

  margin-top: 12px;
  padding: 12px 14px;

  border: 1px solid #f2aaa4;
  border-radius: 10px;

  background: #fff0ee;

  color: #b42318;

  font-weight: 700;
  line-height: 1.45;
}


@media (max-width: 720px) {

  label.technician-installation-checkbox,
  .technician-installation-item-issue-options label {
    width: fit-content !important;
    max-width: 100% !important;
  }

}


/* ============================================================
   QA REWORK TECHNICIAN NOTICE V2A
   ============================================================ */

.technician-qa-rework-alert {
  display: flex;
  align-items: flex-start;

  gap: 12px;

  margin: 14px 0 18px;
  padding: 14px;

  border: 1px solid #f5b7a8;
  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      #fff7ed 0%,
      #fff1f2 100%
    );

  color: #7c2d12;
}

.technician-qa-rework-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 38px;

  width: 38px;
  height: 38px;

  border-radius: 50%;

  background: #c2410c;

  color: #fff;

  font-size: 16px;
}

.technician-qa-rework-content {
  display: flex;
  flex-direction: column;

  gap: 5px;

  min-width: 0;
}

.technician-qa-rework-content > strong {
  color: #9a3412;

  font-size: 15px;
  font-weight: 800;
}

.technician-qa-rework-label {
  color: #9a3412;

  font-size: 12px;
  font-weight: 700;
}

.technician-qa-rework-content p {
  margin: 0;

  color: #7c2d12;

  font-size: 14px;
  font-weight: 700;

  line-height: 1.65;

  white-space: pre-wrap;
}

.technician-qa-rework-content small {
  color: #9a3412;

  font-size: 11px;

  line-height: 1.5;
}


@media (max-width: 620px) {

  .technician-qa-rework-alert {
    gap: 10px;

    padding: 12px;
  }

  .technician-qa-rework-icon {
    flex-basis: 34px;

    width: 34px;
    height: 34px;
  }

}


/* ============================================================
   QA REWORK CHECKLIST ITEM TAG V2B
   ============================================================ */

.technician-qa-rework-item-tag {
  display: inline-flex;
  align-items: center;

  gap: 5px;

  margin-top: 5px;
  padding: 4px 7px;

  border-radius: 999px;

  background: #fff1e8;

  color: #c2410c;

  font-size: 11px;
  font-weight: 800;
}


/* ============================================================
   AKABER TECHNICIAN MOBILE HARDENING V1
   Phone-first execution controls
============================================================ */

@media (max-width: 700px) {

  /*
   * Never allow technician content itself to force the
   * application wider than the phone viewport.
   */
  #page-technician-jobs,
  #page-technician-jobs *,
  .technician-detail,
  .technician-detail *,
  .technician-section,
  .technician-installation-section,
  .technician-installation-section-body,
  .technician-installation-item {
    box-sizing: border-box;
    max-width: 100%;
  }


  /*
   * One-column execution forms.
   */
  .technician-form-grid,
  .technician-installation-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .technician-wide {
    grid-column: auto !important;
  }


  /*
   * Minimum practical field size for mobile field work.
   * 16px font prevents iOS Safari from zooming form controls.
   */
  #page-technician-jobs input:not([type="checkbox"]):not([type="radio"]),
  #page-technician-jobs select,
  #page-technician-jobs textarea,
  .technician-installation-field input:not([type="checkbox"]):not([type="radio"]),
  .technician-installation-field select,
  .technician-installation-field textarea,
  .technician-installation-item-issue input[type="text"],
  .technician-installation-item-issue select,
  .technician-installation-item-issue textarea {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    font-size: 16px;
  }

  #page-technician-jobs textarea,
  .technician-installation-field textarea,
  .technician-installation-item-issue textarea {
    min-height: 110px;
    resize: vertical;
  }


  /*
   * Primary field actions must be easy to hit with one hand.
   */
  .technician-main-action,
  .technician-photo-button,
  .technician-back,
  .technician-signature-actions button,
  .technician-installation-item-actions button,
  .technician-installation-item-issue-buttons button,
  .technician-installation-evidence-toolbar button,
  #page-technician-jobs .primary-button,
  #page-technician-jobs .secondary-action,
  #page-technician-jobs button {
    min-height: 46px;
    touch-action: manipulation;
  }


  /*
   * Full-width important actions.
   */
  .technician-main-action,
  .technician-photo-button {
    width: 100%;
    justify-content: center;
  }


  /*
   * Avoid tiny adjacent buttons in issue/rework forms.
   */
  .technician-installation-item-issue-buttons,
  .technician-signature-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .technician-installation-item-issue-buttons > *,
  .technician-signature-actions > * {
    width: 100%;
  }


  /*
   * Checklist/status controls need breathing room.
   */
  .technician-checklist,
  .technician-installation-item,
  .technician-installation-item-issue {
    overflow-wrap: anywhere;
  }

  .technician-installation-item-head {
    align-items: flex-start;
    gap: 10px;
  }


  /*
   * Evidence/photo controls.
   */
  .technician-installation-evidence-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .technician-installation-evidence-toolbar button,
  .technician-installation-evidence-pick {
    width: 100%;
    min-height: 46px;
  }

  .technician-installation-evidence-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      ) !important;
    gap: 8px;
  }

  .technician-installation-evidence-grid img,
  .technician-completed-evidence-section img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }


  /*
   * Signature pad must never be wider than the phone.
   */
  .technician-signature-pad,
  #technician-signature-pad {
    width: 100% !important;
    max-width: 100%;
    touch-action: none;
  }


  /*
   * Jobs and history remain cards, never desktop tables.
   */
  .technician-job-card,
  .technician-history-card {
    width: 100%;
    min-width: 0;
  }


  /*
   * Prevent very long identifiers/addresses/notes from
   * pushing cards wider than the viewport.
   */
  .technician-job-card,
  .technician-job-card *,
  .technician-history-card,
  .technician-history-card *,
  .technician-detail-hero,
  .technician-detail-hero *,
  .technician-installation-item,
  .technician-installation-item * {
    overflow-wrap: anywhere;
    word-break: normal;
  }


  /*
   * Checkbox/radio rows: larger tap region without altering
   * native control semantics.
   */
  .technician-checklist label,
  .technician-installation-checkbox,
  .technician-installation-item-issue-options label {
    min-height: 44px;
    padding-block: 7px;
  }

  .technician-checklist input[type="checkbox"],
  .technician-checklist input[type="radio"],
  .technician-installation-checkbox input,
  .technician-installation-item-issue-options input {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
  }


  /*
   * Keep completion action comfortably separated from the
   * phone's bottom browser/navigation area.
   */
  .technician-complete-section {
    padding-bottom:
      calc(
        18px
        + env(
          safe-area-inset-bottom
        )
      );
  }
}


@media (max-width: 390px) {

  .technician-installation-evidence-grid {
    grid-template-columns: 1fr !important;
  }

}
