:root {
  --amethyst: #9257d6;
  --purple: #7a46b8;
  --purple-dark: #62389a;
  --carbon: #1f1f29;
  --off: #f7f6fb;
  --aqua: #a3d8d5;
  --white: #fff;
  --text: #1f1f29;
  --muted: #6c6b7b;
  --border: #e7e4ee;
  --soft: #f4eefc;
  --danger: #b33d4f;
  --orange: #956016;
  --green: #28715c;
  --shadow: 0 12px 32px #25203913;
  --radius: 12px;
  --sidebar: 244px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--off);
  font-family:
    'Hubot Sans',
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Arial,
    sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #b18ce5;
  outline-offset: 2px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button {
  color: inherit;
}
button,
select,
input,
textarea {
  border-radius: 8px;
}
button {
  border: 1px solid var(--border);
  background: white;
}
button:hover {
  background: #f8f6fc;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--carbon);
  color: #f4f0fa;
  padding: 24px 15px 16px;
  overflow-y: auto;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 9px 19px 8px;
  gap: 34px;
}
.brand-logo {
  display: block;
  width: 136px;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}
.product-label {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.3;
  color: #f7f6fb;
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-weight: 650;
  color: #a9a3b9;
  padding: 17px 10px 8px;
}
.nav {
  display: grid;
  gap: 4px;
}
.nav-btn {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  border: 0;
  color: #d6d2e1;
  padding: 10px 11px;
  font-weight: 500;
  border-radius: 8px;
  min-height: 40px;
}
.nav-btn:hover {
  background: #ffffff0b;
  color: #fff;
}
.nav-btn.active {
  background: #9257d62b;
  color: #fff;
  box-shadow: inset 3px 0 var(--amethyst);
}
.nav-btn .count {
  margin-left: auto;
  font-size: 11px;
  color: #c2b7d2;
  font-variant-numeric: tabular-nums;
}
.nav-btn.active .count {
  color: #fff;
}
.nav-btn .nav-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b89ce1;
  flex-shrink: 0;
  margin: 0 4px;
}
.client-nav {
  flex-shrink: 0;
  max-height: 240px;
  overflow: auto;
}
.client-empty {
  padding: 4px 11px;
  color: #a9a3b9;
  font-size: 12px;
}
.side-bottom {
  margin-top: auto;
  padding-top: 20px;
}
.side-tools {
  display: grid;
  gap: 4px;
}
.side-tools button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: #c9c4d5;
  background: transparent;
  border: 0;
  text-align: left;
  font-size: 12px;
}
.side-tools button:hover {
  background: #ffffff0b;
  color: #fff;
}
.local-indicator {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #a9a3b9;
  font-size: 11px;
  margin: 14px 10px 0;
}
.local-indicator i {
  width: 7px;
  height: 7px;
  background: #75c6a8;
  border-radius: 50%;
  display: inline-block;
}
.local-indicator.error i {
  background: #ff917c;
}
.main {
  min-width: 0;
  --main-inline: 32px;
  --main-bottom: 36px;
  padding: env(safe-area-inset-top) max(var(--main-inline), env(safe-area-inset-right))
    max(var(--main-bottom), env(safe-area-inset-bottom)) max(var(--main-inline), env(safe-area-inset-left));
  max-width: 1700px;
  width: 100%;
  margin: auto;
  align-self: start;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.crumb strong {
  color: var(--text);
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn {
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 600;
  white-space: nowrap;
}
.btn.primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  box-shadow: 0 3px 8px #7a46b822;
}
.btn.primary:hover {
  background: var(--purple-dark);
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  color: var(--danger);
  border-color: #f0cdd4;
}
.btn.icon {
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
}
.mobile-nav {
  display: none;
}
.head {
  padding: 30px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 8px;
}
.head h1 {
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -1.1px;
  font-weight: 600;
}
.head p {
  color: var(--muted);
  margin-top: 8px;
  max-width: 650px;
}
.date-label {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.metric {
  padding: 15px 16px;
  text-align: left;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric:hover {
  border-color: #c7b2e6;
  background: #fff;
}
.metric.active {
  border-color: #bca2e2;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-weight: 550;
  font-size: 12px;
  gap: 6px;
}
.metric-top svg {
  color: var(--purple);
}
.metric-num {
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.metric-note {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-num.alert {
  color: var(--danger);
}
.capture {
  display: flex;
  gap: 10px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 19px;
  align-items: center;
  box-shadow: 0 2px 6px #1f1f2905;
}
.capture-icon {
  color: var(--purple);
  margin-left: 6px;
}
.capture input {
  border: 0;
  flex: 1;
  min-width: 0;
  padding: 10px 5px;
  background: transparent;
  color: var(--text);
}
.capture input:focus {
  outline: none;
}
.capture:focus-within {
  border-color: var(--amethyst);
  box-shadow: 0 0 0 2px #9257d61c;
}
.capture small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.workpanel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 3px 10px #1f1f2904;
}
.panel-top {
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.panel-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
}
.panel-title span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.seg {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--off);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
}
.seg button {
  background: transparent;
  border: 0;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 6px;
}
.seg button.active {
  background: white;
  color: var(--purple);
  box-shadow: 0 1px 4px #1f1f2912;
}
.filters {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 9px;
  flex: 1;
  min-width: 160px;
  max-width: 260px;
  color: var(--muted);
}
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 8px 0;
  outline: none;
}
.search:focus-within {
  border-color: var(--amethyst);
}
.filters select {
  border: 1px solid var(--border);
  padding: 8px 10px;
  max-width: 190px;
  color: var(--text);
  background: white;
  font-size: 12px;
}
.filter-clear {
  font-size: 12px;
  color: var(--purple);
  background: transparent;
  border: 0;
  padding: 8px;
  display: none;
}
.filter-clear.visible {
  display: block;
}
.table-wrap {
  overflow-x: auto;
}
.task-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 810px;
  table-layout: fixed;
}
.task-table th {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  background: #faf9fc;
  padding: 11px 12px;
  font-weight: 650;
  border-bottom: 1px solid var(--border);
}
.task-table th:first-child {
  padding-left: 17px;
  width: 40%;
}
.task-table th:nth-child(2) {
  width: 20%;
}
.task-table th:nth-child(3) {
  width: 12%;
}
.task-table th:nth-child(4) {
  width: 12%;
}
.task-table th:nth-child(5) {
  width: 16%;
}
.task-table td {
  padding: 12px;
  border-bottom: 1px solid #eeecf2;
  vertical-align: middle;
}
.task-table td:first-child {
  padding-left: 16px;
}
.task-table tr:last-child td {
  border-bottom: 0;
}
.task-table tbody tr:hover {
  background: #faf9fd;
}
.task-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.check {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  border: 1.5px solid #c8c3d3;
  border-radius: 6px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: 2px;
}
.check:hover {
  border-color: var(--amethyst);
  background: var(--soft);
}
.check.done {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}
.task-text {
  min-width: 0;
  flex: 1;
}
.task-name {
  display: block;
  text-align: left;
  word-break: break-word;
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 620;
  font-size: 13px;
  line-height: 1.45;
  width: 100%;
}
.task-name:hover {
  color: var(--purple);
  background: transparent;
}
.task-name.done {
  text-decoration: line-through;
  color: var(--muted);
}
.task-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  align-items: center;
}
.task-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.task-meta .blocking {
  color: var(--danger);
  font-weight: 550;
}
.pin {
  background: transparent;
  border: 0;
  padding: 1px;
  color: #a4a0b2;
  margin-top: 1px;
}
.pin:hover,
.pin.pinned {
  color: var(--purple);
  background: transparent;
}
.pin.pinned svg {
  fill: #e5d6f7;
}
.context-main {
  font-weight: 550;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.context-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.priority {
  font-size: 12px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.priority i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8b8997;
}
.priority.critical {
  color: var(--danger);
}
.priority.critical i {
  background: #c64e61;
}
.priority.high {
  color: var(--orange);
}
.priority.high i {
  background: #ca903c;
}
.priority.normal i {
  background: var(--amethyst);
}
.priority.low i {
  background: #9c9aa6;
}
.due {
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}
.due.late {
  color: var(--danger);
  font-weight: 650;
}
.due.today {
  color: var(--purple);
  font-weight: 650;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  background: #f1eff5;
  color: #696475;
  border-radius: 5px;
  padding: 4px 7px;
  white-space: nowrap;
}
.status.ready {
  background: #eee8f7;
  color: #7140a9;
}
.status.progress {
  background: #e8eefb;
  color: #41628f;
}
.status.waiting {
  background: #fff1db;
  color: #8e5c17;
}
.status.blocked {
  background: #fbe8ec;
  color: #a23d50;
}
.status.done {
  background: #e8f3ef;
  color: #28715c;
}
.empty {
  padding: 44px 20px 50px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}
.empty h3 {
  font-size: 17px;
  letter-spacing: -0.3px;
}
.empty p {
  max-width: 420px;
  color: var(--muted);
  font-size: 13px;
}
.empty-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.panel-note {
  padding: 12px 16px;
  background: #faf9fc;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
.board-scroll {
  overflow-x: auto;
  padding: 14px;
  background: #faf9fc;
}
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 10px;
  min-width: 900px;
  align-items: start;
}
.column {
  min-height: 170px;
  background: #f0edf5;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid #e7e3ed;
}
.column.drag-over {
  border-color: var(--amethyst);
  background: #eee6fa;
}
.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 2px 10px;
  font-size: 12px;
  font-weight: 650;
}
.column-head span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.column-body {
  display: grid;
  gap: 8px;
  min-height: 80px;
}
.board-card {
  background: white;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 9px;
  box-shadow: 0 2px 5px #1f1f2906;
  cursor: grab;
  min-width: 0;
}
.board-card .task-name {
  font-size: 13px;
}
.board-card .task-cell {
  gap: 7px;
}
.board-card .task-meta {
  margin-top: 8px;
}
.board-card .bottom-line {
  display: flex;
  gap: 7px;
  justify-content: space-between;
  align-items: center;
  margin-top: 11px;
  flex-wrap: wrap;
}
.board-card .context-sub {
  margin-top: 7px;
}
.board-card .status.blocked {
  margin-top: 8px;
}
.column-empty {
  font-size: 12px;
  color: #8c8799;
  padding: 16px 4px;
  text-align: center;
  border: 1px dashed #d8d2e3;
  border-radius: 7px;
}
.dep-wrap {
  padding: 17px;
  display: grid;
  gap: 14px;
}
.dep-summary {
  font-size: 12px;
  color: var(--muted);
}
.dep-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.dep-root {
  display: flex;
  gap: 11px;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.dep-root-task {
  flex: 1;
  min-width: 160px;
}
.dep-root-task .context-sub {
  margin-left: 29px;
}
.dep-root .task-name {
  font-size: 14px;
}
.dep-branches {
  margin: 13px 0 0 9px;
  border-left: 2px solid #d8c4f1;
  padding-left: 16px;
  display: grid;
  gap: 8px;
}
.dep-branch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dep-branch .task-name {
  width: auto;
  flex: 1;
}
.dep-branch svg {
  color: var(--purple);
}
.dep-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.notice {
  margin: 12px 0 0;
  padding: 12px 15px;
  border: 1px solid #eacbcf;
  border-radius: 8px;
  background: #fff0f1;
  color: #8e3343;
  font-size: 13px;
}
.notice[hidden] {
  display: none;
}
.toast {
  position: fixed;
  bottom: 22px;
  right: 25px;
  background: var(--carbon);
  color: white;
  border-radius: 10px;
  padding: 13px 17px;
  box-shadow: var(--shadow);
  z-index: 100;
  max-width: calc(100vw - 35px);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast[hidden] {
  display: none;
}
.toast button {
  background: transparent;
  color: #dcc3ff;
  border: 0;
  font-weight: 600;
  padding: 3px;
}
.dialog {
  border: 0;
  padding: 0;
  background: white;
  color: var(--text);
  width: min(590px, calc(100vw - 24px));
  max-height: calc(100dvh - 28px);
  border-radius: 15px;
  box-shadow: 0 20px 70px #1f1f2940;
  overflow: auto;
}
.dialog::backdrop {
  background: #1f1f2966;
  backdrop-filter: blur(2px);
}
.dialog-header {
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.dialog-header h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
}
.dialog-header p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.dialog-body {
  padding: 20px 22px;
  display: grid;
  gap: 15px;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field label,
.field-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #dcd8e5;
  padding: 10px 11px;
  color: var(--text);
}
.field textarea {
  resize: vertical;
  min-height: 74px;
}
.field small {
  font-size: 11px;
  color: var(--muted);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 550;
}
.checkbox-label input {
  accent-color: var(--purple);
  width: 16px;
  height: 16px;
}
.blocker-list {
  max-height: 150px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
  background: #faf9fc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}
.blocker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.blocker-item input {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--purple);
}
.blocker-item small {
  margin-left: auto;
  white-space: nowrap;
}
.dialog-footer {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 1;
}
.dialog-footer .actions {
  margin-left: auto;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
}
.form-error:empty {
  display: none;
}
.mobile-cards {
  display: none;
}
.subtask-info {
  font-size: 12px;
  color: var(--muted);
  background: var(--off);
  padding: 10px;
  border-radius: 8px;
}
.subtask-info:empty {
  display: none;
}
.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.print-title {
  display: none;
}
@media (max-width: 1150px) {
  .main {
    --main-inline: 21px;
    --main-bottom: 25px;
  }
  .metric {
    padding: 13px 12px;
  }
  .metric-note {
    display: none;
  }
  .metrics {
    gap: 8px;
  }
  .head h1 {
    font-size: 29px;
  }
  .sidebar {
    padding-left: 11px;
    padding-right: 11px;
  }
  :root {
    --sidebar: 218px;
  }
}
@media (max-width: 800px) {
  .app {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    z-index: 30;
    left: 0;
    top: 0;
    width: 244px;
    height: 100dvh;
    box-shadow: 10px 0 40px #1f1f2940;
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-nav {
    display: inline-flex;
  }
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: #1f1f2966;
    z-index: 29;
  }
  .mobile-overlay[hidden] {
    display: none;
  }
  .main {
    --main-inline: 14px;
    --main-bottom: 24px;
  }
  .topbar {
    height: 62px;
  }
  .topbar .crumb {
    display: none;
  }
  .head {
    padding: 22px 0 16px;
    align-items: start;
  }
  .head h1 {
    font-size: 27px;
  }
  .head p {
    font-size: 12px;
  }
  .date-label {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }
  .metric {
    padding: 11px 12px;
    gap: 6px;
  }
  .metric-num {
    font-size: 25px;
  }
  .capture {
    margin-bottom: 13px;
    gap: 6px;
    padding: 7px;
  }
  .capture small {
    display: none;
  }
  .capture input {
    font-size: 13px;
  }
  .capture .btn {
    padding: 8px 10px;
  }
  .panel-top {
    padding: 12px;
    gap: 8px;
  }
  .filters {
    padding: 10px 12px;
    gap: 6px;
  }
  .filters select {
    max-width: 140px;
    flex: 1;
    font-size: 11px;
  }
  .search {
    max-width: none;
    min-width: 100%;
    order: -1;
  }
  .seg button {
    padding: 6px 7px;
    font-size: 11px;
  }
  .table-wrap {
    display: none;
  }
  .mobile-cards {
    display: grid;
  }
  .mobile-task {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-task:last-child {
    border-bottom: 0;
  }
  .mobile-task .mobile-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-left: 29px;
  }
  .mobile-task .context-sub {
    margin-left: 29px;
  }
  .panel-note {
    font-size: 11px;
  }
  .topbar .print-btn span {
    display: none;
  }
  .dialog-header,
  .dialog-body {
    padding: 16px;
  }
  .dialog-footer {
    padding: 12px 16px;
  }
  .field-row {
    gap: 9px;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
    padding: 9px;
  }
  .toast {
    bottom: 14px;
    right: 14px;
  }
  .board {
    min-width: 900px;
  }
  .empty {
    padding: 34px 15px;
  }
  .dep-wrap {
    padding: 12px;
  }
}
@media (max-width: 390px) {
  .seg button svg {
    display: none;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .topbar .btn {
    padding: 8px 10px;
  }
}
@media print {
  body {
    background: white;
    font-size: 11px;
  }
  .app {
    display: block;
  }
  .sidebar,
  .topbar,
  .capture,
  .filters,
  .seg,
  .metrics,
  .toast,
  .dialog,
  .panel-note,
  .pin,
  .mobile-cards,
  .mobile-overlay {
    display: none !important;
  }
  .main {
    padding: 0;
    max-width: none;
  }
  .head {
    padding: 0 0 14px;
  }
  .head h1 {
    font-size: 23px;
  }
  .head p {
    font-size: 11px;
  }
  .workpanel {
    border: 0;
    box-shadow: none;
  }
  .panel-top {
    padding: 8px 0;
  }
  .table-wrap {
    display: block !important;
    overflow: visible;
  }
  .task-table {
    min-width: 0;
    table-layout: auto;
  }
  .task-table th,
  .task-table td {
    padding: 7px 5px !important;
  }
  .task-table th:first-child {
    width: 35%;
  }
  .task-name {
    font-size: 11px;
  }
  .context-main,
  .context-sub,
  .priority,
  .due,
  .status {
    font-size: 10px;
  }
  .task-table tr,
  .board-card,
  .dep-group {
    break-inside: avoid;
  }
  .board-scroll {
    overflow: visible;
    padding: 0;
  }
  .board {
    display: block;
    min-width: 0;
  }
  .column {
    margin-bottom: 12px;
    break-inside: auto;
  }
  .date-label {
    display: block;
  }
  .print-title {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 8px;
  }
  .check {
    width: 13px;
    height: 13px;
    border-radius: 3px;
  }
  .empty {
    padding: 12px;
  }
}

.blocker-empty {
  padding: 5px;
  color: var(--muted);
  font-size: 12px;
}

/* Hosted workspace controls and standalone safe areas */
.app {
  min-height: 100dvh;
}
.sidebar {
  height: 100dvh;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-left: max(15px, env(safe-area-inset-left));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.dialog {
  max-height: calc(100dvh - max(14px, env(safe-area-inset-top)) - max(14px, env(safe-area-inset-bottom)));
}
.toast {
  bottom: max(22px, env(safe-area-inset-bottom));
  right: max(25px, env(safe-area-inset-right));
}
.sync-bar, .sync-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sync-bar {
  color: var(--muted);
  font-size: 12px;
}
.sync-bar > span {
  flex: 1 1 180px;
}
.sync-notice > p {
  flex-basis: 100%;
}
a.btn {
  text-decoration: none;
}
.sign-in {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
.sign-in-card {
  width: min(420px, calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  margin: max(16px, env(safe-area-inset-top)) auto max(16px, env(safe-area-inset-bottom));
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sign-in-card.startup {
  margin-top: max(48px, env(safe-area-inset-top));
}
.sign-in-card p {
  margin: 8px 0 16px;
}
.sign-in-brand {
  background: var(--carbon);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 16px;
}
@media print {
  .sync-bar, .sync-notice {
    display: none !important;
  }
}

.capture-open {
  border-color: var(--amethyst);
  background: var(--soft);
  color: var(--purple-dark);
  font-weight: 680;
}
.capture-open:hover {
  background: #ede0fa;
}
.task-planning {
  padding: 9px 0;
}
.task-planning > summary,
#smart-clipboard > summary {
  color: var(--purple-dark);
  cursor: pointer;
  font-weight: 650;
  margin-bottom: 7px;
}
#task-review {
  color: var(--orange);
  margin-top: 8px;
}
.smart-dialog {
  width: min(690px, calc(100vw - 24px));
}
.smart-dialog .dialog-header {
  align-items: start;
}
.smart-body {
  display: grid;
  gap: 12px;
}
.smart-nav,
.smart-actions,
.smart-context-footer,
.smart-event .actions {
  flex-wrap: wrap;
}
.smart-nav [aria-pressed="true"] {
  background: var(--soft);
  color: var(--purple-dark);
  border-color: var(--amethyst);
}
#smart-status {
  color: var(--purple-dark);
  overflow-wrap: anywhere;
}
#smart-status:empty {
  display: none;
}
.smart-history {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.smart-event,
.smart-context-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  overflow-wrap: anywhere;
}
.smart-event h3 {
  font-size: 15px;
}
.smart-event p,
.smart-task-link span {
  color: var(--muted);
  font-size: 12px;
}
.smart-event .actions:not(:empty),
.smart-task-link {
  margin-top: 7px;
}
.smart-task-link,
.smart-context-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.smart-task-link .btn {
  white-space: normal;
  text-align: left;
}
.smart-context-row {
  margin: 6px 0;
}
.smart-context-row > span {
  flex: 1 1 180px;
}
.smart-context-form,
.smart-paste {
  display: grid;
  gap: 8px;
  padding: 12px 0;
}
.smart-context-form {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 166px), 1fr));
  align-items: end;
}
.smart-context-form .field {
  margin: 0;
}
.smart-paste textarea {
  width: 100%;
  max-width: 100%;
  font-family: ui-monospace, monospace;
}
@media (max-width: 475px) {
  .capture-open {
    padding-inline: 8px;
  }
  .smart-body {
    padding-inline: 12px;
  }
}
