/* ========================================================
   UV-Planer – Stylesheet
   Autor: Niklas Pauli | Version: 260502.1500
   ======================================================== */

/* === WRAP === */
.eit-uv-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    color: #1e2329;
    background: #f0f2f5;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d0d4da;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

/* === TOOLBAR === */
.eit-uv-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #1e3a5f;
    padding: 10px 16px;
    flex-shrink: 0;
}
.eit-uv-toolbar-left,
.eit-uv-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.eit-uv-toolbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.eit-uv-titel {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
}

/* === BUTTONS === */
.eit-uv-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    background: #fff;
    color: #1e2329;
    line-height: 1.2;
    white-space: nowrap;
}
.eit-uv-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.eit-uv-btn:hover:not(:disabled) {
    background: #e8edf3;
}
.eit-uv-btn-primary {
    background: #2563eb;
    color: #fff;
}
.eit-uv-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
}
.eit-uv-btn-success {
    background: #16a34a;
    color: #fff;
}
.eit-uv-btn-success:hover:not(:disabled) {
    background: #15803d;
}
.eit-uv-btn-danger {
    background: #dc2626;
    color: #fff;
}
.eit-uv-btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}
.eit-uv-btn-pdf {
    background: #7c3aed;
    color: #fff;
}
.eit-uv-btn-pdf:hover:not(:disabled) {
    background: #6d28d9;
}
.eit-uv-btn-orange {
    background: #d97706;
    color: #fff;
}
.eit-uv-btn-orange:hover:not(:disabled) {
    background: #b45309;
}
/* Speichern-Button: auffällig grün, immer gut sichtbar */
.eit-uv-btn-speichern {
    background: #16a34a !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 8px 18px !important;
    border-radius: 6px !important;
    border: 2px solid #15803d !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: 12px;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}
.eit-uv-btn-speichern:hover {
    background: #15803d !important;
    box-shadow: 0 3px 12px rgba(22, 163, 74, 0.45);
}
.eit-uv-btn-gross {
    padding: 12px 28px;
    font-size: 14px;
}

/* === HAUPTBEREICH === */
.eit-uv-main {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* === LINKE SIDEBAR === */
.eit-uv-sidebar-left {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #d0d4da;
    overflow-y: auto;
    padding: 12px 8px;
}

/* === RECHTE SIDEBAR === */
.eit-uv-sidebar-right {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid #d0d4da;
    overflow-y: auto;
    padding: 12px 10px;
}

.eit-uv-sidebar-titel {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

/* === BAUTEIL-BIBLIOTHEK === */
.eit-uv-bauteil-liste {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.eit-uv-bauteil-gruppe {
    margin-top: 8px;
}
.eit-uv-bauteil-gruppe-titel {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 2px 4px;
    margin-bottom: 3px;
}
.eit-uv-bauteil-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #334155;
    transition: background 0.12s, border-color 0.12s;
    width: 100%;
    text-align: left;
}
.eit-uv-bauteil-btn:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
}
.eit-uv-bauteil-btn.aktiv {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.eit-uv-bauteil-farbe {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}
.eit-uv-bauteil-te {
    margin-left: auto;
    font-size: 10px;
    color: #94a3b8;
    background: #e2e8f0;
    padding: 1px 4px;
    border-radius: 3px;
    flex-shrink: 0;
}
.eit-uv-bauteil-btn.aktiv .eit-uv-bauteil-te {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* === BOARD-CONTAINER === */
.eit-uv-board-container {
    flex: 1;
    overflow: auto;
    padding: 24px 28px;
    position: relative;
    background: #c8ccd4;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

/* === SETUP-OVERLAY === */
.eit-uv-setup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 30, 55, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border-radius: 0;
}
.eit-uv-setup-dialog {
    background: #fff;
    border-radius: 10px;
    padding: 32px 36px;
    width: 440px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.eit-uv-setup-dialog h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1e3a5f;
}
.eit-uv-setup-feld {
    margin-bottom: 18px;
}
.eit-uv-setup-feld label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.eit-uv-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #1e2329;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.eit-uv-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.eit-uv-reihen-auswahl,
.eit-uv-stromtyp-auswahl {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.eit-uv-reihen-btn,
.eit-uv-stromtyp-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    transition: all 0.15s;
}
.eit-uv-reihen-btn:hover,
.eit-uv-stromtyp-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}
.eit-uv-reihen-btn.aktiv,
.eit-uv-stromtyp-btn.aktiv {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

/* === BOARD (Gehäuse-Darstellung) === */
.eit-uv-board {
    width: fit-content;
    background: linear-gradient(165deg, #50545e 0%, #3c4048 45%, #2e3038 100%);
    border-radius: 10px;
    padding: 14px 16px;
    border: 3px solid #1a1c22;
    box-shadow:
        0 10px 36px rgba(0,0,0,0.45),
        0 3px 10px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.09),
        inset 0 -2px 0 rgba(0,0,0,0.3),
        inset 2px 0 0 rgba(255,255,255,0.04),
        inset -2px 0 0 rgba(0,0,0,0.2);
    /* Türscharnier-Anmutung via outline */
    outline: 6px solid #3a3d44;
    outline-offset: 0px;
    position: relative;
}

/* Typenschild oben rechts */
.eit-uv-board::before {
    content: 'UV';
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.1em;
    pointer-events: none;
}

/* Schrauben-Ecken */
.eit-uv-board::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.05);
    pointer-events: none;
}

/* Montageplatte */
.eit-uv-reihen-container {
    display: flex;
    flex-direction: column;
    gap: 21px; /* 10mm Reihenabstand bei 2,06px/mm */
    background: linear-gradient(180deg, #dde0e4 0%, #e4e6ea 30%, #e8eaec 100%);
    border-radius: 5px;
    padding: 10px 12px;
    box-shadow:
        inset 0 3px 10px rgba(0,0,0,0.28),
        inset 0 0 0 1px rgba(0,0,0,0.15);
    position: relative;
}

/* Kabeleinführung oben – 10mm → 21px */
.eit-uv-reihen-container::before {
    content: '';
    display: block;
    height: 21px;
    flex-shrink: 0;
    border-radius: 3px;
    background: repeating-linear-gradient(
        to right,
        #1a1d24 0px, #1a1d24 9px,
        #24272e 9px, #24272e 11px
    );
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.05);
}

/* Kabeleinführung unten – 10mm → 21px */
.eit-uv-reihen-container::after {
    content: '';
    display: block;
    height: 21px;
    flex-shrink: 0;
    border-radius: 3px;
    background: repeating-linear-gradient(
        to right,
        #1a1d24 0px, #1a1d24 9px,
        #24272e 9px, #24272e 11px
    );
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.05);
}
.eit-uv-reihe-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.eit-uv-reihe-label {
    width: 28px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-align: right;
    flex-shrink: 0;
    /* Ausrichtung: Mitte des Gerätebereichs (Beschriftung 21px + halbe Gerätehöhe 72px) */
    padding-top: calc(21px + 72px - 0.6em);
}
/* Reihe ist jetzt Flex-Column mit 4 Zonen */
.eit-uv-reihe {
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    border: 2px solid #8a8c90;
    flex-shrink: 0;
    overflow: hidden;
    /* Breite wird per JS gesetzt */
}

/* Zone 1: Beschriftungsstreifen – 10mm reale Breite → 21px */
.uv-reihe-beschriftung {
    height: 21px;
    background: #ffffff;
    border-bottom: 1px solid #cfd1d4;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

/* Zone 2: Gerätebereich – 70mm MCB-Höhe → 144px */
.uv-reihe-geraetebereich {
    height: 144px;
    position: relative;
    background: #d0d2d6;
    flex-shrink: 0;
    overflow: hidden;
}
/* TS35-Hutschiene: Flanken bei 62% (89px) und 69% (99px) von oben */
.uv-reihe-geraetebereich::before,
.uv-reihe-geraetebereich::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to bottom, #c0c2c5, #a8aaae, #c0c2c5);
    pointer-events: none;
    z-index: 2;
}
.uv-reihe-geraetebereich::before { top: 62%; }
.uv-reihe-geraetebereich::after  { top: 69%; }

/* Zone 3: TE-Nummernstreifen – 5mm → 10px */
.uv-reihe-te-streifen {
    height: 10px;
    background: #b0b3b8;
    position: relative;
    flex-shrink: 0;
    border-top: 1px solid #a0a2a6;
}

/* Zone 4: Kabelkanal – 35mm → 72px */
.uv-reihe-kabelkanal {
    height: 72px;
    background: #32363f;
    position: relative;
    flex-shrink: 0;
}
.uv-reihe-kabelkanal::before {
    content: '';
    position: absolute;
    top: 6px; bottom: 6px; left: 0; right: 0;
    background: repeating-linear-gradient(
        to right,
        transparent 0, transparent 17px,
        rgba(255,255,255,0.07) 17px, rgba(255,255,255,0.07) 19px
    );
    pointer-events: none;
}

/* TE-Slots (innerhalb Gerätebereich) */
.eit-uv-te-slot {
    position: absolute;
    top: 0;
    height: 100%;
    box-sizing: border-box;
    border-right: 1px dashed rgba(0,0,0,0.12);
    cursor: crosshair;
    transition: background 0.1s;
    z-index: 1;
}
.eit-uv-te-slot:last-child {
    border-right: none;
}
.eit-uv-te-slot:hover {
    background: rgba(37, 99, 235, 0.12);
}
.eit-uv-te-slot.ghost-ok {
    background: rgba(22, 163, 74, 0.3);
    border-color: #16a34a;
}
.eit-uv-te-slot.ghost-err {
    background: rgba(220, 38, 38, 0.25);
    border-color: #dc2626;
}

/* TE-Nummern (innerhalb TE-Streifen) */
.eit-uv-te-nummer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #e8eaee;
    font-weight: 600;
    pointer-events: none;
}

