/* GENERERET af tools/bassin-ui.mjs fra reference/bassin/styles.css. Ret aldrig her. Bassin Studios
   formularer og resultater (felter, knapgrupper, afkrydsning, tværsnit, nøgletal og kurver),
   afgrænset til .bassin-ui, og popups på kortet, afgrænset til .leaflet-container. */

.bassin-ui .segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-3);
  box-shadow: inset 0 1px 2px rgba(26, 31, 28, 0.05);
}

.bassin-ui .segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bassin-ui .segmented button:hover {
  color: var(--ink);
}

.bassin-ui .segmented button.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-1);
}

.bassin-ui .three-view {
  position: absolute;
  inset: 0;
  background: #e7ebe7;
}

.bassin-ui .three-view[hidden] {
  display: none;
}

.bassin-ui #threeCanvas {
  width: 100%;
  height: 100%;
  display: block;
  transition: opacity 160ms ease, filter 160ms ease;
}

.bassin-ui .three-view.three-model-stale #threeCanvas {
  opacity: 0.46;
  filter: saturate(0.55);
}

.bassin-ui .three-view.three-model-empty #threeCanvas {
  opacity: 0.22;
}

.bassin-ui .three-model-state {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  max-width: min(520px, calc(100% - 48px));
  padding: 10px 14px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(132, 91, 25, 0.28);
  border-radius: 7px;
  background: rgba(251, 248, 239, 0.94);
  box-shadow: var(--shadow-1);
  color: #6c4b18;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.bassin-ui .three-model-state[hidden] {
  display: none;
}

.bassin-ui .three-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(231, 235, 231, 0.76);
  backdrop-filter: blur(2px);
}

.bassin-ui .three-loading[hidden] {
  display: none;
}

.bassin-ui .three-loading-card {
  width: min(360px, calc(100% - 24px));
  padding: 18px 20px 20px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: rgba(251, 251, 248, 0.97);
  box-shadow: var(--shadow-2);
}

.bassin-ui .three-loading-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.bassin-ui .three-loading-text {
  min-height: 18px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.bassin-ui .three-loading-track {
  height: 6px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line-2);
}

.bassin-ui .three-loading-bar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(var(--three-progress, 0));
  transform-origin: left center;
  transition: transform 120ms ease-out;
}

.bassin-ui .three-loading-track.indeterminate .three-loading-bar {
  width: 42%;
  transform: translateX(-110%);
  animation: three-loading-sweep 1.05s ease-in-out infinite;
}

.bassin-ui .three-toolbar, .bassin-ui .three-layers, .bassin-ui .three-status {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: rgba(251, 251, 248, 0.94);
  box-shadow: var(--shadow-2);
}

.bassin-ui .three-toolbar {
  flex-wrap: wrap;
  width: 272px;
  left: 12px;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
}

.bassin-ui .three-appearance {
  flex: 0 0 100%; width: 100%; min-width: 0;
}

.bassin-ui .three-toolbar .segmented.three-mode {
  grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; min-width: 0;
}

.bassin-ui .three-toolbar .segmented {
  grid-template-columns: repeat(4, 1fr);
  min-width: 178px;
}

.bassin-ui .three-toolbar .segmented button {
  min-width: 38px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.bassin-ui .three-toolbar .segmented button.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-1);
}

.bassin-ui .three-layers {
  right: 12px;
  top: 12px;
  width: min(320px, calc(100vw - 84px));
  max-height: min(520px, calc(100vh - 126px));
  overflow: auto;
  padding: 8px;
}

.bassin-ui .three-layer {
  height: 28px;
  display: grid;
  grid-template-columns: 18px 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 3px 4px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
}

.bassin-ui .three-layer:hover {
  background: rgba(88, 127, 100, 0.08);
}

.bassin-ui .three-layer input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.bassin-ui .three-layer span:nth-child(3) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bassin-ui .three-layer b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.bassin-ui .three-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(36, 40, 38, 0.22);
}

