:root {
  /* 🌤️ Frisches, barrierearmes KI-Design (gute Lesbarkeit + moderner Look) */

  /* Grundfarben */
  --color-bg: #F7FAFC;          /* Sehr hell, leicht blau getönt – aber kein reines Weiß */
  --color-surface: #FFFFFF;     /* Weiß für Inhalte und Panels */
  --color-sidebar: #F2F6F8;     /* Leicht abgesetzter Bereich – weich und angenehm fürs Auge */
  --color-border: #CBD5E1;      /* Mittelhelles Grau mit genug Kontrast */
  --color-text: #1E293B;        /* Dunkles Anthrazit – klare, kontrastreiche Lesbarkeit */

  /* Akzentfarben (sanft, aber kontraststark genug) */
  --color-accent: #1D9BF0;      /* Kräftiges, modernes KI-Blau (inspiriert von Twitter/X-UI) */
  --color-accent2: #3ABEF9;     /* Hellere Variante für Hover oder sekundäre Buttons */
  --color-contrast: #0C4A6E;    /* Dunkler Gegenpol für Fokus- oder aktive Zustände */

  /* Layout & Effekte */
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --sidebar-width: 240px;
  --transition: 0.25s ease;
  --topbar-h: 64px;
}



/* ========================================
   📐 Grundlayout
======================================== */
* { box-sizing: border-box; }

body {
  margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   🔝 Topbar
======================================== */
.topbar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  padding: 12px 24px 12px 16px;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--topbar-h);
}

.topbar-left { display: flex; align-items: center; }
.topbar-left img.logo { height: 40px; }

.topbar-right a {
  color: var(--color-accent);
  font-weight: bold;
  text-decoration: none;
  transition: color var(--transition);
}
.topbar-right a:hover { color: var(--color-contrast); }

/* ========================================
   🍔 Menü-Button
======================================== */
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 6px 10px;
  margin-right: 12px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.menu-btn:hover { background: rgba(0,0,0,0.05); }

/* ========================================
   🧱 Container & Sidebar
======================================== */
.container {
  flex: 1;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-height: 0;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-sidebar);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: width 0.3s ease;
}

.sidebar nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar nav li { margin-bottom: 8px; }

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease;
}

.sidebar nav a i {
  font-size: 18px;
  color: var(--color-accent);
}

.sidebar nav a:hover {
  transform: scale(1.03);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}

/* ========================================
   📄 Content
======================================== */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  margin: 24px auto;
  padding: 0px 20px 0px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 1200px;
  width: 100%;

}

/* ========================================
   ⚓ Footer
======================================== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  margin-top: 3rem;
  text-align: center;
  color: #666;
  font-size: 0.7rem;
}
.footer a { color: var(--color-accent); text-decoration: none; margin: 0 8px; }
.footer a:hover { color: var(--color-contrast); text-decoration: underline; }

/* ========================================
   🧭 Seitenlayout: Content + Infobox
======================================== */
.page-area {
  display: flex;
  flex: 1;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* Content */
.page-area .content {
  flex: 1 1 780px;
  max-width: 1400px;
  margin: 0;
  min-width: 0;
}


/* ========================================
   🔔 Alerts (Systemmeldungen)
======================================== */
.alert-box {
  margin: 1rem 0;
  padding: 1rem 2.5rem 1rem 1.25rem;
  border-radius: var(--radius);
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 15px;
  line-height: 1.5;
  transition: all 0.3s ease;
}

.alert-close {
  position: absolute;
  top: 6px;
  right: 6px;
  background: none;
  border: none;
  font-size: 40px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
  color: var(--color-text);
}
.alert-close:hover { opacity: 1; }

.alert-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #256029;
  font-weight: bold;
}

.alert-error {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #842029;
  font-weight: bold;
}

/* ===========================
   🔹 Allgemeine Formularstruktur
   =========================== */



 /* 🔹 Formular-Container */
form {
     width: 100%;
    display: block;
}

/* 🔸 Labels */
form label {
    display: block;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.1rem;
    color: #1a1a1a;
    font-size: 0.95rem;
}

/* 🔸 Eingabefelder */
form input,
form select,
form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #f8fafc;
    font-size: 1rem;
    transition: border-color 0.2s, background-color 0.2s;
    font-family: inherit;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--color-accent2);
    background-color: #eef4ff;
}

/* 🔸 Buttons allgemein (Primary) */

/* 🔹 Sekundärer Button (grau – Abbrechen, Zurück etc.) */
.btn-secondary {
    display: inline-block;
    width: fit-content;
    background-color: #6c757d;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.4rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.8rem;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
}

