/* Volle Höhe & Breite für Body & HTML */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
  }
  
  
  /* Optionale Maske für bessere Lesbarkeit */
  .mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); /* 40% dunkel */
    z-index: 1;
  } 
  
  /* === Hintergrund === */
  .hintergrund {
    position: fixed;
    top: 0px;   /* Abstand vom oberen Rand */
    left: 0px;  /* Abstand vom linken Rand */
    width: 100%;
    height: 100%;
    z-index: 0; /* liegt über allem */
  }

  /* === Logo oben links === */
  .logo {
    position: fixed;
    top: 0px;   /* Abstand vom oberen Rand */
    left: 0px;  /* Abstand vom linken Rand */
    z-index: 10; /* liegt über allem */
  }
  
  .logo img {
    height: 100px;  /* oder was dir passt */
    width: auto;   /* Seitenverhältnis bleibt erhalten */
  }

  .Fehler {
    position: fixed;
    top: 0px;   /* Abstand vom oberen Rand */
    left: 190px;  /* Abstand vom linken Rand */
    z-index: 10; /* liegt über allem */
  }

  .Fehler img {
    height: 100px;  /* oder was dir passt */
    width: auto;   /* Seitenverhältnis bleibt erhalten */
  }

  /* === Made in Germany oben rechts === */
.made-in-germany {
    position: fixed;
    top: 0px;    /* Abstand vom oberen Rand */
    right: 0px;  /* Abstand vom rechten Rand */
    z-index: 10;  /* liegt über allem */
  }
  
  .made-in-germany img {
    height: 100px;  /* Größe anpassen */
    width: auto;   /* Seitenverhältnis bleibt erhalten */
  }

  .status-indicator-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: rgb(175, 173, 173);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 5;
    transition: background-color 0.5s ease;
  }
  
  .status-indicator-left {
    position: fixed;
    top: 0;
    left: 0;
    width: 100px;
    height: 100vh; /* 100% der Viewport-Höhe */
    background-color: rgb(175, 173, 173);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 5;
    transition: background-color 0.5s ease;
  }

  .masken-header-top {
    position: fixed;
    top: 100px;    /* unter der top-Leiste */
    left: 100px;   /* rechts neben der linken Leiste */
    right: 0;
    height: 100px;
    z-index: 20;

    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;

    /* Reicht die Breite nicht für alle Buttons (schmale Panels, viele
       Einträge in einer Leiste), wird die Leiste horizontal scrollbar,
       statt die Buttons zu stauchen oder rechts abzuschneiden. */
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

  .masken-header-top > * {
    flex: 0 0 auto;
}

.masken-header-top button {
    width: 200px;
    height: 100px;
    font-size: 1rem;
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    box-sizing: border-box;
}

.button-image-left {
    width: 100px;
    height: 100px;
    object-fit: contain; /* Bild skaliert proportional */
}

.button-image-top {
    width: 140px;
    height: 100px;
    object-fit: contain; /* Bild skaliert proportional */
}

  .masken-header-left {
    position: fixed;
    top: 100px;    /* unter der top-Leiste */
    left: 0px;   /* rechts neben der linken Leiste */
    width: 100px;    
    bottom: 0px;  /* bis ganz unten */
    
    z-index: 20;
    overflow-y: auto;
    /* --- NEUE ZEILEN --- */
padding-bottom: 100px; /* Fügt einen Puffer am Ende hinzu */
box-sizing: border-box;  /* Stellt sicher, dass Padding die Breite nicht verändert */
  }

  .masken-header-left button {
    width: 100px;
    height: 100px;
    margin-right: 20px;
    padding: 0; /* Padding auf 0, damit es keine Größe addiert */
    font-size: 1rem;
    box-sizing: border-box; /* sicherstellen, dass Breite/Höhe inkl. Padding/Border gilt */
    background-color: transparent; /* macht den Hintergrund durchsichtig */
    border: none;                  /* optional: entfernt den Rahmen */
    padding: 0;                   /* optional: für Bild-Buttons oft passend */
    cursor: pointer;              /* Zeigt den Zeiger an */
  }
  
  #FehlerAnzeige {
  position: absolute;      /* Positionieren relativ zum nächsten positionierten Elternteil */
  top: 20px;               /* Abstand von oben */
  left: 300px;             /* Abstand von links */
  width: 500px;            /* Breite */
  height: 60px;            /* Höhe */
  font-size: 16px;         /* Schriftgröße */
  padding: 5px;            /* Innenabstand */
  border-radius: 5px;      /* Abgerundete Ecken */
  border: 1px solid #ccc;  /* Rahmen */
  background-color: white; /* Hintergrund */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* leichter Schatten */
  z-index: 1000;           /* Damit es über anderen Elementen liegt */
}

