/*
:root{ 
--sidebar-width: 260px; 
--header-height: 56px; 
--bg: #f5f7fb; 
--sidebar-bg: #384c61;
--sidebar-color: #fff; 
--muted: rgba(255,255,255,0.06); 
--active-bg: rgba(255,255,255,0.12); 
--radius: 8px; 
}
*/

:root{
--sidebar-width: 260px; 
--header-height: 56px; 
--bg: #f5f7fb; 
--active-bg: rgba(255,255,255,0.12); 
--sidebar-bg: #384c61;
--sidebar-color: #fff; 
--card: #ffffff;
/* --muted: rgba(255,255,255,0.06); */
--muted: #6b7280;
--text: #0f172a;
--accent: #155e75;        /* dunkles Teal/Blaugrün */
--accent-weak: #2dd4bf;   /* helleres Akzent für Fokus */
--danger: #b91c1c;
--radius: 10px;
--gap: 12px;
  --shadow: 0 6px 18px rgba(15,23,42,0.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: 16px;
  line-height: 1.4;
}

/* Basis */
* { box-sizing: border-box; }
body {
  margin: 0px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue";
  background: linear-gradient(180deg, #f3f6fb 0%, var(--bg) 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* Layout */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr;
  grid-template-areas:
    "sidebar header"
    "sidebar main";
  min-height: 100vh;
}

header.app-header {
  grid-area: header;
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  gap: .75rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}

.app-title { font-weight: 600; }

.app > main.app-main { 
  grid-area: main !important; 
  padding-left: .5rem;
}

/* Sidebar */
.sidebar {
  grid-area: sidebar;
  background: linear-gradient(180deg, var(--sidebar-bg), #391d46);  
  color: var(--sidebar-color);
  padding: 1rem;
  overflow: auto;
  border-right: 1px solid rgba(255,255,255,0.03);
}

.sidebar nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar nav li { margin: 0 0 .5rem; }

/* Toplink */
.sidebar a.toplink {
  display: inline-flex;        /* statt block: inline-flex fÃ¼r bessere Zentrierung, wirkt aber wie Block wenn Breite genutzt wird */
  align-items: center;         /* vertikale Zentrierung von Icon + Text */
  gap: 0.5rem;                 /* Abstand zwischen Icon und Text */
  padding: .6rem .75rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  width: 100%;                 /* sorgt dafÃ¼r, dass Link die volle Breite der Sidebar einnimmt (wie display:block) */
  box-sizing: border-box;      /* Padding wird innerhalb der Breite berÃ¼cksichtigt */
}

.sidebar a.toplink:hover { background: var(--muted); }
.sidebar a.toplink.active { background: var(--active-bg); font-weight: 600; }

/* Bild-Feinheiten */
.sidebar a.toplink img {
  display: inline-block;       /* sicherstellen, dass Bild korrekt gerendert wird */
  height: 24px;                /* fixe HÃ¶he, wie in deinem HTML */
  width: auto;
  vertical-align: middle;      /* Fallback, falls inline-flex nicht unterstÃ¼tzt wird */
  flex-shrink: 0;              /* verhindert, dass das Icon bei knapper Breite skaliert */
}

/* Optional: wenn du mÃ¶chtest, dass der Text in einem eigenen Element ist */
.sidebar a.toplink .tl-text {
  display: inline-block;
  line-height: 1;              /* verhindert vertikale Verschiebungen durch unterschiedliche line-heights */
}

/* Radios (visuell versteckt) */
.sidebar input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Label-Design für Hauptmenüeinträge */
.sidebar label.main-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  padding: .6rem .75rem;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font: inherit;
  border: 1px solid transparent;
}
.sidebar label.main-label:hover,
.sidebar label.main-label:focus {
  background: var(--muted);
  outline: none;
}

/* Pfeil-Icon */
.sidebar .chev {
  display: inline-block;
  transition: transform .18s ease;
  opacity: .95;
}

/* Submenu: standardmäßig versteckt */
.submenu {
  display: none;
  margin-top: .25rem;
  padding-left: .25rem;
}

/* Wenn das Radio checked ist, zeige das entsprechende Submenu */
#r-projects:checked ~ .submenu#sub-projects,
#r-studies:checked ~ .submenu#sub-studies {
  display: block;
}

/* Visual Selected-State: Label erhält Styling, wenn Radio checked */
#r-projects:checked + label[for="r-projects"],
#r-studies:checked + label[for="r-studies"] {
  background: var(--active-bg);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

/* Drehen des Pfeils bei Auswahl */
#r-projects:checked + label[for="r-projects"] .chev,
#r-studies:checked + label[for="r-studies"] .chev {
  transform: rotate(90deg);
}

