:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-strong: #f1f5f9;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --cursor-grab: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 32 32'%3E%3Cpath fill='%231d4ed8' stroke='%23ffffff' stroke-width='1.5' stroke-linejoin='round' d='M12 15V8.5a2.2 2.2 0 0 1 4.4 0V14h.7V6.8a2.2 2.2 0 1 1 4.4 0V14h.7V9.6a2.2 2.2 0 0 1 4.4 0v8.9c0 5-3.6 8.5-8.6 8.5h-2.8c-3.4 0-5.3-1.5-7.2-4.4l-2.4-3.7a2.2 2.2 0 0 1 3.7-2.4l2 3.1.7-.3Z'/%3E%3C/svg%3E") 10 8;
  --cursor-grabbing: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 32 32'%3E%3Cpath fill='%231d4ed8' stroke='%23ffffff' stroke-width='1.5' stroke-linejoin='round' d='M9 16v-4.2a2.2 2.2 0 0 1 4.4 0V15h.6V9.2a2.2 2.2 0 1 1 4.4 0V15h.6v-4.3a2.2 2.2 0 0 1 4.4 0V15h.6v-2.5a2.2 2.2 0 1 1 4.4 0v6.2c0 5-3.7 8.3-8.7 8.3h-4.2c-4 0-6.5-2.1-8.2-5.3l-1.6-3a2.2 2.2 0 0 1 3.9-2l1.2 2.2.2-.1Z'/%3E%3C/svg%3E") 10 8;
  --danger: #b42318;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
input,
select {
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: none;
}

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

.page-header h1 {
  color: #0f172a;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.page-header .status-line {
  margin: 10px 0 0;
}

.ghost-button {
  background: #ffffff;
  border: 1px solid var(--border);
  color: #334155;
  min-height: 38px;
}

.ghost-button:hover {
  background: #f8fafc;
}

.table-toolbar {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative;
}

.view-tabs {
  align-items: center;
  background: #eef2f7;
  border-radius: 8px;
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 4px;
  width: fit-content;
}

.view-tabs .tab {
  background: transparent;
  color: #0f172a;
  font-weight: 700;
  min-height: 38px;
  padding: 0 22px;
}

.view-tabs .tab.active,
.view-tabs .tab:hover {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  color: var(--accent);
}

.sort-menu {
  flex: 0 0 auto;
  position: relative;
}

.table-actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: auto;
}

.sort-button,
.export-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  color: #334155;
  display: inline-flex;
  min-height: 42px;
  padding: 0 14px;
}

.sort-button:hover,
.sort-button:focus,
.export-button:hover,
.export-button:focus {
  background: #f8fafc;
  border-color: var(--border-strong);
}

.sort-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
  min-width: 282px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
}

.sort-list {
  display: grid;
  gap: 4px;
}

.sort-reset-button,
.sort-option-row {
  border-radius: 6px;
  min-height: 40px;
}

.sort-reset-button {
  background: transparent;
  color: #64748b;
  justify-content: flex-start;
  padding: 0 10px;
  text-align: left;
}

.sort-reset-button:hover,
.sort-reset-button:focus,
.sort-option-row:hover,
.sort-option-row:focus-within {
  background: #f8fafc;
}

.sort-option-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 4px 6px 4px 10px;
}

.sort-option-label {
  color: #475569;
  font-weight: 700;
  min-width: 0;
}

.sort-option-actions {
  display: inline-flex;
  gap: 4px;
}

.sort-direction-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.sort-direction-button svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  width: 17px;
}

.sort-direction-button:hover,
.sort-direction-button:focus,
.sort-direction-button.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
}

.table-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  flex: 1 1 auto;
  margin-left: 0;
  margin-right: 0;
  min-height: 360px;
  overflow-x: auto;
  overflow-y: visible;
}

