/* NEXUS Kanal – Fachcockpit-Optik, bestehender Seitenaufbau */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
}

.app-header {
  display: none;
}

.app-body {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  flex: 1;
  min-height: 100vh;
  background: var(--canvas);
}

.app-body--dossier {
  grid-template-columns: var(--sidebar-width) 1fr;
}

.app-body--dossier .app-sidebar {
  display: flex;
}

.app-sidebar {
  position: relative;
  inset: auto;
  width: auto;
  min-height: 100vh;
  max-height: 100vh;
  background: var(--navy);
  color: #fff;
  padding: 18px 12px 16px;
  display: flex;
  flex-direction: column;
  z-index: 20;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 0;
  border-top: 4px solid #ffdc00;
  box-shadow: 8px 0 30px rgba(16, 41, 66, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 11px;
  object-fit: cover;
  background: #0b0b0b;
  flex: 0 0 auto;
}

.brand strong,
.brand-tagline {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0.03em;
  color: #fff;
}

.brand-module {
  font-weight: 500;
  letter-spacing: 0;
}

.brand-tagline {
  color: #abc0d3;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 2px;
}

.nav-caption {
  color: var(--nav-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 0 10px;
  margin: 6px 0 4px;
  text-transform: uppercase;
}

.app-nav,
.nav-list {
  display: grid;
  gap: 2px;
  align-content: start;
  flex: 0 0 auto;
}

.app-nav-link,
.nav-item {
  position: relative;
  border: 0;
  color: var(--nav-text);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 520;
  cursor: pointer;
  height: auto;
  min-height: 0;
  box-shadow: none;
}

.app-nav-link:hover,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.app-nav-link--active,
.nav-item.active {
  color: #fff;
  background: var(--navy-2);
  box-shadow: inset 3px 0 #6db9eb;
  border-left: 0;
  padding-left: 12px;
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 17px;
  color: #a9bfd2;
  flex: 0 0 auto;
}

.app-sidebar-hint {
  margin-top: 0.75rem;
  font-size: 13px;
  line-height: 1.4;
  color: #abc0d3;
  padding: 0 10px;
  display: block;
}

.sidebar-session {
  flex: 0 0 auto;
  margin: 0 4px 16px;
  padding: 12px;
  border: 1px solid rgba(255, 220, 0, 0.35);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  display: grid;
  gap: 10px;
  min-width: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.sidebar-session__who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-session__meta {
  min-width: 0;
}

.sidebar-session .avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #212529;
  background: #ffdc00;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
}

.sidebar-session strong {
  display: block;
  font-size: 14px;
  color: #fff;
  overflow-wrap: anywhere;
}

.sidebar-session__role {
  display: block;
  margin-top: 2px;
  color: #ffdc00;
  font-size: 13px;
  font-weight: 650;
}

.sidebar-session__tools {
  display: grid;
  gap: 8px;
}

.ki-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 220, 0, 0.16);
  color: #ffdc00;
  font-size: 13px;
  font-weight: 700;
}

.ki-status.is-ok {
  background: #ffdc00;
  color: #212529;
}

.ki-status.is-off,
.ki-status.is-err {
  background: rgba(255, 220, 0, 0.12);
  color: #f3d36a;
}

.sidebar-session__version {
  display: block;
  color: #91a9bc;
  font-size: 12px;
}

.sidebar-session .sidebar-logout,
.sidebar-session .btn-secondary {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 8px 12px;
  background: #ffdc00;
  color: #212529;
  border: 0;
  font-size: 14px;
  font-weight: 750;
  min-height: 2.25rem;
  white-space: nowrap;
}

.app-main {
  padding: 28px 32px 48px;
  background: var(--canvas);
  min-width: 0;
}

.app-main.is-dossier {
  padding: 28px 32px 48px;
  background: var(--canvas);
}

.sidebar-dossier-code {
  margin: 0 0 2px;
  padding: 0 10px;
  color: #6db9eb;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-dossier-title,
.sidebar-dossier-meta {
  display: none;
}

#sidebarDossierBlock {
  flex: 0 0 auto;
  min-width: 0;
}

#sidebarDossierBlock .app-nav {
  margin-top: 2px;
}

#sidebarDossierBlock .app-nav-link {
  justify-content: space-between;
}

#sidebarDossierBlock .dossier-badge {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2eef6;
  border: 0;
}

#sidebarDossierBlock .dossier-badge--ok {
  background: #1f6b4a;
  color: #d8f5e7;
}

#sidebarDossierBlock .dossier-badge--warn {
  background: #8a5a12;
  color: #fde8c4;
}

#sidebarDossierBlock .dossier-badge--err {
  background: #8f2f36;
  color: #ffd6d8;
}

.app-main.is-list #dossierView,
.app-main.is-dossier #listContent {
  display: none !important;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(165deg, #dce5ef 0%, #eef2f6 45%, #e4ebf3 100%);
}

@media (max-width: 900px) {
  .app-body {
    grid-template-columns: 1fr;
  }
  .app-sidebar {
    min-height: 0;
  }
}
