/* ================================
   RESET
================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fb;
  color: #172033;
  min-height: 100vh;
}

/* ================================
   REUSABLE
================================ */

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

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

.header {
  background: #ffffff;
  border-bottom: 1px solid #e7eaf0;
}

.navbar {
  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  color: #2563eb;
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
}

.project-label {
  color: #64748b;
  font-size: 14px;
}

/* ================================
   HERO
================================ */

.hero {
  padding: 88px 0 52px;
}

.eyebrow {
  margin-bottom: 16px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  max-width: 650px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -2px;
}

.hero h1 span {
  color: #2563eb;
}

.hero-text {
  max-width: 600px;
  margin-top: 22px;
  color: #64748b;
  font-size: 18px;
  line-height: 1.7;
}

/* ================================
   TASK APPLICATION
================================ */

.task-app {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 90px;
}

/* ================================
   TASK CARDS
================================ */

.task-app-wrapper {
  width: 100%;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e7eaf0;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

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

#taskForm {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

#taskInput {
  flex: 1;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #dbe0e8;
  border-radius: 10px;
  background: #ffffff;
  font-size: 16px;
  color: #172033;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#taskInput::placeholder {
  color: #94a3b8;
}

#taskInput:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* ================================
   DATE INPUT
================================ */

.date-input-wrapper {
  position: relative;
  width: 210px;
  flex-shrink: 0;
}

.date-placeholder {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 15px;
  pointer-events: none;
  z-index: 2;
}

#taskDueDate {
  position: relative;
  width: 100%;
  padding: 15px 15px;
  border: 1px solid #dbe0e8;
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
  font-size: 15px;
  outline: none;
  cursor: pointer;
  z-index: 1;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#taskDueDate:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* ================================
   ADD TASK BUTTON
================================ */

#taskForm button {
  flex-shrink: 0;
  min-width: 120px;
  padding: 0 24px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#taskForm button:hover {
  background: #1d4ed8;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.2);
}

#taskForm button:active {
  transform: scale(0.97);
}

/* ================================
   TASK CONTROLS
================================ */

.task-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.task-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 14px;
  white-space: nowrap;
}

.task-summary strong {
  color: #172033;
  font-size: 16px;
}

/* ================================
   FILTERS
================================ */

.filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.filter-row {
  display: none;
}

.filter-btn:hover {
  background: #e9eef8;
}

.filter-btn.active {
  background: #dbeafe;
  color: #2563eb;
}

/* ================================
   MOBILE FILTER TOGGLE
================================ */

.filter-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid #dbe0e8;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.filter-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

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

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ================================
   TASK ITEM
================================ */

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.task-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* ================================
   TASK LEFT SIDE
================================ */

.task-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #2563eb;
}

.task-text {
  font-size: 16px;
  word-break: break-word;
}

.task-item.completed .task-text {
  color: #94a3b8;
  text-decoration: line-through;
}

/* ================================
   DUE DATE
================================ */

.task-due {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-due-date {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.task-item.completed .task-due-date {
  color: #94a3b8;
}

/* ================================
   DELETE BUTTON
================================ */

.delete-btn {
  flex-shrink: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

/* ================================
   EMPTY STATE
================================ */

.empty-state {
  padding: 55px 20px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e7eaf0;
  border-radius: 14px;
  color: #64748b;
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
  font-size: 24px;
  font-weight: 700;
}

.empty-state h2 {
  margin-bottom: 8px;
  color: #172033;
  font-size: 20px;
}

.empty-state p {
  font-size: 14px;
}

/* ================================
   FOOTER
================================ */

.footer {
  padding: 25px 0;
  border-top: 1px solid #e7eaf0;
  background: #ffffff;
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

/* ================================
   TABLET
================================ */

@media (max-width: 800px) {
  #taskForm {
    flex-wrap: wrap;
  }

  #taskInput {
    width: 100%;
    flex-basis: 100%;
  }

  .date-input-wrapper {
    flex: 1;
    width: auto;
  }

  #taskForm button {
    flex: 0 0 auto;
  }

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

  .filters {
    width: 100%;
  }
}

/* ================================
   MOBILE
================================ */

@media (max-width: 600px) {
  /* Header */

  .navbar {
    min-height: 64px;
  }

  .logo {
    font-size: 22px;
  }

  .project-label {
    font-size: 12px;
  }

  /* Hero */

  .hero {
    padding: 50px 0 32px;
  }

  .eyebrow {
    margin-bottom: 13px;

    font-size: 12px;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .hero-text {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.6;
  }

  /* Task Application */

  .task-app {
    gap: 18px;
    margin-bottom: 60px;
  }

  .task-app-wrapper {
    padding: 18px;
    border-radius: 14px;
  }

  /* Form */

  #taskForm {
    flex-direction: column;
    gap: 10px;
  }

  #taskInput,
  .date-input-wrapper,
  #taskDueDate,
  #taskForm button {
    width: 100%;
  }

  .date-input-wrapper {
    height: 50px;
  }

  #taskInput,
  #taskDueDate {
    height: 50px;
  }

  #taskForm button {
    height: 50px;
  }

  /* Controls */

  .task-controls {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
  }

  .filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .filter-toggle {
    display: flex;
  }

  .filters {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    padding: 6px;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e7eaf0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
    z-index: 10;
    width: 180px;
    gap: 3px;
  }

  .filters.show {
    display: flex;
  }

  .filter-btn {
    width: 100%;
    text-align: left;
    border-radius: 7px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .filter-btn:hover {
    background: #f1f5f9;
  }

  .filter-btn.active {
    background: #dbeafe;
    color: #2563eb;
  }

  /* Tasks */

  .task-list {
    gap: 9px;
  }

  .task-item {
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .task-left {
    align-items: flex-start;
    gap: 10px;
  }

  .task-checkbox {
    margin-top: 2px;
  }

  .task-text {
    font-size: 15px;
    line-height: 1.4;
  }

  .task-due-date {
    font-size: 12px;
  }

  .delete-btn {
    padding: 7px 10px;
    font-size: 12px;
  }

  /* Empty State */

  .empty-state {
    padding: 45px 18px;
  }

  /* Footer */

  .footer {
    padding: 22px 0;
  }
}