/* Container */
.lizenz-container {
    background-color: #b3ecf2;
    border: 2px solid #0099cc;
    border-radius: 20px;
    width: 80%;
    height: 80%;
    padding: 10px;
    font-family: Arial, sans-serif;
    margin: 0 auto;
  }

/* Überschrift */
.lizenz-container h2 {
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 24px;
}

/* Zeile */
.lizenz-row {
  display: flex;
  border-top: 1px solid #0099cc;
}

/* Linke & rechte Zelle */
.lizenz-label,
.lizenz-value {
  flex: 1;
  padding: 10px;
  border-right: 1px solid #0099cc;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.lizenz-label {
  font-weight: bold;
  background-color: #e6faff;
}

.lizenz-value:last-child {
  border-right: none;
}

/* Eingabefelder */
.input-box {
  width: 100%;
  height: 35px;
  font-size: 16px;
  padding: 5px 10px;
  box-sizing: border-box;
}

/* Status-Anzeige (z. B. rote Kugel) */
.status-light {
  width: 30px;
  height: 30px;
  background-color: red;
  border-radius: 50%;
  margin: auto;
  border: 2px solid #666;
}

  #login-button {
    position: fixed;
    bottom: 0px;
    left: 0px;
    width: 100px;
    height: 100px;
    z-index: 9999;
    
    background: transparent; /* Hintergrund durchsichtig */
    border: none;            /* Keine Rahmen */
    padding: 0;              /* Kein Innenabstand */
    cursor: pointer;         /* Zeigt beim Hover die Hand an */
  }
  
  #login-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  /* =================================================== */
  /*  Spezifische Stile NUR für die Login-Seite          */
  /* =================================================== */

  /* Definiert den Haupt-Container der Login-Seite als Flexbox. */
  #full_Screen #login-page-container {
    width: 100%; 
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;    
    padding: 20px; 
    box-sizing: border-box; 
    height: 80%; 
  }

  #full_Screen iframe {
    width: 100%;
    height: 100%;
    border: none;
    
  }

  /* Das Login-Formular selbst wird zum Flex-Container. */
  #full_Screen #login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Etwas mehr Breite für die größeren Elemente */
    max-width: 500px;
    width: 100%;
  }

  /* Die Überschrift innerhalb des Login-Formulars. */
  #full_Screen #login-form #login-text {
    /* Vergrößert die Schrift der Überschrift deutlich */
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 40px; /* Mehr Abstand nach unten */
  }

  /* Die Eingabefelder (Benutzername und Passwort). */
  #full_Screen #login-form input[type="text"],
  #full_Screen #login-form input[type="password"] {
    /* Macht die Felder breiter */
    width: 350px; 
    
    /* Vergrößert den Text und die Höhe der Felder */
    font-size: 1.2em;
    padding: 15px; 

    box-sizing: border-box; 
    margin-bottom: 30px; /* Vergrößert den Abstand zwischen den Feldern */
  }

  /* Der finale Login-Button. */
  #full_Screen #login-form button[type="submit"] {
    /* Macht den Button größer und den Text darin fetter */
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer; /* Zeigt eine Hand beim Überfahren mit der Maus */
  }

  .group-id {
      position: absolute;
      right: 0px;
      bottom: 0px;
      background: transparent;
      color: rgb(0, 0, 0);
      font-size: 20px;
      padding: 2px 6px;
      border-radius: 6px;
    }

  .split-container {
    position: absolute;
    top: 200px;
    left: 100px;
    right: 0;
    bottom: 0;
  
    display: flex;
  }
  
  .pane {
    flex: 1; /* beide Fenster gleich breit */
    overflow: auto; /* Scrollbar bei Überlauf */
    padding: 20px; /* optional für Innenabstand */
    box-sizing: border-box;
    border: 1px solid #ccc; /* optional, um die Fenster zu sehen */
  }
  
  .left {
    border-right: 2px solid #000; /* Trenner in der Mitte */
  }
  
  #logs-pane {
    white-space: pre-wrap;  /* Zeilenumbrüche UND Umbruch bei langen Wörtern */
    word-wrap: break-word;  /* Lange Wörter umbrechen */
    overflow-y: auto;       /* Scrollbar bei Bedarf */
  }
  
  .feftron-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 15;
    width: 150px;  /* Bildgröße anpassen */
    height: auto;
  }

  .feftron-status img {
    width: 100%;
    height: auto;
  }

  /* --- Feftron Chat Panel: standardmäßig sichtbar, per Klick auf das Feftron-Icon ausblendbar --- */
  .feftron-status {
    cursor: pointer;
  }

  .feftron-chat-panel {
    position: fixed;
    bottom: 170px;
    right: 10px;
    z-index: 16;
    width: 320px;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }

  .feftron-chat-panel.collapsed {
    display: none;
  }

  .feftron-chat-header {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: bold;
    color: #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .feftron-chat-status {
    padding: 6px 14px;
    font-size: 0.8rem;
    color: #555;
    font-style: italic;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .feftron-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
  }

  .feftron-chat-message {
    max-width: 85%;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .feftron-chat-message.from-operator {
    align-self: flex-end;
    background: rgba(0, 123, 255, 0.85);
    color: #fff;
  }

  .feftron-chat-message.from-remote,
  .feftron-chat-message.from-system {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.6);
    color: #222;
  }

  .feftron-chat-message img {
    max-width: 100%;
    border-radius: 6px;
    display: block;
    margin-top: 4px;
  }

  .feftron-chat-input-row {
    display: flex;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
  }

  .feftron-chat-input-row input {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.7);
  }

  .feftron-chat-input-row button {
    border: none;
    border-radius: 6px;
    background: #007bff;
    color: #fff;
    padding: 6px 12px;
    cursor: pointer;
  }

  .feftron-chat-input-row button:disabled {
    background: #aaa;
    cursor: not-allowed;
  }