.btn-secondary:hover {
    background-color: #7b858c;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* 🔺 Gefahren-Button (rot – Löschen etc.) */
.btn-danger {
    display: inline-block;
    width: fit-content;
    background-color: #d9534f;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.4rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.8rem;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
}

.btn-danger:hover {
    background-color: #e35d59;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(217,83,79,0.4);
}


.btn-first {
    display: inline-block;
    width: fit-content;
    background-color: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.4rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.8rem;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
}

.btn-first:hover {
    background-color: var(--color-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--color-accent2);
}




/* 🔸 Links im Formular (z. B. „Passwort vergessen?“) */
form a {
    display: inline-block;
    color: var(--color-accent2);
    text-decoration: underline;
    font-weight: 500;
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-right: 1.2rem;
}

form a:hover {
    color: var(--color-contrast);
    text-decoration-thickness: 2px;
}

/* 🔸 Icons in Buttons & Links */
form a i,
form button i,
.btn i {
    margin-right: 6px;
}






/* Fieldset */
fieldset {
    border: none;
    margin: 3rem 0rem 0rem 0rem;
    padding: 0rem;
    border-top: 2px solid var(--color-border);
}

legend {
    font-weight: 700;
    color: var(--color-accent);
    font-size: 1.3rem;
    margin-left: 1rem;
    background-color: var(--color-surface);
    position: relative;
    top: -0.5rem;
}

.fieldset-description {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 10px;
    margin-top: -5px;
    line-height: 1.4;
}

fieldset label:first-of-type { margin-top: 0.5rem; }

fieldset:focus-within {
    border-top-color: var(--color-accent2);
    transition: border-color 0.3s ease-in-out;
}

/* ========================================
   🧭 Sidebar States
======================================== */
.sidebar.collapsed {
  width: 100px;
  overflow-x: hidden;
  padding: 5px;
}

.sidebar.collapsed nav a {
  flex-direction: column;
  justify-content: center;
  height: 55px;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
}

.sidebar.collapsed nav a i {
  margin-bottom: 4px;
  transition: transform 0.25s ease;
}

.sidebar.collapsed nav a:hover i {
  transform: scale(1.2);
}

/* ========================================
   📱 Responsive Layout
======================================== */
@media (max-width: 1200px) {
  .sidebar {
    width: 100px;
    padding: 10px;
  }
  .sidebar nav a {
    flex-direction: column;
    font-size: 0.8rem;
    text-align: center;
  }
  .page-area {
    flex-direction: column;
    gap: 12px;
      padding: 0px;
  }
  .infobox-wrapper {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 800px) {
  .sidebar {
    display: none;
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    height: calc(100% - var(--topbar-h));
    z-index: 300;
  }
  .sidebar.open {
    display: flex;
  }



}
          

/* Pflichtfelder */
input[required],
select[required],
textarea[required] {
  border-inline-start: 6px solid var(--color-accent);
  box-sizing: border-box;
}
input[required]:focus,
select[required]:focus,
textarea[required]:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

/* Entfernt Standardrahmen */
input, select, textarea { border: 0; }

/* ========================================
   🔹 Boxen
======================================== */
.autoCol {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.5rem;
    max-width: 1300px;
}


.box {
    flex: 1 1 30%;
    min-width: 300px;
    background: var(--color-sidebar);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.box h2 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--color-text);
}

.box p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.box a {
    display: inline-block;
    align-self: flex-start;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.box a:hover { background: var(--color-contrast); }

/* Responsive Anpassung */
@media (max-width: 1200px) {
    .box { flex: 1 1 45%; }
}
@media (max-width: 800px) {
    .box { flex: 1 1 100%; }
}



/* ========================================
   🔹 Volle Breite für spezielle Boxen
======================================== */
.boxFull {
    width: 100%;
    flex: 1 1 100%;
    background: var(--color-sidebar);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.8rem;
    box-sizing: border-box;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 2rem;

      overflow-x: auto; /* ermöglicht horizontales Scrollen nur in der Box */
  overflow-y: visible; /* vertikal normal weiterlaufen */
}

.boxFull:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.boxFull h2 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--color-text);
}

.boxFull p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.boxFull table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.boxFull th,
.boxFull td {
    text-align: left;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #e3e6eb;
}

.boxFull th {
    background: #f8fafc;
    font-weight: 600;
}


.boxFull table {
  white-space: nowrap;
}


