/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f7fa;
  color: #333;
  line-height: 1.6;
}

/* THEME TOGGLE ICON */
.theme-toggle {
  text-align: center;
  margin-bottom: 15px;
}

.theme-toggle i {
  font-size: 1.5rem;
  cursor: pointer;
  color: #0f172a;
  transition: 0.3s;
}

.theme-toggle i:hover {
  transform: scale(1.2);
}

/* Dark mode icon color */
body.dark-mode .theme-toggle i {
  color: #facc15;
}
.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* Headings */
h1 {
  text-align: center;
  color: #0f172a;
  margin-bottom: 30px;
}

h2 {
  color: #0f172a;
  margin-bottom: 10px;
  font-size: 1.4rem;
}

/* Forms */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

form input,
form select,
form button {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.95rem;
}

form button {
  background: #3bf6e6;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
  border: none;
}

form button:hover {
  background: #2563eb;
}

/* Messages */
.message {
  margin-top: 8px;
  color: #ef4444;
}

/* Task List */
#tasks {
  list-style: none;
}

#tasks li {
  padding: 10px 15px;
  margin-bottom: 10px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.2s;
  flex-wrap: wrap;
}

#tasks li:hover {
  background: #e2e8f0;
}

/* Priority Colors */
/* Priority Borders */
#tasks li.priority-high {
  border-left: 6px solid #ef4444; /* red */
}
#tasks li.priority-medium {
  border-left: 6px solid #f59e0b; /* amber */
}
#tasks li.priority-low {
  border-left: 6px solid #10b981; /* green */
}

/* Buttons inside tasks */
#tasks li button {
  margin-left: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.2s;
  border: none;
}

#tasks li button:nth-child(2) {
  background: #facc15; /* Next Status amber */
  color: #1e293b;
}

#tasks li button:nth-child(3) {
  background: #ef4444; /* Delete red */
  color: #fff;
}

#tasks li button:hover {
  opacity: 0.85;
}
.report-card {
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px;
  background: #e2e8f0;
}

/* DARK MODE PRIORITY & BUTTONS */
body.dark-mode h1 {
  color: #fff;
  margin-bottom: 30px;
}
body.dark-mode h2 {
  color: #fff;
  margin-bottom: 30px;
}
body.dark-mode .report-card {
  background: #475569;
}
body.dark-mode #tasks li.priority-high {
  border-left: 6px solid #f87171; /* lighter red */
}
body.dark-mode #tasks li.priority-medium {
  border-left: 6px solid #fbbf24; /* lighter amber */
}
body.dark-mode #tasks li.priority-low {
  border-left: 6px solid #34d399; /* lighter green */
}

body.dark-mode #tasks li button:nth-child(2) {
  background: #fbbf24;
  color: #1e293b;
}
body.dark-mode #tasks li button:nth-child(3) {
  background: #f87171;
}

/* Filter */
.filter {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

/* STATUS BADGES */
.status-badge {
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background: #6b7280; /* gray */
}
.status-in_progress {
  background: #f59e0b; /* amber */
}
.status-done {
  background: #10b981; /* green */
}

/* DARK MODE */
body.dark-mode {
  background: #1e293b;
  color: #f1f5f9;
}

body.dark-mode .container {
  background: #334155;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode form input,
body.dark-mode form select,
body.dark-mode form button {
  background: #475569;
  color: #f1f5f9;
  border: 1px solid #64748b;
}

body.dark-mode form button {
  background: #3bf6e6;
}

body.dark-mode #tasks li {
  background: #475569;
}

body.dark-mode #tasks li:hover {
  background: #64748b;
}

body.dark-mode #daily-report pre {
  background: #475569;
  color: #f1f5f9;
}

/* Daily Report */
#daily-report pre {
  background: #f1f5f9;
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
}

/* ========================= */
/* RESPONSIVE LAYOUT */
@media (max-width: 768px) {
  .container {
    margin: 20px;
    padding: 15px;
  }

  form {
    flex-direction: column;
  }

  #tasks li {
    flex-direction: column;
    align-items: flex-start;
  }

  #tasks li button {
    margin-left: 0;
  }

  .filter {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  form input,
  form select,
  form button {
    width: 100%;
  }

  #tasks li {
    font-size: 0.9rem;
  }
}
