:root {
  color-scheme: light;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #231b35;
  background: #faf9fc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --page: #faf9fc;
  --surface: #fff;
  --text: #231b35;
  --muted: #625a70;
  --subtle: #756d82;
  --line: #eae6f0;
  --primary: #6939de;
  --primary-dark: #572aca;
  --primary-soft: #f0eaff;
  --sidebar: #1e182b;
  --sidebar-muted: #b6aec6;
  --sidebar-line: #3c324b;
  --radius: 12px;
  --sidebar-width: 236px;
  --shadow: 0 2px 3px #26163a06, 0 8px 24px #26163a05;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; min-height: 100dvh; margin: 0; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid #ab8bfa; outline-offset: 3px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #9668f5; outline-offset: 1px; }
a { color: var(--primary-dark); }
h1, h2, h3, p { margin: 0; }
svg { display: block; width: 18px; height: 18px; flex: none; }
::selection { background: #e9dcff; color: #28174c; }

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

.app-shell { min-height: 100dvh; }
.app-main { margin-left: var(--sidebar-width); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow: auto;
  padding: 24px 16px 14px;
  color: #f8f5fd;
  background: radial-gradient(ellipse at 22% 1%, #302244 0, #21192e 42%, #1c1628 100%);
  border-right: 1px solid #291f37;
  scrollbar-color: #574769 transparent;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 7px 28px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
}
img.brand-mark, .brand-mark > img { display: block; object-fit: contain; }
.brand-mark > img { width: 100%; height: 100%; }
.brand-title, .brand-subtitle { display: block; }
.brand-title { font-size: 19px; font-weight: 780; line-height: 1.16; letter-spacing: -.035em; }
.brand-subtitle { margin-top: 1px; color: var(--sidebar-muted); font-size: 11px; }
.workspace-switch {
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  color: #f6f1fb;
  background: #ffffff09;
  border: 1px solid #ffffff1c;
  border-radius: 10px;
  text-align: left;
}
button.workspace-switch:hover { background: #ffffff13; }
.workspace-switch > :nth-child(2) { flex: 1; min-width: 0; }
.workspace-switch > svg:last-child { width: 15px; height: 15px; color: #b4a7c7; }
.workspace-switch strong { display: block; font-size: 12px; font-weight: 650; }
.workspace-switch small { display: block; color: var(--sidebar-muted); font-size: 10.5px; }
.workspace-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 7px;
  color: #dacaff;
  background: #7955b647;
  font-size: 12px;
  font-weight: 750;
}
.workspace-icon svg { width: 16px; height: 16px; }
.sidebar-section { margin-top: 30px; }
.sidebar-heading {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin: 0 9px 7px;
  color: #b8accb;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .105em;
  text-transform: uppercase;
}
.sidebar-heading button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 5px;
}
.sidebar-heading button:hover { color: #fff; background: #ffffff17; }
.sidebar-heading button svg { width: 15px; height: 15px; }
.nav-button {
  display: flex;
  width: 100%;
  min-height: 39px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #ded5eb;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 520;
  text-align: left;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.nav-button + .nav-button { margin-top: 2px; }
.nav-button > span:not(.nav-count):not(.nav-dot):not(.nav-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-button:hover { color: #fff; background: #ffffff12; }
.nav-button.is-active { color: #fff; background: #7951b943; border-color: #af87ff2d; font-weight: 660; }
.nav-icon { display: grid; width: 18px; flex: 0 0 18px; place-items: center; color: #aa9bbc; }
.nav-button.is-active .nav-icon, .nav-button:hover .nav-icon { color: #dfceff; }
.nav-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  margin: 0 4.5px;
  border-radius: 50%;
  background: var(--project-color, #9671f5);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--project-color, #9671f5) 19%, transparent);
}
.nav-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  margin-left: auto;
  padding: 0 4px;
  border-radius: 5px;
  color: #c7bbd8;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.nav-button.is-active .nav-count { color: #f1eaff; background: #ad8cf338; }
.sidebar-bottom { margin-top: auto; padding-top: 27px; }
.sidebar-bottom > .nav-button:last-of-type { margin-bottom: 12px; }
.profile {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 9px;
  padding: 10px 4px 0;
  border-top: 1px solid var(--sidebar-line);
}
.profile .avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid #fff2;
  border-radius: 50%;
  color: #f5eaff;
  background: #664899;
  font-size: 12px;
  font-weight: 700;
}
.profile-text { flex: 1; min-width: 0; }
.profile-text strong, .profile-text span, .profile-text small { display: block; }
.profile-text strong { color: #f8f4ff; font-size: 12px; font-weight: 650; }
.profile-text span, .profile-text small { margin-top: 1px; color: var(--sidebar-muted); font-size: 10.5px; }
.profile > svg, .profile-lock svg { width: 15px; height: 15px; color: var(--sidebar-muted); }
.sidebar-overlay, .mobile-menu { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  min-height: 63px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 34px;
  background: #ffffffee;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.breadcrumbs, .topbar-actions { display: flex; align-items: center; gap: 9px; }
.breadcrumbs { min-width: 0; color: var(--subtle); font-size: 12px; white-space: nowrap; }
.breadcrumbs > span:last-child, .breadcrumbs > strong:last-child {
  overflow: hidden;
  color: var(--text);
  font-weight: 650;
  text-overflow: ellipsis;
}
.breadcrumbs svg { width: 13px; height: 13px; color: #8a8196; }
.search-trigger {
  display: flex;
  width: clamp(145px, 18vw, 236px);
  min-height: 35px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  color: var(--muted);
  background: #faf8fd;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  font-size: 12px;
}
.search-trigger:hover { color: var(--primary-dark); border-color: #d8caef; }
.search-trigger svg { width: 15px; height: 15px; color: #756884; }
.search-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-button[data-state="offline"], .sync-button[data-state="conflict"] { color: #a15523; }
.sync-button[data-state="saved"] { color: #297859; }
.search-trigger kbd {
  margin-left: auto;
  padding: 1px 4px;
  color: var(--subtle);
  background: #fff;
  border: 1px solid #e9e3ee;
  border-radius: 4px;
  font-family: inherit;
  font-size: 10px;
  white-space: nowrap;
}
.icon-button, .card-more, .column-add {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}
.icon-button { width: 34px; height: 34px; }
.icon-button:hover, .card-more:hover, .column-add:hover { color: var(--primary-dark); background: var(--primary-soft); }
.icon-button.mobile-menu { display: none; }
.content { width: min(100%, 1650px); margin: 0 auto; padding: 34px 34px 40px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 25px; }
.page-date { margin-bottom: 7px; color: #736584; font-size: 11px; font-weight: 660; }
.page-date::first-letter { text-transform: uppercase; }
.page-actions { display: flex; flex: none; align-items: center; gap: 7px; }
.page-heading h1 {
  color: #261d36;
  font-size: clamp(31px, 3.15vw, 43px);
  font-weight: 790;
  line-height: 1.07;
  letter-spacing: -.054em;
  overflow-wrap: anywhere;
}
.page-heading p { margin-top: 10px; color: var(--muted); font-size: 14px; }
.primary-button, .secondary-button, .danger-button {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  letter-spacing: -.008em;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
  transition: color .15s, background-color .15s, border-color .15s;
}
.primary-button { min-height: 40px; padding-inline: 15px; color: #fff; background: var(--primary); box-shadow: 0 3px 8px #5728c336, inset 0 1px 0 #ffffff16; }
.primary-button:hover { background: var(--primary-dark); }
.secondary-button { color: #514562; background: #fff; border-color: #e7e0ee; }
.secondary-button:hover, .secondary-button.has-filter, .secondary-button[aria-expanded="true"] { color: var(--primary-dark); background: #f9f5ff; border-color: #d9caed; }
.danger-button { color: #a72444; background: #fff3f5; border-color: #f9d9e2; }
.danger-button:hover { color: #8e1f38; background: #ffe5eb; }
.danger-button.danger-solid { margin-right: 0; color: #fff; background: #ad2a49; border-color: #ad2a49; }
.danger-button.danger-solid:hover { background: #8e1f38; border-color: #8e1f38; }
.primary-button svg, .secondary-button svg, .danger-button svg { width: 16px; height: 16px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric-card {
  display: flex;
  min-width: 0;
  min-height: 77px;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow);
  text-align: left;
}
button.metric-card:hover { border-color: #cdbcdf; }
.metric-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 9px; }
.metric-icon svg { width: 17px; height: 17px; }
.metric-icon.purple { color: #6739cb; background: #f0e9ff; }
.metric-icon.blue { color: #265eb6; background: #e9f2ff; }
.metric-icon.green { color: #227556; background: #e8f7ef; }
.metric-icon.orange { color: #a95317; background: #fff0e0; }
.metric-info { display: flex; min-width: 0; flex-direction: column; }
.metric-info strong { color: #2d223b; font-size: 21px; line-height: 1.1; font-weight: 780; letter-spacing: -.046em; font-variant-numeric: tabular-nums; }
.metric-info span { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 520; }

.work-area { min-width: 0; margin-top: 22px; }
.viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e4deed;
}
.tabs { display: flex; align-items: center; gap: 19px; }
.tab {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.tab:first-child { margin-left: -3px; }
.tab svg { width: 16px; height: 16px; }
.tab:hover, .tab.is-active { color: var(--primary-dark); }
.tab.is-active { font-weight: 720; }
.tab.is-active::after {
  position: absolute;
  inset: auto 2px -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--primary);
  content: "";
}
.toolbar {
  position: relative;
  display: flex;
  min-height: 75px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}
.toolbar-left h2 { font-size: 17px; font-weight: 750; letter-spacing: -.032em; }
.toolbar-left p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.toolbar-actions { display: flex; align-items: center; gap: 7px; }
.toolbar-actions .secondary-button { min-height: 34px; }
.filter-count { min-width: 15px; padding: 1px 3px; border-radius: 4px; color: var(--primary-dark); background: var(--primary-soft); text-align: center; font-size: 10px; }
#tasksView:focus-visible { outline: 2px solid #ab8bfa; outline-offset: 4px; border-radius: 9px; }

[data-status="todo"] { --status: #6d6280; --status-dot: #887798; --status-line: #e9e2ef; --status-fill: #f1edf6; --status-pane: #f6f3f8; }
[data-status="doing"] { --status: #285cad; --status-dot: #5e8ee9; --status-line: #dde8f9; --status-fill: #e9f0ff; --status-pane: #f0f5fe; }
[data-status="review"] { --status: #925612; --status-dot: #df9f3e; --status-line: #f1e5cc; --status-fill: #faefd9; --status-pane: #fcf6e9; }
[data-status="done"] { --status: #21694e; --status-dot: #4ca480; --status-line: #d9eadf; --status-fill: #e6f4eb; --status-pane: #eef7f1; }
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}
.board-column {
  min-width: 0;
  min-height: 318px;
  padding: 9px;
  background: var(--status-pane, #f6f3f8);
  border: 1px solid var(--status-line, #e9e2ef);
  border-radius: 11px;
  transition: background-color .15s, border-color .15s;
}
.board-column.is-drop-target {
  background: var(--status-fill, #f1edf6);
  border-color: var(--status-dot, #887798);
}
.column-header {
  display: flex;
  min-height: 31px;
  align-items: center;
  gap: 6px;
  padding: 0 1px 5px 2px;
}
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--status-dot, #887798); }
.column-title {
  min-width: 0;
  overflow: hidden;
  color: var(--status, #6d6280);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 730;
}
.column-count {
  display: grid;
  min-width: 17px;
  height: 18px;
  place-items: center;
  padding: 0 3px;
  border-radius: 5px;
  color: var(--status, #6d6280);
  background: var(--status-fill, #f1edf6);
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.column-add { width: 24px; height: 24px; margin-left: auto; color: var(--status, #6d6280); }
.column-add svg { width: 15px; height: 15px; }
.column-add:hover { color: var(--status, #6d6280); background: var(--status-fill, #f1edf6); }
.column-cards { display: grid; align-content: start; gap: 8px; }
.task-card {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 97px;
  flex-direction: column;
  align-items: stretch;
  padding: 9px 10px 10px;
  border: 1px solid #e8e3ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 3px #2d1b4210;
  text-align: left;
  cursor: grab;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.task-card:hover, .task-card:focus-within { border-color: #cabbde; box-shadow: 0 3px 10px #35235017; }
.task-card.is-dragging { opacity: .5; cursor: grabbing; }
.task-top { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 4px; }
.task-project {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 2px 6px;
  color: var(--project-text, #674791);
  background: var(--project-bg, #f3edf9);
  border-radius: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 650;
}
.task-project .status-dot, .task-project .nav-dot {
  width: 6px;
  height: 6px;
  flex-basis: 6px;
  margin: 0;
  background: var(--project-color, #9365d1);
  box-shadow: none;
}
.task-project span:last-child { overflow: hidden; text-overflow: ellipsis; }
.card-more { width: 23px; height: 23px; margin: -3px -3px -3px 0; }
.card-more svg { width: 15px; height: 15px; }
.task-title {
  padding: 0;
  border: 0;
  color: #2a2139;
  background: none;
  text-align: left;
  font-size: 13px;
  font-weight: 690;
  line-height: 1.38;
  overflow-wrap: anywhere;
}
.task-card .task-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 8px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
button.task-title:hover { color: var(--primary-dark); }
.task-parent {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 2px 5px;
  color: var(--muted);
  background: #f5f1f8;
  border: 0;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
}
.task-card .task-parent { margin: -3px 0 8px; }
.task-parent:hover { color: var(--primary-dark); background: var(--primary-soft); }
.task-parent svg { width: 11px; height: 11px; }
.task-parent span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: auto;
}
.task-date, .task-priority {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 10.75px;
  font-weight: 530;
}
.task-date svg, .task-priority svg { width: 12px; height: 12px; }
.task-date.is-late, .task-date.is-overdue, .task-date.overdue { color: #a32b46; }
.task-priority[data-priority="urgent"], .task-priority.urgent { color: #ad2a49; }
.task-priority[data-priority="high"], .task-priority.high { color: #a2561d; }
.task-priority[data-priority="normal"], .task-priority.normal { color: #3f64ab; }
.task-priority[data-priority="low"], .task-priority.low { color: #6d6977; }
.column-create {
  display: flex;
  width: 100%;
  min-height: 29px;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--status, #6d6280);
  background: transparent;
  font-size: 11px;
  font-weight: 620;
  text-align: left;
}
.column-create svg { width: 13px; height: 13px; }
.column-create:hover { border-color: var(--status-line, #e9e2ef); background: var(--status-fill, #f1edf6); }
.column-empty {
  display: grid;
  min-height: 65px;
  place-items: center;
  padding: 8px;
  border: 1px dashed var(--status-line, #e9e2ef);
  border-radius: 8px;
  color: var(--status, #6d6280);
  text-align: center;
  font-size: 11px;
}

.project-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--project-color, #9365d1);
}
.task-project:has(.project-dot) {
  color: #514063;
  background: color-mix(in srgb, var(--project-color, #9365d1) 13%, #fff);
}
.task-subtasks {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10.75px;
  white-space: nowrap;
}
.task-subtasks svg { width: 12px; height: 12px; }

.person-avatar {
  --avatar-fill: #eee6fc;
  --avatar-ink: #5a378b;
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  background: var(--avatar-fill);
  border: 1px solid color-mix(in srgb, var(--avatar-ink) 12%, var(--avatar-fill));
  border-radius: 50%;
  color: var(--avatar-ink);
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}
.person-avatar[data-tone="1"] { --avatar-fill: #dff3eb; --avatar-ink: #205b48; }
.person-avatar[data-tone="2"] { --avatar-fill: #fff0d9; --avatar-ink: #794913; }
.person-avatar[data-tone="3"] { --avatar-fill: #e3eeff; --avatar-ink: #2c5089; }
.person-avatar[data-tone="4"] { --avatar-fill: #fae4f0; --avatar-ink: #85375f; }
.person-avatar[data-tone="5"] { --avatar-fill: #fbe7e1; --avatar-ink: #884635; }
.person-avatar.person-avatar-more { --avatar-fill: #eeebf3; --avatar-ink: #5b5169; }
.task-assignees { display: inline-flex; align-items: center; flex: none; padding-left: 2px; }
.task-assignees .person-avatar { width: 22px; height: 22px; flex-basis: 22px; border: 1px solid #fff; font-size: 8px; }
.task-assignees .person-avatar + .person-avatar { margin-left: -5px; }
.task-assignees-empty { color: var(--subtle); }

.list-view, .calendar-view {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow);
}
.list-view { overscroll-behavior-inline: contain; }
.task-table { width: 100%; min-width: 920px; border-collapse: collapse; text-align: left; }
.task-table th, .task-table td { padding: 10px 11px; }
.task-table th {
  color: #615570;
  background: #f7f4fa;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.task-table td { border-bottom: 1px solid #f0ecf4; font-size: 12px; vertical-align: middle; }
.task-table tr:last-child td { border-bottom: 0; }
.task-table tr[data-editable="false"] { background: #fcfbfd; }
.task-table tbody tr:hover { background: #fcfaff; }
.task-table .task-project { max-width: 155px; }
.table-task { min-width: 244px; max-width: clamp(244px, 34vw, 500px); }
.task-tree { display: flex; min-width: 0; align-items: center; gap: 5px; padding-left: calc(var(--task-depth, 0) * 13px); }
.task-tree-label { display: flex; min-width: 0; align-items: flex-start; flex-direction: column; gap: 4px; }
.task-tree-label .task-title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-tree > .task-subtasks { flex: 0 0 auto; }
.task-disclosure, .task-disclosure-spacer { width: 21px; height: 21px; flex: 0 0 21px; }
.task-disclosure {
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 4px;
}
.task-disclosure:hover { color: var(--primary-dark); background: var(--primary-soft); }
.task-disclosure svg { width: 14px; height: 14px; transition: transform .15s ease; }
.task-disclosure[aria-expanded="true"] svg { transform: rotate(90deg); }
.task-row-drag, .task-row-drag-spacer {
  width: 19px;
  height: 24px;
  flex: 0 0 19px;
}
.task-row-drag {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--subtle);
  background: transparent;
  cursor: grab;
}
.task-row-drag svg { width: 15px; height: 15px; }
.task-row-drag:hover, .task-row-drag:focus-visible { color: var(--primary-dark); background: var(--primary-soft); }
.task-row-drag:active, .is-list-dragging .task-row-drag { cursor: grabbing; }
.list-root-drop {
  position: sticky;
  left: 0;
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  margin: 8px;
  padding: 5px 10px;
  border: 1px dashed #dad0e7;
  border-radius: 7px;
  color: var(--muted);
  background: #fcfaff;
  font-size: 11px;
  font-weight: 610;
}
.list-root-drop svg { width: 14px; height: 14px; }
.list-view:not(:has([data-task-row][data-editable="true"])) .list-root-drop { display: none; }
.is-list-drag-active .list-root-drop { color: var(--primary-dark); border-color: #b894f2; }
.list-root-drop.is-list-drop-target {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--primary);
  border-style: solid;
}
.task-table tr.is-list-dragging { opacity: .54; }
.task-table tr.is-list-drop-target td {
  background: var(--primary-soft);
  box-shadow: inset 0 2px #9971ed, inset 0 -2px #9971ed;
}
.task-table tr.is-list-drop-target td:first-child {
  box-shadow: inset 2px 0 #9971ed, inset 0 2px #9971ed, inset 0 -2px #9971ed;
}
.task-table tr.is-list-drop-target td:last-child {
  box-shadow: inset -2px 0 #9971ed, inset 0 2px #9971ed, inset 0 -2px #9971ed;
}
.task-table tr.is-list-drop-invalid td { background: #fff3f5; }
.list-root-drop.is-list-drop-invalid { color: #a72444; background: #fff3f5; border-color: #da98a8; }
.table-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  color: var(--status);
  background: var(--status-fill);
  border: 0;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 620;
}
.table-status .status-dot { width: 6px; height: 6px; flex-basis: 6px; }
.task-table .table-empty { padding: 0; }
.task-table .task-date, .task-table .task-priority { font-size: 11.5px; }
.task-table .inline-task-value {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}
.task-table .inline-task-value.task-title {
  display: block;
  margin-left: -4px;
}
.task-table .inline-task-value:hover {
  background: #f9f5ff;
  border-color: #ded1f2;
}
.task-table .inline-task-value:focus-visible,
.task-table :is(.inline-edit-button, .inline-assignee-remove, .task-row-drag):focus-visible {
  outline-offset: 1px;
}
.task-table td:has([data-inline-editor]) { background: #fcf9ff; }
.task-tree-label:has([data-inline-editor]) { flex: 1; }
.inline-edit-form {
  display: grid;
  min-width: 0;
  width: 100%;
  gap: 4px;
}
.inline-edit-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 31px;
  padding: 4px 6px;
  border: 1px solid #d9c8ee;
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  font-size: 12px;
}
.inline-edit-input:focus { border-color: #9668f5; }
.inline-edit-input:disabled { background: #f3eef7; }
.inline-edit-actions, .table-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.inline-edit-actions { flex-wrap: wrap; justify-content: flex-end; }
.inline-edit-button, .inline-assignee-remove {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border-radius: 5px;
}
.inline-edit-button {
  width: 24px;
  height: 24px;
  border: 1px solid #e6deee;
  color: var(--muted);
  background: var(--surface);
}
.inline-edit-button svg { width: 14px; height: 14px; }
.inline-edit-button.inline-edit-accept { color: #fff; background: var(--primary); border-color: var(--primary); }
.inline-edit-button.inline-edit-clear { width: auto; padding-inline: 5px; font-size: 10.5px; font-weight: 620; }
.inline-edit-accept:hover:enabled { background: var(--primary-dark); border-color: var(--primary-dark); }
:is(.inline-edit-cancel, .inline-edit-clear):hover:enabled { color: var(--primary-dark); background: var(--primary-soft); border-color: #decef0; }
.inline-edit-error { display: block; color: #9b2642; font-size: 10.5px; overflow-wrap: anywhere; }
.task-table td > .inline-edit-error { margin-top: 4px; }
.inline-edit-error:empty { display: none; }
.inline-assignees {
  display: flex;
  max-width: 188px;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.inline-assignee {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 2px;
  border: 1px solid #eae2f2;
  border-radius: 999px;
  background: #fbf8fd;
}
.inline-assignee .person-avatar { width: 21px; height: 21px; flex-basis: 21px; }
.inline-assignee-remove {
  width: 19px;
  height: 19px;
  border: 0;
  color: var(--muted);
  background: transparent;
}
.inline-assignee-remove svg { width: 12px; height: 12px; }
.inline-assignee-remove:hover:enabled { color: #a72444; background: #fff0f4; }
.task-table .inline-assignee-add {
  min-width: 28px;
  justify-content: center;
  border-color: #e8def1;
  color: var(--primary-dark);
  background: #faf6ff;
}
.inline-assignee-add svg { width: 14px; height: 14px; }
.inline-assignees .inline-edit-assignees { flex: 1 0 100%; }
.inline-assignee-options {
  display: grid;
  max-height: 148px;
  gap: 3px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px;
}
.inline-assignee-options > span { padding: 3px; color: var(--muted); font-size: 11px; }
.inline-assignee-option {
  display: flex;
  min-width: 0;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
  border-radius: 5px;
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
}
.inline-assignee-option:hover, .inline-assignee-option:has(:checked) { background: var(--primary-soft); }
.inline-assignee-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-row-actions { justify-content: flex-end; white-space: nowrap; }
.table-row-actions .icon-button { width: 27px; height: 27px; }
.table-row-actions .icon-button svg { width: 15px; height: 15px; }
.table-row-actions .card-more { margin: 0; }

.calendar-head {
  position: sticky;
  left: 0;
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 16px;
}
.calendar-head h3 { font-size: 17px; font-weight: 730; letter-spacing: -.035em; }
.calendar-actions { display: flex; align-items: center; gap: 4px; }
.calendar-actions .icon-button { width: 30px; height: 30px; }
.calendar-actions .secondary-button { min-height: 30px; padding: 4px 9px; }
.calendar-caption { padding: 8px 16px; color: var(--muted); font-size: 11px; }
.calendar-grid { display: grid; min-width: 560px; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.calendar-weekday {
  padding: 7px 8px;
  color: var(--muted);
  background: #faf8fc;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
}
.calendar-cell { min-width: 0; min-height: 95px; padding: 6px; border-right: 1px solid #efeaf4; border-bottom: 1px solid #efeaf4; }
.calendar-cell:nth-child(7n) { border-right: 0; }
.calendar-cell:nth-last-child(-n+7) { border-bottom: 0; }
.calendar-cell.is-outside { color: #888090; background: #faf8fc; }
.calendar-cell.is-today { background: #f9f5ff; }
.calendar-day { display: flex; min-height: 24px; align-items: center; justify-content: space-between; }
.calendar-date-number { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.is-today .calendar-date-number { color: #fff; background: var(--primary); }
.calendar-add { width: 22px; height: 22px; opacity: .55; }
.calendar-add svg { width: 13px; height: 13px; }
.calendar-cell:hover .calendar-add, .calendar-add:focus-visible { opacity: 1; }
.calendar-items { display: grid; gap: 4px; margin-top: 3px; }
.calendar-task {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 3px 5px;
  border: 0;
  border-left: 2px solid var(--status-dot, #887798);
  border-radius: 4px;
  color: var(--status, #6d6280);
  background: var(--status-fill, #f1edf6);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 630;
}
.calendar-task:hover { color: var(--primary-dark); }
.calendar-task .status-dot { width: 5px; height: 5px; flex-basis: 5px; }
.calendar-task span:last-child { overflow: hidden; text-overflow: ellipsis; }

.dialog {
  width: min(530px, calc(100vw - 28px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  margin: auto;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #e5dcee;
  border-radius: 15px;
  box-shadow: 0 22px 70px #22112d4f;
}
.dialog::backdrop { background: #241a36a3; backdrop-filter: blur(2px); }
.dialog-head {
  display: flex;
  min-height: 65px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2, .dialog-head h3, .dialog-title { color: #2a1e3d; font-size: 20px; font-weight: 760; letter-spacing: -.034em; }
.dialog-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.dialog-close { width: 31px; height: 31px; }
.dialog-body { display: grid; gap: 14px; padding: 17px 20px; }
.dialog-body > p { color: var(--muted); }
.dialog-footer {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
}
.dialog-footer .danger-button { margin-right: auto; }
.dialog-footer-spacer { flex: 1; }
.dialog[data-kind="task"] { scroll-padding-block: 66px; }
.dialog[data-kind="task"] :is(.dialog-head, .dialog-footer) { position: sticky; z-index: 1; background: var(--surface); }
.dialog[data-kind="task"] .dialog-head { top: 0; }
.dialog[data-kind="task"] .dialog-footer { bottom: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 12px; }
.field { display: grid; min-width: 0; align-content: start; gap: 5px; color: #514460; font-size: 12px; font-weight: 640; }
.field-wide { grid-column: 1 / -1; }
.field small, .field-hint { color: var(--muted); font-weight: 400; }
.form-input, .field > input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), .field > textarea, .field > select {
  width: 100%;
  min-width: 0;
  min-height: 37px;
  padding: 7px 9px;
  border: 1px solid #e5dcec;
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font-size: 13px;
  font-weight: 430;
}
.form-input::placeholder, .field > input::placeholder, .field textarea::placeholder { color: #82768c; opacity: 1; }
.form-input:disabled { color: var(--muted); background: #f7f4fa; }
textarea.form-input, .field > textarea { min-height: 75px; resize: vertical; }
input[type="checkbox"] { width: 15px; height: 15px; flex: 0 0 auto; margin: 0; accent-color: var(--primary); }
.form-error { color: #92203a; font-size: 12px; }
.custom-fields-section, .custom-fields-list {
  display: grid;
  min-width: 0;
  gap: 8px;
}
.custom-fields-list:empty { display: none; }
.custom-fields-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.custom-fields-head h3 { color: #514460; font-size: 13px; font-weight: 700; }
.custom-field-card {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e9e0f1;
  border-radius: 8px;
  background: #fcfaff;
}
.custom-field-card-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
}
.custom-field-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 5px;
  color: #613ca6;
  background: #f0e8fe;
  font-size: 10.5px;
  font-weight: 650;
}
.custom-field-type svg, .custom-field-link svg { width: 13px; height: 13px; }
.custom-field-card .custom-field-remove {
  width: 27px;
  height: 27px;
}
.custom-field-remove svg { width: 15px; height: 15px; }
.custom-field-remove:hover:enabled { color: #a72444; background: #fff0f4; }
.custom-field-controls, .custom-fields-add {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: start;
  gap: 8px;
}
.custom-field-controls:has(textarea) { grid-template-columns: minmax(0, 1fr); }
.custom-field-value { display: grid; min-width: 0; gap: 5px; }
.custom-field-check {
  display: flex;
  min-height: 37px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.custom-field-link {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  align-items: flex-start;
  gap: 4px;
  color: var(--primary-dark);
  overflow-wrap: anywhere;
}
.custom-field-link svg { margin-top: 2px; }
.custom-field-link span { min-width: 0; }
.custom-field-value .custom-field-link { width: fit-content; font-size: 11px; }
.custom-fields-add { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.custom-fields-add .secondary-button { min-height: 37px; }
.custom-fields-limit { font-size: 11.5px; }
.custom-fields-readonly {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 202px), 1fr));
  align-items: start;
  gap: 8px;
  margin: 0;
}
.custom-fields-readonly [data-custom-field-type="textarea"] { grid-column: 1 / -1; }
.custom-field-name {
  color: #514460;
  font-size: 11px;
  font-weight: 660;
  overflow-wrap: anywhere;
}
.custom-field-display {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.task-ancestors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 0 0 4px;
  color: var(--subtle);
  font-size: 11px;
}
.task-ancestors svg { width: 12px; height: 12px; }
.task-ancestors > span { display: inline-flex; min-width: 0; max-width: 100%; align-items: center; gap: 4px; }
.task-ancestors button, .task-ancestors > span > span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border: 0;
  border-radius: 4px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: 640;
}
.task-ancestors button:hover { background: #e9dfff; }
.assignees-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.assignees-field legend, .children-heading strong {
  padding: 0;
  color: #514460;
  font-size: 12px;
  font-weight: 660;
}
.assignees-field legend { margin-bottom: 6px; }
.assignee-options {
  display: grid;
  max-height: 142px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  overflow: auto;
  padding: 2px;
}
.assignee-option {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.assignee-option:hover, .assignee-option:has(:checked) { background: #faf6ff; border-color: #ded1f2; }
.assignee-option:has(:focus-visible) { outline: 2px solid #9668f5; outline-offset: -1px; }
.assignee-option .person-avatar { width: 21px; height: 21px; flex-basis: 21px; font-size: 8px; }
.assignee-option > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-people-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 4px 2px;
  border: 0;
  border-radius: 4px;
  color: var(--primary-dark);
  background: transparent;
  font-size: 11px;
  font-weight: 640;
  text-align: left;
}
.manage-people-link:hover { text-decoration: underline; }
.manage-people-link svg { width: 12px; height: 12px; }
.children-section { display: grid; gap: 6px; }
.children-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.children-heading .secondary-button, .hierarchy-actions .secondary-button { min-height: 30px; padding: 4px 8px; font-size: 11px; }
.children-heading .secondary-button svg, .hierarchy-actions .secondary-button svg { width: 13px; height: 13px; }
.children-list, .people-list { display: grid; max-height: 250px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.child-row, .person-row {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #fff;
}
.child-row + .child-row, .person-row + .person-row { border-top: 1px solid var(--line); }
.child-row:hover, .person-row:hover { background: #fcfaff; }
.child-title {
  min-width: 0;
  overflow: hidden;
  padding: 3px 0;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
}
.child-title:hover { color: var(--primary-dark); }
.child-row .table-status { margin-left: auto; flex: 0 0 auto; }
.hierarchy-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.people-list { max-height: min(48dvh, 340px); }
.person-row { min-height: 47px; }
.person-row > strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 640;
}
.person-row .icon-button { width: 27px; height: 27px; }
.person-row .icon-button svg { width: 14px; height: 14px; }
.person-row .icon-button[data-action="delete-person"]:hover { color: #a72444; background: #fff0f4; }
.person-editor { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; }
.person-editor .field, .person-editor > .form-input { flex: 1 1 150px; }
.person-editor .primary-button, .person-editor .secondary-button { min-height: 37px; }
.assignees-empty, .people-empty { color: var(--muted); font-size: 11.5px; }
.assignees-empty { grid-column: 1 / -1; }
.color-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.color-field legend { margin-bottom: 5px; padding: 0; color: #514460; font-size: 12px; font-weight: 640; }
.color-options { display: flex; flex-wrap: wrap; gap: 6px; padding: 3px 1px; }
.color-option { position: relative; display: inline-grid; cursor: pointer; }
.color-option input { position: absolute; opacity: 0; }
.color-option span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--project-color, #7955b6);
  cursor: pointer;
}
.color-option input:checked + span { outline: 2px solid var(--project-color, #7955b6); }
.color-option input:focus-visible + span { outline: 2px solid #231b35; outline-offset: 2px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  color: var(--primary-dark);
  background: #faf7fe;
  border: 1px solid #e4d9ef;
  border-radius: 8px;
}
.search-box:focus-within { border-color: #a588e3; box-shadow: 0 0 0 2px #e9dfff; }
.search-box .form-input, .search-box input {
  width: 100%;
  padding: 8px 0;
  border: 0;
  background: transparent;
  outline: 0;
}
.search-results { display: grid; max-height: 52dvh; overflow: auto; gap: 4px; }
.search-result {
  display: flex;
  width: 100%;
  min-height: 41px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: none;
  text-align: left;
  font-size: 12px;
}
.search-result:hover { background: var(--primary-soft); }
.search-result strong { display: block; font-weight: 650; overflow-wrap: anywhere; }
.search-result small { color: var(--muted); }
.search-result svg, .backup-option > svg { margin-left: auto; color: var(--subtle); }
.search-empty { padding: 10px 2px; color: var(--muted); font-size: 12px; }
.backup-actions { display: grid; gap: 7px; }
.backup-option {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfaff;
  text-align: left;
}
.backup-option:hover { background: var(--primary-soft); }
.backup-option strong, .backup-option small { display: block; }
.backup-option strong { font-size: 12px; font-weight: 700; }
.backup-option small { color: var(--muted); font-size: 11px; }
.backup-option-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 8px; color: var(--primary-dark); background: var(--primary-soft); }
.popover, .filter-popover, .sort-popover, .task-menu, .card-menu {
  position: absolute;
  z-index: 5;
  min-width: 173px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 10px 25px #29184121;
}
.filter-popover, .sort-popover { top: calc(100% - 10px); right: 0; }
.task-menu { top: 29px; right: 7px; }
.card-menu { position: fixed; z-index: 12; max-height: calc(100dvh - 16px); overflow-y: auto; }
.popover button, .filter-popover button, .sort-popover button, .task-menu button, .card-menu button {
  display: flex;
  width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: none;
  text-align: left;
  font-size: 12px;
}
.popover button:hover, .filter-popover button:hover, .sort-popover button:hover, .task-menu button:hover, .card-menu button:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
}
.popover .field, .filter-popover .field, .sort-popover .field { margin: 5px; }
.card-menu-label { padding: 8px 8px 2px; color: var(--subtle); border-top: 1px solid var(--line); font-size: 10px; font-weight: 700; }
.card-menu .card-menu-danger { color: #a72444; }
.card-menu .card-menu-danger:hover { color: #8e1f38; background: #fff0f4; }
.empty-state { padding: 32px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.empty-state h3, .empty-state strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 15px; }
.empty-state > svg { width: 22px; height: 22px; margin: 0 auto 8px; color: #8c63d4; }
.empty-state > .secondary-button { margin-top: 6px; }
.toast {
  position: fixed;
  z-index: 20;
  right: 21px;
  bottom: 21px;
  display: flex;
  width: max-content;
  max-width: calc(100vw - 42px);
  min-height: 41px;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid #ffffff2b;
  border-radius: 9px;
  color: #fff;
  background: #332549;
  box-shadow: 0 8px 23px #2a184344;
  font-size: 12px;
  font-weight: 620;
}
.toast:empty { display: none; }
.toast > svg, .toast-icon svg { width: 16px; height: 16px; color: #bfa4fc; }

@media (min-width: 1450px) {
  .content { padding-inline: 38px; }
  .topbar { padding-inline: 38px; }
  .board { gap: 15px; }
  .board-column { padding: 11px; }
  .task-card { min-height: 105px; padding-inline: 12px; }
  .task-title { font-size: 13.5px; }
}

@media (max-width: 1150px) {
  :root { --sidebar-width: 211px; }
  .content { padding-inline: 25px; }
  .topbar { padding-inline: 25px; }
  .board { gap: 9px; }
  .board-column { padding: 7px; }
}

@media (max-width: 950px) {
  .board { grid-template-columns: repeat(4, minmax(157px, 1fr)); overflow: auto; padding-bottom: 6px; }
  .sidebar-section { margin-top: 22px; }
  .metric-card { padding-inline: 8px; gap: 7px; }
  .metric-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .metric-icon svg { width: 15px; height: 15px; }
}

@media (max-width: 800px) {
  :root { --sidebar-width: 236px; }
  body.sidebar-open { overflow: hidden; }
  .app-main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  .sidebar-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }
  .sidebar-overlay {
    position: fixed;
    z-index: 9;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    background: #24193380;
  }
  .sidebar-open .sidebar-overlay { display: block; }
  .icon-button.mobile-menu { display: inline-grid; width: 29px; height: 29px; margin-left: -4px; }
  .topbar { min-height: 54px; gap: 8px; padding: 8px 16px; }
  .topbar-actions { gap: 4px; }
  .breadcrumbs { margin-right: auto; gap: 5px; }
  .content { padding: 24px 16px 30px; }
  .page-header { align-items: flex-start; gap: 10px; margin-bottom: 19px; }
  .page-heading h1 { font-size: 31px; }
  .page-heading p { margin-top: 7px; font-size: 12.5px; }
  .page-actions { flex-wrap: wrap; justify-content: flex-end; }
  .page-actions .primary-button, .page-actions .secondary-button { min-height: 35px; padding: 6px 8px; font-size: 11px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric-card { min-height: 63px; padding: 8px 10px; gap: 8px; }
  .metric-info strong { font-size: 18px; }
  .work-area { margin-top: 15px; }
  .tabs { gap: 13px; }
  .toolbar { min-height: 60px; }
  .board { grid-template-columns: repeat(4, minmax(179px, 1fr)); scroll-snap-type: x proximity; }
  .board-column { min-height: 286px; scroll-snap-align: start; }
}

@media (max-width: 440px) {
  .search-trigger { width: 32px; min-height: 31px; justify-content: center; gap: 0; padding: 0; }
  .search-trigger .search-text, .search-trigger kbd { display: none; }
  .topbar-actions > .icon-button { width: 29px; height: 29px; }
  .toolbar { gap: 5px; }
  .toolbar-left h2 { font-size: 15px; }
  .toolbar-actions { gap: 4px; }
  .toolbar-actions .secondary-button { gap: 4px; padding-inline: 6px; font-size: 11px; }
  .toolbar-actions .secondary-button svg { width: 14px; height: 14px; }
  .dialog-head, .dialog-body, .dialog-footer { padding-inline: 14px; }
  .field-grid { column-gap: 8px; }
  .assignee-options { grid-template-columns: minmax(0, 1fr); }
  .custom-field-controls { grid-template-columns: minmax(0, 1fr); }
  .dialog[data-kind="task"] .dialog-footer { gap: 6px; }
  .dialog[data-kind="task"] .dialog-footer button { padding-inline: 7px; }
  .dialog[data-kind="task"] .dialog-footer .danger-button svg { display: none; }
  .dialog[data-kind="task"] .dialog-footer-spacer { display: none; }
}

@media (pointer: coarse) {
  .inline-edit-input { font-size: 16px; }
}

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

.profile { text-decoration: none; }
.profile:hover { background: #ffffff12; }
.profile-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-screen {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}
.account-card {
  display: grid;
  gap: 16px;
  width: min(100%, 450px);
  padding: clamp(20px, 5vw, 32px);
  border: 1px solid #e8e1f1;
  border-radius: 18px;
  background: var(--surface);
  font-size: 1rem;
}
.account-brand { display: inline-flex; align-items: center; gap: 8px; justify-self: start; color: var(--primary); font-size: 1rem; font-weight: 800; text-decoration: none; }
.account-brand img { display: block; width: 26px; height: 26px; object-fit: contain; }
.account-card h1 { font-size: 1.65rem; }
.account-card p { color: var(--muted); }
.account-card [role="status"]:empty, .account-links:has(a[hidden] + a[hidden]) { display: none; }
.account-card form { display: grid; gap: 8px; }
.account-card label { font-weight: 600; }
.account-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfc4dc;
  border-radius: 8px;
  font: inherit;
}
.account-card input[readonly] { background: #f7f4fa; }
.account-card .primary-button { margin-top: 8px; font-size: .94rem; text-decoration: none; }
.account-card details { border-top: 1px solid #e8e1f1; padding-top: 14px; }
.account-card summary { cursor: pointer; font-weight: 650; }
.account-card details p { margin: 12px 0; }
.account-card details a { display: block; margin-top: 8px; }
.account-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.account-card a:not(.primary-button) { color: var(--primary-dark); }

.workspace-switch strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-chevron { color: var(--sidebar-muted); }
.workspace-manager { font-size: .95rem; }
.workspace-manager label { display: block; font-weight: 650; }
.workspace-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.workspace-controls input, .workspace-controls select {
  flex: 1 1 165px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #dcd4e7;
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
}
.workspace-manager form label, #workspaceDeleteMessage { margin-bottom: 8px; }
#workspaceStatus:empty { display: none; }

.access-dialog { width: min(660px, calc(100vw - 28px)); }
.access-dialog :is(.dialog-head, .dialog-footer) { position: sticky; z-index: 1; background: var(--surface); }
.access-dialog .dialog-head { top: 0; align-items: flex-start; }
.access-dialog .dialog-footer { bottom: 0; }
.access-dialog .dialog-head > div { min-width: 0; overflow-wrap: anywhere; }
.access-dialog .dialog-body { gap: 18px; }
.access-section { display: grid; gap: 9px; }
.access-section h3 { font-size: 14px; font-weight: 700; }
.access-add-fields { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(130px, 1fr) auto; align-items: end; gap: 8px; }
.access-add-fields .primary-button { min-height: 37px; white-space: nowrap; }
.access-role-hint, .access-empty, .access-feedback { color: var(--muted); font-size: 12px; }
.access-list { display: grid; padding: 0; border: 1px solid var(--line); border-radius: 9px; list-style: none; }
.access-list:empty { display: none; }
.access-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 11px; }
.access-row + .access-row { border-top: 1px solid var(--line); }
.access-member { display: grid; min-width: 0; gap: 2px; }
.access-member strong { color: var(--text); font-size: 13px; font-weight: 660; overflow-wrap: anywhere; }
.access-member small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.access-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
.access-row-actions .form-input { width: auto; max-width: 100%; min-height: 32px; padding: 4px 7px; font-size: 12px; }
.access-row-actions :is(.secondary-button, .danger-button) { min-height: 32px; padding: 4px 7px; font-size: 11.5px; }
.access-role-label { padding: 4px 7px; border-radius: 6px; color: var(--primary-dark); background: var(--primary-soft); font-size: 11.5px; font-weight: 650; }
.access-confirm { display: flex; grid-column: 1 / -1; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 6px; background: #f9f1f5; }
.access-confirm p { flex: 1 1 180px; color: #6f3751; font-size: 12px; }
.access-confirm :is(.secondary-button, .danger-button) { min-height: 30px; padding: 4px 7px; font-size: 11.5px; }
.access-feedback { align-self: center; flex: 1 1 160px; }
.access-feedback[data-tone="error"] { color: #92203a; }
.access-feedback[data-tone="success"] { color: #20634e; }

@media (max-width: 550px) {
  .access-add-fields { grid-template-columns: minmax(0, 1fr) auto; }
  .access-add-fields label:first-child { grid-column: 1 / -1; }
  .access-row { grid-template-columns: minmax(0, 1fr); }
  .access-row-actions { justify-content: flex-start; }
}
