/* UNI-T classic viewer mode. Scoped to preserve V1 and V2. */
body.ui-unit {
  --text: #111;
  --muted: #4a4a4a;
  --soft: #f3f3f3;
  --glass: #fff;
  --glass-strong: #f7f7f7;
  --border: #b9b9b9;
  --border-strong: #7d7d7d;
  --cyan: #1b8dbb;
  --pink: #d85d22;
  --mint: #12a75b;
  --orange: #db6b1e;
  --violet: #4c73a6;
  --green: #13914a;
  --red: #bf1e1e;
  --shadow: none;
  --radius-xl: 0;
  --radius-lg: 0;
  --radius-md: 0;
  color: var(--text);
  background: #efefef;
}

body.ui-unit .ambient,
body.ui-unit .v2-sidebar,
body.ui-unit .v2-topbar-title,
body.ui-unit .brand-mark,
body.ui-unit .pane-heading p,
body.ui-unit #batch-standard-panel {
  display: none;
}

body.ui-unit .app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.ui-unit .topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto auto auto;
  gap: 8px;
  min-height: 52px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #9a9a9a;
  border-radius: 0;
  padding: 0 8px;
  color: #111;
  background: #f7f7f7;
  box-shadow: none;
}

body.ui-unit .brand {
  display: block;
}

body.ui-unit .brand h1 {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}

body.ui-unit .brand h1::before {
  content: "UNI-T ";
  color: #e31812;
  font-size: 10px;
  font-weight: 900;
}

body.ui-unit .brand p {
  display: none;
}

body.ui-unit .mode-tabs,
body.ui-unit .language-switch,
body.ui-unit .ui-version-switch {
  align-self: end;
  gap: 1px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.ui-unit .tab-button,
body.ui-unit .lang-button,
body.ui-unit .ui-version-button,
body.ui-unit .secondary-action,
body.ui-unit .primary-action,
body.ui-unit .report-download {
  min-height: 28px;
  border: 1px solid #8b8b8b;
  border-radius: 0;
  padding: 4px 10px;
  color: #111;
  background: linear-gradient(#fefefe, #dcdcdc);
  box-shadow: none;
  font-size: 12px;
  font-weight: 400;
}

body.ui-unit .tab-button.is-active,
body.ui-unit .lang-button.is-active,
body.ui-unit .ui-version-button.is-active {
  border-color: #d96b20;
  color: #fff;
  background: #4b4b4b;
}

body.ui-unit .composer-temperature-info,
body.ui-unit .composer-temperature-info h4,
body.ui-unit .composer-temperature-info td {
  color: #111;
}

body.ui-unit .composer-temperature-info th {
  color: #fff !important;
  background: #585858 !important;
}

body.ui-unit .composer-sheet .composer-temperature-info th {
  color: #fff !important;
}

body.ui-unit .composer-sheet td:has(.composer-sheet-report-block) {
  color: #111;
  background: #fff;
}

/* In UNI-T Files view, show image filenames only. Device/QR strings stay in data exports. */
body.ui-unit .result-view[data-view="batch"].is-active {
  grid-template-rows: auto auto minmax(0, 1fr);
}

body.ui-unit .device-strip,
body.ui-unit #batch-device-strip {
  display: none;
}

body.ui-unit #batch-table {
  grid-row: 3;
}

body.ui-unit .batch-card .batch-card-head,
body.ui-unit .batch-card:first-child .batch-card-head,
body.ui-unit .batch-card:not(:first-child) .batch-card-head,
body.ui-unit .batch-card .batch-facts,
body.ui-unit .batch-card:first-child .batch-facts,
body.ui-unit .batch-card:not(:first-child) .batch-facts {
  display: none !important;
}

body.ui-unit .batch-card .batch-previews figcaption,
body.ui-unit .batch-card:first-child .batch-previews figcaption,
body.ui-unit .batch-card:not(:first-child) .batch-previews figcaption {
  color: #111;
  font-weight: 400;
}

/* UNI-T viewer mode: click a thumbnail in Files view to inspect and add points. */
body.ui-unit .zoom-modal {
  place-items: stretch;
  padding: 0;
  height: 100dvh;
  overflow: hidden;
  background: #f4f4f4;
}

body.ui-unit .zoom-backdrop {
  display: none;
}

body.ui-unit .zoom-panel {
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) clamp(340px, 31vw, 460px);
  grid-template-rows: 44px minmax(0, 1fr) auto;
  grid-template-areas:
    "toolbar info"
    "image info"
    "editor info";
  gap: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  color: #111;
  background: #f7f7f7;
  box-shadow: none;
}

body.ui-unit .zoom-panel::before {
  content: "59.7\a 54.5\a 49.3\a 44.1\a 38.9\a 33.8\a 28.6\a 23.4\a 18.2\a 13.0\a 7.8";
  grid-area: scale;
  align-self: stretch;
  display: none;
  box-sizing: border-box;
  width: 92px;
  border-right: 1px solid #cfcfcf;
  padding: 26px 48px 26px 0;
  color: #333;
  font-size: 13px;
  line-height: calc((100vh - 52px) / 10.2);
  text-align: right;
  white-space: pre-line;
  background:
    linear-gradient(to bottom, #fffbd1 0%, #fff526 20%, #ff9a05 42%, #e32474 62%, #9100c7 80%, #030936 100%) right 20px top 26px / 22px calc(100% - 52px) no-repeat,
    #fff;
}

body.ui-unit .zoom-header {
  grid-area: toolbar;
  align-items: center;
  border-bottom: 1px solid #d3d3d3;
  padding: 4px 10px;
  background: #fff;
}

body.ui-unit .zoom-header .status-text,
body.ui-unit .zoom-header h2 {
  display: inline-block;
  margin: 0;
  color: #111;
  font-size: 14px;
  font-weight: 700;
}

body.ui-unit .zoom-header .status-text {
  margin-right: 12px;
  color: #333;
  font-size: 12px;
  font-weight: 400;
}

body.ui-unit .zoom-actions {
  gap: 4px;
}

body.ui-unit .zoom-tool-action {
  min-width: 104px;
  font-weight: 700;
}

body.ui-unit .zoom-tool-action.is-active {
  border-color: #d96b20;
  color: #fff;
  background: #4b4b4b;
}

body.ui-unit [data-zoom-line] {
  margin-right: 16px;
}

body.ui-unit #zoom-level {
  color: #111;
}