/* Recipe Widget Styles */
.recipe-row:hover {
    background-color: rgba(0,0,0,0.05);
}
.recipe-list-container::-webkit-scrollbar {
    width: 6px;
}
.recipe-list-container::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}
  /* Anzeige */
  #full_Screen {
    position: fixed;
    top: 200px;
    left: 100px;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.25);
    overflow-y: auto;
    font-family: monospace;
    color: #222;
    white-space: pre-wrap;
    z-index: 3;
  }



  .flag-container {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }
        .flag-form {
            display: inline-block;
            text-align: center;
        }
        .flag-form button {
            border: none;
            background: none;
            cursor: pointer;
            padding: 0;
        }
        .flag-form img {
            width: 240px;
            height: 160px;
            border: 2px solid transparent;
            transition: all 0.2s ease-in-out;
        }
        .flag-form img:hover {
            border-color: #666;
        }
        .active-language img {
            border-color: #007bff;
            box-shadow: 0 0 8px rgba(0, 123, 255, 0.7);
        }
   
        .status-flex {
  display: flex;
  align-items: flex-start;
  gap: 2em;
  /* Füge hier dein bisheriges Styling für #full_Screen ein, z.B. Hintergrund etc. */
}
#statusOutput {
  flex: 1 1 auto;
  min-width: 0;
}
#restart-btn {
  flex: 0 0 auto;
  padding: 0.6em 2.4em;
  font-size: 1.2em;
  font-weight: bold;
  border-radius: 6px;
  background: #249ad6;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: 2em;
  height: fit-content;
  align-self: flex-start;
}
#restart-btn:active {
  background: #1575a6;
}

#push-btn,
#pull-btn {
  flex: 0 0 auto;
  padding: 0.6em 2.4em;
  font-size: 1.2em;
  font-weight: bold;
  border-radius: 6px;
  background: #249ad6;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: 2em;
  margin-bottom: 1em;
  height: fit-content;
  align-self: flex-start;
}
#push-btn:active,
#pull-btn:active {
  background: #1575a6;
}


tr.child-row {
  display: none;
}

tr.expanded + tr.child-row {
  display: table-row;
}

.toggle-btn {
  cursor: pointer;
  user-select: none;
  margin-right: 8px;
  font-weight: bold;
}

