
:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --ink: #282b3a;
  --muted: #858697;
  --purple: #7867cf;
  --purple-light: #efecff;
  --green: #5a9d7a;
  --line: #eeedf0;
  --shadow: 0 8px 32px rgba(44, 39, 77, 0.045);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b8aaff;
  outline-offset: 3px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 245px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 30px 19px 22px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  color: var(--ink);
  font: 800 23px "Manrope", sans-serif;
  text-decoration: none;
  letter-spacing: -1.2px;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--purple);
  color: white;
  border-radius: 12px;
  letter-spacing: -2px;
}

.brand-dot {
  color: var(--purple);
}

.nav-label, .step-label, .mini-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.nav-label {
  margin: 49px 10px 15px;
  color: #a3a3b1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 3px 0;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #747487;
  text-align: left;
  font-weight: 600;
}

.nav-item > span:first-child {
  width: 20px;
  font-size: 18px;
  text-align: center;
}

.nav-item.active {
  color: #6451bc;
  background: var(--purple-light);
}

.nav-count {
  margin-left: auto;
  font-size: 12px;
}

.sidebar-bottom {
  margin-top: auto;
}

.focus-card {
  padding: 18px;
  border-radius: 15px;
  background: #f5f2ff;
}

.focus-spark {
  color: var(--purple);
  font-size: 25px;
}

.focus-title {
  margin: 13px 0 7px;
  font-weight: 700;
}

.focus-text {
  margin: 0;
  color: #77738d;
  font-size: 12px;
  line-height: 1.8;
}

.local-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 4px 0;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #65b98b;
}

.main-content {
  width: min(100%, 1100px);
  min-width: 0;
  margin: 0 auto;
  padding: 35px clamp(20px, 4vw, 52px) 22px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 27px;
}

.eyebrow, .step-label {
  color: #9291a1;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
}

h1, h2, h3, p {
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  font-family: "Manrope", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.3;
  letter-spacing: -1.5px;
}

h1 span {
  color: var(--purple);
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.avatar {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e8e2ff;
  color: #6654ba;
  font-weight: 800;
}

.welcome-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 190px;
  overflow: hidden;
  padding: 25px 32px;
  border-radius: 18px;
  background: linear-gradient(115deg, #e8e3ff, #f2efff 58%, #dff2e8);
}

.mini-label {
  color: #7664c3;
}

.welcome-copy h2 {
  margin: 12px 0 9px;
  font-size: clamp(23px, 3vw, 32px);
  letter-spacing: -1.2px;
  line-height: 1.3;
}

.welcome-copy h2 em {
  color: #7867cf;
  font-style: normal;
}

.welcome-copy p {
  margin: 0;
  color: #7d7a95;
  font-size: 12px;
}

.welcome-art {
  position: relative;
  width: 180px;
  height: 145px;
  flex-shrink: 0;
}

.art-circle {
  position: absolute;
  top: 10px;
  left: 24px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: #d4caFF;
}

.art-sheet {
  position: absolute;
  top: 27px;
  left: 43px;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 11px;
  width: 105px;
  padding: 14px 10px;
  border: 1px solid #ece7ff;
  border-radius: 10px;
  background: white;
  box-shadow: 0 8px 20px #7262a522;
  transform: rotate(-7deg);
}

.art-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #e4f3e9;
  color: #4d9a70;
  font-size: 11px;
}

.art-line {
  height: 5px;
  border-radius: 5px;
  background: #e7e5ef;
}

.art-line.long { width: 47px; }
.art-line.medium { width: 35px; }
.art-line.short { width: 28px; }

.art-empty {
  width: 18px;
  height: 18px;
  border: 1.5px solid #d8d3e7;
  border-radius: 6px;
}

.art-star {
  position: absolute;
  color: #8774da;
}

.star-one {
  top: 4px;
  right: 14px;
  font-size: 25px;
}

.star-two {
  bottom: 8px;
  right: 15px;
  color: #559e7b;
  font-size: 24px;
}

.panel {
  border: 1px solid #efedf3;
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.composer {
  margin-top: 24px;
  padding: 25px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.step-label {
  font-size: 9px;
}

.section-heading h2 {
  margin: 9px 0 0;
  font-size: 21px;
  letter-spacing: -.6px;
}

.soft-tag {
  padding: 8px 11px;
  border-radius: 8px;
  background: #f3f0ff;
  color: #7867cf;
  font-size: 11px;
  font-weight: 600;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

textarea {
  display: block;
  width: 100%;
  min-height: 125px;
  margin-top: 19px;
  padding: 16px;
  resize: vertical;
  border: 1px solid #eae8f0;
  border-radius: 11px;
  background: #fcfbfe;
  color: var(--ink);
  line-height: 1.8;
}

textarea::placeholder, input::placeholder {
  color: #aaa9b7;
}

textarea:focus, input:focus, select:focus {
  border-color: #a99be9;
  outline: 3px solid #eeeaff;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 15px;
}

.privacy-note {
  color: #8b8b9b;
  font-size: 11px;
}

.tiny-lock {
  color: var(--green);
}

.primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 12px 17px;
  border: 0;
  border-radius: 10px;
  background: var(--purple);
  color: white;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 10px #7867cf20;
  transition: background .2s, transform .2s;
}

.primary-button:hover {
  background: #6756bd;
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: .65;
  transform: none;
}

.error-message {
  margin: 13px 0 0;
  color: #b33f53;
  font-size: 12px;
  line-height: 1.6;
}

.task-section {
  margin-top: 34px;
}

.task-heading {
  margin-bottom: 17px;
}

.heading-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 7px;
  background: #efecff;
  color: #7867cf;
  font: 600 12px "DM Sans", sans-serif;
  vertical-align: middle;
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #8a8899;
  font-size: 11px;
}

.text-button:hover {
  color: #b34b5e;
}

.progress-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 15px;
  padding: 19px 21px;
}

