@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #232638;
  --muted: #898da0;
  --line: #ececf2;
  --paper: #fff;
  --canvas: #f7f8fb;
  --purple: #6d5ce8;
  --purple-dark: #5948d5;
  --purple-soft: #f0edff;
  --green: #2e9b72;
  --shadow: 0 12px 35px rgb(34 33 65 / 5%);
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
}

button, input, select { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 2;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 28px 17px 19px;
  border-right: 1px solid #eeeff4;
  background: var(--paper);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 54px 10px;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.8px;
  text-decoration: none;
}

.brand-mark { width: 31px; height: 31px; color: var(--purple); }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.nav-label { margin: 0 0 12px 12px; color: #a4a5b3; font-size: 9px; font-weight: 700; letter-spacing: 1.15px; }
.task-nav { display: grid; gap: 5px; }

.nav-item {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #707487;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}

.nav-item:hover { background: #f7f6fc; color: var(--ink); }
.nav-item.is-active { background: var(--purple-soft); color: var(--purple-dark); font-weight: 700; }
.nav-icon { display: inline-flex; width: 20px; justify-content: center; font-size: 18px; line-height: 1; }
.nav-count { margin-left: auto; color: #a4a5b3; font-size: 11px; }
.nav-item.is-active .nav-count { color: var(--purple); }

.sidebar-note {
  position: relative;
  overflow: hidden;
  margin: auto 3px 21px;
  padding: 16px 14px;
  border: 1px solid #eeebff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f6ff, #f5f2ff);
}

.note-sparkle { color: #8b7bed; font-size: 17px; }
.sidebar-note p { margin: 8px 0 0; color: #75738d; font-size: 12px; line-height: 1.65; }
.sidebar-note strong { color: #4a4566; font-weight: 700; }

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 5px 0;
  border-top: 1px solid var(--line);
}

.avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #f7d9c8; color: #9c5844; font-size: 13px; font-weight: 700; }
.profile-name { color: #515467; font-size: 12px; font-weight: 600; }
.private-badge { margin-left: auto; color: #8b8da0; font-size: 10px; }
.private-badge span { color: var(--green); font-size: 8px; }

.main-content { min-height: 100vh; margin-left: 252px; }

.topbar {
  display: flex;
  height: 69px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5.2%;
  border-bottom: 1px solid #eeeff4;
  background: rgb(255 255 255 / 78%);
}

.topbar-right { display: flex; align-items: center; gap: 14px; }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #9b9dad; font-size: 12px; }
.breadcrumb-slash { color: #d3d4dc; }
.breadcrumb strong { color: #55596b; font-weight: 600; }
.saved-status { color: #9295a6; font-size: 10px; }
.saved-status span { margin-right: 5px; color: var(--green); font-size: 8px; }
.app-notice { color: var(--green); font-size: 10px; }
.app-notice.is-error { color: #c85e5d; }
.sign-out-button { padding: 6px 9px; border: 1px solid #e8e8ef; border-radius: 7px; background: white; color: #737688; cursor: pointer; font-size: 10px; }
.sign-out-button:hover { border-color: #dcd8f7; color: var(--purple-dark); }

.content-wrap { width: min(880px, 100%); margin: 0 auto; padding: 51px 54px 60px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 9px; color: #999cad; font-size: 10px; font-weight: 700; letter-spacing: .9px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-family: Manrope, sans-serif; font-size: 33px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.2; }
.heading-sparkle { color: #9b8bf5; font-family: sans-serif; font-size: 21px; vertical-align: 5px; }
.page-subtitle { margin: 0; color: #9295a5; font-size: 13px; }

.primary-button, .secondary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.primary-button { background: var(--purple); box-shadow: 0 4px 10px rgb(109 92 232 / 17%); color: white; }
.primary-button:hover { transform: translateY(-1px); background: var(--purple-dark); box-shadow: 0 6px 15px rgb(109 92 232 / 22%); }
.plus-icon { font-size: 19px; font-weight: 400; line-height: 1; }

.progress-card {
  position: relative;
  display: flex;
  min-height: 105px;
  align-items: center;
  gap: 35px;
  overflow: hidden;
  padding: 20px 24px;
  border: 1px solid #e8e4ff;
  border-radius: 13px;
  background: linear-gradient(105deg, #f7f5ff 0%, #fbfaff 65%, #f5f2ff 100%);
}

.progress-copy { min-width: 190px; }
.progress-title { color: #46435f; font-size: 13px; font-weight: 700; }
.progress-icon { margin-right: 6px; color: #8876ef; }
.progress-copy p { margin: 6px 0 0; color: #9693aa; font-size: 11px; }
.progress-summary { z-index: 1; display: flex; flex: 1; align-items: center; gap: 13px; }
.progress-track { height: 7px; flex: 1; overflow: hidden; border-radius: 8px; background: #e8e4f8; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8170ec, #ae9df8); transition: width .3s ease; }
.progress-fraction { min-width: 40px; color: #77738f; font-size: 11px; font-weight: 600; text-align: right; }
.progress-decoration { position: absolute; right: 23px; bottom: -34px; color: rgb(143 127 239 / 8%); font-size: 130px; line-height: 1; }

.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 37px 0 14px; }
.list-heading { display: flex; align-items: center; gap: 9px; }
.list-heading h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -.3px; }
.task-total { display: grid; min-width: 22px; height: 21px; place-items: center; padding: 0 6px; border-radius: 7px; background: #eeecf8; color: #77718d; font-size: 10px; font-weight: 700; }
.priority-filter select { padding: 7px 25px 7px 10px; border: 1px solid #e8e8ef; border-radius: 7px; outline: 0; background-color: white; color: #777a8b; cursor: pointer; font-size: 10px; }
.priority-filter select:focus, .text-input:focus { border-color: #9b8cf0; box-shadow: 0 0 0 3px rgb(109 92 232 / 11%); }

.task-list { display: grid; gap: 9px; }
.task-card {
  display: flex;
  min-height: 73px;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid #ebecf1;
  border-radius: 10px;
  background: white;
  box-shadow: 0 2px 6px rgb(35 38 56 / 2%);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.task-card:hover { border-color: #dcd8f7; box-shadow: var(--shadow); }
.task-card.is-completed { background: #fcfcfd; }
.complete-button { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; border: 1.5px solid #d5d6e0; border-radius: 50%; background: white; color: white; cursor: pointer; font-size: 12px; transition: .15s ease; }
.complete-button:hover { border-color: var(--purple); background: #f6f4ff; }
.is-completed .complete-button { border-color: var(--green); background: var(--green); }
.task-main { min-width: 0; flex: 1; }
.task-title { overflow-wrap: anywhere; margin: 0; color: #45485a; font-size: 12px; font-weight: 600; line-height: 1.5; }
.is-completed .task-title { color: #a3a5b0; text-decoration: line-through; }
.task-meta { display: flex; align-items: center; gap: 9px; margin-top: 5px; }
.task-date { color: #999cac; font-size: 10px; }
.task-date.is-overdue { color: #d36a69; }
.priority-pill { display: inline-flex; align-items: center; gap: 5px; color: #9295a4; font-size: 9px; }
.priority-pill::before { width: 5px; height: 5px; border-radius: 50%; background: #aab0bb; content: ""; }
.priority-pill.priority-high { color: #d17170; }
.priority-pill.priority-high::before { background: #e27f7b; }
.priority-pill.priority-medium { color: #c4934b; }
.priority-pill.priority-medium::before { background: #e3b15e; }
.task-actions { display: flex; gap: 3px; opacity: 0; transition: opacity .15s ease; }
.task-card:hover .task-actions, .task-card:focus-within .task-actions { opacity: 1; }
.icon-button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #a0a2b0; cursor: pointer; font-size: 16px; }
.icon-button:hover { background: #f3f2fa; color: #6253ca; }
.task-actions .delete-task:hover { background: #fff0ef; color: #cf5f5d; }

.empty-state { padding: 52px 20px 47px; border: 1px dashed #e2e2eb; border-radius: 11px; background: rgb(255 255 255 / 54%); text-align: center; }
.empty-illustration { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 13px; border-radius: 16px; background: #f0edff; color: #8474e9; font-size: 21px; }
.empty-state h3 { margin: 0 0 6px; color: #55586a; font-family: Manrope, sans-serif; font-size: 14px; }
.empty-state p { margin: 0; color: #999cac; font-size: 11px; }
.empty-state .text-button { margin-top: 17px; padding: 0; border: 0; background: transparent; color: var(--purple); cursor: pointer; font-size: 11px; font-weight: 700; }
.list-footer { margin-top: 15px; color: #a0a2b0; font-size: 10px; text-align: center; }

.task-dialog { width: min(450px, calc(100vw - 32px)); padding: 26px; border: 1px solid #eeeef4; border-radius: 15px; box-shadow: 0 22px 70px rgb(33 35 58 / 20%); }
.task-dialog::backdrop { background: rgb(31 31 48 / 38%); backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }
.dialog-heading .eyebrow { margin-bottom: 6px; }
.dialog-heading h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 21px; letter-spacing: -.6px; }
.close-dialog { margin: -5px -5px 0 0; font-size: 22px; }
.field-label { display: block; margin: 0 0 7px; color: #5c5f70; font-size: 11px; font-weight: 600; }
.text-input { width: 100%; height: 41px; padding: 0 11px; border: 1px solid #e5e5ed; border-radius: 7px; outline: 0; background: white; color: #444758; font-size: 11px; }
.text-input::placeholder { color: #b0b2bd; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 17px; }
.form-field { min-width: 0; }
.form-field input { color: #74778a; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 25px; }
.secondary-button { border-color: #e8e8ef; background: white; color: #737688; }
.secondary-button:hover { background: #f8f8fb; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid rgb(109 92 232 / 35%); outline-offset: 2px; }
button:disabled { cursor: wait; opacity: .65; }

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 35px 20px;
  background:
    radial-gradient(ellipse at 18% 18%, rgb(226 220 255 / 55%), transparent 34%),
    radial-gradient(ellipse at 83% 86%, rgb(225 239 248 / 55%), transparent 34%),
    var(--canvas);
}

.login-brand { position: absolute; top: 28px; left: 32px; margin: 0; }
.login-card { width: min(410px, 100%); padding: 36px; border: 1px solid #eeeef4; border-radius: 16px; background: white; box-shadow: 0 18px 55px rgb(34 33 65 / 8%); }
.login-lock { display: grid; width: 43px; height: 43px; place-items: center; margin-bottom: 21px; border-radius: 13px; background: var(--purple-soft); color: var(--purple); font-size: 25px; }
.login-card .eyebrow { margin-bottom: 8px; }
.login-card h1 { margin-bottom: 8px; font-size: 25px; letter-spacing: -.8px; }
.login-subtitle { margin-bottom: 24px; color: #9295a5; font-size: 12px; line-height: 1.6; }
.login-card .text-input { height: 44px; font-size: 12px; }
.login-password-label { margin-top: 17px; }
.login-submit { width: 100%; margin-top: 21px; }
.login-error { margin: 13px 0 0; color: #c85e5d; font-size: 11px; line-height: 1.5; }
.login-error:not([hidden]) + .login-submit { margin-top: 12px; }
.login-private { margin: 19px 0 0; color: #9699a8; font-size: 10px; text-align: center; }
.login-private span { margin-right: 4px; color: var(--green); font-size: 8px; }

@media (max-width: 900px) {
  .sidebar { width: 220px; }
  .main-content { margin-left: 220px; }
  .content-wrap { padding-right: 34px; padding-left: 34px; }
  .progress-card { gap: 20px; }
  .progress-copy { min-width: 165px; }
}

@media (max-width: 680px) {
  .sidebar { position: relative; inset: auto; width: 100%; height: auto; padding: 12px 16px 10px; border-right: 0; border-bottom: 1px solid #eeeff4; }
  .brand { margin: 0 0 12px 2px; font-size: 17px; }
  .brand-mark { width: 27px; height: 27px; }
  .nav-label, .sidebar-note, .sidebar-footer { display: none; }
  .task-nav { display: flex; gap: 4px; overflow-x: auto; }
  .nav-item { min-height: 37px; flex: 0 0 auto; gap: 7px; padding: 0 10px; font-size: 11px; }
  .nav-icon { width: 15px; font-size: 15px; }
  .nav-count { display: none; }
  .main-content { min-height: calc(100vh - 94px); margin-left: 0; }
  .topbar { height: 45px; padding: 0 20px; }
  .breadcrumb { font-size: 10px; }
  .saved-status { font-size: 9px; }
  .topbar-right { gap: 8px; }
  .app-notice { display: none; }
  .sign-out-button { padding: 5px 7px; font-size: 9px; }
  .content-wrap { padding: 34px 20px 45px; }
  .page-heading { align-items: flex-start; margin-bottom: 23px; }
  h1 { font-size: 29px; }
  .page-subtitle { max-width: 210px; font-size: 11px; line-height: 1.5; }
  .page-heading .primary-button { min-height: 37px; gap: 5px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
  .plus-icon { font-size: 16px; }
  .progress-card { min-height: 112px; flex-direction: column; align-items: stretch; gap: 13px; padding: 16px; }
  .progress-copy { min-width: 0; }
  .progress-copy p { margin-top: 4px; }
  .progress-decoration { right: 10px; bottom: -52px; font-size: 105px; }
  .list-toolbar { margin-top: 28px; }
  .list-heading h2 { font-size: 13px; }
  .priority-filter select { max-width: 142px; font-size: 9px; }
  .task-card { gap: 10px; padding: 11px 10px; }
  .task-actions { opacity: 1; }
}

@media (max-width: 390px) {
  .content-wrap { padding-right: 14px; padding-left: 14px; }
  .topbar { padding-right: 14px; padding-left: 14px; }
  .saved-status { max-width: 138px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .login-brand { top: 17px; left: 18px; }
  .login-card { padding: 27px 22px; }
  .page-heading { gap: 8px; }
  .page-heading .primary-button { padding: 0 8px; }
  .task-meta { gap: 6px; }
}
