/* Reset & Base */
  * {
      box-sizing: border-box;
      }
  html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  justify-content: center; /* horizontal tengah */
  align-items: center;    /* vertikal tengah */
  min-height: 100vh;
  background-color: #121722;
  color: #cbd5e1;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.todo-container {
  background-color: #1e2538;
  border-radius: 12px;
  padding: 30px 36px 40px 36px; /* padding lebih besar */
  box-shadow: 0 0 20px rgba(50,50,50,0.8);
  width: 700px; /* Lebar lebih besar */
  height: auto;
  max-width: 90vw; /* responsif */
}


  /* Title */
  .todo-container h2 {
    margin: 0 0 18px 0;
    color: #94a3b8;
    font-weight: 700;
    font-size: 22px;
    text-align: center;
  }

  /* Form area */
  .todo-form {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
  }

  .todo-form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    background-color: #2d334d;
    color: #e2e8f0;
    font-size: 14px;
  }

  .todo-form input[type="text"]::placeholder {
    color: #64748b;
  }

  .todo-form input[type="date"] {
    max-width: 140px;
    padding: 12px 12px;
    border-radius: 8px;
    border: none;
    background-color: #2d334d;
    color: #e2e8f0;
    font-size: 14px;
  }

  .todo-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.9);
    cursor: pointer;
  }

  /* Add button */
  .add-btn {
    background-color: #6366f1; /* indigo-500 */
    color: white;
    border: none;
    border-radius: 8px;
    width: 44px;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  .add-btn:hover {
    background-color: #4f46e5;
  }

  /* Controls */
  .controls {
    display: flex;
    margin-bottom: 14px;
    justify-content: space-between;
  }

  button.filter-btn,
  button.delete-all-btn {
    padding: 8px 14px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 12px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background-color 0.3s ease;
  }

  button.filter-btn {
    background-color: #2d334d;
    color: #94a3b8;
  }
  button.filter-btn:hover {
    background-color: #3f4b73;
    color: white;
  }

  button.delete-all-btn {
    background-color: #ef4444; /* red-500 */
    color: white;
  }
  button.delete-all-btn:hover {
    background-color: #dc2626;
  }

  /* Table */
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #cbd5e1;
  }

  thead tr {
    background-color: #2d334d;
  }

  thead th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.06em;
  }

  tbody tr {
    border-bottom: 1px solid #3f4b73;
  }

  tbody tr:last-child {
    border-bottom: none;
  }

  tbody td {
    padding: 12px 10px;
    vertical-align: middle;
  }

  /* No task found */
  .no-tasks {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    padding: 20px;
  }

  /* Status checkbox */
  input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
  }

  /* Action delete button */
  .delete-btn {
    background-color: #ef4444;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

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

  /* Completed style for task text */
  .completed-text {
    color: #6ee7b7;
    text-decoration: line-through;
  }
  /* Tablet (max-width: 768px) */
@media (max-width: 768px) {
  .todo-container {
    width: 90%;
    padding: 24px 28px;
  }

  .todo-form {
    flex-direction: column;
  }

  .todo-form input[type="text"],
  .todo-form input[type="date"] {
    width: 100%;
  }

  .add-btn {
    width: 100%;
    height: 44px;
    font-size: 22px;
  }

  table th, table td {
    font-size: 13px;
    padding: 10px 6px;
  }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding-top: 40px;
  }

  .todo-container {
    width: 92%;
    padding: 22px;
  }

  h2 {
    font-size: 18px !important;
  }

  .controls {
    flex-direction: column;
    gap: 10px;
  }

  button.filter-btn,
  button.delete-all-btn {
    width: 100%;
    padding: 10px 0;
    font-size: 13px;
  }

  table {
    font-size: 12px;
  }

  table th, table td {
    padding: 8px 5px;
  }

  .delete-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
}
/* Center table on mobile */
@media (max-width: 480px) {
  table {
    margin-left: auto;
    margin-right: auto;
  }

  tbody tr, thead tr {
    text-align: center;
    justify-content: center;
    align-items: center;
  }

  tbody td, thead th {
    text-align: center;
    justify-content: center;
    align-items: center;
  }
}