:root {
  --analysis-panel-width: 390px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1116;
  color: #edf3f7;
}

* { box-sizing: border-box; }

html, body, #ortho-viewer, #map {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body, #map { background: #0b1116; }
body[data-product="carina-orto"] { --analysis-panel-width: 520px; }

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.ortho-toolbar,
.ortho-status,
.ortho-summary,
.ortho-help {
  position: absolute;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 17, 23, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.ortho-toolbar {
  top: 16px;
  left: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
}

.workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 9px 5px 6px;
  border-color: rgba(93, 222, 191, 0.28);
  background: linear-gradient(135deg, rgba(14, 41, 50, 0.95), rgba(10, 22, 29, 0.94));
  font-weight: 760;
  letter-spacing: -0.01em;
}
.workspace-brand img {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}
.workspace-brand small {
  padding: 2px 5px;
  border: 1px solid rgba(93, 222, 191, 0.25);
  border-radius: 999px;
  color: #95e8cf;
  font-size: 9px;
  font-weight: 700;
}

.workspace-primary-actions { display: flex; align-items: center; gap: 7px; }
.labeled-action,
.interop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 760;
}
.labeled-action svg,
.interop-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.volume-action {
  border-color: rgba(255, 199, 103, 0.48);
  background: linear-gradient(145deg, rgba(128, 84, 25, 0.9), rgba(75, 47, 13, 0.92));
  color: #ffe0a3;
}
.model-action {
  border-color: rgba(93, 222, 191, 0.48);
  background: linear-gradient(145deg, rgba(24, 101, 91, 0.92), rgba(12, 59, 58, 0.94));
  color: #b4f7e5;
}

.ortho-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 14px;
}

