/* Cockpit — Rahmen: Seitenleiste, Hauptbereich, Umbruchpunkte. */

.app{display:flex;min-height:100vh}
.sidebar{
  width:236px;flex:0 0 236px;background:var(--color-surface);
  border-right:1px solid var(--border);padding:20px 13px;
  display:flex;flex-direction:column;
  position:sticky;top:0;height:100vh;overflow-y:auto;
}
.brand{display:flex;align-items:center;gap:11px;padding:4px 8px 20px}
.brand-mark{
  width:38px;height:38px;border-radius:10px;flex:0 0 38px;
  background:linear-gradient(140deg,var(--color-accent-hover),var(--color-accent-deep));
  display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff;
  box-shadow:0 6px 18px rgba(59,130,246,0.28);
}
.brand-name{font-size:16px;font-weight:700;letter-spacing:.03em;line-height:1}
.brand-sub{font-family:'JetBrains Mono',monospace;font-size:9.5px;text-transform:uppercase;letter-spacing:.16em;color:var(--color-text-muted);margin-top:3px}

.nav-group{margin-top:12px}
.nav-group-label{font-family:'JetBrains Mono',monospace;text-transform:uppercase;letter-spacing:.16em;font-size:9px;color:var(--color-text-muted);padding:0 10px 7px;font-weight:600}
.nav-item{
  display:flex;align-items:center;gap:10px;padding:8px 11px;border-radius:9px;
  color:var(--color-text-2);font-size:13.5px;font-weight:500;margin-bottom:2px;
  transition:background .15s,color .15s;
}
.nav-item:hover{background:rgba(240,246,252,0.04);color:var(--color-text)}
.nav-item.active{background:var(--color-accent-soft);color:var(--color-text)}

.main{flex:1;min-width:0;padding:26px 30px 60px}
.page-head{margin-bottom:20px}
.page-title{font-size:23px;font-weight:600;letter-spacing:-.01em}
.page-sub{color:var(--color-text-2);font-size:13.5px;margin-top:4px}

@media (max-width:900px){
  .sidebar{width:194px;flex:0 0 194px}
  .main{padding:22px 18px 50px}
}

/* Mobiler Kopfbalken (Menue-Knopf + aktueller Seitentitel) und die
   Abblendflaeche hinter dem geoeffneten Panel -- auf Desktop unsichtbar. */
.mobiltop{display:none}
.sidebar-blende{display:none}

@media (max-width:640px){
  .app{flex-direction:column}

  .mobiltop{
    display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:12px 14px;background:var(--color-surface);
    border-bottom:1px solid var(--border);
    position:sticky;top:0;z-index:60;
  }
  .mobiltop-titel{font-size:15px;font-weight:600;letter-spacing:-.01em}
  .nav-toggle{
    display:flex;flex-direction:column;justify-content:center;gap:4px;
    width:38px;height:38px;flex:0 0 38px;border-radius:9px;
    background:var(--color-surface-2);border:1px solid var(--border);
    cursor:pointer;padding:0;
  }
  .nav-toggle span{display:block;width:16px;height:2px;margin:0 auto;background:var(--color-text-2);border-radius:2px}

  /* Seitenleiste wird zum Panel, das von links hereinfaehrt -- bleibt
     inhaltlich/optisch wie am Desktop (senkrechte Liste), nur ausgeblendet
     bis der Menue-Knopf sie oeffnet. */
  .sidebar{
    position:fixed;top:0;left:0;bottom:0;z-index:80;
    width:82vw;max-width:300px;flex:none;
    transform:translateX(-100%);transition:transform .22s ease;
    box-shadow:12px 0 30px rgba(0,0,0,0.35);
    overflow-y:auto;
  }
  .sidebar.offen{transform:translateX(0)}

  .sidebar-blende{
    display:block;position:fixed;inset:0;z-index:70;
    background:rgba(4,6,10,0.55);
    opacity:0;pointer-events:none;transition:opacity .2s ease;
  }
  .sidebar-blende.sichtbar{opacity:1;pointer-events:auto}

  .main{padding:18px 14px 48px}
  .page-title{font-size:20px}
}
