/* ============================================================================
   responsive.css — Mobile Verhalten + Sidebar Offcanvas
   ============================================================================ */

/* Header Grid Collapse für Mobile */
@media (max-width: 900px) {
  .app-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  
  .app-header__middle {
    display: none; /* Wird zur Sidebar */
  }
  
  .brand__sub {
    display: none; /* Untertitel ausblenden */
  }
}

@media (max-width: 600px) {
  .app-header {
    padding: 8px 16px;
    top: 10px;
    left: 10px;
    right: 10px;
  }
  
  .brand__name {
    font-size: 1rem;
  }
  
  .tom-btn-dot {
    width: 38px;
    height: 38px;
  }
}


/* 1) Header: Mobile Anpassungen */
.app-header__burger { display:none; } /* Burger Default versteckt */

/* NEU: Header Toggle (Auge) IMMER sichtbar & gestylt */
.header-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  color: green !important;
  font-size: 1.1rem;
  padding: 8px 10px;
  background: rgba(255,255,255,0.3) !important; /* Dezent hinterlegt */
  border-radius: 8px;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.header-toggle-btn:hover {
  color: green !important;
  background: #fff !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

@media (max-width: 900px){
  /* Mittlere Navigation ausblenden */
  .app-header__middle{ display:none; }
  
  /* Burger anzeigen */
  .app-header__burger { display:inline-flex; }

  /* WICHTIG: User Dropdown im Header ausblenden (Standard) */
  .app-header__right .nav-dd { display: none; }

  /* AUSNAHME: Im DAU-Header das User-Menü immer anzeigen */
  .app-header--dau .app-header__right .nav-dd { display: flex; }
  
  /* Mobile Anpassung für das Auge (etwas größerer Touch-Bereich) */

  
  /* Mobile Anpassung für das Auge (etwas größerer Touch-Bereich) */
  .header-toggle-btn {
    font-size: 1.2rem;
    padding: 8px 12px;
    margin-right: 5px;
  }
}

/* --- Header Toggle Logic --- */
body.is-header-hidden .header-card {
  display: none !important;
}

/* 2) Sidebar Overlay */
.sidebar-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65); /* Etwas dunkler für mehr Fokus */
  
  /* Safari Support hinzufügen */
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  
  z-index: 1200;
}

/* 3) Sidebar Container */
.sidebar{
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0; /* Links andocken */
  
  width: 300px;
  max-width: 85vw;
  z-index: 1300;

  background: #1e1e1e; /* Dunkler Hintergrund (VS Code Style) */
  box-shadow: 5px 0 25px rgba(0,0,0,0.5);
  border-right: 1px solid #333;
  
  display: flex;
  flex-direction: column;

  transform: translateX(-100%); /* Standardmäßig versteckt */
  transition: transform var(--transition-normal);
}

/* Header der Sidebar */
.sidebar__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 15px 20px;
  background: #252526;
  border-bottom: 1px solid #333;
  color: #fff;
}

.sidebar__title{
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Scrollbarer Inhalt */
.sidebar__content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Sektionen (Abstand zwischen Navigation und User-Bereich) */
.sidebar__section{ 
  margin-bottom: 30px; 
}

/* Titel über den Gruppen (z.B. "NAVIGATION", "USER") */
.nav-dd__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #888;
  font-weight: bold;
  margin-bottom: 10px;
  padding-left: 5px;
}

/* --- Sidebar Dropdowns (Kategorien) --- */
.sidebar-dd {
  margin-bottom: 8px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #252526;
  overflow: hidden;
}

/* Die anklickbare Überschrift (Kategorie) */
.sidebar-dd__summary {
  cursor: pointer;
  padding: 12px 15px;
  color: var(--text-light);
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.sidebar-dd__summary:hover {
  background: #2a2d2e;
  color: #fff;
}

/* Pfeil entfernen (Standard) */
.sidebar-dd__summary::-webkit-details-marker{ display:none; }

/* Eigener Pfeil rechts */
.sidebar-dd__summary::after {
  content: '›';
  font-size: 1.2rem;
  line-height: 1;
  color: #888;
  transition: transform 0.2s;
}

/* Pfeil drehen wenn offen */
.sidebar-dd[open] .sidebar-dd__summary::after {
  transform: rotate(90deg);
}

.sidebar-dd[open] .sidebar-dd__summary {
  border-bottom: 1px solid #333; /* Trennlinie wenn offen */
}

/* --- Der Inhalt (Links) --- */
.sidebar-dd__panel {
  background: #1e1e1e; /* Etwas dunkler als der Header */
  padding: 5px 0;
}

/* Einzelner Link */
.sidebar-dd__panel .nav-dd__item {
  display: block;
  padding: 10px 15px 10px 25px; /* Einrückung! */
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  border-left: 3px solid transparent; /* Für Hover Effekt */
  background: transparent;
  border-radius: 0;
  margin: 0;
}

.sidebar-dd__panel .nav-dd__item:hover {
  background: #2a2d2e;
  color: #fff;
  border-left-color: var(--color-info); /* Blauer Balken links */
}




/* Logout Button etc. */
.nav-dd__item--danger {
  color: #f48771 !important;
}
.nav-dd__item--danger:hover {
  background: rgba(244, 135, 113, 0.1) !important;
}

/* Open/Close via body class */
body.is-sidebar-open .sidebar{ transform: translateX(0); }
body.is-sidebar-open .sidebar-overlay{ display:block; }
