/* Dashboard Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

.dashboard-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}

.dashboard-sidebar .sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-heading);
}

.dashboard-sidebar .sidebar-brand img {
  width: 36px;
  height: 36px;
}

.dashboard-sidebar .sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.dashboard-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-body);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}

.dashboard-sidebar .sidebar-link:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.dashboard-sidebar .sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}

.dashboard-sidebar .sidebar-link i {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.dashboard-sidebar .sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.dashboard-sidebar .sidebar-footer .sidebar-link {
  color: #EF4444;
  padding-left: 0;
  border-left: none;
}

.dashboard-sidebar .sidebar-footer .sidebar-link:hover {
  background: transparent;
  color: #DC2626;
}

.dashboard-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-subtle);
}

.dashboard-topbar {
  height: var(--topbar-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.dashboard-topbar .search-bar {
  max-width: 360px;
  flex: 1;
  margin: 0 1.5rem;
}

.dashboard-topbar .search-bar .form-control {
  border-radius: 50px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.9rem;
}

.dashboard-topbar .search-bar .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.dashboard-topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-topbar .notification-btn {
  position: relative;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-body);
  padding: 0.5rem;
  cursor: pointer;
}

.dashboard-topbar .notification-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.65rem;
  padding: 0.2em 0.45em;
}

.dashboard-topbar .user-dropdown {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.dashboard-topbar .user-dropdown img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.dashboard-topbar .user-dropdown .user-name {
  font-weight: 500;
  color: var(--text-heading);
  font-size: 0.9rem;
}

.dashboard-content {
  padding: 1.5rem;
}

@media (min-width: 992px) {
  .dashboard-content {
    padding: 2rem;
  }
}

.dashboard-content .page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.dashboard-content .page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1035;
}

.sidebar-overlay.show {
  display: block;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-heading);
  padding: 0.25rem;
  cursor: pointer;
}

@media (max-width: 991.98px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
  }

  .dashboard-sidebar.show {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0;
  }

  .dashboard-topbar .search-bar {
    display: none;
  }

  .dashboard-topbar .user-dropdown .user-name {
    display: none;
  }
}

/* Profile Summary Card */
.profile-summary {
  text-align: center;
}

.profile-summary .profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
  margin-bottom: 1rem;
}

.profile-summary .profile-detail {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.profile-summary .profile-detail:last-child {
  border-bottom: none;
}

.profile-summary .profile-detail .label {
  color: var(--text-muted);
}

.profile-summary .profile-detail .value {
  color: var(--text-heading);
  font-weight: 500;
}
