/* ==================== Theme tokens ==================== */

:root {
  --bg: #fff4f8;
  --surface: rgba(255, 255, 255, .9);
  --surface-solid: #fff;
  --surface-soft: #fff8fb;
  --sidebar: rgba(255, 249, 252, .92);
  --text: #3e3543;
  --muted: #9a8e9e;
  --line: #f0dfe7;
  --primary: #ff76a8;
  --primary-deep: #ee5c93;
  --primary-soft: #ffe2ed;
  --purple: #9a83e8;
  --blue: #74baf6;
  --mint: #6ed4b6;
  --yellow: #f5c768;
  --danger: #f2687c;
  --shadow: 0 18px 50px rgba(184, 98, 132, .12);
  --shadow-sm: 0 7px 24px rgba(184, 98, 132, .1);
  --radius: 24px;
}

[data-theme="light"] {
  --bg: #f7f8fc;
  --surface: rgba(255, 255, 255, .92);
  --surface-solid: #fff;
  --surface-soft: #f6f7fb;
  --sidebar: rgba(255, 255, 255, .92);
  --text: #333846;
  --muted: #8d94a4;
  --line: #e7e9f0;
  --primary: #788df0;
  --primary-deep: #6078e6;
  --primary-soft: #e8ecff;
  --shadow: 0 18px 50px rgba(55, 65, 105, .1);
  --shadow-sm: 0 7px 24px rgba(55, 65, 105, .08);
}

[data-theme="dark"] {
  --bg: #15131a;
  --surface: rgba(35, 31, 42, .94);
  --surface-solid: #24202b;
  --surface-soft: #2c2733;
  --sidebar: rgba(29, 26, 35, .96);
  --text: #f8edf3;
  --muted: #ae9eab;
  --line: #3b3443;
  --primary: #ff77aa;
  --primary-deep: #ff5d9a;
  --primary-soft: #4b2b3b;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  --shadow-sm: 0 7px 24px rgba(0, 0, 0, .2);
}

/* ==================== Base styles ==================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 75% 5%, rgba(255, 176, 205, .27), transparent 25%), radial-gradient(circle at 4% 92%, rgba(165, 146, 235, .18), transparent 24%), var(--bg);
  transition: background .35s ease, color .35s ease;
}

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

button {
  color: inherit;
}

button,
.task-card,
.calendar-day {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary), transparent 65%);
  outline-offset: 2px;
}

.sakura-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  z-index: 0;
  background-image: radial-gradient(ellipse at 20% 30%, rgba(255, 145, 183, .16) 0 3px, transparent 4px), radial-gradient(ellipse at 80% 70%, rgba(255, 145, 183, .13) 0 4px, transparent 5px);
  background-size: 90px 90px, 130px 130px;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* ==================== Sidebar ==================== */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 282px;
  padding: 26px 20px 22px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(22px);
  z-index: 20;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), background .35s;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  font-size: 25px;
  border-radius: 15px;
  background: linear-gradient(145deg, #ff99bd, #ef5b93);
  box-shadow: 0 8px 18px rgba(245, 94, 147, .28);
  transform: rotate(-6deg);
}

.brand strong {
  display: block;
  font: 700 21px/1.1 "Baloo 2", cursive;
}

.brand span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.brand .icon-button {
  margin-left: auto;
}

.profile-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 70px;
  padding: 11px 13px;
  overflow: hidden;
  background: linear-gradient(110deg, var(--primary-soft), color-mix(in srgb, var(--primary-soft), white 48%));
  border: 1px solid color-mix(in srgb, var(--primary), transparent 76%);
  border-radius: 18px;
  margin-bottom: 16px;
}

.profile-card::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  right: -28px;
  bottom: -33px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary), transparent 84%);
}

.avatar {
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 2px solid var(--surface-solid);
  box-shadow: 0 5px 14px rgba(112, 76, 120, .2), 0 0 0 1px color-mix(in srgb, var(--primary), transparent 45%);
  overflow: hidden;
}

.avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.profile-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.profile-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.profile-copy span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.profile-copy i {
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  background: #62d3a9;
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, #62d3a9, transparent 80%);
}

