.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Global (Logo + User) */
.header-global {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-6);
  background: var(--color-surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-align: right;
}

.user-profile svg {
  width: 36px;
  height: 36px;
  padding: 6px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-radius: 50%;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-info strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.user-info span {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Nav Horizontal (Pronote Style) */
.nav-horizontal {
  background: #374151; /* Dark slate */
  color: white;
}

.nav-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  overflow-x: auto;
}

.nav-item {
  padding: var(--space-3) var(--space-4);
  color: #9ca3af;
  font-weight: 500;
  font-size: 0.875rem;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
  transition: all var(--transition);
}

.nav-item:hover, .nav-item:focus-visible {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.is-active {
  color: white;
  border-bottom-color: #60a5fa; /* Light blue accent */
  background: rgba(255, 255, 255, 0.05);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

/* Sub Header (Breadcrumb/Date) */
.sub-header {
  background: #f9fafb;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-6);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.sub-header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.current-page-badge {
  color: var(--color-primary);
  font-weight: 600;
  background: white;
  padding: 2px 10px;
  border-radius: var(--radius-badge);
  border: 1px solid var(--color-border);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view-container {
  flex: 1;
  padding: var(--space-6);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.view {
  display: none;
  animation: fadeIn 0.2s ease;
}

.view.is-visible {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hiding old page-headers for a cleaner dashboard feel */
.page-header {
  display: none;
}
