: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;
}

.project-page-context {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.project-page-back,
.project-name-link {
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  padding: 0;
}

.project-page-back:hover,
.project-page-back:focus,
.project-name-link:hover,
.project-name-link:focus {
  background: transparent;
  color: var(--accent-strong);
  text-decoration: underline;
}

.project-page-readonly {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 12px;
}

.project-name-link {
  color: #0f172a;
  font-size: 18px;
  text-align: left;
}

body.is-project-page .table-toolbar {
  justify-content: flex-end;
}

.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 .project-tab {
  margin-left: 18px;
}

.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,
.filter-menu {
  flex: 0 0 auto;
  position: relative;
}

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

.task-search {
  display: inline-flex;
  position: relative;
}

.task-search input {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #0f172a;
  min-height: 42px;
  padding: 0 42px 0 12px;
  width: 220px;
}

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

.task-search-clear {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #64748b;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 6px;
  top: 6px;
  width: 30px;
}

.task-search-clear:hover,
.task-search-clear:focus-visible {
  background: #eef2ff;
  color: #4f46e5;
  outline: none;
}

.task-search-clear svg {
  height: 16px;
  width: 16px;
}

.sort-button,
.filter-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,
.filter-button:hover,
.filter-button:focus,
.filter-button.is-active,
.export-button:hover,
.export-button:focus {
  background: #f8fafc;
  border-color: var(--border-strong);
}

.sort-panel,
.filter-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: 30;
}

.filter-panel {
  min-width: 468px;
  width: 468px;
}

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

.filter-list {
  display: grid;
  gap: 12px;
  max-height: min(720px, calc(100vh - 132px));
  overflow-y: auto;
  padding: 8px;
}

.filter-active-summary {
  background: #ffffff;
  border-bottom: 1px solid #dbe4ef;
  display: grid;
  gap: 8px;
  margin: -8px -8px 0;
  padding: 12px 10px;
  position: sticky;
  top: -8px;
  z-index: 2;
}

.filter-active-header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.filter-active-title {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-active-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-active-chip {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-size: 13px;
  gap: 5px;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 8px 4px 10px;
}

.filter-active-chip:hover,
.filter-active-chip:focus-visible {
  background: #e0e7ff;
  border-color: #a5b4fc;
  outline: none;
}

.filter-active-chip > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-active-chip-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.filter-active-chip-icon svg {
  height: 14px;
  width: 14px;
}

.filter-section {
  border-bottom: 1px solid #eef2f7;
  display: grid;
  gap: 8px;
  padding: 0 2px 12px;
}

.filter-section-title {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-date-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-date-button,
.filter-date-picker {
  background: #f8fafc;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #475569;
  min-height: 32px;
  padding: 0 10px;
}

.filter-date-button:hover,
.filter-date-button:focus,
.filter-date-button.is-active,
.filter-date-picker:hover,
.filter-date-picker:focus-within,
.filter-date-picker.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
}

.filter-date-picker {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  font-weight: 700;
}

.filter-date-picker input {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-weight: 700;
  min-height: 30px;
  padding: 0;
  width: 112px;
}

.filter-checkbox-list {
  display: grid;
  gap: 4px;
  max-height: 192px;
  overflow: auto;
}

.filter-checkbox {
  align-items: center;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  display: flex;
  gap: 8px;
  min-height: 32px;
  padding: 0 8px;
}

.filter-checkbox:hover,
.filter-checkbox:focus-within {
  background: #f8fafc;
}

.filter-checkbox input {
  accent-color: var(--accent);
  flex: 0 0 auto;
  height: 16px;
  margin: 0;
  min-height: 16px;
  padding: 0;
  width: 16px;
}

.filter-checkbox span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-empty {
  color: #94a3b8;
  font-size: 13px;
  padding: 4px 8px;
}

.filter-reset-button {
  background: transparent;
  color: #64748b;
  flex: 0 0 auto;
  margin-left: auto;
  min-height: 34px;
  padding: 0 10px;
}

.filter-reset-button:hover:not(:disabled),
.filter-reset-button:focus-visible {
  background: #f8fafc;
}

.filter-reset-button:disabled {
  color: #cbd5e1;
  cursor: default;
}

.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: 0 0 8px 8px;
  border-top: 0;
  box-shadow: var(--shadow);
  flex: 1 1 auto;
  margin-left: 0;
  margin-right: 0;
  min-height: 360px;
  overflow-x: auto;
  overflow-y: visible;
}

.table-header-shell {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  max-width: 100%;
  overflow: hidden;
  position: sticky;
  top: 0;
  z-index: 20;
}

.table-header-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.table-header-scroll::-webkit-scrollbar {
  display: none;
}

.task-table-head {
  min-height: 0;
}

.task-table-head .table-header {
  position: relative;
  top: auto;
}

.task-pagination {
  align-items: center;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
  margin-top: 16px;
  min-height: 40px;
}

.task-pagination-summary {
  font-size: 13px;
  margin-right: auto;
}

.task-page-size {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
}

.task-page-size select {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #334155;
  min-height: 36px;
  padding: 0 28px 0 10px;
}

.task-pagination-controls {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.task-page-button {
  background: #ffffff;
  border: 1px solid var(--border);
  color: #334155;
  min-height: 36px;
  min-width: 36px;
  padding: 0 10px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

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

.task-page-button:disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: default;
}

.task-page-ellipsis {
  min-width: 24px;
  text-align: center;
}

.rich-text-content a,
.rich-text-editor a {
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.rich-text-content a:hover,
.rich-text-content a:focus-visible,
.rich-text-editor a:hover,
.rich-text-editor a:focus-visible {
  color: #1d4ed8;
  outline: 2px solid rgb(37 99 235 / 28%);
  outline-offset: 2px;
}

.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;
}

.task-row.is-overdue .table-cell {
  background: #fff7f5;
}

.task-row.is-overdue .table-cell:first-child {
  box-shadow: inset 3px 0 0 #ef4444, 1px 0 0 #eef2f7;
}

.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-row.is-overdue:not(.table-header):not(.new-task-row) .table-cell:hover,
.table-row.is-overdue:not(.table-header):not(.new-task-row) .table-cell:focus-within {
  background: #ffede8;
}

.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-date-control {
  align-items: center;
  display: grid;
  gap: 2px;
  grid-template-columns: minmax(0, 1fr) 34px;
  width: 100%;
}

.task-date-control .date-input {
  min-width: 0;
}

.task-date-shortcuts {
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 30px;
  padding: 0 4px;
  transition: border-color 160ms ease, background-color 160ms ease;
  width: 34px;
}

.task-date-shortcuts:hover {
  background: #f8fafc;
  border-color: var(--border-strong);
}

.task-date-shortcuts:focus-visible {
  border-color: #2563eb;
  outline: 2px solid #bfdbfe;
  outline-offset: 1px;
}

.task-date-shortcuts option {
  font-size: 14px;
  font-weight: 600;
}

.deadline-cell {
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
}

.deadline-cell .date-input {
  min-height: 28px;
}

.deadline-cell .date-input,
.deadline-detail-control .date-input {
  color: #101828;
}

.task-row.is-overdue .deadline-cell .date-input,
.deadline-value.is-overdue {
  color: #b42318;
  font-weight: 800;
}

.overdue-hint {
  color: #b42318;
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  padding: 0 8px 4px;
}

.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: 1px solid transparent;
  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;
}

.tag-pill.is-private {
  border-color: currentColor;
  border-style: dashed;
}

.tag-private-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
}

.tag-private-icon svg {
  fill: none;
  height: 12px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 12px;
}

.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:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.tag-option-heading {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 8px 8px 4px;
  text-transform: uppercase;
}

.tag-privacy-hint {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
}

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

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

.tag-create-row {
  background: #ffffff;
  border-top: 1px solid #eef2f7;
  display: grid;
  gap: 4px;
  padding: 8px;
}

.tag-create-button {
  align-items: center;
  background: transparent;
  color: #334155;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 48px;
  padding: 7px 8px;
  text-align: left;
  width: 100%;
}

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

.tag-create-button:focus-visible {
  box-shadow: inset 0 0 0 2px #818cf8;
  outline: 0;
}

.tag-create-button > svg {
  fill: none;
  flex: 0 0 auto;
  height: 18px;
  stroke: #6366f1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.tag-create-button span {
  display: grid;
  gap: 2px;
}

.tag-create-button strong {
  color: #334155;
  font-size: 13px;
  line-height: 1.25;
}

.tag-create-button small {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.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: calc(100vw - 24px);
  overflow: hidden;
  padding: 0;
  position: fixed;
  right: 0;
  top: 0;
  width: 1440px;
  z-index: 21;
}

#taskDetailsContent {
  height: 100%;
}

.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: 20px;
  top: 16px;
  width: 36px;
  z-index: 4;
}

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

.task-details-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
  height: 100%;
  min-height: 0;
}

.task-details-main {
  display: grid;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 32px 42px;
}

.task-comments-panel {
  background: #fbfcff;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.task-comments-header {
  align-items: center;
  background: rgb(255 255 255 / 92%);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex: none;
  gap: 10px;
  min-height: 69px;
  padding: 18px 72px 18px 28px;
}

.task-comments-header h2 {
  color: #0f172a;
  font-size: 18px;
  margin: 0;
}

.task-comments-count {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 7px;
}

.task-comments-feed {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 28px 30px;
  scroll-behavior: smooth;
}

.task-comments-state {
  align-self: center;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.5;
  margin: auto;
  max-width: 280px;
  padding: 40px 0;
  text-align: center;
}