.profile-sparkle {
  position: absolute;
  top: 8px;
  right: 10px;
  color: color-mix(in srgb, var(--primary), white 18%);
  font-size: 10px;
  animation: twinkle 2s ease-in-out infinite;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.search-box>span {
  position: absolute;
  left: 13px;
  color: var(--muted);
  font-size: 22px;
  transform: rotate(-15deg);
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 54px 0 39px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: .25s;
}

.search-box input::placeholder {
  color: var(--muted);
  font-size: 12px;
}

.search-box input:focus {
  background: var(--surface-solid);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.search-box kbd {
  position: absolute;
  right: 10px;
  padding: 3px 6px;
  color: var(--muted);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 9px;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.nav-item:hover {
  background: var(--surface-soft);
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--primary-deep);
  background: var(--primary-soft);
}

.nav-item b {
  min-width: 21px;
  padding: 2px 6px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-solid);
  text-align: center;
  font-size: 10px;
}

.nav-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}

.lavender {
  color: #8e79de;
  background: #eee9ff;
}

.coral {
  color: #f27591;
  background: #ffe5eb;
}

.blue {
  color: #579ddd;
  background: #e1f2ff;
}

.yellow {
  color: #dc9c2d;
  background: #fff3d4;
}

.mint {
  color: #45af90;
  background: #dcf7ef;
}

.sidebar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 23px 10px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.sidebar-label button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.category-list {
  display: grid;
  gap: 1px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 12px;
}

.category-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.category-item b {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.quote-card {
  position: relative;
  margin-top: auto;
  padding: 16px 15px 10px;
  overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary-soft), white 20%), var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 18px;
}

.quote-card p {
  position: relative;
  margin: 0;
  width: 80%;
  font: 600 11px/1.5 "Nunito", sans-serif;
  color: var(--muted);
}

.quote-sparkle {
  position: absolute;
  right: 14px;
  top: 9px;
  color: var(--yellow);
  animation: twinkle 2s infinite;
}

.mini-cat {
  margin-top: 5px;
  text-align: right;
  color: var(--primary);
  font-size: 17px;
}

.mini-cat span {
  font-size: 11px;
  vertical-align: top;
}

/* ==================== Main header ==================== */

.main-content {
  width: calc(100% - 282px);
  min-width: 0;
  margin-left: 282px;
  padding: 31px 34px 45px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1500px;
  margin: 0 auto 25px;
}

.heading-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow,
.small-label {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font: 700 28px/1.2 "Baloo 2", cursive;
  letter-spacing: -.4px;
}

h1 span {
  display: inline-block;
  color: var(--primary);
  animation: sway 3s ease-in-out infinite;
}

.top-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: .2s ease;
}

.icon-button:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.notification-button {
  position: relative;
  font-size: 22px;
}

.notification-button span {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface-solid);
  border-radius: 50%;
  background: var(--primary);
}

.primary-button,
.danger-button,
.secondary-button,
.text-button {
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.primary-button {
  padding: 11px 17px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 9px 23px color-mix(in srgb, var(--primary), transparent 62%);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--primary), transparent 52%);
}

.primary-button:active {
  transform: translateY(0) scale(.97);
}

.theme-switcher {
  position: relative;
}

.theme-menu {
  position: absolute;
  top: 50px;
  right: 0;
  width: 145px;
  padding: 7px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-7px) scale(.96);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 30;
  transition: .18s;
}

.theme-menu.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.theme-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.theme-menu button:hover {
  background: var(--surface-soft);
}

.swatch {
  width: 14px;
  height: 14px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.swatch.pink {
  background: #ff76a8;
}

.swatch.light {
  background: #e9edf8;
}

.swatch.dark {
  background: #26212c;
}

/* ==================== Task dashboard ==================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .75fr);
  gap: 22px;
  max-width: 1500px;
  margin: auto;
}

.panel {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line), transparent 5%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.task-panel {
  min-height: calc(100vh - 122px);
  padding: 19px;
}

.progress-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  margin-bottom: 15px;
  border-radius: 17px;
  background: linear-gradient(110deg, var(--primary-soft), color-mix(in srgb, var(--primary-soft), var(--surface-solid) 62%));
  border: 1px solid color-mix(in srgb, var(--primary), transparent 78%);
}

.progress-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #f7b8ca, var(--primary));
  border-radius: 13px;
  box-shadow: 0 7px 15px color-mix(in srgb, var(--primary), transparent 65%);
}

.progress-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.progress-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.progress-ring {
  --progress: 0;
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--progress)*1%), var(--surface-solid) 0);
  position: relative;
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--surface-solid);
  border-radius: 50%;
}

.progress-ring span {
  position: relative;
  font-size: 10px;
  font-weight: 800;
}

.quick-add {
  position: relative;
  display: flex;
  align-items: center;
  height: 51px;
  margin-bottom: 17px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 15px;
  transition: .25s;
}

.quick-add:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.quick-add>button:first-child {
  width: 48px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 25px;
  cursor: pointer;
}

.quick-add input[type="text"] {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 13px;
}

.quick-add input::placeholder {
  color: var(--muted);
}

.quick-date {
  margin-right: 7px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

#quickDateInput {
  position: absolute;
  right: 7px;
  width: 95px;
  opacity: 0;
  pointer-events: none;
}

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 3px 12px;
}

.segmented-control {
  display: flex;
  gap: 5px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: 11px;
}

.segmented-control button {
  padding: 6px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.segmented-control button.active {
  color: var(--primary-deep);
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
}

.sort-button {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* ==================== Task list ==================== */

.task-list {
  display: grid;
  gap: 8px;
}

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 11px;
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 15px;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s, border-color .22s, opacity .25s;
  animation: taskIn .35s both;
}

