:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #1a1c20;
  --panel-2: #23262d;
  --panel-3: #2d3139;
  --text: #f4f6fb;
  --muted: #9ba3b1;
  --line: #373d47;
  --blue: #4d7cff;
  --green: #25c59a;
  --yellow: #f0b429;
  --red: #ff6475;
  --violet: #9a7cff;
  --radius: 8px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.is-hidden {
  display: none !important;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px 1fr;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(77, 124, 255, 0.18), transparent 38%),
    var(--bg);
}

.auth-panel {
  width: min(430px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.36);
}

.auth-brand {
  margin-bottom: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  background: #111318;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
}

.auth-tab {
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  padding: 9px 10px;
  font-weight: 800;
}

.auth-tab.active {
  color: var(--text);
  background: var(--panel-2);
}

.auth-form {
  display: grid;
  margin-top: 8px;
}

.auth-error {
  min-height: 20px;
  color: var(--red);
  font-size: 13px;
  margin: 8px 0 10px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin: 18px 0 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.social-grid {
  display: grid;
  gap: 8px;
}

.social-button {
  min-height: 42px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

.social-button:hover {
  border-color: #596171;
  background: #282d36;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #14161a;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.eyebrow,
.field span,
.panel-label {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: var(--muted);
  background: transparent;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  color: var(--text);
  background: var(--panel-2);
}

.nav-button span {
  width: 20px;
  text-align: center;
}

.sidebar-panel {
  min-width: 0;
  margin-top: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.board-panel,
.labels-panel {
  margin-top: 0;
  border-color: rgba(77, 124, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(77, 124, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--panel);
}

.panel-head,
.board-switcher {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.board-switcher {
  min-width: 0;
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
}

.board-switcher select {
  min-width: 0;
  width: 100%;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-switcher button,
.panel-head button,
.sidebar-action {
  min-width: 0;
  color: var(--text);
  background: var(--panel-2);
  border-radius: 6px;
  padding: 8px 10px;
  font-weight: 800;
}

.sidebar-action {
  width: 100%;
  margin-top: 8px;
}

.sticker-manager {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 310px;
  overflow: auto;
  padding-right: 2px;
}

.sticker-manager-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.sticker-manager-item:hover {
  border-color: color-mix(in srgb, var(--sticker-bg) 42%, rgba(255, 255, 255, 0.16));
  background: rgba(255, 255, 255, 0.065);
}

.sticker-preview {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  color: color-mix(in srgb, var(--sticker-bg) 34%, white);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    color-mix(in srgb, var(--sticker-bg) 16%, #16191f);
  border: 1px solid color-mix(in srgb, var(--sticker-bg) 58%, rgba(255, 255, 255, 0.15));
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sticker-preview > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticker-manager-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.sticker-manager-actions button {
  width: 100%;
  height: 26px;
  color: #c6cdda;
  background: rgba(17, 19, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 6px;
  padding: 0;
}

.sticker-manager-actions button:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(77, 124, 255, 0.18);
}

.focus-stats {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.stat-line strong {
  color: var(--text);
}

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

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

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
}

h2 {
  margin-bottom: 0;
}

.topbar-actions,
.quick-capture {
  display: flex;
  gap: 10px;
  align-items: center;
}

.user-badge {
  max-width: 220px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search {
  width: min(360px, 36vw);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
}

.search input,
.quick-capture input,
.quick-capture select,
.field input,
.field select,
.field textarea {
  min-width: 0;
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.field input[type="date"],
.field input[type="datetime-local"],
.field input[type="time"] {
  max-width: 100%;
  min-width: 0;
  font-size: 14px;
}

.quick-capture select,
.field select {
  min-height: 28px;
  border-radius: 4px;
  padding: 2px 4px;
}

select {
  color: var(--text);
  background-color: var(--panel-2);
}

select option {
  color: var(--text);
  background-color: var(--panel-2);
}

select option:checked,
select option:hover {
  color: white;
  background-color: var(--blue);
}

select:focus {
  outline: 2px solid rgba(77, 124, 255, 0.45);
  outline-offset: 3px;
}

.search input {
  height: 40px;
}

.primary-button,
.quick-capture button,
.section-title button {
  background: var(--blue);
  color: white;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 700;
}

.ghost-button,
.danger-button {
  color: var(--text);
  background: var(--panel-2);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.ghost-button.active {
  color: white;
  background: var(--green);
}

.danger-button {
  color: white;
  background: #9f2a3a;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: var(--text);
  background: var(--panel-2);
  font-size: 18px;
}

.quick-capture {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 18px;
}

.quick-capture input {
  min-width: 260px;
}

.quick-capture select {
  width: 160px;
}

.view-root {
  min-height: 60vh;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.column,
.matrix-cell,
.day-group,
.backlog-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.column {
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.column-title {
  min-width: 0;
  flex: 1;
  color: var(--text);
  background: transparent;
  padding: 0;
  text-align: left;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count {
  color: var(--muted);
  font-size: 13px;
}

.column-action {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--panel-2);
}

.column-action.danger {
  color: #ffb3bd;
}

.task-list {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 10px;
  min-height: 120px;
  flex: 1;
}

.task-card {
  background: var(--panel-2);
  border: 1px solid transparent;
  border-left: 4px solid var(--priority-color);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
  cursor: pointer;
}

.task-card:hover {
  border-color: #596171;
  background: #282d36;
}

.task-card.dragging {
  opacity: 0.55;
}

.column.dragging {
  opacity: 0.6;
}

.config-mode .column {
  cursor: grab;
}

.config-mode .task-card {
  min-height: 38px;
  padding: 8px 10px;
  gap: 0;
}

.config-mode .task-card .muted,
.config-mode .task-card .meta-row,
.config-mode .task-card .tag-row,
.config-mode .task-card .sticker-row,
.config-mode .task-card .progress-shell,
.config-mode .task-card .card-footer {
  display: none;
}

.config-mode .task-card .task-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.status-icon {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #333844;
  color: var(--text);
  font-weight: 900;
}

.task-title {
  flex: 1;
  min-width: 0;
  color: var(--text);
  background: none;
  padding: 0;
  text-align: left;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.35;
}

.meta-row,
.tag-row,
.sticker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill,
.tag,
.sticker {
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  background: #303540;
  overflow-wrap: anywhere;
}

.tag {
  color: #b8c8ff;
  background: #26304c;
}

.priority-important {
  color: #ffb3bd;
  background: #42212a;
}

.priority-medium {
  color: #ffe08a;
  background: #3f3219;
}

.priority-low {
  color: #b8c8ff;
  background: #26304c;
}

.priority-none {
  color: #bac4d2;
  background: #303540;
}

.urgency-pill.urgent {
  color: #ff9eaa;
  background: #48202a;
}

.urgency-pill.not-urgent {
  color: #80e3c2;
  background: #17352e;
}

.tag-filter,
.sticker-filter {
  cursor: pointer;
}

.tag-filter:hover,
.tag-filter:focus-visible {
  color: white;
  background: #344577;
  outline: 2px solid rgba(77, 124, 255, 0.45);
  outline-offset: 2px;
}

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: color-mix(in srgb, var(--sticker-bg, #f3d66b) 32%, white);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018)),
    color-mix(in srgb, var(--sticker-bg, #f3d66b) 14%, #171a20);
  border: 1px solid color-mix(in srgb, var(--sticker-bg, #f3d66b) 52%, rgba(255, 255, 255, 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.16);
  font-weight: 800;
  letter-spacing: 0;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.sticker-filter:hover,
.sticker-filter:focus-visible {
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)),
    color-mix(in srgb, var(--sticker-bg, #f3d66b) 22%, #171a20);
  border-color: color-mix(in srgb, var(--sticker-bg, #f3d66b) 72%, white);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 10px 24px rgba(0, 0, 0, 0.22);
  outline: 2px solid color-mix(in srgb, var(--sticker-bg, #f3d66b) 42%, transparent);
  outline-offset: 2px;
}

.sticker-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #111318;
  background: var(--sticker-bg, #f3d66b);
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.sticker-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.sticker-icon.image-icon {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.progress-shell {
  height: 7px;
  background: #111318;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: var(--progress);
  background: var(--green);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.date-danger {
  color: var(--red);
}

.date-warn {
  color: var(--yellow);
}

.week-view {
  display: grid;
  gap: 12px;
}

.day-group {
  padding: 14px;
}

.day-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-bottom: 10px;
}

.day-tasks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.matrix-cell {
  min-height: 280px;
  padding: 12px;
}

.matrix-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  margin-bottom: 12px;
}

.matrix-title span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111;
  font-weight: 900;
}

.backlog-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.backlog-section {
  padding: 12px;
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.task-dialog {
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.task-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.task-dialog form {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 18px;
}

.dialog-head,
.dialog-actions,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 10px;
}

.field-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.field {
  min-width: 0;
  display: grid;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-top: 10px;
}

.field textarea {
  resize: vertical;
}

.checklist-editor {
  margin-top: 14px;
}

.sticker-field {
  align-content: start;
}

.sticker-picker,
.selected-stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sticker-option,
.selected-sticker {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: color-mix(in srgb, var(--sticker-bg, #f3d66b) 32%, white);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018)),
    color-mix(in srgb, var(--sticker-bg, #f3d66b) 14%, #171a20);
  border: 1px solid color-mix(in srgb, var(--sticker-bg, #f3d66b) 52%, rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  padding: 7px 10px 7px 8px;
  font-size: 13px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.16);
  transition: opacity 0.16s ease, filter 0.16s ease, transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.sticker-option {
  opacity: 0.46;
  filter: grayscale(1) saturate(0.22);
  color: #aeb6c4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    #262b33;
  border-color: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.sticker-option:hover,
.sticker-option.active {
  opacity: 1;
  filter: saturate(1);
  color: color-mix(in srgb, var(--sticker-bg, #f3d66b) 32%, white);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)),
    color-mix(in srgb, var(--sticker-bg, #f3d66b) 22%, #171a20);
  border-color: color-mix(in srgb, var(--sticker-bg, #f3d66b) 72%, white);
  transform: translateY(-1px);
  outline: 2px solid color-mix(in srgb, var(--sticker-bg, #f3d66b) 35%, transparent);
  outline-offset: 2px;
}

.selected-sticker {
  cursor: pointer;
}

.remove-mark {
  margin-left: 2px;
  color: rgba(244, 246, 251, 0.58);
}

.selected-stickers-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 4px 0;
}

.custom-sticker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
}

.custom-sticker-row input {
  min-height: 36px;
  color: var(--text);
  background: #171a20;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
}

.custom-sticker-row button {
  border-radius: 6px;
  color: white;
  background: var(--blue);
  font-weight: 900;
}

.sticker-dialog {
  width: min(720px, calc(100vw - 24px));
}

.sticker-editor-preview {
  display: flex;
  justify-content: center;
  padding: 16px;
  margin-top: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at top, rgba(77, 124, 255, 0.16), transparent 38%),
    rgba(255, 255, 255, 0.035);
}

.file-upload-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 7px;
  padding: 8px 12px;
  color: #cfd6e4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    #1c2028;
  border: 1px solid rgba(255, 255, 255, 0.11);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.file-upload-button::before {
  content: "↑";
  margin-right: 7px;
  color: #8fa8ff;
}

.file-upload-row:hover .file-upload-button,
.file-input:focus-visible + .file-upload-button {
  color: white;
  border-color: rgba(143, 168, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(143, 168, 255, 0.12), rgba(255, 255, 255, 0.018)),
    #1f2430;
}

.file-name {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticker-icon-section {
  margin-top: 14px;
}

.stock-icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.stock-icon-button {
  height: 42px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 17px;
}

.stock-icon-button:hover,
.stock-icon-button.active {
  color: white;
  background: rgba(77, 124, 255, 0.22);
  border-color: rgba(77, 124, 255, 0.72);
}

.check-item {
  display: grid;
  grid-template-columns: 28px 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.check-item input[type="text"] {
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
}

.check-item button {
  height: 36px;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--panel-2);
}

.dialog-actions {
  margin-top: 18px;
}

.dialog-actions > div {
  display: flex;
  gap: 10px;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(360px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  z-index: 20;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #f4f6fb;
  color: #17191f;
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.toast strong {
  overflow-wrap: anywhere;
}

.toast p {
  color: #565f6e;
  margin-bottom: 0;
}

.toast-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast-actions button {
  border-radius: 6px;
  padding: 7px 10px;
  background: #dde3ee;
  color: #17191f;
}

.toast-actions .toast-open {
  background: var(--blue);
  color: white;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 232px 1fr;
  }

  .sidebar {
    padding: 14px;
  }

  .workspace {
    padding: 18px;
  }

  .kanban-board {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .search {
    width: min(320px, 42vw);
  }
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

  .brand,
  .focus-panel {
    display: none;
  }

  .sidebar-panel {
    padding: 10px;
  }

  .labels-panel {
    display: none;
  }

  .nav {
    grid-template-columns: repeat(4, 1fr);
  }

  .nav-button {
    justify-content: center;
  }

  .workspace {
    padding: 14px;
  }

  .topbar,
  .topbar-actions,
  .quick-capture {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .quick-capture input,
  .quick-capture select {
    min-width: 0;
    width: 100%;
  }

  .kanban-board {
    grid-template-columns: repeat(5, minmax(260px, 82vw));
  }

  h1 {
    font-size: 28px;
  }
}

@media (max-width: 760px) {
  .nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-capture {
    gap: 8px;
  }

  .matrix-grid,
  .backlog-view {
    grid-template-columns: 1fr;
  }

  .task-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  .task-dialog form {
    max-height: calc(100dvh - 12px);
    padding: 14px;
  }

  .dialog-head,
  .dialog-actions {
    align-items: stretch;
  }

  .dialog-actions,
  .dialog-actions > div {
    flex-direction: column;
  }

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

  .field-grid,
  .field-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .workspace {
    padding: 10px;
  }

  .sidebar {
    padding: 10px;
  }

  .topbar {
    gap: 12px;
  }

  h1 {
    font-size: 24px;
  }

  .kanban-board {
    grid-template-columns: repeat(5, minmax(240px, 88vw));
  }

  .task-card {
    padding: 10px;
  }

  .field input[type="date"],
  .field input[type="datetime-local"],
  .field input[type="time"] {
    font-size: 13px;
  }
}