.task-comment-date {
  align-self: center;
  background: #eef2f7;
  border-radius: 999px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin: 8px 0 10px;
  padding: 5px 10px;
}

.task-activity-message {
  align-items: flex-start;
  color: #64748b;
  display: flex;
  gap: 9px;
  line-height: 1.45;
  padding: 4px 12px;
  width: 100%;
}

.task-activity-dot {
  background: #cbd5e1;
  border: 2px solid #fbfcff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px #e2e8f0;
  flex: 0 0 8px;
  height: 8px;
  margin-top: 6px;
  width: 8px;
}

.task-activity-content {
  font-size: 13px;
  min-width: 0;
}

.task-activity-actor {
  color: #64748b;
  font-weight: 650;
}

.task-activity-description {
  color: #64748b;
}

.task-activity-time {
  color: #64748b;
  display: inline-block;
  font-size: 11px;
  margin-left: 8px;
  white-space: nowrap;
}

.task-comment-message {
  align-items: flex-end;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  width: 100%;
}

.task-comment-message.is-own {
  justify-content: flex-end;
}

.task-comment-avatar {
  align-items: center;
  background: #6366f1;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 11px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  margin-bottom: 2px;
  width: 32px;
}

.task-comment-bubble {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 17px 17px 17px 6px;
  box-shadow: 0 2px 8px rgb(15 23 42 / 4%);
  color: #1e293b;
  display: grid;
  gap: 5px;
  max-width: min(82%, 480px);
  min-width: 128px;
  padding: 10px 12px 8px;
  position: relative;
}

.task-comment-bubble.has-message-actions {
  padding-right: var(--comment-actions-space, 56px);
}

.task-comment-bubble.is-editing {
  max-width: min(92%, 520px);
  width: min(92%, 520px);
}

.task-comment-message.is-own .task-comment-bubble {
  background: #eef2ff;
  border-color: #dbe3ff;
  border-radius: 17px 17px 6px 17px;
}

.task-comment-author {
  color: #6366f1;
  font-size: 12px;
  font-weight: 800;
}

.task-comment-message.is-own .task-comment-author {
  color: #4f46e5;
}

.task-comment-text {
  font-size: 14px;
  line-height: 1.45;
  min-width: 0;
  white-space: pre-wrap;
}

.task-comment-text .inline-task-image {
  margin: 5px 0;
}

.task-comment-text .inline-task-image img {
  max-height: 320px;
}

.task-comment-time {
  color: #94a3b8;
  font-size: 11px;
}

.task-comment-footer {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  min-height: 20px;
}

.task-comment-message.is-highlighted .task-comment-bubble {
  animation: task-comment-highlight 1200ms ease-out;
}

@keyframes task-comment-highlight {
  0%, 35% {
    box-shadow: 0 0 0 4px rgb(99 102 241 / 28%);
  }
  100% {
    box-shadow: 0 2px 8px rgb(15 23 42 / 4%);
  }
}

.task-comment-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  position: absolute;
  right: 9px;
  top: 9px;
  transition: opacity 160ms ease;
  z-index: 1;
}

.task-comment-edit-button,
.task-comment-reply-button {
  align-items: center;
  background: rgb(15 23 42 / 78%);
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  transition: background-color 160ms ease;
  width: 36px;
}

.task-comment-actions .inline-task-image-delete {
  opacity: 1;
  position: static;
}

.task-comment-edit-button img,
.task-comment-reply-button img {
  display: block;
  height: 20px;
  width: 20px;
}

.task-comment-bubble:hover .task-comment-actions,
.task-comment-actions:focus-within {
  opacity: 1;
}

.task-comment-edit-button:hover,
.task-comment-edit-button:focus-visible,
.task-comment-reply-button:hover,
.task-comment-reply-button:focus-visible {
  background: #4f46e5;
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

.task-comment-delete:disabled {
  cursor: wait;
  opacity: 0.55;
}

@media (hover: none) {
  .task-comment-actions {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-comment-message.is-highlighted .task-comment-bubble {
    animation: none;
    box-shadow: 0 0 0 3px rgb(99 102 241 / 24%);
  }
}

.task-comment-reply-quote {
  background: rgb(99 102 241 / 7%);
  border: 0;
  border-left: 3px solid #6366f1;
  border-radius: 5px;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px;
  text-align: left;
  width: 100%;
}

.task-comment-reply-quote:hover,
.task-comment-reply-quote:focus-visible {
  background: rgb(99 102 241 / 13%);
  outline: none;
}

.task-comment-reply-author {
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
}

.task-comment-reply-text {
  color: #64748b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-comment-edit-form {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.task-comment-edit-input {
  background: #ffffff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  line-height: 1.45;
  max-height: 260px;
  min-height: 74px;
  overflow-y: auto;
  padding: 9px 10px;
  white-space: pre-wrap;
}

.task-comment-edit-input:focus-visible {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgb(99 102 241 / 14%);
  outline: none;
}

.task-comment-edit-input .inline-task-image {
  margin: 5px 0;
  max-width: 100%;
}

.task-comment-edit-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.task-comment-edit-cancel,
.task-comment-edit-save {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 6px 11px;
}

.task-comment-edit-cancel {
  background: transparent;
  color: #64748b;
}

.task-comment-edit-save {
  background: #6366f1;
  color: #ffffff;
}

.task-comment-edit-cancel:hover,
.task-comment-edit-cancel:focus-visible {
  background: #e2e8f0;
  outline: none;
}

.task-comment-edit-save:hover,
.task-comment-edit-save:focus-visible {
  background: #4f46e5;
  outline: none;
}

.task-comment-edit-save:disabled {
  cursor: wait;
  opacity: 0.55;
}

.task-comments-error {
  background: #fef2f2;
  color: #b91c1c;
  flex: none;
  font-size: 13px;
  font-weight: 700;
  margin: 0 20px 8px;
  padding: 9px 11px;
}

.task-comment-composer {
  align-items: flex-end;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: grid;
  flex: none;
  gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr) 42px;
  padding: 16px 20px 18px;
}

.task-comment-reply-composer {
  align-items: center;
  background: #f8fafc;
  border-left: 3px solid #6366f1;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 30px;
  padding: 7px 8px 7px 10px;
}

.task-comment-reply-composer-content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.task-comment-reply-composer-content strong {
  color: #4f46e5;
  font-size: 12px;
}

.task-comment-reply-composer-content span {
  color: #64748b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-comment-reply-composer button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.task-comment-reply-composer button:hover,
.task-comment-reply-composer button:focus-visible {
  background: #e2e8f0;
  color: #334155;
  outline: none;
}

.task-comment-reply-composer button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
  width: 16px;
}

.task-comment-input {
  background: #f6f7fb;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #1e293b;
  cursor: text;
  font: inherit;
  line-height: 1.45;
  max-height: 120px;
  min-height: 44px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  padding: 11px 13px;
  white-space: pre-wrap;
  width: 100%;
}

.task-comment-input:empty::before {
  color: #94a3b8;
  content: attr(data-placeholder);
  pointer-events: none;
}

.task-comment-input:hover {
  border-color: #dbe3ef;
}

.task-comment-input:focus-visible {
  background: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgb(99 102 241 / 14%);
  outline: none;
}

.task-comment-input.is-drag-over {
  background: #eef2ff;
  border-color: #818cf8;
}

.task-comment-image-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  margin-bottom: 3px;
  padding: 0;
  transition: background-color 160ms ease, color 160ms ease;
  width: 36px;
}

.task-comment-image-button:hover,
.task-comment-image-button:focus-visible {
  background: #eef2ff;
  color: #4f46e5;
  outline: none;
}

.task-comment-image-button svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
  width: 19px;
}

.task-comment-input .inline-task-image {
  margin: 8px 0;
  max-width: 100%;
}

.task-comment-input .inline-task-image img {
  max-height: 180px;
}

.task-comment-input .inline-image-upload-marker {
  margin: 6px 0;
  min-height: 56px;
  padding: 12px;
}

.task-comment-input .inline-task-image-delete {
  height: 30px;
  opacity: 1;
  width: 30px;
}

.task-comment-send {
  align-items: center;
  background: #6366f1;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  transition: background-color 160ms ease, opacity 160ms ease, transform 160ms ease;
  width: 42px;
}

.task-comment-send:hover,
.task-comment-send:focus-visible {
  background: #4f46e5;
  outline: 2px solid #c7d2fe;
  outline-offset: 2px;
}

.task-comment-send:active {
  transform: translateY(1px);
}

.task-comment-send:disabled {
  cursor: default;
  opacity: 0.42;
  transform: none;
}

.task-comment-send svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 19px;
}

.task-comments-readonly {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  flex: none;
  font-size: 13px;
  font-weight: 700;
  padding: 17px 24px;
}

.task-details-meta,
.task-details-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-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%;
}

.project-control {
  display: grid;
  gap: 6px;
  max-width: 100%;
  width: 100%;
}

.project-create-row {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 36px;
  max-width: 100%;
}

.project-create-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  transition: background-color 160ms ease, color 160ms ease;
  width: 36px;
}

.project-create-button svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
  width: 19px;
}

.project-create-button:hover,
.project-create-button:focus-visible {
  background: #eef2ff;
  color: #4f46e5;
  outline: none;
}

.deadline-detail-control {
  display: grid;
  gap: 2px;
  max-width: 100%;
  width: 100%;
}

.deadline-detail-control .overdue-hint {
  padding-bottom: 0;
}

