@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --paper: #f5f4ef;
  --surface: #ffffff;
  --ink: #202422;
  --muted: #737873;
  --line: #e4e4de;
  --line-dark: #d7d8d1;
  --accent: #f06a4f;
  --accent-soft: #fff0eb;
  --green: #25866d;
  --green-soft: #e9f4ef;
  --amber: #aa711c;
  --amber-soft: #fbf1dc;
  --violet: #6e59a7;
  --violet-soft: #f0ecf8;
  --sidebar: 238px;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

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

:focus-visible {
  outline: 3px solid rgba(240, 106, 79, .34);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 28px 17px 20px;
  border-right: 1px solid var(--line);
  background: #eeeee8;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  padding: 0 9px;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -.5px;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: white;
}

.brand-mark svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.main-nav { margin-top: 38px; }
.sidebar-section { margin-top: 34px; }
.sidebar-label { margin: 0 12px 10px; color: #90948f; font-size: 10px; font-weight: 700; letter-spacing: 1.35px; text-transform: uppercase; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  margin-bottom: 4px;
  padding: 0 12px;
  border-radius: 10px;
  color: #5e625e;
  font-size: 13px;
  font-weight: 560;
}

.nav-item:hover { background: rgba(255,255,255,.57); color: var(--ink); }
.nav-item.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(30,32,30,.04); }
.nav-item svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { min-width: 22px; margin-left: auto; padding: 2px 7px; border-radius: 20px; background: var(--accent-soft); color: #bf4a35; font-size: 10px; font-weight: 700; text-align: center; }

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 18px 5px 0;
  border-top: 1px solid #dcddd6;
}

.avatar {
  display: inline-grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  color: #3f463f;
  font-size: 9px;
  font-weight: 700;
}