#test-opcua-write {
  position: fixed;
  top: 0;
  right: 370px;
  z-index: 999;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  font-family: monospace;
  color: #333;
}
/* =================================================== */
/*  Stile für das zweispaltige Layout                  */
/* =================================================== */
/* =================================================== */
/*  Modern Service Page Layout & Styling               */
/* =================================================== */

/* --- General Layout --- */
.layout-container {
  display: flex;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7fa;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  height: 70vh;
  overflow: hidden; /* Prevents inner content from spilling out */
}
#tree-column {
  flex: 0 0 400px; /* Fixed width for the tree column */
  padding: 25px;
  border-right: 1px solid #e0e6ed;
  background-color: #ffffff;
  overflow-y: auto; /* Scrollbar if tree is long */
  transition: all 0.3s ease;
}

#info-column {
  flex: 1; /* Takes up the remaining space */
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #f4f7fa;
}

/* =================================================== */
/* --- Tree View Styling (CORRECTED) ---              */
/* =================================================== */
.tree, .tree ul {
  list-style-type: none;
  padding-left: 0;
}

.tree ul {
  padding-left: 20px;
  margin-left: 10px;
  border-left: 2px solid #e0e6ed;
}

/* LI is now just a structural container, no visuals */
.tree li {
  margin: 4px 0;
  cursor: pointer;
}

/* NEW: All visuals are now on .node-content */
.tree .node-content {
  padding: 10px 15px;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  font-size: 1.0em;
  font-weight: 500;
  color: #33475b;
  border: 2px solid transparent; /* Reserve space for border to prevent layout shift */
}

.tree li.has-children > .node-content::before {
  content: '\25B6'; /* Triangle Right */
  display: inline-block;
  margin-right: 10px;
  transition: transform 0.2s ease;
  font-size: 0.8em;
}

.tree li.expanded > .node-content::before {
  transform: rotate(90deg); /* Triangle Down */
}


.tree li:not(.active):hover > .node-content {
  background-color: #e9ecef;
}


.tree li.active > .node-content {
  background-color: #4197f3;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(66, 145, 229, 0.2);
}


/* --- Info Column Styling --- */
#info-content h2 {
  font-size: 2em;
  font-weight: 600;
  color: #1a2533;
  margin-top: 0;
  border-bottom: 2px solid #e0e6ed;
  padding-bottom: 15px;
}

#info-details {
  white-space: nowrap;
}

.info-placeholder {
  color: #777;
  font-style: italic;
  font-size: 1.2em;
  text-align: center;
  margin-top: 50px;
}

.service-hours {
  margin-top: 30px;
}

.service-label {
  font-size: 1.1em;
  color: #555;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
}

/* =================================================== */
/*  Stile für den "Service fällig"-Warnzustand (CORRECTED) */
/* =================================================== */

/* Stil für Eltern-Elemente, deren Kinder Service benötigen */
.tree li.has-child-service-alert > .node-content {
  border-color: #ffc107; /* A prominent yellow border */
  background-color: #ffec8f; /* A very light yellow */
}

/* Stil für das betroffene Element selbst (überschreibt das Gelb) */
.tree li.needs-service > .node-content {
  border-color: #dc3545; /* A prominent red border */
  background-color: #f8d7da; /* Light red background */
}

/* --- Warnmeldung in der Infospalte --- */
.service-alert {
  background-color: #fffbe6;
  border: 1px solid #ffe58f;
  border-left: 5px solid #ffc107;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  font-size: 1.1em;
  color: #856404;
}
.service-alert::before {
  content: '!';
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  font-size: 1.5em;
  color: #ffc107;
  margin-right: 15px;
  line-height: 1;
}

/* --- Warn-Progress-Bar --- */
.progress-bar.warning {
  background: linear-gradient(90deg, #dc3545, #c82333); /* Red gradient */
}

/* --- Progress Bar General Styling --- */
.progress-bar-container {
  width: 100%;
  height: 25px;
  background-color: #e9ecef;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  white-space: nowrap; 
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #00d4ff);
  width: 0%; /* Initial width */
  border-radius: 25px;
  transition: width 0.5s ease-in-out;
  text-align: center;
  line-height: 25px;
  color: black;
  z-index: 100;
  font-weight: bold;
}

/* --- Reset Button Styling --- */
#reset-button-container {
  text-align: left;
  margin-top: 30px;
  display: none;
}