.bassin-ui .three-status {
  left: 12px;
  bottom: 12px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.leaflet-container .geology-popup {
  position: absolute;
  z-index: 6;
  min-width: 220px;
  max-width: 285px;
  padding: 9px 11px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(251, 251, 248, 0.98);
  box-shadow: var(--shadow-2);
  font-size: 11.5px;
  color: var(--ink, #242826);
}

.leaflet-container .geology-popup .gp-title {
  font-weight: 750;
  font-size: 12.5px;
  margin: 0 18px 5px 0;
}

.leaflet-container .geology-popup .gp-row {
  color: var(--muted);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.leaflet-container .geology-popup .gp-gw {
  color: #2b7fb8;
  font-weight: 650;
}

.leaflet-container .geology-popup .gp-muted {
  font-style: italic;
  opacity: 0.8;
}

.leaflet-container .geology-popup .gp-link {
  display: inline-block;
  margin-top: 7px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.leaflet-container .geology-popup .gp-link:hover {
  text-decoration: underline;
}

.leaflet-container .geology-popup .gp-profile {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.leaflet-container .geology-popup .gp-profile-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--ink, #242826);
  font-size: 10.5px;
  font-weight: 750;
}

.leaflet-container .geology-popup .gp-profile-depth {
  color: var(--muted);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.leaflet-container .geology-popup .gp-profile-body {
  position: relative;
  display: grid;
  grid-template-columns: 34px 28px;
  justify-content: center;
  gap: 7px;
  height: 112px;
}

.leaflet-container .geology-popup .gp-profile-scale {
  position: relative;
  color: var(--faint);
  font-size: 9px;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.leaflet-container .geology-popup .gp-profile-scale span {
  position: absolute;
  right: 0;
}

.leaflet-container .geology-popup .gp-profile-scale span:first-child {
  top: -1px;
}

.leaflet-container .geology-popup .gp-profile-scale span:last-child {
  bottom: -1px;
}

.leaflet-container .geology-popup .gp-profile-column {
  position: relative;
  overflow: visible;
  box-sizing: border-box;
  border: 1px solid #77756f;
  background: #ece8df;
}

.leaflet-container .geology-popup .gp-profile-layer {
  position: absolute;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  min-height: 2px;
  border-bottom: 1px solid rgba(251, 251, 248, 0.9);
  cursor: help;
}

.leaflet-container .geology-popup .gp-profile-layer:hover, .leaflet-container .geology-popup .gp-profile-layer:focus-visible {
  z-index: 1;
  outline: 2px solid #2b7fb8;
  outline-offset: -2px;
  filter: brightness(1.08);
}

.leaflet-container .geology-popup .gp-profile-gw {
  position: absolute;
  z-index: 2;
  left: -6px;
  box-sizing: border-box;
  width: 40px;
  height: 9px;
  border-top: 2px solid #2b7fb8;
  transform: translateY(-1px);
  cursor: help;
}

.leaflet-container .geology-popup .gp-profile-gw::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -1px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #2b7fb8;
}

.leaflet-container .geology-popup .gp-profile-gw::after {
  content: "GVS";
  position: absolute;
  top: -7px;
  left: 42px;
  color: #2b7fb8;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
}

.leaflet-container .geology-popup .gp-profile-gw:hover, .leaflet-container .geology-popup .gp-profile-gw:focus-visible {
  border-top-width: 3px;
  outline: none;
  filter: brightness(0.9);
}

.leaflet-container .geology-popup .gp-layer-tooltip {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 132px;
  padding: 7px 8px;
  border: 1px solid #dedbd3;
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.35;
  box-shadow: 0 2px 7px rgba(36, 40, 38, 0.07);
  pointer-events: none;
}

.leaflet-container .geology-popup .gp-layer-tooltip strong, .leaflet-container .geology-popup .gp-layer-tooltip span {
  display: block;
  overflow-wrap: anywhere;
}

.leaflet-container .geology-popup .gp-layer-tooltip strong {
  margin-bottom: 3px;
  color: var(--ink, #242826);
  font-size: 10.5px;
}

.leaflet-container .geology-popup .gp-layer-tooltip span:empty {
  display: none;
}

.leaflet-container .geology-popup-close {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.leaflet-container .geology-popup-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.leaflet-container .sideslope-popup .sideslope-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink, #242826);
  font-weight: 650;
  margin: 2px 0 5px;
}

.leaflet-container .sideslope-popup .sideslope-input {
  width: 64px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.leaflet-container .sideslope-popup .sideslope-reset {
  margin-top: 7px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink, #242826);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.leaflet-container .sideslope-popup .sideslope-reset:disabled {
  opacity: 0.45;
  cursor: default;
}

.leaflet-container .sideslope-popup .sideslope-reset:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.07);
}

.bassin-ui .profile-dock {
  position: absolute;
  left: 172px;
  right: 196px;
  bottom: 12px;
  min-width: 420px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(251, 251, 248, 0.96);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  z-index: 3;
}

.bassin-ui .profile-dock-body {
  display: block;
}

.bassin-ui .section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.bassin-ui .section-head h2 {
  flex: 1;
  margin-bottom: 10px;
}

.bassin-ui .section-head .section-toggle {
  flex: none;
}

.bassin-ui .section-head .section-toggle svg {
  transition: transform 0.15s ease;
}

.bassin-ui .section.collapsed .section-head h2 {
  margin-bottom: 0;
}

.bassin-ui .section.collapsed .section-head .section-toggle svg {
  transform: rotate(-90deg);
}

.bassin-ui .section.collapsed .stats {
  display: none;
}

.bassin-ui .file-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.bassin-ui .file-grid > .command.full {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 6px 10px;
  white-space: normal;
}

.bassin-ui .command {
  width: 100%;
  min-height: 34px;
}

.bassin-ui .command svg {
  width: 16px;
  height: 16px;
}

.bassin-ui .field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bassin-ui .field {
  display: grid;
  gap: 4px;
}

.bassin-ui .field.full {
  grid-column: 1 / -1;
}

.bassin-ui .field.is-disabled {
  opacity: 0.45;
}

.bassin-ui .input-wrap {
  position: relative;
}

.bassin-ui .input-wrap input {
  padding-right: 42px;
}

.bassin-ui .suffix {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}

.bassin-ui .suffix.long {
  right: 8px;
}

.bassin-ui label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.bassin-ui input[type="number"], .bassin-ui input[type="text"], .bassin-ui select {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 9px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.bassin-ui input[type="number"]:hover, .bassin-ui input[type="text"]:hover, .bassin-ui select:hover {
  border-color: var(--faint);
}

.bassin-ui input[type="number"]:focus, .bassin-ui input[type="text"]:focus, .bassin-ui select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.bassin-ui select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e7269' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px;
  cursor: pointer;
}

.bassin-ui .template-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101513;
  overflow: hidden;
}

.bassin-ui #templateSvg {
  width: 100%;
  height: 220px;
  display: block;
}

.bassin-ui .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bassin-ui .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.bassin-ui .check-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.bassin-ui .stat {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.bassin-ui .stat.wide {
  grid-column: 1 / -1;
}

.bassin-ui .stat .name {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bassin-ui .stat .value {
  margin-top: 5px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.bassin-ui .stat .unit {
  color: var(--faint);
  font-size: 11px;
  font-weight: 500;
}

.bassin-ui .warnings {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.bassin-ui .result-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 10px 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-3);
  box-shadow: inset 0 1px 2px rgba(26, 31, 28, 0.05);
}

.bassin-ui .result-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bassin-ui .result-tabs button:hover {
  color: var(--ink);
}

.bassin-ui .result-tabs button.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-1);
}

.bassin-ui .result-panel {
  display: none;
}

.bassin-ui .result-panel.active {
  display: block;
}

.bassin-ui .result-curves {
  display: grid;
  gap: 10px;
}

.bassin-ui .curve-plot {
  padding: 9px 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface-2);
}

.bassin-ui .curve-plot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.bassin-ui .curve-plot-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bassin-ui .curve-plot-meta {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.bassin-ui .result-curve-svg {
  width: 100%;
  height: 210px;
  display: block;
  background: #fbfbf8;
  cursor: crosshair;
}

body .curve-tooltip {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(251, 251, 248, 0.97);
  box-shadow: var(--shadow-2);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body .curve-tooltip .ct-kote {
  font-weight: 750;
  color: var(--ink, #242826);
  margin-bottom: 2px;
}

body .curve-tooltip .ct-row.strong {
  color: var(--ink, #242826);
  font-weight: 650;
}

.bassin-ui .curve-empty {
  padding: 22px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  text-align: center;
}

.bassin-ui .profile-wrap {
  border: 0;
  border-radius: 0;
  background: var(--surface-2);
  overflow: hidden;
}

.bassin-ui .profile-mode-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 4px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
}

.bassin-ui .profile-mode-toggle button {
  min-height: 28px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bassin-ui .profile-mode-toggle button:hover {
  color: var(--ink);
}

.bassin-ui .profile-mode-toggle button.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-1);
}

.bassin-ui #profileSvg {
  width: 100%;
  height: 190px;
  display: block;
  background: #fbfbf8;
}

.bassin-ui .profile-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-top: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 11px;
}

.bassin-ui .profile-meta strong {
  color: var(--ink);
  font-weight: 650;
}

.bassin-ui .warning {
  padding: 8px 9px;
  border-left: 3px solid var(--amber);
  background: #fff8e9;
  color: #66502a;
  border-radius: 4px;
  font-size: 12px;
}

.bassin-ui .hidden {
  display: none;
}

.bassin-ui .section.collapsed .subgroup-body {
  display: none;
}

.bassin-ui .bottom-drawer .profile-dock {
  position: static;
  min-width: 0;
  width: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.bassin-ui .bottom-drawer .profile-dock-body {
  display: block;
}

.bassin-ui .bottom-drawer #profileSvg {
  height: 190px;
}

.bassin-ui .stat.vol-ok .value {
  color: #1a7f37;
}

.bassin-ui .stat.vol-under .value {
  color: #c0392b;
}

.bassin-ui .stat-req {
  margin-top: 2px;
  font-size: 11px;
  color: #73766f;
}

.bassin-ui .stat.vol-ok .stat-req {
  color: #1a7f37;
}

.bassin-ui .stat.vol-under .stat-req {
  color: #c0392b;
}

.bassin-ui .stat-req:empty {
  display: none;
}

.bassin-ui .split-details {
  padding: 0;
}

.bassin-ui .split-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.bassin-ui .split-details > summary::-webkit-details-marker {
  display: none;
}

.bassin-ui .split-details > summary::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}

.bassin-ui .split-details[open] > summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.bassin-ui .split-details > summary:hover {
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
}

.bassin-ui .split-details > summary:focus-visible {
  outline: 2px solid var(--accent, #3f86b4); outline-offset: -2px;
}

.bassin-ui .split-summary-title {
  color: var(--ink); font-size: 12px;
}

.bassin-ui .split-summary-note {
  font-weight: 500;
}

.bassin-ui .split-body {
  padding: 0 11px 10px;
}

.bassin-ui .split-note {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--muted);
}

.bassin-ui .split-table .split-sub th[scope="row"], .bassin-ui .split-table .split-sub td {
  padding-top: 1px;
  font-weight: 500;
  font-size: 12px;
  opacity: 0.85;
}

.bassin-ui .split-table .split-sub th[scope="row"] {
  padding-left: 10px;
}

.bassin-ui .info-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-left: 3px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: var(--muted);
  cursor: help;
  vertical-align: middle;
}