/* Sub-items */
.submenu a {
  display: block;
  padding: .5rem .75rem .5rem 1.75rem;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
}
.submenu a:hover { background: var(--muted); }
.submenu a.active { background: var(--active-bg); font-weight: 600; }

/* Responsive: mobil Verhalten der Sidebar (Checkbox-Trick) */
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.06);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    width: var(--sidebar-width);
    max-width: 85vw;
    z-index: 1000;
    padding-top: var(--header-height);
    transition: left .25s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
  }
  .sidebar.open { left: 0; }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 900;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
  }
  .sidebar-overlay.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  /* Checkbox zum togglen */
  #nav-toggle:checked ~ .sidebar { left: 0; }
  #nav-toggle:checked ~ .sidebar-overlay { display: block; opacity: 1; pointer-events: auto; }
}

#nav-toggle { 
    position: absolute !important; 
    width: 1px; 
    height: 1px; 
    margin: -1px;
    padding: 0; 
    border: 0; 
    overflow: hidden; 
    clip: rect(0 0 0 0); 
    clip-path: inset(50%); 
    white-space: nowrap; 
    opacity: 0; pointer-events: none; 
}
/* Hinweis: Optional kannst Du eine reine CSS-Animation mit max-height verwenden:
   .submenu { max-height: 0; overflow: hidden; transition: max-height .22s ease; }
   #r-projects:checked ~ .submenu#sub-projects { max-height: 400px; } */


.header-actions { 
    margin-left: auto; /* schiebt Actions an den rechten Rand */ 
    display: flex; align-items: center; gap: 0.5rem; 
}

/* Button-Optik für Icons */ 
.icon-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 36px; height: 36px; 
    padding: 0; 
    border-radius: 8px; 
    border: 1px solid transparent; 
    background: transparent; 
    color: inherit; cursor: pointer; 
} 
.icon-btn:hover, .icon-btn:focus { 
    background: rgba(0,0,0,0.04); /* dezenter Hover */ 
    outline: none; box-shadow: none; 
}

/* kleine Trennlinie */ 
.header-sep { 
    width: 1px; 
    height: 24px; 
    background: rgba(255,255,255,0.06); 
    margin: 0 0.25rem; opacity: 0.9; 
}

/* Benutzername (optional) */ 
.user-name { 
    color: inherit; 
    text-decoration: none; 
    font-size: 0.95rem; 
    padding: 0.25rem 0.5rem; 
    border-radius: 6px; 
} 

user-name:hover { 
    background: rgba(0,0,0,0.04); 
}

/* Responsive: bei sehr kleinen Screens evtl. nur Icon zeigen */ 
@media (max-width:480px){ 
    .user-name { 
        display: none; 
    } 
    .header-actions { 
        gap: 0.25rem; 
    }
}

.sidebar-logo { 
    max-width: 160px; 
    
    margin: 0 auto; 
    
    padding-top: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
    padding-left: 1rem;
    text-align: center; 
    
} 
.sidebar-logo a { 
    display: block; 
    margin: 0 auto; 
    width: 100%;
} 
.sidebar-logo svg { 
    width: 100%; 
    height: auto; 
    display: block; 
    color: white; 
    
}

@media (max-width: 360px) { 
    .sidebar-logo { 
        max-width: 120px; 
    } 
}

.dn_line {
    border-top-style:solid;
    border-top-width:thin;  
    background-color: #96D4D4; 
}

.dn_line_inacc {
    border-top-style:solid;
    border-top-width:thin;  
    background-color: #ff6868; 
}

.input_std {
}
.input_err {
    background-color: #ff0000;
}

.data_changed {
    background-color: red;
}
.data_not_changed {
}

.hds_green {
  color: green !important;
}

.hds_red {
  color: red !important;
}

.optional_field {
  background-color: beige;
}

.vpnicon {
    height: 18px !important;
}