/* Global Base & Layout Styles */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
}

/* App Layout Grid (Desktop Default) */
#app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Sidebar Layout */
#sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

/* Sidebar specific overrides for Deep Forest Green background */
#sidebar .sidebar-logo {
  color: #F4F5EF;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  padding: 0 0.5rem 1.25rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

#sidebar .nav-item {
  color: rgba(244, 245, 239, 0.7);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 550;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

#sidebar .nav-item:hover {
  color: #F4F5EF;
  background-color: rgba(255, 255, 255, 0.06);
}

#sidebar .nav-item.active {
  color: #BB8A52; /* Warm Sand active text */
  background-color: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

#sidebar .sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

#main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2.5rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

#sidebar.hidden + #main-content {
  margin-left: 0;
}

#app-container {
  width: 100%;
  max-width: var(--max-content-width);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex-grow: 1;
}

/* Header UI */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  width: 100%;
}

.app-title-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.app-title-section p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Utility Classes */
.flex-row-center {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* Grid systems */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.grid-sidebar-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

#app-content {
  width: 100%;
  max-width: var(--max-content-width);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

#app-content:has(.landing-page-wrapper) {
  max-width: 1200px !important;
}

.nav-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.25;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  transition: transform var(--transition-fast) ease;
}

.nav-item:hover .nav-svg,
.bottom-nav-item:hover .nav-svg {
  transform: scale(1.1);
}

