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

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;

  --primary: #6c5ce7;
  --primary-dark: #5546d8;
  --primary-soft: #efedff;

  --text: #182033;
  --muted: #7a8497;

  --border: #e1e6ef;

  --green: #22c55e;
  --green-soft: #ecfdf3;

  --orange: #f59e0b;
  --orange-soft: #fff7e6;

  --shadow:
    0 24px 70px
    rgba(32, 45, 75, 0.1);
}

body {
  min-height: 100vh;

  background:
    radial-gradient(
      circle at 5% 10%,
      rgba(108, 92, 231, 0.08),
      transparent 30%
    ),
    radial-gradient(
      circle at 95% 90%,
      rgba(87, 160, 255, 0.08),
      transparent 30%
    ),
    var(--bg);

  color: var(--text);

  font-family:
    Inter,
    Arial,
    Helvetica,
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}


/* APP */

.app {
  width: min(1450px, 100%);

  min-height: 100vh;

  display: grid;

  grid-template-columns:
    260px
    minmax(0, 1fr);

  margin: 0 auto;

  background: var(--surface);

  box-shadow: var(--shadow);
}


/* SIDEBAR */

.sidebar {
  position: sticky;
  top: 0;

  height: 100vh;

  display: flex;
  flex-direction: column;

  padding: 28px 20px;

  border-right: 1px solid var(--border);

  background:
    linear-gradient(
      180deg,
      #151d32,
      #1d2945
    );

  color: white;
}

.logo {
  display: flex;
  align-items: center;

  gap: 12px;

  margin-bottom: 38px;
}

.logo-icon {
  width: 44px;
  height: 44px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      #7c6cff,
      #5d4ee5
    );

  font-size: 20px;
  font-weight: 900;

  box-shadow:
    0 12px 30px
    rgba(108, 92, 231, 0.35);
}

.logo strong,
.logo span {
  display: block;
}

.logo strong {
  margin-bottom: 2px;

  font-size: 15px;
}

.logo span {
  color: #8e9bb4;

  font-size: 10px;
}


/* NAV */

.nav {
  display: grid;

  gap: 7px;
}

.nav-item {
  width: 100%;

  display: grid;

  grid-template-columns:
    28px
    1fr
    auto;

  align-items: center;

  gap: 8px;

  padding: 11px 12px;

  border: none;
  border-radius: 10px;

  background: transparent;

  color: #95a3bc;

  text-align: left;

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

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-item:hover {
  background:
    rgba(255,255,255,.05);

  color: white;
}

.nav-item.active {
  background:
    rgba(108, 92, 231, 0.16);

  color: #b9b2ff;
}

.nav-item > span {
  font-size: 15px;
}

.nav-item strong {
  min-width: 24px;

  padding: 3px 7px;

  border-radius: 999px;

  background:
    rgba(255,255,255,.06);

  color: #b8c2d3;

  text-align: center;

  font-size: 9px;
}


/* SIDEBAR PROGRESS */

.sidebar-card {
  margin-top: 30px;

  padding: 16px;

  border: 1px solid
    rgba(255,255,255,.07);

  border-radius: 12px;

  background:
    rgba(255,255,255,.035);
}

.card-label {
  display: block;

  margin-bottom: 13px;

  color: #6f7d96;

  font-size: 9px;
  font-weight: 700;

  letter-spacing: 0.08em;
}

.progress-info {
  display: flex;
  align-items: baseline;

  gap: 6px;

  margin-bottom: 10px;
}

.progress-info strong {
  font-size: 25px;
}

.progress-info span {
  color: #73809a;

  font-size: 10px;
}

.progress-track {
  width: 100%;
  height: 6px;

  overflow: hidden;

  border-radius: 999px;

  background: #273450;
}

.progress-bar {
  width: 0%;
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      #6c5ce7,
      #8d7cff
    );

  transition:
    width 0.3s ease;
}


/* SIDEBAR FOOTER */

.sidebar-footer {
  margin-top: auto;

  padding-top: 24px;

  color: #6d7890;
}

.sidebar-footer span,
.sidebar-footer small {
  display: block;
}

.sidebar-footer span {
  margin-bottom: 4px;

  font-size: 10px;
  font-weight: 700;
}

.sidebar-footer small {
  font-size: 9px;
}


/* CONTENT */

.content {
  padding: 42px 46px 60px;

  background:
    linear-gradient(
      180deg,
      #fbfcfe,
      #f6f8fb
    );
}


/* HEADER */

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 28px;
}

.eyebrow {
  display: block;

  margin-bottom: 7px;

  color: var(--primary);

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 0.11em;
}

.header h1 {
  margin-bottom: 7px;

  font-size: 36px;

  letter-spacing: -0.035em;
}

.header p {
  color: var(--muted);

  font-size: 13px;
}

.date-card {
  min-width: 120px;

  padding: 12px 14px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: white;

  text-align: right;

  box-shadow:
    0 10px 30px
    rgba(30, 45, 70, 0.05);
}

.date-card span,
.date-card strong {
  display: block;
}

.date-card span {
  margin-bottom: 3px;

  color: var(--muted);

  font-size: 9px;

  text-transform: uppercase;
}

.date-card strong {
  font-size: 14px;
}


/* STATS */

.stats {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 14px;

  margin-bottom: 22px;
}

