body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Links */
a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-hover); }

/* Typography */
h1, h2, h3, h4, h5, h6 { color: var(--text-primary); font-weight: 600; line-height: 1.2; }
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

/* App Layout */
#app { display: flex; min-height: 100vh; }

#main-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  width: 100%;
  min-height: 100vh;
}

#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  z-index: 100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#content {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#app-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  z-index: 90;
}

#page-content {
  flex: 1;
  padding: var(--space-lg);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

#auth-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* Offline Banner */
.offline-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-warning);
  color: var(--text-inverse);
  text-align: center;
  padding: var(--space-sm) var(--space-md);
  z-index: 9999;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  #main-container { grid-template-columns: 1fr; }
  #sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }
  #sidebar.open,
  #sidebar.sidebar--open {
    transform: translateX(0);
  }
  #content { grid-column: 1; }
}
