body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Pi symbol in header */
.site-header h1 .pi-symbol {
  font-size: 1.35em;
  line-height: 1;
  vertical-align: baseline;
}

/* Header */
.site-header {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-color);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.site-header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.75rem 2rem;
}

.site-header-top h1 {
  justify-self: start;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-accent);
}

.site-header-top .mode-controls {
  justify-self: end;
}

.mode-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.utility-area {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--hover-bg);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

button, .import-label {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background-color: var(--primary-accent);
  color: white;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.1s;
  display: inline-block;
  font-size: 0.85rem;
  font-family: var(--font-heading);
}

button:hover, .import-label:hover {
  background-color: var(--secondary-accent);
}

button:active, .import-label:active {
  transform: scale(0.98);
}

/* Admin/User Mode Toggling */
body.user-mode .admin-only {
  display: none !important;
}
body.admin-mode .user-only {
  display: none !important;
}

/* Mode Tabs — Segmented Control */
.view-modes {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--hover-bg);
  border-radius: 8px;
  justify-content: center;
  align-items: stretch;
  border: 1px solid var(--border-color);
}

.mode-tab {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mode-tab:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}

.mode-tab.active {
  color: var(--primary-accent);
  background: var(--surface-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Main Layout */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Content Area */
.content-area {
  flex: 1;
  position: relative;
  overflow-y: auto;
  padding: 2rem;
  padding-top: 0px;
  background: var(--bg-color);
  display: flex;
  flex-direction: row;
}