#reset-btn {
  padding: 12px 25px;
  font-size: 1em;
  font-weight: bold;
  color: #fff;
  background-color: #dc3545;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

#reset-btn:hover {
  background-color: #c82333;
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

/* For tablets and smaller devices (e.g., iPad portrait) */
@media (max-width: 900px) {
  .layout-container {
    /* Stack the columns vertically instead of side-by-side */
    flex-direction: column;
    
    /* Allow the container to grow with the content and become scrollable */
    height: auto;
    overflow-y: auto;
  }

  #tree-column {
    /* Remove the fixed width; let it fill the screen width */
    flex: 1 1 auto; 
    
    /* To prevent the tree from taking up too much vertical space */
    max-height: 45vh; 
    
    /* Replace the side border with a bottom border for separation */
    border-right: none;
    border-bottom: 2px solid #e0e6ed;
  }

  #info-column {
    /* Adjust padding for smaller screens */
    padding: 25px;
    
    /* This ensures the content (including the button) flows naturally from the top */
    justify-content: flex-start; 
  }
}

/* For smaller mobile phones, to prevent text from squeezing together */
@media (max-width: 480px) {
  .service-label {
    /* Stack the "Betriebsstunden" text on top of the values */
    flex-direction: column;
    align-items: flex-start;
    gap: 8px; /* Adds space between the stacked items */
  }
  
  #tree-column, #info-column {
    /* Further reduce padding for very narrow screens */
    padding: 15px;
  }

  #info-content h2 {
    font-size: 1.6em;
  }

  #reset-btn {
    /* Make the button take the full width for easier tapping */
    width: 100%;
    padding: 15px;
  }
}
/* =================================================== */
/*  Stile für OPC UA Admin Seite                       */
/* =================================================== */

/* Container für die Admin-Seite innerhalb von #full_Screen */
.opcua-admin-container {
  max-width: 1200px;
  margin: 0 auto; /* Zentriert den Inhalt, falls #full_Screen breiter ist */
  padding: 1em;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; /* Modernere Schriftart */
  color: #333;
}

.opcua-admin-container h1, 
.opcua-admin-container h2 {
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.5em;
  margin-top: 0;
  margin-bottom: 1em;
}

/* --- COMBOBOX STYLE (Input mit Datalist) --- */
input[list] {
  /* Kleiner Pfeil nach unten als Hintergrundbild */
  /* background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M0 0 L5 6 L10 0" fill="%23666"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
  padding-right: 25px; /* Platz für den Pfeil */
  cursor: pointer;
}

/* Beim Hovern den Pfeil dunkler machen */
/* input[list]:hover {
  /* background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M0 0 L5 6 L10 0" fill="%23000"/></svg>'); 
} */
.opcua-admin-container h1 {
  font-size: 2.2em;
}

.opcua-admin-container h2 {
  font-size: 1.8em;
}

/* Tabellen-Styling */
.opcua-admin-container table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5em;
}

.opcua-admin-container th, 
.opcua-admin-container td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: left;
  vertical-align: middle;
  font-size: 1.1em; /* Größere Schrift in den Tabellen */
}

.opcua-admin-container th {
  background-color: #f8f8f8;
  font-weight: 600;
}

/* Styling für Eingabefelder */
.opcua-admin-container input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.opcua-admin-container input[type="text"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,.25);
  outline: none;
}

/* Styling für Buttons */
.opcua-admin-container button {
  padding: 10px 15px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  color: white;
  transition: background-color 0.2s, transform 0.1s;
}

.opcua-admin-container button:active {
  transform: scale(0.98);
}

.opcua-admin-container .actions {
  display: flex;
  gap: 8px;
}

.opcua-admin-container .save-button, 
.opcua-admin-container #add-button, 
.opcua-admin-container .save-base-button {
  background-color: #28a745; /* Grün */
}

.opcua-admin-container .save-button:hover, 
.opcua-admin-container #add-button:hover, 
.opcua-admin-container .save-base-button:hover {
  background-color: #218838;
}

.opcua-admin-container .delete-button {
  background-color: #dc3545; /* Rot */
}

.opcua-admin-container .delete-button:hover {
  background-color: #c82333;
}


/* =================================================== */
/*  RESPONSIVES LAYOUT FÜR ADMIN-SEITEN (2 Spalten)    */
/* =================================================== */

