:root {
  --ink: #162033;
  --muted: #687383;
  --line: #d9e1ea;
  --panel: #ffffff;
  --surface: #f2f5f8;
  --surface-strong: #e7edf3;
  --teal: #117b83;
  --teal-dark: #0b5c63;
  --orange: #db6b20;
  --purple: #7c3aed;
  --green: #15803d;
  --blue: #0b7f47;
  --danger: #c73535;
  --warning: #9a6700;
  --shadow: 0 12px 28px rgba(20, 33, 55, 0.12);
  --sidebar-width: 116px;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

body {
  background: var(--surface);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(330px, 440px) minmax(300px, 1fr);
  height: 64px;
  padding: 0 18px;
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  align-items: center;
  background: var(--teal);
  border-radius: 8px;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.brand-block h1 {
  font-size: 18px;
  line-height: 1.1;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-block span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search,
.browser-search form {
  align-items: center;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  height: 40px;
  padding: 0 8px 0 12px;
}

.global-search input,
.browser-search input {
  background: transparent;
  border: 0;
  height: 32px;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.view-sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  align-content: start;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  left: 0;
  padding: 12px 10px;
  position: fixed;
  top: 64px;
  width: var(--sidebar-width);
  z-index: 30;
}

.view-sidebar button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 5px;
  grid-template-rows: 18px minmax(0, auto);
  align-content: start;
  justify-items: center;
  height: 58px;
  max-height: 58px;
  min-height: 58px;
  padding: 8px 6px;
  text-align: center;
}

.view-sidebar button:hover,
.view-sidebar button:focus-visible {
  background: #f7fafc;
  border-color: var(--line);
  color: var(--teal-dark);
  outline: none;
}

.view-sidebar button.active {
  background: #0f172a;
  border-color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
  color: #fff;
}

.view-sidebar-panel-group {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding-top: 8px;
}

.view-sidebar-panel-group button {
  height: 48px;
  max-height: 48px;
  min-height: 48px;
}

.view-sidebar .view-sidebar-panel-group button.active {
  background: #eef8fb;
  border-color: #b7dee2;
  box-shadow: none;
  color: var(--teal-dark);
}

.view-sidebar-footer {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.view-sidebar button.view-sidebar-logout {
  color: #7f1d1d;
}

.view-sidebar button.view-sidebar-logout:hover,
.view-sidebar button.view-sidebar-logout:focus-visible {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.view-sidebar span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
}

.icon-action {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.icon-action svg,
.primary-button svg,
.secondary-button svg,
.view-sidebar svg,
.segmented-control svg,
.category-title svg,
.agent-picker__header svg,
.batch-panel__title svg,
.agent-summary-header svg,
.section-toggle-button svg,
.image-strip__label svg {
  height: 17px;
  width: 17px;
}

.workspace {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(480px, 1fr) minmax(430px, 560px);
  height: calc(100% - 64px);
  min-height: 680px;
  margin-left: var(--sidebar-width);
  padding: 12px;
}

.workspace-settings {
  display: block;
  height: calc(100% - 64px);
  margin-left: var(--sidebar-width);
  overflow: auto;
  padding: 16px;
}

.settings-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 980px;
  padding: 16px;
}

.settings-panel > header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.settings-panel > header span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
  text-transform: uppercase;
}

.settings-panel > header span svg {
  height: 15px;
  width: 15px;
}

.settings-panel h2 {
  font-size: 22px;
  margin: 3px 0 0;
}

.settings-panel > header em {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 6px 10px;
}

.segment-browser,
.visual-workspace,
.coding-workbench {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 0;
  overflow: hidden;
}

.segment-browser {
  display: flex;
  flex-direction: column;
}

.summary-band,
.browser-search,
.selected-summary {
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

.summary-band h2,
.selected-summary h2,
.segment-list h2 {
  font-size: 13px;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.metric {
  background: #f8fafc;
  border: 1px solid #e7edf3;
  border-radius: 7px;
  min-height: 66px;
  padding: 10px;
}

.metric strong {
  display: block;
  font-size: 21px;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 8px;
}

.summary-row {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 82px minmax(0, 1fr);
  min-height: 28px;
}

.summary-row span {
  color: var(--muted);
  font-size: 12px;
}

.summary-row strong {
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attributes-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.attribute-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 8px 12px;
  background: white;
  min-height: 32px;
  align-items: center;
}

.attribute-row.header {
  background: var(--surface-strong);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 1;
}

.attribute-row span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attribute-row strong {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attribute-row.header span {
  color: var(--ink);
  font-weight: 600;
}

.no-selection {
  color: var(--muted);
  font-size: 13px;
  padding: 20px 0;
  text-align: center;
}

.segment-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
}

.segment-items {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.segment-item {
  background: #fff;
  border: 1px solid #e6edf4;
  border-radius: 7px;
  color: var(--ink);
  display: grid;
  gap: 4px 8px;
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 58px;
  padding: 9px;
  text-align: left;
}

.segment-item.active {
  background: #f0fbfb;
  border-color: var(--teal);
  box-shadow: inset 3px 0 0 var(--teal);
}

.segment-id {
  align-self: center;
  background: var(--surface-strong);
  border-radius: 6px;
  color: var(--teal-dark);
  font-weight: 700;
  grid-row: 1 / 3;
  justify-self: stretch;
  padding: 7px 0;
  text-align: center;
}

.segment-road {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-distance {
  color: var(--muted);
  font-size: 12px;
}

.visual-workspace {
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) 112px;
}

.view-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  padding: 0 14px;
}

.segmented-control {
  background: #edf2f7;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  display: inline-flex;
  padding: 3px;
}

.segmented-control button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
}

.segmented-control button.active {
  background: #fff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.12);
  color: var(--teal-dark);
}

.view-context {
  min-width: 0;
}

.view-context span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.view-context strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-stage {
  background: #17212b;
  min-height: 0;
  position: relative;
}

.leaflet-map,
.map-empty,
.pano-viewer-shell,
.pano-viewer,
.pano-fallback {
  height: 100%;
  width: 100%;
}

.map-panel-shell {
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.leaflet-map.is-map-measuring {
  cursor: crosshair;
}

.map-measure-control {
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  display: inline-flex;
  gap: 6px;
  left: 56px;
  min-height: 34px;
  padding: 4px;
  position: absolute;
  top: 10px;
  z-index: 500;
}

.map-measure-button,
.map-measure-icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 5px;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  height: 26px;
  justify-content: center;
  padding: 0 8px;
}

.map-measure-button.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.map-measure-icon-button {
  padding: 0;
  width: 26px;
}

.map-measure-icon-button:disabled {
  color: #94a3b8;
  cursor: default;
  opacity: 0.58;
}

.map-measure-readout {
  background: #ecfeff;
  border: 1px solid #bae6fd;
  border-radius: 5px;
  color: #0f4f55;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  min-width: 82px;
  padding: 7px 9px;
  text-align: center;
  white-space: nowrap;
}

.map-measure-label {
  pointer-events: none;
}

.map-measure-label span {
  background: #ffffff;
  border: 1px solid #0f766e;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  color: #0f4f55;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.pano-fov-cone {
  pointer-events: none;
}

.pano-viewer-shell {
  background: #0f172a;
  overflow: hidden;
  position: relative;
}

.pano-stage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.pano-stage-main {
  min-height: 0;
  min-width: 0;
}

.pano-viewer .psv-container {
  height: 100%;
  width: 100%;
}

.map-empty {
  align-items: center;
  background: #f8fafc;
  color: var(--muted);
  display: flex;
  justify-content: center;
}

.pano-fallback img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.evidence-box-layer {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 8;
}

.evidence-box {
  background: rgba(249, 115, 22, 0.12);
  border: 2px solid #f97316;
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.04);
  min-height: 12px;
  min-width: 12px;
  position: absolute;
}

.evidence-box.active {
  background: rgba(34, 211, 238, 0.16);
  border-color: #22d3ee;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.28), 0 0 0 9999px rgba(15, 23, 42, 0.05);
}

.evidence-box span {
  background: rgba(15, 23, 42, 0.86);
  border-radius: 4px;
  color: #fff;
  display: block;
  font-size: 11px;
  font-weight: 700;
  left: 0;
  max-width: 180px;
  overflow: hidden;
  padding: 3px 6px;
  position: absolute;
  text-overflow: ellipsis;
  top: -25px;
  white-space: nowrap;
}

.pano-viewer-shell.is-placing-annotation {
  cursor: crosshair;
}

.pano-annotation-marker-layer {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 12;
}

.pano-annotation-draft-point {
  align-items: center;
  background: #10b981;
  border: 1px solid #fff;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
  color: #fff;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 18px;
}

.pano-annotation-marker {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #0f766e;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  color: #0f172a;
  display: inline-flex;
  gap: 4px;
  height: 22px;
  justify-content: center;
  max-width: 22px;
  min-width: 22px;
  padding: 0;
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -50%);
}

.pano-annotation-marker.active {
  background: #f97316;
  border-color: #fff;
  color: #fff;
  height: 24px;
  max-width: 150px;
  padding: 0 7px;
}

.pano-annotation-marker svg {
  flex: 0 0 auto;
  height: 12px;
  width: 12px;
}

.pano-annotation-marker span {
  display: none;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pano-annotation-marker.active span,
.pano-annotation-marker:hover span,
.pano-annotation-marker:focus-visible span {
  display: block;
}

.pano-annotation-marker:hover,
.pano-annotation-marker:focus-visible {
  height: 24px;
  max-width: 150px;
  min-width: 22px;
  outline: none;
  padding: 0 7px;
}

.pano-annotation-marker.is-shape-label,
.pano-annotation-marker.is-shape-label.active,
.pano-annotation-marker.is-shape-label:hover,
.pano-annotation-marker.is-shape-label:focus-visible {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 118, 110, 0.72);
  border-radius: 5px;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
  color: #0f172a;
  height: 18px;
  max-width: 150px;
  min-width: 0;
  padding: 0 6px;
  transform: translate(0, calc(-100% - 4px));
}

.pano-annotation-marker.is-shape-label.active {
  background: rgba(249, 115, 22, 0.94);
  border-color: #fff;
  color: #fff;
}

.pano-annotation-marker.is-shape-label span {
  display: block;
  font-size: 10px;
  max-width: 138px;
}

.pano-annotation-marker.is-measurement-label,
.pano-annotation-marker.is-measurement-label.active,
.pano-annotation-marker.is-measurement-label:hover,
.pano-annotation-marker.is-measurement-label:focus-visible {
  justify-content: center;
  text-align: center;
  transform: translate(-50%, calc(-100% - 4px));
}

.pano-viewer-shell.is-navigating .pano-annotation-marker:not(.is-shape-label),
.pano-viewer-shell.is-navigating .pano-annotation-marker.active:not(.is-shape-label) {
  height: 22px;
  max-width: 22px;
  min-width: 22px;
  padding: 0;
}

.pano-viewer-shell.is-navigating .pano-annotation-marker:not(.is-shape-label) span {
  display: none;
}

.pano-annotation-delete {
  align-items: center;
  background: #b91c1c;
  border: 1px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
  color: #fff;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  width: 22px;
}

.pano-annotation-delete:hover,
.pano-annotation-delete:focus-visible {
  background: #991b1b;
  outline: none;
}

.pano-annotation-delete svg {
  height: 12px;
  width: 12px;
}

.pano-annotation-panel {
  background: #f8fafc;
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
}

.pano-annotation-panel header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.pano-annotation-panel header span {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 6px;
}

.pano-annotation-panel header strong {
  display: block;
  font-size: 13px;
  margin-top: 2px;
}

.primary-button.compact,
.secondary-button.compact {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 9px;
}

.secondary-button.compact.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.pano-annotation-create {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 10px;
}

.pano-annotation-create label {
  display: grid;
  gap: 4px;
}

.pano-annotation-create label span {
  color: var(--muted);
  font-size: 11px;
}

.pano-annotation-create input,
.pano-annotation-create select,
.pano-annotation-create textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 0;
  padding: 7px 8px;
  width: 100%;
}

.pano-annotation-create textarea {
  min-height: 58px;
  resize: vertical;
}

.pano-annotation-create p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
}

.pano-annotation-create.active {
  background: #ecfdf5;
}

.pano-annotation-draft-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pano-annotation-draft-actions span {
  color: var(--muted);
  flex: 1 1 76px;
  font-size: 11px;
}

.pano-annotation-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.pano-annotation-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 7px;
  padding: 8px;
}

.pano-annotation-item.active {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

.pano-annotation-item__main {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: grid;
  gap: 8px;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 0;
  text-align: left;
  width: 100%;
}

.pano-annotation-item__main svg {
  color: #0f766e;
  height: 18px;
  justify-self: center;
  width: 18px;
}

.pano-annotation-item__main strong,
.pano-annotation-item__main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pano-annotation-item__main strong {
  font-size: 13px;
}

.pano-annotation-item__main small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.pano-annotation-item__actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.pano-annotation-item p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.pano-annotation-empty {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 24px 10px;
  text-align: center;
}

.pano-annotation-empty svg {
  height: 28px;
  width: 28px;
}

.pano-annotation-panel footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  padding: 8px 10px;
}

@media (max-width: 1450px) {
  .workspace .pano-stage-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 220px;
  }

  .workspace .pano-annotation-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.image-strip {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 132px minmax(0, 1fr);
  min-width: 0;
  padding: 12px;
}

.image-strip__label {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 8px;
  min-width: 0;
}

.thumbs {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.thumb {
  background: #111827;
  border: 2px solid transparent;
  border-radius: 7px;
  flex: 0 0 auto;
  height: 84px;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 132px;
}

.thumb.active {
  border-color: var(--orange);
}

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

.thumb__plus {
  align-items: center;
  background: rgba(15, 23, 42, 0.78);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  position: absolute;
  right: 6px;
  top: 6px;
  width: 20px;
}

.thumb__plus i,
.thumb__plus svg {
  height: 12px;
  width: 12px;
}

.thumb span {
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  bottom: 6px;
  color: #fff;
  font-size: 12px;
  height: 22px;
  left: 6px;
  line-height: 22px;
  position: absolute;
  text-align: center;
  width: 22px;
}

.coding-workbench {
  background: #fff;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
}

.coding-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px;
}

.coding-header h2 {
  font-size: 17px;
  margin: 0;
}

.coding-header p {
  color: var(--muted);
  font-size: 12px;
  margin: 3px 0 0;
}

.draft-count {
  background: #e6f4ed;
  border: 1px solid #b7dbc8;
  border-radius: 999px;
  color: #065f35;
  flex: 0 0 auto;
  font-size: 12px;
  padding: 6px 9px;
}

.analysis-actions {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px 16px;
}

.analysis-actions .primary-button {
  grid-column: span 2;
}

.image-count-control {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  gap: 7px;
  height: 34px;
  justify-content: space-between;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.image-count-control span {
  color: var(--muted);
  font-size: 12px;
}

.image-count-control select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  height: 26px;
  min-width: 96px;
}

.primary-button,
.secondary-button {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  gap: 7px;
  height: 34px;
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
}

.primary-button {
  background: var(--teal);
  border: 1px solid var(--teal-dark);
  color: #fff;
}

.secondary-button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.secondary-button.danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.agent-picker {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 10px 16px;
}

.agent-picker__header,
.agent-summary-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.agent-picker__header span,
.agent-summary-header span {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

.agent-picker__header div {
  display: inline-flex;
  gap: 6px;
}

.section-header-actions {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-width: 0;
}

.agent-picker__header button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  height: 26px;
  padding: 0 9px;
}

.section-toggle-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  height: 26px;
  justify-content: center;
  padding: 0;
  width: 28px;
}

.section-toggle-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.section-toggle-button svg {
  height: 15px;
  width: 15px;
}

.agent-picker__header .section-toggle-button {
  color: var(--muted);
  padding: 0;
}

.agent-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  gap: 7px;
  font-size: 13px;
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
}

.agent-toggle.runs-last {
  height: auto;
}

.agent-toggle.selected {
  background: #f8fafc;
  color: var(--ink);
  font-weight: 700;
}

.agent-toggle.runs-last small {
  background: #e6f4ed;
  border: 1px solid #b7dbc8;
  border-radius: 999px;
  color: #065f35;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
  text-transform: uppercase;
}

.agent-picker__warning {
  color: var(--danger);
  font-size: 12px;
}

.batch-panel {
  background: #fbfdff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 10px 16px;
}

.batch-panel__title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.batch-panel__title span {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  min-width: 0;
}

