/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--primary-navy);
  padding-top: 80px; /* Space for navbar */
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-left: 1px solid var(--border-color);
  height: calc(100vh - 80px);
  position: fixed;
  right: 0;
  top: 80px;
  overflow-y: auto;
  padding: 30px 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

.user-profile-mini {
  text-align: center;
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--royal-gold);
  margin: 0 auto 10px;
  background: var(--primary-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--soft-gold);
}

.user-profile-mini h4 {
  color: var(--soft-white);
  margin-bottom: 5px;
}

.user-profile-mini p {
  color: var(--accent-cyan);
  font-size: 0.9rem;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 30px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
  border-right: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  color: var(--royal-gold);
  background: rgba(212, 166, 79, 0.05);
  border-right-color: var(--royal-gold);
}

.sidebar-nav li a i {
  font-size: 1.2rem;
  width: 25px;
  text-align: center;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-right: 280px; /* Sidebar width */
  padding: 40px;
  min-height: calc(100vh - 80px);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.page-title {
  color: var(--soft-gold);
  font-size: 2rem;
}

/* Dashboard Cards */
.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.dash-card {
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card-info h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 600;
}

.dash-card-info .value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--soft-white);
}

.dash-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: rgba(212, 166, 79, 0.1);
  color: var(--royal-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

/* Charts & Progress Sections */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.dash-panel {
  padding: 25px;
  margin-bottom: 30px;
}

.panel-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  color: var(--soft-gold);
  font-size: 1.2rem;
}

/* Progress Bars */
.progress-item {
  margin-bottom: 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--border-color);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--royal-gold), var(--accent-cyan));
  border-radius: 5px;
  width: 0%; /* Set via inline style or JS */
  transition: width 1s ease-in-out;
}

/* Admin Specific */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

.admin-table th,
.admin-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  color: var(--royal-gold);
  font-weight: 600;
}

.admin-table tbody tr:hover {
  background: var(--border-color);
}

.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-active { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.badge-pending { background: rgba(241, 196, 15, 0.2); color: #f1c40f; }

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(100%);
    width: clamp(250px, 75vw, 320px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-right: 0;
    padding: clamp(15px, 3vw, 25px);
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dash-cards {
    grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    gap: 15px;
  }
  
  .dash-panel {
    padding: clamp(15px, 3vw, 20px);
    overflow-x: auto; /* Allow tables to scroll if needed */
  }

  .admin-table th, .admin-table td {
    padding: 10px;
    font-size: 0.9rem;
  }
  
  .page-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
}

@media (max-width: 480px) {
  .dashboard-layout {
    padding-top: 60px; /* Adjust if navbar is smaller */
  }
  
  .sidebar {
    top: 60px;
    height: calc(100vh - 60px);
  }

  .dash-card {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 20px;
  }
  
  .dash-card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .dash-card-info .value {
    font-size: 1.5rem;
  }
}
