/* ── Visual process flow ────────────────────────────────────────────────── */

.process-flow {
  margin: 2px 0 8px;
  min-width: 0;
}

.process-flow-header {
  align-items: flex-end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.process-flow-sub {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 4px;
}

.process-flow-legend {
  align-items: center;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 10px;
}

.process-flow-legend span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.legend-dot {
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  width: 8px;
}
.legend-dot.backlog { background: var(--text-dim); }
.legend-dot.plan { background: var(--accent); }
.legend-dot.review { background: #a855f7; }
.legend-dot.done { background: var(--green); }

.process-guide {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
}

.process-guide-bar,
.process-guide-track {
  align-items: stretch;
  background: rgba(20, 29, 46, .32);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 6px;
}

body.light .process-guide-bar,
body.light .process-guide-track {
  background: rgba(255,255,255,.78);
}

.process-guide-bar {
  grid-template-columns: minmax(150px, .55fr) minmax(0, 2.45fr);
}

.process-guide-track {
  grid-template-columns: 1fr;
}

.process-guide-summary {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, .15), rgba(14, 165, 233, .06)),
    rgba(13, 17, 23, .72);
  border: 1px solid rgba(34, 197, 94, .28);
  border-radius: 8px;
  min-width: 0;
  padding: 7px 9px;
}

body.light .process-guide-summary {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, .11), rgba(14, 165, 233, .04)),
    rgba(255,255,255,.9);
}

