.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar__logo {
  padding: var(--space-6) var(--space-6) var(--space-4);
}

.sidebar__logo-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar__monogram {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.sidebar__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar__brand-tag {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.sidebar__logo .divider {
  margin: var(--space-4) 0 0;
}

.sidebar__nav {
  flex: 1;
  padding: var(--space-2) 0;
  overflow-y: auto;
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar__nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar__nav-item--active {
  border-left-color: var(--accent-brass);
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.sidebar__nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar__footer {
  padding: var(--space-4) var(--space-5);
}

.sidebar__footer .divider {
  margin: 0 0 var(--space-4);
}

.sidebar__user-email {
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
  margin-bottom: var(--space-3);
}

/* Page wrapper (main + aside) */
.page-wrapper {
  display: flex;
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
}

/* Main content */
.main {
  flex: 1;
  min-width: 0;
  max-width: 900px;
  padding: var(--space-8);
}

.main__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.main__header-text {
  flex: 1;
}

.main__subtitle {
  margin-top: var(--space-2);
  font-size: 15px;
  color: var(--text-secondary);
}

.main__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  padding-top: var(--space-1);
}

.dashboard-section {
  margin-bottom: var(--space-10);
}

.dashboard-section:last-child {
  margin-bottom: 0;
}

.dashboard-section .divider {
  margin: var(--space-8) 0;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

/* Right aside panel */
.panel-aside {
  width: 300px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  padding: var(--space-8) var(--space-6);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.panel-aside__block {
  margin-bottom: var(--space-8);
}

.panel-aside__block:last-child {
  margin-bottom: 0;
}

/* Responsive — hamburger menu planned for V2 */
@media (max-width: 1200px) {
  .panel-aside {
    display: none;
  }

  .main {
    max-width: none;
  }
}

@media (max-width: 900px) {
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }

  .main__header {
    flex-direction: column;
  }
}
