.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sohar-black);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.sidebar-brand__title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.15s;
  margin-bottom: 0.125rem;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  text-decoration: none;
}

.nav-link.active {
  background: var(--color-primary);
  color: white;
}

.nav-link__icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  opacity: 0.85;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-reset-btn {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
}

.demo-reset-btn:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  padding: 0.5rem;
  color: var(--color-text);
}

.header-search {
  max-width: 280px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.role-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.role-switcher label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.role-switcher select {
  width: auto;
  min-width: 140px;
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
}

.notification-bell {
  position: relative;
  padding: 0.5rem;
  color: var(--color-text-muted);
}

.notification-bell:hover { color: var(--color-text); }

.notification-bell__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--color-primary);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--sohar-gray-100);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.user-chip__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.app-content {
  flex: 1;
  padding: 1.5rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.content-grid--3 { grid-template-columns: repeat(3, 1fr); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
}

@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .content-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open { display: block; }

  .app-main { margin-left: 0; }

  .menu-toggle { display: flex; }

  .header-search { display: none; }

  .app-content { padding: 1rem; }

  .kanban-board {
    grid-template-columns: 1fr;
  }

  .wizard-steps { flex-direction: column; gap: 0.5rem; }
  .wizard-step::after { display: none; }
}