body.ui-unit .zoom-close,
body.ui-unit .zoom-actions button,
body.ui-unit .zoom-editor button {
  min-height: 30px;
  border: 1px solid #8f8f8f;
  border-radius: 0;
  color: #111;
  background: linear-gradient(#fff, #e4e4e4);
  box-shadow: none;
}

body.ui-unit .zoom-image-button {
  grid-area: image;
  place-self: center;
  width: min(72vh, 720px);
  max-width: calc(100vw - 520px);
  max-height: calc(100vh - 96px);
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: auto;
  background: #fff;
  box-shadow: none;
}

body.ui-unit .zoom-panel:has([data-zoom-polygon].is-active) .zoom-image-button,
body.ui-unit .zoom-panel:has([data-zoom-line].is-active) .zoom-image-button {
  cursor: crosshair;
}

body.ui-unit .zoom-image-button img {
  width: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
}

body.ui-unit .zoom-annotation-layer {
  color: #00f08a;
}

body.ui-unit .zoom-measurement-marker {
  z-index: 3;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px #111);
}

body.ui-unit .zoom-measurement-marker::before,
body.ui-unit .zoom-measurement-marker::after {
  background: var(--marker-color, #00f08a);
}

body.ui-unit .zoom-measurement-label {
  color: var(--marker-color, #00f08a);
  background: transparent;
  text-shadow: 0 1px 1px #fff, 0 -1px 1px #fff, 1px 0 1px #fff, -1px 0 1px #fff;
}

body.ui-unit .unit-temperature-color-input {
  width: 28px;
  height: 22px;
  border: 1px solid #888;
  border-radius: 0;
  padding: 0;
  background: #fff;
}

body.ui-unit .zoom-marker {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 0 2px #111);
}

body.ui-unit .zoom-marker::before {
  width: 2px;
  height: 16px;
}

body.ui-unit .zoom-marker::after {
  width: 16px;
  height: 2px;
}

body.ui-unit .zoom-editor {
  position: absolute;
  left: 92px;
  bottom: 18px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto auto;
  gap: 6px;
  border: 1px solid #8f8f8f;
  padding: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px rgba(0,0,0,.24);
}

body.ui-unit .zoom-editor[hidden] {
  display: none;
}

body.ui-unit .zoom-editor input {
  border: 1px solid #8f8f8f;
  border-radius: 0;
  color: #111;
  background: #fff;
}

body.ui-unit .zoom-editor button {
  min-width: 72px;
  font-size: 12px;
}

body.ui-unit .unit-viewer-info {
  grid-area: info;
  display: block;
  min-height: 0;
  border-left: 1px solid #a8a8a8;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #111;
  background: #fff;
}

body.ui-unit .unit-viewer-info > * + * {
  margin-top: 8px;
}

body.ui-unit .unit-viewer-info[hidden] {
  display: none;
}

body.ui-unit .unit-viewer-info h3 {
  margin: 0;
  border-bottom: 1px solid #8f8f8f;
  padding: 0 0 4px;
  color: #111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
}

body.ui-unit .unit-photo-info,
body.ui-unit .unit-temperature-info {
  border: 1px solid #9a9a9a;
  background: #fff;
}

body.ui-unit .unit-photo-info dl {
  margin: 0;
}

body.ui-unit .unit-photo-info div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 42px;
  border-bottom: 1px solid #d0d0d0;
}

body.ui-unit .unit-photo-info div:last-child {
  border-bottom: 0;
}

body.ui-unit .unit-photo-info dt,
body.ui-unit .unit-photo-info dd {
  margin: 0;
  padding: 10px 8px;
  color: #111;
  font-size: 14px;
  line-height: 1.2;
}

body.ui-unit .unit-photo-info dt {
  border-right: 1px solid #d0d0d0;
  text-align: right;
}

body.ui-unit .unit-photo-info dd {
  font-weight: 700;
  text-align: left;
}

body.ui-unit .unit-photo-info dd:has(.zoom-capture-time-edit) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.ui-unit .unit-photo-info dd:has(.zoom-capture-time-edit) span {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.ui-unit .zoom-capture-time-edit,
body.ui-unit .zoom-capture-time-actions button {
  flex: 0 0 auto;
  border: 1px solid #999;
  padding: 5px 8px;
  color: #111;
  background: #f5f5f5;
  font-size: 13px;
}

body.ui-unit .zoom-capture-time-form:not([hidden]) {
  display: grid;
  gap: 8px;
  padding: 10px;
}

body.ui-unit .zoom-capture-time-form label {
  display: grid;
  gap: 5px;
  font-size: 13px;
}

body.ui-unit .zoom-capture-time-form input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

body.ui-unit .zoom-capture-time-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.ui-unit .unit-temperature-info {
  overflow: hidden;
}

body.ui-unit .unit-temperature-info summary {
  padding: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

body.ui-unit .unit-temperature-info table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #111;
}

body.ui-unit .unit-temperature-info thead {
  display: none;
}

body.ui-unit .unit-temperature-info tbody {
  display: grid;
  gap: 8px;
  padding: 8px;
}

body.ui-unit .unit-temperature-info tr {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
  border: 1px solid #d0d0d0;
  padding: 8px 10px;
  background: #fafafa;
}

body.ui-unit .unit-temperature-info td {
  min-width: 0;
  border: 0;
  border-bottom: 1px solid #e2e2e2;
  padding: 6px 0;
  color: #111;
  font-size: 13px;
  text-align: left;
  overflow-wrap: anywhere;
}

body.ui-unit .unit-temperature-info td::before {
  display: block;
  margin-bottom: 3px;
  color: #666;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

body.ui-unit .unit-temperature-info td:first-child {
  grid-column: 1 / -1;
  padding-right: 32px;
  font-weight: 700;
}

body.ui-unit .unit-temperature-info td:nth-child(1)::before { content: "Tên điểm đo"; }
body.ui-unit .unit-temperature-info td:nth-child(2)::before { content: "Loại"; }
body.ui-unit .unit-temperature-info td:nth-child(3)::before { content: "Màu"; }
body.ui-unit .unit-temperature-info td:nth-child(4)::before { content: "Cao nhất"; }
body.ui-unit .unit-temperature-info td:nth-child(5)::before { content: "Thấp nhất"; }
body.ui-unit .unit-temperature-info td:nth-child(6)::before { content: "Trung bình"; }
body.ui-unit .unit-temperature-info td:nth-child(7)::before { content: "Chênh lệch"; }
body.ui-unit .unit-temperature-info td:nth-child(8)::before { content: "Mức"; }

body.ui-unit .unit-temperature-info td:last-child {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  padding: 0;
}

body.ui-unit .unit-temperature-delete-button {
  min-width: 24px;
  min-height: 24px;
  border: 1px solid #8f8f8f;
  background: #f7f7f7;
  color: #111;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

body.ui-unit .unit-temperature-delete-button:hover {
  border-color: #e0642f;
  color: #e0642f;
}

body.ui-unit #batch-table .thermal-measure-target {
  cursor: zoom-in;
}

@media (max-width: 980px) {
  body.ui-unit .zoom-modal {
    overflow-y: auto;
  }

  body.ui-unit .zoom-panel {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    min-height: 100dvh;
    overflow: visible;
  }

  body.ui-unit .zoom-panel::before {
    width: 54px;
    padding-right: 28px;
    font-size: 10px;
    line-height: calc((66vh - 52px) / 18);
    background-size: 16px calc(100% - 52px);
    background-position: right 10px top 26px;
  }

  body.ui-unit .zoom-image-button {
    flex: none;
    width: min(100%, 70vh);
    max-width: calc(100vw - 64px);
    margin: 12px auto;
  }

  body.ui-unit .unit-viewer-info {
    flex: none;
    overflow: visible;
  }
}

body.ui-unit .topbar-action {
  min-width: 0;
  align-self: end;
}

body.ui-unit .plant-switch {
  min-width: 120px;
}

body.ui-unit .project-screen,
body.ui-unit .workspace,
body.ui-unit .control-panel,
body.ui-unit .result-panel,
body.ui-unit .tab-pane,
body.ui-unit .result-view {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.ui-unit .workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 52px);
  padding: 0;
}

body.ui-unit .control-panel {
  border-right: 1px solid #6f6f6f;
  background: #f7f7f7;
}

body.ui-unit .tab-pane {
  padding: 8px 6px;
}

body.ui-unit .pane-heading h2 {
  border: 1px solid #707070;
  border-bottom: 0;
  padding: 5px 8px;
  color: #fff;
  background: #595959;
  font-size: 16px;
  font-weight: 700;
}

body.ui-unit form,
body.ui-unit fieldset,
body.ui-unit .render-options,
body.ui-unit .scan-fieldset {
  border: 1px solid #ababab;
  border-radius: 0;
  background: #fff;
}

body.ui-unit input,
body.ui-unit select,
body.ui-unit textarea {
  border: 1px solid #8e8e8e;
  border-radius: 0;
  color: #111;
  background: #fff;
}

body.ui-unit .result-panel {
  overflow: hidden;
  padding: 0;
  background: #fff;
}

body.ui-unit .result-view[data-view="batch"].is-active {
  display: grid;
  grid-template-columns: 110px minmax(520px, 1fr) 280px;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: calc(100vh - 52px);
}

body.ui-unit .result-view[data-view="batch"].is-active::before {
  content: "°C";
  grid-column: 1;
  grid-row: 1 / 4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 28px;
  border-right: 1px solid #d0d0d0;
  color: #111;
  background:
    linear-gradient(to top, #080058 0%, #a500b5 18%, #ec3959 38%, #ff8c00 56%, #fff319 78%, #fffffb 100%) 62px 64px / 24px calc(100% - 116px) no-repeat,
    linear-gradient(#fff, #fff);
}

body.ui-unit .result-view[data-view="batch"].is-active::after {
  content: "7.8\a 13.0\a 18.2\a 23.4\a 28.6\a 33.8\a 38.9\a 44.1\a 49.3\a 54.5\a 59.7";
  white-space: pre;
  grid-column: 1;
  grid-row: 1 / 4;
  z-index: 1;
  align-self: stretch;
  padding: 72px 54px 30px 22px;
  color: #4a4a4a;
  font-size: 14px;
  line-height: calc((100vh - 168px) / 10);
  text-align: right;
  pointer-events: none;
}

body.ui-unit .batch-summary {
  display: contents;
}

body.ui-unit #batch-standard-panel {
  display: none;
}

body.ui-unit .result-view[data-view="batch"].is-active > .result-header {
  grid-column: 2;
  grid-row: 1;
  min-height: 54px;
  border-bottom: 1px solid #d8d8d8;
  padding: 8px 14px;
  color: #111;
  background: #fff;
}

body.ui-unit #batch-status {
  color: #111;
  font-size: 12px;
  font-weight: 400;
}

body.ui-unit #batch-title {
  color: #111;
  font-size: 20px;
  font-weight: 400;
}

body.ui-unit #batch-title::after {
  content: "Scan Date/Time: " attr(data-scan-date);
  display: block;
  margin-top: 4px;
  color: #333;
  font-size: 12px;
}

body.ui-unit #batch-metrics {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-left: 1px solid #8b8b8b;
  border-bottom: 1px solid #8b8b8b;
  background: #fff;
}

