:root {
  --page: #e6e8f2;
  --surface: #ffffff;
  --text: #000000;
  --muted: #64748b;
  --border: #dbe2ea;
  --primary: #ff451e;
  --primary-dark: #d93615;
  --danger: #b42318;
  --danger-bg: #fff0ef;
  --focus: #f59e0b;
  --shadow: 0 12px 32px rgba(30, 41, 59, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.app-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

.app-layout {
  min-height: 100vh;
  margin-left: 240px;
  padding: 4rem 2rem;
}

.sidebar {
  position: fixed;
  display: flex;
  flex-direction: column;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 240px;
  min-width: 240px;
  padding: 24px 16px 16px;
  border: 0;
  background: #dcdfed;
}

.app-header {
  margin: 0 0 1.75rem 240px;
  padding: 4rem 2rem 0;
}

.app-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
}

.intro,
#task-count {
  color: var(--muted);
}

.intro {
  margin-bottom: 0;
}

.task-panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
}

.task-list-panel {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.new-task-panel {
  margin: 1rem 0;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  scroll-margin-top: 12rem;
}

.task-title-input,
.task-description-input {
  display: block;
  width: 100%;
  border: 0;
  color: var(--text);
  background: transparent;
  resize: none;
}

.task-form .task-title-input {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000000;
  font-size: 16px;
  font-weight: 600;
}

.task-form .task-description-input {
  min-height: 3rem;
  padding: 0.45rem 0 0;
  color: #2d2d2d;
  font-size: 14px;
  font-weight: 400;
  overflow: hidden;
}

.task-form .task-title-input:focus,
.task-form .task-description-input:focus {
  outline: 0;
  box-shadow: none;
}

.task-form .task-title-input:focus-visible,
.task-form .task-description-input:focus-visible {
  outline: 0;
  background: transparent;
}

.task-title-input::placeholder,
.task-description-input::placeholder {
  color: #7b7b7b;
  opacity: 1;
}

.subtask-editor {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.subtask-editor-label {
  margin: 0;
  color: #2d2d2d;
  font-size: 14px;
  font-weight: 600;
}

.subtask-editor-label[hidden] {
  display: none;
}

.subtask-editor-list,
.subtask-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subtask-editor-list[hidden] {
  display: none;
}

.subtask-editor-item,
.subtask-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.subtask-item .subtask-toggle {
  margin-top: 0;
}

.subtask-editor-item input[type="text"] {
  min-height: 32px;
  padding: 0.3rem 0;
  border: 0;
  border-radius: 0;
  color: #2d2d2d;
  background: transparent;
  font-size: 14px;
}

.subtask-editor-item input[type="text"]:focus,
.subtask-editor-item input[type="text"]:focus-visible {
  outline: 0;
  background: transparent;
}

.subtask-add-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subtask-add-row[hidden] {
  display: none;
}

.subtask-add-row input[type="text"] {
  min-width: 0;
  flex: 1;
  min-height: 32px;
  padding: 0.3rem 0;
  border: 0;
  border-radius: 0;
  color: #2d2d2d;
  background: transparent;
  font-size: 14px;
}

.subtask-add-row input[type="text"]:focus,
.subtask-add-row input[type="text"]:focus-visible {
  outline: 0;
  background: transparent;
}

.add-subtask-button,
.remove-subtask-button {
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.add-subtask-button {
  flex: 0 0 auto;
  justify-self: start;
  padding: 0.3rem 0;
}

.add-subtask-button:hover {
  color: var(--primary);
}

.remove-subtask-button {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.remove-subtask-button:hover {
  color: var(--danger);
}

.remove-subtask-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.subtask-toggle {
  appearance: none;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  border: 1.5px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.subtask-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(45deg);
}

.subtask-toggle:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.subtask-toggle:checked::after {
  opacity: 1;
}

.subtask-toggle-preview {
  pointer-events: none;
  cursor: default;
}

.new-task-panel .schedule-inputs,
.edit-task-form .schedule-inputs {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

.new-task-panel .schedule-field,
.edit-task-form .schedule-field {
  justify-content: flex-start;
  width: auto;
  height: 32px;
  min-height: 32px;
  padding: 0 16px 0 8px;
  gap: 0.6rem;
  font-size: 14px;
  font-weight: 400;
}

.schedule-clock-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.clock-icon {
  position: relative;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--text);
}

.clock-icon::before,
.clock-icon::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  width: 2px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: bottom;
}

.clock-icon::before {
  top: 0.22rem;
  height: 0.36rem;
}

.clock-icon::after {
  top: 0.5rem;
  height: 0.28rem;
  transform: rotate(120deg);
}

.add-task-submit {
  height: 32px;
  min-width: 80px;
  padding: 0 16px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: #fff;
  background: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

.task-form-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.edit-task-form {
  width: 100%;
}

.cancel-task-button {
  height: 32px;
  min-width: 80px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.cancel-task-button:hover {
  background: #f5f5f5;
}

.delete-task-button {
  height: 32px;
  min-width: 80px;
  padding: 0 16px;
  border: 1px solid #e5a19a;
  border-radius: 6px;
  color: var(--danger);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.delete-task-button:hover {
  background: var(--danger-bg);
}

.add-task-submit:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.floating-add-button {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.05rem;
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-weight: 750;
}

.floating-add-button:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.floating-add-button span {
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 0.75;
}

.delete-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  height: 40px;
  gap: 0.6rem;
  padding: 0 8px 0 16px;
  border-radius: 8px;
  color: #fff;
  background: #000;
  font-size: 14px;
  transform: translateX(-50%);
}

.delete-toast > span {
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.delete-toast[hidden] {
  display: none;
}

.undo-delete-button,
.close-delete-toast {
  border: 0;
  color: #fff;
  background: transparent;
  font-weight: 600;
}

.undo-delete-button {
  padding: 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.close-delete-toast {
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
  place-items: center;
}

.close-delete-toast svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.undo-delete-button:hover,
.close-delete-toast:hover {
  background: #2d2d2d;
}

.task-form label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 700;
}

.input-row {
  display: flex;
  gap: 0.7rem;
}

input[type="text"] {
  width: 100%;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  background: #fff;
}

input[type="text"]:hover {
  border-color: #aebaca;
}

input[type="text"]::placeholder {
  color: #8a96a7;
}

.input-row > button {
  flex: 0 0 auto;
  padding: 0.75rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.input-row > button:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.form-message {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.form-message:not(:empty) {
  margin-top: 0.7rem;
}

.schedule-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.schedule-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.schedule-fieldset legend {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.schedule-picker {
  position: relative;
}

.schedule-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  background: #fff;
  font-weight: 650;
  text-align: left;
}

.schedule-field:hover {
  border-color: #aebaca;
  background: #fbfcfe;
}

.calendar-icon {
  position: relative;
  width: 1.1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-radius: 2px;
  color: var(--muted);
}

.calendar-icon::before {
  content: "";
  position: absolute;
  top: 0.18rem;
  right: -2px;
  left: -2px;
  border-top: 2px solid currentColor;
}

.calendar-icon::after {
  content: "";
  position: absolute;
  top: -0.25rem;
  left: 0.16rem;
  width: 0.15rem;
  height: 0.3rem;
  border-right: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.schedule-dialog {
  width: min(100% - 2rem, 390px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  box-shadow: none;
}

.schedule-dialog::backdrop {
  background: rgba(15, 23, 42, 0.4);
}

.schedule-dialog-form {
  display: grid;
  gap: 0.75rem;
  padding: 16px;
}

.dialog-heading,
.dialog-actions,
.dialog-time-row {
  display: flex;
  align-items: center;
}

.dialog-heading,
.dialog-actions {
  justify-content: space-between;
}

.dialog-heading h2 {
  margin: 0;
}

.calendar-picker {
  padding: 0.25rem 0;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.calendar-month {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.calendar-navigation {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
}

.calendar-navigation:hover {
  background: #f4f4f4;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
}

.calendar-weekdays {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.calendar-day {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  font-size: 0.82rem;
}

.calendar-day:hover {
  background: #f4f4f4;
}

.calendar-day.is-today {
  outline: 1px solid var(--primary);
  outline-offset: -1px;
}

.calendar-day.is-selected {
  color: #fff;
  background: var(--primary);
}

.calendar-selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.selected-calendar-date {
  margin: 0;
  color: #2d2d2d;
  font-size: 14px;
  font-weight: 400;
}

.dialog-time-controls {
  display: flex;
  gap: 0.4rem;
}

.dialog-repeat-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  color: #2d2d2d;
  font-size: 14px;
  font-weight: 600;
}

.dialog-repeat-control .dialog-time {
  width: 10rem;
}

.weekly-repeat-days {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0.8rem 0 0;
  border: 0;
}

.weekly-repeat-days[hidden] {
  display: none;
}

.weekly-repeat-days legend {
  padding: 0;
  color: #2d2d2d;
  font-size: 14px;
  font-weight: 600;
}

.weekday-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.weekday-options label {
  cursor: pointer;
}

.weekday-options input {
  position: absolute;
  opacity: 0;
}

.weekday-options label {
  min-width: 2.65rem;
}

.weekday-options label {
  display: grid;
  min-height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #2d2d2d;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  place-items: center;
}

.weekday-options label:has(input:checked) {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff0ed;
}

.weekday-options label:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.dialog-time {
  width: 6.75rem;
  height: 32px;
  min-width: 0;
  padding: 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.dialog-time:disabled {
  cursor: not-allowed;
  color: #808080;
  background: #f4f4f4;
}

.dialog-close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
}

.dialog-close:hover {
  background: #eef2f7;
}

.schedule-dialog-form > label,
.dialog-time-row > label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.schedule-dialog-form > input {
  width: 100%;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.dialog-time-row {
  justify-content: space-between;
  gap: 1rem;
}

.dialog-time-selects {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.dialog-time-selects select {
  padding: 0.45rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font-weight: 650;
}

.dialog-message {
  min-height: 1.2em;
  margin: 0;
  color: var(--danger);
  font-size: 0.85rem;
}

.dialog-actions {
  justify-content: flex-end;
  gap: 8px;
}

.dialog-actions button {
  height: 32px;
  min-width: 80px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.dialog-actions button[type="submit"] {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.dialog-actions button:hover {
  background: #f5f5f5;
}

.dialog-actions button[type="submit"]:hover {
  background: var(--primary-dark);
}

.list-heading {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 32px 0;
  background: var(--page);
}

#task-count {
  margin-top: 0.25rem;
  margin-bottom: 0;
  font-size: 14px;
}

.filter-button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-weight: 650;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.filters {
  display: grid;
  gap: 1px;
}

.mobile-more {
  display: none;
}

.sidebar-profile {
  position: relative;
  margin-top: auto;
  padding-top: 16px;
}

.profile-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.profile-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-size: 14px;
  font-weight: 600;
  place-items: center;
}

.profile-email {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 12px 0 8px;
  border-radius: 8px;
  color: #2d2d2d;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.filter-count {
  margin-left: auto;
  color: inherit;
  font-size: 12px;
  font-weight: 500;
}

.filter-button:hover {
  color: var(--text);
  background: #ffffff;
}

.filter-button.is-selected {
  color: var(--primary);
  background: #ffffff;
}

.filter-button.is-selected::after {
  display: none;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-title-row h2 {
  margin-bottom: 0;
  font-size: 24px;
  font-weight: 700;
}

.upcoming-calendar-button {
  display: grid;
  width: 2rem;
  height: 2rem;
  margin-left: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  place-items: center;
}

.upcoming-calendar-button[hidden] {
  display: none;
}

.upcoming-calendar-button:hover:not(:disabled) {
  background: #f4f4f4;
}

.upcoming-calendar-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.task-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0 0 96px;
  list-style: none;
}

.calendar-month-group {
  display: grid;
  gap: 0.65rem;
}

.calendar-month-group + .calendar-month-group {
  padding-top: 0.65rem;
  border-top: 1px solid #ced0dd;
}

.calendar-month-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.35rem 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.calendar-month-toggle:hover {
  color: var(--primary);
}

.calendar-month-chevron {
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
}

.calendar-month-task-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0 0 40px;
  list-style: none;
}

.calendar-month-task-list[hidden] {
  display: none;
}

.calendar-date-group {
  display: grid;
  gap: 0.65rem;
  scroll-margin-top: 12rem;
}

.calendar-date-heading {
  margin: 24px 0 16px;
  color: #000000;
  font-size: 14px;
  font-weight: 600;
}

.calendar-task-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upcoming-calendar-content {
  display: grid;
  gap: 0.75rem;
  padding: 16px;
}

.upcoming-calendar-message {
  min-height: 1.25rem;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.upcoming-calendar-day.has-tasks {
  position: relative;
  font-weight: 600;
}

.upcoming-calendar-day.has-tasks::after {
  content: "";
  position: absolute;
  bottom: 0.14rem;
  left: 50%;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 50%;
  background: var(--primary);
  transform: translateX(-50%);
}

.upcoming-calendar-day.is-selected.has-tasks::after {
  background: #fff;
}

.task-item {
  position: relative;
  isolation: isolate;
  padding: 16px 16px 24px;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: none;
  animation: task-card-float 4.8s ease-in-out infinite;
  will-change: transform;
}

.task-item:nth-child(even) {
  animation-delay: -2.4s;
}

@keyframes task-card-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

.task-main,
.task-details,
.task-content {
  min-width: 0;
}

.task-content {
  display: grid;
  gap: 24px;
}

.task-schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.task-details {
  flex: 1;
  display: grid;
  gap: 8px;
}

.task-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.task-toggle {
  appearance: none;
  width: 24px;
  height: 24px;
  margin: 0;
  flex: 0 0 auto;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.task-toggle::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.43rem;
  width: 0.35rem;
  height: 0.65rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(45deg) scale(0.4);
  transition: opacity 120ms ease, transform 160ms ease;
}

.task-toggle:hover {
  border-color: var(--primary);
}

.task-item.is-overdue .task-toggle:not(:checked),
.task-item.is-overdue .task-toggle:not(:checked):hover {
  border-color: #e53935;
}

.task-item.is-current-time .task-toggle:not(:checked),
.task-item.is-current-time .task-toggle:not(:checked):hover {
  border-color: #1f9d55;
}

.task-toggle:active {
  transform: scale(0.88);
}

.task-toggle:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.task-toggle:checked::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.task-item.is-responding {
  animation: task-state-change 220ms ease-out;
}

@keyframes task-state-change {
  50% {
    transform: scale(1.012);
    background: #f3f5ff;
  }
}

.task-title {
  margin: 0;
  color: #000000;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  overflow-wrap: anywhere;
}

.task-description {
  margin: 0;
  color: #6c6c6c;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.task-schedule {
  margin: 0;
  padding: 0;
  border: 0;
  color: #000000;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
}

.task-schedule:hover:not(:disabled) {
  color: var(--primary);
}

.task-schedule:disabled {
  cursor: default;
  opacity: 1;
}

.task-schedule-meta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  gap: 6px;
  min-width: 0;
  padding: 0 8px;
  border-radius: 24px;
  background: #f2f3f7;
}

.task-repeat-icon {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #2d2d2d;
  place-items: center;
}

.task-repeat-icon[hidden] {
  display: none;
}

.task-repeat-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.task-subtasks {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.task-subtasks[hidden] {
  display: none;
}

.subtask-list {
  gap: 8px;
}

.task-description:not([hidden]) + .task-subtasks {
  margin-top: 8px;
}

.subtask-progress {
  margin: 0;
  color: #6c6c6c;
  font-size: 12px;
  font-weight: 400;
}

.subtask-item label {
  min-width: 0;
  color: #6c6c6c;
  font-size: 14px;
  font-weight: 400;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.subtask-item.is-completed label {
  color: #808080;
  text-decoration: line-through;
}

.is-completed .task-title {
  color: #808080;
  text-decoration: line-through;
}

.task-item.is-completed {
  background: #f2f3f7;
}

.is-completed .task-description,
.is-completed .task-schedule,
.is-completed .task-repeat-icon,
.is-completed .subtask-progress,
.is-completed .subtask-item label {
  color: #808080;
}

.task-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.task-overflow {
  position: relative;
}

.task-overflow-button {
  display: grid;
  width: 32px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: #000000;
  background: #f2f3f7;
  place-items: center;
}

.task-overflow-button:hover,
.task-overflow-button[aria-expanded="true"] {
  background: #e5e7ee;
}

.task-overflow-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.task-action-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  display: grid;
  min-width: 112px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgb(0 0 0 / 10%);
}

.task-action-menu[hidden] {
  display: none;
}

.task-action-menu button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #000000;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.task-action-menu button:hover {
  background: #f2f3f7;
}

.task-action-menu .delete-button {
  color: var(--danger);
}

.task-action-menu .archive-button[hidden] {
  display: none;
}

.edit-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.edit-form-fields {
  display: grid;
  flex: 1;
  gap: 0.5rem;
}

.edit-date-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.edit-date-inputs label {
  color: var(--muted);
  font-size: 0.78rem;
}

.edit-form input {
  flex: 1;
}

.edit-form textarea {
  width: 100%;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  resize: vertical;
}

.edit-form button {
  flex: 0 0 auto;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 650;
}

.edit-form button:hover {
  background: #eef2f7;
}

.empty-state {
  display: grid;
  justify-items: center;
  width: min(100%, 360px);
  gap: 8px;
  margin: 32px auto;
  padding: 0;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state-image {
  width: min(100%, 360px);
  max-width: 360px;
  height: auto;
}

.empty-state h3 {
  margin: 8px 0 0;
  color: #000000;
  font-size: 20px;
  font-weight: 600;
}

.empty-state p {
  margin: 0;
  color: #6c6c6c;
  font-size: 14px;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  padding: 1.5rem;
  place-items: center;
}

.auth-shell {
  width: min(100%, 440px);
}

.auth-card {
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.auth-card h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 7vw, 2.75rem);
}

.auth-intro {
  margin-bottom: 2rem;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-form[hidden],
.auth-success-panel[hidden] {
  display: none;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-field[hidden] {
  display: none;
}

.auth-field label {
  font-size: 14px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
}

.auth-field input:hover {
  border-color: #aebaca;
}

.auth-submit {
  min-height: 40px;
  margin-top: 0.5rem;
  padding: 0 16px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: #fff;
  background: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

.auth-submit:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.auth-message {
  min-height: 1.25rem;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.auth-success-panel {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.auth-success-panel p {
  margin: 0;
  color: var(--muted);
}

.auth-success-panel .auth-submit {
  margin-top: 0;
}

.forgot-password-button {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.forgot-password-button:hover {
  text-decoration: underline;
}

.auth-switch {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-switch button {
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-weight: 600;
}

.auth-switch button:hover {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .task-item {
    animation: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 2rem, 1080px);
    margin: 0 auto;
  }

  .app-header {
    margin-left: 0;
    padding: 2rem 0 0;
  }

  .app-layout {
    min-height: auto;
    margin-left: 0;
    padding: 2rem 0 calc(80px + env(safe-area-inset-bottom));
  }

  .list-heading {
    padding: 24px 0;
  }

  .task-list {
    padding-bottom: 10rem;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom));
    min-width: 0;
    margin: 0;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
    border: 0;
    background: #dcdfed;
    box-shadow: 0 -6px 18px rgb(0 0 0 / 8%);
  }

  .sidebar-profile {
    display: none;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
  }

  .filters [data-filter="archived"] {
    display: none;
  }

  .mobile-more {
    position: relative;
    display: block;
    min-width: 0;
  }

  .filter-button {
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 56px;
    min-height: 56px;
    gap: 3px;
    padding: 4px;
    border-radius: 8px;
    font-size: 12px;
  }

  .filter-count {
    display: none;
  }

  .mobile-more-trigger .nav-icon circle {
    fill: currentColor;
    stroke: none;
  }

  .mobile-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgb(0 0 0 / 28%);
  }

  .mobile-more-backdrop[hidden] {
    display: none;
  }

  .mobile-more-menu {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 32px 16px calc(16px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 20px 20px 0 0;
    background: #ffffff;
    box-shadow: 0 -8px 28px rgb(0 0 0 / 16%);
    animation: mobile-bottom-sheet 180ms ease-out;
  }

  .mobile-more-menu::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: #ced0dd;
    transform: translateX(-50%);
  }

  .mobile-more-menu[hidden] {
    display: none;
  }

  @keyframes mobile-bottom-sheet {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  .mobile-more-menu button {
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    color: var(--text);
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
  }

  .mobile-more-menu button:hover {
    background: #f2f3f7;
  }

  .mobile-more-menu #mobile-sign-out-button {
    color: var(--primary);
  }

  .mobile-more-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    margin: 4px 0;
    padding: 4px 12px;
    border-radius: 6px;
    background: #f2f3f7;
  }

  .mobile-more-profile .profile-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .floating-add-button {
    right: 1rem;
    bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .delete-toast {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }

}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 1.25rem, 760px);
    padding: 0;
  }

  .task-panel {
    padding: 16px;
  }

  .task-list-panel {
    padding: 0;
  }

  .new-task-panel {
    padding: 16px;
    border-radius: 12px;
  }

  .new-task-panel .schedule-inputs,
  .edit-task-form .schedule-inputs {
    align-items: stretch;
    flex-direction: column;
  }

  .new-task-panel .schedule-field,
  .edit-task-form .schedule-field {
    width: 100%;
  }

  .add-task-submit {
    align-self: flex-end;
  }

  .task-form-actions {
    align-self: flex-end;
  }

  .input-row {
    flex-direction: column;
  }

  .input-row > button {
    width: 100%;
  }

  .schedule-inputs,
  .edit-date-inputs {
    grid-template-columns: 1fr;
  }

  .task-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-actions {
    align-self: flex-end;
  }

  .floating-add-button {
    right: 1rem;
    bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .delete-toast {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .edit-form {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .edit-form > button {
    margin-left: auto;
  }

  .edit-form > button + button {
    margin-left: 0;
  }
}

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