/* Der Haupt-Container, der die beiden Spalten enthält */
.admin-layout-container {
  display: flex; /* Aktiviert das Flexbox-Layout (nebeneinander) */
  flex-direction: row; /* Richtet die Spalten nebeneinander aus */
  gap: 20px; /* Ein Abstand zwischen den Spalten */
  height: 100%; /* Füllt die verfügbare Höhe aus */
}

/* Styling für beide Spalten (links und rechts) */
.admin-panel {
  overflow-y: auto; /* Fügt eine Scrollbar hinzu, falls der Inhalt zu lang ist */
  height: 100%;
}

/* Spezifische Breiten für die Desktop-Ansicht */
.admin-panel-left {
  flex: 0 0 40%; /* Nimmt 40% der Breite ein, wächst/schrumpft nicht */
}

.admin-panel-right {
  flex: 1; /* Nimmt den restlichen verfügbaren Platz ein */
}


/* =================================================== */
/*  ANPASSUNG FÜR TABLETS UND KLEINERE BILDSCHIRME     */
/* =================================================== */

/* Diese Regeln gelten nur, wenn der Bildschirm 1024px breit oder schmaler ist (z.B. iPad im Hochformat) */
@media (max-width: 1024px) {

  /* Ändert die Ausrichtung von nebeneinander zu untereinander */
  .admin-layout-container {
    flex-direction: column; /* Stapelt die Spalten vertikal */
  }

  /* Beide Spalten sollen nun die volle Breite einnehmen */
  .admin-panel-left,
  .admin-panel-right {
    flex-basis: auto; /* Setzt die Breiten zurück */
    width: 100%;
  }

  /* Fügt einen Abstand unter der ersten Spalte hinzu, wenn sie gestapelt sind */
  .admin-panel-left {
    margin-bottom: 20px;
  }
}

/* =========================================
   HMI / GHOST DESIGN (TRANSPARENT)
   ========================================= */

#canvas-scroll-wrapper {
    width: 100%; height: 100%; overflow: auto;
    background-color: transparent;
    border: none;
    position: relative;
}

.grid-canvas {
    display: grid;
    grid-auto-rows: 40px; 
    gap: 0; 
    padding: 0;
    background-color: transparent; 
    min-width: 100%; min-height: 100%; box-sizing: border-box;
}

/* --- EDITOR MODUS: Hilfslinien & Rahmen --- */
.grid-canvas.editor-grid {
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.1) 1px, transparent 1px);
}

/* Im Editor haben Widgets einen gestrichelten Rahmen und sind bewegbar */
.editor-grid .widget-card {
    border: 1px dashed #555 !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    cursor: move;
}

/* --- WIDGET KARTEN (Viewer = Clean) --- */
.widget-card {
    background-color: transparent !important; 
    color: #333; 
    overflow: hidden;
    z-index: 10;
    margin: 2px; 
    width: calc(100% - 4px); 
    height: calc(100% - 4px);
    
    display: flex; flex-direction: column;
    padding: 0 4px;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    
    /* Im Viewer: Keine Rahmen, keine Schatten */
    border: none;
    box-shadow: none;
}

/* Selektiertes Widget im Editor */
.widget-card.selected {
    outline: 2px solid #ffc107; 
    border: 1px solid #ffc107 !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    z-index: 50;
}

/* ÄNDERBARE FELDER (Input Boxen) */
.widget-card.editable {
    /* Im Viewer kein Rahmen um die Karte selbst, nur Inputs sind sichtbar */
}

/* --- INPUTS --- */
.input-box {
    background-color: transparent !important;
    border: 1px solid rgba(0,0,0,0.3); 
    border-radius: 2px;
    padding: 0 5px; 
    font-size: 13px; height: 22px; width: 100%;
    color: #000; font-weight: 600;
    transition: border-color 0.2s;
}

.input-box:focus { 
    border-color: #007bff; 
    background-color: rgba(255,255,255,0.2) !important;
    outline: none; 
}

/* ReadOnly Inputs (sehen aus wie Text) */
.input-box:disabled {
    background: transparent !important; 
    border: none; 
    color: #333; 
    font-weight: 500; 
    padding-left: 0;
    opacity: 1; 
    -webkit-text-fill-color: #333;
}