body.ui-unit .metric {
  min-height: 42px;
  border-right: 1px solid #c9c9c9;
  border-bottom: 1px solid #dcdcdc;
  border-radius: 0;
  padding: 5px 8px;
  background: #fff;
}

body.ui-unit .metric span {
  color: #333;
  font-size: 11px;
  font-weight: 400;
}

body.ui-unit .metric strong {
  color: #111;
  font-size: 15px;
}

body.ui-unit .device-strip {
  grid-column: 3;
  grid-row: 2;
  overflow: auto;
  display: flex;
  gap: 4px;
  border-left: 1px solid #8b8b8b;
  border-bottom: 1px solid #8b8b8b;
  padding: 6px;
  background: #fff;
}

body.ui-unit .device-strip span {
  border: 1px solid #8b8b8b;
  border-radius: 0;
  padding: 3px 6px;
  color: #111;
  background: #f2f2f2;
  font-size: 12px;
}

body.ui-unit #batch-table {
  grid-column: 2 / 4;
  grid-row: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 278px;
  gap: 0;
  align-content: start;
  overflow: auto;
  max-height: calc(100vh - 144px);
  background: #fff;
}

body.ui-unit .batch-card {
  grid-column: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0 26px 18px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #111;
  background: #fff;
  box-shadow: none;
}

