* {
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}
  .admin-only {
    display: none;
  }


body {
  margin: 0;
  padding: 0;
  background: #252525;
  color: #ffffff;
}
/* Loading ANimation */
/* Start */
#loader {
  position: fixed;
  background: #0e0e0e;
  color: white;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.5s ease-in-out;
}

.logo-container {
  text-align: center;
  animation: fadeIn 1.2s ease-in-out;
}

.logo {
  width: 120px;
  height: 120px;
  animation: pulse 1.6s infinite ease-in-out;
}

.loader-text {
  margin-top: 1rem;
  font-size: 1.8rem;
  font-weight: bold;
  animation: slideIn 1s ease forwards;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* End of loading animation */
#header {
   width: 100vw;
  max-width: 100%;
       font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  position: relative;
  z-index: 1;
  padding: 4rem 1rem;
  text-align: center;
  background: url('./cherrybg.webp') no-repeat center center;
  background-size: cover;
  color: white;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    }
@font-face {
  font-family: custom;
  src: url(./Fonts/Milchella-Regular.ttf);
}
    #header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* dark overlay */
  z-index: -1;
}
#header h1 {
  font-family: custom;
  font-size: 2.5rem;
  font-weight: normal;
  margin-bottom: 0.5rem;
}

#header .tagline {
  font-size: 1.1rem;
  font-style: italic;
  color: #dddddd;
}



/* For screens smaller than 768px (mobile) */
@media (max-width: 768px) {
 
   
.week-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  .week-wrapper {
    width: 95%;
    margin: 0 auto;
  }

.day-card {
  background: rgb(82, 82, 82);
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  min-height: 160px;
  display: flex;
  flex-direction: column;
}

.day-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.week-wrapper {
  width: 90%;
  margin: 0 auto;}
}


/* For tablets (between 768px and 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  #header{
    padding: 2.5rem 1rem;
  } 

.week-grid {
  display: grid;
        grid-template-rows: repeat(auto-fit, minmax(120px, 1fr));

  /* grid-template-rows: repeat(auto-fit, minmax(150px, 1fr)); */ /* Remove this line */
  gap: 1rem;
  padding: 1rem;
}


.day-card {
  background: rgb(82, 82, 82);
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: auto;        /* ✅ allow natural height */
  min-height: 110px;   /* ✅ remove forced height */
  transition: all 0.2s ease-in-out;
}

.day-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.week-wrapper {
  width: 80%;
  margin: 0 auto;
 
}

}
/* For larger screens (laptops/desktops) */
@media (min-width: 1025px) {
 
.week-grid {
  display: grid;
        grid-template-rows: repeat(auto-fit, minmax(120px, 1fr));

  /* grid-template-rows: repeat(auto-fit, minmax(150px, 1fr)); */ /* Remove this line */
  gap: 1rem;
  padding: 1rem;
}

.day-card {
  background: rgb(82, 82, 82);
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: auto;        /* ✅ allow natural height */
  min-height: 140px;   /* ✅ remove forced height */
  transition: all 0.2s ease-in-out;
}


.day-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.week-wrapper {
  width: 80%;
  margin: 0 auto;
  
}

}


.tab-buttons button {
  padding: 10px 20px;
  margin: 0rem 0.2rem 0rem 1.3rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 0px 0px 8px 8px;
  background-color:rgb(30, 30, 30);
  color:#e1e1e1;
  border: none;
}
.tab-buttons button.active-tab {
  background-color: #e1e1e1; /* Cream white */
  color: rgb(30, 30, 30);
}
.tab-buttons button:hover {
  opacity: 0.785;
}

.task {
  color: #1f1f1f;
  margin: 0.3rem 0;
  padding: 0.6rem 0.4rem 0.6rem 1rem;
  background: #a6bee9;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.task:hover {
  background-color: #7998c2;
}

.empty-msg {
  font-style: normal;
  color: #aaa;
}

.add-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);

  display: flex;
  align-items: center;
  justify-content: center;
}

.add-task-form {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  color: #252525;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 100;
  flex-direction: column;
  gap: 1rem;
}

.add-task-form input,
.add-task-form select {
  /* height: 2.34rem;*/ 
    min-width: 11rem;
  max-width: 15rem;

   width: 30vw; 
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ddd;
  text-align: center;
}