.batch-panel__title em {
  color: var(--muted);
  flex: 0 1 auto;
  font-size: 11px;
  font-style: normal;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-picker.collapsed,
.batch-panel.collapsed {
  gap: 0;
}

.batch-controls {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.batch-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.batch-controls label span {
  color: var(--muted);
  font-size: 11px;
}

.batch-range-field {
  grid-column: span 2;
}

.batch-controls input,
.batch-controls select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.batch-controls button {
  grid-column: span 2;
  width: 100%;
}

.batch-status {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 9px 10px;
}

.batch-status__line,
.batch-status__meta {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.batch-status__line strong {
  color: var(--teal-dark);
  font-size: 12px;
  text-transform: capitalize;
}

.batch-status__line span,
.batch-status__meta span {
  color: var(--muted);
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-meter {
  background: #e2e8f0;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.batch-meter span {
  background: linear-gradient(90deg, var(--teal), var(--green));
  display: block;
  height: 100%;
  transition: width 0.25s ease;
}

.processing-progress {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 0 12px;
  padding: 10px 12px;
}

.processing-progress div:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.processing-progress strong {
  font-size: 13px;
}

.processing-progress span {
  color: var(--muted);
  font-size: 12px;
}

.processing-progress__bar {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.processing-progress__bar span {
  background: linear-gradient(90deg, #22c55e, #06b6d4);
  display: block;
  height: 100%;
  transition: width 0.35s ease;
}

.message-line {
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 12px;
  min-height: 30px;
  overflow: hidden;
  padding: 0 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-line.error {
  color: var(--danger);
}

.agent-summary-panel {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 8px 16px;
}

.agent-summary-panel.collapsed {
  gap: 0;
}

.agent-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  overflow: visible;
  padding: 0;
}

.agent-summary-header em {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
}

.agent-summary.empty {
  color: var(--muted);
  font-size: 12px;
}

.agent-pill {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  flex: 1 1 150px;
  gap: 7px;
  min-width: 0;
  min-height: 30px;
  padding: 0 10px;
}

.agent-pill strong {
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-pill em {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
}

.category-nav {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
  padding: 8px 16px;
}

.category-nav button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 1 auto;
  font-size: 13px;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
}

.category-nav button.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.category-dot {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.field-groups {
  background: #f8fafc;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
}

.blank-workbench {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  justify-content: center;
  text-align: center;
}

.blank-workbench svg {
  height: 42px;
  width: 42px;
}

.field-category {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--category-color);
  border-radius: 7px;
  margin-bottom: 8px;
  overflow: hidden;
}

.field-category header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px;
}

.category-title {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.category-title svg {
  color: var(--category-color);
  flex: 0 0 auto;
}

.category-title h3 {
  font-size: 14px;
  margin: 0;
}

.category-title span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-category header strong {
  background: #f1f5f9;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 8px;
}

.field-category.collapsed header {
  border-bottom: 0;
}

.field-category-actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
}

.category-fields {
  display: flex;
  flex-direction: column;
}

.field-row {
  border-bottom: 1px solid #eef2f7;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 0.62fr) minmax(0, 1fr);
  min-height: 96px;
  padding: 9px 10px;
}

.field-row:last-child {
  border-bottom: 0;
}

.field-label {
  min-width: 0;
}

.field-label span {
  color: var(--orange);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.field-label strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.field-label em {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-style: normal;
  margin-top: 5px;
}

.field-control {
  display: grid;
  align-content: start;
  gap: 6px;
  grid-template-columns: 58px minmax(0, 1fr);
  min-width: 0;
}

.field-control input,
.field-control select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.field-control input:focus,
.field-control select:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(17, 123, 131, 0.14);
}

.numeric-hint {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  height: 32px;
  justify-content: center;
}

.ai-evidence {
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
  padding: 7px;
}

.ai-evidence__top {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.ai-evidence.empty {
  background: #f1f5f9;
  color: var(--muted);
}

.ai-evidence.ready {
  background: #ecfdf5;
  color: #047857;
}

.ai-evidence.review {
  background: #fff7ed;
  color: var(--warning);
}

.ai-evidence span {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.ai-evidence strong {
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-evidence p {
  color: inherit;
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
  max-height: 34px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-evidence p b {
  font-weight: 700;
}

.ai-evidence__sources {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.ai-evidence__sources b {
  font-size: 11px;
  font-weight: 700;
}

.ai-evidence__sources a,
.ai-evidence__sources span {
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
}

.ai-evidence__sources a {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(15, 118, 110, 0.2);
  color: #0f766e;
  max-width: 210px;
  overflow: hidden;
  padding: 2px 7px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-evidence__sources a:hover {
  background: #fff;
  border-color: #0f766e;
  text-decoration: underline;
}

.ai-evidence__sources span {
  color: inherit;
  opacity: 0.82;
}

@media (max-width: 1320px) {
  .workspace {
    grid-template-columns: minmax(380px, 1fr) minmax(390px, 500px);
  }

  .batch-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-controls button {
    width: 100%;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .segment-ai-insight-body {
    grid-template-columns: 1fr;
  }

  .segment-ai-neighbor-item {
    grid-template-columns: minmax(90px, 1fr) auto;
  }
}

/* Dashboard View Styles */
.workspace-dashboard {
  background: var(--surface);
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: calc(100vh - 64px);
  margin-left: var(--sidebar-width);
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.dashboard-hero,
.dashboard-panel,
.dashboard-kpi,
.dashboard-category-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-hero {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 74px;
  padding: 14px 16px;
}

.dashboard-hero h2 {
  align-items: center;
  display: flex;
  font-size: 20px;
  gap: 9px;
  margin: 0;
}

.dashboard-hero h2 svg {
  color: var(--teal);
  height: 22px;
  width: 22px;
}

.dashboard-hero p {
  color: var(--muted);
  margin: 5px 0 0;
}

.dashboard-scope {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.dashboard-scope span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-scope strong {
  font-size: 13px;
}

.dashboard-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.dashboard-kpi {
  border-left: 4px solid var(--teal);
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
}

.dashboard-kpi.changed {
  border-left-color: #b45309;
}

.dashboard-kpi.review {
  border-left-color: var(--danger);
}

.dashboard-kpi.waiting {
  border-left-color: #64748b;
}

.dashboard-kpi.complete {
  border-left-color: var(--green);
}

.dashboard-kpi.external {
  border-left-color: #2563eb;
}

.dashboard-kpi span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-kpi strong {
  font-size: 26px;
  line-height: 1;
}

.dashboard-kpi strong.dashboard-kpi-percent-pair {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-kpi strong.dashboard-kpi-percent-pair span {
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
}

.dashboard-kpi strong.dashboard-kpi-percent-pair em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.dashboard-kpi small {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-category-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.dashboard-category-card {
  border-left: 4px solid var(--category-color);
  color: var(--ink);
  display: grid;
  gap: 10px;
  min-height: 124px;
  padding: 12px;
  text-align: left;
}

.dashboard-category-card.active {
  box-shadow: inset 0 0 0 2px var(--category-color);
}

.dashboard-category-card__top {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.dashboard-category-card__top strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-meter {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.dashboard-meter span {
  background: var(--category-color);
  display: block;
  height: 100%;
}

.dashboard-category-metrics {
  display: grid;
  gap: 5px;
  grid-template-columns: 1fr 1fr;
}

.dashboard-category-metrics span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  background: #eef2f7;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  height: 22px;
  line-height: 22px;
  padding: 0 8px;
  white-space: nowrap;
}

.status-pill.complete {
  background: #dcfce7;
  color: #166534;
}

.status-pill.changed {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.review {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.progress {
  background: #dcfce7;
  color: #065f35;
}

.status-pill.waiting {
  background: #f1f5f9;
  color: #64748b;
}

.dashboard-main-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  min-height: 0;
}

.dashboard-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.dashboard-panel header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 52px;
  padding: 10px 12px;
}

.dashboard-panel h3 {
  font-size: 15px;
  margin: 0;
}

.dashboard-panel header span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.dashboard-panel header button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 30px;
  padding: 0 10px;
}

.top-field-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding: 10px;
}

.top-field-item {
  align-items: center;
  border: 1px solid #edf2f7;
  border-left: 4px solid var(--category-color);
  border-radius: 7px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 56px;
  padding: 9px 10px;
}

.top-field-item div {
  min-width: 0;
}

.top-field-item strong {
  display: block;
  font-size: 13px;
}

.top-field-item span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-field-item em {
  color: #92400e;
  font-size: 20px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-empty {
  color: var(--muted);
  padding: 28px 12px;
  text-align: center;
}

.control-dashboard-panel {
  min-height: 0;
}

.control-dashboard-panel > header {
  align-items: center;
}

.control-dashboard-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.control-dashboard-sort,
.control-dashboard-collapse-actions {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.control-dashboard-sort > span {
  color: #475569;
  display: inline;
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.control-dashboard-sort button,
.control-dashboard-collapse-actions button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  padding: 0 9px;
}

.control-dashboard-sort button:hover,
.control-dashboard-collapse-actions button:hover {
  border-color: #94a3b8;
}

.control-dashboard-sort button.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.control-dashboard-sort-direction {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 0 !important;
  width: 32px;
}

.control-dashboard-sort-direction svg {
  height: 16px;
  width: 16px;
}

.control-dashboard-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.control-dashboard-legend span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #334155;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  height: 28px;
  margin: 0;
  padding: 0 8px;
}

.control-dashboard-legend i {
  display: block;
  height: 10px;
  width: 18px;
}

.control-dashboard-legend i.same {
  background: #15803d;
}

.control-dashboard-legend i.changed {
  background: #d97706;
}

.control-dashboard-legend i.missing {
  background: #94a3b8;
}

.control-dashboard-legend i.external {
  background: #2563eb;
}

.control-tree {
  overflow: auto;
  padding: 12px 14px 18px;
}

.control-tree-category {
  display: grid;
  gap: 0;
  margin-bottom: 12px;
  position: relative;
}

.control-tree-category-head,
.control-tree-field-row {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.34fr) minmax(420px, 1fr);
}

.control-tree-category-head {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 4px solid var(--category-color);
  grid-template-columns: 30px minmax(240px, 0.32fr) minmax(420px, 1fr);
  min-height: 62px;
  padding: 9px 12px;
}

.control-tree-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  color: #334155;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  padding: 0;
  width: 28px;
}

.control-tree-toggle:hover,
.control-tree-toggle:focus-visible {
  border-color: var(--category-color);
  color: var(--category-color);
  outline: none;
}

.control-tree-toggle svg {
  height: 16px;
  width: 16px;
}

.control-tree-category.collapsed {
  margin-bottom: 8px;
}

.control-tree-fields {
  border-left: 1px solid #cbd5e1;
  margin-left: 22px;
  padding: 4px 0 2px 24px;
  position: relative;
}

.control-tree-field-row {
  background: #fff;
  border-bottom: 1px solid #edf2f7;
  min-height: 58px;
  padding: 8px 10px 8px 0;
  position: relative;
}

.control-tree-field-row::before {
  background: #cbd5e1;
  content: "";
  height: 1px;
  left: -24px;
  position: absolute;
  top: 50%;
  width: 18px;
}

.control-tree-node-label {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.control-tree-node-label div {
  min-width: 0;
}

.control-tree-node-label strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-tree-node-label small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-tree-dot {
  background: var(--category-color);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--category-color);
  display: block;
  flex: 0 0 auto;
  height: 14px;
  width: 14px;
}

.control-tree-field-code {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 54px;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  line-height: 1;
}

.control-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.control-stack.compact {
  gap: 0;
}

.control-stack-bar {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  display: flex;
  height: 18px;
  overflow: hidden;
  width: 100%;
}

.control-stack.compact .control-stack-bar {
  height: 14px;
}

.control-stack-part {
  display: block;
  flex: 0 0 auto;
  min-width: 0;
}

.control-stack.is-clickable .control-stack-part.selectable {
  cursor: pointer;
}

.control-stack.is-clickable .control-stack-part.selectable:hover,
.control-stack.is-clickable .control-stack-part.selectable:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.28);
  outline: none;
}

.control-stack-part.same {
  background: #15803d;
}

.control-stack-part.changed {
  background: #d97706;
}

.control-stack-part.missing {
  background: #94a3b8;
}

.control-stack-part.external {
  background: #2563eb;
}

.control-stack-part.empty {
  background: #e2e8f0;
  width: 100%;
}

.control-stack-stats {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
}

.control-stack-stats.compact {
  gap: 4px 8px;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  margin-top: 5px;
}

.control-stack-stats span {
  align-items: center;
  color: #475569;
  display: flex;
  font-size: 11px;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.control-stack.is-clickable .control-stack-stats span.selectable {
  cursor: pointer;
}

.control-stack.is-clickable .control-stack-stats span.selectable:hover,
.control-stack.is-clickable .control-stack-stats span.selectable:focus-visible {
  color: #0f172a;
  text-decoration: underline;
  outline: none;
}

.control-stack-stats span::before {
  content: "";
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}

.control-stack-stats span.same::before {
  background: #15803d;
}

.control-stack-stats span.changed::before {
  background: #d97706;
}

.control-stack-stats span.missing::before {
  background: #94a3b8;
}

.control-stack-stats span.external::before {
  background: #2563eb;
}

.control-stack-stats b {
  color: #0f172a;
}

.control-stack-stats b small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  margin-left: 1px;
}

.control-stack-stats em {
  color: var(--muted);
  font-style: normal;
}

.field-status-panel {
  min-width: 0;
}

.field-status-table {
  overflow: auto;
}

.field-status-row {
  align-items: center;
  border-bottom: 1px solid #edf2f7;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.6fr) minmax(110px, 0.8fr) repeat(4, minmax(76px, 0.55fr)) minmax(104px, 0.8fr);
  min-width: 880px;
  min-height: 50px;
  padding: 8px 12px;
}

.field-status-row.header {
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  min-height: 36px;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 2;
}

.field-status-row:not(.header) {
  border-left: 4px solid var(--category-color);
}

.field-status-row strong {
  display: block;
  font-size: 13px;
}

.field-status-row small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .control-tree-category-head,
  .control-tree-field-row {
    grid-template-columns: minmax(220px, 0.42fr) minmax(320px, 1fr);
  }

  .control-tree-category-head {
    grid-template-columns: 30px minmax(220px, 0.42fr) minmax(320px, 1fr);
  }
}

@media (max-width: 760px) {
  .workspace-dashboard {
    height: auto;
    min-height: calc(100vh - 64px);
  }

  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-scope {
    align-items: flex-start;
    text-align: left;
  }

  .dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .control-dashboard-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-dashboard-legend {
    justify-content: flex-start;
  }

  .control-dashboard-toolbar {
    justify-content: flex-start;
  }

  .control-tree-category-head,
  .control-tree-field-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .control-tree-category-head {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .control-tree-category-head .control-stack {
    grid-column: 1 / -1;
  }

  .control-tree-fields {
    margin-left: 12px;
    padding-left: 18px;
  }

  .control-tree-field-row::before {
    left: -18px;
    width: 12px;
  }

  .control-stack-stats {
    grid-template-columns: 1fr;
  }
}

/* Segment Specs */
.workspace-specs {
  display: grid;
  gap: 0;
  grid-template-columns: var(--specs-segment-list-width, 340px) 10px minmax(0, 1fr);
  height: calc(100vh - var(--topbar-height, 64px));
  margin-left: var(--sidebar-width);
  overflow: hidden;
  padding: 0;
}

.workspace-specs.is-segment-list-closed {
  grid-template-columns: minmax(0, 1fr);
}

.specs-segment-list,
.segment-spec-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  min-height: 0;
  overflow: hidden;
}

.segment-spec-panel {
  border-left: 0;
}

.workspace-specs.is-segment-list-closed .segment-spec-panel {
  border-left: 1px solid var(--line);
}

.specs-segment-list {
  display: flex;
  flex-direction: column;
  border-right: 0;
}

.specs-segment-list.is-collapsed {
  align-items: center;
  justify-content: flex-start;
  padding-top: 10px;
}

.specs-segment-list > header {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(70px, auto) minmax(0, 1fr) 30px;
  padding: 10px;
}

.specs-segment-list > header > div {
  min-width: 0;
}

.specs-segment-list-summary > span,
.specs-segment-list > header > small,
.segment-info-grid span,
.segment-icon-card small {
  color: var(--muted);
}

.specs-segment-list-summary > strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.specs-segment-list-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
  width: 100%;
}

.specs-segment-list-controls > * {
  min-width: 0;
  width: auto;
}

.specs-segment-list-controls .specs-status-filter-combo,
.specs-segment-list-controls .specs-ai-filter-toggle,
.specs-segment-list-controls .specs-map-list-toggle {
  justify-content: flex-start;
}

.specs-segment-list-controls .specs-star-filter-combo {
  max-width: 200px;
  min-width: 200px;
  width: 200px;
}

.specs-segment-list-controls .specs-star-filter-popover {
  max-width: none;
  min-width: 200px;
  width: 100%;
}

.specs-segment-list-controls .specs-status-filter-combo,
.specs-segment-list-controls .specs-ai-filter-toggle,
.specs-segment-list-controls .specs-map-list-toggle {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding-left: 4px;
  padding-right: 4px;
}

.specs-segment-list-controls .specs-status-filter-combo:hover,
.specs-segment-list-controls .specs-status-filter-combo:focus-within,
.specs-segment-list-controls .specs-ai-filter-toggle:hover,
.specs-segment-list-controls .specs-ai-filter-toggle:focus-visible,
.specs-segment-list-controls .specs-map-list-toggle:hover,
.specs-segment-list-controls .specs-map-list-toggle:focus-within {
  background: transparent;
  border-color: transparent;
}

.specs-segment-list-controls .specs-status-filter-combo.active,
.specs-segment-list-controls .specs-ai-filter-toggle.active,
.specs-segment-list-controls .specs-map-list-toggle.active {
  background: transparent;
  border-color: transparent;
}

.specs-segment-list-controls .specs-status-filter-combo select {
  flex: 0 0 auto;
  width: auto;
}

.specs-segment-list-controls .specs-star-filter-trigger {
  flex: 0 0 auto;
}

.specs-segment-list > header > small {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-clear-filters {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--teal-dark);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  height: 26px;
  padding: 0 8px;
}

.specs-clear-filters:hover,
.specs-clear-filters:focus-visible {
  background: #eef8fb;
  border-color: #b7dee2;
}

.specs-ai-filter-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
  height: 26px;
  padding: 0 7px;
}

.specs-ai-filter-toggle:hover,
.specs-ai-filter-toggle:focus-visible {
  background: #eef8fb;
  border-color: #b7dee2;
  color: var(--teal-dark);
  outline: none;
}

.specs-ai-filter-toggle.active {
  background: #dcfce7;
  border-color: #86c49f;
  color: #065f35;
}

.specs-ai-filter-toggle.is-pending.active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.specs-ai-filter-toggle.is-review.active {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}

.specs-ai-filter-toggle.is-field-value.active {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
}

.specs-ai-filter-toggle.is-advanced.active {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

.specs-ai-filter-toggle svg {
  height: 13px;
  width: 13px;
}

.specs-ai-filter-toggle small {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid currentColor;
  border-radius: 999px;
  color: currentColor;
  font-size: 9px;
  line-height: 1;
  padding: 1px 4px;
}

.specs-status-filter-combo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  height: 26px;
  min-width: 0;
  padding: 0 6px;
}

.specs-status-filter-combo:hover,
.specs-status-filter-combo:focus-within {
  background: #eef8fb;
  border-color: #b7dee2;
  color: var(--teal-dark);
}

.specs-status-filter-combo.active {
  background: #dcfce7;
  border-color: #86c49f;
  color: #065f35;
}

.specs-status-filter-combo.is-pending.active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.specs-status-filter-combo.is-review.active {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}

.specs-ai-filter-combo.is-notProcessed.active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.specs-star-filter-combo.active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.specs-star-filter-combo {
  max-width: 200px;
  min-width: 200px;
  padding: 0;
  position: relative;
  width: 200px;
}

.specs-star-filter-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  font: inherit;
  flex: 1 1 auto;
  gap: 5px;
  height: 24px;
  min-width: 0;
  padding: 0 6px;
}

.specs-star-filter-trigger strong {
  color: currentColor;
  font-size: 11px;
  font-weight: 900;
  max-width: 130px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-status-filter-combo svg {
  flex: 0 0 auto;
  height: 13px;
  width: 13px;
}

.specs-status-filter-combo > span {
  color: currentColor;
}

.specs-status-filter-combo select {
  appearance: auto;
  background: transparent;
  border: 0;
  color: currentColor;
  flex: 1 1 auto;
  font: inherit;
  height: 24px;
  min-width: 0;
  outline: 0;
  padding: 0 2px;
}

.specs-ai-filter-combo select {
  min-width: 0;
}

.specs-star-filter-combo select {
  min-width: 0;
}

.specs-star-filter-combo svg {
  color: #d97706;
}

.specs-star-filter-combo small {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid currentColor;
  border-radius: 999px;
  color: currentColor;
  font-size: 9px;
  line-height: 1;
  padding: 1px 4px;
}

.specs-star-filter-popover {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  color: #7c2d12;
  display: grid;
  gap: 4px;
  left: 0;
  max-height: min(520px, calc(100vh - 210px));
  max-width: 200px;
  min-width: 200px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  position: absolute;
  top: 30px;
  width: 200px;
  z-index: 40;
}

.specs-star-filter-popover header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 2px 2px 6px;
}

.specs-star-filter-popover header strong {
  color: #431407;
  font-size: 12px;
  font-weight: 900;
}

.specs-star-filter-popover header button {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 5px;
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
  height: 24px;
  padding: 0 8px;
}

.specs-star-filter-popover header button:disabled {
  color: #9ca3af;
  opacity: 0.6;
}

.specs-star-filter-group {
  border-top: 1px solid #fed7aa;
  display: grid;
  gap: 2px;
  padding-top: 6px;
}

.specs-star-filter-group > strong {
  color: #7c2d12;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 6px;
}

.specs-star-filter-option {
  align-items: center;
  border-radius: 5px;
  display: grid;
  gap: 7px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  min-height: 28px;
  padding: 4px 6px;
}

.specs-star-filter-option:hover,
.specs-star-filter-option.active {
  background: #fff7ed;
}

.specs-star-filter-option input {
  accent-color: #d97706;
}

.specs-star-filter-option span {
  color: #7c2d12;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.specs-star-filter-option small {
  background: #ffedd5;
  border-color: #fed7aa;
  color: #9a3412;
  flex: 0 0 auto;
  justify-self: end;
  min-width: 28px;
  overflow: visible;
  text-align: center;
  white-space: nowrap;
}

.specs-map-list-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
  height: 26px;
  padding: 0 7px;
}

.specs-map-list-toggle:hover,
.specs-map-list-toggle:focus-within {
  background: #eef8fb;
  border-color: #b7dee2;
  color: var(--teal-dark);
}

.specs-map-list-toggle.active {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
}

.specs-map-list-toggle input {
  height: 13px;
  margin: 0 1px 0 0;
  width: 13px;
}

.specs-map-list-toggle svg {
  height: 13px;
  width: 13px;
}

.specs-map-list-toggle small {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid currentColor;
  border-radius: 999px;
  color: currentColor;
  font-size: 9px;
  line-height: 1;
  padding: 1px 4px;
}

.specs-panel-close {
  align-self: start;
  justify-self: end;
  height: 28px;
  width: 30px;
}

.specs-panel-rail-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.specs-panel-rail-button:hover,
.specs-panel-close:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.specs-advanced-filter-panel {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 9px 12px;
}

.specs-advanced-filter-builder {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1.1fr) minmax(260px, 1.45fr) auto;
}

.specs-advanced-filter-builder label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.specs-advanced-filter-builder label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.specs-advanced-filter-builder input,
.specs-advanced-filter-builder select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  height: 30px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.specs-advanced-filter-builder input:focus,
.specs-advanced-filter-builder select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
  outline: none;
}

.specs-advanced-field-combo {
  display: grid;
  gap: 4px;
  min-width: 0;
  position: relative;
}

.specs-advanced-field-combo > label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.specs-advanced-field-options {
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 2px;
  left: 0;
  max-height: 178px;
  overflow: auto;
  padding: 4px;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 35;
}

.specs-advanced-field-options > span {
  color: var(--muted);
  font-size: 11px;
  padding: 6px 8px;
}

.specs-advanced-field-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  display: flex;
  gap: 8px;
  min-height: 26px;
  padding: 4px 7px;
  text-align: left;
}

.specs-advanced-field-option:hover,
.specs-advanced-field-option.active {
  background: #eef2ff;
  color: #3730a3;
}

.specs-advanced-field-option strong {
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-advanced-field-option small {
  color: #64748b;
  flex: 0 0 auto;
  font-size: 10px;
}

.specs-advanced-value-picker {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.specs-advanced-comparison-options {
  display: grid;
  gap: 4px;
}

.specs-advanced-confidence-range {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: grid;
  gap: 7px;
  padding: 7px 8px;
}

.specs-advanced-confidence-range.active {
  background: #ecfdf5;
  border-color: #86efac;
}

.specs-advanced-confidence-range header {
  align-items: center;
  display: flex;
  gap: 6px;
}

.specs-advanced-confidence-range header span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  margin-right: auto;
}

.specs-advanced-confidence-range header strong {
  color: #166534;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.specs-advanced-confidence-range header button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #0f766e;
  font-size: 11px;
  height: 22px;
  padding: 0 7px;
}

.specs-advanced-confidence-range header button:disabled {
  color: #94a3b8;
}

.specs-confidence-range-slider {
  height: 20px;
  position: relative;
}

.specs-confidence-range-slider::before,
.specs-confidence-range-slider::after {
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  right: 0;
  top: 8px;
}

.specs-confidence-range-slider::before {
  background: #e2e8f0;
}

.specs-confidence-range-slider::after {
  background: #0f766e;
  left: var(--range-min, 0%);
  right: calc(100% - var(--range-max, 100%));
}

.specs-confidence-range-slider input[type="range"] {
  appearance: none;
  background: transparent;
  height: 20px;
  left: 0;
  margin: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 2;
}

.specs-confidence-range-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  background: #fff;
  border: 2px solid #0f766e;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  height: 15px;
  pointer-events: auto;
  width: 15px;
}

.specs-confidence-range-slider input[type="range"]::-moz-range-thumb {
  background: #fff;
  border: 2px solid #0f766e;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  height: 13px;
  pointer-events: auto;
  width: 13px;
}

.specs-confidence-range-slider input[type="range"]::-moz-range-track {
  background: transparent;
}

.specs-confidence-range-inputs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.specs-confidence-range-inputs label {
  align-items: center;
  display: flex;
  gap: 5px;
  min-width: 0;
}

.specs-confidence-range-inputs span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.specs-confidence-range-inputs input {
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  min-width: 0;
  padding: 0 6px;
  width: 100%;
}

.specs-advanced-value-picker__head {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.specs-advanced-value-picker__head > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.specs-advanced-value-picker__head small {
  color: #4338ca;
  font-size: 11px;
  margin-inline-end: auto;
  white-space: nowrap;
}

.specs-advanced-value-picker__head button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #3730a3;
  font-size: 11px;
  height: 22px;
  padding: 0 7px;
}

.specs-advanced-value-picker__head button:disabled {
  color: #94a3b8;
}

.specs-advanced-value-options {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: grid;
  gap: 2px;
  max-height: 112px;
  min-height: 30px;
  overflow: auto;
  padding: 3px;
}

.specs-advanced-value-options.is-empty {
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  padding-inline: 8px;
}

.specs-advanced-filter-builder .specs-advanced-value-option {
  align-items: center;
  border-radius: 4px;
  display: flex;
  gap: 6px;
  min-height: 24px;
  padding: 2px 5px;
}

.specs-advanced-filter-builder .specs-advanced-value-option:hover {
  background: #eef2ff;
}

.specs-advanced-filter-builder .specs-advanced-value-option input {
  flex: 0 0 auto;
  height: 14px;
  margin: 0;
  padding: 0;
  width: 14px;
}

.specs-advanced-filter-builder .specs-advanced-value-option span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-advanced-filter-builder .specs-advanced-old-mismatch {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #475569;
  display: flex;
  gap: 7px;
  min-height: 28px;
  padding: 4px 8px;
}

.specs-advanced-filter-builder .specs-advanced-old-mismatch.active {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

.specs-advanced-filter-builder .specs-advanced-old-mismatch input {
  flex: 0 0 auto;
  height: 14px;
  margin: 0;
  padding: 0;
  width: 14px;
}

.specs-advanced-filter-builder .specs-advanced-old-mismatch svg {
  flex: 0 0 auto;
  height: 14px;
  width: 14px;
}

.specs-advanced-filter-builder .specs-advanced-old-mismatch span {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-advanced-add {
  align-items: center;
  align-self: end;
  background: #3730a3;
  border: 1px solid #3730a3;
  border-radius: 5px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
}

.specs-advanced-add:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #64748b;
}

.specs-advanced-add svg {
  height: 13px;
  width: 13px;
}

.specs-advanced-filter-chips {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.specs-advanced-filter-chips > span {
  color: var(--muted);
  font-size: 11px;
}

.specs-advanced-filter-chip {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
  height: 24px;
  max-width: 100%;
  padding: 0 3px 0 8px;
}

.specs-advanced-filter-chip strong,
.specs-advanced-filter-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-advanced-filter-chip strong {
  max-width: 150px;
}

.specs-advanced-filter-chip small {
  align-items: center;
  background: #c7d2fe;
  border-radius: 999px;
  color: #312e81;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  height: 16px;
  justify-content: center;
  min-width: 16px;
  padding: 0 5px;
}

.specs-advanced-filter-remove {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #4338ca;
  display: inline-flex;
  height: 18px;
  justify-content: center;
  padding: 0;
  width: 18px;
}

.specs-advanced-filter-remove:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.specs-advanced-filter-remove svg {
  flex: 0 0 auto;
  height: 11px;
  width: 11px;
}

.specs-segment-list-resize-handle {
  align-items: stretch;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  cursor: col-resize;
  display: flex;
  justify-content: center;
  min-height: 0;
  outline: 0;
  touch-action: none;
}

.specs-segment-list-resize-handle span {
  background: transparent;
  border-radius: 999px;
  display: block;
  margin: 0 auto;
  transition: background 0.15s ease, box-shadow 0.15s ease, width 0.15s ease;
  width: 2px;
}

.specs-segment-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.specs-segment-grid {
  display: grid;
  min-width: max-content;
}

.specs-segment-grid-head,
.specs-segment-grid-row {
  align-items: center;
  display: grid;
  grid-template-columns: var(--specs-segment-grid-columns);
  min-width: max-content;
}

.specs-segment-grid-head {
  background: #faf9f8;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  min-height: 42px;
  position: sticky;
  top: 0;
  z-index: 8;
}

.specs-segment-grid-cell {
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 0 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-segment-grid-cell.is-sticky {
  background: inherit;
  left: var(--sticky-left, 0);
  position: sticky;
  z-index: 1;
}

.specs-segment-grid-head .specs-segment-grid-cell.is-sticky {
  background: #faf9f8;
  z-index: 10;
}

.specs-segment-grid-head-cell {
  align-items: center;
  display: flex;
  gap: 4px;
  height: 42px;
  overflow: visible;
  padding-right: 13px;
  position: relative;
}

.specs-segment-grid-head-cell.is-filtered {
  color: var(--teal-dark);
}

.specs-segment-grid-cell.is-old-mismatch-field {
  background: #f8f7ff;
  border-left: 1px solid #ddd6fe;
  border-right: 1px solid #ddd6fe;
  padding-inline: 6px;
}

.specs-segment-grid-cell.is-focus-field:not(.is-old-mismatch-field) {
  background: #f0fdfa;
  border-left: 1px solid #99f6e4;
  border-right: 1px solid #99f6e4;
  padding-inline: 6px;
}

.specs-segment-grid-head-cell.is-old-mismatch-field {
  color: #3730a3;
}

.specs-segment-grid-head-cell.is-focus-field:not(.is-old-mismatch-field) {
  color: #0f766e;
}

.specs-segment-grid-head-cell.is-old-mismatch-field .specs-column-title::after {
  background: #ddd6fe;
  border-radius: 999px;
  color: #3730a3;
  content: "Old != AI";
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  margin-left: 6px;
  padding: 2px 5px;
  vertical-align: middle;
}

.specs-segment-grid-head-cell.is-focus-field:not(.is-old-mismatch-field) .specs-column-title::after {
  background: #ccfbf1;
  border-radius: 999px;
  color: #0f766e;
  content: "Focus";
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  margin-left: 6px;
  padding: 2px 5px;
  vertical-align: middle;
}

.specs-grid-field-focus-value {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.specs-grid-field-focus-value__display {
  color: #0f172a;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-grid-confidence {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  padding: 4px 6px;
}

.specs-grid-confidence.confidence-high {
  background: #dcfce7;
  color: #166534;
}

.specs-grid-confidence.confidence-medium {
  background: #fef3c7;
  color: #92400e;
}

.specs-grid-confidence.confidence-low,
.specs-grid-confidence.confidence-none {
  background: #fee2e2;
  color: #991b1b;
}

.specs-column-title-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  flex: 1 1 auto;
  gap: 4px;
  height: 28px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.specs-column-title-button:hover,
.specs-column-title-button.active {
  color: var(--teal-dark);
}

.specs-column-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-column-sort-icon {
  align-items: center;
  color: currentColor;
  display: inline-flex;
  flex: 0 0 auto;
}

.specs-column-sort-icon svg {
  height: 12px;
  width: 12px;
}

.specs-column-autofit-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.specs-column-autofit-button:hover,
.specs-column-autofit-button:focus-visible {
  border-color: #c7d2fe;
  color: #3730a3;
}

.specs-column-autofit-button svg {
  height: 12px;
  width: 12px;
}

.specs-column-context-menu {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 3px;
  min-width: 188px;
  padding: 6px;
  position: fixed;
  z-index: 1300;
}

.specs-column-context-menu strong {
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  padding: 5px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-column-context-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #1e293b;
  display: grid;
  font-size: 12px;
  gap: 7px;
  grid-template-columns: 16px minmax(0, 1fr);
  min-height: 32px;
  padding: 0 8px;
  text-align: left;
}

.specs-column-context-menu button:hover,
.specs-column-context-menu button:focus-visible {
  background: #eff6ff;
  color: #1d4ed8;
}

.specs-column-context-menu button svg {
  height: 14px;
  width: 14px;
}

.specs-column-context-menu button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-column-resize-handle {
  background: transparent;
  border: 0;
  bottom: 0;
  cursor: col-resize;
  padding: 0;
  position: absolute;
  right: -4px;
  top: 0;
  width: 9px;
  z-index: 4;
}

.specs-column-resize-handle::after {
  background: transparent;
  border-radius: 999px;
  bottom: 7px;
  content: "";
  position: absolute;
  right: 4px;
  top: 7px;
  width: 2px;
}

.specs-column-resize-handle:hover::after,
.specs-column-resize-handle:focus-visible::after {
  background: #6366f1;
}

.specs-old-new-value {
  align-items: stretch;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
  width: 100%;
}

.specs-old-new-value__part {
  align-items: center;
  border-radius: 5px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
  padding: 4px 6px;
}

.specs-old-new-value__part small {
  border-radius: 999px;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 5px;
  text-transform: uppercase;
}

.specs-old-new-value__part b {
  font-size: 12px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-old-new-value__ai-main {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.specs-old-new-value__ai-main b {
  flex: 1 1 auto;
}

.specs-old-new-value__ai-main .specs-grid-confidence {
  padding: 3px 5px;
}

.specs-old-new-value__part.is-old {
  background: #fff7ed;
  color: #9a3412;
}

.specs-old-new-value__part.is-old small {
  background: #c2410c;
}

.specs-old-new-value__part.is-ai {
  background: #ecfdf5;
  color: #166534;
}

.specs-old-new-value__part.is-ai small {
  background: #15803d;
}

.specs-old-new-value.is-same .specs-old-new-value__part.is-ai {
  background: #f1f5f9;
  color: #475569;
}

.specs-old-new-value.is-same .specs-old-new-value__part.is-ai small {
  background: #64748b;
}

.specs-column-filter-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  min-width: 24px;
  padding: 0 4px;
}

.specs-column-filter-button:hover,
.specs-column-filter-button:focus-visible {
  border-color: #b7dee2;
  color: var(--teal-dark);
}

.specs-column-filter-button.active {
  background: #eef8fb;
  border-color: #b7dee2;
  color: var(--teal-dark);
}

.specs-column-filter-button svg {
  height: 12px;
  width: 12px;
}

.specs-column-filter-button small {
  color: currentColor;
  font-size: 9px;
  line-height: 1;
  margin-left: 2px;
}

.specs-column-filter-popover {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  color: var(--ink);
  display: grid;
  gap: 8px;
  left: 8px;
  max-width: 300px;
  min-width: 220px;
  padding: 9px;
  position: absolute;
  top: calc(100% + 4px);
  z-index: 40;
}

.specs-column-filter-popover header {
  align-items: center;
  border: 0;
  display: flex;
  justify-content: space-between;
  padding: 0;
}

.specs-column-filter-popover header strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-column-filter-popover header button,
.specs-column-filter-popover footer button,
.specs-filter-option-actions button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  height: 24px;
  padding: 0 7px;
}

.specs-column-filter-popover header button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.specs-column-filter-popover header svg {
  height: 13px;
  width: 13px;
}

.specs-filter-text {
  display: grid;
  gap: 4px;
}

.specs-filter-text span {
  color: var(--muted);
  font-size: 11px;
}

.specs-filter-text input {
  border: 1px solid var(--line);
  border-radius: 5px;
  height: 28px;
  padding: 0 7px;
  width: 100%;
}

.specs-filter-options {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}

.specs-filter-option-actions {
  display: flex;
  gap: 6px;
}

.specs-filter-option {
  align-items: start;
  display: grid;
  gap: 7px;
  grid-template-columns: 14px minmax(0, 1fr);
  line-height: 1.25;
}

.specs-filter-option input {
  margin: 1px 0 0;
}

.specs-filter-option span {
  white-space: normal;
}

.specs-column-filter-popover footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  padding-top: 7px;
}

.specs-segment-grid-row {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  min-height: 36px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.specs-segment-grid-row:hover,
.specs-segment-grid-row:focus-visible {
  background: #f8fafc;
  outline: none;
}

.specs-segment-grid-row.active {
  background: #eef8fb;
  box-shadow: inset 3px 0 0 var(--teal);
}

.specs-segment-grid-row.is-running-agents {
  background: #f0fdf4;
  box-shadow: inset 3px 0 0 #2f8a45;
}

.specs-segment-grid-row.is-batch-running {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.specs-segment-grid-row.is-batch-complete {
  background: #f0fdf4;
  box-shadow: inset 3px 0 0 #22c55e;
}

.specs-segment-grid-row.is-batch-failed {
  background: #fef2f2;
  box-shadow: inset 3px 0 0 #dc2626;
}

.specs-segment-grid-row.is-batch-blocked {
  background: #f8fafc;
  box-shadow: inset 3px 0 0 #64748b;
  opacity: 0.78;
}

.specs-segment-grid-row.is-batch-blocked.active {
  opacity: 1;
}

.specs-segment-grid-row .specs-segment-grid-cell {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 5px;
}

.specs-segment-grid-row .specs-segment-grid-cell:first-child {
  color: var(--teal-dark);
  font-weight: 700;
}

.specs-segment-id-cell {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}

.specs-segment-id-cell > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.specs-aerial-overlay-button {
  border-radius: 4px;
  cursor: pointer;
}

.specs-segment-blocked-badge {
  align-items: center;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #b91c1c;
  display: inline-flex;
  flex: 0 0 auto;
  height: 18px;
  justify-content: center;
  width: 18px;
}

.specs-segment-blocked-badge svg {
  height: 12px;
  width: 12px;
}

.specs-segment-batch-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 18px;
  justify-content: center;
  width: 18px;
}

.specs-segment-batch-status svg {
  height: 13px;
  width: 13px;
}

.specs-segment-batch-status.is-running {
  background: #dbeafe;
  color: #1d4ed8;
}

.specs-segment-batch-status.is-complete {
  background: #dcfce7;
  color: #15803d;
}

.specs-segment-batch-status.is-failed {
  background: #fee2e2;
  color: #b91c1c;
}

.specs-star-rating-mini {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.specs-star-rating-mini__item {
  align-items: center;
  border: 1px solid #d8e0e8;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  max-width: 56px;
  min-width: 0;
  padding: 1px 3px 1px 5px;
}

.specs-star-rating-mini__item b {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  max-width: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.specs-star-rating-mini__item em {
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  min-width: 16px;
  padding: 3px 4px;
  text-align: center;
}

.specs-grid-batch-progress {
  background: #fff;
  border-top: 1px solid var(--line);
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  padding: 8px;
}

.specs-grid-batch-progress > div:first-child {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.specs-grid-batch-progress strong {
  color: #1e293b;
  font-size: 12px;
}

.specs-grid-batch-progress span,
.specs-grid-batch-progress small {
  color: #64748b;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-grid-batch-meter {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.specs-grid-batch-meter span {
  background: #2563eb;
  display: block;
  height: 100%;
  transition: width 0.25s ease;
}

.specs-grid-batch-progress.is-complete .specs-grid-batch-meter span {
  background: #22c55e;
}

.specs-segment-context-menu {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 3px;
  min-width: 246px;
  padding: 6px;
  position: fixed;
  z-index: 1300;
}

.specs-segment-context-menu strong {
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 7px;
}

.specs-segment-context-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #1e293b;
  display: grid;
  font-size: 12px;
  gap: 7px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  min-height: 32px;
  padding: 0 8px;
  text-align: left;
}

.specs-segment-context-menu button:hover:not(:disabled) {
  background: #eff6ff;
  color: #1d4ed8;
}

.specs-segment-context-menu button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.specs-segment-context-menu button svg {
  height: 14px;
  width: 14px;
}

.specs-segment-context-menu button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs-segment-context-menu button small {
  background: #f1f5f9;
  border-radius: 999px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 6px;
}

.specs-segment-pagination {
  background: #fff;
  border-top: 1px solid var(--line);
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  padding: 7px 8px;
}

.specs-segment-pagination__summary {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.specs-segment-pagination__controls {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(76px, 1fr) 26px 26px minmax(62px, auto) 26px 26px;
}

.specs-segment-pagination__controls label {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 5px;
  min-width: 0;
}

.specs-segment-pagination__controls select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  height: 24px;
  min-width: 54px;
}

.specs-segment-pagination__controls button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  display: inline-flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 26px;
}

.specs-segment-pagination__controls button:hover:not(:disabled),
.specs-segment-pagination__controls button:focus-visible {
  border-color: var(--teal);
  color: var(--teal-dark);
  outline: none;
}

.specs-segment-pagination__controls svg {
  height: 14px;
  width: 14px;
}

.specs-segment-pagination__controls > span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.segment-spec-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.segment-spec-layout {
  display: grid;
  grid-template-columns: var(--spec-info-column, minmax(0, 1.2fr)) 10px var(--spec-map-column, minmax(360px, 0.8fr));
  min-height: 0;
}

.workspace-specs.is-segment-info-closed .segment-spec-layout {
  grid-template-columns: minmax(0, 1fr);
}

.segment-spec-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
  position: relative;
}

.segment-info-close {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 4;
}

.segment-spec-info-rail {
  align-items: start;
  border-right: 1px solid var(--line);
  display: flex;
  justify-content: center;
  min-height: 0;
  padding-top: 10px;
}

.segment-info-grid {
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-left: 2px solid #0078d4;
  border-radius: 2px;
  display: grid;
  column-gap: 16px;
  row-gap: 6px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  margin-bottom: 10px;
  padding: 6px 42px 6px 10px;
}

.segment-info-grid div {
  align-items: baseline;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.38fr) 12px minmax(120px, 1fr);
  min-width: 0;
  padding: 3px 8px;
}

.segment-info-grid div::before {
  color: var(--muted);
  content: ":";
  grid-column: 2;
  grid-row: 1;
}

.segment-info-grid span,
.segment-info-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-info-grid span {
  grid-column: 1;
}

.segment-info-grid strong {
  grid-column: 3;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.segment-info-grid__segment {
  align-items: center;
}

.segment-info-grid__segment strong {
  background: #0078d4;
  border-radius: 2px;
  color: #ffffff;
  display: inline-flex;
  font-size: 17px;
  justify-content: center;
  line-height: 1;
  min-width: 36px;
  padding: 4px 10px;
  width: max-content;
}

.segment-star-rating-strip {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left: 4px solid #1f7a4d;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
}

.segment-star-rating-strip header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.segment-star-rating-strip header strong {
  align-items: center;
  color: #1f2937;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
}

.segment-star-rating-strip header strong svg {
  color: #d97706;
  height: 15px;
  width: 15px;
}

.segment-star-rating-actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
}

.segment-star-rating-chat-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  padding: 0;
  width: 28px;
}

.segment-star-rating-chat-button:hover {
  background: #fff7ed;
  border-color: #fdba74;
  color: #7c2d12;
}

.segment-star-rating-chat-button svg {
  height: 15px;
  width: 15px;
}

.segment-star-rating-worst {
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
}

.segment-star-rating-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
}

.segment-star-rating-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 7px 8px;
}

.segment-star-rating-item > span:first-child {
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-star-rating-item > strong {
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  min-width: 25px;
  padding: 3px 6px;
  text-align: center;
}

.segment-star-symbols {
  display: inline-flex;
  gap: 1px;
  grid-column: 1 / -1;
  min-width: 0;
}

.segment-star-symbol {
  color: #cbd5e1;
  display: inline-flex;
  height: 14px;
  position: relative;
  width: 14px;
}

.segment-star-symbol svg {
  height: 14px;
  width: 14px;
}

.segment-star-symbol-fill {
  color: currentColor;
  display: inline-flex;
  inset: 0 auto 0 0;
  overflow: hidden;
  position: absolute;
}

.segment-star-symbol-fill svg {
  color: currentColor;
  fill: currentColor;
  flex: 0 0 14px;
  stroke: currentColor;
}

.star-tone-very-low {
  --star-tone-color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.star-tone-low {
  --star-tone-color: #b45309;
  background: #fff7ed;
  border-color: #fed7aa;
  color: #b45309;
}

.star-tone-target {
  --star-tone-color: #ca8a04;
  background: #fefce8;
  border-color: #fde68a;
  color: #a16207;
}

.star-tone-good {
  --star-tone-color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.star-tone-best {
  --star-tone-color: #047857;
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #047857;
}

.segment-star-rating-item.star-tone-very-low > strong,
.segment-star-rating-worst.star-tone-very-low,
.specs-star-rating-mini__item.star-tone-very-low em {
  background: #b91c1c;
  color: #ffffff;
}

.segment-star-rating-item.star-tone-low > strong,
.segment-star-rating-worst.star-tone-low,
.specs-star-rating-mini__item.star-tone-low em {
  background: #b45309;
  color: #ffffff;
}

.segment-star-rating-item.star-tone-target > strong,
.segment-star-rating-worst.star-tone-target,
.specs-star-rating-mini__item.star-tone-target em {
  background: #ca8a04;
  color: #ffffff;
}

.segment-star-rating-item.star-tone-good > strong,
.segment-star-rating-worst.star-tone-good,
.specs-star-rating-mini__item.star-tone-good em {
  background: #15803d;
  color: #ffffff;
}

.segment-star-rating-item.star-tone-best > strong,
.segment-star-rating-worst.star-tone-best,
.specs-star-rating-mini__item.star-tone-best em {
  background: #047857;
  color: #ffffff;
}

.segment-star-rating-item .segment-star-symbol-fill {
  color: var(--star-tone-color);
}

.segment-spec-icon-toolbar {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 10px;
  padding-bottom: 6px;
}

.segment-spec-view-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}

.segment-field-search {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  flex: 1 1 250px;
  gap: 6px;
  height: 30px;
  max-width: 360px;
  min-width: 190px;
  padding: 0 8px;
}

.segment-field-search svg {
  color: #2563eb;
  flex: 0 0 auto;
  height: 14px;
  width: 14px;
}

.segment-field-search input {
  border: 0;
  color: var(--ink);
  flex: 1 1 auto;
  height: 26px;
  min-width: 0;
  outline: 0;
}

.segment-field-search small {
  background: #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  min-width: 18px;
  padding: 3px 6px;
  text-align: center;
}

.segment-field-search button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #64748b;
  display: inline-flex;
  flex: 0 0 auto;
  height: 20px;
  justify-content: center;
  padding: 0;
  width: 20px;
}

.segment-field-search button svg {
  color: currentColor;
  height: 13px;
  width: 13px;
}

.segment-confidence-filter {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  gap: 6px;
  height: 30px;
  padding: 0 8px;
}

.segment-confidence-filter svg {
  color: #0f766e;
  height: 14px;
  width: 14px;
}

.segment-confidence-filter select {
  background: transparent;
  border: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  height: 26px;
  max-width: 160px;
  outline: 0;
}

.segment-spec-view-combo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #334155;
  display: inline-flex;
  gap: 5px;
  height: 30px;
  padding: 0 8px;
}

.segment-old-value-toggle.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.segment-spec-view-combo select {
  background: transparent;
  border: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  max-width: 150px;
  outline: 0;
}

.segment-spec-view-combo svg,
.segment-old-value-toggle svg {
  height: 13px;
  width: 13px;
}

.segment-ai-insight {
  background: #f7fcf9;
  border: 1px solid #b7dbc8;
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  color: #1e293b;
  display: grid;
  flex: 1 1 100%;
  gap: 8px;
  padding: 9px 10px;
}

.segment-ai-insight header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.segment-ai-insight header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.segment-ai-insight header strong {
  align-items: center;
  color: #1f2937;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
}

.segment-ai-insight header strong svg {
  color: var(--blue);
  height: 14px;
  width: 14px;
}

.segment-ai-insight header span {
  color: #6b7280;
  font-size: 11px;
}

.segment-ai-insight-neighbor-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b7dbc8;
  border-radius: 999px;
  color: var(--teal-dark);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  height: 24px;
  padding: 0 8px 0 6px;
}

.segment-ai-insight-neighbor-toggle input {
  height: 13px;
  margin: 0;
  width: 13px;
}

.segment-ai-insight-neighbor-toggle span {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
}

.segment-ai-insight-neighbor-toggle small {
  background: #d8f3e5;
  border-radius: 999px;
  color: #065f35;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  min-width: 16px;
  padding: 2px 5px;
  text-align: center;
}

.segment-ai-insight header button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b7dbc8;
  border-radius: 999px;
  color: var(--teal-dark);
  display: inline-flex;
  flex: 0 0 auto;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.segment-ai-insight header button svg {
  height: 14px;
  width: 14px;
}

.segment-ai-insight-tabs {
  align-items: center;
  border-bottom: 1px solid rgba(17, 123, 131, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 7px;
}

.segment-ai-insight-tabs button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b7dbc8;
  border-radius: 999px;
  color: var(--teal-dark);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  min-height: 26px;
  padding: 0 10px;
}

.segment-ai-insight-tabs button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.34);
}

.segment-ai-insight-tabs button svg {
  height: 13px;
  width: 13px;
}

.segment-ai-insight-tabs small {
  background: #e6f4ed;
  border-radius: 999px;
  color: #065f35;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  min-width: 16px;
  padding: 2px 5px;
  text-align: center;
}

.segment-ai-insight-panel {
  background: #ffffff;
  border: 1px solid #cfe8d9;
  border-radius: 7px;
  display: grid;
  gap: 8px;
  padding: 8px;
}

.segment-ai-insight-data-actions {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

.segment-ai-expert {
  background: #ffffff;
  border: 1px solid #cfe8d9;
  border-radius: 7px;
  display: grid;
  gap: 6px;
  padding: 8px;
}

.segment-ai-expert > strong {
  align-items: center;
  color: var(--teal-dark);
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
}

.segment-ai-expert > strong svg {
  height: 14px;
  width: 14px;
}

.segment-ai-expert p {
  color: #334155;
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
}

.segment-ai-expert-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.segment-ai-expert-facts span {
  background: #f7fcf9;
  border: 1px solid #cfe8d9;
  border-radius: 999px;
  color: #4b5563;
  font-size: 10px;
  max-width: 230px;
  overflow: hidden;
  padding: 3px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-ai-expert-facts b {
  color: var(--teal-dark);
  margin-right: 4px;
}

.segment-ai-expert-focus {
  display: grid;
  gap: 4px;
}

.segment-ai-expert-focus b {
  color: #1f2937;
  font-size: 11px;
}

.segment-ai-expert-focus span {
  background: #f8fafc;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  color: #334155;
  font-size: 11px;
  line-height: 1.3;
  padding: 4px 7px;
}

.segment-ai-insight-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.segment-ai-insight-kpis span {
  background: #e6f4ed;
  border: 1px solid #b7dbc8;
  border-radius: 999px;
  color: #4b5563;
  font-size: 11px;
  padding: 3px 7px;
}

.segment-ai-insight-kpis b {
  color: var(--blue);
}

.segment-ai-insight-body {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.75fr);
}

.segment-ai-insight-list,
.segment-ai-insight-sources {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.segment-ai-insight-list > strong,
.segment-ai-insight-sources > strong {
  color: #1f2937;
  font-size: 11px;
}

.segment-ai-insight-item {
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #1e293b;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(92px, 0.8fr) auto minmax(120px, 1fr);
  min-height: 26px;
  padding: 4px 7px;
  text-align: left;
}

button.segment-ai-insight-item {
  cursor: pointer;
}

button.segment-ai-insight-item:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(11, 127, 71, 0.12);
}

.segment-ai-insight-item span,
.segment-ai-insight-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-ai-insight-item span {
  font-size: 11px;
  font-weight: 700;
}

.segment-ai-insight-item em {
  background: #e6f4ed;
  border-radius: 999px;
  color: var(--blue);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  padding: 2px 5px;
}

.segment-ai-insight-item small {
  color: #64748b;
  font-size: 10px;
}

.segment-ai-insight-sources {
  align-content: start;
}

.segment-ai-insight-sources span,
.segment-ai-insight-sources em {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  color: #475569;
  font-size: 10px;
  font-style: normal;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-ai-insight.collapsed {
  gap: 0;
}

.segment-ai-insight.collapsed .segment-ai-insight-kpis,
.segment-ai-insight.collapsed .segment-ai-insight-body,
.segment-ai-insight.collapsed .segment-ai-expert,
.segment-ai-insight.collapsed .segment-ai-insight-tabs,
.segment-ai-insight.collapsed .segment-ai-insight-panel,
.segment-ai-insight.collapsed .segment-ai-neighbor {
  display: none;
}

.segment-ai-neighbor {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  display: grid;
  gap: 7px;
  padding: 7px;
}

.segment-ai-neighbor > strong {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 11px;
  gap: 8px;
  justify-content: space-between;
}

.segment-ai-neighbor > strong span {
  color: #64748b;
  font-weight: 600;
}

.segment-ai-neighbor-list {
  display: grid;
  gap: 5px;
}

.segment-ai-neighbor-item {
  align-items: center;
  border: 1px solid #dbeafe;
  border-left: 3px solid #2563eb;
  border-radius: 6px;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(100px, 0.8fr) auto minmax(110px, 1fr) minmax(90px, 0.7fr);
  min-height: 28px;
  padding: 4px 7px;
}

.segment-ai-neighbor-item.weak {
  border-left-color: #f59e0b;
}

.segment-ai-neighbor-item span,
.segment-ai-neighbor-item b,
.segment-ai-neighbor-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-ai-neighbor-item span {
  color: #1e293b;
  font-size: 11px;
  font-weight: 700;
}

.segment-ai-neighbor-item em {
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  padding: 2px 5px;
}

.segment-ai-neighbor-item b {
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
}

.segment-ai-neighbor-item small,
.segment-ai-neighbor p {
  color: #64748b;
  font-size: 10px;
  margin: 0;
}

.segment-spec-tabs {
  display: flex;
  gap: 4px;
  grid-column: 1 / -1;
  grid-row: 3;
  min-width: 0;
  overflow-x: auto;
}

.segment-spec-tabs button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--category-color, var(--muted));
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  padding: 6px 10px;
}

.segment-spec-tabs button small {
  background: #eef6ff;
  border: 1px solid #c7e0f4;
  border-radius: 999px;
  color: #004578;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 5px;
}

.segment-spec-tabs button.active {
  background: #fff;
  border-color: var(--line);
  box-shadow: inset 0 -3px 0 var(--category-color, var(--teal));
  color: var(--ink);
}

.segment-icon-size-control {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  gap: 6px;
  height: 28px;
  padding: 0 2px;
}

.segment-icon-size-control span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
}