body.ui-unit .batch-card:not(:first-child) .batch-card-head {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
}

body.ui-unit .batch-card:not(:first-child) .batch-card-head strong {
  display: block;
  color: #111;
  font-size: 15px;
  font-weight: 400;
}

body.ui-unit .batch-card:not(:first-child) .batch-card-head span,
body.ui-unit .batch-card:not(:first-child) .batch-card-head small,
body.ui-unit .batch-card:not(:first-child) .batch-card-head mark,
body.ui-unit .batch-card:not(:first-child) .batch-facts,
body.ui-unit .batch-card:not(:first-child) .measurement-list,
body.ui-unit .batch-card:not(:first-child) .polygon-list,
body.ui-unit .batch-card:not(:first-child) .label-editor:not(.device-label-editor),
body.ui-unit .batch-card:not(:first-child) .measurement-editor {
  display: none;
}

body.ui-unit .batch-card:not(:first-child) .batch-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 160px));
  gap: 14px;
  padding: 0;
}

body.ui-unit .batch-card:not(:first-child) .batch-previews figure {
  margin: 0;
}

body.ui-unit .batch-card:not(:first-child) .batch-previews img,
body.ui-unit .batch-card:not(:first-child) .missing-preview {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  object-fit: cover;
}

body.ui-unit .batch-card:not(:first-child) .thermal-polygon-button,
body.ui-unit .batch-card:not(:first-child) .thermal-zoom-button {
  display: none;
}

body.ui-unit .batch-card:not(:first-child) .batch-previews figcaption {
  margin-top: 4px;
  color: #111;
  font-size: 14px;
}

body.ui-unit .batch-card:first-child {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 278px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #fff;
  box-shadow: none;
}

body.ui-unit .batch-card:first-child .batch-card-head {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  display: block;
  border-left: 1px solid #8b8b8b;
  border-bottom: 1px solid #8b8b8b;
  padding: 0;
  background: #fff;
}

body.ui-unit .batch-card:first-child .batch-card-head > div::before,
body.ui-unit .batch-card:first-child .batch-facts::before {
  display: block;
  padding: 4px 6px;
  border-bottom: 1px solid #8b8b8b;
  color: #111;
  background: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
}

body.ui-unit .batch-card:first-child .batch-card-head > div::before {
  content: "Photo Information";
}

body.ui-unit .batch-card:first-child .batch-facts::before {
  content: "Temperature information";
}

body.ui-unit .batch-card:first-child .batch-card-head strong,
body.ui-unit .batch-card:first-child .batch-card-head span,
body.ui-unit .batch-card:first-child .batch-card-head small,
body.ui-unit .batch-card:first-child .batch-card-head mark {
  display: block;
  margin: 0;
  border-bottom: 1px solid #d0d0d0;
  border-radius: 0;
  padding: 9px 8px;
  color: #111;
  background: #fff;
  text-align: right;
  font-size: 13px;
}

body.ui-unit .batch-card:first-child .batch-card-head strong::before {
  content: "File name:";
  float: left;
  font-weight: 400;
}

body.ui-unit .batch-card:first-child .batch-card-head span::before {
  content: "Stem:";
  float: left;
}

body.ui-unit .batch-card:first-child .scan-date::before {
  content: "Date/Time:";
  float: left;
}

body.ui-unit .batch-card .capture-time-trigger {
  display: inline-block;
  margin: 6px 0;
  border: 1px solid #999;
  padding: 4px 7px;
  color: #111;
  background: #fff;
}

body.ui-unit .batch-card:first-child .capture-time-editor {
  grid-column: 2;
  grid-row: 3;
  border-left: 1px solid #8b8b8b;
}

body.ui-unit .capture-time-editor:not([hidden]) {
  color: #111;
  background: #fff;
}

body.ui-unit .batch-card:first-child .batch-card-head mark::before {
  content: "Status:";
  float: left;
}

body.ui-unit .batch-card:first-child .batch-previews {
  grid-column: 1;
  grid-row: 1 / 5;
  display: block;
  align-self: stretch;
  min-height: calc(100vh - 150px);
  padding: 0 26px 26px;
  background: #fff;
  text-align: center;
}

body.ui-unit .batch-card:first-child .batch-previews figure:first-child {
  display: none;
}

body.ui-unit .batch-card:first-child .batch-previews figure:nth-child(2) {
  width: min(720px, calc(100vw - 620px));
  margin: 36px auto 0;
}

body.ui-unit .batch-card:first-child .thermal-measure-shell,
body.ui-unit .batch-card:first-child .thermal-measure-target {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.ui-unit .batch-card:first-child .thermal-measure-target img {
  width: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  border-radius: 0;
  background: #fff;
}

body.ui-unit .batch-card:first-child .batch-previews figcaption {
  margin-top: 10px;
  color: #111;
  font-size: 14px;
}

body.ui-unit .batch-card:first-child .thermal-polygon-button {
  top: -32px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  border-radius: 0;
  color: #111;
  background: #cfe7fa;
}

body.ui-unit .batch-card:first-child .thermal-zoom-button {
  top: -32px;
  right: calc(50% - 95px);
  width: 26px;
  height: 24px;
  border-radius: 0;
  color: #111;
  background: #fff;
}

body.ui-unit .batch-card:first-child .batch-facts {
  grid-column: 2;
  grid-row: 2;
  display: block;
  border-left: 1px solid #8b8b8b;
  border-bottom: 1px solid #8b8b8b;
  background: #fff;
}

body.ui-unit .batch-card:first-child .batch-facts > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 36px;
  border-bottom: 1px solid #d0d0d0;
  border-radius: 0;
  padding: 0;
  background: #fff;
}

body.ui-unit .batch-card:first-child .batch-facts dt,
body.ui-unit .batch-card:first-child .batch-facts dd {
  margin: 0;
  padding: 8px 8px;
  color: #111;
  font-size: 13px;
  text-align: right;
}

