﻿:root {
  --bg: #eaf0ff;
  --ink: #171b2a;
  --muted: #646f85;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --line: rgba(47, 66, 105, 0.14);
  --accent: #2149ff;
  --accent-2: #19b4ff;
  --accent-3: #7453ff;
  --secondary: #3852a8;
  --secondary-2: #5f78cf;
  --secondary-soft: #edf2ff;
  --success: #1f8f5f;
  --danger: #c03d55;
  --warn: #ba3c54;
  --shadow-xl: 0 30px 90px rgba(28, 45, 82, 0.14);
  --shadow-lg: 0 16px 40px rgba(28, 45, 82, 0.12);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(920px 520px at 50% -12%, rgba(79, 92, 255, 0.16), transparent 62%),
    radial-gradient(rgba(58, 79, 192, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, #f7f8ff 0%, #eef1fb 100%);
  background-size: auto, 26px 26px, auto;
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 36px 16px 10px;
}

.site-header {
  margin-bottom: 22px;
  text-align: center;
  animation: revealIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand-badge {
  width: fit-content;
  margin: 0 auto 12px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #c8d7fb;
  background: rgba(255, 255, 255, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-badge__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(130deg, #3a4ff0, #7c5cff);
  box-shadow: 0 0 0 3px rgba(79, 92, 255, 0.18);
}

.brand-badge__text {
  font-size: 0.72rem;
  font-weight: 800;
  color: #2c4588;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-kicker {
  margin: 0 0 12px;
  color: #3551a8;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-title {
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(2.3rem, 6vw, 4.3rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #101632;
}

.site-title__accent {
  background: linear-gradient(120deg, #3a4ff0, #7c5cff 55%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-subtitle {
  max-width: 780px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(0.97rem, 2vw, 1.08rem);
  line-height: 1.55;
}

.tasks__wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(65, 87, 138, 0.15);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-xl);
  padding: 22px;
  overflow: hidden;
  animation: revealIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tasks__wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(79, 92, 255, 0.06), transparent 32%);
}

.tasks__composer,
.tasks__panel,
.tasks__list-block {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.tasks__composer,
.tasks__panel,
.tasks__list-block {
  padding: 16px;
}

.tasks__label,
.tasks__panel-title {
  margin: 0;
  color: #5f6e8f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tasks__composer-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto auto;
  gap: 10px;
}

.tasks__input,
.tasks__deadline-input,
.tasks__priority-select,
.tasks__search-input,
.tasks__edit-input,
.tasks__edit-select {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  border: 1px solid #ced8eb;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}



.tasks__input:focus,
.tasks__deadline-input:focus,
.tasks__priority-select:focus,
.tasks__search-input:focus,
.tasks__edit-input:focus,
.tasks__edit-select:focus {
  border-color: rgba(33, 73, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(33, 73, 255, 0.13);
  transform: translateY(-1px);
}

.tasks__deadline-input,
.tasks__priority-select {
  min-width: 138px;
}

.tasks__deadline-input {
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Crect x='2.2' y='2.8' width='9.6' height='8.7' rx='1.4' fill='none' stroke='%232b4587' stroke-width='1.4'/%3E%3Cpath d='M4.4 1.9v2.3M9.6 1.9v2.3M2.2 5.3h9.6' stroke='%232b4587' stroke-width='1.4' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

.tasks__deadline-input::placeholder {
  color: #7b8cab;
}

.date-picker {
  position: fixed;
  width: 280px;
  border: 1px solid #c7d4f2;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(31, 55, 103, 0.2);
  padding: 10px;
  z-index: 40;
}

.date-picker[hidden] {
  display: none;
}

.date-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.date-picker__month {
  font-size: 0.86rem;
  font-weight: 800;
  color: #243d79;
}

.date-picker__nav {
  border: 1px solid #d3ddf4;
  border-radius: 8px;
  background: #f4f8ff;
  color: #26468f;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.date-picker__weekdays,
.date-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.date-picker__weekdays span {
  font-size: 0.68rem;
  color: #7384a5;
  text-align: center;
  padding: 4px 0;
}

.date-picker__day {
  border: 0;
  border-radius: 8px;
  min-height: 30px;
  background: transparent;
  color: #1f315a;
  font-size: 0.82rem;
  cursor: pointer;
}

.date-picker__day:hover {
  background: #eaf0ff;
}

.date-picker__day.is-selected {
  background: linear-gradient(140deg, #2f4fc0, #4b6fe0);
  color: #fff;
}

.date-picker__day.is-today {
  box-shadow: inset 0 0 0 1px #6d88cf;
}

.date-picker__day.is-disabled {
  color: #aab4c8;
  cursor: not-allowed;
}

.tasks__priority-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.select-shell {
  position: relative;
  min-width: 152px;
}

.select-trigger {
  width: 100%;
  min-height: 42px;
  padding: 10px 42px 10px 13px;
  border-radius: var(--radius-md);
  border: 1px solid #ced8eb;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.select-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 5.5L7 9l3.5-3.5' fill='none' stroke='%23263f7a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 14px;
  transition: transform 0.2s ease;
}

.select-shell.is-open .select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.select-trigger:hover {
  border-color: #aebfe7;
  box-shadow: 0 6px 14px rgba(33, 73, 255, 0.08);
}

.select-trigger:focus-visible {
  outline: 3px solid rgba(33, 73, 255, 0.24);
  outline-offset: 1px;
}

.select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #cad7f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(31, 55, 103, 0.18);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.select-shell.is-open .select-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.select-option {
  padding: 9px 11px;
  border-radius: 9px;
  color: #24345a;
  font-size: 0.9rem;
  cursor: pointer;
}

.select-option:hover {
  background: #eef3ff;
}

.select-option.is-selected {
  background: #dce7ff;
  color: #1f3f8b;
  font-weight: 700;
}

.tasks__counter {
  margin: 0;
  border-radius: 13px;
  border: 1px solid #c7d7ff;
  padding: 12px 14px;
  color: #1e3d82;
  font-size: 0.92rem;
  background: linear-gradient(120deg, #ebf2ff, #f3f7ff);
}

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

.tasks__search,
.tasks__filters,
.tasks__sort {
  margin-top: 10px;
}

.tasks__search {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tasks__filters,
.tasks__sort,
.tasks-list__buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  min-height: 36px;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(33, 73, 255, 0.24);
  transform: translateY(0) scale(1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 12px 28px rgba(33, 73, 255, 0.28);
}

.btn:focus-visible,
.tasks__input:focus-visible,
.tasks__deadline-input:focus-visible,
.tasks__priority-select:focus-visible,
.tasks__search-input:focus-visible,
.tasks__edit-input:focus-visible,
.tasks__edit-select:focus-visible {
  outline: 3px solid rgba(33, 73, 255, 0.24);
  outline-offset: 1px;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-add {
  min-width: 136px;
  background: linear-gradient(130deg, #1f44ee, #6e54ff);
}

.btn-item {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.76rem;
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(130deg, var(--secondary), var(--secondary-2));
  box-shadow: 0 8px 20px rgba(56, 82, 168, 0.24);
}

.btn-success {
  background: linear-gradient(130deg, #1d9a64, #29bf7b);
  box-shadow: 0 8px 20px rgba(29, 154, 100, 0.24);
}

.btn-danger {
  background: linear-gradient(130deg, #c43d58, #df5a76);
  box-shadow: 0 8px 20px rgba(196, 61, 88, 0.24);
}

.is-active {
  color: #ffffff;
  background: linear-gradient(140deg, #2f4fc0, #4b6fe0);
  border: 1px solid #2342aa;
  box-shadow: 0 12px 24px rgba(44, 76, 180, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  font-weight: 800;
}

.tasks__filters .is-active,
.tasks__sort .is-active {
  position: relative;
  padding-left: 30px;
}

.tasks__filters .is-active::after,
.tasks__sort .is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.2l2.1 2.1 5.2-5.2' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 12px;
  background-position: center;
}

.tasks-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tasks-list__item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-radius: 14px;
  border: 1px solid #d7dfef;
  background: #fff;
  padding: 13px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tasks-list__item:hover {
  transform: translateY(-1px);
  border-color: #c4d0e8;
  box-shadow: 0 10px 24px rgba(22, 38, 66, 0.1);
}

.tasks-list__item.done {
  border-color: #c6e8d8;
  background: #f2fbf6;
}

.tasks-list__item--overdue {
  border-color: #efc2cb;
  background: #fff4f6;
}

.tasks-list__item--overdue .tasks__deadline {
  color: var(--warn);
}

.tasks-list__item--empty {
  min-height: 86px;
  justify-content: center;
  border-style: dashed;
  color: #7c87a0;
  background: #f9fbff;
}

.tasks-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.tasks-empty__icon {
  width: 64px;
  height: 64px;
}

.tasks-empty__title {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 700;
  color: #2c3f6d;
}

.tasks-empty__subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: #7686a3;
}

.tasks__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tasks__text {
  font-size: 0.98rem;
  line-height: 1.4;
  word-break: break-word;
}

.tasks-list__item.done .tasks__text {
  text-decoration: line-through;
  opacity: 0.66;
}

.tasks__text mark {
  background: #e9f0ff;
  color: #264796;
  border-radius: 8px;
  padding: 1px 5px;
}

.tasks__priority {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #25324e;
}

.tasks__priority--low {
  background: #c6efdb;
}

.tasks__priority--medium {
  background: #ffe8a3;
}

.tasks__priority--high {
  background: #ffc4cc;
}

.tasks__date,
.tasks__deadline {
  color: #70809d;
  font-size: 0.72rem;
}

.tasks__edit-wrapper {
  width: 100%;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tasks-list__item.is-entering {
  animation: enterCard 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tasks-list__item.is-toggled {
  animation: pulseCard 0.36s ease both;
}

.tasks-list__item.is-leaving {
  pointer-events: none;
  animation: leaveCard 0.24s ease both;
}

.site-footer {
  text-align: center;
  color: #7d88a2;
  padding: 22px 12px 30px;
}

.notfound {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.notfound__card {
  width: min(620px, 100%);
  border-radius: 24px;
  border: 1px solid #c9d8fc;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(31, 55, 103, 0.16);
  padding: 28px;
  text-align: center;
}

.notfound__code {
  margin: 8px 0 4px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(3rem, 10vw, 5.4rem);
  line-height: 1;
  color: #1f3f8b;
}

.notfound__title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  color: #1d2d52;
}

.notfound__text {
  margin: 10px 0 0;
  color: #6c7c98;
}

.notfound__back {
  display: inline-flex;
  margin-top: 20px;
  text-decoration: none;
}

.tasks__panel:nth-child(1) {
  animation: staggerIn 0.52s 0.04s both;
}

.tasks__panel:nth-child(2) {
  animation: staggerIn 0.52s 0.1s both;
}

.tasks__panel:nth-child(3) {
  animation: staggerIn 0.52s 0.16s both;
}

@keyframes revealIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes staggerIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes enterCard {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseCard {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.012);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes leaveCard {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.986);
  }
}

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

@media (max-width: 920px) {
  .tasks__composer-row {
    grid-template-columns: 1fr auto auto;
  }

  .tasks__input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  main {
    padding-top: 24px;
  }

  .tasks__wrapper {
    border-radius: 22px;
    padding: 14px;
  }

  .tasks__composer-row {
    grid-template-columns: 1fr;
  }

  .btn-add,
  .tasks-list__buttons .btn {
    width: 100%;
  }

  .tasks-list__item {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