/* === PLATZIERTE BAUTEILE === */
.eit-uv-bauteil {
    position: absolute;
    top: 2px;
    height: calc(100% - 4px);
    border-radius: 3px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1.5px solid rgba(0,0,0,0.25);
    transition: filter 0.12s, border-color 0.12s, outline 0.1s;
    overflow: hidden;
    user-select: none;
    z-index: 10;
}
.eit-uv-bauteil:hover {
    filter: brightness(1.07);
    border-color: rgba(255,255,255,0.45);
}
.eit-uv-bauteil.ausgewaehlt {
    border-color: #fff;
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    filter: brightness(1.05);
    z-index: 20;
}
.eit-uv-bauteil.verbindung-quelle {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* Bauteil-Face (oben, helle Frontfläche – 65% der Bauteilhöhe) */
.uv-bauteil-face {
    flex: 0 0 65%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px 2px 2px;
    gap: 3px;
}
.eit-uv-bauteil-text {
    font-size: 10px;
    color: rgba(0,0,0,0.6);
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Bauteil-Body (unten, Körperfarbe – 35% der Bauteilhöhe) */
.uv-bauteil-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.eit-uv-bauteil-symbol {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255,255,255,0.95);
    line-height: 1;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Label im Beschriftungsstreifen */
.uv-bauteil-label-strip {
    position: absolute;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #1e2329;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    padding: 0 3px;
    box-sizing: border-box;
    border-right: 1px solid #e2e4e7;
}
.uv-bauteil-label-strip.ausgewaehlt {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Abgang: angeflanscht unterhalb der Hutschiene (Ausgangsklemmenbereich) */
.eit-uv-bauteil.uv-bauteil-abgang {
    top: 70%;        /* unterhalb Hutschiene (69% = Unterkante TS35) */
    height: 28%;     /* ~40px = Ausgangsklemmenbereich */
    border-radius: 0 0 3px 3px;
    border-top: 3px solid rgba(0,0,0,0.45);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 2px 1px;
    z-index: 15;
}
.uv-abgang-bez {
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    text-align: center;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}
.uv-abgang-kuerzel {
    font-size: 8px;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    text-align: center;
    line-height: 1;
}
.uv-abgang-text {
    font-size: 7px;
    color: rgba(255,255,255,0.6);
    text-align: center;
    line-height: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Drag-Ghost */
.eit-uv-bauteil.dragging {
    opacity: 0.55;
    pointer-events: none;
    z-index: 100;
}

/* === VERBINDUNGSMODUS-BANNER === */
.eit-uv-verbindung-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #92400e;
    align-self: stretch;
}

/* === EIGENSCHAFTEN-PANEL === */
.eit-uv-eigenschaften {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.eit-uv-prop-gruppe {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.eit-uv-prop-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.eit-uv-prop-wert {
    font-size: 12px;
    color: #1e2329;
    font-weight: 500;
}
.eit-uv-prop-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 12px;
    box-sizing: border-box;
}
.eit-uv-prop-input:focus {
    outline: none;
    border-color: #2563eb;
}
.eit-uv-prop-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 12px;
    box-sizing: border-box;
}
.uv-phase-auswahl {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}
.eit-uv-wrap .uv-phase-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    padding: 4px 9px;
    border: 1.5px solid #e2e8f0;
    border-radius: 5px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    transition: all 0.12s;
    min-width: 30px;
    text-align: center;
    line-height: 1;
    box-sizing: border-box;
    margin: 0;
}
.eit-uv-wrap .uv-phase-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #f8fafc;
}
.eit-uv-wrap .uv-phase-btn.aktiv {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}
.eit-uv-prop-trennlinie {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 4px 0;
}
.eit-uv-prop-farb-vorschau {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.15);
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

/* === HINWEISE === */
.eit-uv-hinweis {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
    padding: 8px 0;
}

/* === UNTERER BEREICH === */
.eit-uv-bottom {
    background: #fff;
    border-top: 1px solid #d0d4da;
    flex-shrink: 0;
    max-height: 200px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.eit-uv-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.eit-uv-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.eit-uv-tab:hover {
    color: #2563eb;
}
.eit-uv-tab.aktiv {
    color: #2563eb;
    border-bottom-color: #2563eb;
}
.eit-uv-tab-inhalt {
    overflow-y: auto;
    flex: 1;
    padding: 10px 14px;
}

/* === VERBINDUNGSLISTE === */
.eit-uv-verbindungen-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.eit-uv-verbindungen-tabelle th {
    text-align: left;
    padding: 5px 8px;
    background: #f1f5f9;
    font-weight: 700;
    font-size: 11px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.eit-uv-verbindungen-tabelle td {
    padding: 5px 8px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.eit-uv-verbindungen-tabelle tr:hover td {
    background: #f8fafc;
}
.uv-leiter-zelle {
    white-space: nowrap;
}
.uv-leiter-cb {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-right: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: #334155;
    white-space: nowrap;
}
.uv-leiter-cb input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: #2563eb;
}
.eit-uv-verb-loeschen {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}
.eit-uv-verb-loeschen:hover {
    background: #fee2e2;
}

/* === KLEMMPLAN-VORSCHAU === */
.eit-uv-klemmplan-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.eit-uv-klemmplan-tabelle th {
    text-align: center;
    padding: 4px 6px;
    background: #1e3a5f;
    color: #fff;
    font-weight: 700;
    font-size: 10px;
    border: 1px solid #2d5080;
}
.eit-uv-klemmplan-tabelle td {
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    color: #334155;
}
.eit-uv-klemmplan-tabelle tr:nth-child(even) td {
    background: #f8fafc;
}

/* === MODAL === */
.eit-uv-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 30, 55, 0.65);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eit-uv-modal-inhalt {
    background: #fff;
    border-radius: 10px;
    width: 560px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}
.eit-uv-modal-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.eit-uv-modal-kopf h3 {
    margin: 0;
    font-size: 15px;
    color: #1e3a5f;
}
.eit-uv-modal-schliessen {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 4px;
}
.eit-uv-modal-schliessen:hover {
    background: #f1f5f9;
    color: #1e2329;
}
.eit-uv-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

/* === PLANUNG-KARTE (Modal) === */
.eit-uv-planung-karte {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: border-color 0.12s;
    cursor: pointer;
}
.eit-uv-planung-karte:hover {
    border-color: #2563eb;
    background: #eff6ff;
}
.eit-uv-planung-karte-info h4 {
    margin: 0 0 3px 0;
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
}
.eit-uv-planung-karte-info p {
    margin: 0;
    font-size: 11px;
    color: #64748b;
}
.eit-uv-planung-karte-aktionen {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* === RESPONSIVE (Tablet) === */
@media (max-width: 1024px) {
    .eit-uv-sidebar-left {
        width: 160px;
    }
    .eit-uv-sidebar-right {
        width: 180px;
    }
    .eit-uv-bauteil-btn {
        font-size: 10px;
        padding: 5px 6px;
    }
}

@media (max-width: 768px) {
    .eit-uv-main {
        flex-direction: column;
    }
    .eit-uv-sidebar-left,
    .eit-uv-sidebar-right {
        width: 100%;
        max-height: 160px;
        border-right: none;
        border-left: none;
        border-bottom: 1px solid #d0d4da;
    }
    .eit-uv-bauteil-liste {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .eit-uv-bauteil-btn {
        width: auto;
    }
    .eit-uv-toolbar {
        flex-direction: column;
        gap: 6px;
    }
    .eit-uv-toolbar-left,
    .eit-uv-toolbar-right {
        justify-content: center;
    }
}