@media (max-width: 800px) {
    .boxFull { flex: 1 1 100%; }
}



/* breadcrumb */
.breadcrumb {
    margin: 10px 0px 0px 0px;
    font-size: 0.7rem;
    color: #555;
}
.breadcrumb a {
    color: var(--color-accent);
    text-decoration: none;
}
.breadcrumb a:hover { color: var(--color-contrast); }
.breadcrumb .sep {
    margin: 0 0.4em;
    color: #aaa;
}
.breadcrumb .current {
    color: #222;
    font-weight: 600;
}

/* Überschriften */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 10px;
    margin-top: 5px;
    padding-top: 10px;
    letter-spacing: -2px;
    border-top: 2px solid var(--color-accent);
}




 /* =========================================
   🧱 FLEXIBLE GRID-COLS (Bootstrap-Style)
   ========================================= */

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

/* ================================
   FLEX GRID MIT FIX: -20px BREITE
================================ */

.col-100 { flex: 0 0 calc(100% - 20px); }
.col-75  { flex: 0 0 calc(75%  - 20px); }
.col-66  { flex: 0 0 calc(66.66% - 20px); }
.col-60  { flex: 0 0 calc(60% - 20px); }
.col-50  { flex: 0 0 calc(50% - 20px); }
.col-40  { flex: 0 0 calc(40% - 20px); }
.col-33  { flex: 0 0 calc(33.33% - 20px); }
.col-30  { flex: 0 0 calc(30% - 20px); }
.col-25  { flex: 0 0 calc(25% - 20px); }
.col-20  { flex: 0 0 calc(20% - 20px); }
.col-10  { flex: 0 0 calc(10% - 20px); }

/* Mobile: alles untereinander */
@media (max-width: 900px) {
    .col-75,
    .col-66,
    .col-60,
    .col-50,
    .col-40,
    .col-33,
    .col-30,
    .col-25,
    .col-20,
    .col-10 {
        flex: 0 0 100%;
    }
}





/* =========================================
   🔘 Toggle-Switch Checkbox (ON / OFF)
   ========================================= */

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    margin-top: 8px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: #1D9BF0;
}

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



/* ============================================================
   📁 Explorer / Ordner-Elemente
   ============================================================ */

.folder-header {
    font-weight: bold;
    padding: 10px 12px;
    background: #e6e9ef;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    user-select: none;
    transition: background .2s ease;
}

.folder-header:hover {
    background: #dbe0ea;
}

.folder-content {
    display: none;
    padding-left: 10px;
    margin-top: 6px;
    margin-bottom: 10px;
}

.folder-content button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    margin: 4px 0;
    border: 1px solid #cbd5e1;
    background: #f7f9fc;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s ease;
    font-size: .95rem;
}

.folder-content button:hover {
    background: #e9eef7;
}





/* ==========================================================
   Modernes, universelles Tabellen-Design für Admin-Bereiche
   ========================================================== */

/* Basislayout für alle Tabellen */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 0.95rem;
    color: #333;
}

/* Tabellenkopf */
thead {
    background-color: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

th {
    text-align: left;
    font-weight: 600;
    padding: 12px 14px;
    color: #222;
    letter-spacing: 0.2px;
}

/* Tabellenzellen */
td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

/* Abwechselnde Hintergrundfarben für bessere Lesbarkeit */
tbody tr:nth-child(odd) {
    background-color: #fafafa;
}

tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* Hover-Effekt für Zeilen */
tbody tr:hover {
    background-color: #eef5ff;
    transition: background-color 0.2s ease;
}

/* Tabellen ohne Daten */
table em {
    color: #666;
}

/* Zellen mit Icons oder Aktionen */
td.icon,
td.action-cell {
    text-align: left;
    white-space: nowrap;
}

/* Status-Farben (Beispiel für aktiv/inaktiv) */
.status-active {
    color: #28a745;
    font-size: 1.1rem;
}

.status-inactive {
    color: #999;
    font-size: 1.1rem;
}

/* Allgemeine Aktionsbuttons */
a.btn-action {
    text-decoration: none;
    font-size: 1.1rem;
    padding: 4px 6px;
    margin: 0 2px;
    border-radius: 6px;
    display: inline-block;
    transition: background 0.2s ease, transform 0.1s ease;
    color: var(--color-contrast);
}


/* Hover-Effekt für Buttons */
a.btn-action:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

/* Responsives Verhalten */
@media (max-width: 768px) {
    table {
        font-size: 0.9rem;
    }
    th, td {
        padding: 10px 8px;
    }
}