.bassin-ui .info-mark:hover, .bassin-ui .info-mark:focus-visible {
  color: var(--ink); border-color: var(--muted);
}

.bassin-ui .info-mark[hidden] {
  display: none;
}

.bassin-ui .split-table {
  width: 100%;
  margin-top: 6px;
  border-collapse: collapse;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

.bassin-ui .split-table th, .bassin-ui .split-table td {
  padding: 3px 0;
  text-align: right;
  vertical-align: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.bassin-ui .split-table thead th + th, .bassin-ui .split-table tbody td {
  padding-left: 8px;
}

.bassin-ui .split-table thead th {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 4px;
}

.bassin-ui .split-table tbody th[scope="row"] {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding-right: 8px;
  white-space: normal;
}

.bassin-ui .split-table .unit {
  font-size: 10px; font-weight: 500; color: var(--muted);
}

.bassin-ui .split-table tr[hidden] {
  display: none;
}

.bassin-ui .dxf-dialog {
  width:min(1500px,96vw); max-width:96vw; max-height:94vh; padding:0; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--ink); box-shadow:0 24px 100px #0005;
}

.bassin-ui .dxf-dialog::backdrop {
  background:#15252199;
}

.bassin-ui .dxf-dialog[open] {
  display:flex; flex-direction:column;
}

.bassin-ui .dxf-head, .bassin-ui .dxf-footer {
  display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px 22px; flex-shrink:0;
}

.bassin-ui .dxf-head {
  border-bottom:1px solid var(--line);
}

.bassin-ui .dxf-head h2 {
  margin:0 0 4px; font-size:21px;
}

.bassin-ui .dxf-head p, .bassin-ui .dxf-content p {
  margin:4px 0 12px; line-height:1.5; font-size:12px; color:var(--muted);
}

.bassin-ui .dxf-content {
  display:grid; grid-template-columns:minmax(250px,340px) minmax(0,1fr); grid-template-rows:minmax(0,1fr); gap:22px; padding:20px 22px; overflow:hidden; min-height:0;
}

.bassin-ui .dxf-settings, .bassin-ui .dxf-preview-panel {
  overflow:auto; min-height:0; min-width:0; padding-right:6px;
}

.bassin-ui .dxf-content h3 {
  margin:0 0 12px; font-size:14px;
}

.bassin-ui .dxf-settings h3:not(:first-child) {
  margin-top:24px;
}

.bassin-ui .dxf-settings details {
  margin:12px 0; padding:10px 0; border-block:1px solid var(--line);
}

.bassin-ui .dxf-settings summary {
  cursor:pointer; font-size:13px; font-weight:600;
}

.bassin-ui .dxf-layer-list {
  display:grid; gap:8px; padding-top:12px; font-size:12px;
}

.bassin-ui .dxf-layer-list label {
  display:flex; gap:6px; align-items:center;
}

.bassin-ui .dxf-layer-list input, .bassin-ui .dxf-settings .check-row input {
  width:auto;
}

.bassin-ui .dxf-settings input:not([type=checkbox]), .bassin-ui .dxf-settings select, .bassin-ui .dxf-row input {
  width:100%; min-width:0; box-sizing:border-box;
}

.bassin-ui .dxf-templates>label {
  display:block; margin-top:12px; font-size:12px;
}

.bassin-ui .dxf-templates .command {
  margin-top:8px;
}

.bassin-ui .dxf-library {
  max-height:310px; overflow:auto; margin:8px 0; border:1px solid var(--line); border-radius:8px;
}

.bassin-ui .dxf-settings input[type="search"] {
  padding:8px 10px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink); font:inherit; font-size:12px;
}