.task-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--category-color, var(--primary));
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary), transparent 58%);
  box-shadow: var(--shadow-sm);
}

.task-check {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--primary), transparent 35%);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: .2s;
}

.task-check span {
  color: white;
  opacity: 0;
  transform: scale(.3);
  transition: .2s;
}

.task-check:hover {
  background: var(--primary-soft);
  transform: scale(1.07);
}

.task-card.completed {
  opacity: .66;
}

.task-card.completed .task-check {
  border-color: var(--primary);
  background: var(--primary);
}

.task-card.completed .task-check span {
  opacity: 1;
  transform: scale(1);
}

.task-card.completed .task-title {
  text-decoration: line-through;
}

.task-main {
  min-width: 0;
}

.task-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.task-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.task-meta .overdue {
  color: var(--danger);
}

.category-chip {
  padding: 2px 7px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--category-color), transparent 83%);
  color: var(--category-color);
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.task-actions button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: .18s;
}

.task-actions button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.task-actions .star.active {
  color: #eab03f;
}

.task-actions .delete:hover {
  color: var(--danger);
  background: #ffe6eb;
}

.empty-state {
  padding: 52px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-illustration {
  position: relative;
  font-size: 55px;
  color: var(--primary-soft);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .06));
}

.empty-illustration span {
  position: absolute;
  color: var(--yellow);
  font-size: 20px;
}

.empty-state h3 {
  margin: 10px 0 4px;
  color: var(--text);
  font: 700 17px "Baloo 2", cursive;
}

.empty-state p {
  margin: 0 0 14px;
  font-size: 11px;
}

.text-button {
  padding: 7px 10px;
  color: var(--primary-deep);
  background: transparent;
}

/* ==================== Calendar ==================== */

.calendar-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.calendar-card {
  padding: 20px;
}

.calendar-head,
.day-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-head h2,
.day-card-head h3 {
  margin: 0;
  font: 700 19px "Baloo 2", cursive;
  text-transform: capitalize;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.calendar-nav button,
.round-add {
  height: 29px;
  min-width: 29px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 800;
  cursor: pointer;
  transition: .18s;
}

.calendar-nav button:hover,
.round-add:hover {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}

#todayMonth {
  padding: 0 8px;
  font-size: 9px;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.weekday-row {
  margin-bottom: 6px;
}

.weekday-row span {
  text-align: center;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.calendar-grid {
  gap: 3px;
}

.calendar-day {
  position: relative;
  aspect-ratio: 1;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: .18s;
}

.calendar-day:hover {
  color: var(--primary-deep);
  background: var(--primary-soft);
  transform: scale(1.06);
}

.calendar-day.other {
  color: var(--muted);
  opacity: .4;
}

.calendar-day.today {
  color: var(--primary-deep);
  border: 1px solid var(--primary);
}

.calendar-day.selected {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 5px 14px color-mix(in srgb, var(--primary), transparent 55%);
}

.calendar-day .dots {
  position: absolute;
  bottom: 3px;
  display: flex;
  gap: 2px;
}

.calendar-day .dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--primary);
}

.calendar-day.selected .dots i {
  background: white;
}

.day-card {
  padding: 19px;
}

.round-add {
  color: white;
  border: 0;
  background: var(--primary);
  font-size: 18px;
}