.task-table {
  --column-count: 5;
  --table-width: calc(var(--column-count) * 180px);
  background: #ffffff;
  color: #111827;
  min-height: 100%;
  min-width: max(100%, var(--table-width));
  position: relative;
}

.table-row {
  border-bottom: 1px solid #eef2f7;
  display: grid;
  min-height: 48px;
}

.table-row.selected-row .table-cell:first-child {
  box-shadow: inset 3px 0 0 #6366f1, 1px 0 0 #eef2f7;
}

.task-row.is-dragging .table-cell {
  background: #eef2ff;
  opacity: 0.58;
}

.table-header {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  min-height: 44px;
  position: sticky;
  top: 0;
  text-transform: uppercase;
  z-index: 3;
}

.table-cell {
  align-items: center;
  background: #ffffff;
  display: flex;
  min-width: 0;
  padding: 7px 12px;
  position: relative;
}

.table-row:not(.table-header):not(.new-task-row) .table-cell:hover,
.table-row:not(.table-header):not(.new-task-row) .table-cell:focus-within {
  background: #f1f5f9;
}

.table-cell:first-child {
  box-shadow: 1px 0 0 #eef2f7;
  left: 0;
  padding-left: 16px;
  position: sticky;
  z-index: 2;
}

.task-title-cell {
  gap: 6px;
  padding-right: 28px;
}

.table-header .table-cell {
  background: #f8fafc;
}

.table-header .header-cell {
  gap: 8px;
  padding-right: 24px;
}

.table-header .header-cell:hover,
.table-header .header-cell:focus-within {
  background: #f3f5f9;
}