/* Dropdown Optionen (müssen Hintergrund haben, sonst unlesbar) */
select.input-box {
    background-color: rgba(255, 255, 255, 0.9) !important; /* Fast weiß */
    color: #333 !important;
    cursor: pointer;
}

/* Die Optionen im Dropdown immer weiß */
select.input-box option {
    background-color: #fff;
    color: #000;
}
/* --- SPEZIALELEMENTE --- */
.props {
    overflow-x: hidden; /* X-Scroll verbieten */
    overflow-y: auto;
    padding: 10px; /* Etwas weniger Padding */
    box-sizing: border-box;
    width: 320px;
    flex-shrink: 0;
    font-size: 13px; /* Schrift etwas kleiner */
}

/* Inputs & Selects passen sich an */
.props .input-box, 
.props select, 
.props button {
    max-width: 100%; /* Niemals breiter als der Container */
    box-sizing: border-box;
}
/* Bit Tabelle */
.bit-row {
    display: flex; align-items: center; 
    border-bottom: 1px solid rgba(0,0,0,0.1);
    height: 24px; padding: 0 2px;
}
.bit-row:last-child { border-bottom: none; }
.bit-row:nth-child(even) { background-color: transparent; }
.bit-node-id {
    font-size: 10px;
    color: #999;
    word-break: break-all; /* Lange IDs umbrechen */
    margin-top: 2px;
}
.bit-config-row {
    border: 1px solid #eee;
    padding: 5px;
    margin-bottom: 5px;
    background-color: #fdfdfd;
    border-radius: 3px;
}
#save-config-btn { background-color: #28a745; color: white; }
#save-config-btn:hover { background-color: #218838; }
.widget-card.type-image,
.widget-card.type-static-text {
    z-index: 1; /* Ganz unten */
    background-color: transparent !important; /* Sicherstellen dass es transparent ist */
}
.widget-card.type-image {
    pointer-events: none; 
}
.widget-card.type-button,
.widget-card.type-number,
.widget-card.type-text,
.widget-card.type-dropdown,
.widget-card.type-checkbox,
.widget-card.type-bitfield,
.widget-card.type-gauge {
    z-index: 20; /* Über den Bildern liegen */
    position: relative; /* Nötig für z-index */
}
.editor-grid .widget-card {
    pointer-events: auto !important; 
    z-index: 10; /* Im Editor alle auf einer Ebene (oder selektiert höher) */
}

.editor-grid .widget-card.selected {
    z-index: 100; /* Das ausgewählte Item immer ganz oben */
}


/* Zurück Button */
a.action-btn { 
    background-color: #6c757d; color: white; text-decoration: none; 
}
a.action-btn:hover { background-color: #5a6268; }

/* Im Editor die Bit-Reihen etwas deutlicher trennen */
.editor-grid .bit-row {
    border-bottom: 1px dashed rgba(0,0,0,0.15);
}

.bit-led {
    width: 10px; height: 10px; border-radius: 50%; 
    border: 1px solid #555; 
    background: transparent; 
    margin-right: 6px; flex-shrink: 0;
}
.flex-row {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap; /* WICHTIG: Umbruch erlauben */
}

/* Buttons im Header sauberer */
.action-bar .action-btn {
    padding: 6px 15px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    display: flex; 
    align-items: center; 
    gap: 5px;
}
.action-btn:hover { background-color: #0056b3; }
.action-btn:disabled { 
    background-color: rgba(0,0,0,0.1); 
    border: 1px solid rgba(0,0,0,0.2); 
    color: #555; 
    box-shadow: none; 
}

/* Labels */
.widget-label {
    font-size: 10px; color: #222; font-weight: bold;
    text-transform: uppercase; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-shadow: 0px 0px 2px rgba(255,255,255,0.5);
}

/* Gauge & Bild */
.gauge-container { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.widget-card img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

/* Modal (Bildauswahl) */
.img-modal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 10px; max-height: 300px; overflow-y: auto; border: 1px solid #eee; padding: 10px; }
.img-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; padding: 5px; border: 1px solid transparent; border-radius: 4px; }
.img-item:hover { background-color: #f0f8ff; border-color: #007bff; }
.img-preview { width: 60px; height: 60px; object-fit: contain; margin-bottom: 5px; }
.img-folder-icon { font-size: 40px; color: #ffc107; margin-bottom: 5px; }
.img-name { font-size: 11px; text-align: center; word-break: break-word; }