.segment-icon-size-control svg {
  height: 13px;
  width: 13px;
}

.segment-icon-size-control input {
  accent-color: var(--teal);
  appearance: none;
  background: transparent;
  height: 18px;
  width: 88px;
}

.segment-icon-size-control input::-webkit-slider-runnable-track {
  background: #a19f9d;
  border-radius: 999px;
  height: 2px;
}

.segment-icon-size-control input::-webkit-slider-thumb {
  appearance: none;
  background: var(--teal);
  border: 0;
  border-radius: 999px;
  height: 12px;
  margin-top: -5px;
  width: 12px;
}

.segment-icon-size-control input::-moz-range-track {
  background: #a19f9d;
  border: 0;
  border-radius: 999px;
  height: 2px;
}

.segment-icon-size-control input::-moz-range-thumb {
  background: var(--teal);
  border: 0;
  border-radius: 999px;
  height: 12px;
  width: 12px;
}

.segment-spec-icon-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-end;
}

.segment-status-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  gap: 2px;
  height: 28px;
  padding: 2px;
}

.segment-status-toggle button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #475569;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
}

.segment-status-toggle button svg {
  height: 12px;
  width: 12px;
}

.segment-status-toggle button.active {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}

.segment-status-toggle button:nth-child(2).active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.segment-status-toggle button:disabled {
  opacity: 0.62;
}

.segment-batch-block-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
}

.segment-batch-block-toggle.active {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
}

.segment-batch-block-toggle svg {
  height: 13px;
  width: 13px;
}

.segment-batch-block-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.segment-batch-block-toggle:disabled svg[data-lucide="loader-circle"] {
  animation: irapSpin 0.9s linear infinite;
}

.specs-batch-filter-combo.is-blocked,
.specs-batch-filter-combo.is-all {
  border-color: #fecaca;
  color: #991b1b;
}

.segment-spec-edit-toggle {
  gap: 5px;
  padding: 0 9px;
}

.segment-spec-edit-toggle.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.segment-spec-edit-cancel {
  color: #7f1d1d;
  gap: 5px;
  padding: 0 9px;
}

.segment-spec-edit-error {
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
}

.segment-icon-sections {
  align-content: start;
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.segment-icon-section {
  border-top: 3px solid var(--category-color);
  padding-top: 8px;
}

.segment-icon-section header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.segment-icon-section h3 {
  color: var(--category-color);
  font-size: 16px;
  margin: 0;
}

.segment-icon-section header span {
  color: var(--muted);
  font-size: 12px;
}

.segment-focused-field-section {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-top: 3px solid #2563eb;
  border-radius: 6px;
  padding: 8px;
}

.segment-focused-field-section h3 {
  color: #1d4ed8;
}

.segment-focused-field-section header span {
  color: #1d4ed8;
  font-weight: 800;
}

.segment-focused-field-close {
  background: #ffffff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  height: 28px;
  width: 28px;
}

.segment-focused-field-close:hover,
.segment-focused-field-close:focus-visible {
  background: #dbeafe;
  border-color: #60a5fa;
}

.segment-focused-field-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--spec-icon-grid-min, 112px)), min(100%, 190px)));
  justify-content: start;
}

.segment-icon-grid {
  display: grid;
  align-items: stretch;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--spec-icon-grid-min, 112px)), 1fr));
  grid-auto-rows: minmax(var(--spec-icon-card-min-height, 138px), auto);
}

.segment-icon-card {
  --segment-card-status-color: var(--line);
  --segment-card-status-shadow: rgba(14, 165, 164, 0.32);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: var(--spec-icon-card-gap, 4px);
  grid-template-rows: var(--spec-icon-frame-height, 65px) auto minmax(0, 1fr);
  height: 100%;
  min-height: var(--spec-icon-card-min-height, 138px);
  min-width: 0;
  overflow: hidden;
  padding: var(--spec-icon-card-padding, 4px);
  position: relative;
}

.segment-icon-card.has-discuss {
  padding-bottom: max(var(--spec-icon-card-padding, 4px), 24px);
}

.segment-icon-card.is-value-filterable {
  padding-top: max(var(--spec-icon-card-padding, 4px), 18px);
}

.segment-icon-card.is-value-filter-selected {
  border-color: var(--segment-card-status-color, #0ea5a4);
  box-shadow: inset 0 0 0 1px var(--segment-card-status-shadow, rgba(14, 165, 164, 0.32));
}

.segment-icon-card.is-focused-field {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.24), 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.segment-icon-card.has-source-image {
  cursor: pointer;
}

.segment-icon-card.has-source-image:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 2px;
}

.segment-icon-card.is-field-running {
  box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.22), 0 0 0 3px rgba(14, 116, 144, 0.12);
}

.segment-icon-value-filter-check {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #b7dee2;
  border-radius: 999px;
  color: var(--teal-dark);
  display: inline-flex;
  gap: 3px;
  left: 4px;
  padding: 2px 5px 2px 3px;
  position: absolute;
  top: 4px;
  z-index: 5;
}

.segment-icon-value-filter-check input {
  accent-color: var(--teal);
  height: 13px;
  margin: 0;
  width: 13px;
}

.segment-icon-value-filter-check span {
  align-items: center;
  color: currentColor;
  display: inline-flex;
  justify-content: center;
  margin: 0;
}

.segment-icon-value-filter-check svg {
  height: 11px;
  width: 11px;
}

.segment-icon-card .segment-icon-confidence {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  line-height: 1;
  margin: 0;
  min-width: 34px;
  overflow: visible;
  padding: 0 7px;
  position: absolute;
  right: 5px;
  text-overflow: clip;
  top: 5px;
  white-space: nowrap;
  z-index: 6;
}

.segment-icon-discuss {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #1d4ed8;
  cursor: pointer;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  left: 5px;
  padding: 0;
  position: absolute;
  bottom: 5px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  width: 22px;
  z-index: 7;
}

.segment-icon-discuss:hover,
.segment-icon-discuss:focus-visible {
  background: transparent;
  outline: none;
  transform: translateY(-1px);
}

.segment-icon-discuss svg {
  height: 12px;
  width: 12px;
}

.segment-icon-confidence.confidence-high {
  background: #15803d;
  border-color: #86efac;
}

.segment-icon-confidence.confidence-medium {
  background: #b7791f;
  border-color: #fde68a;
}

.segment-icon-confidence.confidence-low {
  background: #b91c1c;
  border-color: #fecaca;
}

.segment-icon-field-prompt {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  bottom: 5px;
  color: #3730a3;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  margin: 0;
  padding: 0;
  position: absolute;
  right: 5px;
  width: 20px;
  z-index: 7;
}

.segment-icon-field-prompt svg {
  height: 11px;
  width: 11px;
}

.segment-icon-running {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #99d4df;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  color: #0e7490;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  gap: 4px;
  left: 50%;
  line-height: 1;
  margin: 0;
  max-width: calc(100% - 16px);
  padding: 5px 8px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 9;
}

