:root {
  --ink: #173630;
  --muted: #71807c;
  --paper: #f6f2e9;
  --card: #fffdf8;
  --line: #e5e0d5;
  --green: #1c6b54;
  --mint: #dcebe3;
  --coral: #e96e50;
  --gold: #e2a931;
  --blue: #6588b5;
  --shadow: 0 16px 50px rgba(46, 58, 51, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 8%, rgba(231, 205, 149, .16), transparent 24rem),
    var(--paper);
  font-family: "DM Sans", sans-serif;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }

.app-shell { min-height: 100vh; padding: 0 5vw 4rem; }
.topbar {
  height: 86px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(23, 54, 48, .1);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font: 800 21px "Manrope", sans-serif;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px 11px 11px 3px;
  color: #fff;
  background: var(--green);
  font-size: 18px;
}
.nav-tabs { display: flex; gap: 8px; }
.nav-tab {
  border: 0;
  border-radius: 99px;
  background: transparent;
  padding: 9px 15px;
  color: var(--muted);
  font-weight: 600;
}
.nav-tab.active { color: var(--ink); background: #e8e4da; }
.nav-tab span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 99px;
  color: var(--green);
  background: var(--mint);
  font-size: 11px;
}
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 15px; }
.today-chip { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.primary-button, .secondary-button {
  border: 0;
  border-radius: 12px;
  padding: 12px 17px;
  font-weight: 700;
}
.primary-button { color: white; background: var(--green); box-shadow: 0 7px 18px rgba(28, 107, 84, .18); }
.primary-button span { margin-right: 6px; font-size: 19px; line-height: 0; }
.secondary-button { color: var(--ink); background: #ede9df; }

main { max-width: 1500px; margin: 0 auto; }
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 46px 0 36px;
}
.eyebrow, .section-kicker { margin: 0 0 8px; color: #8d9693; font-size: 10px; font-weight: 800; letter-spacing: .17em; }
h1, h2 { font-family: "Manrope", sans-serif; }
h1 { margin: 0; font-size: clamp(35px, 4vw, 56px); line-height: 1.02; letter-spacing: -.045em; }
h1 em { color: var(--coral); font-style: normal; }
h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.progress-card { width: 310px; padding: 19px 21px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 253, 248, .58); }
.progress-copy { display: flex; justify-content: space-between; font-size: 13px; }
.progress-copy span, .progress-card p { color: var(--muted); }
.progress-track { height: 7px; margin: 13px 0 10px; overflow: hidden; border-radius: 99px; background: #dfdbd1; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--coral); transition: width .35s ease; }
.progress-card p { margin: 0; font-size: 11px; }

.dashboard { display: grid; grid-template-columns: minmax(310px, .75fr) minmax(620px, 2fr); gap: 22px; align-items: start; }
.calendar-card, .task-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.calendar-card { padding: 25px; }
.calendar-header, .card-heading { display: flex; align-items: center; justify-content: space-between; }
.calendar-controls { display: flex; gap: 6px; }
.calendar-controls button, .icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
}
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays { margin: 28px 0 9px; color: #9aa29f; font-size: 10px; font-weight: 700; text-align: center; }
.calendar-grid { gap: 4px; }
.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-size: 12px;
}
.calendar-day:hover { background: #f1ede4; }
.calendar-day.other { color: #c4c5c0; }
.calendar-day.today { color: white; background: var(--green); font-weight: 800; }
.calendar-day.selected:not(.today) { outline: 2px solid var(--green); outline-offset: -2px; }
.calendar-day.has-task::after, .calendar-day.has-event::before {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
}
.calendar-day.has-event::before { left: calc(50% - 6px); background: var(--event-color, var(--blue)); }
.calendar-day.has-event::after { left: calc(50% + 2px); }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; color: var(--muted); font-size: 10px; }
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.dot.school { background: var(--blue); } .dot.travel { background: var(--gold); } .dot.birthday { background: var(--coral); }
.text-button { margin-top: 18px; padding: 0; border: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 700; }

.task-columns { display: grid; gap: 22px; }
.task-card { padding: 27px 29px; }
.today-card { min-height: 310px; border-top: 4px solid var(--coral); }
.secondary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.section-kicker.accent { color: var(--coral); }
.section-kicker.tracked { color: var(--green); }
.section-kicker.future { color: var(--blue); }
.count-badge { display: grid; place-items: center; min-width: 36px; height: 36px; border-radius: 12px; color: #fff; background: var(--coral); font-weight: 800; }
.count-badge.pale { color: var(--ink); background: #eeebe3; }
.task-list { display: grid; gap: 9px; margin-top: 21px; }
.task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid #ede9e0;
  border-radius: 14px;
  background: #fdfbf6;
}
.task-check {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 2px solid #c5cac7;
  border-radius: 8px;
  color: transparent;
  background: white;
  font-size: 8px;
  font-weight: 900;
}
.task-item.done .task-check { width: 31px; color: white; border-color: var(--green); background: var(--green); }
.task-main { min-width: 0; }
.task-main strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.task-main small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.task-item.done .task-main strong { color: #85908c; text-decoration: line-through; }
.priority { width: 7px; height: 7px; border-radius: 50%; }
.priority.high { background: var(--coral); } .priority.medium { background: var(--gold); } .priority.low { background: var(--blue); }
.compact .task-item { padding: 11px; }
.empty-state { padding: 34px 12px; color: #9ba29f; text-align: center; font-size: 12px; }
.empty-state span { display: block; margin-bottom: 7px; font-size: 24px; opacity: .55; }

.completed-view { padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.completed-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.completed-header h2 { font-size: 28px; }
.completed-header p:not(.section-kicker) { margin: 6px 0 0; color: var(--muted); }
.completed-list { display: grid; gap: 10px; padding-top: 20px; }
.completed-row { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-radius: 13px; background: #f3f0e8; }
.completed-row strong { text-decoration: line-through; }
.completed-row span { color: var(--muted); font-size: 12px; }
.hidden { display: none !important; }

dialog {
  width: min(680px, calc(100% - 30px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 30px 90px rgba(10, 31, 25, .25);
}
dialog::backdrop { background: rgba(15, 34, 29, .5); backdrop-filter: blur(4px); }
dialog form { padding: 30px; }
.small-modal { width: min(520px, calc(100% - 30px)); }
.modal-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-heading h2 { font-size: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid label { display: grid; gap: 7px; color: #40534e; font-size: 12px; font-weight: 700; }
.form-grid label > span { color: #949d99; font-weight: 400; }
.form-grid .full { grid-column: 1 / -1; }
input, textarea, select {
  width: 100%;
  border: 1px solid #dcd8ce;
  border-radius: 11px;
  outline: none;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(28, 107, 84, .1); }
textarea { resize: vertical; }
.form-grid .checkbox-label { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.checkbox-label input { width: 20px; height: 20px; accent-color: var(--green); }
.checkbox-label span { display: grid; color: var(--ink) !important; }
.checkbox-label small { color: var(--muted); font-weight: 400; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 27px; }
.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 10;
  transform: translateY(20px);
  padding: 13px 18px;
  border-radius: 12px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1000px) {
  .dashboard { grid-template-columns: 1fr; }
  .calendar-card { max-width: none; }
}
@media (max-width: 700px) {
  .app-shell { padding: 0 18px 35px; }
  .topbar { grid-template-columns: 1fr auto; }
  .nav-tabs { display: none; }
  .today-chip { display: none; }
  .hero { align-items: flex-start; flex-direction: column; gap: 25px; padding: 32px 0 25px; }
  .progress-card { width: 100%; }
  .secondary-grid, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .task-card { padding: 23px 20px; }
  .completed-header { align-items: flex-start; flex-direction: column; gap: 18px; }
}