.add-task-form button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background: #007bff;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

 @media (min-width: 481) and  (max-width: 768px) {
  .add-task-form {
    
    padding: 1.5rem;
    font-size: 0.95rem;
  }

  .add-task-form input,
  .add-task-form select {
    font-size: 0.95rem;
    padding: 0.4rem;
  }

  .add-task-form button {
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
  }
} 

@media (max-width: 480px) {
  .add-task-form {
    
    padding: 1rem;
    font-size: 0.9rem;
  }

  .add-task-form input,
  .add-task-form select {
    font-size: 0.9rem;
    padding: 0.35rem;
  }

  .add-task-form button {
    font-size: 0.9rem;
    padding: 0.35rem 0.75rem;
  }
}  
/* .add-task-form {
    max-width: 500px;
    width: 100%;
  }  */
.close-form {
  background: #b71c1c;
  margin-left: 1rem;
}
  .uploadForm {
      margin-top: 0.5rem;
      display: flex;
      gap: 0.4rem;
      align-items: center;
    }
    .uploadForm input[type="file"] {
      flex: 1;
    }
    .uploadForm button {
      padding: 4px 10px;
      background-color: #1976d2;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }
    .uploadForm button:hover {
      background-color: #145a9e;
    }
    
#logoutIconWrapper {
  position: absolute;
  top: 16px;
  right: 16px; /* ✅ changed from left to right */
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 100;
}

#logoutIconWrapper:hover {
  background-color: rgba(255, 255, 255, 0.15); /* Translucent white */
}

#logoutIcon {
  width: 24px;
  height: 24px;
  display: block;
  filter: invert(1); /* Makes the icon white (useful if it's black by default) */
}


.toast {
  position: fixed;
  top: 20px;              /* ⬆️ 20px from top */
  left: 50%;              /* 📍Center horizontally */
  transform: translateX(-50%); /* 💫 Perfectly center */
  background: #1f1f1f;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: none;
  font-size: 14px;
  z-index: 9999;
}
.toast button {
  margin-left: 12px;
  padding: 4px 8px;
  background: #00c853;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.toast span {
  margin-left: 10px;
  cursor: pointer;
}

/*admin ui changes*/
footer {
text-align: center; 
   padding: 1rem; 
   font-size: 0.8rem; 
   color: #aaa; 
   background-color: rgb(23, 23, 23);
  width: 100vw;
  max-width: 100%;
}



/* ========================= */
/* 💼 ADMIN UI ENHANCEMENTS */
/* ========================= */

.admin-only.visible {
  display: inline-block;
}


#showFormBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #2F7ECF;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 2rem;
  font-weight: bold;
  display: none; /* Hidden by default */
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 999;
}

#showFormBtn:hover {
  background-color: #044890;
}

/* Show only if admin */
#showFormBtn.admin-only.visible {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* Upload & Preview Buttons */
.uploadForm {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.uploadForm input[type="file"] {
  flex: 1 1 auto;
  min-width: 120px;
  color: #ddd;
}

.uploadForm button {
  padding: 4px 10px;
  background-color: #1976d2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s ease;
}

.uploadForm button:hover {
  background-color: #145a9e;
}

/* Preview & Delete File Buttons */
.previewFileBtn,
.deleteFileBtn {
  padding: 4px 8px;
  margin-top: 0.4rem;
  margin-right: 0.4rem;
  background-color: #444;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.previewFileBtn:hover {
  background-color: #5c6bc0;
}

.deleteFileBtn:hover {
  background-color: #d32f2f;
}

/* Delete Icon (×) */
.delete-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: transparent;
  color: #b71c1c;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.delete-icon:hover {
  background-color: #b71c1c;
  color: white;
  transform: scale(1.1);
}


/* Notification badge (🔴 red dot) */
#notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  display: none;
  z-index: 10;
}

#notif-badge.show {
  display: block !important;
}

/* Upload + Preview Container (in task) */
.task .admin-only {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

/* Responsive Admin UI */
@media (max-width: 768px) {

  .task .admin-only {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px dashed rgba(255,255,255,0.1);
  }

  .task .uploadForm {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.4rem;
  }

  .task .uploadForm input[type="file"] {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.3rem;
  }

  .task .uploadForm button,
  .task .deleteFileBtn {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.45rem;
    margin: 0;
  }

  .task span[title="Delete"] {
    align-self: flex-start;
    margin-top: 0.2rem;
  }

}


.current-day {
  border: 2px solid #dcdcdc;
  box-shadow: 0 0 12px 4px rgba(220, 220, 220, 0.3);
  border-radius: 10px;
}