.segment-icon-card .segment-icon-running {
  display: inline-flex;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.segment-icon-running i,
.segment-icon-running svg,
.field-prompt-menu button [data-lucide="loader-circle"],
.field-prompt-menu button svg[data-lucide="loader-circle"],
.specs-segment-context-menu button [data-lucide="loader-circle"],
.specs-segment-context-menu button svg[data-lucide="loader-circle"],
.specs-segment-batch-status [data-lucide="loader-circle"],
.specs-segment-batch-status svg[data-lucide="loader-circle"],
.field-batch-dialog button [data-lucide="loader-circle"],
.field-batch-dialog button svg[data-lucide="loader-circle"] {
  animation: irapSpin 0.9s linear infinite;
  height: 13px;
  width: 13px;
}

.field-prompt-menu {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 3px;
  min-width: 210px;
  padding: 6px;
  position: fixed;
  z-index: 1000;
}

.field-prompt-menu strong {
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 7px;
}

.field-prompt-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #1e293b;
  display: flex;
  font-size: 12px;
  gap: 7px;
  min-height: 30px;
  padding: 0 8px;
  text-align: left;
}

.field-prompt-menu button:hover:not(:disabled) {
  background: #eff6ff;
  color: #1d4ed8;
}

.field-prompt-menu button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.field-prompt-menu button svg {
  height: 14px;
  width: 14px;
}

.field-prompt-modal {
  background: #f8fafc;
  display: block;
  inset: 0;
  padding: 0;
  position: fixed;
  z-index: 2000;
}

.field-prompt-dialog {
  background: #f8fafc;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 0;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  max-width: none;
  padding: 0;
  width: 100vw;
}

.field-prompt-dialog footer {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.field-batch-modal {
  align-items: center;
  background: rgba(15, 23, 42, 0.34);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 2200;
}

.field-batch-dialog {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 12px;
  max-width: 720px;
  padding: 14px;
  width: min(720px, 100%);
}

.field-batch-dialog header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.field-batch-dialog header div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.field-batch-dialog header span,
.field-batch-summary span,
.field-batch-controls span {
  color: #64748b;
  font-size: 12px;
}

.field-batch-dialog header strong {
  color: #0f172a;
  font-size: 20px;
}

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

.field-batch-summary div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.field-batch-summary strong {
  color: #1e293b;
  font-size: 15px;
}

.field-batch-summary small {
  color: #64748b;
  font-size: 12px;
}

.field-batch-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 13px;
  margin: 0;
  padding: 10px;
}

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

.field-batch-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field-batch-controls select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-size: 14px;
  min-height: 36px;
  padding: 0 9px;
  width: 100%;
}

.field-batch-dialog footer {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.model-compare-side-panel {
  background: #ffffff;
  border-right: 1px solid #cbd5e1;
  bottom: 0;
  box-shadow: 12px 0 34px rgba(15, 23, 42, 0.18);
  left: var(--sidebar-width, 92px);
  position: fixed;
  top: var(--topbar-height, 54px);
  width: min(640px, calc(100vw - var(--sidebar-width, 92px)));
  z-index: 2300;
}

.model-compare-dialog {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  height: 100%;
  max-height: none;
  max-width: none;
  overflow: auto;
  padding: 14px;
  width: 100%;
}

.model-compare-dialog > header,
.model-compare-dialog footer,
.model-compare-details header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.model-compare-dialog > header div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.model-compare-dialog > header span,
.model-compare-dialog > header small,
.model-compare-dialog footer small,
.model-compare-controls span,
.model-compare-summary span,
.model-compare-summary small,
.model-compare-table small,
.model-compare-details header span {
  color: #64748b;
  font-size: 12px;
}

.model-compare-dialog > header strong {
  color: #0f172a;
  font-size: 20px;
}

.model-compare-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.8fr);
}

.model-compare-controls label,
.model-compare-controls div {
  display: grid;
  gap: 5px;
}

.model-compare-controls select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-size: 14px;
  min-height: 36px;
  padding: 0 9px;
  width: 100%;
}

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

.model-compare-summary div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #3f7f4c;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.model-compare-summary div:nth-child(3) {
  border-left-color: #c26f2b;
}

.model-compare-summary div:nth-child(4) {
  border-left-color: #78849a;
}

.model-compare-summary strong {
  color: #0f172a;
  font-size: 22px;
}

.model-compare-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-height: 220px;
  overflow: auto;
}

.model-compare-table {
  border-collapse: collapse;
  font-size: 12px;
  min-width: 760px;
  width: 100%;
}

.model-compare-table th,
.model-compare-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.model-compare-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

.model-compare-table td:first-child {
  white-space: normal;
}

.model-compare-table td:first-child strong {
  color: #0f172a;
  display: block;
}

.model-compare-table b {
  color: #0f172a;
  font-size: 13px;
}

.model-compare-table tbody tr {
  cursor: pointer;
}

.model-compare-table tbody tr:hover,
.model-compare-table tbody tr.is-selected {
  background: #eef6ef;
}

.model-compare-table tbody tr.is-selected td:first-child {
  border-left: 3px solid #3f7f4c;
}

.model-compare-details {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.model-compare-details header {
  align-items: end;
}

.model-compare-details header div:first-child {
  display: grid;
  gap: 3px;
}

.model-compare-detail-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.model-compare-detail-filters label {
  display: grid;
  gap: 3px;
}

.model-compare-detail-filters select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-size: 12px;
  min-height: 30px;
  padding: 0 8px;
}

.model-compare-detail-grid {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  max-height: none;
  overflow: auto;
  width: 100%;
}

.model-compare-detail-row {
  align-items: center;
  border-bottom: 1px solid #eef2f7;
  display: grid;
  gap: 8px;
  grid-template-columns: 70px minmax(120px, 1fr) 74px minmax(110px, 1fr) minmax(110px, 1fr) 150px;
  min-height: 34px;
  min-width: 760px;
  padding: 6px 9px;
}

.model-compare-detail-row:last-child {
  border-bottom: 0;
}