.bassin-ui .dxf-library button {
  width:100%; border:0; border-bottom:1px solid var(--line); background:transparent; color:inherit; padding:9px 10px; display:grid; grid-template-columns:1fr auto; gap:3px 8px; text-align:left; cursor:pointer; font:inherit; font-size:12px;
}

.bassin-ui .dxf-library button:hover {
  background:#75958118;
}

.bassin-ui .dxf-library small {
  grid-column:1/-1; color:var(--muted); font-size:10px;
}

.bassin-ui .dxf-preview {
  background:#fff; color:#25372e; padding:16px; border:1px solid var(--line); border-radius:8px;
}

.bassin-ui .dxf-preview table {
  width:100%; border-collapse:collapse; table-layout:fixed; font-size:11px; line-height:1.4;
}

.bassin-ui .dxf-preview caption {
  text-align:left; font-weight:600; font-size:13px; border:1px solid #b4c0b8; border-bottom:0; padding:10px 7px; overflow-wrap:anywhere;
}

.bassin-ui .dxf-preview td, .bassin-ui .dxf-preview th {
  padding:6px; border:1px solid #b4c0b8; text-align:left; vertical-align:top; overflow-wrap:anywhere; font-variant-numeric:tabular-nums;
}

.bassin-ui .dxf-preview th {
  background:#edf2ee;
}

