/* ── App Layout ── */
.app-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height) - 38px);
}

.main-wrapper {
  flex: 1;
  background: var(--color-bg);
  padding: var(--space-lg);
  overflow-y: auto;
}

.main-content,
.product-list-page {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
}

.dashboard-page {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* ── Dashboard ── */
.dashboard-title {
  font-family: var(--font-bn);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--leading-heading);
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.dashboard-subtitle {
  margin-top: var(--space-sm);
  font-family: var(--font-bn);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

.dashboard-card {
  margin-top: var(--space-lg);
  padding: var(--space-xl);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 40%);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-brand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: var(--color-brand-muted);
  border-radius: 50%;
  opacity: 0.4;
}

.dashboard-card-icon {
  width: 40px;
  height: 40px;
  padding: 12px;
  box-sizing: content-box;
  color: var(--color-brand-dark);
  background: var(--color-brand-muted);
  border-radius: 50%;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.dashboard-card h2 {
  font-family: var(--font-bn);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: var(--leading-heading);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.dashboard-card p {
  font-family: var(--font-bn);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
  position: relative;
  z-index: 1;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-sidebar);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  padding: 12px 0;
}

/* ── Sidebar Nav ── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.nav-section-label {
  display: block;
  padding: 4px var(--space-md) 2px;
  margin: 0 10px;
  font-family: var(--font-bn);
  font-size: 11px;
  font-weight: var(--font-weight-nav-active);
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-section-label:first-of-type {
  padding-top: 2px;
}

.nav-group {
  list-style: none;
}

.nav-divider {
  border: none;
  border-top: 1px solid #eceef1;
  margin: 4px var(--space-md);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px var(--space-md);
  margin: 1px 10px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: var(--font-weight-nav);
  color: var(--color-text-deep);
  font-family: var(--font-bn);
  letter-spacing: -0.01em;
}

.nav-subscribe-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 10px 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #42a5f5, #1e88e5);
  color: #fff;
  font-weight: 600;
  font-family: var(--font-bn);
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-subscribe-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.35);
  color: #fff;
}

.nav-subscribe-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--color-hover);
  color: var(--color-text-deep);
}

.nav-item.active {
  background: #e3f2fd;
  color: var(--color-text-deep);
  font-weight: var(--font-weight-nav-active);
  box-shadow: inset 4px 0 0 #1e88e5;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.nav-item img {
  width: 26px;
  height: 26px;
  padding: 2px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
  box-sizing: content-box;
}

.nav-item.active img {
  background: transparent;
  filter: none;
}

/* ── Sidebar Backdrop (mobile) ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: calc(var(--header-height) + 38px);
  background: rgba(0, 0, 0, 0.35);
  z-index: 80;
}

/* ── Mobile Sidebar ── */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: calc(var(--header-height) + 38px);
    left: 0;
    bottom: 0;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
}

@media (min-width: 993px) {
  .menu-toggle {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-wrapper {
    padding: var(--page-padding-mobile);
  }

  .main-content,
  .product-list-page {
    padding: var(--space-md);
  }
}