.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-checklists-block {
  display: grid;
  gap: 10px;
}

.checklist-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}

.checklist-header {
  align-items: start;
  display: grid;
  gap: 8px 10px;
  grid-template-columns: 22px minmax(0, 1fr) 36px;
  padding: 16px 18px 8px;
}

.checklist-header.is-readonly {
  grid-template-columns: 22px minmax(0, 1fr);
}

.checklist-header.is-readonly .checklist-progress {
  grid-column: 2;
}

.checklist-icon {
  color: var(--accent);
  display: inline-flex;
  height: 20px;
  width: 20px;
}

.checklist-icon svg,
.new-checklist-button svg,
.checklist-add-item svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 20px;
}

.checklist-title {
  background: transparent;
  border: 1px solid transparent;
  color: #334155;
  font-size: 16px;
  font-weight: 800;
  min-height: 26px;
  padding: 0;
  width: 100%;
}

.checklist-title:hover,
.checklist-title:focus {
  border-color: transparent;
  box-shadow: none;
}

.checklist-progress {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 14px;
  gap: 10px;
  grid-column: 2 / 4;
}

.checklist-delete-button {
  align-self: start;
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
}

.checklist-progress-track {
  background: #e5e7eb;
  border-radius: 999px;
  display: inline-flex;
  height: 5px;
  overflow: hidden;
  width: 72px;
}

.checklist-progress-bar {
  background: var(--accent);
  border-radius: inherit;
  display: block;
}

.checklist-items {
  display: grid;
  padding: 0 24px;
}

.checklist-item,
.checklist-add-item {
  align-items: center;
  border-top: 1px solid #eef2f7;
  color: #334155;
  display: grid;
  gap: 10px;
  grid-template-columns: 20px minmax(0, 1fr);
  min-height: 54px;
}

.checklist-item input[type='checkbox'] {
  accent-color: var(--accent);
  height: 18px;
  margin: 0;
  min-height: 18px;
  padding: 0;
  width: 18px;
}

.checklist-item-text,
.checklist-add-item input {
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  min-height: 36px;
  padding: 0;
  width: 100%;
}

.checklist-item-text:hover,
.checklist-item-text:focus,
.checklist-add-item input:hover,
.checklist-add-item input:focus {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.checklist-item.is-done {
  color: #98a2b3;
}

.checklist-item.is-done .checklist-item-text {
  text-decoration: none;
}

.checklist-add-item {
  color: #8b97a8;
  margin: 0 24px;
}

.checklist-add-item svg {
  color: #8b97a8;
}

.new-checklist-button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: #8b97a8;
  display: inline-flex;
  gap: 8px;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 14px;
  width: 100%;
}

.new-checklist-button:hover,
.new-checklist-button:focus {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--accent);
}

.checklist-empty {
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #98a2b3;
  font-weight: 700;
  padding: 16px 18px;
}

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

.attachments-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.attachments-title {
  align-items: center;
  color: #334155;
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  gap: 8px;
}

.attachments-title svg,
.attachment-upload-button svg,
.attachment-action-button svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 20px;
}

.attachments-title svg {
  color: var(--accent);
}

.attachments-limit,
.attachment-meta {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

.attachments-list {
  display: grid;
}

.attachment-row {
  align-items: center;
  border-top: 1px solid #eef2f7;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 8px 0;
}

.attachment-row:first-child {
  border-top: 0;
}

.attachment-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.attachment-name {
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-actions {
  display: inline-grid;
  gap: 8px;
  grid-auto-flow: column;
  grid-auto-columns: 36px;
}

.attachment-action-button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #64748b;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.attachment-action-button:hover,
.attachment-action-button:focus {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--accent);
}

.attachment-delete-button:hover,
.attachment-delete-button:focus {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.attachment-action-button:disabled {
  cursor: default;
  opacity: 0.56;
}

.attachment-upload-row {
  display: grid;
}

.attachment-upload-button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: #8b97a8;
  display: inline-flex;
  gap: 8px;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 14px;
  width: 100%;
}

.attachment-upload-button:hover,
.attachment-upload-button:focus,
.attachment-upload-button.is-drag-over {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--accent);
}

.attachment-upload-button.is-drag-over {
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.attachments-empty,
.attachments-error {
  border-radius: 8px;
  font-weight: 700;
  padding: 12px 14px;
}

.attachments-empty {
  background: #f8fafc;
  color: #98a2b3;
}

.attachments-error {
  background: #fef2f2;
  color: #b91c1c;
}

.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;
}

.rich-text-field {
  min-width: 0;
}

.rich-text-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.rich-text-image-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.rich-text-image-button svg,
.inline-task-image-delete svg {
  fill: none;
  flex: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 20px;
}

.rich-text-image-button:hover,
.rich-text-image-button:focus-visible {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
  outline: none;
}

.rich-text-editor {
  border: 1px solid transparent;
  border-radius: 8px;
  color: #334155;
  cursor: text;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  min-height: 112px;
  overflow-wrap: anywhere;
  padding: 12px;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  white-space: pre-wrap;
}

