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

/* ═══ Sticky Header ═══ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-12);
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header__logo {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 1.5px;
  color: var(--color-text-primary);
  background: none;
  border: none;
  cursor: pointer;
}

.header__logo span {
  color: var(--color-accent);
  font-weight: 700;
}

/* ═══ Sidebar + Main Layout ═══ */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* ═══ Sidebar ═══ */
.sidebar {
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sidebar-tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.sidebar-tab:hover {
  color: var(--color-text-secondary);
}

.sidebar-tab--active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.sidebar-panel {
  display: none;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--space-8);
  gap: var(--space-6);
  flex: 1;
}

.sidebar-panel--active {
  display: flex;
}

.sidebar-title {
  font-size: var(--font-size-xs);
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

/* ═══ Main Content ═══ */
.content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-12) 28px;
}

.content--full {
  max-width: 100%;
  margin: 0;
  width: 100%;
}

/* ═══ Responsive ═══ */
@media (max-width: 767px) {
  .header {
    padding: 0 var(--space-8);
  }

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    min-height: calc(100vh - var(--header-height));
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    max-height: 50vh;
    overflow-y: auto;
  }

  .content {
    padding: var(--space-8);
  }
}

@media (max-width: 400px) {
  .header {
    padding: 0 var(--space-6);
  }

  .sidebar {
    padding: var(--space-6);
  }

  .content {
    padding: var(--space-6);
  }
}
