.task-manager-panel {
  padding: 9px;
}

.task-manager-panel .panel-header {
  grid-template-columns: minmax(220px, 1fr) minmax(600px, 800px);
}

.task-header-toolbar {
  width: 100%;
  max-width: 800px;
  justify-self: end;
  margin-bottom: 0;
  border: 0;
  grid-template-columns: minmax(180px, 1fr) 112px max-content 92px;
  background: transparent;
  padding: 0;
}

.task-view-settings {
  display: flex;
  gap: 6px;
  position: relative;
  align-self: end;
}

.task-view-settings > button {
  display: grid;
  width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: #26354f;
  font-size: 16px;
  font-weight: 900;
}

.task-settings-icon {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.task-view-settings > button.active,
.task-view-settings > button:hover {
  border-color: #bfdbfe;
  background: var(--blue-soft);
  color: var(--blue);
}

.task-view-settings-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 8px;
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(31, 45, 68, 0.14);
  padding: 12px;
}

.task-view-settings-menu label {
  display: grid;
  gap: 6px;
}

.task-view-settings-menu span,
.task-view-settings-menu small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.task-view-settings-menu input {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
}

.task-settings-dialog {
  width: min(460px, 100%);
  overflow: visible;
}

.task-settings-form {
  display: grid;
  gap: 12px;
  overflow: visible;
}

.task-settings-form label {
  display: grid;
  gap: 7px;
}

.task-settings-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.task-settings-scope span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.task-settings-scope strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.task-settings-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.settings-toggle-row {
  position: relative;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  align-items: center;
  gap: 10px !important;
  min-height: 38px;
  cursor: pointer;
}

.settings-toggle-row input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.settings-toggle-row i {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d8e1ed;
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.18);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.settings-toggle-row i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
  content: "";
  transition: transform 160ms ease;
}

.settings-toggle-row input:checked + i {
  background: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.settings-toggle-row input:checked + i::after {
  transform: translateX(18px);
}

.settings-toggle-row input:focus-visible + i {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.task-settings-form p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.numeric-input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.numeric-input-with-unit input {
  min-height: 42px;
  border: 0;
  padding: 0 12px;
  outline: none;
}

.numeric-input-with-unit em {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-left: 1px solid var(--line);
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.priority-filter-field {
  max-width: 112px;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.task-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13px;
}

.task-table th,
.task-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.task-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}

.task-table th button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 12px;
  font-weight: 900;
}

.task-table th button.active,
.task-table th button:hover {
  color: var(--blue);
}

.task-table td strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.table-title-link {
  display: block;
  font-size: 14px;
}

.task-table td small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: #42506a;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.task-table tr:last-child td {
  border-bottom: 0;
}

.table-project-button,
.table-edit-button {
  border: 0;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
}

.dialog-inline-error {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff5f5;
  color: var(--red);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 850;
}

.task-dialog input[aria-invalid="true"] {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.table-edit-button {
  background: #eef3f9;
  color: #26354f;
}

.kanban-board {
  display: flex;
  gap: 10px;
  align-items: stretch;
  height: calc(100vh - 124px);
  min-height: 520px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding-bottom: 6px;
}

.kanban-board.is-dragging .task-card {
  cursor: grabbing;
}

.kanban-board.is-column-dragging .kanban-column {
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.kanban-column {
  flex: 0 0 238px;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
  overflow: visible;
}

.kanban-column.is-empty {
  flex-basis: 170px;
}

.kanban-column.drop-ready {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: -5px;
}

.kanban-column.column-being-dragged {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.16);
  opacity: 0.72;
  transform: translateY(-4px) scale(0.985);
}

.kanban-column.column-being-dragged header,
.kanban-column.column-being-dragged .kanban-stack {
  background: #eaf2ff;
}

.kanban-column.column-drop-before,
.kanban-column.column-drop-after {
  position: relative;
  border-color: rgba(29, 78, 216, 0.36);
  box-shadow: 0 14px 32px rgba(29, 78, 216, 0.12);
}

.kanban-column.column-drop-before::before,
.kanban-column.column-drop-after::after {
  position: absolute;
  top: 8px;
  bottom: 8px;
  z-index: 6;
  width: 2px;
  border-radius: 999px;
  background: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.18);
  content: "";
  pointer-events: none;
}

.kanban-column.column-drop-before::before {
  left: -8px;
}

.kanban-column.column-drop-after::after {
  right: -8px;
}