body.ui-unit .batch-card:first-child .batch-facts dt {
  border-right: 1px solid #d0d0d0;
  font-weight: 400;
}

body.ui-unit .batch-card:first-child .batch-facts dd {
  font-weight: 700;
}

body.ui-unit .batch-card:first-child .label-fact dd {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

body.ui-unit .batch-card:first-child .label-fact button {
  min-height: 20px;
  padding: 1px 5px;
}

body.ui-unit .batch-card:first-child .measurement-list,
body.ui-unit .batch-card:first-child .polygon-list {
  grid-column: 2;
  display: grid;
  gap: 0;
  border-left: 1px solid #8b8b8b;
  background: #fff;
}

body.ui-unit .batch-card:first-child .measurement-list::before {
  content: "Temperature information";
  padding: 5px 6px;
  border-bottom: 1px solid #8b8b8b;
  color: #111;
  background: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
}

body.ui-unit .measurement-chip,
body.ui-unit .polygon-result {
  border: 0;
  border-bottom: 1px solid #d0d0d0;
  border-radius: 0;
  color: #111;
  background: #fff;
  font-size: 13px;
}

body.ui-unit .measurement-marker {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
}

body.ui-unit .measurement-marker::before,
body.ui-unit .measurement-marker::after {
  content: "";
  position: absolute;
  background: var(--marker-color, #16d877);
}

body.ui-unit .measurement-marker::before {
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  transform: translate(-50%, -50%);
}

body.ui-unit .measurement-marker::after {
  left: 50%;
  top: 50%;
  width: 2px;
  height: 18px;
  transform: translate(-50%, -50%);
}

body.ui-unit .measurement-chip {
  display: grid;
  grid-template-columns: 52px 48px 1fr;
  padding: 0;
}

body.ui-unit .measurement-chip::before {
  content: "Dot";
  border-right: 1px solid #d0d0d0;
  padding: 8px 6px;
}

body.ui-unit .measurement-chip > span {
  padding: 8px 6px;
}

body.ui-unit .measurement-delete-button {
  justify-self: end;
  min-width: 26px;
  border-radius: 0;
  color: #111;
  background: #efefef;
}

body.ui-unit .polygon-overlay polygon {
  vector-effect: non-scaling-stroke;
}

body.ui-unit .polygon-region-label {
  fill: #10c66a;
  stroke: none;
  font-size: 24px;
}

body.ui-unit .polygon-extreme {
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 0;
  color: #fff;
  background: transparent;
}

body.ui-unit .polygon-extreme-label {
  display: block;
  color: #ffffff;
  background: rgba(18, 24, 78, .82);
  border-color: currentColor;
  font-size: 8px;
}

body.ui-unit .polygon-extreme::before,
body.ui-unit .polygon-extreme::after {
  content: "";
  position: absolute;
  background: currentColor;
}

body.ui-unit .polygon-extreme::before {
  left: -5px;
  right: -5px;
  top: 6px;
  height: 1px;
}

body.ui-unit .polygon-extreme::after {
  top: -5px;
  bottom: -5px;
  left: 6px;
  width: 1px;
}

body.ui-unit .label-editor,
body.ui-unit .measurement-editor {
  grid-column: 2;
  border-left: 1px solid #8b8b8b;
  border-bottom: 1px solid #d0d0d0;
  border-radius: 0;
  background: #fff;
}

body.ui-unit .label-editor.device-label-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 2px;
  border: 1px solid #999;
  padding: 8px;
  color: #111;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

body.ui-unit .label-editor.device-label-editor label {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
}

body.ui-unit .label-editor.device-label-editor label span {
  font-size: 12px;
  font-weight: 700;
}

body.ui-unit .label-editor.device-label-editor input,
body.ui-unit .label-editor.device-label-editor button {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.ui-unit .project-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 360px));
}

body.ui-unit .project-card,
body.ui-unit .project-cover,
body.ui-unit .project-create-form {
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

@media (max-width: 1000px) {
  body.ui-unit .topbar {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 8px;
  }

  body.ui-unit .workspace {
    grid-template-columns: 1fr;
  }

  body.ui-unit .control-panel {
    border-right: 0;
    border-bottom: 1px solid #8b8b8b;
  }

  body.ui-unit .result-view[data-view="batch"].is-active {
    grid-template-columns: 1fr;
  }

  body.ui-unit .result-view[data-view="batch"].is-active::before,
  body.ui-unit .result-view[data-view="batch"].is-active::after {
    display: none;
  }

  body.ui-unit .result-view[data-view="batch"].is-active > .result-header,
  body.ui-unit #batch-metrics,
  body.ui-unit .device-strip,
  body.ui-unit #batch-table {
    grid-column: 1;
  }

  body.ui-unit .batch-table,
  body.ui-unit .batch-card:first-child {
    grid-template-columns: 1fr;
  }

  body.ui-unit .batch-card:first-child .batch-card-head,
  body.ui-unit .batch-card:first-child .batch-facts,
  body.ui-unit .batch-card:first-child .measurement-list,
  body.ui-unit .batch-card:first-child .polygon-list,
  body.ui-unit .label-editor,
  body.ui-unit .measurement-editor {
    grid-column: 1;
    border-left: 0;
  }

  body.ui-unit .batch-card:first-child .batch-previews {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
  }

  body.ui-unit .batch-card:first-child .batch-previews figure:nth-child(2) {
    width: 100%;
  }
}

/* Files gallery refinement: match the UNI-T file browser view with every BMP visible. */
body.ui-unit .control-panel,
body.ui-unit .control-panel *,
body.ui-unit .tab-pane,
body.ui-unit .tab-pane *,
body.ui-unit label,
body.ui-unit legend,
body.ui-unit .field-hint {
  color: #111;
}

body.ui-unit .field-hint,
body.ui-unit .control-panel p,
body.ui-unit .control-panel span {
  color: #333;
  opacity: 1;
}

