/* ===== TASK MODAL — shared component ===== */
.task-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.task-modal-overlay.open { display: flex; }

.task-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  position: relative;
  color: #111;
  font-family: 'JetBrains Mono', monospace;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.task-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
}
.task-modal-close:hover { color: #333; }

.task-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
  padding-right: 32px;
  line-height: 1.4;
  font-family: 'JetBrains Mono', monospace;
}

.task-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tm-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.tm-tag.id    { background: #f0f4ff; color: #3b82f6; border: 1px solid #d0e0ff; }
.tm-tag.p1    { background: #fff0f0; color: #ef4444; border: 1px solid #ffd0d0; }
.tm-tag.p2    { background: #fff8e0; color: #d97706; border: 1px solid #fde68a; }
.tm-tag.p3    { background: #f5f5f5; color: #666;    border: 1px solid #ddd; }
.tm-tag.cont  { background: #f0f7ff; color: #2563eb; border: 1px solid #bfdbfe; }
.tm-tag.date  { background: #f5f5f5; color: #555;    border: 1px solid #ddd; }

.tm-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 6px;
}

.tm-next-step {
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #222;
  line-height: 1.5;
  margin-bottom: 20px;
  min-height: 44px;
}

.tm-variants {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.tm-variant {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
  transition: opacity 0.15s;
}
.tm-variant:hover { opacity: 0.85; }

.tm-variant-num {
  font-weight: 700;
  margin-right: 6px;
}

.tm-variant.v1 { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tm-variant.v2 { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.tm-variant.v3 { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

.tm-loading {
  color: #aaa;
  font-size: 12px;
  text-align: center;
  padding: 16px 0;
}

.tm-footer {
  display: flex;
  gap: 10px;
}

.tm-btn-update {
  flex: 1;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: background 0.15s;
  font-weight: 600;
}
.tm-btn-update:hover { background: #222; }
.tm-btn-update:disabled { background: #ccc; cursor: default; }

.tm-btn-close {
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  padding: 13px 20px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  color: #555;
  transition: border-color 0.15s;
  font-weight: 500;
}
.tm-btn-close:hover { border-color: #999; color: #111; }

.tm-status-select {
  background: #f5f5f5;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: #333;
  margin-bottom: 16px;
  width: 100%;
  cursor: pointer;
}

.tm-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.tm-chip {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #555;
  border: 1px solid #ddd;
}
.tm-chip.owner { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tm-chip.client { background: #fef3c7; color: #92400e; border-color: #fde68a; }

.tm-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.tm-action-btn {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #333;
  cursor: pointer;
  transition: all 0.15s;
}
.tm-action-btn:hover { border-color: #999; background: #f0f0f0; }