button,
.view-link,
select,
input[type="text"],
input[type="number"],
textarea {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

button:hover, .view-link:hover { background: rgba(255, 255, 255, 0.14); }
button:focus-visible, .view-link:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #7ec8ff; outline-offset: 2px; }
select { padding: 6px 8px; }
input[type="text"], input[type="number"], textarea {
  width: 100%;
  padding: 6px 8px;
  cursor: text;
}
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
input[type="color"] { width: 38px; height: 30px; padding: 2px; border: 0; background: transparent; }
input[type="range"] { width: 120px; accent-color: #7ec8ff; }

.ortho-status {
  left: 16px;
  bottom: 52px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.ortho-summary {
  right: 16px;
  top: 16px;
  display: grid;
  gap: 3px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.ortho-summary span { color: #ffd181; }

.analysis-panel {
  position: absolute;
  z-index: 1000;
  top: 78px;
  right: 16px;
  width: min(var(--analysis-panel-width), calc(100% - 32px));
  max-height: calc(100% - 150px);
  overflow-x: clip;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(10, 17, 23, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: width 160ms ease, max-height 160ms ease, padding 160ms ease;
}

.analysis-panel-toggle {
  position: sticky;
  z-index: 4;
  top: 0;
  float: right;
  margin: 0 0 8px 10px;
  background: rgba(25, 39, 49, 0.96);
}

.analysis-panel-toggle svg { transition: transform 160ms ease; }
.analysis-panel-content { min-width: 0; }

.analysis-section {
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid rgba(176, 207, 220, 0.12);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(20, 34, 43, 0.72), rgba(10, 20, 27, 0.72));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}
.analysis-section:last-of-type { margin-bottom: 0; }
.volume-section { border-color: rgba(255, 199, 103, 0.22); }
.volume-primary-action {
  display: inline-flex;
  width: auto;
  min-width: 152px;
  padding: 0 13px;
  gap: 8px;
}
.volume-primary-action .visible-action-label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 760;
}

.analysis-panel.is-collapsed {
  width: 48px;
  max-height: 48px;
  padding: 6px;
  overflow: visible;
}

.analysis-panel.is-collapsed .analysis-panel-toggle {
  position: static;
  float: none;
  margin: 0;
}

.analysis-panel.is-collapsed .analysis-panel-toggle svg { transform: rotate(180deg); }

.quick-volume-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.quick-volume-settings > label {
  display: grid;
  gap: 4px;
  color: #b8c4cc;
  font-size: 11px;
}

.quick-volume-settings > .quick-setting-wide {
  grid-column: 1 / -1;
}

.quick-auto-report {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 24px;
  color: #d6e3e9 !important;
}

.stockpile-register {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 9px;
  border: 1px solid rgba(78, 219, 178, 0.22);
  border-radius: 11px;
  background: rgba(4, 14, 19, 0.42);
}
.stockpile-register-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.stockpile-register-header > div { display: grid; gap: 2px; min-width: 0; }
.stockpile-register-header strong { color: #eafbf6; font-size: 12px; }
.stockpile-register-header span { color: #8fa8b1; font-size: 9px; line-height: 1.3; }
.stockpile-register-header output {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #bff9e8;
  background: rgba(78, 219, 178, 0.13);
  font-size: 12px;
  font-weight: 800;
}
.stockpile-list {
  display: grid;
  gap: 5px;
  max-height: 190px;
  overflow: auto;
  scrollbar-width: thin;
}
.stockpile-empty { margin: 2px 0; color: #78909a; font-size: 10px; }
.stockpile-card {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 9px;
  color: #d8e7ec;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}
.stockpile-card:hover { border-color: rgba(78, 219, 178, 0.33); background: rgba(78, 219, 178, 0.07); }
.stockpile-card.is-selected {
  border-color: #4edbb2;
  background: linear-gradient(90deg, rgba(78, 219, 178, 0.16), rgba(78, 219, 178, 0.04));
  box-shadow: inset 3px 0 #4edbb2;
}
.stockpile-card-dot { width: 8px; height: 8px; border-radius: 50%; background: #4edbb2; box-shadow: 0 0 0 3px rgba(78, 219, 178, 0.10); }
.stockpile-card-copy { display: grid; gap: 2px; min-width: 0; }
.stockpile-card-copy strong { overflow: hidden; color: #eefaf7; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.stockpile-card-copy small { color: #8ca2ac; font-size: 9px; }
.stockpile-card-value { color: #baf8e5; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stockpile-card:not(.is-calculated) .stockpile-card-value { color: #869ca5; font-size: 9px; font-weight: 650; }
.stockpile-export-actions { min-height: 34px; margin-top: 1px; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.stockpile-export-actions > span { margin-right: auto; color: #8fa6af; font-size: 9px; }
.stockpile-export-actions .icon-button { width: 31px; height: 31px; min-height: 31px; }
.stockpile-register-deliverables {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 37px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.stockpile-register-deliverables > span { color: #b9d1d8; font-size: 9px; font-weight: 700; }
.stockpile-deliverable-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(127, 162, 176, 0.30);
  border-radius: 8px;
  color: #dcebef;
  background: rgba(255, 255, 255, 0.045);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}
.stockpile-deliverable-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.stockpile-deliverable-button.primary { border-color: rgba(78, 219, 178, 0.36); color: #c8ffef; background: rgba(78, 219, 178, 0.12); }
.stockpile-deliverable-button:hover:not(:disabled) { border-color: #4edbb2; background: rgba(78, 219, 178, 0.18); }
.stockpile-deliverable-button:disabled { opacity: .38; cursor: not-allowed; }

.legacy-natural-surface[hidden] { display: none !important; }

.volume-viewer-modal,
.photogrammetric-control-modal {
  position: absolute;
  z-index: 4000;
  inset: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(126, 200, 255, 0.28);
  border-radius: 14px;
  background: #071016;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
}

.volume-viewer-modal[hidden],
.photogrammetric-control-modal[hidden] { display: none !important; }
.volume-viewer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 9px 12px 9px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(90deg, rgba(20, 43, 55, 0.98), rgba(8, 19, 26, 0.98));
}
.volume-viewer-modal-header div { display: grid; gap: 2px; }
.volume-viewer-modal-header strong { color: #eef7fa; font-size: 14px; }
.volume-viewer-modal-header span { color: #9fb4be; font-size: 11px; }
#volume-viewer-frame,
#stockpile-register-report-frame,
#photogrammetric-report-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: #071016; }
#surface-viewer-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: #071016; }
body.volume-viewer-open { overflow: hidden; }

.photogrammetric-control-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(520px, 1.6fr);
  gap: 12px;
  min-height: 0;
  padding: 12px;
  overflow: auto;
}
.photogrammetric-flight-card,
.photogrammetric-surface-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(145, 188, 204, 0.18);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(16, 31, 39, 0.94), rgba(7, 18, 24, 0.94));
}
.photogrammetric-qc-summary { display: grid; gap: 8px; margin-top: 10px; }
.photogrammetric-qc-group { display: grid; gap: 6px; padding: 9px; border: 1px solid rgba(145, 188, 204, 0.14); border-radius: 9px; }
.photogrammetric-qc-group > strong { color: #bfe9dd; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.photogrammetric-qc-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin: 0; }
.photogrammetric-qc-metrics div { min-width: 0; padding: 5px 6px; border-radius: 6px; background: rgba(255,255,255,.035); }
.photogrammetric-qc-metrics dt { overflow: hidden; color: #8199a3; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.photogrammetric-qc-metrics dd { overflow-wrap: anywhere; margin: 2px 0 0; color: #e6f4f4; font-size: 11px; font-variant-numeric: tabular-nums; }
.photogrammetric-qc-warning { margin: 0; padding: 7px 8px; border-left: 3px solid #dca244; color: #ddc99f; background: rgba(220,162,68,.07); font-size: 9px; }
.photogrammetric-limitation { margin: 9px 0 0; color: #9fb2ba; font-size: 9px; line-height: 1.45; }
.photogrammetric-control-marker { border: 1px solid rgba(255,255,255,.28); border-radius: 4px; background: rgba(7,18,24,.92); color: #eaf8f6; box-shadow: none; font-size: 9px; font-weight: 800; }

.interop-products {
  display: grid;
  gap: 8px;
}
.interop-product {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}
.interop-product.is-native { border-color: rgba(93, 222, 191, 0.24); }
.interop-product-heading { display: grid; gap: 1px; min-width: 0; }
.interop-product-heading strong { font-size: 12px; }
.interop-product-heading span { color: #93a7b1; font-size: 9px; }
.interop-button {
  min-height: 32px;
  padding: 5px 9px;
  border-color: rgba(93, 222, 191, 0.30);
  color: #c7f7ea;
  font-size: 10px;
}
.interop-button.secondary { border-color: rgba(126, 200, 255, 0.22); color: #c7eaff; }
.interop-button svg { width: 15px; height: 15px; }
.interop-secondary-actions { margin-top: 9px; }

.profile-result {
  position: absolute;
  z-index: 1150;
  left: 50%;
  bottom: 38px;
  width: min(760px, calc(100% - 32px));
  overflow: hidden;
  border: 1px solid rgba(88, 199, 255, 0.34);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(14, 28, 37, 0.98), rgba(5, 12, 18, 0.97));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.05);
  transform: translateX(-50%);
  backdrop-filter: blur(14px) saturate(1.1);
}
.profile-result[hidden] { display: none; }
.profile-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(90deg, rgba(29, 83, 105, 0.38), transparent 78%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.profile-result.is-dragging .profile-result-header { cursor: grabbing; }
.profile-result-header .icon-button { cursor: pointer; touch-action: auto; }
.profile-result-header > div { display: grid; gap: 2px; min-width: 0; }
.profile-result-header strong { color: #f1f9fc; font-size: 14px; }
.profile-result-header span { color: #a9bec8; font-size: 10px; line-height: 1.3; }
.profile-chart-shell { padding: 8px 10px 0; }
.profile-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 190px;
  border-radius: 9px;
  outline: none;
  background: radial-gradient(circle at 50% 0, rgba(38, 97, 120, 0.22), rgba(3, 9, 14, 0.52));
  cursor: crosshair;
}
.profile-chart:focus-visible { box-shadow: 0 0 0 2px #6bd7ff; }
.profile-chart-grid { stroke: rgba(185, 211, 222, 0.17); stroke-width: 1; vector-effect: non-scaling-stroke; }
.profile-chart-label { fill: #9db2bc; font-size: 10px; font-variant-numeric: tabular-nums; }
.profile-chart-axis-title { fill: #c7d6dc; font-size: 10px; font-weight: 600; letter-spacing: 0.02em; }
.profile-chart-area { fill: rgba(49, 181, 224, 0.18); }
.profile-chart-line { fill: none; stroke: #65dbff; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.profile-chart-cursor-line { stroke: #ffe08a; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.profile-chart-cursor-point { fill: #071016; stroke: #ffe08a; stroke-width: 3; vector-effect: non-scaling-stroke; }
.profile-chart-readout {
  min-height: 16px;
  margin: 2px 14px 8px;
  color: #dcf2f8;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.profile-result-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
}
.profile-result-metrics > div { padding: 8px 10px; background: rgba(5, 13, 19, 0.93); }
.profile-result-metrics dt { color: #93a8b2; font-size: 9px; }
.profile-result-metrics dd { margin: 3px 0 0; color: #f2f8fa; font-size: 12px; font-variant-numeric: tabular-nums; }
.profile-map-label {
  border: 1px solid rgba(255, 224, 138, 0.78) !important;
  border-radius: 7px !important;
  background: rgba(7, 16, 22, 0.94) !important;
  color: #ffe08a !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
.leaflet-tooltip-top.profile-map-label::before { border-top-color: rgba(255, 224, 138, 0.78) !important; }

.cad-panel {
  position: absolute;
  z-index: 1000;
  top: 78px;
  left: 16px;
  width: min(370px, calc(100% - 32px));
  max-height: calc(100% - 150px);
  overflow-x: clip;
  overflow-y: auto;
  border: 1px solid rgba(126, 200, 255, 0.16);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(17, 29, 38, 0.96), rgba(8, 14, 20, 0.95));
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.035);
}

.cad-panel details + details { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.cad-panel summary {
  padding: 9px 12px;
  cursor: pointer;
  color: #e7f2f7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.015em;
  user-select: none;
}
.cad-panel details[open] > summary {
  background: linear-gradient(90deg, rgba(88, 199, 255, 0.1), transparent 72%);
  color: #f2f9fc;
}
.tool-section { padding: 2px 12px 12px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.field-grid > label { display: grid; gap: 4px; color: #b8c4cc; font-size: 11px; }
.wide-field { grid-column: 1 / -1; }
.topo-preset-palette {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.topo-preset-palette button {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 42px;
  padding: 5px 7px;
  border: 1px solid rgba(174, 199, 214, 0.18);
  border-radius: 9px;
  background: linear-gradient(155deg, rgba(42, 56, 66, 0.78), rgba(18, 27, 34, 0.84));
  color: #e2edf1;
  font: inherit;
  font-size: 10px;
  font-weight: 720;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.topo-preset-palette button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topo-preset-palette button:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 200, 255, 0.56);
  background: linear-gradient(155deg, rgba(51, 77, 90, 0.92), rgba(23, 39, 48, 0.94));
}
.topo-preset-palette button.active,
.topo-preset-palette button[aria-pressed="true"] {
  border-color: #61d9bc;
  background: linear-gradient(155deg, rgba(24, 96, 88, 0.94), rgba(11, 54, 53, 0.96));
  color: #bdfff0;
  box-shadow: 0 0 0 2px rgba(74, 220, 184, 0.10);
}
.active-topo-preset {
  min-height: 31px;
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(93, 222, 191, 0.16);
  border-radius: 8px;
  background: rgba(15, 48, 48, 0.30);
  color: #b9d5d2;
  font-size: 10px;
  line-height: 1.4;
}
.active-topo-preset strong { color: #e7fff8; }
.compact-topo-actions { justify-content: flex-start; margin-top: 7px; padding: 4px; }
.advanced-drawing-tools {
  margin-top: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(3, 9, 14, 0.28);
}
.advanced-drawing-tools > summary { padding: 7px 9px; color: #9fb1ba; font-size: 10px; }
.advanced-drawing-content { display: grid; gap: 7px; padding: 0 8px 8px; }
.advanced-drawing-content .topo-icon-group { padding-top: 2px; }
.export-layer-filter {
  margin: 9px 0 8px;
  padding: 7px 8px 8px;
  border: 1px solid rgba(126, 200, 255, 0.15);
  border-radius: 8px;
  background: rgba(4, 12, 17, 0.36);
}
.export-layer-filter legend { padding: 0 5px; color: #9db0ba; font-size: 10px; }
.export-all-layers { display: inline-flex; align-items: center; gap: 5px; color: #e5f2f5; font-size: 10px; font-weight: 700; }
.export-layer-options { display: grid; gap: 4px; margin-top: 6px; color: #92a7b0; font-size: 9px; }
.export-layer-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.export-layer-options label span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.export-layer-count { color: #73909c; font-variant-numeric: tabular-nums; }
.topo-icon-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 10px;
  background: rgba(3, 9, 14, 0.48);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}
.compact-icon-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}
.compact-action-divider {
  align-self: stretch;
  width: 1px;
  min-height: 28px;
  margin: 4px 2px;
  background: linear-gradient(transparent, rgba(159, 185, 201, 0.28), transparent);
}
.topo-icon-group {
  display: flex;
  align-items: center;
  gap: 5px;
}
.topo-toolbar-divider {
  align-self: stretch;
  width: 1px;
  min-height: 24px;
  background: linear-gradient(transparent, rgba(159, 185, 201, 0.3), transparent);
}
.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border-color: rgba(174, 199, 214, 0.2);
  border-radius: 9px;
  background: linear-gradient(155deg, rgba(45, 58, 68, 0.72), rgba(22, 30, 37, 0.76));
  color: #dce8ee;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.065), 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.icon-button svg {
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#stop-drawing svg rect { fill: currentColor; stroke: none; }
.icon-button:not(:disabled):hover {
  z-index: 12;
  transform: translateY(-1px);
  border-color: rgba(126, 200, 255, 0.54);
  background: linear-gradient(155deg, rgba(54, 76, 90, 0.86), rgba(25, 38, 47, 0.9));
  color: #f4fbff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09), 0 7px 16px rgba(0, 0, 0, 0.27);
}
.icon-button.active {
  border-color: #63d9f5;
  background: linear-gradient(155deg, rgba(28, 99, 120, 0.95), rgba(15, 56, 71, 0.96));
  color: #a9efff;
  box-shadow: inset 0 0 0 1px rgba(169, 239, 255, 0.12), 0 0 0 2px rgba(74, 209, 240, 0.08), 0 7px 17px rgba(0, 0, 0, 0.25);
}
.primary-icon-button:not(:disabled) {
  border-color: rgba(79, 186, 219, 0.48);
  background: linear-gradient(155deg, rgba(28, 91, 113, 0.9), rgba(16, 52, 67, 0.92));
  color: #a8edff;
}
.primary-icon-button:not(:disabled):hover {
  border-color: #63d9f5;
  background: linear-gradient(155deg, rgba(35, 112, 137, 0.96), rgba(17, 63, 80, 0.97));
  color: #e6fbff;
}
.toolbar-icon-button {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 8px;
}
.toolbar-icon-button svg { width: 18px; height: 18px; }
.danger-button:not(:disabled):hover {
  border-color: rgba(255, 124, 99, 0.65);
  background: linear-gradient(155deg, rgba(111, 51, 44, 0.92), rgba(66, 30, 28, 0.94));
  color: #ff9a84;
}
.icon-button::after {
  position: absolute;
  z-index: 1000;
  top: auto;
  bottom: calc(100% + 9px);
  left: 50%;
  padding: 5px 7px;
  border: 1px solid rgba(126, 200, 255, 0.28);
  border-radius: 6px;
  background: rgba(8, 16, 22, 0.97);
  color: #edf7fb;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.35);
  content: attr(data-tooltip);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 120ms ease, transform 120ms ease;
}
.icon-button:hover::after,
.icon-button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.ortho-toolbar .icon-button::after,
.analysis-panel-toggle::after,
#close-volume-viewer::after,
#close-surface-viewer::after,
#close-profile-result::after {
  top: calc(100% + 8px);
  bottom: auto;
  transform: translate(-50%, -4px);
}
.ortho-toolbar .icon-button:hover::after,
.ortho-toolbar .icon-button:focus-visible::after,
.analysis-panel-toggle:hover::after,
.analysis-panel-toggle:focus-visible::after,
#close-volume-viewer:hover::after,
#close-volume-viewer:focus-visible::after,
#close-surface-viewer:hover::after,
#close-surface-viewer:focus-visible::after,
#close-profile-result:hover::after,
#close-profile-result:focus-visible::after {
  transform: translate(-50%, 0);
}
.point-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 9px;
}
.point-code-row > label:first-child {
  display: grid;
  gap: 4px;
  color: #b8c4cc;
  font-size: 11px;
}
.auto-code-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  color: #cbd6dc;
  font-size: 11px;
  white-space: nowrap;
}
.inline-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 9px 0 0;
  padding: 6px 8px 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  color: #b8c4cc;
  font-size: 11px;
}
.inline-options legend { padding: 0 5px; }
.inline-options label { display: inline-flex; align-items: center; gap: 4px; }
.inline-options input[type="number"] { width: 62px; }
.panel-message { margin: 8px 0 0; color: #cbd6dc; font-size: 11px; line-height: 1.4; }
.panel-message.error { color: #ff9a94; }
.panel-message.warning { color: #ffd181; }
.panel-message.success { color: #98edc9; }
.metric-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 2px 0 0;
}
.metric-grid[hidden] { display: none; }
.metric-grid dt { color: #aebbc4; font-size: 9px; }
.metric-grid dd { margin: 2px 0 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.analysis-heading { display: grid; gap: 2px; margin-bottom: 10px; }
.analysis-heading span { color: #b8c4cc; font-size: 12px; }
.analysis-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.analysis-actions button { font-size: 13px; }
.analysis-actions .primary-action { background: #2374a5; border-color: #56a8d7; }
.analysis-actions .primary-action:hover { background: #2d83b8; }
button:disabled { cursor: not-allowed; opacity: 0.45; }

#analysis-message {
  margin: 10px 0 0;
  color: #cbd6dc;
  font-size: 13px;
}

#analysis-message.error { color: #ff9a94; }
#analysis-message.warning { color: #ffd181; }

.panel-divider {
  height: 1px;
  margin: 14px 0 12px;
  background: rgba(255, 255, 255, 0.14);
}

.natural-heading { margin-bottom: 9px; }

#natural-message {
  margin: 10px 0 0;
  color: #cbd6dc;
  font-size: 13px;
}

#natural-message.error { color: #ff9a94; }
#natural-message.warning { color: #ffd181; }

#export-message {
  margin: 10px 0 0;
  color: #cbd6dc;
  font-size: 13px;
}

#export-message.error { color: #ff9a94; }

#natural-point-summary {
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #bfe9ff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#natural-point-summary[hidden] { display: none; }

.slope-vector-block {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
}

#slope-message {
  margin: 9px 0 0;
  color: #cbd6dc;
  font-size: 12px;
}

#slope-message.error { color: #ff9a94; }
#slope-message.warning { color: #ffd181; }

#slope-measurements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 0;
}

#slope-measurements[hidden] { display: none; }
#slope-measurements dt { color: #aebbc4; font-size: 10px; }
#slope-measurements dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

#analysis-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

#analysis-results[hidden] { display: none; }
#natural-results[hidden] { display: none; }
#natural-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}
#analysis-results div { min-width: 0; }
#natural-results div { min-width: 0; }
#analysis-results dt { color: #aebbc4; font-size: 11px; }
#natural-results dt { color: #aebbc4; font-size: 11px; }
#analysis-results dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
#natural-results dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.natural-point-label {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(15, 39, 54, 0.92);
  color: #d8f4ff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
}

.draft-point-label {
  border: 1px solid rgba(126, 200, 255, 0.48);
  border-radius: 4px;
  background: rgba(10, 24, 33, 0.94);
  color: #e7f7ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.analysis-area-label {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: rgba(10, 17, 23, 0.88);
  color: #edf3f7;
  box-shadow: none;
  font-size: 12px;
}

.feedback-button {
  position: fixed;
  z-index: 5000;
  right: calc(var(--analysis-panel-width) + 24px);
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 190, 92, 0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb85c, #f28b45);
  color: #172027;
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.38);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}
.feedback-button[hidden] { display: none !important; }
.feedback-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.feedback-button:hover { transform: translateY(-1px); filter: brightness(1.06); }

.feedback-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(126, 200, 255, 0.32);
  border-radius: 15px;
  background: #101a21;
  color: #edf6f8;
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.72);
}
.feedback-dialog::backdrop { background: rgba(2, 8, 12, 0.72); backdrop-filter: blur(4px); }
.feedback-dialog form { display: grid; }
.feedback-dialog header {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(90deg, rgba(255, 184, 92, 0.13), transparent);
}
.feedback-dialog header div { display: grid; gap: 3px; }
.feedback-dialog header strong { font-size: 17px; }
.feedback-dialog header span { color: #a8bac3; font-size: 11px; }
.feedback-fields { display: grid; gap: 7px; padding: 16px 18px 10px; }
.feedback-fields > label { color: #bacbd2; font-size: 11px; }
.feedback-fields select,
.feedback-fields textarea,
.feedback-fields input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #091219;
  color: #edf6f8;
  font: inherit;
  padding: 9px 10px;
}
.feedback-fields textarea { min-height: 132px; resize: vertical; line-height: 1.45; }
.feedback-checkbox { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: #e4eef1 !important; }
#feedback-privacy {
  margin: 5px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(93, 222, 191, 0.18);
  border-radius: 8px;
  background: rgba(93, 222, 191, 0.05);
  color: #9fb4bd;
  font-size: 10px;
  line-height: 1.45;
}
.feedback-status { min-height: 16px; margin: 0; color: #ffd181; font-size: 11px; }
.feedback-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 11px 18px 16px; }
.feedback-dialog footer button { min-height: 36px; }
.feedback-toast {
  position: fixed;
  z-index: 5200;
  left: 50%;
  bottom: 18px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 9px 14px;
  border-radius: 9px;
  background: #15242c;
  color: #e9f3f6;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.48);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.feedback-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.feedback-toast.success { border: 1px solid rgba(93, 222, 191, 0.45); }
.feedback-toast.warning { border: 1px solid rgba(255, 209, 129, 0.55); }

.ortho-help {
  left: 16px;
  bottom: 12px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 7px;
  color: #b8c4cc;
  font-size: 12px;
}

.leaflet-container { font: inherit; }
.leaflet-control-zoom a { background: rgba(10, 17, 23, 0.9); color: #edf3f7; border-color: rgba(255,255,255,.15); }
.leaflet-control-zoom a:hover { background: #23313b; color: #fff; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #111c24; color: #edf3f7; }

@media (max-width: 900px) {
  .photogrammetric-control-layout { grid-template-columns: 1fr; }
  .ortho-toolbar {
    right: 12px;
    left: 52px;
    top: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .opacity-label, #ortho-opacity { display: none; }
  .ortho-summary { top: auto; right: 12px; bottom: 12px; }
  .analysis-panel { top: 112px; right: 12px; max-height: calc(100% - 190px); }
  .cad-panel { top: 112px; left: 12px; max-height: calc(100% - 190px); }
  .ortho-status { left: 12px; right: 12px; bottom: 76px; }
  .ortho-help { display: none; }
  .feedback-button { right: 10px; bottom: 96px; }
}

@media (max-width: 560px) {
  .analysis-panel { top: auto; right: 12px; bottom: 92px; max-height: 52%; overflow: auto; }
  .cad-panel { top: 112px; left: 12px; right: 12px; width: auto; max-height: 34%; }
  #analysis-results { grid-template-columns: 1fr 1fr; }
  .ortho-summary { display: none; }
  .volume-viewer-modal { inset: 6px; }
  .volume-viewer-modal-header span { display: none; }
  .profile-result { bottom: 8px; width: calc(100% - 12px); }
  .profile-result-header span { display: none; }
  .profile-chart-shell { overflow-x: auto; }
  .profile-chart { width: 620px; max-width: none; min-height: 0; }
  .profile-result-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-button,
  .feedback-toast { transition: none; }
}

/* Harta creeaza un context separat: placile Leaflet nu pot acoperi cotele. */
#map { position: relative; z-index: 0; }
.ortho-status { z-index: 1200; max-width: calc(100% - 32px); pointer-events: none; }
.ortho-status span { overflow-wrap: anywhere; }
.local-file-fallback {
  position: absolute; z-index: 3000; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(540px, calc(100% - 32px)); padding: 28px; border: 1px solid #47766d;
  border-radius: 18px; background: #101e25; box-shadow: 0 12px 50px #000a;
}
.local-file-fallback[hidden] { display: none; }
.local-file-fallback h1 { margin-top: 0; font-size: 23px; }
.local-file-fallback p { line-height: 1.5; color: #c0d1d7; }
.local-file-fallback label { display: block; font-weight: 700; margin-bottom: 10px; }
.local-file-fallback input { max-width: 100%; }

.local-delivery-profile { position:absolute; z-index:1100; bottom:92px; left:16px; max-width:calc(100% - 32px); font-size:12px; padding:6px 10px; background:#102724; border-radius:8px; pointer-events:none; }
#local-calculation-progress { width:100%; accent-color:#77d9c5; }