.rich-text-editor:empty::before {
  color: #94a3b8;
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-text-editor:hover {
  background: #f8fafc;
  border-color: var(--border);
}

.rich-text-editor:focus-visible,
.rich-text-editor.is-drag-over {
  background: #f8fafc;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 14%);
  outline: none;
}

.rich-text-field.is-saving .rich-text-editor {
  opacity: 0.72;
}

.rich-text-content {
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.inline-task-image {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: block;
  margin: 10px 0;
  max-width: 100%;
  min-height: 72px;
  overflow: hidden;
  position: relative;
  width: fit-content;
}

.inline-task-image img {
  display: block;
  height: auto;
  max-height: 520px;
  max-width: 100%;
  object-fit: contain;
}

.inline-task-image.is-previewable {
  cursor: zoom-in;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.inline-task-image.is-previewable:hover,
.inline-task-image.is-previewable:focus-within {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgb(99 102 241 / 16%);
  outline: none;
}

.inline-task-image.is-previewable img:focus-visible {
  outline: none;
}

.inline-task-image-status,
.inline-image-upload-marker {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 72px;
  padding: 18px;
}

.inline-image-upload-marker {
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  border-radius: 9px;
  color: #2563eb;
  margin: 10px 0;
}

.rich-text-caret-line {
  cursor: text;
  display: block;
  line-height: 1.55;
  min-height: 24px;
}

.inline-task-image-delete {
  align-items: center;
  background: rgb(15 23 42 / 78%);
  border: 0;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  opacity: 0;
  position: absolute;
  right: 9px;
  top: 9px;
  transition: background-color 160ms ease, opacity 160ms ease;
  width: 36px;
}

.inline-task-image:hover .inline-task-image-delete,
.inline-task-image-delete:focus-visible {
  opacity: 1;
}

.inline-task-image-delete:hover,
.inline-task-image-delete:focus-visible {
  background: #b91c1c;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.image-preview-dialog {
  background: #0f172a;
  border: 0;
  border-radius: 14px;
  color: #f8fafc;
  height: min(92dvh, 1080px);
  max-height: none;
  max-width: none;
  overflow: hidden;
  padding: 0;
  width: min(94vw, 1600px);
}

.image-preview-dialog::backdrop {
  background: rgb(2 6 23 / 86%);
}

.image-preview-header {
  align-items: center;
  background: #111827;
  border-bottom: 1px solid rgb(148 163 184 / 24%);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 14px 10px 20px;
}

.image-preview-header h2 {
  font-size: 15px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview-toolbar {
  align-items: center;
  display: flex;
  flex: none;
  gap: 6px;
}

.image-preview-toolbar button {
  align-items: center;
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 8px;
  color: #f8fafc;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  min-width: 40px;
  padding: 0 12px;
}

.image-preview-toolbar button:hover,
.image-preview-toolbar button:focus-visible {
  background: rgb(255 255 255 / 16%);
  border-color: rgb(255 255 255 / 34%);
  outline: 2px solid #818cf8;
  outline-offset: 1px;
}

.image-preview-toolbar button:disabled {
  cursor: default;
  opacity: 0.42;
}

.image-preview-toolbar svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.image-preview-viewport {
  align-items: center;
  display: grid;
  height: calc(100% - 64px);
  justify-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px;
  position: relative;
  touch-action: pan-x pan-y pinch-zoom;
}

.image-preview-viewport img {
  display: block;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.image-preview-viewport.is-zoomed {
  align-items: start;
  justify-items: start;
}

.image-preview-viewport.is-zoomed img {
  max-height: none;
  max-width: none;
}

.image-preview-status {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

@media (max-width: 760px) {
  .image-preview-dialog {
    border-radius: 0;
    height: 100dvh;
    width: 100vw;
  }

  .image-preview-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: 104px;
    padding: 10px 12px;
  }

  .image-preview-header h2 {
    max-width: 100%;
  }

  .image-preview-toolbar {
    justify-content: flex-end;
    width: 100%;
  }

  .image-preview-toolbar button {
    height: 38px;
    min-width: 38px;
    padding: 0 10px;
  }

  .image-preview-viewport {
    height: calc(100% - 104px);
    padding: 12px;
  }
}

.rich-text-error {
  background: #fef2f2;
  border-radius: 7px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 11px;
}

.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: 1100px) {
  .task-details {
    max-width: 100vw;
    overflow-y: auto;
    width: 100vw;
  }

  #taskDetailsContent {
    height: auto;
    min-height: 100%;
  }

  .task-details-card {
    display: block;
    height: auto;
  }

  .task-details-main {
    overflow: visible;
  }

  .task-comments-panel {
    border-left: 0;
    border-top: 1px solid #e2e8f0;
    min-height: 640px;
  }

  .task-comments-feed {
    min-height: 440px;
  }
}

@media (max-width: 760px) {
  .task-details-main {
    padding: 22px 18px 30px;
  }

  .task-details-close {
    right: 14px;
    top: 14px;
  }

  .task-comments-header {
    padding-left: 18px;
    padding-right: 62px;
  }

  .task-comments-feed {
    padding: 18px 14px 24px;
  }

  .task-comment-bubble {
    max-width: calc(100% - 42px);
  }

  .task-comment-composer {
    padding: 12px 14px 14px;
  }

  .rich-text-image-button span {
    display: none;
  }

  .inline-task-image img {
    max-height: 360px;
  }

  .inline-task-image-delete {
    opacity: 1;
  }

  .task-comment-actions {
    opacity: 1;
  }

  .project-page-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .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;
  }

  .view-tabs .project-tab {
    margin-left: 0;
  }

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

  .filter-list {
    max-height: min(680px, calc(100vh - 190px));
  }

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

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

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

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

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

  .task-pagination {
    align-items: stretch;
    justify-content: flex-start;
  }

  .task-pagination-summary {
    flex: 1 0 100%;
  }

  .task-pagination-controls {
    max-width: 100%;
    overflow-x: auto;
  }
}

.kanban-task-create-dialog,
.kanban-stages-dialog,
.kanban-stage-delete-dialog {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
  max-height: min(760px, calc(100vh - 40px));
  max-width: calc(100vw - 28px);
  padding: 20px;
  width: min(920px, calc(100vw - 28px));
}

.kanban-task-create-dialog {
  overflow: hidden;
  padding: 0;
  width: min(680px, calc(100vw - 28px));
}

.kanban-stage-delete-dialog {
  width: min(520px, calc(100vw - 28px));
}

.kanban-task-create-dialog::backdrop,
.kanban-stages-dialog::backdrop,
.kanban-stage-delete-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.kanban-task-create-form {
  display: grid;
  max-height: min(820px, calc(100dvh - 40px));
}

.kanban-task-create-header {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  padding: 20px 24px 16px;
}

.kanban-task-create-header p {
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.kanban-task-create-header h2 {
  color: #0f172a;
  font-size: 22px;
  margin: 0;
}

.kanban-task-create-context {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  padding: 10px 24px;
}

.kanban-task-create-fields {
  display: grid;
  gap: 16px;
  overflow-y: auto;
  padding: 20px 24px;
}

.kanban-task-create-field {
  color: #334155;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  min-width: 0;
}

.kanban-task-create-field small {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.kanban-task-create-field input,
.kanban-task-create-field select,
.kanban-task-create-field textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font: inherit;
  font-weight: 400;
  width: 100%;
}

.kanban-task-create-field input,
.kanban-task-create-field select {
  min-height: 44px;
  padding: 0 12px;
}

.kanban-task-create-field textarea {
  line-height: 1.5;
  min-height: 116px;
  padding: 10px 12px;
  resize: vertical;
}

.kanban-task-create-field input:focus-visible,
.kanban-task-create-field select:focus-visible,
.kanban-task-create-field textarea:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  outline: none;
}

.kanban-task-create-dates {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kanban-task-create-feedback {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b42318;
  font-size: 13px;
  margin: 0 24px 16px;
  padding: 10px 12px;
}

.kanban-task-create-actions {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
}

.kanban-stage-delete-description {
  color: #475569;
  line-height: 1.5;
  margin: 18px 0;
}

.kanban-stage-delete-form,
.kanban-stage-delete-target {
  display: grid;
  gap: 8px;
}

.kanban-stage-delete-target {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.kanban-stage-delete-target select {
  min-height: 42px;
}

.kanban-stage-delete-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  line-height: 1.45;
  margin: 4px 0 0;
  padding: 10px 12px;
}

.kanban-stage-delete-warning:empty {
  display: none;
}

.kanban-stage-delete-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.kanban-stages-dialog-header,
.kanban-stage-create-form,
.kanban-stage-settings-row,
.kanban-stage-order-actions {
  align-items: center;
  display: flex;
}

.kanban-stages-dialog-header {
  justify-content: space-between;
}

.kanban-stages-dialog-header p {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 3px;
  text-transform: uppercase;
}

.kanban-stages-dialog-header h2 {
  margin: 0;
}

.kanban-stage-create-form {
  gap: 8px;
  margin: 20px 0 8px;
}

.kanban-stage-create-form input {
  flex: 1;
}

.kanban-stage-settings-feedback {
  color: #475569;
  font-size: 13px;
  min-height: 20px;
}

.kanban-stage-settings-feedback[role="alert"] {
  color: #b42318;
}

.kanban-stage-settings-list {
  display: grid;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
}

.kanban-stage-settings-row {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  gap: 8px;
  padding: 9px;
}

.kanban-stage-color-control {
  align-items: center;
  display: flex;
  flex: 0 0 42px;
}

.kanban-stage-color-control input[type='color'] {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  height: 38px;
  padding: 3px;
  width: 42px;
}

.kanban-stage-color-control input[type='color']:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.kanban-stage-settings-row > input {
  flex: 1 1 210px;
}

.kanban-stage-settings-row > select {
  flex: 1 1 180px;
  min-height: 38px;
}

.kanban-default-button,
.kanban-stage-order-button,
.kanban-stage-remove {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  min-height: 38px;
  padding: 0 10px;
}

.kanban-default-button.is-default {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.kanban-stage-order-actions {
  gap: 4px;
}

.kanban-stage-order-button {
  min-width: 38px;
  padding: 0;
}

.kanban-stage-remove {
  border-color: #fecaca;
  color: #b42318;
}

@media (max-width: 760px) {
  .kanban-task-create-dialog {
    border-radius: 14px 14px 0 0;
    margin-block-end: 0;
    max-width: 100vw;
    width: 100vw;
  }

  .kanban-task-create-form {
    max-height: calc(100dvh - 12px);
  }

  .kanban-task-create-header,
  .kanban-task-create-fields,
  .kanban-task-create-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .kanban-task-create-context {
    padding-left: 16px;
    padding-right: 16px;
  }

  .kanban-task-create-dates {
    grid-template-columns: 1fr;
  }

  .kanban-task-create-feedback {
    margin-left: 16px;
    margin-right: 16px;
  }

  .kanban-task-create-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .kanban-stages-dialog {
    padding: 16px;
  }

  .kanban-stage-create-form,
  .kanban-stage-settings-row {
    align-items: stretch;
    flex-direction: column;
  }

  .kanban-stage-settings-row > input,
  .kanban-stage-settings-row > select {
    flex-basis: auto;
  }
}

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

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;
}

.form-success {
  color: #15803d;
  font-weight: 700;
  margin: 0;
}

.telegram-password-reset-description,
.password-reset-description {
  color: var(--muted);
  line-height: 1.55;
  margin: -4px 0 0;
}

.login-link-button {
  background: transparent;
  border: 0;
  color: var(--accent);
  justify-self: start;
  padding: 0;
}

.login-link-button:hover,
.login-link-button:focus-visible {
  background: transparent;
  color: var(--accent-strong);
  text-decoration: underline;
}

.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: 8px;
  justify-content: flex-end;
}

.account-menu {
  position: relative;
}

.account-menu-trigger {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  color: #0f172a;
  display: inline-flex;
  gap: 8px;
  justify-content: flex-start;
  max-width: 250px;
  min-height: 38px;
  padding: 5px 9px 5px 6px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.account-menu-trigger:hover,
.account-menu-trigger:focus-visible,
.account-menu.is-open .account-menu-trigger {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.account-menu-avatar {
  align-items: center;
  background: #eaf2ff;
  border-radius: 7px;
  color: #2563eb;
  display: inline-flex;
  flex: 0 0 26px;
  font-size: 11px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  letter-spacing: 0.02em;
  width: 26px;
}

.account-menu-workspace {
  font-size: 13px;
  font-weight: 700;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-chevron {
  fill: none;
  flex: 0 0 14px;
  height: 14px;
  margin-left: 2px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 160ms ease;
  width: 14px;
}

.account-menu.is-open .account-menu-chevron {
  transform: rotate(180deg);
}

.account-menu-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  color: #0f172a;
  max-width: calc(100vw - 28px);
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  z-index: 40;
}

.account-menu-panel[hidden] {
  display: none;
}

.account-menu-identity {
  align-items: center;
  display: flex;
  gap: 11px;
  padding: 14px;
}

.account-menu-user-avatar {
  background: #fee2e2;
  color: #be4050;
  flex-basis: 40px;
  font-size: 14px;
  height: 40px;
  width: 40px;
}

.account-menu-user-copy {
  display: grid;
  min-width: 0;
}

.account-menu-user-copy strong,
.account-menu-user-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-user-copy strong {
  font-size: 14px;
  line-height: 1.35;
}

#userLabel,
.account-menu-meta {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.account-switcher {
  border-top: 1px solid #eef2f7;
  color: #64748b;
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
  letter-spacing: 0.03em;
  padding: 12px 14px;
  text-transform: uppercase;
}

.account-switcher select {
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  text-transform: none;
  width: 100%;
}

.account-menu-actions,
.account-menu-footer {
  border-top: 1px solid #eef2f7;
  padding: 6px;
}

.account-menu-action {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #334155;
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 10px;
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px 10px;
  transition: background 160ms ease, color 160ms ease;
  width: 100%;
}

.account-menu-action:hover,
.account-menu-action:focus-visible {
  background: #f1f5f9;
  color: #0f172a;
}

.account-menu-action svg {
  fill: none;
  flex: 0 0 17px;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.account-menu-logout {
  color: #b42318;
}

.account-menu-logout:hover,
.account-menu-logout:focus-visible {
  background: #fef2f2;
  color: #912018;
}

.account-create-backdrop {
  align-items: center;
  background: rgb(15 23 42 / 42%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 60;
}

.account-create-backdrop[hidden] {
  display: none;
}

.account-create-dialog {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 28px 72px rgb(15 23 42 / 28%);
  max-width: 480px;
  padding: 24px;
  width: 100%;
}

.account-create-description,
.account-create-hint,
.account-create-feedback {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.account-create-description {
  margin-top: 12px;
}

.account-create-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.account-create-form > label {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.account-create-form input {
  font-size: 15px;
  min-height: 44px;
  width: 100%;
}

.account-create-feedback {
  min-height: 20px;
}

.account-create-feedback[role='alert'] {
  color: #b42318;
}

.account-create-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.account-create-actions button {
  min-height: 40px;
  min-width: 104px;
}

.account-members-backdrop {
  align-items: center;
  background: rgb(15 23 42 / 42%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 50;
}

.account-members-backdrop[hidden] {
  display: none;
}

.member-deactivation-backdrop {
  align-items: center;
  background: rgb(15 23 42 / 48%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 70;
}

.member-deactivation-backdrop[hidden] {
  display: none;
}

.member-deactivation-dialog {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 28px 72px rgb(15 23 42 / 28%);
  max-height: calc(100vh - 48px);
  max-width: 900px;
  overflow: auto;
  padding: 24px;
  width: 100%;
}

.member-deactivation-description,
.member-deactivation-feedback,
.member-reassignment-heading h3,
.member-reassignment-heading p {
  margin: 0;
}

.member-deactivation-description,
.member-reassignment-heading p,
.member-deactivation-feedback {
  color: #475569;
  font-size: 13px;
}

.member-deactivation-feedback {
  min-height: 20px;
  padding-top: 8px;
}

.member-deactivation-feedback[role='alert'] {
  color: #b42318;
}

.member-dependency-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.member-dependency-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.member-dependency-card strong {
  color: #0f172a;
  font-size: 20px;
}

.member-dependency-card span {
  color: #475569;
  font-size: 12px;
}

.member-reassignment-section {
  border-top: 1px solid #e2e8f0;
  margin-top: 18px;
  padding-top: 18px;
}

.member-reassignment-section[hidden] {
  display: none;
}

.member-reassignment-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.member-reassignment-heading h3 {
  color: #0f172a;
  font-size: 15px;
}

.member-reassignment-heading label {
  color: #475569;
  display: grid;
  flex: 0 0 230px;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
}

.member-reassignment-heading select,
.member-reassignment-row select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  min-height: 40px;
  padding: 8px 10px;
}

.member-reassignment-heading select:focus-visible,
.member-reassignment-row select:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 16%);
  outline: 0;
}

.member-reassignment-list {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-top: 10px;
  overflow: hidden;
}

.member-reassignment-row {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 230px;
  min-height: 62px;
  padding: 10px 12px;
}

.member-reassignment-row:last-child {
  border-bottom: 0;
}

.member-reassignment-row strong {
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-deactivation-confirmation {
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #7c2d12;
  display: flex;
  font-size: 13px;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
}

.member-deactivation-confirmation input {
  flex: 0 0 auto;
  height: 18px;
  margin: 0;
  width: 18px;
}

.member-deactivation-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.profile-account-access > button {
  justify-self: start;
}

.profile-account-access.is-owner {
  background: #f8fafc;
}

.account-lifecycle > button {
  justify-self: start;
}

.account-lifecycle:has(.danger-button:not([hidden])) {
  border-color: #fecaca;
}

.archived-account-list {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.archived-account-list:empty {
  display: none;
}

.archived-account-row {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px;
}

.archived-account-row:last-child {
  border-bottom: 0;
}

.archived-account-details {
  display: grid;
  gap: 4px;
}

.archived-account-details span {
  color: #64748b;
  font-size: 13px;
}

.account-archive-backdrop {
  align-items: center;
  background: rgb(15 23 42 / 52%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 65;
}

.account-archive-backdrop[hidden] {
  display: none;
}

.account-archive-dialog {
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgb(15 23 42 / 24%);
  max-width: 560px;
  padding: 24px;
  width: 100%;
}

.account-archive-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #7c2d12;
  line-height: 1.5;
  margin: 0 0 18px;
  padding: 12px;
}

.account-archive-form {
  display: grid;
  gap: 14px;
}

.account-archive-form > label:not(.member-deactivation-confirmation) {
  color: #334155;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.account-archive-form input:not([type='checkbox']) {
  min-height: 42px;
  width: 100%;
}

.task-scope-controls,
.task-scope-switch {
  align-items: center;
  display: flex;
}

.task-scope-controls {
  gap: 8px;
}

.task-scope-switch {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 3px;
}

.task-scope-button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  min-height: 32px;
  padding: 6px 10px;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.task-scope-button:hover,
.task-scope-button:focus-visible {
  color: #1d4ed8;
}

.task-scope-button.is-active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgb(15 23 42 / 12%);
  color: #1d4ed8;
}

.account-scope-project select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  max-width: 260px;
  min-height: 38px;
  padding: 7px 30px 7px 10px;
}

.account-scope-project select:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 16%);
  outline: 0;
}

.account-scope-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
  font-size: 13px;
  margin: 10px 0 0;
  padding: 9px 12px;
}

.account-scope-notice[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .task-scope-button {
    transition: none;
  }
}

@media (max-width: 760px) {
  .member-deactivation-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .member-deactivation-dialog {
    border-radius: 16px 16px 0 0;
    max-height: calc(100vh - 20px);
    padding: 20px 14px;
  }

  .member-dependency-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-reassignment-heading,
  .member-deactivation-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .member-reassignment-heading label {
    flex-basis: auto;
  }

  .member-reassignment-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .member-deactivation-actions button {
    width: 100%;
  }

  .task-scope-controls {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .task-scope-switch,
  .task-scope-button,
  .account-scope-project select {
    max-width: none;
    width: 100%;
  }
}

.profile-backdrop {
  align-items: center;
  background: rgb(15 23 42 / 42%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 55;
}

.profile-backdrop[hidden] {
  display: none;
}

.profile-dialog {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgb(15 23 42 / 22%);
  max-height: calc(100vh - 48px);
  max-width: 760px;
  overflow: auto;
  padding: 24px;
  width: 100%;
}

.profile-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.profile-header p,
.profile-header h2,
.profile-section h3,
.profile-section p {
  margin: 0;
}

.profile-header p,
.profile-section > div > p,
.profile-field-hint,
.profile-session-details span {
  color: #64748b;
  font-size: 13px;
}

.profile-sections {
  display: grid;
  gap: 14px;
}

.profile-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.profile-section label {
  color: #334155;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.profile-section input:not([type='checkbox']) {
  min-height: 42px;
  width: 100%;
}

.profile-section input[readonly] {
  background: #f8fafc;
  color: #64748b;
}

.profile-section > button[type='submit'] {
  justify-self: start;
}

.profile-field-hint {
  font-weight: 400;
}

.password-input-wrap {
  display: flex;
  position: relative;
}

.password-input-wrap input {
  padding-right: 88px;
}

.password-visibility {
  background: transparent;
  border: 0;
  color: #2563eb;
  font-size: 12px;
  min-height: 34px;
  padding: 0 10px;
  position: absolute;
  right: 4px;
  top: 4px;
}

.password-visibility:hover,
.password-visibility:focus-visible {
  background: #eff6ff;
}

.profile-section .profile-checkbox {
  align-items: center;
  display: flex;
  font-weight: 500;
}

.profile-checkbox input {
  height: 18px;
  margin: 0;
  width: 18px;
}

.profile-feedback {
  color: #166534;
  min-height: 18px;
}

.profile-feedback.is-error {
  color: #b42318;
}

.profile-session-list {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.profile-session-row {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px;
}

.profile-session-row:last-child {
  border-bottom: 0;
}

.profile-session-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-session-details span {
  overflow-wrap: anywhere;
}

.profile-session-current {
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.profile-session-revoke {
  color: #b42318;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .profile-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .profile-dialog {
    border-radius: 16px 16px 0 0;
    max-height: calc(100vh - 20px);
    padding: 20px 14px;
  }

  .profile-session-row {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-session-current,
  .profile-session-revoke {
    align-self: flex-start;
  }
}

.account-members-dialog {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgb(15 23 42 / 22%);
  max-height: calc(100vh - 48px);
  max-width: 960px;
  overflow: auto;
  padding: 24px;
  width: 100%;
}

.account-members-header,
.account-member-row,
.account-member-controls {
  align-items: center;
  display: flex;
}

.account-members-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.account-members-header p,
.account-members-header h2,
.account-members-feedback {
  margin: 0;
}

.account-members-header p,
.account-member-identity span,
.account-members-feedback {
  color: #64748b;
  font-size: 13px;
}

.account-members-list {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.account-invitation-form {
  align-items: end;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1.2fr) minmax(170px, 1fr) minmax(150px, 0.8fr) 170px auto;
  margin: 18px 0;
  padding: 14px;
}

.account-invitation-form label,
.account-invitation-delivery label {
  color: #475569;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.account-invitation-form > label,
.account-invitation-role-field {
  grid-template-rows: 20px 40px;
}

.account-invitation-role-field {
  display: grid;
  gap: 6px;
}

.field-label-line {
  align-items: center;
  display: flex;
  gap: 6px;
  min-height: 20px;
}

.field-label-line small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
}

.account-invitation-role-heading {
  align-items: center;
  color: #475569;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 5px;
}

.role-access-help {
  display: inline-flex;
  position: relative;
}

.role-access-help-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  padding: 0;
  transition: background-color 160ms ease, color 160ms ease;
  width: 20px;
}

.role-access-help-button:hover,
.role-access-help-button:focus-visible {
  background: #e2e8f0;
  color: #2563eb;
}

.role-access-help-button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 16px;
}

.role-access-tooltip {
  background: #0f172a;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgb(15 23 42 / 24%);
  color: #f8fafc;
  display: grid;
  font-size: 12px;
  font-weight: 400;
  gap: 8px;
  left: auto;
  line-height: 1.45;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  position: absolute;
  right: -8px;
  top: calc(100% + 7px);
  transform: translateY(-3px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  visibility: hidden;
  width: min(310px, calc(100vw - 56px));
  z-index: 60;
}

.role-access-tooltip strong {
  color: #ffffff;
}

.role-access-help:hover .role-access-tooltip,
.role-access-help:focus-within .role-access-tooltip {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .role-access-help-button,
  .role-access-tooltip {
    transition: none;
  }
}

.account-invitation-form input,
.account-invitation-form select,
.account-invitation-delivery input {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  min-height: 40px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.account-invitation-form input:focus-visible,
.account-invitation-form select:focus-visible,
.account-invitation-delivery input:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 16%);
  outline: 0;
}

.account-invitation-delivery {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  margin-bottom: 18px;
  padding: 14px;
}

.account-invitation-delivery[hidden] {
  display: none;
}

.account-invitation-delivery > p {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.account-invitation-delivery > .account-invitation-delivery-step {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.account-invitation-delivery-step > div,
.profile-telegram-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.account-invitation-copy-all {
  margin-top: 12px;
}

.invitation-registration-heading p,
.invitation-registration-heading h2 {
  margin: 0;
}

.invitation-registration-heading p {
  color: #64748b;
  font-size: 13px;
}

.invitation-registration-heading h2 {
  color: #0f172a;
  font-size: 20px;
  margin-top: 4px;
}

.profile-telegram-status {
  color: #334155;
  margin: 0;
}

.profile-telegram-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-telegram-link[hidden] {
  display: none;
}

.profile-telegram-link input {
  min-width: 0;
}

.account-invitation-delivery > div {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.account-invitation-delivery input {
  flex: 1;
  min-width: 0;
}

.account-admin-section {
  margin-top: 20px;
}

.account-admin-section h3 {
  color: #0f172a;
  font-size: 14px;
  margin: 0 0 8px;
}

.account-invitations-list,
.account-audit-list {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.account-invitation-row,
.account-audit-row {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 62px;
  padding: 10px 14px;
}

.account-invitation-row:last-child,
.account-audit-row:last-child {
  border-bottom: 0;
}

.account-audit-section {
  border-top: 1px solid #e2e8f0;
  margin-top: 22px;
  padding-top: 16px;
}

.account-audit-section summary {
  color: #334155;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.account-audit-row {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.account-audit-row span,
.account-admin-empty {
  color: #475569;
  font-size: 13px;
}

.account-admin-empty {
  margin: 0;
  padding: 14px;
}

.account-member-row {
  border-bottom: 1px solid #e2e8f0;
  gap: 16px;
  min-height: 74px;
  padding: 12px 14px;
}

.account-member-row:last-child {
  border-bottom: 0;
}

.account-member-identity {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

.account-member-name-row {
  align-items: center;
  display: flex;
  gap: 5px;
  min-width: 0;
}

.account-member-name-row strong {
  min-width: 0;
}

.account-member-identity.is-editing {
  flex: 1 1 280px;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.account-member-identity.is-editing > span {
  grid-column: 1 / -1;
}

.account-member-profile-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  min-height: 38px;
  min-width: 0;
  padding: 8px 10px;
}

.account-member-profile-input:focus-visible {
  border-color: #2563eb;
}

.account-member-profile-edit {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  justify-content: center;
  padding: 0;
  transition: background-color 160ms ease, color 160ms ease;
  width: 28px;
}

.account-member-profile-edit:hover {
  background: #f1f5f9;
  color: #475569;
}

.account-member-profile-edit:focus-visible {
  background: #f1f5f9;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 16%);
  color: #475569;
  outline: 0;
}

.account-member-profile-edit svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 16px;
}

.account-member-status,
.account-member-role {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.account-member-status.is-active {
  background: #dcfce7;
  color: #166534;
}

.account-member-status.is-blocked,
.account-member-status.is-inactive {
  background: #f1f5f9;
  color: #475569;
}

.account-member-role {
  background: #eff6ff;
  color: #1d4ed8;
}

.account-member-controls {
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.account-member-role-select {
  min-height: 38px;
}

.account-member-block {
  background: #fff;
  border: 1px solid #fecaca;
  color: #b42318;
}

.account-member-block:hover,
.account-member-block:focus-visible {
  background: #fef2f2;
}

@media (max-width: 760px) {
  .account-switcher,
  .account-switcher select {
    max-width: none;
    width: 100%;
  }

  .account-create-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .account-create-dialog {
    border-radius: 16px 16px 0 0;
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  }

  .account-create-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .account-members-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .account-members-dialog {
    border-radius: 14px 14px 0 0;
    max-height: calc(100vh - 20px);
    padding: 20px 14px;
  }

  .account-member-row,
  .account-member-controls,
  .account-invitation-row {
    align-items: stretch;
    flex-direction: column;
  }

  .account-member-identity.is-editing {
    grid-template-columns: 1fr;
  }

  .account-member-identity.is-editing > span {
    grid-column: auto;
  }

  .account-member-profile-edit {
    height: 44px;
    margin-block: -8px;
    width: 44px;
  }

  .account-invitation-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .role-access-tooltip {
    left: auto;
    right: -8px;
  }

  .account-invitation-delivery > div {
    align-items: stretch;
    flex-direction: column;
  }

  .account-member-status,
  .account-member-role {
    align-self: flex-start;
  }
}

.settings-menu {
  position: relative;
}

.notification-menu {
  position: relative;
}

.notification-button {
  position: relative;
}

.notification-badge {
  align-items: center;
  background: #dc2626;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 4px;
  position: absolute;
  right: -7px;
  top: -7px;
}

.notification-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
  color: #0f172a;
  max-height: min(640px, calc(100vh - 92px));
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(400px, calc(100vw - 28px));
  z-index: 35;
}

.notification-panel-header {
  align-items: flex-start;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 16px 12px;
}

.notification-panel-header h2 {
  font-size: 16px;
  margin: 0;
}

.notification-panel-header p {
  color: #64748b;
  font-size: 12px;
  margin: 4px 0 0;
}

.notification-read-all {
  background: transparent;
  color: #2563eb;
  flex: 0 0 auto;
  font-size: 12px;
  min-height: 32px;
  padding: 0 8px;
}

.notification-read-all:hover,
.notification-read-all:focus-visible {
  background: #eff6ff;
}

.notification-read-all:disabled {
  color: #94a3b8;
  cursor: default;
}

.notification-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 12px 8px;
}

.notification-tab {
  background: transparent;
  color: #64748b;
  font-size: 12px;
  min-height: 32px;
  padding: 0 11px;
}

.notification-tab:hover,
.notification-tab:focus-visible,
.notification-tab.is-active {
  background: #eef2ff;
  color: #4338ca;
}

.notification-feedback {
  color: #64748b;
  font-size: 12px;
  margin: 0;
  min-height: 0;
  padding: 0 16px;
}

.notification-feedback:not(:empty) {
  padding-bottom: 8px;
}

.notification-list {
  max-height: min(500px, calc(100vh - 220px));
  overflow-y: auto;
}

.notification-item {
  align-items: flex-start;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  border-top: 1px solid #f1f5f9;
  color: #0f172a;
  display: grid;
  gap: 9px;
  grid-template-columns: 8px minmax(0, 1fr);
  min-height: 76px;
  padding: 12px 16px;
  text-align: left;
  width: 100%;
}

.notification-item:hover,
.notification-item:focus-visible {
  background: #f8fafc;
}

.notification-item.is-unread {
  background: #f5f7ff;
}

.notification-item-marker {
  background: transparent;
  border-radius: 999px;
  height: 7px;
  margin-top: 6px;
  width: 7px;
}

.notification-item.is-unread .notification-item-marker {
  background: #4f46e5;
}

.notification-item-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-item-copy strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.notification-item-task {
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item-meta {
  color: #64748b;
  font-size: 11px;
}

.notification-empty {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  padding: 28px 20px 32px;
  text-align: center;
}

.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;
}

.notification-settings-telegram-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 12px;
  padding: 10px 12px;
}

.browser-tab-unread-settings {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 0 0 12px;
  padding: 12px;
}

.browser-tab-unread-settings legend {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  padding: 0 4px;
}

.browser-tab-unread-settings > p {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 10px;
}

.browser-tab-unread-options {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.browser-tab-unread-option {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #334155;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.browser-tab-unread-option:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.browser-tab-unread-option:has(input:checked) {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

.browser-tab-unread-option:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.browser-tab-unread-option input {
  accent-color: #4f46e5;
  cursor: pointer;
  flex: 0 0 auto;
  height: 16px;
  margin: 0;
  width: 16px;
}

.notification-settings-grid {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: visible;
}

.notification-settings-row {
  align-items: center;
  border-top: 1px solid #eef2f7;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) 92px 92px;
  min-height: 52px;
  padding: 8px 12px;
}

.notification-settings-row:first-child {
  border-top: 0;
}

.notification-settings-heading {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  min-height: 38px;
  text-transform: uppercase;
}

.notification-settings-heading span:not(:first-child) {
  text-align: center;
}

.notification-settings-name {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.notification-settings-name strong {
  font-size: 13px;
}

.notification-settings-help {
  display: inline-flex;
  position: relative;
}

.notification-settings-help-button {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #64748b;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-height: 20px;
  padding: 0;
  width: 20px;
}

.notification-settings-help-button:hover,
.notification-settings-help-button:focus-visible {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #4338ca;
}

.notification-settings-tooltip {
  background: #0f172a;
  border-radius: 7px;
  bottom: calc(100% + 7px);
  color: #ffffff;
  display: none;
  font-size: 12px;
  font-weight: 500;
  left: -12px;
  line-height: 1.4;
  padding: 8px 10px;
  position: absolute;
  width: 260px;
  z-index: 45;
}

.notification-settings-help:hover .notification-settings-tooltip,
.notification-settings-help:focus-within .notification-settings-tooltip {
  display: block;
}

.notification-toggle {
  display: flex;
  justify-content: center;
}

.notification-toggle input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.notification-toggle span {
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  display: block;
  height: 22px;
  position: relative;
  transition: background-color 160ms ease;
  width: 38px;
}

.notification-toggle span::after {
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
  content: '';
  height: 16px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 160ms ease;
  width: 16px;
}

.notification-toggle input:checked + span {
  background: #4f46e5;
}

.notification-toggle input:checked + span::after {
  transform: translateX(16px);
}

.notification-toggle input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.24);
}

.notification-toggle input:disabled + span {
  cursor: not-allowed;
  opacity: 0.5;
}

.notification-settings-feedback {
  color: #64748b;
  font-size: 12px;
  min-height: 18px;
  margin: 8px 0 0;
}

.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-group-heading {
  align-items: baseline;
  display: flex;
  gap: 10px;
  margin: 18px 10px 5px;
}

.settings-tag-group-heading strong {
  color: #334155;
  font-size: 13px;
}

.settings-tag-group-heading span {
  color: #64748b;
  font-size: 12px;
}

.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: center;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .settings-panel {
    bottom: 14px;
    left: 14px;
    max-height: calc(100vh - 86px);
    max-width: none;
    min-width: 0;
    overflow-y: auto;
    position: fixed;
    right: 14px;
    top: 72px;
    width: auto;
  }

  .notification-panel {
    bottom: 14px;
    left: 14px;
    max-height: calc(100vh - 86px);
    position: fixed;
    right: 14px;
    top: 72px;
    width: auto;
  }

  .notification-list {
    max-height: calc(100vh - 230px);
  }

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

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

  .notification-settings-row {
    grid-template-columns: minmax(150px, 1fr) 72px 72px;
  }

  .browser-tab-unread-options {
    grid-template-columns: 1fr;
  }

  .notification-settings-tooltip {
    left: auto;
    right: -12px;
    width: min(260px, calc(100vw - 64px));
  }

  .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;
  }
}

@media (max-width: 480px) {
  .account-menu-workspace {
    display: none;
  }

  .account-menu-trigger {
    padding-right: 7px;
  }
}

.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;
  }
}

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

.projects-section {
  margin: 0 auto;
  max-width: 1120px;
  width: 100%;
}

.projects-section-header {
  align-items: flex-end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.projects-section-header h2 {
  color: #0f172a;
  font-size: 20px;
  margin: 0;
}

.projects-section-header p {
  color: #64748b;
  margin: 8px 0 0;
}

.project-create-form {
  align-items: center;
  display: flex;
  gap: 8px;
  max-width: 500px;
  width: 100%;
}

.project-create-form input {
  min-width: 220px;
}

.project-create-form button,
.project-rename-form button,
.project-row-actions button {
  white-space: nowrap;
}

.project-list-tabs {
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 24px;
  margin-bottom: 8px;
}

.project-list-tab {
  background: transparent;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #475569;
  min-height: 44px;
  padding: 0 2px;
}

.project-list-tab:hover,
.project-list-tab:focus-visible,
.project-list-tab.is-active {
  background: transparent;
  border-bottom-color: #2563eb;
  color: #1d4ed8;
}

.projects-feedback {
  color: #475569;
  font-size: 14px;
  min-height: 22px;
  margin: 12px 0;
}

.projects-list {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.project-row {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 86px;
  padding: 18px 20px;
  transition: background-color 180ms ease;
}

.project-row + .project-row {
  border-top: 1px solid #eef2f7;
}

.project-row:hover {
  background: #f8fafc;
}

.project-row-main {
  min-width: 0;
}

.project-row h3 {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.project-row-meta {
  color: #64748b;
  font-size: 13px;
  margin: 7px 0 0;
}

.project-row-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.project-row-actions button,
.project-rename-form button {
  min-height: 36px;
  padding: 0 12px;
}

.project-role-badge {
  background: #eef2ff;
  border-radius: 999px;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.project-archive-button {
  background: #ffffff;
  border: 1px solid #fecaca;
  color: #b42318;
}

.project-archive-button:hover,
.project-archive-button:focus-visible {
  background: #fef2f2;
  border-color: #fca5a5;
}

.project-restore-button,
.project-rename-save {
  background: #2563eb;
  color: #ffffff;
}

.project-rename-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.project-rename-form input {
  min-height: 38px;
  min-width: 260px;
}

.projects-empty {
  color: #64748b;
  padding: 48px 24px;
  text-align: center;
}

.confirmation-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100;
}

.confirmation-dialog {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  max-width: 500px;
  padding: 24px;
  width: 100%;
}

.confirmation-dialog h2 {
  color: #0f172a;
  font-size: 20px;
  margin: 0 0 12px;
}

.confirmation-dialog p {
  color: #475569;
  line-height: 1.55;
  margin: 0;
}

.confirmation-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.danger-button {
  background: #b42318;
}

.danger-button:hover,
.danger-button:focus-visible {
  background: #912018;
}

@media (max-width: 760px) {
  .page-header,
  .projects-section-header,
  .project-row {
    align-items: stretch;
    flex-direction: column;
  }

  .project-create-form,
  .project-rename-form,
  .project-row-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: none;
  }

  .project-create-form input,
  .project-rename-form input {
    min-width: 0;
  }

  .project-row {
    gap: 16px;
  }

  .project-row-actions {
    width: 100%;
  }

  .project-role-badge {
    align-self: flex-start;
  }

  .confirmation-actions {
    flex-direction: column-reverse;
  }
}

.project-members-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100;
}

.project-members-dialog {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  max-height: min(760px, calc(100vh - 40px));
  max-width: 760px;
  overflow-y: auto;
  padding: 24px;
  width: 100%;
}

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

.project-members-eyebrow {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.project-members-header h2 {
  color: #0f172a;
  font-size: 22px;
  margin: 0;
  overflow-wrap: anywhere;
}

.project-members-close {
  align-items: center;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 24px;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

.project-members-close:hover,
.project-members-close:focus-visible {
  background: #f1f5f9;
  color: #0f172a;
}

.project-member-add-form {
  align-items: end;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.55fr) auto;
  padding: 14px;
}

.project-member-add-form label {
  color: #475569;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
}

.project-members-feedback {
  color: #475569;
  font-size: 14px;
  margin: 14px 0 8px;
  min-height: 22px;
}

.project-members-list {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.project-member-row {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 14px;
}

.project-member-row + .project-member-row {
  border-top: 1px solid #eef2f7;
}

.project-member-identity {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.project-member-avatar {
  align-items: center;
  background: #dbeafe;
  border-radius: 50%;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.project-member-identity > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-member-identity strong,
.project-member-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-member-identity strong {
  color: #0f172a;
  font-size: 14px;
}

.project-member-identity > div span {
  color: #64748b;
  font-size: 12px;
}

.project-member-controls {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.project-member-role-select {
  min-height: 38px;
  min-width: 170px;
}

.project-member-role-label {
  background: #eef2ff;
  border-radius: 999px;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
}

.project-member-remove {
  background: #ffffff;
  border: 1px solid #fecaca;
  color: #b42318;
  min-height: 38px;
  padding: 0 12px;
}

.project-member-remove:hover,
.project-member-remove:focus-visible {
  background: #fef2f2;
  border-color: #fca5a5;
}

.project-members-empty {
  color: #64748b;
  padding: 32px 20px;
  text-align: center;
}

@media (max-width: 680px) {
  .project-members-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .project-members-dialog {
    border-radius: 14px 14px 0 0;
    max-height: calc(100vh - 20px);
    padding: 20px 14px;
  }

  .project-member-add-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .project-member-row,
  .project-member-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .project-member-role-select,
  .project-member-remove {
    width: 100%;
  }

  .project-member-role-label {
    align-self: flex-start;
  }
}

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

.page-title-row,
.task-view-switch,
.kanban-toolbar,
.kanban-column-header,
.kanban-card-meta {
  align-items: center;
  display: flex;
}

.page-title-row {
  flex-wrap: wrap;
  gap: 16px;
}

.task-view-switch {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  gap: 2px;
  padding: 3px;
}

.task-view-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #475569;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.task-view-button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 16px;
}

.task-view-button.is-active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  color: #1d4ed8;
}

.task-view-button:focus-visible,
.kanban-card-title:focus-visible,
.kanban-add-task:focus-visible,
.kanban-stage-select:focus-visible,
.kanban-board-scroll:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.kanban-view {
  min-width: 0;
  padding-top: 18px;
}

.kanban-toolbar {
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kanban-toolbar > div:first-child {
  min-width: 210px;
}

.kanban-context-label {
  color: #475569;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
}

.kanban-context-label::after {
  content: ':';
}

#kanbanContextSelect {
  min-height: 38px;
}

.kanban-toolbar-title {
  flex: 1 1 320px;
}

.kanban-toolbar-title h2 {
  font-size: 18px;
  margin: 0;
}

.kanban-toolbar-title p {
  color: #64748b;
  font-size: 13px;
  margin: 4px 0 0;
}

.kanban-feedback {
  color: #475569;
  font-size: 13px;
  min-height: 20px;
  margin: 0 0 8px;
}

.kanban-feedback.is-error {
  color: #b42318;
}

.kanban-board-scroll {
  max-width: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 0 2px 16px;
}

.kanban-board,
.kanban-board-header {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  min-width: max-content;
}

.kanban-board-header-shell {
  background: var(--bg);
  max-width: 100%;
  padding: 4px 2px 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.kanban-board-header-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.kanban-board-header-scroll::-webkit-scrollbar {
  display: none;
}

.kanban-board-header {
  align-items: stretch;
}

.kanban-column-top {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  display: flex;
  flex: 0 0 292px;
  flex-direction: column;
  overflow: hidden;
}

.kanban-column {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0 0 10px 10px;
  border-top: 0;
  display: flex;
  flex: 0 0 292px;
  flex-direction: column;
  max-height: 220vh;
  max-height: 220dvh;
  min-height: 180px;
  overflow: hidden;
}

.kanban-column-header {
  background: var(--kanban-stage-color, #06b6d4);
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
  color: var(--kanban-stage-text-color, #ffffff);
  justify-content: space-between;
  flex: 1 1 auto;
  padding: 13px 14px;
}

.kanban-column-header h3 {
  color: inherit;
  font-size: 14px;
  margin: 0;
}

.kanban-column-header span {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  min-width: 24px;
  padding: 3px 7px;
  text-align: center;
}

.kanban-urgent-summary {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 4px 14px;
}

.kanban-urgent-summary span {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
}

.kanban-urgent-toggle {
  background: transparent;
  color: #1d4ed8;
  font-size: 12px;
  min-height: 32px;
  padding: 4px 6px;
}

.kanban-urgent-toggle:hover,
.kanban-urgent-toggle:focus-visible {
  background: #eff6ff;
  text-decoration: underline;
}

.kanban-urgent-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

@media (pointer: coarse) {
  .kanban-urgent-toggle { min-height: 44px; }
}

.kanban-cards {
  display: grid;
  flex: 1;
  gap: 9px;
  min-height: 160px;
  overflow-y: auto;
  padding: 10px;
  transition: background-color 180ms ease;
}

.kanban-cards.is-drop-target {
  background: #dbeafe;
}

.kanban-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  cursor: grab;
  display: grid;
  gap: 10px;
  padding: 12px;
  transition: border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

@media (pointer: coarse) {
  .kanban-card {
    touch-action: pan-y pinch-zoom;
  }

  .kanban-stage-select,
  .kanban-add-task,
  .task-view-button {
    min-height: 44px;
  }
}

.kanban-card:hover,
.kanban-card:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.09);
}

.kanban-card.is-overdue {
  background: #fff8f6;
  border-color: #fed7cc;
}

.kanban-card.is-dragging,
.kanban-card.is-saving,
.kanban-card.is-pointer-dragging {
  cursor: grabbing;
  opacity: 0.55;
}

.kanban-pointer-preview {
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
  cursor: grabbing;
  left: 0;
  margin: 0;
  max-width: min(292px, calc(100vw - 32px));
  opacity: 0.96;
  pointer-events: none;
  position: fixed;
  top: 0;
  transform-origin: top left;
  z-index: 100;
}

body.is-kanban-pointer-dragging {
  overscroll-behavior: none;
  user-select: none;
}

body.is-kanban-pointer-dragging .kanban-board-scroll {
  touch-action: none;
}

.kanban-stage-indicator {
  display: grid;
  gap: 6px;
  max-width: 260px;
  min-width: 150px;
  width: 100%;
}

.kanban-stage-progress {
  border-radius: 999px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(var(--stage-count), minmax(0, 1fr));
  height: 12px;
  overflow: hidden;
}

.kanban-stage-segment {
  background: #e5e7eb;
  border: 0;
  display: block;
  height: 100%;
  padding: 0;
  transition: background-color 180ms ease;
}

.kanban-stage-segment.is-interactive {
  cursor: pointer;
  outline: 0;
  position: relative;
}

.kanban-stage-segment.is-interactive:hover,
.kanban-stage-segment.is-interactive:focus-visible {
  box-shadow: inset 0 0 0 2px #94a3b8;
  filter: brightness(0.94);
  z-index: 1;
}

.kanban-stage-table-cell .kanban-stage-indicator {
  min-width: 0;
  padding: 8px 10px;
}

.kanban-stage-table-cell .kanban-stage-progress {
  height: 12px;
}

.kanban-stage-table-cell .kanban-stage-name {
  color: #94a3b8;
}

.kanban-stage-table-cell .kanban-stage-detail-select {
  color: #64748b;
  line-height: 1.3;
  min-height: 28px;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .kanban-stage-segment { transition: none; }
}

.kanban-stage-name {
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.kanban-stage-select-row {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.kanban-stage-select-row .kanban-stage-detail-select {
  flex: 1;
  min-width: 0;
}

.kanban-stage-current-swatch {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 50%;
  flex: 0 0 12px;
  height: 12px;
  width: 12px;
}

.kanban-stage-detail-select {
  border: 0;
  color: #334155;
  font-size: 13px;
  min-height: 32px;
  padding: 0 28px 0 0;
}

.kanban-stage-detail-select:hover,
.kanban-stage-detail-select:focus-visible {
  background-color: #f8fafc;
}

.task-details .kanban-stage-indicator.has-stage-pill {
  max-width: 100%;
}

.kanban-stage-pill {
  background-color: var(--kanban-stage-pill-bg, #f1f5f9);
  border: 1px solid var(--kanban-stage-pill-border, #cbd5e1);
  border-radius: 999px;
  color: var(--kanban-stage-pill-text, #475569);
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  width: 100%;
}

select.kanban-stage-pill {
  appearance: none;
  background-image: none;
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  cursor: pointer;
  padding: 0 32px 0 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.kanban-stage-indicator:hover select.kanban-stage-pill,
select.kanban-stage-pill:focus-visible {
  background-color: var(--kanban-stage-pill-bg, #f1f5f9);
  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");
  filter: saturate(1.08);
}

select.kanban-stage-pill:focus-visible {
  box-shadow: 0 0 0 3px rgb(99 102 241 / 14%);
  outline: none;
}

.kanban-stage-pill option {
  background: #ffffff;
  color: #334155;
  font-weight: 500;
}

.kanban-stage-pill.is-readonly {
  align-items: center;
  display: inline-flex;
  padding: 0 12px;
}

@media (pointer: coarse) {
  select.kanban-stage-pill {
    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");
  }
}

.kanban-stage-load-error {
  color: #b42318;
}

@media (pointer: coarse) {
  .kanban-stage-detail-select {
    min-height: 44px;
  }
}

.kanban-card-title {
  background: transparent;
  border: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  min-height: 0;
  padding: 0;
  text-align: left;
}

.kanban-card-meta {
  flex-wrap: wrap;
  gap: 7px;
}

.kanban-priority,
.kanban-deadline {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 7px;
}

.kanban-deadline {
  background: #f1f5f9;
  color: #475569;
}

.kanban-deadline.is-overdue {
  background: #fee2e2;
  color: #b42318;
}

.kanban-assignee {
  color: #475569;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-stage-select-label {
  display: block;
}

.kanban-stage-select {
  font-size: 12px;
  min-height: 34px;
}

.kanban-add-task {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  color: #2563eb;
  flex: 0 0 auto;
  font-size: 13px;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 14px;
  text-align: left;
}

.kanban-add-task:hover {
  background: #eff6ff;
}

.kanban-empty {
  align-self: center;
  color: #94a3b8;
  font-size: 13px;
  margin: 24px 0;
  text-align: center;
}

@media (max-width: 760px) {
  .tasks-view {
    max-width: 100%;
    overflow-x: clip;
    padding-inline: 14px;
  }

  .page-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .kanban-toolbar {
    align-items: stretch;
  }

  .kanban-toolbar > * {
    flex: 1 1 100%;
  }

  .kanban-column {
    flex-basis: min(84vw, 292px);
    max-height: 180vh;
    max-height: 180dvh;
  }

  .kanban-column-top {
    flex-basis: min(84vw, 292px);
  }

  #kanbanStagesButton {
    width: 100%;
  }
}
@media (max-width: 760px) {
  .account-invitation-delivery-step > div,
  .profile-telegram-link {
    grid-template-columns: 1fr;
  }
}
