:root {
  --sidebar: #454273;
  --yellow: #f2de63;
  --green: #aed581;
  --blue: #90caf9;
  --purple: #b39ddb;

  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #2c2c2c;

  --shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.dark {
  --bg: #1e1e2e;
  --card: #2c2c3f;
  --text: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: 0.3s;
}

/* =========================
   LAYOUT
========================= */

.container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: var(--sidebar);
  color: white;
  padding: 30px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 15px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: 0.3s;
}

.sidebar li:hover,
.sidebar li.active {
  background: rgba(255, 255, 255, 0.15);
}

.main {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

/* =========================
   FULL WIDTH SECTIONS
========================= */

header,
.stats,
.task-form,
.filters,
.progress-card,
.calendar-card,
.task-section {
  grid-column: 1 / 3;
}

/* =========================
   HEADER
========================= */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: flex;
  gap: 10px;
}

header input {
  padding: 12px;
  border: none;
  border-radius: 10px;
}

#theme-toggle {
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

/* =========================
   STATS
========================= */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 2rem;
  font-weight: 700;
}

.yellow {
  background: var(--yellow);
}

.green {
  background: var(--green);
}

.blue {
  background: var(--blue);
}

.purple {
  background: var(--purple);
}

/* =========================
   TASK FORM
========================= */

.task-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 10px;
}

.task-form input,
.task-form select {
  padding: 12px;
  border: none;
  border-radius: 12px;
}

.task-form button {
  background: var(--sidebar);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
}

/* =========================
   FILTER
========================= */

.filters select {
  padding: 10px 15px;
  border-radius: 10px;
}

/* =========================
   PROGRESS
========================= */

.progress-card,
.calendar-card {
  background: var(--card);
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.progress-bar {
  height: 20px;
  background: #ddd;
  border-radius: 20px;
  overflow: hidden;
  margin: 15px 0;
}

#progressFill {
  width: 0%;
  height: 100%;
  background: #5c6bc0;
  transition: width 0.3s;
}

/* =========================
   TASK LIST
========================= */

#taskList {
  list-style: none;
}

.task {
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 15px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  box-shadow: var(--shadow);
  transition: 0.3s;
}

.task:hover {
  transform: translateY(-5px);
}

.task-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.priority-high {
  border-left: 6px solid red;
}

.priority-medium {
  border-left: 6px solid orange;
}

.priority-low {
  border-left: 6px solid green;
}

/* =========================
   BUTTONS
========================= */
.edit-btn,
.delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 10px 16px;

  border: none;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
  transition: 0.3s;
}

.edit-btn {
  background: #4f46e5;
  color: white;
}

.edit-btn:hover {
  background: #4338ca;
}

.delete-btn {
  background: #ef4444;
  color: white;
}

.delete-btn:hover {
  background: #dc2626;
}

/* =========================
   MODAL
========================= */

.modal {
  position: fixed;
  inset: 0;

  display: none;
  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  width: 400px;

  background: var(--card);
  color: var(--text);

  padding: 30px;
  border-radius: 20px;

  position: relative;
}

