  /* Milestones panel — named per-project planning targets, linked from Work Items */
  #milestones-view { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
  #milestones-view .sub { font-size: 12.5px; color: var(--text-dim); margin: 0; }
  #milestone-add-btn {
    align-self: flex-start;
    border: none; color: #070605; font-weight: 700;
  }
  .milestone-form {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px;
  }
  .milestone-form input, .milestone-form textarea {
    background: var(--bg); border: 1px solid var(--border); color: var(--text);
    border-radius: 7px; padding: 8px 10px; font-size: 12.5px; font-family: inherit;
  }
  .milestone-form-actions { display: flex; gap: 8px; align-items: center; }
  .milestone-form-actions button { border: none; }
  .milestone-form-actions button.primary { color: #070605; font-weight: 700; }
  .milestone-form-actions button:not(.primary) { background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border); }
  .milestone-form .err { color: var(--red); font-size: 12px; }
  #milestones-list { display: flex; flex-direction: column; gap: 8px; }
  .milestone-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
  }
  .milestone-row.status-done { border-left-color: var(--green); opacity: 0.7; }
  .milestone-row .body { flex: 1; min-width: 0; }
  .milestone-row .subject { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .milestone-row.status-done .subject { text-decoration: line-through; }
  .milestone-row .desc { font-size: 12px; color: var(--text-dim); margin-top: 4px; white-space: pre-wrap; }
  .milestone-row .meta { font-size: 10.5px; color: var(--text-dim); margin-top: 6px; opacity: 0.75; }
  .milestone-status-badge.done { color: var(--green); background: rgba(62,207,142,0.15); font-weight: 700; text-decoration: none; }
  .milestone-due { font-size: 11px; color: var(--text-dim); font-weight: 400; }
  .milestone-due.overdue { color: var(--red); font-weight: 600; }
  .milestone-progress { display: flex; align-items: center; gap: 8px; margin-top: 8px; max-width: 320px; }
  .milestone-progress .bar { flex: 1; height: 6px; border-radius: 4px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
  .milestone-progress .bar .fill { height: 100%; background: var(--green); border-radius: 4px; }
  .milestone-progress .pct { font-size: 11px; color: var(--text-dim); flex-shrink: 0; white-space: nowrap; }
  .milestone-row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; align-self: flex-start; }
  .milestone-row-actions .toggle-btn {
    background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border);
    border-radius: 6px; padding: 6px 10px; font-size: 11.5px; font-family: inherit;
    white-space: nowrap; cursor: pointer;
  }
  .milestone-row-actions .toggle-btn:hover { color: var(--text); border-color: var(--text-dim); }
  .milestone-row-actions .edit, .milestone-row-actions .del { color: var(--text-dim); font-size: 13px; cursor: pointer; flex-shrink: 0; padding: 2px 6px; border-radius: 5px; }
  .milestone-row-actions .edit:hover { color: var(--text); }
  .milestone-row-actions .del:hover { color: var(--red); }
  #milestones-empty { color: var(--text-dim); font-size: 13px; }

  /* Milestone badge on a Work Item row, and the filter/select reuses this */
  .work-item-row .milestone { margin-top: 6px; }
  .work-item-milestone-badge {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--accent-2); background: rgba(85,124,104,0.12);
    border: 1px solid rgba(85,124,104,0.35);
    border-radius: 20px; padding: 2px 9px; font-size: 10.5px;
  }
  .work-item-milestone-badge .icon-svg { width: 11px; height: 11px; color: var(--accent-2); filter: none; }