.process-guide-kicker {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.process-guide-next {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-activity-list {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  min-width: 0;
}

.process-activity-item {
  background: rgba(255,255,255,.045);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
}

body.light .process-activity-item {
  background: rgba(255,255,255,.72);
}

.process-activity-item span {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 750;
}

.process-activity-item strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1;
}

.process-activity-item em {
  color: var(--text-xdim);
  font-size: 10px;
  font-style: normal;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-activity-item.running.active {
  border-color: rgba(245, 158, 11, .55);
}

.process-activity-item.review.active {
  border-color: rgba(168, 85, 247, .5);
}

.process-activity-item.error.active {
  border-color: rgba(239, 68, 68, .58);
}

.process-activity-item.done.active {
  border-color: rgba(34, 197, 94, .55);
}

.process-phases {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  min-width: 0;
}

.process-phase {
  align-items: center;
  background: rgba(20, 29, 46, .42);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  display: grid;
  gap: 2px 8px;
  grid-template-columns: 1fr auto;
  min-width: 0;
  padding: 6px 8px;
}

body.light .process-phase {
  background: rgba(255,255,255,.78);
}

.process-phase-label {
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.process-phase strong {
  color: var(--text);
  font-size: 15px;
  grid-row: span 2;
  line-height: 1;
}

.process-phase span:last-child {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-phase.active {
  background: rgba(34, 197, 94, .1);
  border-color: rgba(34, 197, 94, .72);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .16), 0 0 18px rgba(34, 197, 94, .12);
}

.process-phase.complete {
  border-color: rgba(34, 197, 94, .42);
}

.process-guide-steps {
  counter-reset: process-guide;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  list-style: none;
  min-width: 0;
}

.process-guide-step {
  align-items: center;
  background: rgba(20, 29, 46, .36);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  display: grid;
  gap: 5px;
  grid-template-columns: 1fr auto;
  min-width: 0;
  padding: 6px 7px;
  position: relative;
}

body.light .process-guide-step {
  background: rgba(255,255,255,.78);
}

.process-guide-step::after {
  background: var(--border-soft);
  content: "";
  height: 1px;
  left: calc(100% + 1px);
  position: absolute;
  top: 50%;
  width: 6px;
}

.process-guide-step:last-child::after {
  display: none;
}

.process-guide-step.active {
  background: rgba(34, 197, 94, .08);
  border-color: rgba(34, 197, 94, .68);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .14);
}

.process-guide-step.error.active {
  border-color: rgba(239, 68, 68, .72);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .14);
}

.process-guide-step.complete {
  border-color: rgba(34, 197, 94, .36);
}

.process-guide-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.process-guide-title {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-guide-text {
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-guide-count {
  background: var(--control-bg);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 800;
  min-width: 20px;
  padding: 1px 5px;
  text-align: center;
}

.process-guide-alert {
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .28);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  padding: 8px 10px;
}

body.light .process-guide-alert {
  color: #b91c1c;
}

.flow-running-banner {
  align-items: center;
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: 6px;
  color: var(--yellow);
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 8px 12px;
}

.flow-running-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.flow-running-link:hover {
  color: #fbbf24;
}

.process-board {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(6, minmax(118px, 1fr));
  min-width: 0;
}

.flow-column {
  background: rgba(20, 29, 46, .58);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 116px;
  min-width: 0;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

body.light .flow-column {
  background: #ffffff;
}

.flow-column.drop-active {
  background: rgba(14, 165, 233, .1);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .25);
}

.flow-column.flow-column-highlight {
  animation: flow-column-highlight-pulse 1.05s ease-in-out 3;
  border-color: rgba(62, 207, 142, .9);
  box-shadow: 0 0 0 2px rgba(62, 207, 142, .18), inset 0 1px 0 rgba(255,255,255,.04);
}

.flow-column-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  justify-content: space-between;
  padding: 6px 7px;
}

.flow-column-head:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.flow-column-title {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.flow-column-hint {
  color: var(--text-xdim);
  font-size: 10px;
  line-height: 1.25;
  margin-top: 1px;
}

.flow-column-count {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
  min-width: 22px;
  padding: 1px 6px;
  text-align: center;
}

.flow-column.backlog { border-top: 3px solid var(--text-dim); }
.flow-column.plan { border-top: 3px solid var(--accent); }
.flow-column.running { border-top: 3px solid #f59e0b; }
.flow-column.review { border-top: 3px solid #a855f7; }
.flow-column.done { border-top: 3px solid var(--green); }
.flow-column.error { border-top: 3px solid var(--red); }

.flow-column.running,
.flow-column.review,
.flow-column.error,
.flow-column.done {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.flow-column-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 5px;
}

.flow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  transition: transform .15s, border-color .15s, opacity .15s;
}

.flow-card:hover {
  border-color: rgba(14,165,233,.38);
  transform: translateY(-1px);
}

.flow-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .24), var(--shadow-sm);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.flow-card.dragging {
  opacity: .55;
}

.flow-card.busy,
.flow-card.merging,
.flow-card.clarifying {
  background: linear-gradient(180deg, rgba(245, 158, 11, .16), var(--surface));
  border-color: rgba(245, 158, 11, .62);
  cursor: wait;
  opacity: .95;
}

.flow-card.busy .flow-card-status {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.flow-card.busy .flow-card-status::before {
  animation: flow-busy-pulse 1.1s ease-in-out infinite;
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 7px;
  width: 7px;
}

@keyframes flow-busy-pulse {
  0%, 100% { opacity: .45; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1); }
}

.flow-card.busy:focus-visible,
.flow-card.merging:focus-visible,
.flow-card.clarifying:focus-visible {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .22), var(--shadow-sm);
  outline-color: var(--yellow);
}

.flow-card.flow-card-highlight {
  animation: flow-card-highlight-pulse 1.05s ease-in-out 3;
  border-color: rgba(62, 207, 142, .9);
  box-shadow: 0 0 0 2px rgba(62, 207, 142, .22), var(--shadow-sm);
}

.flow-card.backlog,
.flow-card.running,
.flow-card.done24 {
  cursor: default;
}

@keyframes flow-card-highlight-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(62, 207, 142, .18), var(--shadow-sm);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(62, 207, 142, .36), var(--shadow-sm);
  }
}

@keyframes flow-column-highlight-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(62, 207, 142, .18), inset 0 1px 0 rgba(255,255,255,.04);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(62, 207, 142, .34), inset 0 1px 0 rgba(255,255,255,.04);
  }
}