.bassin-ui .dxf-edit-table .dxf-tools-col {
  width:94px;
}

.bassin-ui .dxf-edit-table .dxf-label-cell {
  display:flex; align-items:flex-start; gap:6px;
}

.bassin-ui .dxf-edit-table textarea {
  display:block; width:100%; min-width:0; resize:none; overflow:hidden; box-sizing:border-box; padding:3px 4px; margin:0; border:1px solid transparent; border-radius:4px; background:transparent; color:inherit; font:inherit; line-height:1.4;
}

.bassin-ui .dxf-edit-table textarea:hover, .bassin-ui .dxf-edit-table #dxfTitle:hover {
  background:#f3f7f4; border-color:#b4c0b8;
}

.bassin-ui .dxf-edit-table textarea:focus {
  outline:2px solid var(--accent); outline-offset:-1px; background:#fff;
}

.bassin-ui .dxf-edit-table #dxfTitle {
  border:1px solid transparent; background:transparent; font:inherit; font-weight:600;
}

.bassin-ui .dxf-edit-table .dxf-row-actions {
  vertical-align:middle; white-space:nowrap; padding:4px; background:var(--surface);
}

.bassin-ui .dxf-row-actions button, .bassin-ui .dxf-drag {
  background:transparent; border:1px solid transparent; border-radius:4px; color:var(--muted); cursor:pointer; min-width:26px; height:28px; padding:2px;
}