.model-compare-detail-row span {
  color: #334155;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-compare-detail-head {
  background: #f8fafc;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

.model-compare-detail-row.is-same {
  background: #f0fdf4;
}

.model-compare-detail-row.is-changed {
  background: #fff7ed;
}

.model-compare-detail-row.is-missing {
  background: #f8fafc;
}

.model-compare-empty {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  padding: 14px;
}

@media (max-width: 760px) {
  .field-batch-summary,
  .field-batch-controls,
  .model-compare-controls,
  .model-compare-summary {
    grid-template-columns: 1fr;
  }

  .model-compare-side-panel {
    left: 0;
    width: 100vw;
  }

  .model-compare-detail-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .model-compare-detail-row span:nth-child(n + 3) {
    grid-column: 1 / -1;
  }
}

.field-prompt-dialog > .field-prompt-discussion-header {
  align-items: start;
  background: #ffffff;
  border-bottom: 1px solid #dbe4ee;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr) auto;
  min-height: 108px;
  padding: 12px 16px;
}

.field-prompt-discussion-title,
.field-prompt-discussion-value {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.field-prompt-discussion-title span,
.field-prompt-discussion-value span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.field-prompt-discussion-title strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
}

.field-prompt-discussion-title small {
  color: #64748b;
  font-size: 13px;
}

.field-prompt-discussion-value {
  align-items: baseline;
  display: flex;
  gap: 9px;
  padding-top: 17px;
}

.field-prompt-discussion-value strong {
  color: #1d4ed8;
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.field-prompt-discussion-value .field-result-confidence {
  margin-left: 2px;
}

.field-prompt-discussion-reason {
  border-left: 3px solid #93c5fd;
  color: #334155;
  font-size: 14px;
  grid-column: 1 / 3;
  line-height: 1.45;
  margin: 0;
  max-height: 58px;
  overflow: auto;
  padding: 0 8px 0 12px;
}

.field-prompt-discussion-header > .icon-action {
  align-self: start;
  grid-column: 3;
  grid-row: 1 / span 2;
}

.field-prompt-chat-heading {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.field-prompt-chat-heading > div {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.field-prompt-chat-heading > div:last-child {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.field-prompt-chat-heading strong {
  color: #1d4ed8;
  font-size: 13px;
}

.field-prompt-chat-heading span {
  background: #eef2ff;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 7px;
  text-transform: uppercase;
}

.field-prompt-discussion-source {
  align-items: center;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 10px;
}

.field-prompt-discussion-source > span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field-prompt-history-list {
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  max-height: 150px;
  overflow: auto;
  padding: 6px;
}

.field-prompt-history-list button {
  align-items: center;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #334155;
  display: grid;
  gap: 3px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 6px 7px;
  text-align: left;
}

.field-prompt-history-list button.active,
.field-prompt-history-list button:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.field-prompt-history-list span {
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-prompt-history-list em {
  color: #1d4ed8;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.field-prompt-history-list small {
  color: #64748b;
  font-size: 11px;
  grid-column: 1 / -1;
}

.field-prompt-workspace {
  display: grid;
  grid-template-columns: clamp(340px, 29vw, 460px) minmax(0, 1fr);
  min-height: 0;
}

.field-prompt-workspace.is-manager {
  display: block;
  min-height: 0;
  overflow: auto;
  padding: 22px;
}

.segment-star-chat-dialog .field-prompt-discussion-reason {
  border-left-color: #fdba74;
}

.segment-star-chat-rating-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  padding-top: 11px;
}

.segment-star-chat-rating-summary span {
  align-items: center;
  border: 1px solid #d8e0e8;
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  padding: 3px 4px 3px 7px;
}

.segment-star-chat-rating-summary b {
  color: currentColor;
  font-size: 11px;
  font-weight: 900;
}

.segment-star-chat-rating-summary strong {
  background: var(--star-tone-color, #b45309);
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  min-width: 22px;
  padding: 5px 6px;
  text-align: center;
}

.segment-star-chat-workspace {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(280px, 360px);
  min-height: 0;
}

.segment-star-chat-pane {
  border-right: 1px solid #dbe4ee;
  grid-template-rows: minmax(0, 1fr);
}

.segment-star-chat-context {
  align-content: start;
  background: #ffffff;
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 14px;
}

.segment-star-chat-context section {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  display: grid;
  gap: 9px;
  padding: 11px;
}

.segment-star-chat-context strong {
  align-items: center;
  color: #1f2937;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
}

.segment-star-chat-context strong svg {
  color: #d97706;
  height: 15px;
  width: 15px;
}

.segment-star-chat-context-ratings {
  display: grid;
  gap: 7px;
}

.segment-star-chat-context-ratings article {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  display: grid;
  gap: 2px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px;
}

.segment-star-chat-context-ratings span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-star-chat-context-ratings b {
  background: #b45309;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  min-width: 24px;
  padding: 5px 7px;
  text-align: center;
}

.segment-star-chat-context-ratings small {
  color: #64748b;
  font-size: 11px;
  grid-column: 1 / -1;
}

.segment-star-chat-context ul {
  color: #475569;
  display: grid;
  font-size: 12px;
  gap: 6px;
  line-height: 1.35;
  margin: 0;
  padding-left: 17px;
}

.segment-star-formula {
  display: grid;
  gap: 9px;
}

.segment-star-formula div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  display: grid;
  gap: 4px;
  padding: 9px;
}

.segment-star-formula span {
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.segment-star-formula div p {
  color: #475569;
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
}

.segment-star-formula code {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 5px;
  color: #7c2d12;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  padding: 6px 7px;
  white-space: normal;
}

.segment-star-formula ul {
  color: #475569;
  display: grid;
  font-size: 11px;
  gap: 5px;
  line-height: 1.35;
  margin: 0;
  padding-left: 17px;
}

.segment-star-formula li b {
  color: #7c2d12;
}

.segment-star-formula .segment-star-formula-note {
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
  margin: 0;
}

.field-prompt-manager {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 1120px;
  padding: 18px;
}

.field-prompt-manager-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.field-prompt-manager-header span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field-prompt-manager-header h3 {
  color: #111827;
  font-size: 22px;
  margin: 4px 0 0;
}

.field-prompt-manager-header em {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  gap: 5px;
  padding: 6px 10px;
}

.field-prompt-manager-header em.is-busy {
  background: #e6f4ed;
  border-color: #b7dbc8;
  color: #0b7f47;
}

.field-prompt-manager-header em svg,
.field-prompt-manager-status svg {
  height: 14px;
  width: 14px;
}

.field-prompt-manager-header em.is-busy svg,
.field-prompt-manager-status.is-busy svg,
.field-prompt-manager-actions button [data-lucide="loader-circle"],
.field-prompt-manager-actions button svg[data-lucide="loader-circle"] {
  animation: irapSpin 0.9s linear infinite;
}

.field-prompt-manager-status {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  color: #334155;
  display: flex;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
}

.field-prompt-manager-status.is-busy {
  background: #f7fcf9;
  border-color: #b7dbc8;
  color: #0b5c63;
}

.field-prompt-manager-status.is-done {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.field-prompt-manager-status span {
  font-size: 13px;
  font-weight: 700;
}

@keyframes irapSpin {
  to {
    transform: rotate(360deg);
  }
}

.field-prompt-manager-editor {
  display: grid;
  gap: 7px;
}

.field-prompt-manager-editor span {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.field-prompt-manager-editor textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #111827;
  font-size: 14px;
  line-height: 1.5;
  min-height: 360px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.field-prompt-manager-editor textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.field-prompt-source-mode {
  align-items: center;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) auto;
  padding: 10px 12px;
}

.field-prompt-source-mode > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.field-prompt-source-mode strong {
  color: #1e293b;
  font-size: 13px;
}

.field-prompt-source-mode span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.field-prompt-source-options {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
}

.field-prompt-source-options button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #475569;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  min-height: 32px;
  padding: 6px 9px;
}

.field-prompt-source-options button svg {
  height: 15px;
  width: 15px;
}

.field-prompt-source-options button.active {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  color: #0f766e;
}

.field-prompt-source-options button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.field-prompt-gis-context {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  display: grid;
  gap: 10px;
  padding: 10px 12px;
}

.field-prompt-gis-context.active {
  background: #f0fdf9;
  border-color: #99f6e4;
}

.field-prompt-gis-heading {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.field-prompt-gis-heading span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.field-prompt-gis-context strong {
  align-items: center;
  color: #134e4a;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
}

.field-prompt-gis-context strong svg {
  height: 15px;
  width: 15px;
}

.field-prompt-gis-context small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.field-prompt-gis-options {
  display: grid;
  gap: 8px;
}

.field-prompt-gis-search {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 6px 8px;
}

.field-prompt-gis-search svg {
  color: #64748b;
  height: 15px;
  width: 15px;
}

.field-prompt-gis-search input {
  border: 0;
  color: #0f172a;
  font-size: 12px;
  min-width: 0;
  outline: none;
}

.field-prompt-gis-class-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 118px;
  overflow: auto;
}

.field-prompt-gis-class-list button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  max-width: 220px;
  padding: 4px 7px;
}

.field-prompt-gis-class-list button.active {
  background: #ccfbf1;
  border-color: #2dd4bf;
  color: #115e59;
}

.field-prompt-gis-class-list button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-prompt-gis-class-list button em {
  background: #ffffff;
  border-radius: 999px;
  color: inherit;
  font-size: 10px;
  font-style: normal;
  padding: 1px 5px;
}

.field-prompt-gis-class-list p {
  color: #64748b;
  font-size: 12px;
  margin: 0;
}

.gis-layer-settings {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  padding: 10px 12px;
}

.gis-layer-settings.compact {
  border-left: 0;
  border-radius: 0;
  border-right: 0;
}

.gis-layer-settings header {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.gis-layer-settings header > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.gis-layer-settings strong {
  align-items: center;
  color: #134e4a;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
}

.gis-layer-settings strong svg {
  height: 15px;
  width: 15px;
}

.gis-layer-settings header span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.3;
}

.gis-layer-settings__search {
  display: block;
}

.gis-layer-settings__search label {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  display: flex;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
}

.gis-layer-settings__search svg {
  color: #64748b;
  height: 15px;
  width: 15px;
}

.gis-layer-settings__search input {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #0f172a;
  height: 34px;
  min-width: 0;
  padding: 0 9px;
  width: 100%;
}

.gis-layer-settings__search label input {
  border: 0;
  height: 30px;
  outline: 0;
  padding: 0;
}

.gis-layer-settings__workspace {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  min-height: 0;
}

.gis-layer-available {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.gis-layer-settings__table-wrap {
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  max-height: min(62vh, 620px);
  overflow: auto;
}

.gis-layer-settings__table {
  border-collapse: collapse;
  width: 100%;
}

.gis-layer-settings__table th {
  background: #f8fafc;
  border-bottom: 1px solid #dbe4ee;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  padding: 8px 10px;
  position: sticky;
  text-align: left;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.gis-layer-settings__table th:nth-child(2),
.gis-layer-settings__table td:nth-child(2) {
  text-align: center;
  width: 86px;
}

.gis-layer-settings__table th:nth-child(3),
.gis-layer-settings__table td:nth-child(3) {
  text-align: center;
  width: 210px;
}

.gis-layer-settings__table td {
  border-bottom: 1px solid #eef2f7;
  color: #0f172a;
  font-size: 12px;
  padding: 8px 10px;
}

.gis-layer-settings__table tr:last-child td {
  border-bottom: 0;
}

.gis-layer-settings__table td:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.gis-layer-settings__table td:first-child strong {
  color: #0f172a;
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gis-layer-settings__table td:first-child small {
  color: #64748b;
  font-size: 10px;
}

.gis-layer-row-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.gis-layer-row-actions button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  gap: 5px;
  height: 28px;
  justify-content: center;
  min-width: 88px;
  padding: 0 8px;
}

.gis-layer-row-actions button svg {
  height: 13px;
  width: 13px;
}

.gis-layer-row-actions button:hover:not(:disabled),
.gis-layer-row-actions button:focus-visible {
  border-color: #0f766e;
  color: #0f766e;
  outline: none;
}

.gis-layer-row-actions button.active {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e;
}

.gis-layer-row-actions button.active:disabled {
  cursor: default;
  opacity: 1;
}

.gis-layer-selected-stack {
  display: grid;
  gap: 10px;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 0;
}

.gis-layer-selected-list {
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.gis-layer-selected-list header {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #dbe4ee;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
}

.gis-layer-selected-list header strong {
  color: #0f172a;
  font-size: 12px;
}

.gis-layer-selected-list header span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.gis-layer-selected-list > div {
  align-content: start;
  display: grid;
  gap: 6px;
  grid-auto-rows: 48px;
  max-height: 292px;
  overflow: auto;
  padding: 8px;
}

.gis-layer-selected-list article {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 28px;
  height: 48px;
  min-height: 48px;
  padding: 7px 8px;
}

.gis-layer-selected-list article span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.gis-layer-selected-list article strong {
  color: #0f172a;
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gis-layer-selected-list article small {
  color: #64748b;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gis-layer-selected-list p {
  align-self: center;
  color: #64748b;
  font-size: 12px;
  margin: 0;
  padding: 14px 8px;
  text-align: center;
}

.gis-layer-settings__empty {
  color: #64748b;
  font-size: 12px;
  padding: 14px;
  text-align: center;
}

@media (max-width: 820px) {
  .gis-layer-settings header {
    display: grid;
  }

  .gis-layer-settings__workspace,
  .gis-layer-selected-stack {
    grid-template-columns: 1fr;
  }

  .gis-layer-selected-stack {
    grid-template-rows: none;
  }
}

.field-prompt-agent-inject-toggle {
  align-items: start;
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px 12px;
}

.field-prompt-agent-inject-toggle.active {
  background: #eef2ff;
  border-color: #a5b4fc;
}

.field-prompt-agent-inject-toggle input {
  height: 18px;
  margin-top: 2px;
  width: 18px;
}

.field-prompt-agent-inject-toggle span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.field-prompt-agent-inject-toggle strong {
  color: #312e81;
  font-size: 13px;
}

.field-prompt-agent-inject-toggle small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.field-prompt-run-context,
.field-batch-run-context {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.field-prompt-run-context-header {
  display: grid;
  gap: 2px;
}

.field-prompt-run-context-header strong,
.field-batch-run-context > strong {
  color: #1e293b;
  font-size: 13px;
}

.field-prompt-run-context-header span {
  color: #64748b;
  font-size: 12px;
}

.field-prompt-run-context-options,
.field-batch-run-context {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-batch-run-context > strong {
  grid-column: 1 / -1;
}

.field-prompt-trainer {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.field-prompt-trainer header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.field-prompt-trainer header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.field-prompt-trainer header strong {
  align-items: center;
  color: #1e293b;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
}

.field-prompt-trainer header strong svg {
  height: 16px;
  width: 16px;
}

.field-prompt-trainer header span,
.field-prompt-trainer header small {
  color: #64748b;
  font-size: 12px;
}

.field-prompt-trainer header small {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  flex: 0 0 auto;
  font-weight: 800;
  padding: 4px 8px;
}

.field-prompt-trainer-dropzone {
  align-items: center;
  background: #fff;
  border: 1px dashed #94a3b8;
  border-radius: 9px;
  color: #475569;
  display: flex;
  min-height: 84px;
  padding: 10px;
}

.field-prompt-trainer-dropzone:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.field-prompt-trainer-dropzone > span {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

.field-prompt-trainer-dropzone > span svg {
  height: 18px;
  width: 18px;
}

.field-prompt-trainer-images {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  width: 100%;
}

.field-prompt-trainer-images figure {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: grid;
  flex: 0 0 150px;
  grid-template-rows: 90px auto;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.field-prompt-trainer-images img {
  display: block;
  height: 90px;
  object-fit: cover;
  width: 100%;
}

.field-prompt-trainer-images figcaption {
  color: #475569;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  padding: 6px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-prompt-trainer-images .icon-action {
  background: rgba(15, 23, 42, 0.74);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  height: 24px;
  position: absolute;
  right: 5px;
  top: 5px;
  width: 24px;
}

.field-prompt-trainer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-prompt-trainer-result {
  display: grid;
  gap: 9px;
}

.field-prompt-trainer-result section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.field-prompt-trainer-result strong {
  color: #1e293b;
  font-size: 12px;
}

.field-prompt-trainer-result p,
.field-prompt-trainer-result li {
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}

.field-prompt-trainer-result p,
.field-prompt-trainer-result ul {
  margin: 0;
}

.field-prompt-trainer-result ul {
  padding-left: 18px;
}

.field-prompt-trainer-result pre {
  background: #0f172a;
  border-radius: 7px;
  color: #e2e8f0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.field-prompt-trainer-test div {
  align-items: center;
  display: flex;
  gap: 8px;
}

.field-prompt-trainer-test div span {
  background: #eef2ff;
  border-radius: 999px;
  color: #3730a3;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 7px;
  text-transform: uppercase;
}

.field-prompt-trainer-test div b {
  color: #0f172a;
  font-size: 13px;
}

.field-prompt-manager-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.field-prompt-manager-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.field-prompt-manager-actions button {
  min-height: 38px;
}

.field-prompt-chat-pane {
  background: #f8fafc;
  border-right: 1px solid #dbe4ee;
  display: grid;
  gap: 8px;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.field-prompt-final {
  display: grid;
  gap: 5px;
}

.field-prompt-final > span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.field-prompt-final-text {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 14px;
  height: clamp(96px, 15vh, 150px);
  line-height: 1.45;
  min-height: 96px;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

.field-prompt-chat {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 8px;
}

.field-result-discussion {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.field-result-overview {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding: 10px 12px;
}

.field-result-overview div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.field-result-overview span,
.field-result-images header span {
  color: #64748b;
  font-size: 12px;
}

.field-result-overview strong {
  color: #1e293b;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.field-result-confidence {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 9px;
}

.field-result-confidence.confidence-high {
  background: #dcfce7;
  color: #166534;
}

.field-result-confidence.confidence-medium {
  background: #fef3c7;
  color: #92400e;
}

.field-result-confidence.confidence-low,
.field-result-confidence.confidence-none {
  background: #fee2e2;
  color: #991b1b;
}

.field-result-brief-reason {
  background: #fff;
  border-left: 3px solid #93c5fd;
  color: #475569;
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  max-height: 58px;
  overflow: hidden;
  padding: 0 4px 0 9px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.field-result-images {
  display: grid;
  gap: 8px;
}

.field-result-images header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.field-result-images header strong {
  color: #334155;
  font-size: 13px;
}

.field-result-images > div {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 2px 4px;
}

.field-result-images button {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  flex: 0 0 106px;
  height: 72px;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.field-result-images button.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.field-result-images button.source {
  border-color: #22c55e;
}

.field-result-images img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.field-result-images small,
.field-result-images em {
  background: rgba(15, 23, 42, 0.76);
  border-radius: 999px;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  left: 4px;
  line-height: 1;
  padding: 3px 5px;
  position: absolute;
  top: 4px;
}

.field-result-images em {
  background: #15803d;
  left: auto;
  right: 4px;
}

.field-prompt-images {
  align-items: center;
  display: flex;
  gap: 8px;
}

.field-prompt-images strong {
  color: #334155;
  font-size: 12px;
}

.field-prompt-images div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.field-prompt-images label {
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  padding: 3px 7px;
}

.field-prompt-images input {
  margin: 0;
}

.field-prompt-chat-log {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  flex: 1 1 180px;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.field-prompt-chat-empty {
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.field-prompt-chat-message {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px 12px 12px 4px;
  display: grid;
  gap: 4px;
  max-width: 88%;
  padding: 9px 11px;
  width: fit-content;
}

.field-prompt-chat-message b {
  color: #1d4ed8;
  font-size: 12px;
}

.field-prompt-chat-message.user b {
  color: #047857;
}

.field-prompt-chat-message.user {
  align-self: flex-end;
  background: #ecfdf5;
  border-color: #bbf7d0;
  border-radius: 12px 12px 4px 12px;
}

.field-prompt-chat-message.is-thinking span {
  color: #64748b;
  font-style: italic;
}

.field-prompt-chat-message span {
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.field-prompt-message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.field-prompt-message-attachments figure {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  grid-template-columns: 44px minmax(0, 1fr);
  margin: 0;
  max-width: 180px;
  padding: 4px;
}

.field-prompt-message-attachments img,
.field-prompt-message-attachments svg {
  border-radius: 5px;
  height: 34px;
  object-fit: cover;
  width: 44px;
}

.field-prompt-message-attachments figcaption {
  color: #475569;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-prompt-chat-input {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.field-prompt-pasted-images {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.field-prompt-pasted-images figure {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: grid;
  flex: 0 0 118px;
  grid-template-rows: 72px auto;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.field-prompt-pasted-images img {
  display: block;
  height: 72px;
  object-fit: cover;
  width: 100%;
}

.field-prompt-pasted-images figcaption {
  color: #475569;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  padding: 5px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-prompt-pasted-images .icon-action {
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
  height: 24px;
  position: absolute;
  right: 4px;
  top: 4px;
  width: 24px;
}

.field-prompt-chat-input textarea {
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.45;
  min-height: 96px;
  padding: 10px;
  resize: vertical;
}

.field-prompt-finalize {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #bfdbfe;
  border-radius: 7px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 7px;
}

.field-prompt-finalize span {
  color: #475569;
  font-size: 13px;
  line-height: 1.3;
}

.field-prompt-dialog footer {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.field-prompt-dialog footer button {
  min-height: 38px;
}

.field-prompt-dialog .field-prompt-manager-actions {
  justify-content: space-between;
}

.field-prompt-pano-pane {
  background: #0f172a;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}

.field-prompt-pano-pane > header {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #dbe4ee;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
}

.field-prompt-pano-pane > header strong {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.field-prompt-pano-pane > header small {
  color: #64748b;
}

.field-prompt-pano-stage {
  height: 100%;
  min-height: 0;
  position: relative;
}

.field-prompt-pano-stage .pano-viewer-shell {
  border: 0;
  border-radius: 0;
}

.field-prompt-aerial-preview {
  align-items: center;
  background: #050505;
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.field-prompt-aerial-preview img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.field-prompt-debug-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
  color: #1d4ed8;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 9;
}

.field-prompt-debug-toggle.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.field-prompt-debug-toggle svg {
  height: 16px;
  width: 16px;
}

.field-prompt-pano-image-strip {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 7px;
  max-width: min(500px, calc(100% - 24px));
  padding: 9px;
  position: absolute;
  right: 12px;
  top: 58px;
  z-index: 8;
}

.field-prompt-pano-image-strip header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.field-prompt-pano-image-strip header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.field-prompt-pano-image-strip header strong {
  align-items: center;
  color: #334155;
  display: inline-flex;
  font-size: 12px;
  gap: 5px;
}

.field-prompt-pano-image-strip header span,
.field-prompt-pano-image-strip header small {
  color: #64748b;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-prompt-pano-image-strip > div {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding: 1px 1px 3px;
}

.field-prompt-pano-image-strip button {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 7px;
  flex: 0 0 72px;
  height: 48px;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.field-prompt-pano-image-strip button.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.field-prompt-pano-image-strip button.source {
  border-color: #22c55e;
}

.field-prompt-pano-image-strip button.aerial-source {
  border-color: #f97316;
}

.field-prompt-pano-image-strip button.aerial-source.source {
  border-color: #22c55e;
}

.field-prompt-pano-image-strip img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.field-prompt-pano-image-strip button small,
.field-prompt-pano-image-strip button em {
  background: rgba(15, 23, 42, 0.76);
  border-radius: 999px;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  left: 4px;
  line-height: 1;
  padding: 3px 5px;
  position: absolute;
  top: 4px;
}

.field-prompt-pano-image-strip button em {
  background: #15803d;
  left: auto;
  right: 4px;
}

.field-prompt-log-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(203, 213, 225, 0.94);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.32);
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto auto minmax(0, 1fr) minmax(0, 0.8fr);
  inset: 58px 12px 54px 12px;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  position: absolute;
  z-index: 10;
}

.field-prompt-log-panel header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.field-prompt-log-panel header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.field-prompt-log-panel header strong {
  align-items: center;
  color: #334155;
  display: inline-flex;
  font-size: 12px;
  gap: 5px;
}

.field-prompt-log-panel header span {
  color: #64748b;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-prompt-log-actions {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.field-prompt-log-actions .icon-action {
  height: 28px;
  width: 30px;
}

.field-prompt-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field-prompt-log-meta span {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  padding: 3px 7px;
}

.field-prompt-log-panel pre {
  background: #0f172a;
  border-radius: 7px;
  color: #e2e8f0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
  min-height: 0;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.field-prompt-log-panel section {
  display: grid;
  gap: 6px;
  min-height: 0;
}

.field-prompt-log-panel section > strong {
  color: #334155;
  font-size: 12px;
}

.field-prompt-log-images {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0 4px;
}

.field-prompt-log-images figure {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: grid;
  flex: 0 0 156px;
  grid-template-rows: 86px auto;
  margin: 0;
  overflow: hidden;
}

.field-prompt-log-images img,
.field-prompt-log-images figure > span {
  align-items: center;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  height: 86px;
  justify-content: center;
  object-fit: cover;
  width: 100%;
}

.field-prompt-log-images figcaption {
  display: grid;
  gap: 3px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 6px;
}

.field-prompt-log-images figcaption strong {
  align-items: center;
  background: #1e293b;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.field-prompt-log-images figcaption small {
  color: #334155;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-prompt-log-images figcaption em {
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  padding: 3px 6px;
}

.field-prompt-log-empty {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 13px;
  justify-content: center;
  min-height: 140px;
  text-align: center;
}

.field-prompt-log-empty.inline {
  min-height: 86px;
  width: 100%;
}

.field-prompt-visual-notes {
  background: #ffffff;
  border-top: 1px solid #dbe4ee;
  display: grid;
  gap: 8px;
  max-height: 150px;
  overflow: auto;
  padding: 10px 12px;
}

.field-prompt-visual-notes div {
  display: grid;
  gap: 3px;
}

.field-prompt-visual-notes b {
  color: #334155;
  font-size: 12px;
}

.field-prompt-visual-notes span {
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .field-prompt-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(360px, 45vh);
  }

  .segment-star-chat-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(220px, 34vh);
  }

  .field-prompt-chat-pane {
    border-right: 0;
    border-bottom: 1px solid #dbe4ee;
  }

  .segment-star-chat-pane {
    border-right: 0;
    border-bottom: 1px solid #dbe4ee;
  }

  .field-prompt-source-mode,
  .field-prompt-discussion-source {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .field-prompt-source-options {
    width: 100%;
  }

  .field-prompt-source-options button {
    flex: 1 1 0;
    justify-content: center;
  }

  .field-prompt-run-context-options,
  .field-batch-run-context {
    grid-template-columns: 1fr;
  }

  .field-batch-run-context > strong {
    grid-column: auto;
  }
}

.field-prompt-error {
  color: #b91c1c;
  font-size: 12px;
}

.segment-icon-frame {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  height: var(--spec-icon-frame-height, 65px);
  justify-content: center;
  overflow: hidden;
  justify-self: center;
  width: min(100%, var(--spec-icon-frame-width, 101px));
}

.segment-icon-frame img {
  display: block;
  height: 100%;
  max-height: none;
  max-width: none;
  object-fit: contain;
  object-position: center;
  transform: translate(var(--icon-shift-x, 0), var(--icon-shift-y, 0)) scale(var(--icon-scale, 1));
  transform-origin: center;
  width: 100%;
}

.segment-icon-frame span {
  color: var(--muted);
  font-size: 24px;
  font-weight: 700;
}

.segment-icon-card strong,
.segment-icon-card span,
.segment-icon-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-icon-card strong {
  display: -webkit-box;
  font-size: var(--spec-icon-title-size, 10px);
  font-weight: 400;
  line-height: 1.2;
  min-height: var(--spec-icon-title-height, 22px);
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.segment-icon-card span {
  color: var(--ink);
  font-size: var(--spec-icon-value-size, 9px);
  line-height: 1.25;
  margin-top: 2px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.segment-icon-card .segment-icon-running {
  align-items: center;
  color: #0e7490;
  display: inline-flex;
  font-size: 10px;
  gap: 4px;
  line-height: 1;
  margin: 0;
  overflow: visible;
  overflow-wrap: normal;
  text-overflow: clip;
  white-space: nowrap;
}

.segment-icon-card.comparison-different {
  --segment-card-status-color: #b91c1c;
  --segment-card-status-shadow: rgba(185, 28, 28, 0.32);
  border-color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.26), 0 0 0 1px rgba(185, 28, 28, 0.12);
}

.segment-icon-card.comparison-missing {
  --segment-card-status-color: #f97316;
  --segment-card-status-shadow: rgba(249, 115, 22, 0.22);
  border-color: #f97316;
  background: #fffaf5;
}

.segment-icon-card.comparison-same {
  --segment-card-status-color: #22c55e;
  --segment-card-status-shadow: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
}

.segment-icon-value-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.segment-icon-card .segment-icon-value-line {
  align-items: start;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  min-width: 0;
}

.segment-icon-card.has-discuss .segment-icon-value-stack,
.segment-icon-card.has-discuss .segment-icon-source {
  padding-left: 22px;
}

.segment-icon-value-line em {
  background: #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-block;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  padding: 3px 4px;
  text-align: center;
  text-transform: uppercase;
}

.segment-icon-value-line b {
  color: #1d4ed8;
  display: block;
  font-size: var(--spec-icon-value-size, 9px);
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.segment-icon-value-line.is-old-value em {
  background: #f1f5f9;
}

.segment-icon-value-line.is-old-value b {
  color: #475569;
}

.segment-icon-card small {
  font-size: var(--spec-icon-source-size, 8px);
  line-height: 1.2;
  margin-top: 3px;
}

.segment-icon-source.comparison-different {
  color: #b45309;
}

.segment-icon-source.comparison-missing {
  color: #c2410c;
}

.segment-icon-source.comparison-same {
  color: #15803d;
}

.segment-icon-edit-old-value {
  color: #64748b;
  font-size: var(--spec-icon-source-size, 8px);
  line-height: 1.25;
  margin-top: 3px;
}

.segment-icon-edit-control {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  min-width: 0;
}

.segment-icon-edit-control select,
.segment-icon-edit-control input {
  background: #eff6ff;
  border: 2px solid #2563eb;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 1px 2px rgba(37, 99, 235, 0.14);
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  height: 34px;
  min-width: 0;
  padding: 0 9px;
  width: 100%;
}

.segment-icon-edit-control select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #1d4ed8 50%),
    linear-gradient(135deg, #1d4ed8 50%, transparent 50%),
    linear-gradient(to right, #bfdbfe, #bfdbfe);
  background-position:
    calc(100% - 16px) 14px,
    calc(100% - 10px) 14px,
    calc(100% - 30px) 6px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px, 1px 22px;
  padding-right: 38px;
}

.segment-icon-edit-control select option {
  background: #fff;
  color: #0f172a;
  font-size: 12px;
}

.segment-icon-edit-control select:focus,
.segment-icon-edit-control input:focus {
  background: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.24);
  outline: none;
}

.segment-icon-edit-control select:disabled,
.segment-icon-edit-control input:disabled {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #64748b;
}

.segment-icon-edit-control small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-icon-add-evidence {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  height: 24px;
  justify-self: end;
  margin-top: 4px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.segment-icon-add-evidence svg {
  height: 14px;
  width: 14px;
}

.segment-icon-card.missing .segment-icon-frame {
  background: #fff7ed;
  border-color: #fed7aa;
}

.segment-icon-evidence-actions {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: center;
  min-height: 34px;
  overflow: hidden;
  width: 100%;
}

.segment-icon-evidence-actions button {
  align-items: center;
  background: #0f172a;
  border: 1px solid #b7dbc8;
  border-radius: 4px;
  color: #065f35;
  cursor: pointer;
  display: inline-flex;
  gap: 3px;
  height: 32px;
  justify-content: center;
  min-width: 42px;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.segment-icon-evidence-actions button:hover,
.segment-icon-evidence-actions button:focus-visible {
  background: #123524;
  border-color: #86c49f;
  outline: none;
}

.segment-icon-evidence-actions button.is-pano-annotation {
  border-color: #c4b5fd;
}

.segment-icon-evidence-actions button.segment-icon-evidence-add {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f766e;
  min-width: 28px;
  width: 28px;
}

.segment-icon-evidence-actions button.segment-icon-evidence-add:hover,
.segment-icon-evidence-actions button.segment-icon-evidence-add:focus-visible {
  background: #ecfdf5;
  border-color: #86efac;
}

.segment-icon-evidence-actions button.segment-icon-evidence-add svg {
  color: currentColor;
}

.segment-icon-evidence-actions img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.segment-icon-evidence-actions svg {
  color: #b7dbc8;
  height: 14px;
  width: 14px;
}

.segment-icon-evidence-actions span,
.segment-icon-evidence-actions small {
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  margin: 0;
}

.segment-icon-evidence-actions button span {
  align-items: center;
  background: rgba(15, 23, 42, 0.82);
  border-radius: 999px;
  bottom: 2px;
  display: flex;
  height: 14px;
  justify-content: center;
  min-width: 14px;
  padding: 0 4px;
  position: absolute;
  right: 2px;
}

.segment-icon-evidence-actions small {
  align-items: center;
  background: #e6f4ed;
  border: 1px solid #b7dbc8;
  border-radius: 999px;
  color: #065f35;
  display: inline-flex;
  height: 22px;
  padding: 0 6px;
}

.segment-evidence-section {
  align-content: start;
  align-self: start;
  border-top: 3px solid #0b7f47;
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.segment-evidence-section header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.segment-evidence-section h3 {
  color: #0284c7;
  font-size: 16px;
  margin: 0;
}

.segment-evidence-section header span {
  color: var(--muted);
  font-size: 12px;
}

.segment-evidence-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.segment-evidence-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  grid-template-columns: 74px minmax(0, 1fr);
  min-height: 78px;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.segment-evidence-card:hover,
.segment-evidence-card:focus-visible {
  background: #f7fcf9;
  border-color: #86c49f;
  outline: none;
}

.segment-evidence-card__image {
  align-items: center;
  background: #0f172a;
  display: flex;
  justify-content: center;
  min-height: 78px;
  overflow: hidden;
}

.segment-evidence-card__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.segment-evidence-card__image > span {
  color: #bae6fd;
}

.segment-evidence-card__body {
  align-content: start;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
}

.segment-evidence-card__body strong,
.segment-evidence-card__body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-evidence-card__body strong {
  font-size: 12px;
}

.segment-evidence-card__body small {
  color: var(--muted);
  font-size: 10px;
}

.segment-evidence-card__refs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  overflow: hidden;
}

.segment-evidence-card__refs em {
  background: #e6f4ed;
  border: 1px solid #b7dbc8;
  border-radius: 999px;
  color: #065f35;
  flex: 0 1 auto;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-gis-evidence {
  align-content: start;
  border-top: 1px solid #dbe4ee;
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 10px;
}

.segment-gis-evidence header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.segment-gis-evidence h3 {
  color: #0f766e;
  font-size: 15px;
  margin: 0;
}

.segment-gis-evidence .secondary-button.active {
  background: #ecfdf5;
  border-color: #34d399;
  color: #047857;
}

.segment-gis-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 98px;
  overflow: auto;
}

.segment-gis-layer-toggle {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  height: 28px;
  max-width: 100%;
  padding: 4px 7px;
}

.segment-gis-layer-toggle:hover:not(:disabled),
.segment-gis-layer-toggle:focus-visible {
  border-color: #0f766e;
  color: #0f766e;
  outline: none;
}

.segment-gis-layer-toggle:not(.active) {
  background: #f1f5f9;
  border-style: dashed;
  color: #94a3b8;
}

.segment-gis-layer-toggle svg {
  height: 13px;
  width: 13px;
}

.segment-gis-layer-toggle strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-gis-layer-toggle em {
  background: #ccfbf1;
  border-radius: 999px;
  color: #0f766e;
  font-size: 10px;
  font-style: normal;
  padding: 1px 5px;
}

.segment-gis-layer-toggle:not(.active) em {
  background: #e2e8f0;
  color: #64748b;
}

.segment-gis-list {
  display: grid;
  gap: 6px;
}

.segment-gis-list article {
  align-items: start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 8px;
}

.segment-gis-list__marker {
  background: #ff007f;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px #0f172a;
  height: 12px;
  margin-top: 3px;
  width: 12px;
}

.segment-gis-list article div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.segment-gis-list strong,
.segment-gis-list small,
.segment-gis-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-gis-list strong {
  color: #111827;
  font-size: 12px;
}

.segment-gis-list small {
  color: #475569;
  font-size: 11px;
}

.segment-gis-list em {
  color: #64748b;
  font-size: 10px;
  font-style: normal;
}

.gis-asset-tooltip {
  font-weight: 800;
}

.gis-asset-polygon {
  stroke-dasharray: 6 4;
}

.segment-spec-map {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}

.segment-map-pano-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  min-width: 0;
  position: relative;
}

.segment-map-pano-layout.is-pano-open.map-mode-side {
  grid-template-columns: var(--spec-inner-map-column, minmax(340px, 1fr)) 10px var(--spec-pano-column, minmax(320px, 0.8fr));
}

.segment-map-pano-layout.is-pano-open.map-mode-mini,
.segment-map-pano-layout.is-pano-open.map-mode-map,
.segment-map-pano-layout.is-pano-open.map-mode-pano {
  display: block;
}

.segment-map-pano-layout.map-mode-mini .segment-spec-pano-panel,
.segment-map-pano-layout.map-mode-pano .segment-spec-pano-panel {
  inset: 0;
  position: absolute;
  z-index: 1;
}

.segment-map-pano-layout.map-mode-mini .segment-spec-map-stage {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.28);
  bottom: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  height: min(250px, 36%);
  left: 0;
  position: absolute;
  width: min(320px, 32%);
  z-index: 8;
}

.segment-map-pano-layout.map-mode-mini.has-image-strip .segment-spec-map-stage {
  bottom: 96px;
}

.segment-map-pano-layout.map-mode-map .segment-spec-map-stage {
  inset: 0;
  position: absolute;
  z-index: 1;
}

.segment-map-pano-layout.map-mode-map .segment-spec-pano-panel,
.segment-map-pano-layout.map-mode-pano .segment-spec-map-stage,
.segment-map-pano-layout.map-mode-mini .segment-pano-resize-handle,
.segment-map-pano-layout.map-mode-map .segment-pano-resize-handle,
.segment-map-pano-layout.map-mode-pano .segment-pano-resize-handle {
  display: none;
}

.segment-map-mode-tabs {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  display: inline-flex;
  gap: 4px;
  left: 50%;
  max-width: calc(100% - 20px);
  overflow: visible;
  padding: 4px;
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  z-index: 1200;
}

.segment-map-mode-button {
  align-items: center;
  color: #334155;
  display: inline-flex;
  gap: 2px;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.segment-map-mode-button.active {
  background: rgba(65, 124, 204, 0.16);
  color: var(--blue);
}

.segment-toolbar-dropdown {
  display: inline-flex;
  position: relative;
}

.segment-toolbar-dropdown > .segment-map-mode-button {
  width: 44px;
}

.segment-toolbar-dropdown > .segment-map-mode-button i:last-child {
  height: 12px;
  width: 12px;
}

.segment-toolbar-menu {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 7px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 2px;
  left: 0;
  min-width: 150px;
  padding: 5px;
  position: absolute;
  top: 38px;
  z-index: 1250;
}

.segment-toolbar-menu--right {
  left: auto;
  right: 0;
}

.segment-toolbar-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #334155;
  display: flex;
  gap: 7px;
  height: 28px;
  justify-content: flex-start;
  min-width: 0;
  padding: 0 8px;
  text-align: left;
  width: 100%;
}

.segment-toolbar-menu button:hover,
.segment-toolbar-menu button:focus-visible,
.segment-toolbar-menu button.active {
  background: rgba(65, 124, 204, 0.12);
  color: var(--blue);
  outline: none;
}

.segment-toolbar-menu button span {
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-map-mode-button.is-close {
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  margin-left: 2px;
}

.segment-map-mode-button.is-strip-toggle {
  border-left: 1px solid var(--line);
  border-radius: 0;
  margin-left: 2px;
}

.segment-map-mode-button.is-calibration-toggle {
  border-left: 1px solid var(--line);
  border-radius: 0;
  margin-left: 2px;
}

.segment-map-mode-button.is-measurement-toggle {
  border-left: 1px solid var(--line);
  border-radius: 0;
  margin-left: 2px;
}

.segment-map-mode-button.is-map-measure-toggle {
  border-left: 1px solid var(--line);
  border-radius: 0;
  margin-left: 2px;
}

.segment-map-mode-button.is-tooltip-toggle {
  border-left: 1px solid var(--line);
  border-radius: 0;
  margin-left: 2px;
}

.segment-map-mode-button.is-street-view-toggle {
  border-left: 1px solid var(--line);
  border-radius: 0;
  margin-left: 2px;
}

.segment-spec-map-stage,
.segment-spec-pano-panel {
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.segment-map-pano-layout.is-pano-open .segment-spec-map-stage,
.segment-map-pano-layout.is-pano-open .segment-spec-pano-panel {
  z-index: 1;
}

.segment-map-pano-layout.is-pano-open.map-mode-mini .segment-spec-map-stage {
  z-index: 20;
}

.segment-map-pano-layout.is-pano-open.map-mode-mini .segment-spec-pano-panel {
  z-index: 1;
}

.segment-spec-pano-panel {
  background: #0f172a;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.segment-field-evidence-capture {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  display: grid;
  gap: 8px;
  max-width: min(330px, calc(100% - 20px));
  padding: 8px;
  position: absolute;
  right: 10px;
  top: 54px;
  z-index: 1100;
}

.segment-field-evidence-capture header {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.segment-field-evidence-capture header strong,
.segment-field-evidence-capture header span {
  display: block;
}

.segment-field-evidence-capture header span,
.segment-field-evidence-capture label span,
.segment-field-evidence-capture p,
.segment-field-evidence-actions span {
  color: var(--muted);
  font-size: 11px;
}

.segment-field-evidence-capture label {
  display: grid;
  gap: 4px;
}

.segment-field-evidence-capture .segment-field-evidence-check {
  align-items: center;
  display: flex;
  gap: 6px;
}

.segment-field-evidence-check input {
  accent-color: var(--teal);
  height: 15px;
  width: 15px;
}

.segment-field-evidence-capture select,
.segment-field-evidence-capture textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-width: 0;
  padding: 6px 7px;
  width: 100%;
}

.segment-field-evidence-capture textarea {
  min-height: 48px;
  resize: vertical;
}

.segment-field-evidence-capture p {
  line-height: 1.3;
  margin: 0;
}

.segment-field-evidence-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segment-field-evidence-actions span {
  flex: 1 1 70px;
}

.pano-candidate-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  display: grid;
  gap: 8px;
  max-height: calc(100% - 68px);
  max-width: min(340px, calc(100% - 20px));
  overflow: hidden;
  padding: 8px;
  position: absolute;
  right: 10px;
  top: 54px;
  width: min(320px, calc(100% - 20px));
  z-index: 1120;
}

.pano-candidate-panel.active {
  border-color: rgba(37, 99, 235, 0.44);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), 0 12px 28px rgba(15, 23, 42, 0.2);
}

.pano-candidate-panel header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.pano-candidate-panel header > div {
  min-width: 0;
}

.pano-candidate-panel header strong,
.pano-candidate-panel header span {
  display: flex;
  min-width: 0;
}

.pano-candidate-panel header strong {
  align-items: center;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.pano-candidate-panel header span {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pano-candidate-panel .icon-action {
  height: 26px;
  width: 28px;
}

.pano-candidate-controls {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 108px;
}

.pano-candidate-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pano-candidate-controls label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.pano-candidate-controls input,
.pano-candidate-controls select,
.pano-candidate-actions button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  min-width: 0;
}

.pano-candidate-controls input,
.pano-candidate-controls select {
  padding: 5px 7px;
  width: 100%;
}

.pano-candidate-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pano-candidate-actions button,
.pano-candidate-selected-list button {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  justify-content: center;
}

.pano-candidate-actions button:disabled {
  color: #94a3b8;
  cursor: default;
  opacity: 0.62;
}

.pano-candidate-actions svg[data-lucide="loader-circle"] {
  animation: irapSpin 0.9s linear infinite;
}

.pano-candidate-selected-list {
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  display: grid;
  gap: 4px;
  max-height: 116px;
  overflow-y: auto;
  padding-top: 6px;
}

.pano-candidate-selected-list button {
  background: rgba(239, 246, 255, 0.88);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 5px;
  color: #1e3a8a;
  height: 26px;
  justify-content: flex-start;
  min-width: 0;
  padding: 0 7px;
  width: 100%;
}

.pano-candidate-selected-list button span {
  flex: 1 1 auto;
  font-size: 11px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pano-candidate-marker {
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.28));
}

.pano-candidate-marker.selected {
  filter: drop-shadow(0 0 5px rgba(14, 165, 233, 0.55));
}

.pano-candidate-preview-badge {
  align-items: center;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  left: 10px;
  padding: 6px 8px;
  position: absolute;
  top: 10px;
  z-index: 8;
}

.pano-candidate-preview-badge svg {
  height: 15px;
  width: 15px;
}

.pano-calibration-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  display: grid;
  gap: 8px;
  max-width: min(330px, calc(100% - 24px));
  padding: 10px;
  position: absolute;
  right: 12px;
  top: 52px;
  width: 300px;
  z-index: 1100;
}

.pano-measurement-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 6px;
  max-width: min(260px, calc(100% - 16px));
  overflow: hidden;
  padding: 8px;
  position: absolute;
  right: 8px;
  top: 52px;
  width: min(260px, calc(100% - 16px));
  z-index: 1100;
}

.pano-calibration-panel {
  width: 340px;
}

.pano-measurement-panel.active,
.pano-calibration-panel.active {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.14), 0 12px 28px rgba(15, 23, 42, 0.2);
}

.pano-measurement-panel header,
.pano-calibration-panel header {
  align-items: start;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.pano-measurement-panel header {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr) repeat(5, 24px);
  justify-content: stretch;
}

.pano-measurement-panel header > div {
  min-width: 0;
}

.pano-measurement-panel header span,
.pano-measurement-panel header strong,
.pano-measurement-panel label span,
.pano-measurement-panel footer,
.pano-measurement-draft span,
.pano-calibration-panel header span,
.pano-calibration-panel header strong,
.pano-calibration-panel label span,
.pano-calibration-panel p,
.pano-calibration-summary,
.pano-calibration-options span,
.pano-fov-calibration__title span,
.pano-fov-calibration__title small {
  display: block;
}

.pano-measurement-panel header span,
.pano-measurement-panel label span,
.pano-measurement-panel footer,
.pano-measurement-draft span,
.pano-calibration-panel header span,
.pano-calibration-panel label span,
.pano-calibration-panel p,
.pano-calibration-summary,
.pano-calibration-options span,
.pano-fov-calibration__title small {
  color: var(--muted);
  font-size: 11px;
}

.pano-measurement-panel header span,
.pano-calibration-panel header span,
.pano-fov-calibration__title span {
  align-items: center;
  display: flex;
  gap: 6px;
}

.pano-measurement-panel header span,
.pano-measurement-panel header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pano-measurement-panel header strong {
  font-size: 12px;
}

.pano-measurement-panel .icon-action {
  height: 24px;
  min-width: 24px;
  padding: 0;
  width: 24px;
}

.pano-measurement-panel .icon-action i {
  height: 14px;
  width: 14px;
}

.pano-measurement-panel .icon-action.active {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.34);
  color: #0f766e;
}

.pano-measurement-info {
  color: var(--muted);
}

.pano-measurement-panel label,
.pano-calibration-panel label,
.pano-calibration-create {
  display: grid;
  gap: 4px;
}

.pano-measurement-panel input,
.pano-measurement-panel select,
.pano-calibration-panel input,
.pano-calibration-panel select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-width: 0;
  padding: 7px 8px;
  width: 100%;
}

.pano-measurement-panel select {
  font-size: 12px;
  height: 32px;
  padding: 5px 7px;
}

.pano-measurement-title input {
  font-size: 12px;
  height: 28px;
  padding: 5px 7px;
}

.pano-measurement-actions,
.pano-measurement-draft,
.pano-measurement-panel footer,
.pano-calibration-actions,
.pano-calibration-options,
.pano-calibration-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pano-measurement-draft span,
.pano-measurement-panel footer span:first-child {
  flex: 1 1 80px;
}

.pano-measurement-draft {
  flex-wrap: nowrap;
}

.pano-measurement-draft span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pano-measurement-hint {
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 5px;
  color: #0f4f4a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  padding: 5px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pano-measurement-list {
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  display: grid;
  gap: 4px;
  max-height: 112px;
  overflow-y: auto;
  padding-top: 6px;
}

.pano-measurement-list button {
  align-items: center;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 5px;
  color: #0f172a;
  display: flex;
  gap: 6px;
  height: 26px;
  justify-content: flex-start;
  padding: 0 7px;
  width: 100%;
}

.pano-measurement-list button span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
}

.pano-measurement-list button strong {
  flex: 1 1 auto;
  font-size: 11px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pano-calibration-create,
.pano-calibration-saved {
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.pano-calibration-create {
  border-top: 0;
  padding-top: 0;
}

.pano-calibration-options label {
  align-items: center;
  display: inline-flex;
  flex: 1 1 130px;
  gap: 6px;
}

.pano-calibration-options input {
  accent-color: var(--teal);
  height: 15px;
  padding: 0;
  width: 15px;
}

.pano-calibration-summary {
  justify-content: space-between;
}

.pano-fov-calibration {
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  display: grid;
  gap: 7px;
  padding: 8px;
}

.pano-fov-calibration__title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.pano-fov-calibration__title span {
  color: #0f4f55;
  font-size: 12px;
  font-weight: 800;
}

.pano-fov-calibration__grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pano-fov-calibration__grid input {
  font-size: 12px;
  height: 30px;
  padding: 5px 7px;
}

.pano-fov-calibration__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pano-calibration-actions .danger {
  color: var(--danger);
}

.segment-spec-pano-close {
  background: rgba(255, 255, 255, 0.94);
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 6;
}

.segment-spec-pano-panel .image-strip {
  background: #fff;
  flex: 0 0 auto;
  gap: 10px;
  grid-template-columns: 120px minmax(0, 1fr);
  padding: 8px;
}

.segment-spec-pano-panel .image-strip__label {
  font-size: 12px;
}

.segment-spec-pano-panel .thumb {
  height: 64px;
  width: 104px;
}

.segment-spec-pano-panel .thumb.candidate-preview {
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.segment-spec-pano-panel .thumb.candidate-preview .thumb__plus {
  background: #1d4ed8;
}

.segment-spec-resize-handle {
  align-items: stretch;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  cursor: col-resize;
  display: flex;
  justify-content: center;
  min-height: 0;
  outline: 0;
  touch-action: none;
}

.segment-spec-resize-handle span {
  background: transparent;
  border-radius: 999px;
  display: block;
  margin: 0 auto;
  transition: background 0.15s ease, box-shadow 0.15s ease, width 0.15s ease;
  width: 2px;
}

.segment-pano-resize-handle {
  align-items: stretch;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  cursor: col-resize;
  display: flex;
  justify-content: center;
  min-height: 0;
  outline: 0;
  touch-action: none;
}

.segment-pano-resize-handle span {
  background: transparent;
  border-radius: 999px;
  display: block;
  margin: 0 auto;
  transition: background 0.15s ease, box-shadow 0.15s ease, width 0.15s ease;
  width: 2px;
}

.specs-segment-list-resize-handle:hover span,
.specs-segment-list-resize-handle:focus-visible span,
.workspace-specs.is-resizing-segment-list .specs-segment-list-resize-handle span,
.segment-spec-resize-handle:hover span,
.segment-spec-resize-handle:focus-visible span,
.workspace-specs.is-resizing .segment-spec-resize-handle span,
.segment-pano-resize-handle:hover span,
.segment-pano-resize-handle:focus-visible span,
.workspace-specs.is-resizing-pano .segment-pano-resize-handle span {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(17, 123, 131, 0.12);
  width: 3px;
}

body.is-resizing-spec-segment-list,
body.is-resizing-specs,
body.is-resizing-spec-pano {
  cursor: col-resize;
  user-select: none;
}

.workspace-specs .segment-spec-map > header,
.workspace-specs .combined-map-panel > .combined-panel-header {
  display: none;
}

.segment-spec-map > div {
  height: 100%;
  min-height: 0;
}

.segment-spec-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 260px;
  justify-content: center;
  text-align: center;
}

.segment-spec-empty svg {
  height: 32px;
  width: 32px;
}

.segment-spec-empty.compact {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  min-height: 92px;
  padding: 14px;
}

.segment-spec-empty.compact svg {
  height: 22px;
  width: 22px;
}

@media (max-width: 1250px) {
  .workspace-specs,
  .segment-spec-layout {
    grid-template-columns: 1fr;
  }

  .specs-segment-list,
  .specs-segment-list-resize-handle,
  .segment-spec-map {
    display: none;
  }

  .workspace-specs.is-segment-info-closed .segment-spec-map {
    display: grid;
  }

  .workspace-specs.is-segment-info-closed .segment-spec-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .segment-spec-resize-handle {
    display: none;
  }
}

@media (max-width: 900px) {
  .segment-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .segment-star-rating-list {
    grid-template-columns: repeat(2, minmax(118px, 1fr));
  }
}

/* Grid View Styles */
.workspace-grid {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  margin-left: var(--sidebar-width);
  overflow: hidden;
}

.workspace-combined {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(520px, 1.35fr) minmax(300px, 0.8fr) minmax(340px, 0.9fr);
  height: calc(100vh - 64px);
  margin-left: var(--sidebar-width);
  min-height: 640px;
  overflow: hidden;
  padding: 12px;
}

.workspace-combined.is-resizing,
.workspace-combined.is-resizing * {
  user-select: none;
}

body.is-resizing-combined {
  cursor: col-resize;
  user-select: none;
}

.combined-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.combined-resize-handle {
  align-items: stretch;
  cursor: col-resize;
  display: flex;
  justify-content: center;
  min-height: 0;
  outline: 0;
  position: relative;
  touch-action: none;
}

.combined-resize-handle span {
  background: transparent;
  border-radius: 999px;
  display: block;
  margin: 0 auto;
  transition: background 0.15s ease, box-shadow 0.15s ease, width 0.15s ease;
  width: 2px;
}

.combined-resize-handle:hover span,
.combined-resize-handle:focus-visible span,
.workspace-combined.is-resizing .combined-resize-handle span {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(17, 123, 131, 0.12);
  width: 3px;
}

.combined-panel-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 12px;
}

.combined-panel-header div {
  min-width: 0;
}

.combined-panel-header span,
.combined-panel-header small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.combined-panel-header strong {
  display: block;
  margin-top: 2px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combined-panel-header small {
  flex: 0 1 auto;
  max-width: 42%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combined-map-panel > .combined-panel-header {
  display: none;
}

.combined-map-panel {
  grid-template-rows: minmax(0, 1fr);
}

.combined-stage {
  background: #17212b;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

.combined-grid-panel .segments-grid-container {
  height: 100%;
}

.combined-pano-panel .image-strip {
  flex: 0 0 auto;
  grid-template-columns: 1fr;
  gap: 8px;
}

.combined-pano-panel .image-strip__label {
  min-height: 18px;
}

.pano-empty {
  align-items: center;
  background: #111827;
  color: #cbd5e1;
  display: flex;
  height: 100%;
  justify-content: center;
}

.segments-grid-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.grid-controls {
  background: white;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 9px 12px;
  grid-template-areas:
    "stats options extract"
    "fields fields fields";
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr) auto;
  padding: 9px 12px;
}

.compact-grid .grid-controls {
  grid-template-areas:
    "stats extract"
    "options options"
    "fields fields";
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-height: 240px;
  overflow: auto;
  padding: 10px 12px;
}

.compact-grid .metric-inline {
  flex-wrap: wrap;
}

.compact-grid .field-selector {
  grid-template-areas:
    "head"
    "quick";
  grid-template-columns: 1fr;
  min-width: 100%;
}

.compact-grid .field-selector-head {
  align-items: flex-start;
}

.compact-grid .field-selector-actions {
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .grid-controls {
    grid-template-areas:
      "stats extract"
      "options options"
      "fields fields";
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 760px) {
  .grid-controls,
  .compact-grid .grid-controls {
    grid-template-areas:
      "stats"
      "options"
      "extract"
      "fields";
    grid-template-columns: 1fr;
  }

  .field-selector-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-selector {
    grid-template-areas:
      "head"
      "quick";
    grid-template-columns: 1fr;
  }

  .field-selector-actions {
    flex-wrap: wrap;
  }
}

.control-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grid-stats {
  grid-area: stats;
}

.display-options {
  align-content: start;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  grid-area: options;
  gap: 6px;
}

.difference-tools {
  grid-area: extract;
}

.field-selector {
  grid-area: fields;
}

.control-section h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.5px;
}

.grid-stats > h3,
.display-options > h3,
.difference-tools > h3 {
  display: none;
}

.metric-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.metric-inline span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  gap: 5px;
  min-height: 26px;
  padding: 0 9px;
}

.metric-inline strong {
  color: var(--ink);
  font-weight: 600;
}

.checkbox-label {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  font-size: 12px;
  height: 28px;
  padding: 0 10px 0 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--teal);
  cursor: pointer;
  height: 13px;
  margin: 0;
  width: 13px;
}

.field-selector {
  display: grid;
  flex: 1;
  gap: 6px 10px;
  grid-template-areas:
    "head"
    "quick";
  grid-template-columns: 1fr;
  min-width: 0;
}

.field-selector-head {
  align-items: center;
  display: flex;
  gap: 14px;
  grid-area: head;
  justify-content: space-between;
  min-width: 0;
}

.field-selector-head p {
  color: var(--muted);
  font-size: 12px;
  margin: 1px 0 0;
  display: none;
}

.field-selector-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.field-selector-actions button,
.category-picker-card button,
.field-library-group header button,
.field-picker-actions button,
.field-picker-footer button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  height: 28px;
  padding: 0 9px;
}

.field-selector-actions button:hover,
.category-picker-card button:hover,
.field-library-group header button:hover,
.field-picker-actions button:hover,
.field-picker-footer button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.difference-tools button {
  align-items: center;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  height: 28px;
  justify-content: center;
  padding: 0 10px;
}

.difference-tools button svg {
  height: 14px;
  width: 14px;
}

.difference-tools button:disabled {
  background: #dbe3ea;
  border-color: #dbe3ea;
  color: #64748b;
  cursor: not-allowed;
}

.difference-tools small {
  color: var(--muted);
  font-size: 11px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-selector-actions .primary-lite-button {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  font-weight: 700;
}

.field-selector-actions .primary-lite-button:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
}

.quick-field-row {
  display: flex;
  gap: 6px;
  grid-area: quick;
  overflow-x: auto;
  padding-bottom: 1px;
}

.quick-field-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--category-color);
  border-radius: 7px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  height: 30px;
  padding: 0 9px;
}

.quick-field-button span {
  font-size: 12px;
  font-weight: 700;
}

.quick-field-button small {
  color: var(--muted);
}

.quick-field-button.partial {
  background: #f8fafc;
}

.quick-field-button.complete {
  background: #e8f4f5;
  border-color: rgba(17, 123, 131, 0.4);
}

.category-picker-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.category-picker-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--category-color);
  border-radius: 7px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(76px, 1fr) auto auto auto;
  min-height: 42px;
  padding: 7px;
}

.category-picker-card strong {
  display: block;
  font-size: 12px;
  line-height: 1.1;
}

.category-picker-card span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.field-search-row input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  height: 34px;
  padding: 0 10px;
  width: 100%;
}

.field-search-row input:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(17, 123, 131, 0.12);
}

.selected-field-strip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 6px;
  min-height: 48px;
  overflow-x: auto;
  padding: 6px;
}

.selected-field-strip > span {
  color: var(--muted);
  font-size: 12px;
  padding: 0 4px;
}

.field-library {
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 8px;
  max-height: 170px;
  overflow: auto;
  padding: 8px;
}

.field-library-group {
  border-left: 3px solid var(--category-color);
  padding-left: 8px;
}

.field-library-group header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.field-library-group header strong {
  display: block;
  font-size: 12px;
}

.field-library-group header span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  padding: 4px 0;
}

.field-chip {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  transition: all 0.15s;
  white-space: nowrap;
}

.field-chip small {
  color: currentColor;
  font-size: 10px;
  opacity: 0.7;
}

.field-chip:hover {
  background: var(--surface-strong);
  border-color: var(--teal);
}

.field-chip.selected {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  font-weight: 500;
}

.field-picker-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 80;
}

.field-picker-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(760px, calc(100vh - 48px));
  max-width: 1120px;
  overflow: hidden;
  width: min(1120px, calc(100vw - 48px));
}

.field-picker-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
}

.field-picker-header h3 {
  font-size: 17px;
  margin: 0;
}

.field-picker-header p {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
}

.icon-close-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.icon-close-button svg {
  height: 17px;
  width: 17px;
}

.field-picker-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 0;
}

.field-picker-groups {
  background: #f8fafc;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  padding: 12px;
}

.field-picker-groups button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--category-color);
  border-radius: 7px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 9px;
  text-align: left;
}

.field-picker-groups button.active {
  border-color: var(--category-color);
  box-shadow: inset 0 0 0 1px var(--category-color);
}

.field-picker-groups strong {
  font-size: 12px;
}

.field-picker-groups span {
  color: var(--muted);
  font-size: 11px;
}

.field-picker-fields {
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  padding: 14px;
}

.field-picker-tools {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 360px);
}

.field-picker-tools h4 {
  font-size: 15px;
  margin: 0;
}

.field-picker-tools p {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
}

.field-picker-tools input {
  border: 1px solid var(--line);
  border-radius: 7px;
  height: 34px;
  padding: 0 10px;
}

.field-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field-picker-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 0;
  overflow: auto;
}

.field-picker-row {
  align-items: center;
  border-bottom: 1px solid #eef2f7;
  display: grid;
  gap: 12px;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 48px;
  padding: 9px 12px;
}

.field-picker-row:last-child {
  border-bottom: 0;
}

.field-picker-row:hover {
  background: #f8fafc;
}

.field-picker-row strong {
  display: block;
  font-size: 13px;
}

.field-picker-row small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.field-picker-empty {
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.field-picker-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px;
}

.grid-field-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-field-category {
  color: rgba(255, 255, 255, 0.9);
  display: block;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.segment-id {
  align-items: center;
  color: var(--teal);
  display: flex;
  gap: 6px;
  font-weight: 600;
  justify-content: space-between;
}

.segment-id-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aerial-overlay-button,
.specs-aerial-overlay-button {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.aerial-overlay-button:hover,
.aerial-overlay-button:focus-visible,
.specs-aerial-overlay-button:hover,
.specs-aerial-overlay-button:focus-visible {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
  outline: none;
}

.aerial-overlay-button svg,
.specs-aerial-overlay-button svg {
  height: 14px;
  width: 14px;
}

.ai-grid-value {
  display: block;
  line-height: 1.25;
}

.old-grid-value {
  display: block;
  line-height: 1.25;
}

.current-cell.different-pair .old-grid-value,
.ai-cell.different .ai-grid-value {
  text-decoration-color: #a4262c;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.editable-grid-cell {
  position: relative;
}

.editable-grid-cell__content {
  min-width: 0;
  padding-right: 24px;
}

.grid-cell-edit-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--teal-dark);
  display: none;
  height: 22px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 6px;
  top: 7px;
  width: 22px;
}

.grid-cell-edit-button svg {
  height: 13px;
  width: 13px;
}

.editable-grid-cell.can-edit:hover .grid-cell-edit-button,
.editable-grid-cell.can-edit:focus-within .grid-cell-edit-button {
  display: inline-flex;
}

.editable-grid-cell.can-edit {
  cursor: text;
}

.editable-grid-cell.editing {
  align-content: start;
  display: grid;
  gap: 4px;
}

.editable-grid-cell.editing input,
.editable-grid-cell.editing select {
  background: #fff;
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  height: 30px;
  min-width: 0;
  outline: 2px solid rgba(17, 123, 131, 0.12);
  padding: 0 8px;
  width: 100%;
}

.editable-grid-cell.editing small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-grid-reason {
  color: #64748b;
  display: -webkit-box;
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-grid-evidence-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.ai-grid-evidence-link {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #c7e0f4;
  border-radius: 4px;
  color: #004578;
  cursor: pointer;
  display: inline-flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  gap: 5px;
  height: 26px;
  max-width: 145px;
  min-width: 0;
  overflow: hidden;
  padding: 2px 6px 2px 2px;
}

.ai-grid-evidence-link:hover {
  background: #e6f4ed;
  border-color: #86c49f;
}

.ai-grid-evidence-link img {
  border-radius: 2px;
  flex: 0 0 auto;
  height: 20px;
  object-fit: cover;
  width: 24px;
}

.ai-grid-evidence-link span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-grid-evidence-icon {
  align-items: center;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  width: 24px;
}

.ai-grid-evidence-icon svg {
  height: 13px;
  width: 13px;
}

.ai-grid-evidence-more {
  color: #605e5c;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.data-grid-wrapper {
  background: var(--surface);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.fast-data-grid {
  background: #fff;
  height: 100%;
  overflow: auto;
}

.fast-data-grid-inner {
  min-width: 100%;
  width: max-content;
}

.fast-data-grid-header {
  background: var(--surface-strong);
  position: sticky;
  top: 0;
  z-index: 12;
}

.fast-data-grid-row {
  display: grid;
  min-width: 100%;
}

.data-grid-cell {
  border-bottom: 1px solid var(--line);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-cell {
  background: var(--surface-strong);
  border-bottom: 2px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  min-height: 50px;
  padding: 10px 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-cell small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  margin-top: 3px;
  text-transform: none;
}

.field-group-cell {
  background: var(--category-color, #64748b);
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  border-top: 0;
  color: #fff;
}

.field-group-cell small {
  color: rgba(255, 255, 255, 0.82);
}

.sub-header-cell {
  background: #e0e7ed;
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
  font-weight: 600;
  min-height: 28px;
  padding: 7px 12px;
}

.body-row:hover .body-cell {
  background: #f8fafc;
}

.body-row.has-ai-data .body-cell {
  background: #fefbf5;
}

.body-row.has-ai-data:hover .body-cell {
  background: #fef6e8;
}

.body-row.selectable-row {
  cursor: pointer;
}

.body-row.selectable-row:focus {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.body-row.active-row .body-cell,
.body-row.active-row:hover .body-cell,
.body-row.has-ai-data.active-row .body-cell,
.body-row.has-ai-data.active-row:hover .body-cell {
  background: #e8f7ef;
}

.body-row.active-row .body-cell.sticky-grid-col,
.body-row.active-row:hover .body-cell.sticky-grid-col,
.body-row.has-ai-data.active-row .body-cell.sticky-grid-col,
.body-row.has-ai-data.active-row:hover .body-cell.sticky-grid-col {
  background: #dcfce7;
}

.body-cell {
  font-size: 13px;
  line-height: 1.3;
  min-height: 38px;
  padding: 9px 12px;
  white-space: normal;
}

.sticky-grid-col {
  border-right: 2px solid var(--line);
  left: 0;
  position: sticky;
  z-index: 8;
}

.header-cell.sticky-grid-col,
.sub-header-cell.sticky-grid-col {
  z-index: 14;
}

.body-cell.sticky-grid-col {
  background: #fff;
  font-weight: 700;
}

.body-row:hover .body-cell.sticky-grid-col {
  background: #f8fafc;
}

.body-row.has-ai-data .body-cell.sticky-grid-col {
  background: #fefbf5;
}

.body-row.has-ai-data:hover .body-cell.sticky-grid-col {
  background: #fef6e8;
}

.current-cell {
  background: #f8f9fb;
}

.current-cell.different-pair {
  background: #fff8e1;
}

.current-cell.sequence-change-cell {
  box-shadow: inset 3px 0 0 #0f766e;
}

.ai-cell {
  background: #fefbf5;
  color: var(--muted);
  font-style: italic;
}

.ai-cell.has-value {
  color: var(--ink);
  font-style: normal;
  font-weight: 500;
}

.ai-cell.different {
  background: #fff3cd;
  color: var(--warning);
  font-weight: 600;
}

.ai-cell.sequence-change-cell {
  box-shadow: inset 3px 0 0 #0f766e;
}

.difference-mark {
  background: #b45309;
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  margin-left: 8px;
  padding: 3px 6px;
  text-transform: uppercase;
  vertical-align: 1px;
}

.sequence-mark-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.sequence-mark {
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
  padding: 3px 6px;
  text-transform: uppercase;
}

.sequence-mark.previous {
  background: #64748b;
}

.sequence-mark.next {
  background: #0f766e;
}

.grid-pagination {
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 14px;
}

.grid-pagination__summary {
  color: var(--muted);
  font-size: 12px;
}

.grid-pagination__summary strong {
  color: var(--ink);
}

.grid-pagination__controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.grid-pagination__controls label {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
}

.grid-pagination__controls select,
.grid-pagination__controls button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  height: 30px;
  padding: 0 9px;
}

.grid-pagination__controls button:disabled {
  color: var(--muted);
}

.grid-pagination__controls span {
  color: var(--muted);
  font-size: 12px;
  padding: 0 4px;
}

.no-results {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Segment Feedback */
.workspace-feedback {
  background: #f5f6f8;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  margin-left: var(--sidebar-width);
  overflow: hidden;
}

.feedback-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.feedback-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 22px;
}

.feedback-header h2 {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 20px;
  gap: 10px;
  margin: 0;
}

.feedback-header p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.feedback-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.feedback-controls select,
.feedback-search input {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #1f2937;
  font-size: 13px;
  min-height: 36px;
}

.feedback-controls select {
  background: #fff;
  padding: 0 10px;
}

.feedback-search {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  display: flex;
  gap: 7px;
  padding: 0 10px;
}

.feedback-search svg {
  color: #2563eb;
  height: 16px;
  width: 16px;
}

.feedback-search input {
  border: 0;
  min-width: 260px;
  outline: 0;
  padding: 0;
}

.feedback-stats {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 22px;
}

.feedback-stats span {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1e40af;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.feedback-error {
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  padding: 10px 22px;
}

.feedback-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(560px, 1.45fr) minmax(380px, 0.8fr);
  min-height: 0;
  overflow: hidden;
}

.feedback-list-panel {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.feedback-list-head,
.feedback-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 86px minmax(180px, 1.1fr) minmax(150px, 0.85fr) 150px 95px;
}

.feedback-list-head {
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  padding: 10px 14px;
  text-transform: uppercase;
}

.feedback-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.feedback-row {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
  cursor: pointer;
  padding: 12px 14px;
  text-align: left;
  width: 100%;
}

.feedback-row:hover,
.feedback-row.active {
  background: #eff6ff;
}

.feedback-row.active {
  box-shadow: inset 4px 0 0 #2563eb;
}

.feedback-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.feedback-row strong {
  color: #111827;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-row small {
  color: #64748b;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  padding: 6px 8px;
  text-transform: uppercase;
}

.feedback-status.status-feedback {
  background: #fef3c7;
  color: #92400e;
}

.feedback-status.status-suggested,
.feedback-status.status-needs-review {
  background: #dbeafe;
  color: #1e40af;
}

.feedback-status.status-accepted {
  background: #dcfce7;
  color: #166534;
}

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

.feedback-detail-panel {
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.feedback-detail-panel > header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.feedback-detail-panel > header span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.feedback-detail-panel h3 {
  color: #111827;
  font-size: 20px;
  margin: 4px 0;
}

.feedback-detail-panel small,
.feedback-detail-meta span {
  color: #64748b;
  font-size: 12px;
}

.feedback-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-detail-meta span {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  display: inline-flex;
  gap: 5px;
  padding: 5px 8px;
}

.feedback-detail-meta svg {
  height: 13px;
  width: 13px;
}

.feedback-detail-panel section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.feedback-detail-panel h4 {
  color: #1f2937;
  font-size: 13px;
  margin: 0;
}

.feedback-detail-panel p,
.feedback-detail-panel pre,
.feedback-chat-history span {
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
}

.feedback-detail-panel pre {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
}

.feedback-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feedback-image-list span {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1e40af;
  font-size: 11px;
  padding: 4px 7px;
}

.feedback-chat-history {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.feedback-chat-history > div {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  padding: 9px;
}

.feedback-chat-history > div.user {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.feedback-chat-history b {
  color: #1d4ed8;
  font-size: 12px;
}

.feedback-chat-history .user b {
  color: #047857;
}

.feedback-detail-panel footer {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.feedback-empty {
  align-items: center;
  color: #64748b;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 52px 20px;
  text-align: center;
}

.feedback-empty.inline {
  padding: 32px 16px;
}

.feedback-empty svg {
  color: #94a3b8;
  height: 28px;
  width: 28px;
}

.feedback-empty strong {
  color: #1f2937;
  font-size: 15px;
}

/* Log Viewer Styles */
.workspace-logs {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  margin-left: var(--sidebar-width);
  overflow: hidden;
  background: #f5f6f8;
}

.log-viewer {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.log-header {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.log-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.filter-buttons button {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-buttons button:hover {
  background: white;
  color: var(--ink);
}

.filter-buttons button.active {
  background: var(--teal);
  color: white;
}

.btn-secondary {
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--teal);
  color: var(--teal);
}

.btn-danger {
  padding: 8px 16px;
  border: 1px solid #dc2626;
  background: white;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
}

.log-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.no-logs {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.no-logs p {
  margin: 0;
  font-size: 15px;
}

.log-entry {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.log-entry:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.log-entry.success {
  border-left: 4px solid #10b981;
}

.log-entry.error {
  border-left: 4px solid #dc2626;
}

.log-entry.pending {
  border-left: 4px solid #f59e0b;
}

.log-summary {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.log-summary:hover {
  background: var(--bg);
}

.log-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.log-status-icon {
  display: flex;
  align-items: center;
}

.log-entry.success .log-status-icon {
  color: #10b981;
}

.log-entry.error .log-status-icon {
  color: #dc2626;
}

.log-entry.pending .log-status-icon {
  color: #f59e0b;
}

.log-segment {
  font-weight: 600;
  color: var(--teal);
  font-size: 14px;
}

.log-time {
  color: var(--muted);
  font-size: 13px;
}

.log-model {
  color: var(--ink);
  font-size: 13px;
  padding: 3px 8px;
  background: var(--bg);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.log-images,
.log-fields {
  color: var(--muted);
  font-size: 13px;
}

.log-expand-icon {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.log-details {
  padding: 0 20px 20px 20px;
  border-top: 1px solid var(--line);
}

.log-section {
  margin-top: 20px;
}

.log-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-images-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.log-images-list li {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: var(--muted);
}

.log-prompt,
.log-response,
.log-parsed {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 16px;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.field-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.field-analysis-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.field-analysis-item.valid {
  border-left: 3px solid #10b981;
}

.field-analysis-item.invalid {
  border-left: 3px solid #f59e0b;
}

.field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.field-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
}

.field-confidence {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  padding: 2px 6px;
  background: white;
  border-radius: 3px;
}

.field-value {
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 6px;
  font-weight: 500;
}

.field-evidence {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-style: italic;
}

.log-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 12px;
}

.log-error h4 {
  color: #dc2626;
}

.log-error p {
  margin: 8px 0 0 0;
  color: #991b1b;
  font-size: 13px;
}

/* Topbar controls */
.topbar .segmented-control button {
  padding-left: 9px;
  padding-right: 9px;
}

.marked-object-list {
  align-content: center;
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
}

.marked-object-card {
  align-items: stretch;
  background: #ecfeff;
  border: 1px solid #67e8f9;
  border-radius: 7px;
  color: #164e63;
  cursor: pointer;
  display: grid;
  font: inherit;
  grid-template-columns: 74px minmax(0, 1fr);
  min-height: 66px;
  max-width: 210px;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.marked-object-card:hover,
.marked-object-card:focus-visible {
  background: #cffafe;
  border-color: #06b6d4;
  outline: none;
}

.marked-object-card__image {
  background: #0f172a;
  min-height: 66px;
  overflow: hidden;
  position: relative;
}

.marked-object-card__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.marked-object-card__image > span {
  align-items: center;
  color: #bae6fd;
  display: flex;
  height: 100%;
  justify-content: center;
}

.marked-object-card__text {
  align-content: center;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
}

.marked-object-card__text strong,
.marked-object-card__text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marked-object-card__text small {
  color: #155e75;
  font-size: 11px;
  margin: 0;
}

.sign-empty {
  align-self: center;
  color: var(--muted);
  font-style: normal;
}

.evidence-preview-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 5000;
}

.evidence-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto auto;
  max-height: calc(100vh - 40px);
  max-width: 980px;
  min-width: min(820px, calc(100vw - 40px));
  overflow: auto;
}

.evidence-preview header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.evidence-preview header span,
.evidence-preview header small {
  color: var(--muted);
  font-size: 12px;
}

.evidence-preview h3 {
  font-size: 18px;
  margin: 2px 0;
}

.evidence-preview__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.evidence-preview__mode {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  overflow: hidden;
}

.evidence-preview__mode button {
  background: #fff;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  min-width: 54px;
  padding: 7px 10px;
}

.evidence-preview__mode button:last-child {
  border-right: 0;
}

.evidence-preview__mode button.active {
  background: #e6f4ed;
  color: #065f35;
}

.evidence-preview__mode button:disabled {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: not-allowed;
}

.evidence-preview__media {
  align-items: center;
  background: #0f172a;
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.evidence-preview__image-frame {
  height: 100%;
  position: relative;
  width: 100%;
}

.evidence-preview__media img,
.evidence-preview__image-frame img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.evidence-preview__marked-main {
  align-items: center;
  background: #0f172a;
  display: flex;
  height: 100%;
  justify-content: center;
  margin: 0;
  min-height: 460px;
  width: 100%;
}

.evidence-preview__marked-main img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.evidence-preview__empty {
  color: #cbd5e1;
  font-size: 14px;
}

.evidence-preview__thumbs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
}

.evidence-preview__thumbs button {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  flex: 0 0 96px;
  height: 62px;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.evidence-preview__thumbs button.active {
  border-color: var(--orange);
}

.evidence-preview__thumbs img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.evidence-preview__thumbs span {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  bottom: 4px;
  color: #fff;
  font-size: 11px;
  left: 4px;
  min-width: 20px;
  padding: 2px 5px;
  position: absolute;
}

.evidence-preview__details {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.evidence-preview__details p {
  margin: 0;
}

.evidence-preview__marked-image {
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 0;
  overflow: hidden;
}

.evidence-preview__marked-image img {
  display: block;
  max-height: 220px;
  object-fit: contain;
  width: 100%;
}

.evidence-preview__marked-image figcaption {
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  padding: 6px 8px;
}

.evidence-preview__details dl {
  display: grid;
  gap: 6px 14px;
  grid-template-columns: 130px minmax(0, 1fr);
  margin: 0;
}

.evidence-preview__details dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.evidence-preview__details dd {
  margin: 0;
  min-width: 0;
}

.evidence-preview__details small {
  color: var(--muted);
}

.evidence-preview--clean {
  grid-template-rows: auto minmax(300px, 1fr) auto;
  max-width: min(1280px, calc(100vw - 40px));
  width: min(1280px, calc(100vw - 40px));
}

.evidence-preview__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  min-height: 0;
}

.evidence-preview--clean .evidence-preview__media {
  min-height: 460px;
}

.evidence-preview--clean .evidence-preview__media .pano-viewer-shell {
  min-height: 460px;
}

.evidence-preview__side {
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  overflow: auto;
}

.evidence-preview__side .evidence-preview__details {
  align-content: start;
}

@media (max-width: 1180px) {
  .evidence-preview__body {
    grid-template-columns: 1fr;
  }

  .evidence-preview__side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* Agent Manager */
.workspace-agents {
  background: var(--surface);
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: calc(100vh - 64px);
  margin-left: var(--sidebar-width);
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.agents-toolbar,
.agent-manager,
.agent-list-panel,
.agent-editor-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.agents-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 74px;
  padding: 14px 16px;
}

.agents-toolbar h2 {
  align-items: center;
  display: flex;
  font-size: 20px;
  gap: 9px;
  margin: 0;
}

.agents-toolbar h2 svg {
  color: var(--teal);
  height: 22px;
  width: 22px;
}

.agents-toolbar span,
.agent-card-section header span,
.agent-editor-header span {
  color: var(--muted);
  font-size: 12px;
}

.agents-toolbar__actions,
.agent-section-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-manager {
  display: grid;
  gap: 0;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.agent-list-panel {
  border-bottom-right-radius: 0;
  border-right: 1px solid var(--line);
  border-top-right-radius: 0;
  display: grid;
  gap: 8px;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.agent-list-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 4px 2px 8px;
}

.agent-list-title span {
  background: #e6f4ed;
  border: 1px solid #b7dbc8;
  border-radius: 999px;
  color: #065f35;
  font-size: 12px;
  padding: 2px 8px;
}

.agent-list-panel button {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  text-align: left;
}

.agent-list-panel button:hover,
.agent-list-panel button.active {
  background: #f7fbfc;
  border-color: #b7d9de;
}

.agent-list-panel button span,
.agent-list-panel button small {
  color: var(--muted);
  font-size: 12px;
}

.agent-editor-panel {
  border-bottom-left-radius: 0;
  border-left: 0;
  border-top-left-radius: 0;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.agent-empty {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 120px;
  padding: 18px;
}

.agent-empty.small {
  min-height: 58px;
  padding: 12px;
}

.agent-editor-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: -2px -2px 14px;
  padding: 0 2px 12px;
}

.agent-editor-header h3 {
  font-size: 22px;
  margin: 2px 0 0;
}

.agent-editor-header em {
  background: #eef6f7;
  border: 1px solid #b7d9de;
  border-radius: 999px;
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 700;
  padding: 5px 10px;
}

.agent-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.agent-form-grid label,
.workflow-notes {
  display: grid;
  gap: 5px;
}

.agent-form-grid label:nth-child(n + 3),
.workflow-notes {
  grid-column: 1 / -1;
}

.agent-form-grid span,
.workflow-notes span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.agent-form-grid input,
.agent-form-grid textarea,
.agent-doc-card input,
.agent-doc-card textarea,
.workflow-step-editor input,
.workflow-step-editor textarea,
.workflow-edge-row select,
.workflow-edge-row input,
.workflow-notes textarea,
.workflow-json-editor textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  min-width: 0;
  padding: 9px 10px;
}

.agent-form-grid textarea,
.agent-doc-card textarea,
.workflow-step-editor textarea,
.workflow-notes textarea,
.workflow-json-editor textarea {
  line-height: 1.45;
  resize: vertical;
}

.agent-card-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  overflow: hidden;
}

.agent-card-section > header {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.agent-card-section h4 {
  align-items: center;
  display: flex;
  font-size: 16px;
  gap: 8px;
  margin: 0 0 3px;
}

.agent-trainer-section header small {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.agent-trainer-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.agent-trainer-dropzone {
  align-items: center;
  background: #fff;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  color: #475569;
  display: flex;
  min-height: 96px;
  padding: 10px;
}

.agent-trainer-dropzone:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.agent-trainer-dropzone > span {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

.agent-trainer-images {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  width: 100%;
}

.agent-trainer-images figure {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: grid;
  flex: 0 0 154px;
  grid-template-rows: 92px auto;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.agent-trainer-images img {
  display: block;
  height: 92px;
  object-fit: cover;
  width: 100%;
}

.agent-trainer-images figcaption {
  color: #475569;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  padding: 6px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-trainer-images .icon-action {
  background: rgba(15, 23, 42, 0.74);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  height: 24px;
  position: absolute;
  right: 5px;
  top: 5px;
  width: 24px;
}

.agent-trainer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-trainer-result {
  display: grid;
  gap: 10px;
}

.agent-trainer-result section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 10px;
}

.agent-trainer-result strong {
  color: #1e293b;
  font-size: 12px;
}

.agent-trainer-result p,
.agent-trainer-result li {
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}

.agent-trainer-result p,
.agent-trainer-result ul {
  margin: 0;
}

.agent-trainer-result ul {
  padding-left: 18px;
}

.agent-trainer-result pre {
  background: #0f172a;
  border-radius: 7px;
  color: #e2e8f0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.file-import-button {
  position: relative;
}

.file-import-button input {
  display: none;
}

.agent-doc-list,
.workflow-editor {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.agent-doc-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.agent-doc-card__meta {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 90px minmax(180px, 1fr) 110px 36px;
}

.agent-doc-toggle {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 6px;
}

.workflow-diagram {
  align-items: stretch;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  min-height: 128px;
  overflow-x: auto;
  padding: 14px;
}

.workflow-diagram.empty {
  align-items: center;
  color: var(--muted);
  justify-content: center;
}

.workflow-node-card {
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.08);
  display: grid;
  flex: 0 0 210px;
  gap: 5px;
  min-height: 92px;
  padding: 10px;
}

.workflow-node-card span {
  align-items: center;
  background: var(--blue);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.workflow-node-card small {
  color: var(--muted);
  line-height: 1.35;
}

.workflow-connector {
  align-items: center;
  color: var(--muted);
  display: grid;
  flex: 0 0 54px;
  justify-items: center;
}

.workflow-connector svg {
  color: var(--teal);
}

.workflow-connector small {
  font-size: 11px;
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step-list {
  display: grid;
  gap: 8px;
}

.workflow-step-editor {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: 28px minmax(180px, 260px) minmax(240px, 1fr) 36px;
}

.workflow-step-editor strong {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: var(--blue);
  display: flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.workflow-edge-editor {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.workflow-edge-editor h5 {
  font-size: 13px;
  margin: 0;
  text-transform: uppercase;
}

.workflow-edge-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1fr) 24px minmax(160px, 1fr) minmax(90px, 150px) 36px;
}

.workflow-json-editor {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.workflow-json-editor > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.workflow-json-editor textarea {
  font-family: "Courier New", monospace;
  font-size: 12px;
  white-space: pre;
}

.agents-message {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

@media (max-width: 1100px) {
  .agent-manager {
    grid-template-columns: 1fr;
  }

  .agent-list-panel {
    border-radius: 8px 8px 0 0;
    display: flex;
    overflow-x: auto;
  }

  .agent-list-panel button {
    flex: 0 0 220px;
  }

  .agent-editor-panel {
    border-left: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
  }

  .agent-form-grid,
  .agent-doc-card__meta,
  .workflow-step-editor,
  .workflow-edge-row {
    grid-template-columns: 1fr;
  }
}

/* Azure Portal inspired theme override */
:root {
  --azure-blue: #0b7f47;
  --azure-blue-dark: #065f35;
  --azure-blue-soft: #e6f4ed;
  --azure-command: #f8f8f8;
  --ink: #1b1a19;
  --muted: #605e5c;
  --line: #d1d1d1;
  --panel: #ffffff;
  --surface: #f3f2f1;
  --surface-strong: #edebe9;
  --teal: var(--azure-blue);
  --teal-dark: var(--azure-blue-dark);
  --blue: var(--azure-blue);
  --orange: #ca5010;
  --purple: #5c2d91;
  --green: #0b7f47;
  --danger: #a4262c;
  --warning: #986f0b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  --sidebar-width: 92px;
  --topbar-height: 54px;
}

body {
  background: var(--surface);
  color: var(--ink);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--azure-blue);
  box-shadow: 0 0 0 1px var(--azure-blue);
  outline: none;
}

.topbar {
  background: var(--azure-blue);
  border-bottom: 0;
  box-shadow: none;
  color: #fff;
  gap: 14px;
  grid-template-columns: minmax(150px, 210px) minmax(320px, 1fr) auto;
  height: var(--topbar-height);
  padding: 0 12px;
}

.topbar .brand-block {
  gap: 8px;
}

.brand-mark {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 2px;
  height: 36px;
  width: 36px;
}

.brand-block h1 {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

.brand-block > span {
  color: rgba(255, 255, 255, 0.88);
}

.topbar-airap-lockup {
  align-items: center;
  display: inline-flex;
  flex: 0 1 auto;
  gap: 8px;
  min-width: 0;
}

.topbar-airap-mark {
  flex: 0 0 auto;
  height: 38px;
  width: 52px;
}

.topbar-airap-mark .airap-mark__sweep,
.topbar-airap-mark .airap-mark__pixel--green {
  fill: #ffffff;
}

.topbar-airap-mark .airap-mark__road,
.topbar-airap-mark .airap-mark__pixel {
  fill: #d7efe3;
}

.topbar-airap-lockup h1 {
  color: #fff;
  display: inline-flex;
  align-items: baseline;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-airap-lockup h1 span {
  color: #d8f4e5;
  display: inline;
  margin-top: 0;
  overflow: visible;
}

.topbar-fedasen-badge {
  align-items: center;
  background: rgba(4, 91, 49, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  padding: 4px 8px;
}

.topbar-fedasen-logo {
  min-width: 74px;
}

.topbar-fedasen-logo img {
  width: 74px;
}

.global-search,
.browser-search form {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 2px;
  height: 34px;
}

.topbar .global-search input,
.topbar .browser-search input {
  color: var(--ink);
}

.topbar .icon-action {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.22);
  border-radius: 2px;
  color: var(--ink);
  height: 30px;
}

.fedasen-logo {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
}

.fedasen-logo img {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  width: 160px;
}

.topbar .topbar-airap-mark {
  height: 38px;
  width: 52px;
}

.topbar .topbar-fedasen-logo {
  min-width: 74px;
}

.topbar .topbar-fedasen-logo img {
  width: 74px;
}

.brand-logo {
  background: transparent;
  border: 0;
  border-radius: 2px;
  flex: 0 0 auto;
  height: 42px;
  min-width: 160px;
  padding: 0;
}

.login-logo {
  background: var(--azure-blue);
  border: 1px solid var(--azure-blue-dark);
  border-radius: 2px;
  flex: 0 0 auto;
  height: 60px;
  min-width: 190px;
  padding: 10px 14px;
}

.login-logo--center {
  margin: 0 auto 18px;
}

.topbar-user {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.topbar-user span {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.airap-brand {
  align-items: center;
  color: #202938;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.airap-brand--compact {
  gap: 8px;
}

.airap-mark {
  display: block;
  height: 132px;
  width: 176px;
}

.airap-brand--compact .airap-mark {
  height: 76px;
  width: 102px;
}

.airap-mark__sweep {
  fill: #16844a;
}

.airap-mark__road {
  fill: #2d3440;
}

.airap-mark__lane {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-width: 4;
}

.airap-mark__pixel {
  fill: #303844;
}

.airap-mark__pixel--green {
  fill: #16844a;
}

.topbar .topbar-airap-mark {
  height: 38px;
  width: 52px;
}

.airap-brand__word strong {
  display: block;
  font-size: 72px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.9;
  white-space: nowrap;
}

.airap-brand__word strong span {
  color: #067a3a;
  display: inline;
}

.airap-brand__word small {
  color: #303844;
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1.45;
  margin-top: 14px;
  text-transform: uppercase;
}

.airap-brand--compact .airap-brand__word strong {
  font-size: 42px;
}

.airap-brand--compact .airap-brand__word small {
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 8px;
}

.login-shell {
  align-items: center;
  background:
    radial-gradient(circle at 24% 18%, rgba(13, 132, 74, 0.12), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f3f6f8 52%, #eef3f0 100%);
  display: grid;
  gap: clamp(28px, 6vw, 84px);
  grid-template-columns: minmax(320px, 0.86fr) minmax(360px, 560px);
  height: 100vh;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: clamp(24px, 4vw, 46px);
  position: relative;
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.login-shell::before {
  animation: loginGridDrift 4.75s linear infinite;
  background-image:
    linear-gradient(rgba(36, 52, 64, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 52, 64, 0.06) 1px, transparent 1px);
  background-position: 0 0;
  background-size: 34px 34px;
  inset: 0;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}

.login-shell::after {
  background: linear-gradient(180deg, rgba(12, 131, 71, 0), rgba(12, 131, 71, 0.1));
  bottom: -18%;
  height: 38%;
  left: 0;
  right: 0;
}

@keyframes loginGridDrift {
  to {
    background-position: 68px 34px;
  }
}

.login-brand-panel {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.login-hero-brand .airap-mark {
  height: clamp(124px, 16vw, 190px);
  width: clamp(168px, 22vw, 254px);
}

.login-hero-brand .airap-brand__word strong {
  font-size: clamp(58px, 7vw, 94px);
}

.login-brand-line {
  border-top: 1px solid rgba(48, 56, 68, 0.22);
  color: #303844;
  font-size: clamp(16px, 1.6vw, 20px);
  margin: 0;
  max-width: 420px;
  padding-top: 18px;
  text-align: center;
}

.login-ai-animation {
  height: 88px;
  margin: -12px 0 -4px;
  max-width: 460px;
  opacity: 0.92;
  pointer-events: none;
  width: min(460px, 96%);
}

.login-ai-animation svg {
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}

.login-ai-map-line {
  animation: loginAiTrace 7.4s linear infinite;
  fill: none;
  stroke: rgba(48, 56, 68, 0.15);
  stroke-dasharray: 4 10;
  stroke-linecap: round;
  stroke-width: 2;
}

.login-ai-map-line--two {
  animation-duration: 9s;
  stroke: rgba(6, 122, 58, 0.18);
}

.login-ai-road-shadow {
  fill: none;
  stroke: rgba(48, 56, 68, 0.12);
  stroke-linecap: round;
  stroke-width: 20;
}

.login-ai-road {
  fill: none;
  filter: drop-shadow(0 8px 14px rgba(23, 37, 52, 0.12));
  stroke: #303844;
  stroke-linecap: round;
  stroke-width: 11;
}

.login-ai-road-lane {
  animation: loginAiTrace 5.8s linear infinite;
  fill: none;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-dasharray: 13 18;
  stroke-linecap: round;
  stroke-width: 3;
}

.login-ai-scan-zone {
  animation: loginAiScan 4.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.login-ai-scan-zone rect {
  fill: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 10px 18px rgba(23, 37, 52, 0.14));
  stroke: #0b7f47;
  stroke-width: 2;
}

.login-ai-scan-zone path {
  fill: none;
  stroke: #0b7f47;
  stroke-linecap: round;
  stroke-width: 2;
}

.login-ai-road-segment circle {
  fill: #dd7a2a;
  filter: drop-shadow(0 6px 12px rgba(221, 122, 42, 0.18));
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 2;
}

.login-ai-road-segment rect {
  fill: #0b7f47;
  opacity: 0.76;
}

.login-ai-pulse {
  animation: loginAiPulse 3.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.login-ai-pulse--two {
  animation-delay: 0.7s;
}

.login-ai-pulse--three {
  animation-delay: 1.4s;
}

.login-ai-pulse--four {
  animation-delay: 2s;
}

.login-ai-spark {
  animation: loginAiSpark 4.5s ease-in-out infinite;
  fill: #0b7f47;
  opacity: 0.7;
  transform-box: fill-box;
  transform-origin: center;
}

.login-ai-spark--two {
  animation-delay: 1.1s;
}

.login-ai-spark--three {
  animation-delay: 2s;
}

.login-ai-packet {
  fill: #0b7f47;
  filter: drop-shadow(0 4px 9px rgba(6, 122, 58, 0.28));
  opacity: 0.85;
}

@keyframes loginAiTrace {
  to {
    stroke-dashoffset: -90;
  }
}

@keyframes loginAiPulse {
  0%,
  100% {
    opacity: 0.76;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.16);
  }
}

@keyframes loginAiSpark {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.82);
  }

  45% {
    opacity: 0.9;
    transform: scale(1.08);
  }
}

@keyframes loginAiScan {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.login-feature-row {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  max-width: 520px;
  width: 100%;
}

.login-feature-row span {
  align-items: center;
  color: #303844;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  text-align: center;
}

.login-feature-row svg {
  color: #067a3a;
  height: 34px;
  width: 34px;
}

.login-feature-row small {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
}

.login-fedasen-badge {
  align-items: center;
  background: linear-gradient(135deg, #075d38, #0a7d47);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(23, 37, 52, 0.16);
  color: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  min-height: 44px;
  padding: 8px 14px;
}

.login-fedasen-logo {
  flex: 0 0 auto;
  min-width: 118px;
  padding: 0;
}

.login-fedasen-logo img {
  width: 118px;
}

.login-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.24)),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(6, 122, 58, 0.6)),
    url("/assets/login-road.jpg") center / cover no-repeat;
  border: 1px solid rgba(49, 64, 80, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 54px rgba(26, 35, 48, 0.22);
  display: flex;
  margin: 0;
  min-height: min(760px, calc(100vh - 88px));
  overflow: hidden;
  padding: clamp(22px, 4vw, 46px);
  position: relative;
  width: 100%;
  z-index: 1;
}

.login-card::before {
  background:
    linear-gradient(180deg, rgba(240, 246, 246, 0.78) 0%, rgba(240, 246, 246, 0.58) 42%, rgba(7, 118, 62, 0.72) 100%),
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.95), transparent 30%);
  content: "";
  inset: 0;
  position: absolute;
}

.login-card::after {
  background-image:
    linear-gradient(90deg, rgba(48, 56, 68, 0.08) 8px, transparent 8px),
    linear-gradient(rgba(48, 56, 68, 0.08) 8px, transparent 8px);
  background-size: 34px 34px;
  content: "";
  inset: 0;
  opacity: 0.22;
  position: absolute;
}

.login-card--compact {
  background: #fff;
  display: block;
  margin: 0 auto;
  max-width: 390px;
  min-height: 0;
  padding: 30px;
  text-align: center;
}

.login-card--compact::before,
.login-card--compact::after {
  display: none;
}

.login-card__glass {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  margin: auto;
  max-width: 420px;
  min-height: 100%;
  min-width: 0;
  position: relative;
  width: 100%;
  z-index: 1;
}

.login-card-brand {
  margin-bottom: 26px;
}

.login-card__intro {
  margin-bottom: 28px;
  text-align: center;
}

.login-card h1 {
  color: #067a3a;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.login-card p {
  color: #303844;
  font-size: 14px;
  margin: 10px 0 0;
}

.login-form {
  display: grid;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.login-mfa-methods {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 6px;
}

.login-mfa-methods button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  justify-content: center;
  min-height: 42px;
  min-width: 0;
  padding: 0 8px;
}

.login-mfa-methods button.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: #0f5132;
}

.login-mfa-methods button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.login-mfa-methods svg {
  flex: 0 0 auto;
  height: 17px;
  width: 17px;
}

.login-field {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(48, 56, 68, 0.18);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(22, 32, 51, 0.08);
  display: grid;
  gap: 10px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 66px;
  min-width: 0;
  padding: 0 16px;
  width: 100%;
}

.login-field__icon,
.login-password-toggle {
  align-items: center;
  color: #4b5563;
  display: inline-flex;
  justify-content: center;
}

.login-field__icon svg,
.login-password-toggle svg {
  height: 20px;
  width: 20px;
}

.login-field input {
  background: transparent;
  border: 0;
  color: #202938;
  font-size: 15px;
  height: 44px;
  min-width: 0;
  padding: 0;
}

.login-field:focus-within {
  border-color: rgba(6, 122, 58, 0.52);
  box-shadow: 0 0 0 1px rgba(6, 122, 58, 0.42), 0 10px 26px rgba(22, 32, 51, 0.08);
}

.login-field input:focus-visible {
  border: 0;
  box-shadow: none;
}

.login-field input::placeholder {
  color: #737b87;
}

.login-password-toggle {
  background: transparent;
  border: 0;
  border-radius: 6px;
  height: 34px;
  padding: 0;
  width: 34px;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  background: rgba(6, 122, 58, 0.09);
  color: #067a3a;
}

.login-form-options {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 13px;
  gap: 14px;
  justify-content: space-between;
  margin: 2px 0 6px;
}

.login-remember {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.login-remember input {
  accent-color: #067a3a;
  height: 16px;
  width: 16px;
}

.login-form-options button {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 0;
}

.login-error {
  background: rgba(255, 244, 244, 0.95);
  border: 1px solid #f3b6b6;
  border-radius: 8px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 12px;
}

.login-error strong,
.login-error span {
  display: block;
}

.login-error strong {
  font-size: 12px;
  margin-bottom: 3px;
}

.login-error--denied {
  background: rgba(255, 247, 237, 0.96);
  border-color: #fed7aa;
  color: #9a3412;
}

.login-push-panel {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(48, 56, 68, 0.18);
  border-radius: 8px;
  color: #202938;
  display: grid;
  gap: 12px;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 74px;
  padding: 12px 16px;
}

.login-push-panel > span {
  align-items: center;
  background: rgba(6, 122, 58, 0.11);
  border-radius: 8px;
  color: #067a3a;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.login-push-panel svg {
  height: 20px;
  width: 20px;
}

.login-push-panel strong,
.login-push-panel small {
  display: block;
  min-width: 0;
}

.login-push-panel strong {
  font-size: 14px;
}

.login-push-panel small {
  color: #4b5563;
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.login-terms-form {
  gap: 12px;
}

.login-terms-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(48, 56, 68, 0.18);
  border-radius: 8px;
  color: #202938;
  display: grid;
  gap: 9px;
  padding: 12px;
}

.login-terms-panel > strong {
  color: #0f5132;
  font-size: 13px;
  line-height: 1.35;
}

.login-terms-scroll {
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 6px;
  display: grid;
  gap: 9px;
  max-height: min(260px, 34vh);
  overflow: auto;
  padding: 10px;
}

.login-terms-scroll p {
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.login-terms-accept {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #143824;
  display: flex;
  gap: 9px;
  line-height: 1.35;
  padding: 10px 12px;
}

.login-terms-accept input {
  accent-color: #067a3a;
  flex: 0 0 auto;
  height: 16px;
  margin-top: 1px;
  width: 16px;
}

.login-terms-accept span {
  font-size: 12px;
  font-weight: 700;
}

.login-submit {
  align-items: center;
  background: linear-gradient(180deg, #0b944b, #067a3a);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  gap: 8px;
  height: 64px;
  justify-content: center;
  margin-top: 4px;
  width: 100%;
}

.login-submit:hover,
.login-submit:focus-visible {
  background: linear-gradient(180deg, #087f42, #056a34);
}

.login-submit svg {
  height: 18px;
  width: 18px;
}

.login-secondary-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.login-secondary-actions button {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  min-height: 42px;
  padding: 0 16px;
}

.login-secondary-actions button:hover,
.login-secondary-actions button:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.login-secondary-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.login-trust-strip {
  align-items: center;
  background: rgba(17, 90, 66, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: auto;
  min-height: 58px;
  padding: 0 18px;
  width: 100%;
}

.login-trust-strip span {
  align-items: center;
  display: inline-flex;
  gap: 9px;
  min-width: 0;
  white-space: nowrap;
}

.login-trust-strip svg {
  height: 22px;
  width: 22px;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: minmax(0, 560px);
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .login-brand-panel {
    gap: 18px;
  }

  .login-feature-row {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .login-ai-animation {
    height: 74px;
    margin-top: -8px;
    width: min(420px, 94%);
  }

  .login-card {
    min-height: 620px;
  }
}

@media (max-width: 560px) {
  .login-shell {
    display: block;
    gap: 22px;
    padding: 18px;
  }

  .login-brand-panel {
    display: none;
  }

  .login-hero-brand .airap-brand__word small {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .login-feature-row {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-feature-row svg {
    height: 28px;
    width: 28px;
  }

  .login-feature-row small {
    font-size: 11px;
  }

  .login-card {
    flex-direction: column;
    max-width: 100%;
    min-height: 600px;
    min-width: 0;
    padding: 20px;
    width: 100%;
  }

  .login-card__glass {
    max-width: none;
  }

  .login-card-brand {
    margin-bottom: 20px;
  }

  .login-card-brand .airap-brand__word small {
    letter-spacing: 1.4px;
    overflow-wrap: anywhere;
  }

  .login-card h1 {
    font-size: 24px;
  }

  .login-field {
    grid-template-columns: 24px minmax(0, 1fr) 34px;
    min-height: 58px;
  }

  .login-submit {
    height: 56px;
  }

  .login-form-options,
  .login-trust-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-trust-strip {
    gap: 8px;
    justify-content: center;
    padding: 12px 14px;
  }

  .login-trust-strip span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-ai-map-line,
  .login-ai-road-lane,
  .login-ai-pulse,
  .login-ai-spark,
  .login-ai-scan-zone,
  .login-shell::before {
    animation: none;
  }

  .login-ai-packet {
    display: none;
  }
}

.view-sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  align-content: start;
  gap: 2px;
  padding: 8px 0;
  top: var(--topbar-height);
  width: var(--sidebar-width);
}

.view-sidebar button {
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  color: #323130;
  align-content: start;
  height: 54px;
  max-height: 54px;
  min-height: 54px;
  padding: 7px 4px;
}

.view-sidebar button:hover,
.view-sidebar button:focus-visible {
  background: #f3f2f1;
  border-left-color: #a19f9d;
  color: var(--azure-blue-dark);
  box-shadow: none;
}

.view-sidebar button.active {
  background: #e6f4ed;
  border-left-color: var(--azure-blue);
  box-shadow: none;
  color: var(--azure-blue-dark);
}

.view-sidebar span {
  font-size: 11px;
  font-weight: 600;
}

.workspace,
.workspace-dashboard,
.workspace-grid,
.workspace-combined,
.workspace-logs,
.workspace-agents {
  background: var(--surface);
  height: calc(100vh - var(--topbar-height));
  margin-left: var(--sidebar-width);
  padding: 8px;
}

.workspace {
  height: calc(100% - var(--topbar-height));
}

.segment-browser,
.visual-workspace,
.coding-workbench,
.control-section,
.combined-panel,
.dashboard-hero,
.dashboard-panel,
.dashboard-kpi,
.dashboard-category-card,
.agents-toolbar,
.agent-manager,
.agent-list-panel,
.agent-editor-panel,
.agents-message,
.field-picker-modal,
.category-picker-card,
.field-library-group,
.image-count-control {
  border-color: var(--line);
  border-radius: 2px;
  box-shadow: none;
}

.summary-band,
.browser-search,
.selected-summary,
.analysis-actions,
.agent-picker,
.grid-controls,
.agents-toolbar {
  background: #fff;
}

.primary-button,
.secondary-button,
.difference-tools button,
.field-selector-actions button,
.category-picker-card button,
.field-library-group header button,
.field-picker-actions button,
.field-picker-footer button,
.primary-lite-button,
.quick-field-button,
.agent-list-panel button,
.agent-section-actions button,
.agents-toolbar__actions button {
  border-radius: 2px;
}

.primary-button,
.difference-tools button,
.field-selector-actions .primary-lite-button,
.agent-section-actions .primary-button,
.agents-toolbar__actions .primary-button {
  background: var(--azure-blue);
  border-color: var(--azure-blue);
  color: #fff;
}

.primary-button:hover,
.difference-tools button:hover,
.field-selector-actions .primary-lite-button:hover,
.agent-section-actions .primary-button:hover,
.agents-toolbar__actions .primary-button:hover {
  background: var(--azure-blue-dark);
  border-color: var(--azure-blue-dark);
  color: #fff;
}

.secondary-button,
.field-selector-actions button,
.category-picker-card button,
.field-library-group header button,
.field-picker-actions button,
.field-picker-footer button,
.agent-section-actions button,
.agents-toolbar__actions button {
  background: #fff;
  border-color: #8a8886;
  color: #323130;
}

.secondary-button:hover,
.field-selector-actions button:hover,
.category-picker-card button:hover,
.field-library-group header button:hover,
.field-picker-actions button:hover,
.field-picker-footer button:hover,
.agent-section-actions button:hover,
.agents-toolbar__actions button:hover {
  background: #f3f2f1;
  border-color: #605e5c;
  color: var(--azure-blue-dark);
}

.grid-controls,
.compact-grid .grid-controls {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  grid-template-areas: "fields";
  grid-template-columns: minmax(0, 1fr);
  max-height: none;
  overflow: visible;
  padding: 8px;
}

.grid-stats,
.display-options,
.difference-tools {
  display: none;
}

.field-selector {
  background: transparent;
  border: 0;
  grid-area: fields;
}

.field-selector-head {
  min-height: 32px;
}

.field-selector-actions button {
  height: 30px;
}

.metric-inline span,
.checkbox-label,
.field-chip,
.quick-field-button,
.agent-toggle,
.category-nav button,
.agent-list-title span,
.segment-change-pill,
.boundary-pill {
  border-radius: 2px;
}

.quick-field-button,
.field-chip,
.checkbox-label,
.metric-inline span {
  background: #fff;
  border-color: var(--line);
}

.quick-field-button:hover,
.field-chip:hover,
.quick-field-button.selected,
.field-chip.selected,
.agent-toggle.selected,
.category-nav button.active {
  background: var(--azure-blue-soft);
  border-color: #c7e0f4;
  color: var(--azure-blue-dark);
}

.fast-data-grid {
  background: #fff;
  border-top: 1px solid var(--line);
}

.fast-data-grid-header {
  background: var(--surface-strong);
}

.header-cell {
  background: var(--surface-strong);
  border-bottom: 1px solid #c8c6c4;
  color: #323130;
  font-size: 12px;
  letter-spacing: 0;
  min-height: 42px;
  text-transform: none;
}

.field-group-cell {
  background: var(--azure-blue);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.sub-header-cell {
  background: #faf9f8;
  color: var(--muted);
  min-height: 26px;
}

.body-row:hover .body-cell {
  background: #f8f8f8;
}

.body-row.has-ai-data .body-cell,
.body-row.has-ai-data:hover .body-cell {
  background: #fffdf7;
}

.body-row.active-row .body-cell,
.body-row.active-row:hover .body-cell,
.body-row.has-ai-data.active-row .body-cell,
.body-row.has-ai-data.active-row:hover .body-cell {
  background: var(--azure-blue-soft);
}

.body-row.active-row .body-cell.sticky-grid-col,
.body-row.active-row:hover .body-cell.sticky-grid-col,
.body-row.has-ai-data.active-row .body-cell.sticky-grid-col,
.body-row.has-ai-data.active-row:hover .body-cell.sticky-grid-col {
  background: #c7e0f4;
}

.data-grid-cell {
  border-bottom-color: #edebe9;
}

.segment-row,
.segment-card,
.pano-card,
.evidence-preview__side,
.marked-object-card {
  border-radius: 2px;
  box-shadow: none;
}

.dashboard-hero h2 svg,
.agents-toolbar h2 svg {
  color: var(--azure-blue);
}

.dashboard-kpi {
  background: #faf9f8;
}

.dashboard-kpis {
  gap: 8px;
}

.combined-resize-handle span {
  background: #8a8886;
}

.image-strip,
.combined-pano-panel .image-strip {
  background: #fff;
  border-top-color: var(--line);
}

.image-strip img,
.pano-card img,
.marked-object-card img {
  border-radius: 2px;
}

.progress-bar {
  border-radius: 2px;
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 70px;
  }

  .topbar {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
  }
}

/* Single segment view: all working surfaces live inside the AI runner */
.workspace {
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  height: calc(100vh - var(--topbar-height));
  min-height: 0;
  overflow: hidden;
}

.workspace .visual-workspace {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
}

.workspace .view-toolbar {
  min-height: 48px;
  padding: 8px 10px;
}

.workspace .evidence-stage {
  min-height: 0;
}

.workspace .pano-stage-layout {
  grid-template-columns: minmax(0, 1fr);
}

.workspace .pano-stage-main {
  min-height: 260px;
}

.workspace .pano-annotation-panel {
  display: none;
}

.workspace .image-strip {
  gap: 7px;
  grid-template-columns: minmax(0, 1fr);
  padding: 8px;
}

.workspace .image-strip__label {
  font-size: 12px;
}

@media (max-width: 1450px) {
  .workspace .pano-stage-layout {
    grid-template-columns: 1fr;
  }
}

.workspace .thumb {
  height: 58px;
  width: 96px;
}

.workspace .thumb span {
  bottom: 4px;
  font-size: 11px;
  height: 20px;
  left: 4px;
  line-height: 20px;
  width: 20px;
}

.agent-cockpit {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.agent-runner-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(430px, 1fr) minmax(290px, 0.58fr);
  min-height: 0;
  overflow: auto hidden;
}

.agent-runner-panel {
  background: #fff;
  border-left: 1px solid var(--line);
  display: grid;
  min-height: 0;
  min-width: 0;
}

.agent-runner-panel:first-child {
  border-left: 0;
}

.agent-runner-panel--visual {
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.agent-runner-panel--visual .visual-workspace {
  border: 0;
  border-radius: 0;
  height: 100%;
}

.agent-runner-panel--setup {
  align-content: start;
  overflow: auto;
}

.agent-runner-panel--output {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.agent-runner-panel--logs {
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.runner-toolbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 42px;
  padding: 6px 12px;
}

.runner-toolbar__title {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  min-width: 0;
}

.runner-toolbar__buttons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.runner-toolbar__buttons button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
}

.runner-toolbar__buttons button.active {
  background: var(--azure-blue-soft);
  border-color: #c7e0f4;
  color: var(--azure-blue-dark);
  font-weight: 700;
}

.runner-toolbar__buttons button:disabled {
  opacity: 0.5;
}

.runner-resize-handle {
  align-items: stretch;
  background: #f3f2f1;
  cursor: col-resize;
  display: flex;
  justify-content: center;
  min-height: 0;
  outline: none;
  width: 8px;
}

.runner-resize-handle span {
  background: #a19f9d;
  display: block;
  margin: 8px 0;
  width: 2px;
}

.runner-resize-handle:hover span,
.runner-resize-handle:focus-visible span,
.agent-runner-grid.is-resizing .runner-resize-handle span {
  background: var(--azure-blue);
  width: 3px;
}

body.is-resizing-runner {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-runner iframe,
body.is-resizing-runner .leaflet-map,
body.is-resizing-runner .pano-viewer-shell {
  pointer-events: none;
}

.agent-panel-header {
  align-items: center;
  background: #faf9f8;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 12px;
}

.agent-panel-header span {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  min-width: 0;
}

.agent-panel-header em {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
}

.single-run-actions {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  padding: 12px;
}

.selected-run-target {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.selected-run-target span {
  color: var(--muted);
  font-size: 11px;
}

.selected-run-target strong {
  font-size: 15px;
  line-height: 1.25;
}

.selected-run-target small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.single-run-actions button {
  width: 100%;
}

.agent-param-grid {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.agent-param-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agent-param-grid span {
  color: var(--muted);
  font-size: 11px;
}

.agent-param-grid select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.agent-runner-model-field {
  grid-column: 1 / -1;
}

.agent-runner-field-prompt-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex !important;
  gap: 8px;
  grid-column: 1 / -1;
  min-height: 34px;
  padding: 6px 8px;
}

.agent-runner-field-prompt-toggle.active {
  background: #eef2ff;
  border-color: #a5b4fc;
}

.agent-runner-field-prompt-toggle input {
  height: 16px;
  width: 16px;
}

.agent-runner-field-prompt-toggle span {
  color: #312e81;
  font-weight: 800;
}

.agent-runner-panel--setup .agent-picker,
.agent-runner-panel--setup .batch-panel {
  padding: 12px;
}

.agent-runner-panel--setup .batch-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-runner-panel--setup .batch-range-field,
.agent-runner-panel--setup .batch-controls button {
  grid-column: 1 / -1;
}

.batch-range-input-row {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 34px;
}

.batch-range-input-row .icon-action {
  height: 34px;
  width: 34px;
}

.agent-runner-panel--setup .batch-range-input-row .icon-action {
  grid-column: auto;
}

.agent-message-line {
  border-bottom: 0;
  min-height: 38px;
  padding: 8px 12px;
  white-space: normal;
}

.agent-runner-panel--output .agent-summary-panel,
.agent-runner-panel--output .category-nav {
  padding-left: 12px;
  padding-right: 12px;
}

.agent-runner-panel--output .field-groups {
  padding: 10px;
}

.run-log-actions {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.run-log-actions .icon-action {
  height: 28px;
  width: 30px;
}

.run-log-list {
  align-content: start;
  background: #f8fafc;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
}

.run-log-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  justify-content: center;
  min-height: 110px;
  text-align: center;
}

.run-log-entry {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid #f59e0b;
  min-width: 0;
}

.run-log-entry.success {
  border-left-color: #107c10;
}

.run-log-entry.error {
  border-left-color: #a4262c;
}

.run-log-summary {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: grid;
  gap: 7px;
  grid-template-columns: 20px minmax(0, 1fr) auto auto 18px;
  min-height: 44px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.run-log-status {
  display: inline-flex;
}

.run-log-entry.success .run-log-status {
  color: #107c10;
}

.run-log-entry.error .run-log-status {
  color: #a4262c;
}

.run-log-summary strong,
.run-log-summary small,
.run-log-summary em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-log-summary strong {
  font-size: 12px;
}

.run-log-summary small,
.run-log-summary em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.run-log-detail {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 8px;
}

.run-log-detail div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.run-log-detail div span {
  color: var(--muted);
  font-size: 11px;
}

.run-log-detail div strong {
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-log-detail p {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.run-log-detail ul {
  display: grid;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.run-log-detail li {
  background: #faf9f8;
  border: 1px solid #edebe9;
  display: grid;
  gap: 2px;
  padding: 6px;
}

.run-log-detail li strong {
  color: var(--azure-blue-dark);
  font-size: 11px;
}

.run-log-detail li span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

@media (max-width: 1700px) {
  .agent-runner-grid {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(210px, 0.42fr);
  }

  .agent-runner-panel--logs {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-column: 1 / -1;
  }

  .run-log-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(270px, 320px);
    overflow-x: auto;
    overflow-y: hidden;
  }
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: auto;
  }

  .agent-runner-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(420px, 1fr) minmax(220px, auto);
    overflow: visible;
  }

  .agent-runner-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .agent-runner-panel:first-child {
    border-top: 0;
  }
}

@media (max-width: 1700px) and (min-width: 1181px) {
  .agent-runner-grid {
    grid-template-rows: minmax(0, 1fr);
  }

  .agent-runner-panel--logs {
    border-left: 1px solid var(--line);
    border-top: 0;
    grid-column: auto;
  }

  .run-log-list {
    grid-auto-flow: row;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

/* Dashboard redesign */
.workspace-dashboard {
  background: #f8fafc;
  color: #0f172a;
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: calc(100vh - var(--topbar-height));
  margin-left: var(--sidebar-width);
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.workspace-dashboard .dashboard-hero {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 42px;
  padding: 0 2px;
}

.workspace-dashboard .dashboard-hero h2 {
  color: #111827;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
}

.workspace-dashboard .dashboard-hero h2 svg {
  color: #159447;
  height: 24px;
  width: 24px;
}

.workspace-dashboard .dashboard-hero p {
  color: #475569;
  font-size: 13px;
  margin-top: 6px;
}

.workspace-dashboard .dashboard-scope {
  align-items: center;
  color: #475569;
  flex-direction: row;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  white-space: nowrap;
}

.workspace-dashboard .dashboard-scope svg {
  height: 14px;
  width: 14px;
}

.workspace-dashboard .dashboard-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.workspace-dashboard .dashboard-kpi {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe6ef;
  border-left: 1px solid #dfe6ef;
  border-radius: 8px;
  box-shadow: none;
  display: grid;
  gap: 12px;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 94px;
  padding: 14px;
}

.dashboard-kpi-icon {
  align-items: center;
  background: #eef2f7;
  border-radius: 999px;
  color: #159447;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.dashboard-kpi-icon svg {
  height: 23px;
  width: 23px;
}

.dashboard-kpi.changed .dashboard-kpi-icon {
  background: #fff2e8;
  color: #ea6f0b;
}

.dashboard-kpi.waiting .dashboard-kpi-icon {
  background: #f1f5f9;
  color: #64748b;
}

.dashboard-kpi.complete .dashboard-kpi-icon,
.dashboard-kpi.active .dashboard-kpi-icon {
  background: #e7f7ee;
  color: #159447;
}

.workspace-dashboard .dashboard-kpi span:not(.dashboard-kpi-icon) {
  color: #334155;
  display: block;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.workspace-dashboard .dashboard-kpi strong {
  color: #0f172a;
  display: block;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.05;
  margin-top: 5px;
}

.workspace-dashboard .dashboard-kpi.changed strong,
.workspace-dashboard .dashboard-kpi.changed .dashboard-kpi-percent-pair span {
  color: #ea6f0b;
}

.workspace-dashboard .dashboard-kpi.complete strong,
.workspace-dashboard .dashboard-kpi.complete .dashboard-kpi-percent-pair span {
  color: #159447;
}

.workspace-dashboard .dashboard-kpi strong.dashboard-kpi-percent-pair {
  gap: 4px;
}

.workspace-dashboard .dashboard-kpi strong.dashboard-kpi-percent-pair span {
  color: #0f172a;
  font-size: 28px;
  font-weight: 850;
}

.workspace-dashboard .dashboard-kpi strong.dashboard-kpi-percent-pair em {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.workspace-dashboard .dashboard-kpi small {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-top: 4px;
}

.dashboard-content-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 300px);
  min-height: 0;
}

.workspace-dashboard .dashboard-panel {
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  box-shadow: none;
  min-height: 0;
}

.workspace-dashboard .dashboard-panel header {
  border-bottom: 1px solid #dfe6ef;
  min-height: 56px;
  padding: 11px 14px;
}

.workspace-dashboard .dashboard-panel h3 {
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
}

.workspace-dashboard .dashboard-panel header span {
  color: #475569;
  font-size: 12px;
}

.workspace-dashboard .control-dashboard-toolbar {
  gap: 10px;
}

.workspace-dashboard .control-dashboard-sort button,
.workspace-dashboard .control-dashboard-collapse-actions button {
  border-radius: 6px;
  font-size: 12px;
  height: 30px;
}

.workspace-dashboard .control-dashboard-sort button.active {
  background: #159447;
  border-color: #159447;
}

.workspace-dashboard .control-dashboard-legend {
  gap: 16px;
}

.workspace-dashboard .control-dashboard-legend span {
  background: transparent;
  border: 0;
  color: #334155;
  height: auto;
  padding: 0;
}

.workspace-dashboard .control-dashboard-legend i {
  height: 12px;
  width: 12px;
}

.workspace-dashboard .control-dashboard-legend i.same {
  background: #159447;
}

.workspace-dashboard .control-dashboard-legend i.changed {
  background: #e8750a;
}

.workspace-dashboard .control-dashboard-legend i.missing {
  background: #98a2b3;
}

.workspace-dashboard .control-dashboard-legend i.external {
  background: #1d4ed8;
}

.workspace-dashboard .control-tree {
  overflow: auto;
  padding: 0 14px 14px;
}

.control-tree-header,
.workspace-dashboard .control-tree-category-head,
.workspace-dashboard .control-tree-field-row {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 320px) minmax(520px, 1fr);
  min-width: 880px;
}

.control-tree-header {
  align-items: center;
  border-bottom: 1px solid #dfe6ef;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  min-height: 42px;
  padding: 0 8px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
}

.control-tree-header span:first-child {
  padding-left: 36px;
}

.workspace-dashboard .control-tree-category {
  margin-bottom: 0;
}

.workspace-dashboard .control-tree-category-head {
  align-items: center;
  background: #f8fafc;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  border-left: 0;
  grid-template-columns: 28px minmax(220px, 292px) minmax(520px, 1fr);
  min-height: 42px;
  padding: 6px 8px;
}

.workspace-dashboard .control-tree-toggle {
  border-color: #dfe6ef;
  border-radius: 4px;
  height: 22px;
  width: 22px;
}

.workspace-dashboard .control-tree-node-label {
  gap: 9px;
}

.workspace-dashboard .control-tree-node-label strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
}

.workspace-dashboard .control-tree-node-label small {
  color: #64748b;
}

.workspace-dashboard .control-tree-dot {
  border: 0;
  box-shadow: none;
  height: 12px;
  width: 16px;
}

.workspace-dashboard .control-tree-fields {
  border-left: 1px solid #d9e1eb;
  margin-left: 31px;
  padding: 0 0 0 22px;
}

.workspace-dashboard .control-tree-field-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #edf2f7;
  grid-template-columns: minmax(250px, 300px) minmax(520px, 1fr);
  min-height: 32px;
  padding: 4px 8px 4px 0;
  position: relative;
}

.workspace-dashboard .control-tree-field-row::before {
  background: #d9e1eb;
  left: -22px;
  width: 16px;
}

.workspace-dashboard .control-tree-field-code {
  background: #eaf1ff;
  border: 0;
  border-radius: 4px;
  color: #2563eb;
  flex-basis: 42px;
  font-size: 11px;
  height: 22px;
}

.workspace-dashboard .control-stack {
  gap: 0;
}

.workspace-dashboard .control-stack-bar {
  background: #e7ebf0;
  border: 0;
  border-radius: 0;
  height: 22px;
}

.workspace-dashboard .control-stack.compact .control-stack-bar {
  height: 22px;
}

.workspace-dashboard .control-stack-part {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 11px;
  font-weight: 850;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 0 3px;
  white-space: nowrap;
}

.workspace-dashboard .control-stack-part b {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-dashboard .control-stack-part b em {
  color: inherit;
  font-style: normal;
  opacity: 0.92;
}

.workspace-dashboard .control-stack-part.same {
  background: #159447;
}

.workspace-dashboard .control-stack-part.changed {
  background: #e8750a;
}

.workspace-dashboard .control-stack-part.missing {
  background: #98a2b3;
}

.workspace-dashboard .control-stack-part.external {
  background: #1d4ed8;
}

.dashboard-review-panel {
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto auto;
  overflow: hidden;
}

.dashboard-review-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.dashboard-review-item {
  align-items: center;
  background: transparent;
  border: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  padding: 0;
  text-align: left;
}

.dashboard-review-rank {
  align-items: center;
  background: #fff0e8;
  border-radius: 999px;
  color: #f07b25;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.dashboard-review-text {
  min-width: 0;
}

.dashboard-review-text strong,
.dashboard-review-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-review-text strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-review-text small {
  color: #64748b;
  font-size: 11px;
  margin-top: 2px;
}

.dashboard-review-item em {
  background: #ffe7d7;
  border-radius: 7px;
  color: #e36508;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  padding: 5px 7px;
  white-space: nowrap;
}

.dashboard-review-item:hover .dashboard-review-text strong,
.dashboard-review-item:focus-visible .dashboard-review-text strong {
  color: #137544;
}

.dashboard-quick-insight {
  border-top: 1px solid #dfe6ef;
  margin: 2px 14px 0;
  padding: 16px 0;
}

.dashboard-quick-insight h4 {
  align-items: center;
  color: #0f172a;
  display: flex;
  font-size: 13px;
  gap: 7px;
  margin: 0 0 10px;
}

.dashboard-quick-insight h4 svg {
  color: #159447;
  height: 16px;
  width: 16px;
}

.dashboard-quick-insight ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dashboard-quick-insight li {
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  padding-left: 14px;
  position: relative;
}

.dashboard-quick-insight li::before {
  background: #159447;
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 7px;
  width: 5px;
}

.dashboard-view-all-button {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 7px;
  color: #334155;
  display: flex;
  font-size: 12px;
  font-weight: 850;
  gap: 7px;
  height: 38px;
  justify-content: center;
  margin: 0 14px 14px;
}

.dashboard-view-all-button svg {
  height: 14px;
  width: 14px;
}

@media (max-width: 1180px) {
  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }

  .workspace-dashboard .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}

@media (max-width: 760px) {
  .workspace-dashboard {
    height: auto;
    min-height: calc(100vh - var(--topbar-height));
  }

  .workspace-dashboard .dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .workspace-dashboard .dashboard-panel header {
    align-items: flex-start;
    flex-direction: column;
  }
}
