#dashboard-view {
  min-height: 100vh;
  background: var(--bg);
}
#dashboard-view.d-none {
  display: none;
}

#topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
  transition: left 0.3s ease;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-toggle {
  color: var(--text) !important;
  font-size: 1.2rem;
  padding: 4px 8px;
  text-decoration: none;
}
.topbar-toggle:hover {
  background: var(--border-light);
  border-radius: 8px;
}
.topbar-brand-icon {
  font-size: 1.5rem;
  color: var(--primary);
}
.topbar-brand {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-user-info {
  text-align: right;
  line-height: 1.3;
}
.topbar-greeting {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}
.topbar-user {
  font-size: 0.9rem;
}
.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.btn-topbar-logout {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-topbar-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-light);
  transform: translateY(-1px);
}
.btn-topbar-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-topbar-icon:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.3s ease;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: var(--topbar-h);
}
.sidebar-brand-icon {
  font-size: 1.8rem;
  color: var(--secondary);
}
.sidebar-brand-text {
  line-height: 1.3;
}
.sidebar-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}
.sidebar-sub {
  font-size: 0.75rem;
  color: var(--sidebar-text);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
}
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-menu li {
  list-style: none;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 1.25rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 450;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}
.sidebar-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: var(--primary);
}
.sidebar-item.active {
  background: rgba(139,69,19,0.15);
  color: var(--secondary);
  border-left-color: var(--secondary);
  font-weight: 500;
}
.sidebar-item-icon {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.sidebar-item-arrow {
  width: 16px;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  text-align: center;
}
.sidebar-sub-toggle.open .sidebar-item-arrow {
  transform: rotate(90deg);
}

.sidebar-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0,0,0,0.15);
}
.sidebar-submenu.open {
  max-height: 300px;
}
.sidebar-sub-item {
  padding-left: 3.2rem !important;
  font-size: 0.82rem !important;
  border-left-color: transparent !important;
}
.sidebar-sub-item:hover {
  border-left-color: var(--primary) !important;
}
.sidebar-sub-item.active {
  border-left-color: var(--secondary) !important;
}
.sidebar-sub-item .sidebar-item-icon {
  font-size: 0.8rem;
  width: 18px;
}

.sidebar-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}

#main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  padding: 1.5rem;
  transition: margin-left 0.3s ease;
}

.welcome-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-h) - 3rem);
}
.welcome-card {
  max-width: 480px;
  width: 100%;
}
.welcome-icon {
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.4;
}
.welcome-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
}

@media (max-width: 991.98px) {
  #sidebar {
    transform: translateX(-100%);
  }
  #sidebar.sidebar-open {
    transform: translateX(0);
  }
  .sidebar-overlay.active {
    display: block;
  }
  #topbar {
    left: 0;
  }
  #main-content {
    margin-left: 0;
  }
}

@media (max-width: 575.98px) {
  #topbar {
    padding: 0 1rem;
  }
  .topbar-user-info {
    display: none;
  }
  #main-content {
    padding: 1rem;
  }
}

.page-content {
  animation: fadeInUp 0.35s ease;
}