.kanban-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  user-select: none;
}

.kanban-column header:active,
.kanban-column header.dragging-column {
  cursor: grabbing;
}

.kanban-column header.dragging-column {
  background: #dbeafe;
}

.kanban-column header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.kanban-column header span {
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: #e7edf5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.kanban-stack {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  padding: 8px;
  scrollbar-gutter: stable;
}

.task-card-drop-wrap {
  position: relative;
  display: grid;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.task-card-drop-wrap.drop-before::before,
.task-card-drop-wrap.drop-after::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 4;
  height: 3px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.task-card-drop-wrap.drop-before::before {
  top: -6px;
}

.task-card-drop-wrap.drop-after::after {
  bottom: -6px;
}

.kanban-board.is-column-dragging .task-card-drop-wrap.drop-before::before,
.kanban-board.is-column-dragging .task-card-drop-wrap.drop-after::after {
  display: none;
}

.gantt-panel {
  display: grid;
  gap: 12px;
}

.task-analytics-panel {
  display: grid;
  gap: 12px;
}

.analytics-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) minmax(320px, 1fr) minmax(260px, 0.8fr);
  gap: 12px;
}

.analytics-focus-card,
.analytics-risk-strip {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.analytics-focus-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.analytics-focus-card h2 {
  margin: 0;
  font-size: 22px;
}

.analytics-focus-card p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.analytics-ring {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 57%, transparent 58%),
    conic-gradient(#2563eb var(--rate), #e6edf7 0);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.analytics-ring strong {
  margin-top: 14px;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.analytics-ring span {
  margin-top: -28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.analytics-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.analytics-hero .analytics-summary {
  align-content: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-risk-strip {
  display: grid;
  gap: 8px;
}

.analytics-risk {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
}

.analytics-risk span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.analytics-risk strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
}

.analytics-risk.danger {
  background: #fff1f2;
}

.analytics-risk.warning {
  background: #fffbeb;
}

.analytics-risk.neutral {
  background: #f1f5f9;
}

.analytics-risk.calm {
  background: #ecfdf5;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analytics-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.analytics-card header {
  align-items: start;
  display: flex;
  gap: 2px;
  justify-content: space-between;
}

.analytics-card h2 {
  margin: 0;
  font-size: 16px;
}

.analytics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.analytics-legend span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.analytics-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.analytics-legend i.created {
  background: #2563eb;
}

.analytics-legend i.completed {
  background: #059669;
}

.analytics-throughput-card {
  gap: 14px;
}

.throughput-chart {
  align-items: end;
  display: grid;
  gap: 8px;
  overflow-x: auto;
  min-height: 224px;
  padding: 14px 10px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(to top, rgba(148, 163, 184, 0.14) 1px, transparent 1px) 0 0 / 100% 25%,
    #fbfdff;
}

.throughput-day {
  display: grid;
  grid-template-rows: minmax(154px, 1fr) 22px;
  gap: 8px;
  min-width: 0;
  height: 100%;
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.throughput-bars {
  align-items: end;
  display: grid;
  grid-template-columns: repeat(2, minmax(14px, 1fr));
  gap: 7px;
  min-width: 0;
}

.throughput-series {
  height: 100%;
  min-width: 0;
  position: relative;
}

.throughput-series strong {
  bottom: calc(var(--bar-height) + 4px);
  left: 50%;
  overflow: hidden;
  position: absolute;
  transform: translateX(-50%);
  color: #172033;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: clip;
}

.throughput-bars b {
  bottom: 0;
  display: block;
  height: var(--bar-height);
  left: 0;
  position: absolute;
  width: 100%;
  border-radius: 6px 6px 2px 2px;
}

.throughput-bars b.created {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.throughput-bars b.completed {
  background: linear-gradient(180deg, #34d399, #059669);
}

.throughput-date {
  overflow: hidden;
  align-self: center;
  width: 100%;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  line-height: 22px;
  text-align: center;
  white-space: nowrap;
}

.analytics-status-card,
.analytics-priority-card {
  align-content: start;
}

.status-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-height: 166px;
  padding-top: 4px;
}

.status-flow-step {
  display: grid;
  grid-template-rows: 54px 1fr;
  gap: 8px;
  min-width: 0;
}

.status-flow-step div {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.status-flow-step strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.status-flow-step span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.status-flow-step b {
  align-self: end;
  display: block;
  width: 100%;
  min-height: 12px;
  border-radius: 8px 8px 3px 3px;
  opacity: 0.9;
}

.analytics-wide {
  grid-column: 1 / -1;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
}

.bar-row span,
.bar-row strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.bar-row div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #eef3f9;
}

.bar-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #14b8a6);
}

.priority-heatmap {
  display: grid;
  grid-template-columns: 42px repeat(4, minmax(42px, 1fr));
  gap: 6px;
  align-items: stretch;
  margin-top: 4px;
}

.priority-heatmap span,
.priority-heatmap strong,
.priority-heatmap em {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.priority-heatmap span,
.priority-heatmap strong {
  color: var(--muted);
}

.priority-heatmap em {
  color: #172033;
  background: color-mix(in srgb, var(--heat-color) calc(var(--heat) * 100%), #ffffff);
}

.heatmap-corner {
  min-height: 34px;
}

.analytics-project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.analytics-project-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 32px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--text);
  padding: 10px 12px;
  font-weight: 850;
}

.analytics-project-list button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.analytics-project-list button > span strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-project-list button small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.analytics-project-list button i {
  overflow: hidden;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e8eef7;
}

.analytics-project-list button i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}


.gantt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gantt-toolbar > div:first-child {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 6px 10px;
}

.gantt-toolbar strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
}

.gantt-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.gantt-scale {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 124px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.gantt-scale button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.gantt-scale button.active {
  background: #172033;
  color: #ffffff;
}

.gantt-period {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.gantt-period label {
  display: grid;
  gap: 4px;
}

.gantt-period span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.gantt-period input {
  min-height: 42px;
  width: 142px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 750;
}

.gantt-period button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.gantt-period button:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

.gantt-table {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.gantt-left {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 260px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.gantt-head {
  display: flex;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gantt-timeline {
  display: grid;
  min-width: max-content;
}

.gantt-header {
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.gantt-unit {
  display: grid;
  align-content: center;
  min-height: 38px;
  border-right: 1px solid var(--line);
  padding: 0 7px;
}

.gantt-unit strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.gantt-unit span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 750;
}

.gantt-task-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 10px;
  color: var(--text);
  text-align: left;
}

.gantt-task-label:hover {
  background: #f8fbff;
}

.gantt-task-label span {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.gantt-status-chip {
  display: inline-grid;
  min-width: 58px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #e8eef6;
  color: #526177 !important;
  padding: 0 8px;
}

.gantt-status-chip.doing {
  background: var(--blue-soft);
  color: var(--blue) !important;
}

.gantt-status-chip.review {
  background: var(--amber-soft);
  color: #a16207 !important;
}

.gantt-status-chip.pending {
  background: #f2e9ff;
  color: #7c3aed !important;
}

.gantt-status-chip.done {
  background: var(--green-soft);
  color: var(--green) !important;
}

.gantt-project {
  width: fit-content;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue) !important;
  padding: 2px 7px;
}

.gantt-task-label strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-row {
  position: relative;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.gantt-cell {
  grid-row: 1;
  min-height: 46px;
  border-right: 1px solid #edf1f6;
}

.gantt-bar {
  grid-row: 1;
  z-index: 1;
  align-self: center;
  min-width: 30px;
  height: 22px;
  margin: 0 4px;
  border-radius: 7px;
  background: #94a3b8;
  color: #ffffff;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 22px;
}

.gantt-bar.doing {
  background: var(--blue);
}

.gantt-bar.review {
  background: var(--amber);
}

.gantt-bar.done {
  background: var(--green);
}

.add-card-button {
  width: 100%;
  border: 1px dashed #b8c5d6;
  background: #ffffff;
  color: #526177;
  text-align: left;
}

.add-card-button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.column-empty {
  display: grid;
  min-height: 116px;
  place-items: center;
  border: 1px dashed #c8d2df;
  border-radius: 8px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 800;
}

.task-card {
  position: relative;
  display: block;
  max-width: 100%;
  overflow-x: clip;
  border: 1px solid var(--line);
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
  box-shadow: 0 6px 18px rgba(31, 45, 68, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.task-card.has-attachments {
  padding-right: 40px;
}

.task-card:hover {
  border-color: #c4d0df;
  box-shadow: 0 12px 30px rgba(31, 45, 68, 0.09);
  transform: translateY(-1px);
}

.kanban-stack .task-card:not(.dragging):hover {
  transform: none;
}

.task-card[draggable="true"] {
  cursor: grab;
}

.task-card.dragging {
  border-color: rgba(37, 99, 235, 0.42);
  background: #f8fbff;
  box-shadow: 0 18px 42px rgba(31, 45, 68, 0.18);
  opacity: 0.72;
  transform: rotate(-0.5deg) scale(1.015);
}

.task-card.compact {
  padding: 8px 10px;
}

.task-card.compact.has-attachments {
  padding-right: 38px;
}

.task-card.compact h2 {
  font-size: 14px;
}

.task-title-link {
  display: inline;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 900;
  line-height: inherit;
  text-align: left;
  overflow-wrap: anywhere;
}

.task-title-link:hover,
.task-title-link:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.task-card.doing {
  border-left-color: var(--blue);
}

.task-card.review {
  border-left-color: var(--amber);
}

.task-card.done {
  border-left-color: var(--green);
  background: #fcfffd;
}

.task-card h2 {
  margin: 0 0 3px;
  font-size: 16px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.task-title-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-card-topline {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.task-attachment-count {
  position: absolute;
  top: 7px;
  right: 7px;
}

.task-card.compact .task-attachment-count {
  top: 7px;
  right: 7px;
}

.edit-icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.edit-icon-button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.task-id {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #eef3f8;
  padding: 0 8px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.project-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 26px;
  margin: 0 0 8px;
  border: 0;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  padding: 0 9px 0 6px;
  font-size: 11px;
  font-weight: 850;
}

.project-chip span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
}

.project-chip:hover {
  background: var(--blue-soft);
}

.target-feature {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  margin: 0 0 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  padding: 0 9px;
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.task-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.task-tag-chips span,
.task-tag-select button,
.task-tag-row button:first-child {
  border: 1px solid color-mix(in srgb, var(--tag-color, #1f2937) 28%, transparent);
  border-radius: 999px;
  background: var(--tag-bg, #e5e7eb);
  color: var(--tag-color, #1f2937);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.task-tag-select {
  display: grid;
  gap: 8px;
}

.task-tag-select > strong {
  color: var(--text);
  font-size: 13px;
}

.task-tag-select > span {
  color: var(--muted);
  font-size: 13px;
}

.task-tag-select > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-tag-select button {
  cursor: pointer;
  opacity: .58;
}

.task-tag-select button.selected {
  opacity: 1;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tag-color, #1f2937) 22%, transparent);
}

.task-tag-dialog {
  max-width: 520px;
}

.task-tag-list {
  display: grid;
  gap: 8px;
}

.task-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.task-tag-row button {
  border: 0;
}

.task-tag-row button:first-child {
  cursor: pointer;
}

.task-tag-row button:last-child {
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-weight: 850;
}

.card-content {
  margin: 0 0 10px;
  color: #536176;
  line-height: 1.5;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.card-response-content {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
  border-left: 3px solid #bfdbfe;
  background: #f8fbff;
  color: #42506a;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.5;
}

.card-response-content > strong {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.card-content-toggle {
  display: grid;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  padding: 0;
  font-size: 11px;
  font-weight: 850;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.card-content-toggle:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #f7faff;
  color: var(--blue);
}

.card-content-toggle b {
  font-size: 10px;
  line-height: 1;
}

.card-content-toggle .menu-svg-icon {
  width: 12px;
  height: 12px;
}

.card-content p,
.card-content ul {
  margin: 0 0 8px;
}

.card-content img {
  display: block;
  max-width: 100%;
  max-height: 140px;
  margin-top: 8px;
  border-radius: 8px;
  object-fit: cover;
}

.meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.meta span {
  border-radius: 999px;
  background: #eef3f8;
  color: #516074;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
}

.task-card-topline .priority {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.priority.high {
  background: var(--red-soft);
  color: var(--red);
}

.priority.medium {
  background: var(--amber-soft);
  color: var(--amber);
}

.priority.low {
  background: var(--green-soft);
  color: #166b50;
}

.date-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.date-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.date-summary span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
}

.date-summary strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

@media (max-width: 760px) {
  .kanban-board {
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow-x: visible;
    overflow-y: visible;
  }

  .kanban-column {
    width: 100%;
    flex-basis: auto;
    min-height: 260px;
    max-height: none;
    overflow: visible;
  }

  .kanban-stack {
    overflow-y: visible;
  }

  .task-card {
    flex-direction: column;
  }
}