body.ui-unit .result-view[data-view="batch"].is-active {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

body.ui-unit .result-view[data-view="batch"].is-active::before,
body.ui-unit .result-view[data-view="batch"].is-active::after {
  display: none;
}

body.ui-unit .result-view[data-view="batch"].is-active > .result-header,
body.ui-unit #batch-metrics,
body.ui-unit .device-strip,
body.ui-unit #batch-bulk-host,
body.ui-unit #batch-table {
  grid-column: 1;
}

body.ui-unit .result-view[data-view="batch"].is-active > .result-header {
  grid-row: 1;
}

body.ui-unit #batch-metrics {
  display: none;
  grid-row: 2;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  border-left: 0;
}

body.ui-unit .device-strip {
  grid-row: 2;
  border-left: 0;
}

body.ui-unit #batch-bulk-host {
  grid-row: 2;
  display: block;
  margin: 0;
  padding: 0 24px 14px;
  background: #fff;
}

body.ui-unit #batch-table {
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 24px 28px;
  align-items: start;
  max-height: calc(100vh - 190px);
  padding: 0 24px 44px;
  background: #fff;
}

body.ui-unit .batch-card,
body.ui-unit .batch-card:first-child {
  grid-column: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  z-index: 1;
  gap: 6px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #fff;
  box-shadow: none;
}

body.ui-unit .batch-bulk-toolbar {
  grid-column: 1 / -1;
  position: relative;
  z-index: 60;
  display: block;
  align-self: start;
  isolation: isolate;
  margin-bottom: 18px;
  border: 1px solid #aaa;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
  color: #111;
}

body.ui-unit .batch-bulk-toolbar[open] {
  z-index: 70;
}

body.ui-unit .batch-bulk-toolbar summary {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
}

body.ui-unit .batch-bulk-toolbar summary::before {
  color: #111;
}

body.ui-unit .batch-bulk-toolbar summary > span,
body.ui-unit .batch-bulk-toolbar summary em,
body.ui-unit .batch-bulk-group h4 {
  color: #111;
}

body.ui-unit .batch-bulk-panel {
  display: grid;
  grid-template-columns: minmax(190px, .65fr) minmax(320px, 1.15fr);
  gap: 8px;
  border-top: 1px solid #ccc;
  padding: 8px;
  background: #fff;
}

body.ui-unit .batch-bulk-group {
  display: grid;
  gap: 8px;
  border: 1px solid #d0d0d0;
  border-radius: 0;
  padding: 8px;
  background: #fafafa;
}

body.ui-unit .batch-bulk-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

body.ui-unit .batch-bulk-check,
body.ui-unit .batch-card-select {
  color: #111;
}

body.ui-unit .batch-bulk-toolbar strong {
  color: #333;
}

body.ui-unit .batch-bulk-toolbar input[type="text"],
body.ui-unit .batch-bulk-toolbar input[type="number"],
body.ui-unit .batch-bulk-toolbar input[type="search"],
body.ui-unit .batch-bulk-toolbar select,
body.ui-unit .batch-bulk-toolbar button {
  min-height: 34px;
  border-radius: 0;
  color: #111;
  background: #f7f7f7;
}

body.ui-unit .batch-filter-empty {
  grid-column: 1 / -1;
  border: 1px dashed #aaa;
  padding: 18px;
  color: #333;
  text-align: center;
  font-weight: 700;
}

body.ui-unit .batch-upload-progress {
  display: grid;
  gap: 6px;
  border: 1px solid #aaa;
  border-radius: 0;
  padding: 8px;
  background: #fff;
  color: #111;
}

body.ui-unit .batch-upload-progress[hidden] {
  display: none;
}

body.ui-unit .batch-upload-progress-head {
  color: #111;
}

body.ui-unit .batch-upload-progress progress {
  width: 100%;
  height: 12px;
}

