:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #252a30; background: #f7f8fa; font-synthesis: none;
  --accent: #5c7664; --muted: #87909b; --border: #e5e9ee;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #8aa995; outline-offset: 3px; }
[hidden] { display: none !important; }
button:active:not(:disabled) { transform: translateY(1px); }
.topbar { height: 88px; border-bottom: 1px solid var(--border); background: #fff; display: flex; align-items: center; padding: 0 38px; gap: 26px; position: relative; z-index: 2; }
.brand { font-size: 29px; line-height: 1; font-weight: 750; letter-spacing: -1px; }
.tagline { padding-left: 24px; border-left: 1px solid #d7dde3; color: var(--muted); font-size: 14px; line-height: 22px; margin: 0; }
.topbar > .button { margin-left: auto; }
.button { min-height: 42px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 17px; background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 500; transition: background .15s, border-color .15s; }
.button:hover { background: #f4f6f5; border-color: #ced6d1; }
.button.primary { color: #fff; background: #29343a; border-color: #29343a; }
.button.primary:hover { background: #3b484e; }
.button svg { width: 18px; height: 18px; }
.app-shell { display: grid; grid-template-columns: 202px minmax(0, 1fr); min-height: calc(100dvh - 88px); }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 30px 16px 28px; display: flex; flex-direction: column; gap: 30px; }
.navigation { display: flex; flex-direction: column; gap: 8px; }
.nav-item { min-height: 50px; display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.nav-item:hover { background: #f6f7f7; }
.nav-item.active { background: #eaf0ec; color: #344f3e; font-weight: 600; }
.nav-item svg { stroke-width: 1.6; }
.nav-count { margin-left: auto; font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }
.export-link { margin-top: auto; padding: 12px 16px; display: flex; gap: 14px; align-items: center; font-size: 14px; color: #5d6772; background: transparent; border: 0; text-align: left; }
.export-link:hover { color: var(--accent); }
main { width: 100%; min-width: 0; padding: 42px 38px 48px; max-width: 1500px; margin: 0 auto; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { font-size: 30px; letter-spacing: -.7px; line-height: 1.3; font-weight: 680; margin: 0 0 10px; }
.page-heading p { font-size: 15px; color: #7f8995; line-height: 1.6; margin: 0; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px #25364a03; }
.calendar-workspace { display: grid; grid-template-columns: minmax(330px, 1.08fr) minmax(320px, 1fr); gap: 18px; align-items: stretch; }
.calendar-panel { align-self: start; }
.month-toolbar { padding: 25px 24px 26px; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.month-picker { position: relative; font-size: 21px; font-weight: 650; white-space: nowrap; line-height: 40px; cursor: pointer; }
.month-picker input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.month-picker:focus-within { outline: 2px solid #8aa995; border-radius: 4px; outline-offset: 2px; }
.month-controls { display: flex; align-items: center; gap: 6px; }
.icon-button { width: 38px; min-width: 38px; height: 40px; border: 1px solid var(--border); background: #fff; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s; }
.icon-button:hover { background: #f0f4f1; }
.icon-button svg { width: 18px; height: 18px; }
.today-button { min-height: 40px; padding: 8px 13px; font-size: 13px; }
.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; color: #8993a0; font-size: 13px; padding: 8px 0 18px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid #eef0f3; }
.calendar-day { min-width: 0; min-height: 77px; padding: 12px 0 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #fff; border: 0; border-right: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; font-size: 14px; font-variant-numeric: tabular-nums; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover { background: #f6f8f7; }
.day-number { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; }
.calendar-day.is-today:not(.selected) .day-number { box-shadow: inset 0 0 0 1px #94a99b; color: #526f5c; font-weight: 650; }
.calendar-day.selected .day-number { background: var(--accent); color: #fff; font-weight: 650; }
.calendar-day.outside .day-number { color: #b8bec5; }
.calendar-day.selected.outside .day-number { color: #fff; }
.day-indicators { min-height: 6px; display: flex; gap: 4px; }
.activity-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; flex-shrink: 0; }
.done-dot { background: #5c8068; }
.pending-dot { background: #a5afb5; }
.calendar-legend { min-height: 42px; padding: 12px 20px; display: flex; justify-content: flex-end; gap: 16px; color: #9199a3; font-size: 11px; }
.calendar-legend > span { display: flex; align-items: center; gap: 6px; }
.day-panel { min-height: 530px; display: flex; flex-direction: column; }
.day-header { padding: 27px 26px 0; }
.day-header h2 { font-size: 21px; line-height: 1.5; font-weight: 650; letter-spacing: -.3px; margin: 0 0 20px; }
.day-header > p { font-size: 14px; color: #7f8995; margin: 0 0 10px; }
.progress-track { height: 7px; border-radius: 9px; background: #edf0f2; overflow: hidden; margin-bottom: 13px; }
.progress-track > div { height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .25s; }
.task-list { padding: 0 26px; }
.task-row { display: flex; align-items: flex-start; gap: 14px; padding: 23px 0; border-bottom: 1px solid #eef0f3; min-width: 0; }
.task-row:last-child { border-bottom: 0; }
.task-check { width: 25px; min-width: 25px; height: 25px; display: grid; place-items: center; border: 1.5px solid #a6afb9; border-radius: 50%; background: #fff; padding: 0; margin-top: 1px; color: #fff; }
.task-check svg { width: 16px; height: 16px; }
.task-check:hover:not(:disabled) { background: #eff4f0; border-color: var(--accent); }
.task-row.completed .task-check { background: var(--accent); border-color: var(--accent); }
.task-check:disabled { opacity: 1; }
.task-row.discarded .task-check { background: #f2f3f4; border-color: #d0d6dc; color: #9ba4ac; }
.task-copy { flex: 1; min-width: 0; }
.task-title { font-size: 15px; font-weight: 550; line-height: 1.7; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.task-notes { font-size: 13px; font-weight: 400; line-height: 1.8; color: #909aa5; margin: 5px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.task-row.completed .task-title, .task-row.completed .task-notes { text-decoration-line: line-through; text-decoration-thickness: 1px; color: #8b949e; font-weight: 400; }
.task-meta { display: block; color: #a0a7b0; font-size: 11px; line-height: 1.6; margin-top: 6px; }
.task-row.discarded .task-title { color: #979fa7; font-weight: 400; }
.row-actions { position: relative; flex-shrink: 0; margin-right: -8px; }
.row-menu-button { border: 0; background: transparent; color: #a3abb3; width: 28px; min-width: 28px; height: 32px; }
.row-menu-button:hover { background: #f3f5f4; color: #405a48; }
.task-menu { position: absolute; top: 32px; right: 0; background: #fff; box-shadow: 0 6px 25px #2436301a; border: 1px solid var(--border); border-radius: 8px; padding: 5px; z-index: 5; min-width: 110px; }
.task-menu button { border: 0; background: transparent; display: block; width: 100%; text-align: left; font-size: 13px; padding: 10px 12px; border-radius: 5px; white-space: nowrap; }
.task-menu button:hover { background: #f0f4f1; }
.panel-footer { margin: auto 26px 0; padding: 20px 0; border-top: 1px solid #eef0f3; font-size: 12px; line-height: 1.7; color: #99a2ad; }
.empty-state { padding: 57px 14px 50px; text-align: center; color: #8e99a3; }
.empty-state svg { width: 35px; height: 35px; stroke-width: 1.2; margin: 0 auto 17px; color: #a8b6ad; }
.empty-state h3 { font-size: 15px; font-weight: 500; color: #626e79; margin: 0 0 10px; }
.empty-state p { font-size: 13px; line-height: 1.8; margin: 0 auto; max-width: 270px; }
.empty-state .button { margin-top: 23px; font-size: 13px; min-height: 40px; }
.all-tasks-panel { max-width: 1000px; }
.quick-add { display: flex; align-items: center; gap: 14px; padding: 22px 26px; border-bottom: 1px solid var(--border); }
.quick-add > svg { color: #8b9b90; }
.quick-add input { min-width: 0; flex: 1; border: 0; background: transparent; outline: none; font-size: 15px; padding: 8px 0; color: #252a30; }
.quick-add input::placeholder { color: #a0a7b0; }
.quick-add input:focus-visible { outline: none; }
.quick-add:focus-within { box-shadow: inset 0 0 0 2px #8aa995; border-radius: 12px 12px 0 0; }
.list-section-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 25px 26px 0; }
.list-section-header h2 { font-size: 17px; font-weight: 600; margin: 0; }
.list-section-header > span { color: #8b959f; font-size: 12px; }
.all-tasks-panel .task-list { padding-bottom: 12px; }
.error-banner { background: #fff1ef; color: #a94b3a; border: 1px solid #f5d8d2; padding: 14px 18px; border-radius: 8px; font-size: 14px; margin: 0 0 22px; }
.error-banner button { border: 0; background: transparent; text-decoration: underline; margin-left: 10px; color: inherit; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); padding: 13px 20px; border-radius: 9px; background: #29382f; color: #fff; font-size: 13px; box-shadow: 0 4px 16px #0002; z-index: 30; max-width: calc(100% - 32px); text-align: center; line-height: 1.7; }
.toast.error { background: #8f4236; }
dialog { width: min(520px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: 15px; color: #252a30; background: #fff; box-shadow: 0 15px 70px #17231d25; max-height: calc(100dvh - 48px); overflow: auto; }
dialog::backdrop { background: #19282055; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.dialog-heading h2 { font-size: 22px; font-weight: 650; margin: 0; }
.dialog-heading .icon-button { border: 0; margin: -8px -8px -8px 0; }
.field { display: block; font-size: 14px; font-weight: 550; margin: 0 0 20px; }
.field input, .field textarea, .field select { display: block; width: 100%; padding: 12px 13px; border: 1px solid #dfe5e1; border-radius: 7px; background: #fff; color: #252a30; font-size: 15px; line-height: 1.7; margin-top: 9px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #a7afb6; }
.optional { font-weight: 400; font-size: 12px; color: #99a2aa; margin-left: 7px; }
.date-field { margin-bottom: 7px; }
.date-field input { width: auto; min-width: 200px; max-width: 100%; min-height: 48px; }
.field-hint { font-size: 12px; color: #919ba5; line-height: 1.7; margin: 0 0 25px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.form-error { font-size: 13px; line-height: 1.7; color: #a14d3e; }
.discard-description { font-size: 14px; line-height: 1.9; color: #7f8992; }
.dialog-actions button { min-width: 90px; }
.mobile-export { display: none; }
.export-description { color: #7f8992; font-size: 14px; line-height: 1.9; margin: -4px 0 24px; }
.export-filename { font-size: 14px; overflow-wrap: anywhere; color: #536b5b; margin: 0 0 15px; }
@media (min-width: 1450px) {
  main { padding-top: 49px; }
  .calendar-day { min-height: 88px; }
  .month-toolbar { padding-top: 30px; padding-bottom: 30px; }
  .day-panel { min-height: 590px; }
}
@media (max-width: 1130px) {
  .topbar { padding: 0 25px; }
  .app-shell { grid-template-columns: 175px minmax(0, 1fr); }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .nav-item { padding: 12px; gap: 10px; }
  .nav-count { display: none; }
  main { padding: 35px 24px; }
  .calendar-workspace { grid-template-columns: minmax(295px, 1fr) minmax(280px, 1fr); gap: 14px; }
  .month-toolbar { padding: 23px 16px; gap: 5px; }
  .month-picker { font-size: 18px; }
  .month-controls { gap: 4px; }
  .month-controls .icon-button { width: 32px; min-width: 32px; }
  .today-button { padding: 8px 9px; }
  .day-header { padding: 23px 21px 0; }
  .day-header h2 { font-size: 19px; }
  .task-list { padding: 0 21px; }
  .panel-footer { margin-left: 21px; margin-right: 21px; }
  .task-row { gap: 11px; }
  .task-title { font-size: 14px; }
}
@media (max-width: 950px) and (min-width: 701px) {
  .app-shell { grid-template-columns: 160px minmax(0, 1fr); }
  .calendar-workspace { grid-template-columns: 1fr; }
  .calendar-day { min-height: 64px; }
  .day-panel { min-height: 350px; }
  .month-toolbar { padding: 21px; }
  .task-row { padding-top: 19px; padding-bottom: 19px; }
  .empty-state { padding: 40px 15px; }
  .tagline { font-size: 13px; }
}
@media (max-width: 700px) {
  .topbar { height: 74px; padding: 0 20px; gap: 14px; }
  .brand { font-size: 25px; }
  .tagline { padding-left: 14px; font-size: 11px; line-height: 19px; }
  .topbar > .button { font-size: 12px; padding: 10px 12px; min-height: 39px; gap: 5px; }
  .topbar > .button svg { width: 15px; height: 15px; }
  .app-shell { display: block; min-height: calc(100dvh - 74px); }
  .sidebar { padding: 10px 16px 0; border: 0; background: transparent; display: block; }
  .navigation { flex-direction: row; gap: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
  .nav-item { width: 50%; min-height: 41px; justify-content: center; border-radius: 6px; font-size: 13px; gap: 10px; padding: 10px; }
  .nav-item svg { width: 17px; height: 17px; }
  .export-link { display: none; }
  .nav-count { display: inline; font-size: 10px; margin-left: 0; }
  .calendar-workspace { grid-template-columns: 1fr; gap: 15px; }
  main { padding: 24px 16px 36px; }
  .page-heading { margin-bottom: 19px; }
  .page-heading h1 { font-size: 25px; margin-bottom: 8px; }
  .page-heading p { font-size: 13px; line-height: 1.7; }
  .month-toolbar { padding: 17px 18px 19px; }
  .month-picker { font-size: 18px; }
  .month-controls { gap: 5px; }
  .month-controls .icon-button { min-width: 34px; width: 34px; height: 36px; }
  .today-button { min-height: 36px; padding: 7px 13px; font-size: 12px; }
  .weekdays { font-size: 12px; padding: 4px 0 12px; }
  .calendar-day { min-height: 55px; padding: 5px 0 4px; gap: 3px; font-size: 12px; }
  .day-number { height: 29px; width: 29px; }
  .activity-dot { height: 4px; width: 4px; }
  .calendar-legend { min-height: 34px; padding: 9px 16px; font-size: 10px; gap: 14px; }
  .day-panel { min-height: 325px; }
  .day-header { padding: 20px 20px 0; }
  .day-header h2 { font-size: 18px; margin-bottom: 15px; }
  .day-header > p { font-size: 12px; }
  .progress-track { height: 6px; margin-bottom: 9px; }
  .task-list { padding: 0 20px; }
  .task-row { padding: 19px 0; gap: 12px; }
  .task-title { font-size: 14px; line-height: 1.75; }
  .task-notes { font-size: 12px; margin-top: 5px; }
  .task-check { width: 24px; min-width: 24px; height: 24px; }
  .row-menu-button { width: 24px; min-width: 24px; height: 29px; }
  .panel-footer { margin-left: 20px; margin-right: 20px; padding: 16px 0; font-size: 11px; }
  .empty-state { padding: 35px 7px 37px; }
  .empty-state h3 { font-size: 14px; }
  .empty-state p { font-size: 12px; }
  .empty-state > svg { width: 29px; height: 29px; }
  .quick-add { gap: 10px; padding: 17px 18px; }
  .quick-add input { font-size: 14px; }
  .quick-add .button { padding: 9px 12px; font-size: 13px; }
  .list-section-header { padding: 22px 20px 0; }
  .list-section-header h2 { font-size: 15px; }
  .list-section-header > span { font-size: 11px; }
  dialog { padding: 23px; max-height: calc(100dvh - 32px); }
  .dialog-heading h2 { font-size: 20px; }
  .field input, .field textarea, .field select { font-size: 16px; }
  .toast { bottom: 18px; }
  .mobile-export { display: flex; justify-content: center; width: 100%; padding: 27px 0 0; font-size: 12px; color: #8f99a3; gap: 8px; align-items: center; background: transparent; border: 0; }
  .mobile-export svg { height: 16px; width: 16px; }
}
@media (max-width: 370px) {
  .tagline { display: none; }
  .topbar { padding: 0 16px; }
  .month-toolbar { padding-left: 13px; padding-right: 13px; }
  .month-picker { font-size: 17px; }
  .day-header { padding-left: 17px; padding-right: 17px; }
  .task-list { padding-left: 17px; padding-right: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

body { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { flex-shrink: 0; }
.app-shell { flex: 1; min-height: 0; }
.demo-banner { width: 100%; max-width: 1440px; margin: 0 auto; padding: 14px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.demo-banner p { margin: 0; display: grid; gap: 4px; font-size: 13px; line-height: 1.5; }
.demo-banner strong { color: var(--text); }
.demo-banner .button { flex-shrink: 0; }
@media (max-width: 600px) {
  .demo-banner { padding: 12px 20px; align-items: flex-start; flex-direction: column; gap: 10px; }
}