.stat-card {
  display: flex;
  align-items: center;

  gap: 13px;

  padding: 18px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: white;

  box-shadow:
    0 12px 35px
    rgba(30, 45, 70, 0.04);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.stat-card:hover {
  transform:
    translateY(-2px);

  box-shadow:
    0 18px 40px
    rgba(30, 45, 70, 0.07);
}

.stat-icon {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  font-size: 17px;
  font-weight: 800;
}

.stat-icon.purple {
  background: var(--primary-soft);

  color: var(--primary);
}

.stat-icon.orange {
  background: var(--orange-soft);

  color: var(--orange);
}

.stat-icon.green {
  background: var(--green-soft);

  color: var(--green);
}

.stat-card span,
.stat-card strong {
  display: block;
}

.stat-card span {
  margin-bottom: 4px;

  color: var(--muted);

  font-size: 10px;
}

.stat-card strong {
  font-size: 24px;
}


/* TASK PANEL */

.task-panel {
  margin-bottom: 22px;

  padding: 22px;

  border: 1px solid var(--border);
  border-radius: 15px;

  background: white;

  box-shadow:
    0 12px 35px
    rgba(30, 45, 70, 0.04);
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2,
.tasks-header h2 {
  font-size: 18px;

  letter-spacing: -0.02em;
}

.task-form {
  display: flex;

  gap: 10px;
}

.task-form input {
  flex: 1;

  min-width: 0;

  padding: 13px 14px;

  border: 1px solid var(--border);
  border-radius: 10px;

  outline: none;

  background: #f9fafc;

  color: var(--text);

  transition:
    border-color .2s ease,
    box-shadow .2s ease;
}

.task-form input::placeholder {
  color: #9aa3b2;
}

.task-form input:focus {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px
    rgba(108, 92, 231, 0.1);
}

#addTaskBtn {
  display: inline-flex;
  align-items: center;

  gap: 8px;

  padding: 12px 18px;

  border: none;
  border-radius: 10px;

  background:
    linear-gradient(
      135deg,
      var(--primary),
      #7d6cf0
    );

  color: white;

  font-size: 12px;
  font-weight: 700;

  box-shadow:
    0 12px 28px
    rgba(108, 92, 231, 0.22);

  transition:
    transform .2s ease,
    background .2s ease;
}

#addTaskBtn:hover {
  transform:
    translateY(-1px);

  background:
    linear-gradient(
      135deg,
      var(--primary-dark),
      #6b58e5
    );
}

#addTaskBtn span {
  font-size: 17px;
}


/* TASKS */

.tasks-section {
  padding: 22px;

  border: 1px solid var(--border);
  border-radius: 15px;

  background: white;

  box-shadow:
    0 12px 35px
    rgba(30, 45, 70, 0.04);
}

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

  gap: 12px;

  margin-bottom: 16px;
}

.task-summary {
  padding: 6px 9px;

  border-radius: 999px;

  background: #f2f4f8;

  color: var(--muted);

  font-size: 10px;
}


/* TASK LIST */

.task-list {
  display: grid;

  gap: 10px;
}

.task-item {
  display: grid;

  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;

  align-items: center;

  gap: 12px;

  padding: 14px 15px;

  border: 1px solid var(--border);
  border-radius: 11px;

  background: #fbfcfe;

  transition:
    border-color .2s ease,
    transform .2s ease,
    background .2s ease;
}

.task-item:hover {
  transform:
    translateY(-1px);

  border-color:
    #cfc9ff;

  background:
    #fcfbff;
}

.task-check {
  width: 24px;
  height: 24px;

  display: grid;
  place-items: center;

  flex: 0 0 24px;

  border: 1px solid #ccd3df;
  border-radius: 7px;

  background: white;

  color: transparent;

  font-size: 13px;
  font-weight: 900;

  transition:
    background .2s ease,
    border-color .2s ease,
    color .2s ease;
}

.task-item.completed .task-check {
  border-color: var(--green);

  background: var(--green);

  color: white;
}

.task-content {
  min-width: 0;
}

.task-title {
  display: block;

  overflow: hidden;

  color: var(--text);

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

  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-item.completed .task-title {
  color: #9aa3b2;

  text-decoration: line-through;
}

.task-delete {
  width: 32px;
  height: 32px;

  display: grid;
  place-items: center;

  border: 1px solid transparent;
  border-radius: 8px;

  background: transparent;

  color: #98a1b0;

  transition:
    background .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.task-delete:hover {
  border-color: #ffd3d8;

  background: #fff4f5;

  color: #e5484d;
}


/* EMPTY OPTIONAL CLASS */

.task-list:empty {
  min-height: 40px;
}


/* RESPONSIVE */

@media (max-width: 1000px) {

  .app {
    grid-template-columns:
      220px
      minmax(0, 1fr);
  }

  .content {
    padding:
      32px
      28px
      50px;
  }

}


@media (max-width: 760px) {

  .app {
    display: block;
  }

  .sidebar {
    position: static;

    width: 100%;
    height: auto;

    padding: 18px;
  }

  .logo {
    margin-bottom: 20px;
  }

  .nav {
    grid-template-columns:
      repeat(3, 1fr);
  }

  .nav-item {
    grid-template-columns:
      1fr;

    justify-items: center;

    text-align: center;
  }

  .nav-item strong {
    display: none;
  }

  .sidebar-card,
  .sidebar-footer {
    display: none;
  }

  .content {
    padding:
      24px
      18px
      40px;
  }

  .header {
    align-items: stretch;

    flex-direction: column;
  }

  .date-card {
    width: fit-content;

    text-align: left;
  }

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

}


@media (max-width: 520px) {

  .header h1 {
    font-size: 30px;
  }

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

  #addTaskBtn {
    justify-content: center;

    width: 100%;
  }

  .tasks-header {
    align-items: flex-start;

    flex-direction: column;
  }

  .task-item {
    grid-template-columns:
      auto
      minmax(0, 1fr)
      auto;
  }

}