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

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8f9fc;
  --text: #19223c;
  --muted: #8b93aa;
  --line: #e9ecf3;
  --primary: #6658e8;
  --primary-dark: #5446d6;
  --primary-soft: #eeecff;
  --green: #1bb886;
  --green-soft: #e6f8f2;
  --orange: #f39b55;
  --orange-soft: #fff1e5;
  --shadow: 0 18px 55px rgba(31, 42, 86, .07);
  --radius-lg: 22px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(102, 88, 232, .28); outline-offset: 2px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 255px;
  flex: 0 0 255px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 38px 20px 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px; }
.brand-mark { width: 30px; height: 30px; border-radius: 10px; background: var(--primary); display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-8deg); box-shadow: 0 7px 14px rgba(102, 88, 232, .26); }
.brand-mark span { display: block; width: 3px; border-radius: 3px; background: white; }
.brand-mark span:nth-child(1) { height: 9px; opacity: .68; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:nth-child(3) { height: 11px; opacity: .82; }
.brand strong { display: block; color: var(--text); font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; letter-spacing: -.5px; }
.brand strong em { color: var(--primary); font-style: normal; }
.brand small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.sidebar-section { margin-top: 65px; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.25px; margin: 0 12px 13px; text-transform: uppercase; }
.eyebrow.accent { color: var(--primary); margin: 0 0 10px; }
.main-nav { display: grid; gap: 5px; }
.nav-item { align-items: center; background: transparent; border: 0; border-radius: 11px; color: #8991a8; display: flex; font-size: 13px; gap: 12px; padding: 12px; text-align: left; transition: .2s ease; width: 100%; }
.nav-item:hover { background: var(--surface-muted); color: var(--text); }
.nav-item.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-icon { width: 17px; font-size: 17px; text-align: center; line-height: 1; }
.nav-item b { margin-left: auto; font-size: 11px; font-weight: 600; color: #a8afc1; }
.nav-item.is-active b { color: var(--primary); }
.sidebar-note { background: linear-gradient(145deg, #f0edff 0%, #f8f4ff 100%); border-radius: 16px; margin: auto 5px 24px; padding: 17px 15px 15px; }
.note-spark { color: var(--primary); display: block; font-size: 19px; margin-bottom: 10px; }
.sidebar-note strong { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12px; }
.sidebar-note p { color: #8a85ae; font-size: 11px; line-height: 1.55; margin: 7px 0 0; }
.sidebar-footer { align-items: center; color: #a8afbd; display: flex; font-size: 10px; gap: 7px; padding: 0 8px; }
.status-dot { background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px var(--green-soft); height: 6px; width: 6px; }

.main-content { max-width: 1130px; padding: 27px 55px 30px; width: 100%; }
.topbar { align-items: center; display: flex; justify-content: space-between; min-height: 32px; }
.date-label { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: capitalize; }
.topbar-actions { align-items: center; display: flex; gap: 17px; }
.icon-button { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; color: #8e96aa; display: flex; font-size: 18px; height: 31px; justify-content: center; width: 31px; }
.icon-button:hover { color: var(--primary); border-color: var(--primary-soft); }
.avatar { align-items: center; background: #fee4d7; border: 3px solid white; border-radius: 50%; color: #ee8b60; display: flex; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 11px; font-weight: 800; height: 35px; justify-content: center; width: 35px; }
.mobile-menu { display: none; }
.welcome-row { align-items: center; display: flex; justify-content: space-between; margin: 63px 3px 37px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(27px, 3vw, 35px); letter-spacing: -1.5px; line-height: 1.2; margin-bottom: 9px; }
h1 span:not(.wave) { color: var(--primary); }
.wave { display: inline-block; font-size: 25px; margin-left: 5px; transform-origin: 70% 70%; }
.intro { color: var(--muted); font-size: 13px; margin: 0; }
.progress-ring { align-items: center; background: conic-gradient(var(--primary) 0deg, var(--primary) 0deg, #ecebfa 0deg); border-radius: 50%; display: flex; height: 78px; justify-content: center; position: relative; width: 78px; }
.progress-ring::before { background: var(--surface); border-radius: inherit; content: ''; height: 62px; position: absolute; width: 62px; }
.progress-ring > div { position: relative; text-align: center; z-index: 1; }
.progress-ring strong { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; }
.progress-ring span { color: var(--muted); display: block; font-size: 8px; margin-top: 2px; }
.stats-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-bottom: 35px; }
.stat-card { align-items: center; background: var(--surface); border: 1px solid rgba(233, 236, 243, .75); border-radius: var(--radius-md); display: grid; gap: 12px; grid-template-columns: auto 1fr auto; min-height: 90px; padding: 17px 20px; }
.stat-primary { background: var(--primary); border-color: var(--primary); color: white; }
.stat-icon { align-items: center; background: var(--primary-soft); border-radius: 10px; color: var(--primary); display: flex; font-size: 18px; height: 34px; justify-content: center; width: 34px; }
.stat-icon.soft-green { background: var(--green-soft); color: var(--green); }
.stat-icon.soft-orange { background: var(--orange-soft); color: var(--orange); }
.stat-card span { color: var(--muted); display: block; font-size: 10px; margin-bottom: 4px; }
.stat-primary span { color: #d3ceff; }
.stat-card strong { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 21px; line-height: 1; }
.stat-card small { align-self: end; color: #b1b7c7; font-size: 9px; white-space: nowrap; }
.stat-primary small { color: #d8d4ff; }
.tasks-panel { background: var(--surface); border: 1px solid rgba(233, 236, 243, .8); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px 29px 23px; }
.section-heading { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 22px; }
h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; letter-spacing: -.5px; margin-bottom: 6px; }
.section-heading p { color: var(--muted); font-size: 11px; margin-bottom: 0; }
.clear-button { background: transparent; border: 0; color: #a8afc0; font-size: 10px; padding: 4px 0; }
.clear-button:hover { color: var(--primary); }
.quick-add { align-items: center; background: var(--surface-muted); border: 1px solid transparent; border-radius: 11px; display: flex; gap: 10px; min-height: 48px; padding: 5px 6px 5px 14px; transition: border .2s, box-shadow .2s; }
.quick-add:focus-within { background: var(--surface); border-color: #d9d5ff; box-shadow: 0 4px 13px rgba(102, 88, 232, .07); }
.plus { color: var(--primary); font-size: 21px; font-weight: 300; }
.quick-add input { background: transparent; border: 0; color: var(--text); flex: 1; font-size: 12px; min-width: 100px; outline: 0; }
.quick-add input::placeholder { color: #aeb5c5; }
.quick-add select { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 10px; outline: 0; padding: 7px 0; }
.quick-add button, .empty-state button { background: var(--primary); border: 0; border-radius: 8px; color: white; font-size: 10px; font-weight: 700; padding: 10px 13px; transition: background .2s, transform .2s; }
.quick-add button:hover, .empty-state button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.quick-add button span { color: #c9c4ff; font-size: 13px; margin-left: 5px; }
.list-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-top: 25px; padding-bottom: 13px; }
.filter-chips { display: flex; gap: 4px; }
.chip { background: transparent; border: 0; border-radius: 7px; color: #a0a7b9; font-size: 10px; padding: 7px 10px; }
.chip:hover { color: var(--primary); }
.chip.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.search-box { align-items: center; background: var(--surface-muted); border-radius: 8px; color: #aab1c1; display: flex; gap: 5px; padding: 6px 9px; }
.search-box span { font-size: 17px; line-height: 1; transform: rotate(-20deg); }
.search-box input { background: transparent; border: 0; color: var(--text); font-size: 10px; outline: 0; width: 70px; }
.search-box input::placeholder { color: #aeb5c5; }
.task-list { min-height: 84px; }
.task-item { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 12px; min-height: 68px; padding: 12px 3px; animation: task-in .25s ease both; }
@keyframes task-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.task-check { background: transparent; border: 1.5px solid #d9dce7; border-radius: 50%; color: white; flex: 0 0 19px; height: 19px; padding: 0; transition: .2s; width: 19px; }
.task-check:hover { border-color: var(--primary); }
.task-item.is-completed .task-check { background: var(--green); border-color: var(--green); font-size: 11px; }
.task-content { flex: 1; min-width: 0; }
.task-title { color: #394159; display: block; font-size: 12px; font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-item.is-completed .task-title { color: #aeb4c2; text-decoration: line-through; }
.task-meta { color: #b0b6c5; display: block; font-size: 9px; margin-top: 4px; }
.priority { border-radius: 20px; font-size: 9px; padding: 4px 8px; white-space: nowrap; }
.priority-high { background: #fff0eb; color: #ed8768; }
.priority-normal { background: #f0eeff; color: var(--primary); }
.priority-low { background: #edf8f4; color: #45ac8e; }
.task-actions { display: flex; gap: 1px; opacity: 0; transition: opacity .2s; }
.task-item:hover .task-actions, .task-actions:focus-within { opacity: 1; }
.task-action { background: transparent; border: 0; color: #aeb5c4; font-size: 13px; padding: 5px; }
.task-action:hover { color: var(--primary); }
.empty-state { padding: 35px 10px 30px; text-align: center; }
.empty-icon { align-items: center; background: var(--primary-soft); border-radius: 50%; color: var(--primary); display: flex; font-size: 21px; height: 48px; justify-content: center; margin: 0 auto 13px; width: 48px; }
.empty-state h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; margin-bottom: 5px; }
.empty-state p { color: var(--muted); font-size: 11px; margin-bottom: 17px; }
.empty-state button { font-size: 10px; }
.page-footer { color: #b2b8c6; font-size: 10px; margin: 19px 3px 0; }
.footer-separator { color: #d8dce6; margin: 0 7px; }
.toast { background: var(--text); border-radius: 9px; bottom: 22px; color: white; font-size: 11px; left: 50%; opacity: 0; padding: 11px 16px; pointer-events: none; position: fixed; transform: translate(-50%, 12px); transition: .25s; z-index: 10; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

body.dark { --bg: #151827; --surface: #1e2233; --surface-muted: #252a3d; --text: #f1f2fb; --muted: #959db7; --line: #30354b; --shadow: 0 18px 55px rgba(0, 0, 0, .2); }
body.dark .brand strong, body.dark .task-title { color: var(--text); }
body.dark .avatar { border-color: var(--surface); }
body.dark .sidebar-note { background: linear-gradient(145deg, #282446 0%, #242339 100%); }
body.dark .sidebar-note p { color: #aaa5ca; }
body.dark .progress-ring::before { background: var(--surface); }
body.dark .stat-card:not(.stat-primary), body.dark .tasks-panel { border-color: var(--line); }
body.dark .task-item.is-completed .task-title { color: #737a94; }

@media (max-width: 900px) {
  .sidebar { width: 220px; flex-basis: 220px; }
  .main-content { padding-left: 32px; padding-right: 32px; }
  .stat-card { grid-template-columns: auto 1fr; }
  .stat-card small { display: none; }
}
@media (max-width: 700px) {
  .sidebar { box-shadow: 8px 0 30px rgba(30, 39, 78, .11); left: -260px; position: fixed; top: 0; transition: left .25s ease; z-index: 5; }
  .sidebar.is-open { left: 0; }
  .main-content { padding: 20px 18px 25px; }
  .mobile-menu { background: transparent; border: 0; color: var(--muted); display: block; font-size: 19px; padding: 0; }
  .topbar { gap: 12px; }
  .date-label { margin-right: auto; }
  .welcome-row { margin: 45px 2px 28px; }
  .progress-ring { height: 66px; width: 66px; }
  .progress-ring::before { height: 52px; width: 52px; }
  .stats-grid { gap: 8px; margin-bottom: 24px; }
  .stat-card { display: block; min-height: 105px; padding: 13px; }
  .stat-icon { margin-bottom: 12px; }
  .stat-card strong { font-size: 18px; }
  .tasks-panel { padding: 22px 16px 18px; }
  .section-heading { align-items: flex-end; }
  .section-heading p { max-width: 190px; }
  .clear-button { font-size: 9px; }
  .quick-add { flex-wrap: wrap; padding-right: 8px; }
  .quick-add input { flex-basis: calc(100% - 40px); }
  .quick-add select { margin-left: 29px; }
  .quick-add button { margin-left: auto; }
  .list-toolbar { align-items: flex-end; gap: 8px; }
  .filter-chips { flex-wrap: wrap; }
  .search-box { flex: 0 0 auto; }
  .task-actions { opacity: 1; }
  .priority { display: none; }
}
@media (max-width: 420px) {
  h1 { font-size: 25px; }
  .intro { font-size: 12px; }
  .progress-ring { display: none; }
  .filter-chips .chip { padding-left: 6px; padding-right: 6px; }
  .search-box input { width: 48px; }
  .task-meta { font-size: 8px; }
}