.mini-schedule {
  display: grid;
  gap: 8px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 38px 4px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.schedule-time {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.schedule-line {
  width: 3px;
  height: 31px;
  border-radius: 3px;
  background: var(--item-color);
}

.schedule-copy {
  min-width: 0;
}

.schedule-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-copy span {
  color: var(--muted);
  font-size: 9px;
}

.schedule-empty {
  padding: 24px 5px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}

.schedule-empty b {
  display: block;
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 24px;
}

/* ==================== Dialogs and feedback ==================== */

dialog {
  color: var(--text);
}

dialog::backdrop {
  background: rgba(40, 28, 39, .38);
  backdrop-filter: blur(6px);
}

.task-modal,
.confirm-modal {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--surface-solid);
  box-shadow: 0 25px 80px rgba(40, 20, 38, .25);
}

.task-modal {
  width: min(545px, calc(100% - 28px));
}

.task-modal[open],
.confirm-modal[open] {
  animation: modalIn .25s cubic-bezier(.2, .8, .2, 1);
}

.task-modal form {
  padding: 24px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-head h2 {
  margin: 0;
  font: 700 23px "Baloo 2", cursive;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 21px;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-field {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
}

.form-field>span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  transition: .2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-field textarea {
  resize: vertical;
  min-height: 74px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 7px;
}

.secondary-button {
  padding: 10px 17px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.danger-button {
  padding: 10px 17px;
  color: white;
  background: var(--danger);
}

.confirm-modal {
  width: min(355px, calc(100% - 28px));
  padding: 28px;
  text-align: center;
}

.confirm-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: var(--danger);
  background: #ffe8ec;
  font-size: 22px;
  font-weight: 800;
}

.confirm-modal h3 {
  margin: 0;
  font: 700 20px "Baloo 2", cursive;
}

.confirm-modal p {
  margin: 4px 0 17px;
  color: var(--muted);
  font-size: 11px;
}

.confirm-modal .modal-actions {
  justify-content: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 30px);
  padding: 10px 15px;
  opacity: 0;
  pointer-events: none;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  transform: translate(-50%, 20px);
  transition: .3s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--mint);
  border-radius: 50%;
  font-size: 11px;
}

.toast p {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  width: 8px;
  height: 12px;
  border-radius: 3px;
  animation: confettiFall .9s ease-out forwards;
}

.menu-button,
.mobile-only {
  display: none;
}

/* ==================== Animations ==================== */

@keyframes taskIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.97);
  }

}

@keyframes sway {
  50% {
    transform: rotate(14deg) scale(1.12);
  }

}

@keyframes twinkle {
  50% {
    opacity: .3;
    transform: scale(.75) rotate(30deg);
  }

}

@keyframes confettiFall {
  0% {
    transform: translate(var(--x), var(--y)) rotate(0);
    opacity: 1;
  }

  100% {
    transform: translate(calc(var(--x) + var(--drift)), calc(var(--y) + 230px)) rotate(420deg);
    opacity: 0;
  }

}

/* ==================== Responsive ==================== */

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .calendar-column {
    grid-template-columns: minmax(290px, .9fr) 1.1fr;
  }

  .task-panel {
    min-height: auto;
  }

}

@media (max-width: 780px) {
  .sidebar {
    width: min(290px, 86vw);
    transform: translateX(-104%);
    box-shadow: 20px 0 50px rgba(43, 28, 39, .15);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 19;
    visibility: hidden;
    opacity: 0;
    background: rgba(35, 22, 33, .28);
    backdrop-filter: blur(3px);
    transition: .25s;
  }

  .sidebar-overlay.open {
    visibility: visible;
    opacity: 1;
  }

  .main-content {
    width: 100%;
    margin-left: 0;
    padding: 22px 17px 35px;
  }

  .menu-button,
  .mobile-only {
    display: grid;
  }

  .topbar {
    margin-bottom: 18px;
  }

  h1 {
    font-size: 23px;
  }

  .eyebrow {
    font-size: 8px;
  }

  .primary-button {
    padding: 10px 13px;
  }

  .top-actions .primary-button span {
    display: none;
  }

  .calendar-column {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 500px) {
  .main-content {
    padding: 15px 11px 30px;
  }

  .task-panel,
  .calendar-card,
  .day-card {
    padding: 13px;
    border-radius: 19px;
  }

  .top-actions {
    gap: 5px;
  }

  .top-actions .primary-button {
    width: 42px;
    height: 42px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .top-actions .primary-button::before {
    content: "+";
    font-size: 22px;
  }

  .notification-button {
    display: none;
  }

  .progress-copy p {
    max-width: 180px;
  }

  .quick-date span {
    display: none;
  }

  .task-actions .edit {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .task-modal form {
    padding: 19px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto!important;
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }

}