.avatar-you { background: #ded6ca; }
.avatar-maya { background: #f1c5a7; }
.avatar-theo { background: #b9d4bf; }
.avatar-asha { background: #c8c0df; }
.avatar-jon { background: #e3c7cc; }
.avatar-luis { background: #bcd6de; }
.avatar-sam { background: #e1d29f; }
.profile-copy { display: grid; min-width: 0; }
.profile-copy strong { font-size: 11px; font-weight: 650; }
.profile-copy small { margin-top: 2px; color: #8b8e89; font-size: 9px; }
.icon-button { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 9px; background: transparent; cursor: pointer; }
.icon-button:hover { background: #f1f1ed; }
.icon-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.subtle { margin-left: auto; color: #828680; }

.main-content { min-height: 100vh; margin-left: var(--sidebar); }
.content-wrap { width: min(1080px, calc(100% - 76px)); margin: 0 auto; padding: 52px 0 26px; }
.mobile-header { display: none; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 27px; }
.eyebrow { margin: 0 0 8px; color: #939690; font-size: 10px; font-weight: 650; letter-spacing: 1px; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(30px, 3vw, 41px); font-weight: 540; letter-spacing: -1.75px; line-height: 1.05; }
.page-intro { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.team-stack { display: flex; padding-bottom: 4px; }
.team-stack .avatar, .team-more { margin-left: -7px; }
.team-stack .avatar:first-child { margin-left: 0; }
.team-more { display: grid; width: 31px; height: 31px; place-items: center; border: 2px solid var(--surface); border-radius: 50%; background: var(--ink); color: #fff; font-size: 9px; font-weight: 700; }

.overview {
  display: grid;
  grid-template-columns: 1fr 270px;
  align-items: center;
  gap: 48px;
  min-height: 79px;
  margin-bottom: 14px;
  padding: 17px 22px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.55);
}

.overview-copy { display: flex; align-items: center; gap: 13px; }
.overview-copy > div { display: grid; gap: 4px; }
.overview-copy strong { font-size: 12px; font-weight: 650; }
.overview-copy span { color: var(--muted); font-size: 10px; }
.pulse-mark { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--accent-soft); }
.pulse-mark i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(240,106,79,.13); }
.progress-wrap { display: grid; gap: 8px; }
.progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.progress-label strong { color: var(--ink); }
.progress-track { height: 5px; overflow: hidden; border-radius: 10px; background: #dedfd9; }
.progress-track i { display: block; width: 16.666%; height: 100%; border-radius: inherit; background: var(--green); transition: width 300ms ease; }

.inbox-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 7px 30px rgba(39,43,39,.035); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-heading > div:first-child { display: flex; align-items: baseline; gap: 10px; }
h2 { margin: 0; font-size: 15px; font-weight: 660; letter-spacing: -.2px; }
.result-count { color: #959994; font-size: 10px; }
.controls { display: flex; gap: 8px; }
.search-field, .select-field { position: relative; display: flex; align-items: center; color: #898d88; }
.search-field svg, .select-field svg { position: absolute; left: 11px; z-index: 1; width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.search-field input, .select-field select {
  height: 36px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: #fbfbf9;
  color: var(--ink);
  font-size: 10px;
  outline: none;
}
.search-field input { width: 207px; padding: 0 50px 0 34px; }
.search-field input::placeholder { color: #a0a39e; }
.search-field kbd { position: absolute; right: 9px; padding: 2px 5px; border: 1px solid #dedfd9; border-radius: 4px; background: #f4f4f1; color: #999d98; font-family: inherit; font-size: 8px; }
.select-field select { width: 137px; padding: 0 28px 0 33px; appearance: none; cursor: pointer; }
.select-field::after { content: ""; position: absolute; right: 11px; width: 5px; height: 5px; border-right: 1.5px solid #777c77; border-bottom: 1.5px solid #777c77; transform: translateY(-2px) rotate(45deg); pointer-events: none; }
.search-field:focus-within input, .select-field:focus-within select { border-color: #aaada7; box-shadow: 0 0 0 3px rgba(32,36,34,.06); }

.list-head, .task-row {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 130px 150px 100px 28px;
  align-items: center;
  column-gap: 17px;
}
.list-head { min-height: 35px; padding: 0 20px; border-bottom: 1px solid var(--line); background: #fafaf8; color: #a1a49f; font-size: 8px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.task-row { position: relative; min-height: 70px; padding: 10px 20px; border-bottom: 1px solid #ecece7; transition: background 130ms ease; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #fcfcfa; }
.task-row:focus-within { background: #fcfcfa; }
.task-main { display: flex; min-width: 0; align-items: center; gap: 12px; }
.priority-mark { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #c4c7c1; }
.priority-high { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.priority-medium { background: #d6a245; }
.priority-low { background: #a6aaa4; }
.task-title-wrap { min-width: 0; }
.open-task {
  display: block;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 0;
  border: 0;
  background: none;
  font-size: 11px;
  font-weight: 630;
  line-height: 1.3;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.open-task::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.task-project { display: block; margin-top: 4px; overflow: hidden; color: #959994; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; width: fit-content; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; font-size: 8.5px; font-weight: 650; white-space: nowrap; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-todo { background: #f0f1ee; color: #6e736e; }
.status-in-progress { background: var(--violet-soft); color: var(--violet); }
.status-blocked { background: var(--amber-soft); color: var(--amber); }
.status-done { background: var(--green-soft); color: var(--green); }
.assignee { display: flex; min-width: 0; align-items: center; gap: 8px; color: #616661; font-size: 9px; }
.assignee .avatar { width: 25px; height: 25px; border: 0; font-size: 7px; }
.assignee span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.due-date { color: #747974; font-size: 9px; font-variant-numeric: tabular-nums; }
.row-arrow { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #aaada8; opacity: 0; transition: opacity 130ms ease, transform 130ms ease; }
.row-arrow svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.task-row:hover .row-arrow, .task-row:focus-within .row-arrow { opacity: 1; transform: translateX(2px); }

.empty-state { display: grid; min-height: 360px; place-items: center; padding: 50px 20px; text-align: center; }
.empty-inner { max-width: 330px; }
.empty-icon { display: grid; width: 54px; height: 54px; margin: 0 auto 17px; place-items: center; border-radius: 17px; background: var(--paper); color: #979b95; }
.empty-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.empty-state h3 { margin: 0 0 7px; font-size: 15px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.secondary-button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-dark); border-radius: 9px; background: #fff; font-size: 10px; font-weight: 650; cursor: pointer; }
.secondary-button:hover { background: var(--paper); }

.page-footer { display: flex; justify-content: space-between; margin-top: 14px; padding: 0 2px; color: #a0a39f; font-size: 8px; }
.page-footer span:last-child { display: flex; align-items: center; gap: 6px; }
.page-footer i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

.detail-dialog {
  width: min(466px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: -24px 0 60px rgba(24,29,25,.13);
}
.detail-dialog[open] { animation: slide-in 220ms cubic-bezier(.2,.7,.2,1); }
.detail-dialog::backdrop { background: rgba(32,36,34,.25); animation: fade-in 180ms ease; backdrop-filter: blur(1px); }
#detail-content { height: 100%; }
.detail-shell { display: flex; height: 100%; flex-direction: column; }
.detail-topbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); }
.detail-topbar > span { color: #91958f; font-size: 9px; font-weight: 650; letter-spacing: .8px; text-transform: uppercase; }
.detail-topbar-actions { display: flex; gap: 4px; }
.detail-scroll { flex: 1; overflow-y: auto; padding: 31px 32px 42px; }
.detail-project { display: flex; align-items: center; gap: 7px; margin: 0 0 13px; color: var(--accent); font-size: 9px; font-weight: 680; letter-spacing: .45px; text-transform: uppercase; }
.detail-project svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.detail-scroll h2 { margin: 0; font-size: 28px; font-weight: 570; letter-spacing: -1.1px; line-height: 1.15; }
.detail-id { margin: 11px 0 0; color: #a0a39e; font-size: 9px; text-transform: uppercase; letter-spacing: .65px; }
.detail-metadata { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta-block { display: grid; gap: 7px; }
.meta-block > span:first-child, .status-field > span:first-child { color: #9a9e98; font-size: 8px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.meta-value { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 560; }
.meta-value .avatar { width: 24px; height: 24px; border: 0; font-size: 7px; }
.meta-value svg { width: 15px; color: #818680; fill: none; stroke: currentColor; stroke-width: 1.7; }
.status-field { position: relative; display: grid; gap: 8px; margin-bottom: 28px; }
.status-select-wrap { position: relative; }
.status-select-wrap select { width: 100%; height: 43px; padding: 0 39px 0 38px; appearance: none; border: 1px solid var(--line-dark); border-radius: 10px; background: #fafaf8; color: var(--ink); font-size: 10px; font-weight: 620; cursor: pointer; }
.status-select-wrap::before { content: ""; position: absolute; z-index: 1; top: 50%; left: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--status-color, #777); transform: translateY(-50%); pointer-events: none; }
.status-select-wrap::after { content: ""; position: absolute; top: 50%; right: 17px; width: 6px; height: 6px; border-right: 1.5px solid #777; border-bottom: 1.5px solid #777; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.section-label { margin: 0 0 12px; color: #949893; font-size: 8px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.body-copy { color: #4e544f; font-size: 11px; line-height: 1.7; }
.body-copy p { margin: 0 0 13px; }
.body-copy p:last-child { margin-bottom: 0; padding: 14px 16px; border-left: 2px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-soft); color: #484d48; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.tag { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: #737873; font-size: 8px; font-weight: 600; }
.comments-block { margin-top: 30px; }
.comment-placeholder { display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: #999d97; font-size: 9px; }
.comment-placeholder .avatar { width: 25px; height: 25px; border: 0; }

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: #242825;
  color: #fff;
  box-shadow: 0 8px 30px rgba(24,28,25,.2);
  font-size: 10px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast svg { width: 16px; fill: none; stroke: #7bd2a7; stroke-width: 2.2; }

@keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1040px) {
  .content-wrap { width: calc(100% - 42px); }
  .list-head, .task-row { grid-template-columns: minmax(250px, 1fr) 118px 118px 72px 20px; column-gap: 12px; }
}

@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .mobile-header { display: flex; height: 66px; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(245,244,239,.95); }
  .mobile-header .brand { padding: 0; font-size: 18px; }
  .mobile-header .brand-mark { width: 27px; height: 27px; }
  .content-wrap { width: calc(100% - 32px); padding-top: 28px; }
  .list-head, .task-row { grid-template-columns: minmax(220px, 1fr) 120px 100px 28px; }
  .list-head span:nth-child(3), .task-row .assignee { display: none; }
}

@media (max-width: 600px) {
  .content-wrap { width: calc(100% - 28px); padding: 25px 0 18px; }
  .page-header { align-items: center; margin-bottom: 22px; }
  .eyebrow { font-size: 9px; }
  h1 { font-size: 31px; }
  .page-intro { font-size: 11px; }
  .team-stack .avatar:nth-child(n+4) { display: none; }
  .team-stack .team-more { margin-left: -7px; }
  .overview { grid-template-columns: 1fr; gap: 15px; padding: 16px 18px; }
  .progress-wrap { padding-left: 45px; }
  .panel-heading { display: block; padding: 17px 16px 14px; }
  .panel-heading > div:first-child { margin-bottom: 14px; }
  .controls { width: 100%; }
  .search-field { flex: 1; }
  .search-field input { width: 100%; }
  .search-field kbd { display: none; }
  .select-field select { width: 127px; }
  .list-head { display: none; }
  .task-row { grid-template-columns: 1fr auto; min-height: 91px; padding: 14px 15px; column-gap: 11px; }
  .task-main { align-self: start; }
  .task-title-wrap { padding-right: 6px; }
  .open-task { overflow: visible; font-size: 11px; line-height: 1.4; text-overflow: unset; white-space: normal; }
  .status-pill { align-self: start; grid-column: 2; grid-row: 1; margin-top: 1px; }
  .assignee, .due-date { display: none !important; }
  .row-arrow { display: none; }
  .task-project { margin-top: 6px; }
  .page-footer { padding-bottom: 3px; }
  .detail-dialog { width: 100vw; }
  .detail-topbar { min-height: 64px; padding: 0 18px; }
  .detail-scroll { padding: 27px 21px 40px; }
  .detail-scroll h2 { font-size: 25px; }
  .toast { right: 14px; bottom: 14px; left: 14px; justify-content: center; }
}

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