body.ui-unit .batch-upload-progress.is-processing progress {
  background:
    linear-gradient(90deg, #e8f6ff, #42a5f5, #e8f6ff);
  background-size: 220% 100%;
  animation: upload-processing-sweep 1.1s linear infinite;
}

body.ui-unit .batch-submit-fallback {
  display: none;
}

body.ui-unit .batch-card .batch-card-head,
body.ui-unit .batch-card:first-child .batch-card-head,
body.ui-unit .batch-card:not(:first-child) .batch-card-head {
  grid-column: auto;
  grid-row: auto;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
}

body.ui-unit .batch-card .batch-card-head > div::before,
body.ui-unit .batch-card:first-child .batch-card-head > div::before,
body.ui-unit .batch-card:first-child .batch-facts::before {
  display: none;
  content: none;
}

body.ui-unit .batch-card .batch-card-head strong,
body.ui-unit .batch-card:first-child .batch-card-head strong,
body.ui-unit .batch-card:not(:first-child) .batch-card-head strong {
  display: block;
  overflow: hidden;
  margin: 0;
  border: 0;
  padding: 0;
  color: #111;
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ui-unit .batch-card .batch-card-head strong::before,
body.ui-unit .batch-card:first-child .batch-card-head strong::before {
  content: none;
}

body.ui-unit .batch-card .batch-card-head span,
body.ui-unit .batch-card .batch-card-head small,
body.ui-unit .batch-card .batch-card-head mark,
body.ui-unit .batch-card .batch-facts,
body.ui-unit .batch-card:first-child .batch-facts,
body.ui-unit .batch-card .measurement-list,
body.ui-unit .batch-card:first-child .measurement-list,
body.ui-unit .batch-card .polygon-list,
body.ui-unit .batch-card:first-child .polygon-list,
body.ui-unit .batch-card .label-editor:not(.device-label-editor),
body.ui-unit .batch-card:first-child .label-editor:not(.device-label-editor),
body.ui-unit .batch-card .measurement-editor {
  display: none;
}

body.ui-unit .batch-card .batch-card-select span {
  display: inline;
  color: #111;
  font-size: 12px;
  font-weight: 700;
}

body.ui-unit .batch-card .batch-card-select {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #777;
  padding: 4px 6px;
  background: rgba(255, 255, 255, .94);
  color: #111;
}

body.ui-unit .batch-card .batch-card-select input {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0;
}

body.ui-unit .thermal-select-image-button {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 8;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #777;
  border-radius: 0;
  background: rgba(255, 255, 255, .94);
  color: #111;
  box-shadow: none;
  cursor: pointer;
}

body.ui-unit .thermal-select-image-button input {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

body.ui-unit .thermal-select-image-button span {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 2px solid #222;
  color: transparent;
  font-size: 13px;
  font-weight: 900;
}

body.ui-unit .thermal-select-image-button:has(input:checked) {
  border-color: #1295d8;
  background: #1fa7ee;
}

body.ui-unit .thermal-select-image-button:has(input:checked) span {
  border-color: #fff;
  color: #fff;
}

body.ui-unit .batch-card .label-editor:not([hidden]),
body.ui-unit .batch-card:first-child .label-editor:not([hidden]) {
  display: grid;
  grid-column: 1 / -1;
  margin-top: 8px;
  border-color: #999;
  background: #fff;
}

body.ui-unit .batch-card .batch-previews,
body.ui-unit .batch-card:first-child .batch-previews,
body.ui-unit .batch-card:not(:first-child) .batch-previews {
  grid-column: auto;
  grid-row: auto;
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent;
  text-align: center;
}

body.ui-unit .batch-card .batch-previews figure:first-child,
body.ui-unit .batch-card:first-child .batch-previews figure:first-child {
  display: none;
}

body.ui-unit .batch-card .batch-previews figure:nth-child(2),
body.ui-unit .batch-card:first-child .batch-previews figure:nth-child(2),
body.ui-unit .batch-card:not(:first-child) .batch-previews figure:nth-child(2) {
  width: 100%;
  margin: 0;
}

body.ui-unit .batch-card .thermal-measure-shell,
body.ui-unit .batch-card .thermal-measure-target,
body.ui-unit .batch-card:first-child .thermal-measure-shell,
body.ui-unit .batch-card:first-child .thermal-measure-target {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.ui-unit .batch-card .thermal-measure-target img,
body.ui-unit .batch-card:first-child .thermal-measure-target img,
body.ui-unit .batch-card:not(:first-child) .batch-previews img,
body.ui-unit .batch-card:not(:first-child) .missing-preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
  background: #fff;
}

body.ui-unit .batch-card .batch-previews figcaption,
body.ui-unit .batch-card:first-child .batch-previews figcaption,
body.ui-unit .batch-card:not(:first-child) .batch-previews figcaption {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  color: #111;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ui-unit .batch-card .thermal-polygon-button,
body.ui-unit .batch-card .thermal-zoom-button,
body.ui-unit .batch-card:first-child .thermal-polygon-button,
body.ui-unit .batch-card:first-child .thermal-zoom-button {
  display: none;
}

body.ui-unit .batch-card .thermal-delete-image-button {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 5;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #777;
  border-radius: 0;
  background: rgba(255, 255, 255, .92);
  color: #111;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

body.ui-unit .batch-card .thermal-delete-image-button:hover {
  border-color: #e0642f;
  color: #e0642f;
}

/* Contrast sweep for the white UNI-T shell. */
body.ui-unit .project-screen,
body.ui-unit .project-screen *,
body.ui-unit .control-panel,
body.ui-unit .control-panel *,
body.ui-unit .result-panel,
body.ui-unit .result-panel *,
body.ui-unit .plant-card,
body.ui-unit .plant-card *,
body.ui-unit .login-card,
body.ui-unit .login-card * {
  color: #111;
}

body.ui-unit .status-text,
body.ui-unit .field-hint,
body.ui-unit .project-screen-head p:not(.status-text):not(.error-text),
body.ui-unit .brand p,
body.ui-unit .pane-heading p,
body.ui-unit .batch-card-head span,
body.ui-unit .batch-previews figcaption,
body.ui-unit .history-overview-head span,
body.ui-unit .composer-section-head span,
body.ui-unit .composer-project-card-head span,
body.ui-unit .composer-measurement-list .measurement-empty {
  color: #333;
  opacity: 1;
}

body.ui-unit input::placeholder,
body.ui-unit textarea::placeholder {
  color: #6b7280;
  opacity: 1;
}

body.ui-unit .project-screen,
body.ui-unit .project-card,
body.ui-unit .project-create-form,
body.ui-unit .template-guide-section,
body.ui-unit .template-preset-card,
body.ui-unit .history-chart-panel,
body.ui-unit .history-table-wrap,
body.ui-unit .history-overview-section,
body.ui-unit .assessment-panel,
body.ui-unit .history-overview-card,
body.ui-unit .single-measure-panel,
body.ui-unit .composer-project-dashboard,
body.ui-unit .composer-document-shell,
body.ui-unit .composer-source-section,
body.ui-unit .composer-side-panel,
body.ui-unit .composer-project-card,
body.ui-unit .composer-polygon-summary,
body.ui-unit .composer-sheet-wrap,
body.ui-unit .image-tile,
body.ui-unit .metric {
  border: 1px solid #b8b8b8;
  border-radius: 0;
  color: #111;
  background: #fff;
  box-shadow: none;
}

body.ui-unit .project-screen {
  padding: 18px;
  background: #efefef;
}

body.ui-unit .project-screen-head {
  border-bottom: 1px solid #c8c8c8;
}

body.ui-unit .project-screen-head h2,
body.ui-unit .result-header h2,
body.ui-unit .pane-heading h2,
body.ui-unit .template-guide-section h3,
body.ui-unit .history-overview-head h3,
body.ui-unit .composer-section-head h3,
body.ui-unit .single-measure-head h3 {
  color: #111;
}

body.ui-unit .project-card {
  text-align: left;
}

body.ui-unit .project-card-actions {
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 8px;
}

body.ui-unit .project-card-actions button {
  min-width: 0;
  min-height: 42px;
  padding: 4px 8px;
  white-space: normal;
  line-height: 1.15;
}

body.ui-unit .project-cover {
  border-bottom: 1px solid #d0d0d0;
  color: #111;
  background: #f4f4f4;
}

body.ui-unit .project-cover span,
body.ui-unit .project-card strong,
body.ui-unit .project-card dt,
body.ui-unit .project-card dd,
body.ui-unit .project-card small,
body.ui-unit .template-field-list dt,
body.ui-unit .template-field-list dd,
body.ui-unit .history-table th,
body.ui-unit .history-table td,
body.ui-unit .composer-project-facts dt,
body.ui-unit .composer-project-facts dd,
body.ui-unit .composer-project-metrics span,
body.ui-unit .composer-project-metrics strong,
body.ui-unit .composer-sheet th,
body.ui-unit .composer-sheet td {
  color: #111;
}

body.ui-unit .composer-sheet {
  border: 1px solid #9fa7b3;
}

body.ui-unit .composer-sheet th,
body.ui-unit .composer-sheet td {
  border: 1px solid #b8c0cc;
  background: #fff;
}

body.ui-unit .composer-sheet th {
  border-color: #aeb8c6;
  background: #eaf8fb;
}

body.ui-unit .composer-template-preview {
  min-width: 0;
  border: 1px solid #aeb8c6;
  padding: 16px;
  color: #111;
  background: #fff;
}

body.ui-unit .composer-template-preview[hidden] {
  display: none;
}

body.ui-unit .composer-template-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  border: 1px solid #71809a;
  text-align: center;
}

body.ui-unit .composer-template-heading > div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 88px;
  padding: 8px 12px;
}

body.ui-unit .composer-template-heading > div + div {
  border-left: 1px solid #71809a;
  font-size: 12px;
  text-align: left;
}

body.ui-unit .composer-template-heading strong,
body.ui-unit .composer-template-heading b {
  font-size: 14px;
}

body.ui-unit .composer-template-heading span,
body.ui-unit .composer-template-subtitle {
  font-size: 12px;
}

body.ui-unit .composer-template-subtitle {
  padding: 10px 2px 7px;
  font-weight: 700;
}

body.ui-unit .composer-template-table-wrap {
  width: 100%;
  overflow-x: auto;
}

body.ui-unit .composer-template-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
}

body.ui-unit .composer-template-table th,
body.ui-unit .composer-template-table td {
  border: 1px solid #8d9bb1;
  padding: 7px 6px;
  color: #111;
  background: #fff;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

body.ui-unit .composer-template-table th {
  min-height: 54px;
  background: #eaf8fb;
  font-weight: 700;
}

body.ui-unit .composer-template-table td {
  height: 84px;
}

body.ui-unit .composer-template-table td[data-template-image-slot] {
  position: relative;
  cursor: pointer;
  outline-offset: -3px;
}

body.ui-unit .composer-template-remove-image {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #aeb8c6;
  border-radius: 4px;
  background: #fff;
  color: #b42318;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

body.ui-unit .composer-template-table td[data-template-image-slot]:hover,
body.ui-unit .composer-template-table td[data-template-image-slot]:focus-visible,
body.ui-unit .composer-template-table td[data-template-image-slot].is-selected {
  outline: 2px solid #2764cc;
  background: #eef6ff;
}

body.ui-unit .composer-template-table td[data-template-image-slot].is-drop-target {
  outline: 3px solid #008cbd;
  background: #e5f8ff;
}

body.ui-unit .composer-template-empty-image {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #aeb8c6;
  color: #2764cc;
  font-size: 20px;
  font-weight: 400;
}

body.ui-unit .composer-template-table th:nth-child(4),
body.ui-unit .composer-template-table td:nth-child(4) {
  width: 16%;
}

body.ui-unit .composer-template-table:not(.is-inverter) th:nth-child(5),
body.ui-unit .composer-template-table:not(.is-inverter) td:nth-child(5) {
  width: 22%;
}

body.ui-unit .composer-template-cable-info {
  display: grid;
  gap: 6px;
  text-align: left;
  overflow-wrap: anywhere;
}

body.ui-unit .composer-template-cable-point {
  display: grid;
  gap: 2px;
}

body.ui-unit .composer-template-cable-point small {
  color: #555;
  font-size: 10px;
  font-weight: 400;
}

body.ui-unit .composer-template-table .composer-template-image {
  max-width: 100%;
}

body.ui-unit .composer-template-table .composer-template-image img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 155px;
  object-fit: contain;
}

body.ui-unit .composer-template-temperature-info {
  margin-top: 18px;
}

body.ui-unit .composer-template-temperature-info h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

body.ui-unit .composer-template-temperature-info table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

body.ui-unit .composer-template-temperature-info th,
body.ui-unit .composer-template-temperature-info td {
  border: 1px solid #8d9bb1;
  padding: 7px;
  font-size: 11px;
  text-align: left;
}

body.ui-unit .composer-template-temperature-info th {
  background: #eaf8fb;
}

body.ui-unit .composer-template-table td:has(img) {
  height: 155px;
  padding: 3px;
}

body.ui-unit .project-card dl div,
body.ui-unit .batch-facts div,
body.ui-unit .composer-project-facts div,
body.ui-unit .composer-project-metrics div,
body.ui-unit .history-overview-card dl div,
body.ui-unit .assessment-count,
body.ui-unit .template-field-list div {
  border-color: #d0d0d0;
  border-radius: 0;
  background: #f8f8f8;
}

body.ui-unit .level-badge,
body.ui-unit .measurement-chip,
body.ui-unit .polygon-result,
body.ui-unit .composer-polygon-summary,
body.ui-unit .status-ok,
body.ui-unit .status-warn,
body.ui-unit .status-error,
body.ui-unit mark {
  border-color: #999;
  color: #111;
  background: #f4f4f4;
  box-shadow: none;
}

body.ui-unit .level-badge.level-1 {
  border-color: #b47b00;
  color: #111;
  background: #fff4c9;
}

body.ui-unit .level-badge.level-2 {
  border-color: #b45a00;
  color: #111;
  background: #ffe2c4;
}

body.ui-unit .level-badge.level-3 {
  border-color: #b00020;
  color: #111;
  background: #ffd6dd;
}

body.ui-unit .project-delete-action,
body.ui-unit .danger-action {
  border-color: #9d9d9d;
  color: #111;
  background: linear-gradient(#fff, #dedede);
}

body.ui-unit .download-actions a.report-download,
body.ui-unit .download-actions button.report-download {
  border-color: #8b8b8b;
  color: #111;
  background: linear-gradient(#fff, #dcdcdc);
  box-shadow: none;
}

body.ui-unit .tab-button.is-active,
body.ui-unit .lang-button.is-active,
body.ui-unit .ui-version-button.is-active {
  border-color: #d96b20;
  color: #fff;
  background: #4b4b4b;
}
