:root {
  color-scheme: light;
  --ink: #161719;
  --ink-soft: #6f737b;
  --ink-muted: #a4a8b0;
  --paper: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #fbfaf5;
  --line: #eceee9;
  --sidebar: #070807;
  --sidebar-panel: #111312;
  --coral: #ff755e;
  --coral-dark: #ee674f;
  --coral-soft: #fff0ec;
  --mint: #90dac9;
  --mint-dark: #5fbaa5;
  --mint-soft: #effaf6;
  --blue: #8eaaf8;
  --blue-soft: #f2f5ff;
  --gold: #f1cc62;
  --gold-soft: #fff9e9;
  --green: #85d4a1;
  --red: #f17976;
  --shadow-sm: 0 7px 18px rgba(20, 25, 31, 0.05);
  --shadow-md: 0 18px 45px rgba(28, 28, 28, 0.08);
  --radius-sm: 8px;
  --radius-xs: 6px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #e9e9e6;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
p {
  margin: 0;
}

.app-frame {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(12, 12, 12, 0.04);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 30px 18px 24px;
  color: #f6f8f4;
  background: var(--sidebar);
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 20px;
  width: 44px;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 5px 5px, #ff6a5f 0 4px, transparent 5px),
    radial-gradient(circle at 22px 5px, #ffcf63 0 4px, transparent 5px),
    radial-gradient(circle at 39px 5px, #75d6ab 0 4px, transparent 5px);
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.icon path,
.icon circle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.sidebar__brand {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  margin: 22px 0 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  background: var(--sidebar-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar__brand strong,
.sidebar__brand small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__brand strong {
  font-size: 13px;
  font-weight: 760;
}

.sidebar__brand small {
  margin-top: 2px;
  color: #a6aaa8;
  font-size: 11px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd96d, #ff7860 60%, #7e7ff7);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.avatar--brand {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.avatar--brand span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #242426 0 2px, transparent 3px),
    radial-gradient(circle at 65% 35%, #242426 0 2px, transparent 3px),
    radial-gradient(circle at 50% 67%, #242426 0 2px, transparent 3px),
    #fff6df;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  color: #b7bbb8;
  font-size: 13px;
  font-weight: 680;
}

.nav-item:hover {
  color: #ffffff;
  background: #121514;
}

.nav-item--active {
  color: #ffffff;
  background: var(--coral);
  box-shadow: 0 10px 22px rgba(255, 117, 94, 0.35);
}

.upgrade-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #141716, #0d0f0e);
}

.upgrade-card__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 760;
}

.upgrade-card__title .icon {
  color: #f8f4da;
}

.upgrade-card p {
  margin: 6px 0 14px;
  color: #858a87;
  font-size: 11px;
}

.help-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: #d0d4d1;
  font-size: 12px;
  font-weight: 720;
}

.help-link small {
  display: block;
  margin-top: 2px;
  color: #7f8581;
  font-size: 10px;
  font-weight: 650;
}

.workspace {
  min-width: 0;
  padding: 28px 28px 34px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

h1 {
  font-size: 29px;
  font-weight: 820;
  line-height: 1.08;
}

.topbar p {
  margin-top: 7px;
  color: #777c84;
  font-size: 13px;
  font-weight: 580;
}

.topbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.date-chip,
.icon-button,
.button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: var(--radius-xs);
  font-weight: 760;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.date-chip:hover,
.icon-button:hover,
.button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.date-chip {
  gap: 14px;
  padding: 0 14px;
  color: #2b2d30;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
}

.icon-button {
  gap: 8px;
  padding: 0 13px;
  color: #484c52;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
}

.icon-button--square {
  width: 38px;
  padding: 0;
}

.icon-button--round {
  width: 38px;
  padding: 0;
  border-radius: 50%;
}

.button {
  gap: 9px;
  min-width: 104px;
  padding: 0 14px;
  font-size: 12px;
}

.button--mint {
  color: #0f342d;
  background: var(--mint);
}

.button--dark {
  color: #ffffff;
  background: #111211;
  box-shadow: 0 10px 20px rgba(18, 19, 18, 0.14);
}

.button--light {
  color: #1d1e20;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.ghost-button {
  min-height: 30px;
  padding: 0 8px;
  color: #777c84;
  background: transparent;
  font-size: 11px;
}

.ghost-button--danger {
  color: #d55753;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(178px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(237, 238, 232, 0.8);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -50px;
  width: 150px;
  height: 130px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.metric-card--primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--coral), #f56c55);
  box-shadow: 0 20px 45px rgba(234, 102, 78, 0.24);
}

.metric-card--mint {
  background: linear-gradient(180deg, #f7fffc, #f0fbf6);
}

.metric-card--blue {
  background: linear-gradient(180deg, #f8faff, var(--blue-soft));
}

.metric-card--cream {
  background: linear-gradient(180deg, #fffdf8, var(--gold-soft));
}

.metric-card__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 760;
}

.metric-card--primary .metric-card__meta,
.metric-card--primary small {
  color: rgba(255, 255, 255, 0.76);
}

.info {
  width: 14px;
  height: 14px;
  color: currentColor;
  opacity: 0.55;
}

.info path,
.info circle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.metric-card__value {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.metric-card__value strong {
  font-size: 31px;
  font-weight: 840;
  line-height: 1;
}

.metric-card:not(.metric-card--primary) .metric-card__value strong {
  font-size: 26px;
}

.metric-card small {
  display: block;
  margin-top: 9px;
  color: #7f848b;
  font-size: 11px;
  font-weight: 650;
}

.delta {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 820;
}

.delta--light {
  color: #0c7d61;
  background: #ffffff;
}

.board-shell {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  margin-bottom: 13px;
}

.panel__header h2 {
  font-size: 15px;
  font-weight: 820;
  line-height: 1.2;
  white-space: nowrap;
}

.panel__header h2::after {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 7px;
  border: 1px solid #d8dbd5;
  border-radius: 50%;
  color: #adb2aa;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.board-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.board-scroll::-webkit-scrollbar {
  height: 10px;
}

.board-scroll::-webkit-scrollbar-thumb {
  border: 3px solid var(--surface);
  border-radius: 999px;
  background: #d6d9d3;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(216px, 1fr));
  gap: 12px;
  min-width: 1840px;
}

.task-column {
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr);
  min-height: 480px;
  overflow: hidden;
  border: 1px solid #eef0ea;
  border-radius: var(--radius-sm);
  background: #fbfcf8;
}

.task-column[data-accent="coral"] {
  background: linear-gradient(180deg, #fff8f6, #fbfcf8 42%);
}

.task-column[data-accent="mint"] {
  background: linear-gradient(180deg, #f5fffb, #fbfcf8 42%);
}

.task-column[data-accent="blue"] {
  background: linear-gradient(180deg, #f7f9ff, #fbfcf8 42%);
}

.task-column[data-accent="gold"] {
  background: linear-gradient(180deg, #fffdf5, #fbfcf8 42%);
}

.column-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #eef0ea;
}

.column-title {
  min-width: 0;
}

.column-title strong,
.column-title span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-title strong {
  color: #24282d;
  font-size: 13px;
  font-weight: 840;
}

.column-title span {
  margin-top: 3px;
  color: #8d939a;
  font-size: 10px;
  font-weight: 720;
}

.column-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #555c63;
  background: #f0f2ec;
  font-size: 10px;
  font-weight: 840;
}

.column-add {
  width: 28px;
  min-height: 28px;
  padding: 0;
  color: #2c3034;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.column-accent {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.task-column[data-accent="mint"] .column-accent {
  background: var(--mint-dark);
}

.task-column[data-accent="blue"] .column-accent {
  background: var(--blue);
}

.task-column[data-accent="gold"] .column-accent {
  background: var(--gold);
}

.task-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 320px;
  padding: 12px;
}

.task-list.is-over {
  background:
    linear-gradient(180deg, rgba(144, 218, 201, 0.1), rgba(142, 170, 248, 0.08)),
    rgba(255, 255, 255, 0.72);
}

.task-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eceee9;
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.task-card:hover {
  border-color: #dedfd9;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.task-card.is-dragging {
  opacity: 0.56;
  transform: rotate(1deg);
}

.task-card.is-completed {
  background: #fbfbf7;
}

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

.task-card__top {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: start;
}

.task-title {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #202327;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.35;
}

.task-notes {
  overflow-wrap: anywhere;
  color: #6f747b;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.45;
}

.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #9aa0a6;
  font-size: 10px;
  font-weight: 760;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.drag-handle::before,
.drag-handle::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c7cbc4;
  box-shadow: 0 7px 0 #c7cbc4;
}

.check-button,
.edit-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  color: #747a82;
  background: #f7f8f4;
}

.check-button {
  border: 1px solid #e4e6df;
}

.check-button.is-checked {
  color: #0f342d;
  border-color: rgba(95, 186, 165, 0.28);
  background: var(--mint);
}

.edit-button:hover,
.check-button:hover {
  color: #222426;
  background: #eef0ea;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 12px;
  border: 1px dashed #dfe2db;
  border-radius: var(--radius-sm);
  color: #a0a5ad;
  background: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 760;
  text-align: center;
}

.task-dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(10, 12, 14, 0.22);
}

.task-dialog::backdrop {
  background: rgba(15, 17, 18, 0.42);
}

.task-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 2px;
}

.dialog-header h2 {
  font-size: 18px;
  font-weight: 840;
}

.dialog-header p {
  margin-top: 5px;
  color: #777c84;
  font-size: 12px;
  font-weight: 620;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #555b62;
  font-size: 11px;
  font-weight: 820;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #e3e5df;
  border-radius: var(--radius-xs);
  color: #22262a;
  background: #fbfcf8;
  outline: 0;
}

.field input,
.field select {
  min-height: 42px;
  padding: 0 12px;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
  padding: 11px 12px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(255, 117, 94, 0.62);
  box-shadow: 0 0 0 4px rgba(255, 117, 94, 0.11);
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.dialog-actions > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1180px) {
  .app-frame {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 14px;
  }

  .sidebar__brand {
    grid-template-columns: 38px;
    justify-content: center;
  }

  .sidebar__brand div:not(.avatar),
  .sidebar__brand > .icon,
  .nav-item,
  .help-link span,
  .upgrade-card p,
  .upgrade-card .button {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-item .icon,
  .help-link .icon {
    width: 20px;
    height: 20px;
  }

  .upgrade-card {
    display: grid;
    place-items: center;
    padding: 12px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .metric-card--primary {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .app-frame {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .sidebar::before,
  .upgrade-card,
  .help-link {
    display: none;
  }

  .sidebar__brand {
    margin: 0 0 12px;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .nav-item {
    flex: 0 0 44px;
  }

  .workspace {
    padding: 22px 16px 28px;
  }

  .topbar {
    display: grid;
  }

  .topbar__actions {
    justify-content: flex-start;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .metric-card--primary {
    grid-column: auto;
  }

  .board-shell {
    padding: 14px;
  }

  .board-scroll {
    overflow-x: visible;
  }

  .task-board {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .task-column {
    min-height: 0;
    grid-template-rows: auto auto;
  }

  .task-list {
    min-height: 130px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 26px;
  }

  .date-chip,
  .button--dark {
    width: 100%;
  }

  .topbar__actions {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    width: 100%;
  }

  #newTask {
    grid-column: 1 / -1;
  }

  .metric-card {
    padding: 18px;
  }

  .metric-card__value {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .board-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-actions > div,
  .dialog-actions .button,
  .dialog-actions .ghost-button {
    width: 100%;
  }
}