.progress-copy > span {
  display: block;
  color: #9694a5;
  font-size: 9px;
  letter-spacing: 1.2px;
  font-weight: 700;
}

.progress-copy strong {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.progress-number {
  color: var(--green);
  font: 800 23px "Manrope", sans-serif;
}

.progress-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 8px;
  background: #eeedf2;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8e7de1, #66b28b);
  transition: width .3s ease;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 14px;
}

.filter-chip {
  padding: 8px 13px;
  border: 1px solid #e9e7ef;
  border-radius: 8px;
  background: #fff;
  color: #828193;
  font-size: 11px;
}

.filter-chip.selected {
  border-color: #7867cf;
  background: #efecff;
  color: #6756bd;
  font-weight: 700;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px;
  border: 1px solid #efedf2;
  border-radius: 13px;
  background: #fff;
  transition: border-color .2s, opacity .2s;
}

.task-card:hover {
  border-color: #d9d1fa;
}

.task-card.done {
  background: #fbfbfa;
}

.task-check {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1.5px solid #d9d6e4;
  border-radius: 7px;
  background: white;
  color: white;
}

.task-check[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.done .task-title {
  color: #9a99a5;
  text-decoration: line-through;
}

.task-description {
  margin: 5px 0 10px;
  color: #9291a0;
  font-size: 11px;
  line-height: 1.6;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.priority, .category {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}

.priority.high {
  background: #fff0ed;
  color: #c36555;
}

.priority.medium {
  background: #fff5df;
  color: #a87a25;
}

.priority.low {
  background: #e7f5eb;
  color: #488964;
}

.category {
  background: #f1eff7;
  color: #77738b;
}

.delete-task {
  padding: 3px 6px;
  border: 0;
  background: transparent;
  color: #aaa7b7;
  font-size: 17px;
}

.delete-task:hover {
  color: #c44d60;
}

.empty-state {
  padding: 36px 20px;
  border: 1px dashed #ded9ed;
  border-radius: 14px;
  background: #fcfbff;
  text-align: center;
}

.empty-illustration {
  position: relative;
  width: 110px;
  height: 95px;
  margin: 0 auto 15px;
}

.empty-sun {
  position: absolute;
  top: 0;
  right: 7px;
  color: #a594e8;
  font-size: 29px;
}

.empty-paper {
  position: absolute;
  top: 17px;
  left: 18px;
  display: grid;
  grid-template-columns: 17px 1fr;
  align-items: center;
  gap: 8px;
  width: 73px;
  padding: 10px;
  border-radius: 9px;
  background: #e9e3ff;
  transform: rotate(-7deg);
}

.empty-paper span:nth-child(odd) {
  color: #7867cf;
}

.empty-paper span:nth-child(even) {
  width: 25px;
  height: 4px;
  border-radius: 5px;
  background: #c2b5f0;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.empty-state p {
  max-width: 320px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.add-button {
  margin-top: 14px;
}

.secondary-button {
  width: 100%;
  padding: 12px;
  border: 1px dashed #d9d5e6;
  border-radius: 10px;
  background: transparent;
  color: #7c70b8;
  font-size: 12px;
  font-weight: 600;
}

.secondary-button:hover {
  background: #efecff;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid #eae8e3;
  color: #a09eaa;
  font-size: 10px;
}

.task-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  box-shadow: 0 20px 80px #25223b30;
}

.task-dialog::backdrop {
  background: #26243a70;
  backdrop-filter: blur(3px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 21px;
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #f3f1f8;
  font-size: 21px;
}

.task-dialog label {
  display: block;
  margin: 14px 0 7px;
  color: #69687a;
  font-size: 12px;
  font-weight: 600;
}

.task-dialog input, .task-dialog select {
  width: 100%;
  min-height: 42px;
  padding: 10px;
  border: 1px solid #e7e5ed;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}

.dialog-submit {
  width: 100%;
  margin-top: 22px;
}

@media (min-width: 1400px) {
  .main-content {
    max-width: 1180px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: 70px;
    padding: 20px 9px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand > span:last-child,
  .nav-label,
  .nav-item:not(.active),
  .nav-item.active {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
    padding: 12px 5px;
    gap: 0;
  }

  .nav-item > span:first-child {
    font-size: 19px;
  }

  .nav-count, .focus-card, .local-status {
    display: none;
  }

  .main-content {
    padding: 25px 17px;
  }

  .welcome-strip {
    padding: 23px;
  }

  .welcome-art {
    width: 120px;
    transform: scale(.8);
    transform-origin: center right;
    margin-left: -20px;
  }

  .composer {
    padding: 19px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 22px 13px;
  }

  h1 {
    font-size: 25px;
  }

  .welcome-strip {
    min-height: 155px;
    padding: 18px;
  }

  .welcome-copy h2 {
    font-size: 22px;
  }

  .welcome-copy p {
    max-width: 190px;
    line-height: 1.6;
  }

  .welcome-art {
    width: 78px;
    margin-left: -15px;
    transform: scale(.65);
  }

  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }

  .footer {
    flex-direction: column;
  }

  .task-card {
    padding: 13px;
  }

  .section-heading h2 {
    font-size: 18px;
  }
}
