/* css/dashboard.css */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1e40af;
  --secondary: #f97316;
  --accent: #10b981;
  --dark: #1e293b;
  --gray: #64748b;
  --light-gray: #f1f5f9;
  --white: #ffffff;
  --error: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--light-gray);
  color: var(--dark);
  padding: 2rem;
}
.side-bar-toggle-btn{
  position: absolute;
  margin-left: 30px;
  margin-top: 30px;
  display: none;
}
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--white);
  padding: 2rem;
  box-shadow: 2px 0 10px rgba(0,0,0,0.05);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
  text-align: center;
}

.logo span {
  color: var(--secondary);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--gray);
  transition: all 0.3s;
  font-weight: 500;
}

.nav-item:hover {
  background: var(--light-gray);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary);
  color: var(--white);
}

.nav-item .icon {
  font-size: 1.25rem;
}









/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
}

.dashboard-header {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dashboard-header h1 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.dashboard-header p {
  color: var(--gray);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark);
}

.stat-label {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Projects Section */
.projects-section {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.projects-section h2 {
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.projects-list {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  border: 2px solid var(--light-gray);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s;
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
  display: flex;
}

.project-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.project-id {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 10px;
}

.status-badge {
  padding: 0.35rem 0.875rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-approved {
  background: #dbeafe;
  color: #1e40af;
}

.status-ongoing {
  background: #e0e7ff;
  color: #4338ca;
}

.status-completed {
  background: #dcfce7;
  color: #166534;
}

.project-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.85rem;
  color: var(--gray);
}

.detail-value {
  font-weight: 600;
  color: var(--dark);
}

.progress-section {
  margin-top: 1rem;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--light-gray);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
  transition: width 0.3s;
}

.payment-warning {
  background: #fee;
  border-left: 4px solid var(--error);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 4px;
  color: #991b1b;
  font-size: 0.9rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--gray);
  margin-bottom: 1.5rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  padding: 0.75rem;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  font-weight: 300;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: var(--dark);
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-success {
  background: var(--accent);
  color: var(--white);
}





















@media (max-width: 820px) {
     .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
  .stat-card {
  background: var(--white);
  padding: 0.5rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}
.stat-value{
  font-size: medium;
}
}












/* Responsive */
@media (max-width: 700px) {
  .side-bar-toggle-btn{
    color: blue;
    padding: 10px;
    cursor: pointer;
    border-radius: 7px;
    display: block;
    font-size: 25px;
  }
  .sidebar {
    width: 250px;
    height: auto;
    position: absolute;
    /* background-color: #10b981; */
      margin-left: 100%;
      z-index: 900;
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .project-details {
    grid-template-columns: 1fr;
  }
  .project-card-header {
    flex-direction: column;
  }
  .project-header {
  display: block;
}

  .project-card-header  .status-badge {
    margin-top: 0.5rem;
  } 

  .projects-section{
    padding: 0;
    background-color: transparent;
  }
  .projects-section h2{
    padding: 1rem;
    text-align: center;
    color: var(--primary);
  }
  .btn {
    width: 100%;
  }
  .project-card{
    padding: 0.5rem;
    display: block;
    background-color: white;
  }
  .project-name{
    font-size: 1rem;
  }
}




























@media (max-width: 414px) {
  body{
    padding: 0px;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: absolute;
      margin-left: -900px; 
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  .dashboard-header{
    padding: 1rem;
    text-align: center;
  }
  .dashboard-header h1 {
   font-size: large;
  }

  .dashboard-header p{
    font-size: small;
  }


  
  /* .stats-grid {
    grid-template-columns: 1fr;
  } */
   .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
  .stat-card {
  background: var(--white);
  padding: 0.5rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.stat-value{
  font-size: medium;
}



  .project-details {
    grid-template-columns: 1fr;
  }
  .project-card-header {
    flex-direction: column;
  }
  .project-header {
  display: block;
}

  .project-card-header  .status-badge {
    margin-top: 0.5rem;
  } 

  .projects-section{
    padding: 0;
    background-color: transparent;
  }
  .projects-section h2{
    padding: 1rem;
    text-align: center;
    color: var(--primary);
  }
  .btn {
    width: 100%;
  }
  .project-card{
    padding: 0.5rem;
    display: block;
  }
  .project-name{
    font-size: 1rem;
  }
}