.flow-card-status {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.flow-card-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.flow-card-num {
  color: var(--text-xdim);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.flow-card-link {
  color: var(--accent);
  flex-shrink: 0;
  font-size: 11px;
  text-decoration: none;
}
.flow-card-link:hover { color: var(--accent-h); }

.flow-card-actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.flow-card-action-group {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 5px;
}

.flow-card-action-group.primary {
  border-right: 1px solid var(--border);
  padding-right: 6px;
}

.flow-card-primary-action {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  padding: 5px 7px;
  position: relative;
  transition: background .13s, border-color .13s, box-shadow .13s, opacity .13s, transform .13s;
}

.flow-card-primary-action:hover {
  background: var(--accent-h);
  border-color: var(--accent-h);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.flow-card-primary-action:active {
  box-shadow: inset 0 2px 5px rgba(0,0,0,.24);
  transform: translateY(1px);
}

.flow-card-primary-action.merge {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 6px 14px rgba(34,197,94,.2);
}

.flow-card-primary-action.merge:hover {
  background: #28b977;
  border-color: #28b977;
  box-shadow: 0 9px 18px rgba(34,197,94,.28);
}

.flow-card-primary-action.merge:active {
  background: #1fa85f;
  border-color: #1fa85f;
}

.flow-card-primary-action.merge[aria-busy="true"],
.flow-card-primary-action.merge:disabled {
  background: linear-gradient(135deg, var(--green), #16a34a);
  border-color: rgba(34,197,94,.78);
  box-shadow: 0 0 0 3px rgba(34,197,94,.18), 0 8px 20px rgba(34,197,94,.2);
  opacity: 1;
}

.flow-card-primary-action.merge[aria-busy="true"]::after,
.flow-card-primary-action.merge:disabled::after {
  animation: mergeButtonSweep 1.15s linear infinite;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-120%);
}

@keyframes mergeButtonSweep {
  to { transform: translateX(120%); }
}

.flow-card-primary-action.promote {
  background: var(--purple, #8b5cf6);
  border-color: var(--purple, #8b5cf6);
}

.flow-card-primary-action.promote:hover {
  background: #7c3aed;
  border-color: #7c3aed;
  box-shadow: 0 9px 18px rgba(139,92,246,.28);
}

.flow-card-primary-action.promote:active {
  background: #6d28d9;
  border-color: #6d28d9;
}

.flow-card-primary-action:focus-visible,
.flow-card-discard:focus-visible,
.flow-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.flow-card-primary-action:disabled {
  cursor: wait;
  opacity: .68;
}

.flow-card-primary-action.merge[aria-busy="true"],
.flow-card-primary-action.merge:disabled {
  opacity: 1;
}

.flow-card-discard {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, .35);
  border-radius: 6px;
  color: var(--red);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  transition: background .13s, border-color .13s, color .13s;
}
.flow-card-discard:hover {
  background: rgba(239, 68, 68, .1);
  border-color: rgba(239, 68, 68, .6);
}

.flow-card-confirm {
  align-items: center;
  border-radius: 6px;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
  line-height: 1.2;
  margin-top: 2px;
  max-width: 100%;
  min-width: 0;
  padding: 6px;
}

.flow-card-discard-confirm {
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .24);
}

.flow-card-merge-confirm {
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .26);
}

.flow-card-confirm span {
  color: var(--text-dim);
  flex: 1 1 auto;
  min-width: 120px;
  overflow-wrap: anywhere;
}

.flow-card-confirm button {
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  transition: background .13s, border-color .13s, opacity .13s;
}

.flow-card-confirm button:hover {
  opacity: .86;
}

.flow-card-confirm button:disabled,
.flow-card-confirm button[aria-disabled="true"] {
  cursor: wait;
  opacity: .68;
}

.flow-card-discard-confirm .flow-card-confirm-yes {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.flow-card-merge-confirm .flow-card-confirm-yes {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.flow-card-confirm .flow-card-confirm-no {
  background: var(--surface);
  color: var(--text-dim);
}

.flow-card-title {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-card-desc {
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1240px) {
  .process-board {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
  }

  .process-activity-list {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .process-guide-bar,
  .process-guide-track {
    grid-template-columns: 1fr;
  }

  .process-guide-steps {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .process-guide-step::after {
    display: none;
  }
}

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

.flow-empty {
  align-items: center;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-xdim);
  display: flex;
  flex: 1;
  font-size: 12px;
  justify-content: center;
  line-height: 1.45;
  min-height: 96px;
  padding: 12px;
  text-align: center;
}

.flow-load-more {
  background: none;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  margin-top: 2px;
  padding: 6px 10px;
  text-align: center;
  transition: background .13s, border-color .13s;
  width: 100%;
}
.flow-load-more:hover {
  background: rgba(14, 165, 233, .08);
  border-color: var(--accent);
}
.flow-load-more.flow-load-less {
  color: var(--text-dim);
}
.flow-load-more.flow-load-less:hover {
  background: rgba(100, 116, 139, .09);
  border-color: var(--text-dim);
}

/* ── Global Settings View ────────────────────────────────────────────────── */

.global-settings-view { padding: 24px 28px; }

.settings-panel {
  gap: 14px;
}

.settings-group {
  background: rgba(20, 29, 46, .32);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

body.light .settings-group {
  background: rgba(240, 249, 255, .62);
}

.settings-group-optional {
  border-style: dashed;
}

.settings-group-header {
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
}

.settings-group-description {
  color: var(--text-xdim);
  font-size: 12px;
  line-height: 1.45;
}

.settings-group .field-hint {
  line-height: 1.4;
}

.global-settings-actionbar {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(13, 17, 23, .94);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  bottom: 0;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 2px;
  padding: 10px 12px;
  position: sticky;
  z-index: 12;
}

body.light .global-settings-actionbar {
  background: rgba(255, 255, 255, .96);
}

.global-settings-actionbar[data-state="dirty"] {
  border-color: rgba(245, 158, 11, .42);
}

.global-settings-actionbar[data-state="invalid"] {
  border-color: rgba(239, 68, 68, .46);
}

.global-settings-actionbar[data-state="saved"] {
  border-color: rgba(34, 197, 94, .46);
}

.global-settings-actionbar-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.global-settings-status {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.global-settings-validation-status {
  color: var(--red);
  font-size: 12px;
  line-height: 1.25;
}

.global-settings-actionbar-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.settings-sensitive-row {
  background: rgba(239, 68, 68, .06);
  border: 1px solid rgba(239, 68, 68, .22);
  border-radius: 8px;
  padding: 10px;
}

.settings-sensitive-row input {
  border-color: rgba(239, 68, 68, .36);
}

.settings-sensitive-row input:focus {
  border-color: var(--red);
}

/* ── Issue list ──────────────────────────────────────────────────────────── */

.issue-list { display: flex; flex-direction: column; gap: 8px; }

.issue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.issue-card:hover {
  border-color: rgba(14,165,233,.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.issue-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.issue-info { flex: 1; min-width: 0; }

.issue-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }

.issue-num {
  font-size: 12px;
  color: var(--text-xdim);
  font-family: 'SF Mono', 'Fira Code', monospace;
  flex-shrink: 0;
}

.issue-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.issue-desc {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.issue-desc-error {
  font-size: 12px;
  color: var(--text-dim);
  word-break: break-word;
  max-height: 12em;
  overflow: hidden;
  margin-top: 4px;
}
.issue-desc-error p { margin: 2px 0; }
.issue-desc-error h3, .issue-desc-error h4, .issue-desc-error h5 {
  font-size: 12px;
  font-weight: 600;
  margin: 4px 0 2px;
}
.issue-desc-error ul { margin: 2px 0; padding-left: 16px; }
.issue-desc-error li { margin: 1px 0; }
.issue-desc-error code { font-family: monospace; background: rgba(0,0,0,.15); border-radius: 2px; padding: 0 3px; }
.issue-desc-error.expanded { max-height: none; }

.btn-expand-error {
  display: block;
  margin-top: 4px;
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 11px;
  cursor: pointer;
  opacity: .8;
}
.btn-expand-error:hover { opacity: 1; text-decoration: underline; }

.issue-card-error {
  border-color: rgba(245, 101, 101, .25);
  background: rgba(245, 101, 101, .03);
}
.issue-card-error:hover { border-color: rgba(245, 101, 101, .45); }

.error-actions,
.done-actions,
.ready-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}

/* ── MR Details ──────────────────────────────────────────────────────────── */

.mr-details {
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.mr-entry {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.mr-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mr-title-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mr-title-link:hover { color: var(--accent-h); }

.mr-state-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.mr-state-badge.open   { background: rgba(91,110,245,.15); color: var(--accent); }
.mr-state-badge.merged { background: rgba(62,207,142,.15); color: var(--green); }
.mr-state-badge.review-ok { background: rgba(62,207,142,.15); color: var(--green); }
.mr-state-badge.review-warning { background: rgba(245,158,11,.15); color: var(--yellow); }
.mr-state-badge.review-blocked { background: rgba(245,101,101,.15); color: var(--red); }

.mr-stats {
  font-size: 12px;
  color: var(--text-xdim);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.mr-additions { color: var(--green); }
.mr-deletions { color: var(--red); }

.mr-loading,
.mr-none { font-size: 12px; color: var(--text-xdim); }

.issue-actions { flex-shrink: 0; }

.issue-label {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.issue-label.done  { background: rgba(62,207,142,.15); color: var(--green); }
.issue-label.error { background: rgba(245,101,101,.15); color: var(--red); }

.no-issues {
  font-size: 13px;
  color: var(--text-xdim);
  padding: 12px 0;
}