.modal-content h2 {
  margin-bottom: 20px;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.modal-content button {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 15px;

  border: none;
  background: transparent;

  cursor: pointer;
  font-size: 18px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main {
    grid-template-columns: 1fr;
  }

  header,
  .stats,
  .task-form,
  .filters,
  .progress-card,
  .calendar-card,
  .task-section {
    grid-column: auto;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .task-form {
    grid-template-columns: 1fr;
  }

  .task {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

.status-select {
  padding: 8px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
}

.pending {
  color: #ef5350;
}

.ongoing {
  color: #ff9800;
}

.completed {
  color: #4caf50;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: #f3f4f6;
}

.edit-btn {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.edit-btn:hover {
  background: #4338ca;
}

.delete-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.delete-btn:hover {
  background: #dc2626;
}

.sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar li {
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;

  font-size: 15px;
  font-weight: 500;

  transition: all 0.3s ease;
}

.sidebar li:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.sidebar li.active {
  background: white;
  color: var(--sidebar);
  font-weight: 600;
}

.content-section {
  display: none;
  width: 100%;
}

.content-section.active-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ======================================
   SETTINGS SECTION
====================================== */

.settings-card {
  text-align: center;
  padding: 30px;
}

.settings-description {
  color: #666;
  margin-bottom: 20px;
}

/* ======================================
   BUTTONS
====================================== */

.danger-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: 0.3s;
}

.danger-btn:hover {
  transform: translateY(-2px);
}

.cancel-btn {
  background: #e5e7eb;
  color: #111827;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.cancel-btn:hover {
  opacity: 0.9;
}

/* ======================================
   MODAL
====================================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  width: 400px;
  max-width: 90%;
  padding: 25px;
  border-radius: 16px;
  position: relative;
  text-align: center;
}

.modal-content h2 {
  margin-bottom: 15px;
}

.modal-content p {
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 15px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

/* ======================================
   DARK MODE SUPPORT
====================================== */

body.dark .modal-content {
  background: #1f2937;
  color: white;
}

body.dark .cancel-btn {
  background: #374151;
  color: white;
}

body.dark .settings-description {
  color: #d1d5db;
}

/* ======================================
   TOAST NOTIFICATION
====================================== */

.toast {
  position: fixed;
  top: 20px;
  right: 20px;

  background: #22c55e;
  color: white;

  padding: 14px 22px;

  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;

  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);

  opacity: 0;
  visibility: hidden;

  transform: translateY(-20px);

  transition: all 0.3s ease;

  z-index: 2000;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ------------------------------------- FOCUS TIMER ---------------------------------- */

.focus-card {
  text-align: center;
}

.timer-settings {
  margin-bottom: 15px;
}

.timer-settings input {
  width: 100px;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #ccc;
}

#timer {
  font-size: 4rem;
  font-weight: 700;
}

.timer-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timer-buttons button {
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.calendar-header button {
  padding: 8px 15px;
  cursor: pointer;
}

#calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day {
  min-height: 120px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px;
  background: white;
}

.day-number {
  font-weight: bold;
  margin-bottom: 8px;
}

.task-badge {
  background: #4f46e5;
  color: white;
  padding: 4px;
  border-radius: 5px;
  margin-top: 5px;
  font-size: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 10px;
}

.day-name {
  text-align: center;
  font-weight: bold;
}
/* ======================================
   NOTES SECTION
====================================== */

.notes-container {
  width: 100%;
}

.notes-container h2 {
  margin-bottom: 20px;
}

.keep-input {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.keep-input input,
.keep-input textarea {
  width: 100%;
  border: none;
  outline: none;
  font-family: inherit;
}

.keep-input input {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
}

.keep-input textarea {
  resize: none;
  min-height: 100px;
  font-size: 15px;
}

.keep-input button {
  margin-top: 15px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.note-card {
  min-height: 220px;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.note-card:hover {
  transform: translateY(-5px);
}

.note-card h3 {
  margin-bottom: 12px;
}

.note-card p {
  line-height: 1.6;
  white-space: pre-wrap;
}

.note-actions {
  position: absolute;
  bottom: 15px;
  left: 15px;
  display: flex;
  gap: 10px;
}

.note-actions button {
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.7);
}

body.dark .keep-input {
  background: #222;
}

body.dark .keep-input input,
body.dark .keep-input textarea {
  background: transparent;
  color: white;
}
.goals-container {
  width: 100%;
}

.goal-form {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.goal-form input,
.goal-form select {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.goal-form input {
  flex: 1;
}

.goal-card {
  background: white;
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.goal-type {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.primary-goal {
  background: #ffe8a3;
}

.secondary-goal {
  background: #d9ecff;
}

.goal-progress {
  margin-top: 15px;
}

.goal-progress input {
  width: 100%;
}

.goal-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.goal-actions button {
  padding: 8px 12px;
  cursor: pointer;
}
/* ======================================
   ANALYTICS SECTION
====================================== */

.analytics-container {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.analytics-container h2 {
  margin-bottom: 20px;
}

.analytics-table-wrapper {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.analytics-table th {
  background: #4f46e5;
  color: white;
  padding: 14px;
  text-align: left;
  font-size: 14px;
}

.analytics-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.analytics-table tr:hover {
  background: #f9fafb;
}

.analytics-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* Priority Colors */

.priority-high {
  color: #ef4444;
  font-weight: 600;
}

.priority-medium {
  color: #f59e0b;
  font-weight: 600;
}

.priority-low {
  color: #10b981;
  font-weight: 600;
}

/* Early Completion */

.early {
  color: #10b981;
  font-weight: 700;
}

/* Delayed Completion */

.delayed {
  color: #ef4444;
  font-weight: 700;
}

/* Responsive */

@media (max-width: 768px) {
  .analytics-table {
    min-width: 900px;
  }
}
.task-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #555;
}

.form-group input,
.form-group select {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
}

#addTask {
  height: 45px;
}
.task-search {
  margin: 20px 0;
}

.task-search input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
}
