/* ==========================================================================
   KabelPlaner – Design System & Styles
   Modern Dark Blueprint Theme with Engineering Precision
   ========================================================================== */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-hover: rgba(30, 41, 59, 0.7);
  --bg-input: #1f293d;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  
  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --gradient-accent: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-badge: linear-gradient(135deg, #10b981, #06b6d4);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.25);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.dark-theme {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */

.app-header {
  height: 68px;
  min-height: 68px;
  max-height: 68px;
  background-color: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  box-sizing: border-box;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 1;
  min-width: 0;
}

.logo-badge {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.logo-icon {
  width: 22px;
  height: 22px;
  color: #fff;
}

.app-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.badge-vde {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(0.8);
}

/* Undo / Redo Gruppe im Header (kompakte Icon-Buttons) */
.undo-redo-group {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(15, 23, 42, 0.7);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.undo-redo-group .btn,
.undo-redo-group .btn-icon-only {
  width: 30px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.undo-redo-group .btn:not(:disabled):hover,
.undo-redo-group .btn-icon-only:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #38bdf8;
}

.undo-redo-group .btn-icon-only svg {
  pointer-events: none;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* ==========================================================================
   Header Dropdown / Popover Komponenten
   ========================================================================== */

.header-dropdown {
  position: relative;
  display: inline-flex;
}

.btn-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-dropdown-trigger svg {
  flex-shrink: 0;
}

.dropdown-caret {
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
  margin-left: 2px;
}

.header-dropdown.open .dropdown-caret {
  transform: rotate(180deg);
}

.header-dropdown.open > .btn-dropdown-trigger {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.45);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.header-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
  padding: 6px;
  z-index: 500;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-dropdown.open > .header-dropdown-menu {
  display: flex;
  flex-direction: column;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.dropdown-item:hover {
  background-color: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.dropdown-item svg {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.dropdown-item:hover svg {
  color: #38bdf8;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 4px 6px;
}

/* Presence Status Badge */
.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.presence-badge:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(255, 255, 255, 0.2);
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

/* ==========================================================================
   Header Responsiveness (1080p, 1440p & Laptop Screen Protection)
   ========================================================================== */

@media (max-width: 1600px) {
  .app-header {
    padding: 0 16px;
    gap: 12px;
  }
  .app-subtitle {
    max-width: 250px;
  }
  .header-actions {
    gap: 6px;
  }
}

@media (max-width: 1440px) {
  .app-subtitle {
    max-width: 160px;
  }
  .btn-dropdown-trigger {
    padding: 6px 9px;
    font-size: 0.8rem;
  }
}

@media (max-width: 1366px) {
  .app-header {
    padding: 0 12px;
    gap: 8px;
  }
  .app-subtitle {
    display: none;
  }
  .header-dropdown .nav-btn-text {
    display: none;
  }
  .btn-dropdown-trigger {
    padding: 6px 8px;
  }
  .btn-optimizer-top {
    padding: 5px 10px;
    font-size: 0.8rem;
  }
  .presence-badge {
    padding: 5px 8px;
    font-size: 0.75rem;
  }
  #btnToggleAuthModal {
    padding: 6px 8px;
  }
}

@media (max-width: 1180px) {
  .logo-badge {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
  .logo-icon {
    width: 18px;
    height: 18px;
  }
  .app-title {
    font-size: 1rem;
  }
  .badge-vde {
    display: none;
  }
}


/* ==========================================================================
   Main Application Layout
   ========================================================================== */

.main-container {
  display: grid;
  grid-template-columns: 260px 1fr 360px;
  height: calc(100vh - 68px);
  overflow: hidden;
}

/* Left Sidebar */
.sidebar-left {
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.3;
}

/* Tool Buttons */
.tool-btn-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
}

.tool-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Component Palette */
.component-palette {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.palette-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(2px);
}

.palette-item.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.palette-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.palette-info {
  display: flex;
  flex-direction: column;
}

.palette-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.palette-info small {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.zone-actions {
  display: flex;
  gap: 8px;
}

.scale-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.scale-indicator strong {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Center Canvas Viewport
   ========================================================================== */

.canvas-viewport {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.canvas-toolbar {
  height: 44px;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 0.78rem;
}

.legend-bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.legend-swatch {
  width: 14px;
  height: 4px;
  border-radius: 2px;
}

.legend-swatch.trench {
  background-color: #d97706;
  border: 1px dashed #f59e0b;
}

.legend-swatch.pipe {
  background-color: #38bdf8;
  height: 6px;
}

.legend-swatch.ok {
  background-color: #06b6d4;
}

.legend-swatch.warn {
  background-color: #f59e0b;
}

.legend-swatch.error {
  background-color: #f43f5e;
}

.canvas-status {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.canvas-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
  user-select: none;
  background-color: #070a11;
}

#planCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  background-color: transparent;
}

/* Floating Zoom Controls Overlay */
.canvas-zoom-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.btn-zoom {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.85rem;
}

.btn-zoom:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
}

.btn-zoom-action {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 8px;
  width: auto;
}

.zoom-level-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-cyan);
  min-width: 48px;
  text-align: center;
  padding: 0 4px;
}


/* ==========================================================================
   Right Sidebar: Inspector & Live VDE Calculator
   ========================================================================== */

.sidebar-right {
  background-color: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.inspector-tag {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* No Selection State */
.no-selection-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.empty-icon {
  font-size: 2rem;
}

.no-selection-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.no-selection-card p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Form Styles */
.cable-editor-card,
.node-editor-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.palette-icon.icon-junction {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.palette-icon.icon-switch {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.palette-icon.icon-switch-double {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.form-row {
  display: flex;
  gap: 8px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.form-row .col {
  flex: 1 1 0%;
  min-width: 0;
  box-sizing: border-box;
}

label {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-control {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 8px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.80rem;
  font-family: var(--font-sans);
  outline: none;
  min-width: 0;
  transition: border-color 0.15s ease;
}

select.form-control {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.input-unit {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.input-unit .form-control {
  padding-right: 24px;
}

.input-unit span {
  position: absolute;
  right: 8px;
  font-size: 0.74rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  pointer-events: none;
}

/* VDE Results Card */
.vde-results-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  box-sizing: border-box;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
}

.results-header h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.03em;
}

.status-ok {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-error {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.result-cell {
  background: rgba(255, 255, 255, 0.03);
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.result-cell.full-width {
  grid-column: span 2;
}

.cell-label {
  font-size: 0.66rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highlight-cyan {
  color: var(--accent-cyan);
}

.highlight-gold {
  color: var(--accent-amber);
}

/* Progress Bar for Voltage Drop */
.drop-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-bar-fill.ok {
  background-color: var(--accent-emerald);
}

.progress-bar-fill.warn {
  background-color: var(--accent-amber);
}

.progress-bar-fill.error {
  background-color: var(--accent-rose);
}

.progress-marker-3pct {
  position: absolute;
  left: 60%; /* 3% of a 5% scale */
  top: -4px;
  bottom: -4px;
  width: 2px;
  background-color: var(--accent-amber);
  border-radius: 1px;
}

.vde-notes {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  background: rgba(6, 182, 212, 0.05);
  border-left: 2px solid var(--accent-cyan);
  padding: 6px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  min-width: 0;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

.vde-circuit-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  box-sizing: border-box;
}

.circuit-sync-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  line-height: 1.45;
  color: #e0f2fe;
}

.circuit-sync-badge.badge-mismatch {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fecdd3;
}

.circuit-sync-badge .badge-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.circuit-sync-badge .badge-content {
  flex: 1;
  min-width: 0;
}

.circuit-sync-badge .badge-title {
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.circuit-sync-badge.badge-mismatch .badge-title {
  color: var(--accent-rose);
}

.circuit-sync-badge .badge-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.circuit-sync-badge .circuit-cable-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.circuit-sync-badge .circuit-cable-pill {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.circuit-sync-badge .circuit-cable-pill.current {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.15);
  font-weight: 600;
}

.circuit-sync-btn {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 0.73rem;
  font-weight: 600;
  background: var(--accent-cyan);
  color: #0b1120;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.circuit-sync-btn:hover {
  background: #7dd3fc;
  transform: translateY(-1px);
}

.vde-security-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  box-sizing: border-box;
}

.security-banner {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  line-height: 1.45;
  border: 1px solid transparent;
  min-width: 0;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

.security-banner .banner-title {
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  word-break: break-word;
}

.security-banner .banner-desc {
  font-size: 0.73rem;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.security-banner.banner-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.security-banner.banner-success .banner-title {
  color: var(--accent-emerald);
}

.security-banner.banner-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.security-banner.banner-warning .banner-title {
  color: var(--accent-amber);
}

.security-banner.banner-danger {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fecdd3;
}

.security-banner.banner-danger .banner-title {
  color: var(--accent-rose);
}

/* Cables List */
.cables-list-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.cables-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  box-sizing: border-box;
}

.cable-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
  box-sizing: border-box;
}

.cable-list-item > div:first-child {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.cable-list-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cable-list-item.active {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

.cable-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cable-item-subtitle {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dynamische VDE-Status-Farben für Ergebnis-Zellen im rechten Inspektor */
.cell-value.status-ok {
  color: var(--accent-emerald) !important;
}
.cell-value.status-warn {
  color: var(--accent-amber) !important;
}
.cell-value.status-error {
  color: var(--accent-rose) !important;
}

/* Diff-Modal Begründungs-Pills */
.diff-reason-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 3px;
  line-height: 1.35;
}
.diff-reason-item:last-child {
  margin-bottom: 0;
}
.diff-reason-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-right: 5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}



/* ==========================================================================
   Bottom Summary Section
   ========================================================================== */

.summary-section {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.summary-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.table-responsive {
  overflow-x: auto;
}

.table-vde {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.table-vde th,
.table-vde td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.table-vde th {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.table-vde tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.bill-of-materials {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bill-of-materials h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.bom-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bom-card-title {
  font-size: 0.82rem;
  font-weight: 600;
}

.bom-card-qty {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.bom-card-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */

.modal-backdrop,
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.open,
.modal.open {
  display: flex !important;
}

.modal-card,
.modal-dialog {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3,
.modal-header .modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  color: var(--text-main);
}

.modal-close,
.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover,
.btn-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.modal-table th,
.modal-table td {
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.modal-table th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}

.modal-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.modal-info-box {
  background: rgba(6, 182, 212, 0.08);
  border-left: 3px solid var(--accent-cyan);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.modal-info-box h4 {
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.modal-info-box ul {
  padding-left: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-card.modal-sm {
  max-width: 480px;
}

/* ==========================================================================
   Background Controls & Sliders
   ========================================================================== */

.bg-controls-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
  padding: 5px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* Bildfilter & Lageplan Popover Menü */
.filter-popover-menu {
  width: 320px;
  min-width: 300px;
  left: 0;
  right: auto;
  padding: 12px;
  gap: 10px;
}

.filter-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-popover-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-popover-title svg {
  color: var(--accent-cyan);
}

.filter-popover-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-field-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.filter-select {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.8rem;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--border-focus);
}

.filter-popover-sliders {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.filter-popover-sliders .opacity-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.filter-popover-sliders .opacity-control span:first-child {
  font-size: 0.76rem;
  min-width: 95px;
}

.filter-popover-sliders .opacity-control input[type="range"] {
  flex: 1;
  width: auto;
}

.filter-popover-footer {
  padding-top: 4px;
}

.opacity-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.opacity-control input[type="range"] {
  width: 70px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.opacity-control span[id^="lblBg"],
.opacity-control span#lblBgOpacity {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-cyan);
  min-width: 32px;
  text-align: right;
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  width: 34px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  position: relative;
  transition: background-color 0.2s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #fff;
  top: 2px;
  left: 2px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-cyan);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.btn-upload {
  cursor: pointer;
  padding: 4px 10px;
}

.legend-swatch.main-16 {
  background-color: #a855f7;
  height: 6px;
}

/* ==========================================================================
   Project List in Load Modal
   ========================================================================== */

.project-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.project-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.project-card-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-import-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-import-box h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-cyan);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease;
}

.toast.toast-success {
  border-left-color: var(--accent-emerald);
}

.toast.toast-error {
  border-left-color: var(--accent-rose);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}


/* ==========================================================================
   Calibration Modal & Scale UI
   ========================================================================== */

.calib-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calib-stat-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preset-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.btn-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pill:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
}

/* Hotkey Badges in Toolbar */
.hotkey-badge {
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  margin-left: auto;
}

.tool-btn.active .hotkey-badge {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--accent-cyan);
}

/* Tool Button Sub-Actions (z. B. Auge-Symbol beim Maßstab-Button) */
.tool-btn-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.tool-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.18s ease;
  cursor: pointer;
  padding: 0;
}

.tool-action-icon:hover {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  transform: scale(1.08);
}

.tool-action-icon.off {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  opacity: 0.9;
}

.tool-action-icon.off:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
}

.tool-btn.active .tool-action-icon {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.35);
  color: #fff;
}

.tool-btn.active .tool-action-icon.off {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* Shortcuts Modal */
.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 620px) {
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
}

.shortcut-group h4 {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.shortcut-desc {
  color: var(--text-main);
}

.shortcut-row kbd {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--accent-gold);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

/* Preismodal Banner, Tabs & Tabellen */
.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.modal-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-tab-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.price-modal-banner {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: var(--text-main);
}

.price-section-title {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 14px 0 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 3px;
}

/* Stückliste & Gesamtkosten-Badge */
.bom-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.bom-total-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bom-card-price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-top: 2px;
}

.bom-card-price small {
  font-size: 0.72rem;
  font-weight: normal;
  color: var(--text-dim);
}

/* Inspektor Kosten-Box */
.vde-cost-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  min-width: 0;
  box-sizing: border-box;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
}

.cost-source {
  font-size: 0.7rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 4px;
  margin-top: 2px;
}

.cost-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.72rem;
}

/* ==========================================================================
   3-Systeme-Vergleich Bar (Hager vs. ABB vs. Legrand)
   ========================================================================== */
.bom-systems-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0 16px 0;
}

.rei-system-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
}

.rei-system-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.rei-system-card.active {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.09);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

.rei-system-card.active::after {
  content: "Aktiv gewählt";
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-cyan);
  color: #0f172a;
  padding: 1px 6px;
  border-radius: 4px;
}

.rei-sys-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rei-sys-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rei-sys-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 600;
}

.rei-sys-price-main {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-amber);
  line-height: 1.2;
}

.rei-sys-price-label {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.rei-sys-total-proj {
  font-size: 0.8rem;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rei-sys-total-proj strong {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.rei-sys-diff {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.rei-sys-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.price-badge-best {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bom-compare-row {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.bom-compare-item {
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Print Styles (Official Electrical Planning Report)
   ========================================================================== */

@media print {
  body {
    background-color: #ffffff !important;
    color: #111827 !important;
  }

  .app-header,
  .sidebar-left,
  .sidebar-right,
  .canvas-toolbar,
  .modal-backdrop,
  .header-actions {
    display: none !important;
  }

  .main-container {
    display: block !important;
    height: auto !important;
  }

  .canvas-viewport {
    background: transparent !important;
    page-break-after: always;
  }

  #planCanvas {
    box-shadow: none !important;
    border: 1px solid #9ca3af !important;
    max-width: 100% !important;
  }

  .summary-section {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: none !important;
    padding: 0 !important;
  }

  .table-vde th,
  .table-vde td {
    color: #000000 !important;
    border-bottom: 1px solid #e5e7eb !important;
  }

  .table-vde th {
    background-color: #f3f4f6 !important;
  }

  .bom-card {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
  }

  .bom-card-qty {
    color: #0284c7 !important;
  }
}

/* =============================================================================
   12. LOGGING, PRESENCE & VERSIONING STYLES
   ============================================================================= */

/* Presence Badge im Header */
.presence-badge {
  transition: all 0.2s ease;
  user-select: none;
}

.presence-badge:hover {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.presence-badge .presence-dot {
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
  animation: pulse-green 2s infinite ease-in-out;
}

.presence-badge.warning {
  border-color: rgba(234, 179, 8, 0.6) !important;
  background: rgba(234, 179, 8, 0.15) !important;
}

.presence-badge.warning .presence-dot {
  background: #facc15 !important;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.9) !important;
  animation: pulse-yellow 1.2s infinite ease-in-out;
}

.presence-badge.warning #presenceText {
  color: #fde047 !important;
  font-weight: 600;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes pulse-yellow {
  0%, 100% { opacity: 1; transform: scale(1.1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* Modal Tab Navigation */
.modal-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.modal-tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  font-weight: 600;
}

/* Tabellen für Log & Versionen */
.log-table th, .version-table th {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.log-table td, .version-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.log-table tr:hover, .version-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Badges für Ereignisse */
.event-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
}

.badge-login { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.badge-login-fail { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-logout { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.badge-load { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.badge-save { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.badge-autosave { background: rgba(14, 165, 233, 0.2); color: #7dd3fc; border: 1px solid rgba(14, 165, 233, 0.3); }
.badge-autosave-alt { background: rgba(234, 179, 8, 0.2); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.5); }
.badge-restore { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.badge-delete { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); }
.badge-pre-overwrite { background: rgba(249, 115, 22, 0.2); color: #fdba74; border: 1px solid rgba(249, 115, 22, 0.4); }
.badge-manual { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.4); }

.presence-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* ==========================================================================
   VDE Auto-Optimizer & Qualitäts-Cockpit (Masterplan Kapitel 1–7)
   ========================================================================== */

.btn-optimizer-top {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #6ee7b7;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.btn-optimizer-top:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(56, 189, 248, 0.4));
  border-color: #34d399;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.28);
}

.legend-swatch.trunk {
  background-color: #c084fc;
  box-shadow: 0 0 6px rgba(192, 132, 252, 0.6);
}

.auto-optimizer-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.88));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.opt-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.opt-sparkle {
  font-size: 1.2rem;
  line-height: 1;
}

.opt-header-title h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.2px;
}

.opt-header-title small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.opt-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.opt-score-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.opt-score-pill.score-excellent {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.opt-score-pill.score-good {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.opt-score-pill.score-warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.opt-score-pill.score-danger {
  background: rgba(244, 63, 94, 0.22);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.5);
}

.btn-opt-collapse {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
}

.btn-opt-collapse:hover {
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

.opt-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 10px;
}

.opt-toggles-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.opt-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.73rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.35;
}

.opt-checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent-cyan);
}

.opt-checkbox-row strong {
  color: var(--text-main);
}

.opt-slider-box {
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.opt-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.opt-slider-header label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin: 0;
}

.opt-budget-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.opt-range-slider {
  width: 100%;
  accent-color: #10b981;
  cursor: pointer;
  height: 6px;
}

.opt-slider-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.opt-preset-pill {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.opt-preset-pill:hover,
.opt-preset-pill.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #6ee7b7;
}

.opt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.opt-kpi-cell {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opt-kpi-label {
  font-size: 0.67rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.opt-kpi-val {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.opt-kpi-sub {
  font-size: 0.66rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opt-warnings-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.opt-warning-item {
  font-size: 0.72rem;
  line-height: 1.35;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid #f59e0b;
  color: #fde68a;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.opt-warning-item.danger {
  background: rgba(244, 63, 94, 0.14);
  border-left-color: #f43f5e;
  color: #fecdd3;
}

.opt-warning-item.info {
  background: rgba(56, 189, 248, 0.12);
  border-left-color: #38bdf8;
  color: #bae6fd;
}

.opt-actions-row {
  display: flex;
  gap: 6px;
}

.btn-opt-primary {
  flex: 1.4;
  background: linear-gradient(135deg, #059669, #0284c7);
  border: 1px solid #34d399;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
}

.btn-opt-primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-opt-secondary {
  flex: 1;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
}

.btn-opt-secondary:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

/* Lock-Bar & Phase Selector im Kabel-Editor */
.cable-lock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.cable-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cable-lock-btn.locked {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fbbf24;
}

.cable-phase-select-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.form-control-xs {
  padding: 3px 6px !important;
  font-size: 0.74rem !important;
  height: auto !important;
  width: auto !important;
}

.terminal-adapter-badge {
  font-size: 0.73rem;
  line-height: 1.35;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(192, 132, 252, 0.14);
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: #e9d5ff;
  margin-bottom: 4px;
}

.vde-quickfix-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.quickfix-card {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-main);
}

.quickfix-card.danger {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.45);
}

.quickfix-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.btn-quickfix {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quickfix:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

/* Diff Modal Styles */
.diff-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.diff-kpi-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.diff-kpi-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.diff-kpi-value {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.diff-kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.diff-modal-slider-bar {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.diff-notices-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.diff-table th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.95);
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 8px;
}

.diff-table td {
  font-size: 0.79rem;
  padding: 8px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.diff-row-changed {
  background: rgba(16, 185, 129, 0.05);
}

.diff-row-locked {
  opacity: 0.75;
  background: rgba(245, 158, 11, 0.05);
}

.diff-arrow {
  color: var(--accent-cyan);
  font-weight: 700;
  margin: 0 4px;
}

.phase-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.phase-L1 { background: rgba(180, 83, 9, 0.3); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.45); }
.phase-L2 { background: rgba(71, 85, 105, 0.4); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.45); }
.phase-L3 { background: rgba(100, 116, 139, 0.35); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }
.phase-3P { background: rgba(192, 132, 252, 0.22); color: #d8b4fe; border: 1px solid rgba(192, 132, 252, 0.45); }