.header-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-grip {
  background-color: transparent;
  background-image: radial-gradient(circle, #9aa3b2 1.25px, transparent 1.55px);
  background-position: center;
  background-size: 4px 4px;
  border-radius: 5px;
  cursor: var(--cursor-grab), grab;
  flex: 0 0 auto;
  height: 20px;
  margin-left: auto;
  min-height: 20px;
  opacity: 0;
  padding: 0;
  width: 15px;
}

.column-grip:hover,
.column-grip:focus {
  background-color: #e9edf3;
  background-image: radial-gradient(circle, #9aa3b2 1.25px, transparent 1.55px);
}

.header-cell.is-dragging {
  background: #eef2ff;
  box-shadow: inset 0 -2px 0 #2563eb;
  opacity: 0.58;
  z-index: 8;
}

.header-cell.is-dragging .column-grip {
  background-color: #e9edf3;
  background-image: radial-gradient(circle, #9aa3b2 1.25px, transparent 1.55px);
  cursor: var(--cursor-grabbing), grabbing;
  opacity: 1;
}

.column-drag-preview {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  color: #1e293b;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  left: 0;
  letter-spacing: 0.02em;
  min-width: 112px;
  overflow: hidden;
  padding: 7px 12px;
  pointer-events: none;
  position: fixed;
  text-overflow: ellipsis;
  text-transform: uppercase;
  top: 0;
  white-space: nowrap;
  z-index: 1000;
}

.column-drop-marker {
  background: #2563eb;
  border-radius: 999px;
  bottom: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translateX(-1px);
  width: 2px;
  z-index: 9;
}

.task-row-grip {
  background-color: transparent;
  background-image: radial-gradient(circle, #9aa3b2 1.25px, transparent 1.55px);
  background-position: center;
  background-size: 4px 4px;
  border-radius: 5px;
  cursor: var(--cursor-grab), grab;
  flex: 0 0 auto;
  height: 22px;
  min-height: 22px;
  opacity: 0;
  padding: 0;
  position: absolute;
  right: 6px;
  width: 15px;
}

.task-row-grip:hover,
.task-row-grip:focus {
  background-color: #e9edf3;
}

.task-row:hover .task-row-grip,
.task-row:focus-within .task-row-grip,
.task-row.is-dragging .task-row-grip {
  background-color: #e9edf3;
  opacity: 1;
}

.task-row.is-dragging .task-row-grip {
  cursor: var(--cursor-grabbing), grabbing;
}

.task-drag-preview {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  color: #0f172a;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  left: 0;
  min-width: 220px;
  overflow: hidden;
  padding: 7px 14px;
  pointer-events: none;
  position: fixed;
  text-overflow: ellipsis;
  top: 0;
  white-space: nowrap;
  z-index: 1000;
}

.task-drop-marker {
  background: #2563eb;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  height: 2px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(-1px);
  z-index: 9;
}

.column-resize-handle {
  background: transparent;
  border-radius: 0;
  bottom: 8px;
  cursor: col-resize;
  min-height: 0;
  padding: 0;
  position: absolute;
  right: -5px;
  top: 8px;
  width: 10px;
  z-index: 6;
}

.column-resize-handle::after {
  background: #cbd5e1;
  border-radius: 999px;
  content: '';
  display: block;
  height: 100%;
  margin: 0 auto;
  opacity: 0;
  width: 2px;
}

.table-header .header-cell:hover .column-grip,
.table-header .header-cell:focus-within .column-grip {
  background-color: #e9edf3;
  background-image: radial-gradient(circle, #9aa3b2 1.25px, transparent 1.55px);
  opacity: 1;
}

.table-header .header-cell:hover .column-resize-handle::after,
.table-header .header-cell:focus-within .column-resize-handle::after,
.column-resize-handle.is-active::after {
  opacity: 1;
  background: #2563eb;
}

.column-resize-handle:hover,
.column-resize-handle:focus,
.column-resize-handle.is-active {
  background: transparent;
}

.column-resize-handle:hover::after,
.column-resize-handle:focus::after,
.column-resize-handle.is-active::after {
  background: #2563eb;
}

body.is-column-resizing,
body.is-column-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

body.is-column-dragging,
body.is-column-dragging * {
  cursor: var(--cursor-grabbing), grabbing !important;
  user-select: none;
}

.table-header .table-cell:first-child {
  z-index: 4;
}

.group-row,
.empty-row {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
  color: #64748b;
  display: flex;
  font-weight: 800;
  min-height: 38px;
  padding: 0 16px;
}

.group-row {
  border-radius: 0;
  cursor: pointer;
  gap: 8px;
  justify-content: flex-start;
  width: 100%;
}

.group-row:hover,
.group-row:focus-visible {
  background: #f1f5f9;
  color: #475569;
}

.group-marker {
  align-items: center;
  color: #c7cbd3;
  display: inline-flex;
  flex: 0 0 18px;
  font-size: 14px;
  height: 18px;
  justify-content: center;
  line-height: 1;
  transform: translateY(-1px);
  width: 18px;
}

.group-count {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 700;
}

.empty-row {
  color: #98a2b3;
  font-weight: 500;
}

.empty-group-row {
  background: #ffffff;
  min-height: 34px;
}

.cell-input {
  border: 1px solid transparent;
  border-radius: 6px;
  color: #101828;
  font-size: 14px;
  min-height: 32px;
  overflow: hidden;
  padding: 0 8px;
  text-overflow: ellipsis;
  width: 100%;
}

select.cell-input {
  appearance: none;
  background-image: none;
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  cursor: pointer;
  padding-right: 28px;
}

.table-cell:hover select.cell-input,
.table-cell:focus-within select.cell-input {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.table-cell:hover .cell-input,
.table-cell:focus-within .cell-input {
  background-color: transparent;
}

.cell-input:hover,
.cell-input:focus {
  border-color: var(--border-strong);
  outline: none;
}

.date-picker-cell,
.date-input {
  cursor: pointer;
}

.task-title-button {
  background: transparent;
  border: 0;
  color: #0f172a;
  cursor: pointer;
  display: block;
  flex: 1 1 auto;
  font-weight: 500;
  min-height: 32px;
  min-width: 0;
  overflow: hidden;
  padding: 0 8px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.task-title-button:hover {
  background: transparent;
  color: var(--accent);
}

.is-saving .cell-input,
.is-saving .badge-select {
  border-color: rgba(37, 99, 235, 0.36);
}

.has-error .cell-input,
.has-error .badge-select {
  border-color: rgba(180, 35, 24, 0.55);
}

.cell-state {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 7px;
  position: absolute;
  right: 8px;
  top: -9px;
  z-index: 2;
}

.has-error .cell-state {
  border-color: rgba(180, 35, 24, 0.28);
  color: var(--danger);
}

.new-task-input {
  background: transparent;
  color: #64748b;
  padding-left: 20px;
}

.new-task-input::placeholder {
  color: #94a3b8;
}

.new-task-row .new-task-title-cell::before {
  color: #94a3b8;
  content: '+';
  font-size: 18px;
  font-weight: 500;
  left: 18px;
  line-height: 1;
  position: absolute;
}

.new-task-row .cell-input:hover,
.new-task-row .cell-input:focus {
  background: #ffffff;
  border-color: transparent;
  box-shadow: none;
}

.new-task-row:hover .table-cell {
  background: #fbfdff;
}

.watchers-control {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.watcher-pill {
  background: #eff6ff;
  border-radius: 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  min-height: 28px;
  max-width: 130px;
  overflow: hidden;
  padding: 0 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watcher-pill:hover {
  background: #dbeafe;
}

.watcher-add-select {
  flex: 1 1 120px;
  font-size: 13px;
  min-height: 30px;
  min-width: 120px;
}

.status-cell {
  align-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  background: var(--tag-bg, #eff6ff);
  border-radius: 5px;
  color: var(--tag-text, var(--accent));
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  max-width: 160px;
  overflow: hidden;
  padding: 5px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tags-control {
  min-width: 0;
  position: relative;
  width: 100%;
}

.tags-trigger {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  min-height: 32px;
  padding: 2px 28px 2px 8px;
  position: relative;
  width: 100%;
}

.tags-trigger::after {
  background: no-repeat center / 14px 14px url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  content: '';
  height: 14px;
  opacity: 0;
  position: absolute;
  right: 8px;
  top: calc(50% - 7px);
  width: 14px;
}

.table-cell:hover .tags-trigger::after,
.table-cell:focus-within .tags-trigger::after,
.detail-attribute:hover .tags-trigger::after,
.detail-attribute:focus-within .tags-trigger::after,
.tags-trigger[aria-expanded='true']::after {
  opacity: 1;
}

.tags-trigger:hover,
.tags-trigger:focus,
.tags-trigger[aria-expanded='true'] {
  border-color: var(--border-strong);
}

.tags-trigger:hover {
  background: transparent;
  color: #64748b;
}

.tags-list {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.task-details .tags-trigger {
  align-items: flex-start;
  height: auto;
  min-height: 32px;
}

.task-details .tags-list {
  flex-wrap: wrap;
  overflow: visible;
  padding: 2px 0;
}

.task-details .tag-pill {
  max-width: 100%;
}

.tags-empty {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
}

.tag-remove {
  color: currentColor;
  font-size: 13px;
  line-height: 1;
  opacity: 0.58;
}

.tag-remove:hover {
  opacity: 1;
}

.tags-dropdown {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 6px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  display: grid;
  left: 0;
  min-width: 260px;
  overflow: hidden;
  position: absolute;
  top: calc(100% + 4px);
  width: min(320px, 90vw);
  z-index: 80;
}

.tag-search-input {
  background: #f7f7fb;
  border: 0;
  border-radius: 0;
  color: #64748b;
  min-height: 42px;
}

.tag-search-input:focus {
  box-shadow: none;
}

.tags-dropdown-list {
  display: grid;
  max-height: 230px;
  overflow-y: auto;
  padding: 8px;
}

.tag-option {
  align-items: center;
  background: transparent;
  border-radius: 5px;
  color: #334155;
  display: flex;
  justify-content: flex-start;
  min-height: 40px;
  padding: 6px 8px;
}

.tag-option:hover,
.tag-option:focus {
  background: #f8fafc;
}

.tag-option-empty {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  padding: 8px;
}

.tag-create-row {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #eef2f7;
  color: #334155;
  display: flex;
  font-weight: 800;
  gap: 8px;
  min-height: 54px;
  padding: 10px 14px;
}

.tag-create-button {
  background: transparent;
  min-height: 28px;
  padding: 0;
}

.tag-create-button:hover,
.tag-create-button:focus {
  background: transparent;
}

.tag-tone-pink {
  --tag-bg: #fce7f3;
  --tag-text: #db2777;
}

.tag-tone-green {
  --tag-bg: #dcfce7;
  --tag-text: #16a34a;
}

.tag-tone-yellow {
  --tag-bg: #fef3c7;
  --tag-text: #d97706;
}

.tag-tone-cyan {
  --tag-bg: #cffafe;
  --tag-text: #0891b2;
}

.tag-tone-violet {
  --tag-bg: #ede9fe;
  --tag-text: #7c3aed;
}

.tag-tone-red {
  --tag-bg: #fee2e2;
  --tag-text: #dc2626;
}

.tag-tone-blue {
  --tag-bg: #dbeafe;
  --tag-text: #2563eb;
}

.tag-tone-slate {
  --tag-bg: #e2e8f0;
  --tag-text: #475569;
}

.badge-select {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
}

.readonly-badge {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  padding: 0 12px;
}

.tone-blue {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.tone-amber {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.tone-green {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.tone-red {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b42318;
}

.tone-violet {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.tone-slate {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.new-task-row .table-cell,
.new-task-row {
  color: #a4adbb;
}

.task-details-backdrop {
  background: rgba(15, 23, 42, 0.22);
  inset: 0;
  position: fixed;
  z-index: 20;
}

.task-details {
  background: #ffffff;
  border-left: 1px solid var(--border);
  bottom: 0;
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.16);
  max-width: min(760px, calc(100vw - 72px));
  overflow-y: auto;
  padding: 28px 32px 42px;
  position: fixed;
  right: 0;
  top: 0;
  width: 720px;
  z-index: 21;
}

.task-details-close {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: #64748b;
  display: flex;
  height: 36px;
  justify-content: center;
  min-height: 36px;
  padding: 0;
  position: absolute;
  right: 22px;
  top: 18px;
  width: 36px;
}

.task-details-close:hover {
  background: #eef2f7;
  color: #0f172a;
}

.task-details-card {
  display: grid;
  gap: 18px;
  padding-right: 26px;
}

.task-details-meta,
.task-details-actions,
.task-quick-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.task-status-dot {
  border: 2px solid currentColor;
  border-radius: 6px;
  display: inline-flex;
  height: 20px;
  width: 20px;
}

.muted-text {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
}

.complete-button {
  background: #eef2ff;
  color: #4f46e5;
  min-height: 44px;
  padding: 0 22px;
}

.complete-button::before {
  border: 2px solid currentColor;
  border-radius: 999px;
  content: '';
  display: inline-block;
  height: 18px;
  margin-right: 10px;
  vertical-align: -4px;
  width: 18px;
}

.complete-button:hover,
.complete-button.is-done {
  background: #e0e7ff;
  color: #3730a3;
}

.complete-button.is-restore {
  background: #ecfdf5;
  color: #047857;
}

.complete-button.is-restore:hover,
.complete-button.is-restore:focus {
  background: #d1fae5;
  color: #065f46;
}

.complete-button:disabled {
  cursor: default;
  opacity: 0.74;
}

.task-details-title {
  border: 1px solid transparent;
  border-radius: 8px;
  color: #0f172a;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  min-height: 48px;
  padding: 0 8px;
  width: 100%;
}

.task-details-title:hover,
.task-details-title:focus {
  background: #f8fafc;
  border-color: var(--border);
}

.task-details-title.readonly-title {
  align-items: center;
  display: flex;
  padding: 0;
}

.task-details-title.readonly-title:hover,
.task-details-title.readonly-title:focus {
  background: transparent;
  border-color: transparent;
}

.task-quick-actions {
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 8px;
}

.task-attributes {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  overflow: visible;
}

.detail-attribute {
  align-items: center;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 46px;
  padding: 6px 12px;
  position: relative;
}

.detail-attribute + .detail-attribute {
  border-top: 1px solid #f1f5f9;
}

.detail-attribute:hover,
.detail-attribute:focus-within {
  background: #f1f5f9;
}

.detail-attribute:focus-within {
  z-index: 10;
}

.detail-label {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 800;
}

.detail-value {
  align-items: center;
  display: flex;
  min-width: 0;
}

.detail-value .cell-input,
.detail-value .watchers-control {
  max-width: 100%;
}

.detail-attribute:hover .cell-input,
.detail-attribute:focus-within .cell-input {
  background-color: transparent;
}

.detail-attribute:hover select.cell-input,
.detail-attribute:focus-within select.cell-input {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.readonly-value {
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  min-height: 32px;
  padding: 7px 8px;
}

.task-description-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.details-textarea-field {
  color: #94a3b8;
  display: grid;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
}

.details-textarea-field textarea {
  border: 1px solid transparent;
  border-radius: 8px;
  color: #334155;
  font: inherit;
  min-height: 92px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.details-textarea-field textarea:hover,
.details-textarea-field textarea:focus {
  background: #f8fafc;
  border-color: var(--border);
  outline: none;
}

.readonly-text-block {
  gap: 8px;
}

.readonly-text-value {
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  min-height: 42px;
  padding: 8px 0;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .page-header {
    gap: 14px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .view-tabs {
    display: flex;
    width: 100%;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .view-tabs .tab {
    flex: 1;
    padding: 0 10px;
  }

  .table-actions,
  .sort-menu,
  .sort-button,
  .export-button {
    width: 100%;
  }

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

  .sort-button,
  .export-button {
    justify-content: center;
  }

  .sort-panel {
    left: 0;
    min-width: 0;
    right: 0;
  }

  .table-wrap {
    margin-left: 0;
    margin-right: 0;
  }

  .table-cell:first-child,
  .group-row,
  .empty-row {
    padding-left: 18px;
  }
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  min-height: 42px;
  padding: 0 16px;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

input,
select {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

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

.login-view {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 420px);
  min-height: 100vh;
}

.brand-panel {
  align-content: center;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 58%, #60a5fa);
  color: #ffffff;
  display: grid;
  padding: 56px;
}

.brand-mark {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  display: flex;
  font-size: 24px;
  font-weight: 800;
  height: 52px;
  justify-content: center;
  margin-bottom: 28px;
  width: 52px;
}

.brand-panel h1 {
  margin: 0;
}

.brand-panel h1 {
  font-size: 48px;
  line-height: 1;
}

.brand-panel p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  margin: 16px 0 0;
  max-width: 430px;
}

.login-form {
  align-content: center;
  background: var(--panel);
  display: grid;
  gap: 18px;
  padding: 40px;
}

.login-form label {
  color: var(--muted);
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}

.form-error {
  color: var(--danger);
  margin: 0;
}

.tasks-view {
  margin: 0 auto;
  max-width: 1120px;
  padding: 32px 24px;
}

.eyebrow,
.status-line {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

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

.settings-menu {
  position: relative;
}

.icon-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  color: #475569;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

.icon-button:hover,
.icon-button:focus {
  background: #f8fafc;
  color: var(--accent);
}

.icon-button svg,
.settings-visibility-button svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.settings-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
  color: #0f172a;
  max-width: calc(100vw - 48px);
  min-width: 760px;
  padding: 14px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(960px, calc(100vw - 48px));
  z-index: 30;
}

.settings-panel-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.settings-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: start;
}

.settings-nav {
  border-right: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 12px;
  width: 170px;
}

.settings-nav-button {
  background: transparent;
  color: #64748b;
  justify-content: flex-start;
  line-height: 1.25;
  min-height: 36px;
  max-height: 48px;
  overflow: hidden;
  padding: 6px 10px;
  text-align: left;
  white-space: normal;
}

.settings-nav-button:hover,
.settings-nav-button:focus,
.settings-nav-button.is-active {
  background: #f1f5f9;
  color: #0f172a;
}

.settings-panel-header h2,
.settings-section h3 {
  font-size: 15px;
  line-height: 1.2;
  margin: 0;
}

.settings-section {
  min-width: 0;
}

.settings-reset-button {
  background: transparent;
  color: #64748b;
  font-size: 13px;
  min-height: 32px;
  padding: 0 10px;
}

.settings-reset-button:hover,
.settings-reset-button:focus {
  background: #f1f5f9;
  color: #0f172a;
}

.settings-help {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  margin: 6px 0 12px;
}

.settings-empty {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 7px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  margin: 12px 0 0;
  padding: 14px;
}

.settings-column-list {
  display: grid;
  gap: 6px;
  max-height: min(520px, calc(100vh - 190px));
  overflow-y: auto;
  padding-right: 2px;
}

.settings-column-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  display: grid;
  gap: 8px;
  grid-template-columns: 28px minmax(0, 1fr) 72px 34px;
  min-height: 44px;
  padding: 6px 8px;
}

.settings-column-row.is-hidden {
  background: #f8fafc;
  color: #94a3b8;
}

.settings-column-row.is-dragging {
  border-color: #bfdbfe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.settings-row-drag {
  background-color: transparent;
  background-image: radial-gradient(circle, #9aa3b2 1.2px, transparent 1.5px);
  background-position: center;
  background-size: 4px 4px;
  cursor: var(--cursor-grab), grab;
  height: 28px;
  min-height: 28px;
  padding: 0;
  width: 28px;
}

.settings-row-drag:hover,
.settings-row-drag:focus {
  background-color: #e9edf3;
}

.settings-column-name {
  font-size: 13px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-order-input {
  font-size: 13px;
  min-height: 32px;
  padding: 0 8px;
  text-align: center;
}

.settings-visibility-button {
  align-items: center;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  min-height: 32px;
  padding: 0;
  width: 32px;
}

.settings-visibility-button:hover,
.settings-visibility-button:focus {
  background: #f1f5f9;
  color: var(--accent);
}

.settings-column-row.is-hidden .settings-visibility-button {
  color: #94a3b8;
}

.settings-tags-list {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  max-height: min(560px, calc(100vh - 190px));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 4px 2px 0;
}

.settings-tag-row {
  align-items: center;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1fr) 150px 72px;
  min-height: 48px;
  padding: 7px 10px;
  transition: background-color 160ms ease;
}

.settings-tag-row:hover,
.settings-tag-row:focus-within,
.settings-tag-row.is-editing {
  background: #f7f8fc;
}

.settings-tag-row.is-editing {
  grid-template-columns: 1fr;
  padding: 10px;
}

.settings-tag-name {
  min-width: 0;
}

.settings-tag-date {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.settings-tag-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 160ms ease;
}

.settings-tag-row:hover .settings-tag-actions,
.settings-tag-row:focus-within .settings-tag-actions {
  opacity: 1;
}

.settings-tag-icon {
  align-items: center;
  background: transparent;
  color: #c4cad5;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.settings-tag-icon:hover,
.settings-tag-icon:focus {
  background: #eef2ff;
  color: #4f46e5;
}

.settings-tag-icon svg,
.settings-tag-cancel svg,
.settings-tag-color-trigger svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 17px;
}

.settings-tag-editor {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 60px minmax(220px, 1fr) minmax(90px, auto) 124px 132px;
  min-width: 0;
}

.settings-tag-color-wrap {
  position: relative;
}

.settings-tag-color-trigger {
  align-items: center;
  background: #f4f6fb;
  color: #6b7280;
  display: inline-flex;
  gap: 7px;
  height: 40px;
  justify-content: center;
  min-height: 40px;
  padding: 0;
  width: 60px;
}

.settings-tag-color-trigger::before {
  background: var(--tag-text);
  border-radius: 999px;
  content: '';
  height: 24px;
  width: 24px;
}

.settings-tag-color-trigger:hover,
.settings-tag-color-trigger:focus {
  background: #eef2ff;
  color: #4f46e5;
}

.settings-tag-palette {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 30px);
  left: 0;
  opacity: 0;
  padding: 12px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 6px);
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  width: 94px;
  z-index: 90;
}

.settings-tag-color-wrap:hover .settings-tag-palette,
.settings-tag-color-wrap:focus-within .settings-tag-palette {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.settings-tag-palette-title {
  color: #a3a8b4;
  font-size: 12px;
  font-weight: 800;
  grid-column: 1 / -1;
  line-height: 1.15;
}

.settings-tag-swatch {
  background: var(--tag-text);
  border: 2px solid transparent;
  border-radius: 999px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.settings-tag-swatch:hover,
.settings-tag-swatch:focus,
.settings-tag-swatch.is-selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px #e0e7ff;
}

.settings-tag-swatch.is-selected::after {
  color: #ffffff;
  content: '✓';
  font-size: 14px;
  font-weight: 900;
}

.settings-tag-input {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 7px;
  color: #0f172a;
  min-height: 40px;
}

.settings-tag-editor > .tag-pill {
  align-self: center;
  max-width: 150px;
}

.settings-tag-cancel,
.settings-tag-save {
  min-height: 40px;
  padding: 0 16px;
}

.settings-tag-cancel {
  background: #f4f6fb;
  color: #94a3b8;
  gap: 8px;
}

.settings-tag-cancel:hover,
.settings-tag-cancel:focus {
  background: #eef2ff;
  color: #64748b;
}

.settings-tag-save {
  background: #6366f1;
  color: #ffffff;
}

.settings-tag-save:hover,
.settings-tag-save:focus {
  background: #4f46e5;
}

body.is-settings-column-dragging,
body.is-settings-column-dragging * {
  cursor: var(--cursor-grabbing), grabbing !important;
  user-select: none;
}

@media (max-width: 760px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 34vh;
    padding: 32px 24px;
  }

  .brand-panel h1 {
    font-size: 38px;
  }

  .login-form {
    align-content: start;
    padding: 28px 24px;
  }

  .tasks-view {
    padding: 20px 14px;
  }

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

  .settings-panel {
    left: 0;
    max-width: calc(100vw - 28px);
    min-width: 0;
    right: auto;
    width: calc(100vw - 28px);
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    border-right: 0;
    border-bottom: 1px solid #eef2f7;
    padding: 0 0 10px;
  }

  .settings-tag-row {
    grid-template-columns: minmax(140px, 1fr) 110px 68px;
  }

  .settings-tag-editor {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .settings-tag-editor > .tag-pill,
  .settings-tag-cancel,
  .settings-tag-save {
    grid-column: 1 / -1;
  }
}

.tasks-view {
  display: flex;
  flex-direction: column;
  max-width: none;
  min-height: 100vh;
  padding: 28px 24px 48px;
}

@media (max-width: 760px) {
  .tasks-view {
    min-height: 100vh;
    padding: 20px 14px 36px;
  }
}
