/* =========================================
   DASHBOARD STYLES
   ========================================= */

/* --- Dashboard Layout --- */
.dashboard-container {
  display: flex;
  min-height: calc(100vh - 70px);
  padding-top: 70px; /* offset for fixed header */
  background: var(--bg);
}

.dashboard-sidebar {
  width: 250px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.user-snippet {
  padding: 0 1.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1rem;
  overflow: hidden;
}
.user-snippet h3 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  color: var(--ink);
}
.user-snippet p {
  font-size: 0.9rem;
  color: var(--muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  color: var(--muted);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
}
.nav-item:hover {
  background: rgba(0, 96, 96, 0.05); /* brand with opacity */
  color: var(--brand);
}
.nav-item.active {
  background: rgba(250, 170, 52, 0.1); /* accent with opacity */
  color: var(--accent);
}

.logout-btn {
  margin-top: auto;
  margin-bottom: 0;
  color: #ef4444;
}
.logout-btn:hover {
  background: rgba(239, 68, 68, 0.05);
  color: #ef4444;
}

.dashboard-main {
  flex: 1;
  padding: 2rem 3rem;
  overflow-y: auto;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content.active {
  display: block;
}

/* --- Dashboard Cards & Common UI --- */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
.dash-card-header h3 {
  font-size: 1.2rem;
  margin: 0;
  color: var(--ink);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-card {
  background: rgba(0, 96, 96, 0.05); /* brand with opacity */
  border: 1px solid rgba(0, 96, 96, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-state svg {
  color: var(--line);
  margin-bottom: 1rem;
}
.empty-state p {
  margin-bottom: 1.5rem;
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-active { background: #d1fae5; color: #059669; }
.badge-past { background: #f3f4f6; color: #4b5563; }

/* --- Mobile Bottom Nav --- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  z-index: 1000;
  padding: 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0.5rem);
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.7rem;
  padding: 0.5rem;
  background: none;
  border: none;
}
.mobile-nav-item.active {
  color: var(--brand);
}

@media (max-width: 768px) {
  .dashboard-sidebar {
    display: none; /* Hide sidebar on mobile */
  }
  .dashboard-main {
    padding: 1.5rem 1rem;
    padding-bottom: 80px; /* Space for bottom nav */
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .mobile-bottom-nav {
    display: block;
  }
}
