/* RESET & BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: white;
  color: #fdfcff;
}

/* Layout Structure */
.container {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(0deg, #cb75eb, #7855a5);
  padding: 2rem;
  border-right: 1px solid #bf8aff;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.04);
}
.brand {
  display: grid;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.brand img {
  width: 100%;
  height: 80px;
  object-fit: contain;
}
.nav ul {
  list-style: none;
  margin: 1.5rem 0;
}
.nav a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #ffffff;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav a:hover,
.nav a.active {
  background: linear-gradient(90deg, #cb75eb, #7855a5);
  color: #ffffff;
}

/* Main Content */
main {
  padding: 2rem;
  background: #fff;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.03);
}

/* Header */
.header {
  margin: 0 0 1.5rem 0; /* top, right, bottom, left */
  padding: 1.5rem 2rem;      /* top & bottom, left & right */
  border-bottom: 1px solid #eee;
  background: linear-gradient(0deg, #cb75eb, #7855a5);
  color: white;
}

.header p {
  color: #ffffff;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.header-buttons {
  display: flex;
  align-items: start;
}
.header button {
  background: linear-gradient(90deg, #cb75eb, #7855a5);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 1rem;
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.header button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}



/* Tasks Row */
.tasks-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.tasks-wrapper {
  display: grid;
  gap: 1rem;
}
/* ----- Task Card Styles ----- */
.task-card {
  width: 100%;
  background: linear-gradient(90deg, #cb75eb, #cb75eb);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0; /* space between cards */
  font-family: Arial, sans-serif;
  position: relative;
  
}

/* Title */
.task-card h2 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
}

/* Optional: show date/category/priority in smaller text */
.task-card .task-meta {
  margin: 0 0 8px 0;
  color: #ffffff;
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
}

/* Description */
.task-card p {
  margin: 0 0 16px 0;
  color: #ffffff;
}

/* Divider line */
.divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 0 0 16px 0;
}

/* Footer area with "Complete" button and icons */
.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Complete button */
.complete-btn {
  background: linear-gradient(90deg, #cb75eb, #7855a5);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
.complete-btn:hover {
  background-color: #6A3DDB;
}

/* Icon group container */
.icon-group {
  display: flex;
  gap: 8px;
}

/* Icon buttons */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
}
.icon-btn:hover {
  opacity: 0.7;
}

/* Example: priority-based classes if you want color-coded borders */
.low {
  border-left: 5px solid green;
}
.medium {
  border-left: 5px solid orange;
}
.high {
  border-left: 5px solid red;
}
.task-card.completed {
  opacity: 0.3;
  text-decoration: line-through;
}

.add-task {
  background: #fff;
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  color: #999;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  
}
.add-task:hover {
  background-color: #fafafa;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: linear-gradient(90deg, #cb75eb, #7855a5);
}
.modal-content {
  background: linear-gradient(90deg, #cb75eb, #7855a5);
  margin: 10% auto;
  padding: 20px;
  width: 80%;
  max-width: 500px;
  border-radius: 4px;
  position: relative;
}
.close {
  color: #aaa;
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover,
.close:focus {
  color: #000;
}

/* FOOTER */
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer {
  background: linear-gradient(180deg, #cb75eb, #cb75eb);
  border-top: 1px solid #eee;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #6c5ce7;
}
/* -------------------------------
   Improved Form Styling
---------------------------------*/

/* Form Group Container */
.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Form Labels */
.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #ffffff;
}

/* Input, Textarea, and Select Fields */
.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: #2d3436;
  transition: border-color 0.2s ease;
}

/* Focus State for Form Fields */
.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #6c5ce7;
}

/* Error Styling */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: #e74c3c;
}

/* Error Message */
.error-message {
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: block;
}

/* Form Actions (Buttons) */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-actions button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Cancel Button */
.form-actions button:first-child {
  background: linear-gradient(90deg, #cb75eb, #7855a5);
  color: #fff;
}

/* Submit/Action Button */
.form-actions button:last-child {
  background: linear-gradient(90deg, #cb75eb, #7855a5);
  color: #fff;
}

.form-actions button:hover {
  opacity: 0.9;
}

/* Enhanced Right Panel Layout */
.right-panel {
  display: grid;
  gap: 1.5rem;
  height: fit-content;
  background: linear-gradient(180deg, rgba(203, 117, 235, 0.95), rgba(203, 117, 235, 0.95));
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Calendar Styles */
.calendar-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 1.0rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.calendar-box header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 0.75rem;
  padding: 0 0.5rem;
}

#currentMonth {
  color: #2d3436;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5px;
}

#prevMonth, #nextMonth {
  background: linear-gradient(135deg, #cb75eb, #7855a5);
  color: white;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

#prevMonth:hover, #nextMonth:hover {
  transform: scale(1.05);
}

.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, minmax(40px, 1fr));
  gap: 1px;
}

.calendar-week {
  display: contents;
}

.calendar-weekday {
  font-size: 0.8rem;
  padding: 0.575rem 0.25rem;
  background: rgba(203, 117, 235, 0.1);
  text-transform: uppercase;
  font-weight: 700;
  color: #7855a5;
  letter-spacing: 0.3px;
  text-align: center;
}

.calendar-days {
  display: contents;
}

.calendar-day {
  /* padding: 0.875rem 0.25rem; */
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #2d3436;
  background: rgba(203, 117, 235, 0.03);
  transition: all 0.2s ease;
  position: relative;
  
}

.calendar-day.empty {
  visibility: hidden;
  background: transparent;
}

.calendar-day:hover:not(.empty) {
  background: rgba(203, 117, 235, 0.1);
  transform: translateY(-1px);
}

.calendar-day.today {
  background: linear-gradient(135deg, #cb75eb, #7855a5);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid #eee;
    box-shadow: none;
  }
  
  .calendar-box {
    padding: 1rem;
  }
  
  .calendar-day {
    min-height: 55px;
    font-size: 0.85rem;
  }
  
  #currentMonth {
    font-size: 1.05rem;
  }

  .tasks-row {
    grid-template-columns: 1fr;
  }
  .header {
    text-align: left;
  }
  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
}
