/**
 * BIMFLOW — Listă + Editor (Variant D · master-detail)
 * Pentru zone protejate, tronsoane hidraulice etc.
 */

.le-split {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 16px;
  min-height: 420px;
  align-items: start;
}

@media (max-width: 900px) {
  .le-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

.le-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.1);
  min-width: 0;
  overflow: hidden;
}

body.light-mode .le-list {
  background: rgba(0, 0, 0, 0.02);
}

.le-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.le-list-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.le-list-item.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
}

.le-list-item .num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size:var(--text-xs);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.le-list-item .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  overflow: hidden;
}

.le-list-item .info .n {
  display: block;
  width: 100%;
  font-weight: 700;
  font-size:var(--text-sm);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.le-list-item .info .s {
  display: block;
  width: 100%;
  font-size:var(--text-micro);
  color: var(--muted);
  line-height: 1.3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.le-list-add {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--glass-border);
}

.le-list-add .btn {
  width: 100%;
  justify-content: center;
}

.le-editor {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.08);
  min-width: 0;
}

body.light-mode .le-editor {
  background: rgba(0, 0, 0, 0.02);
}

.le-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.le-editor-head h3 {
  margin: 0;
  font-size:var(--text-base);
  font-weight: 700;
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}

.le-editor-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size:var(--text-sm);
}

.le-store {
  display: none !important;
}

/* Grid formular în editor */
.le-editor .zone-grid,
.le-editor .tron-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.le-editor .zone-grid .full,
.le-editor .zone-grid .span-4,
.le-editor .tron-grid .span-4 {
  grid-column: 1 / -1;
}

.le-editor .zone-grid .span-2,
.le-editor .tron-grid .span-2 {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .le-editor .zone-grid,
  .le-editor .tron-grid {
    grid-template-columns: 1fr;
  }
  .le-editor .zone-grid .span-2,
  .le-editor .tron-grid .span-2 {
    grid-column: span 1;
  }
}

.le-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.le-editor-actions .del {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

body.light-mode .le-editor-actions .del {
  color: #b91c1c;
}