.bassin-ui .dxf-row-actions button:hover {
  color:var(--ink); background:#e7eee8; border-color:var(--line);
}

.bassin-ui .dxf-row-actions button:disabled {
  opacity:.25; cursor:default;
}

.bassin-ui .dxf-edit-table .dxf-drag {
  cursor:grab; touch-action:none; flex:0 0 23px; font-size:19px; min-width:23px;
}

.bassin-ui .dxf-drag:active {
  cursor:grabbing;
}

.bassin-ui .dxf-auto-value {
  display:block; padding:4px;
}

.bassin-ui .dxf-overflow-label {
  display:block; color:var(--muted); padding-left:33px;
}

.bassin-ui .dxf-repeated-label {
  padding:4px 4px 4px 33px;
}

.bassin-ui .dxf-drag-source {
  opacity:.25;
}

.bassin-ui .dxf-drag-ghost.dxf-preview {
  position:fixed; z-index:20; pointer-events:none; padding:0; border:1px solid var(--accent); border-radius:6px; background:white; box-shadow:0 16px 36px #173c3540,0 3px 10px #173c3530; transform:scale(1.01); opacity:.97;
}

.bassin-ui .dxf-drag-ghost .dxf-row {
  opacity:1;
}

.bassin-ui .dxf-drop-marker {
  position:fixed; height:3px; background:var(--accent); z-index:21; pointer-events:none; border-radius:3px; box-shadow:0 0 0 2px white;
}

.bassin-ui .dxf-drop-marker::before {
  content:""; position:absolute; width:9px; height:9px; border-radius:50%; background:var(--accent); top:-3px; left:-4px;
}

.bassin-ui .dxf-preview {
  position:relative; overflow-x:auto;
}

.bassin-ui .dxf-edit-table {
  min-width:510px;
}

.bassin-ui .dxf-preview-notes {
  white-space:pre-line;
}

.bassin-ui .dxf-content .dxf-footnote {
  margin-top:16px;
}

.bassin-ui .dxf-footer {
  border-top:1px solid var(--line);
}

.bassin-ui .dxf-actions {
  display:flex; gap:8px; flex-wrap:wrap;
}

.bassin-ui .dxf-footer>.command, .bassin-ui .dxf-actions>.command {
  width:auto; flex:0 0 auto;
}
