/* ============================================================= OUTREACH == */
/* Outreach panel (Q, app msg 6952). Same tokens and primitives as style.css:
   list on the left, one contact's detail on the right, stacked on a phone. */

#outreach-panel .counts-row { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
#outreach-panel .counts-row .stat { padding: 12px 16px; }
#outreach-panel .counts-row .stat .n { font-size: 24px; }

.or-layout {
  display: grid;
  grid-template-columns: 204px minmax(260px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

/* Folders (task queue #12): a column on a wide screen, one scrolling chip
   row above the list and detail when narrower. */
.or-folders { display: flex; flex-direction: column; gap: 2px; padding: 6px; max-height: calc(100vh - 290px); overflow-y: auto; position: sticky; top: 16px; }
.or-folders-title { padding: 8px 10px 6px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.or-folder {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  text-align: left;
  font-size: var(--fs-sm);
  color: var(--text-2);
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}
.or-folder .ic { width: 15px; height: 15px; flex: none; color: var(--text-3); }
.or-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.or-folder-n { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.or-folder:hover { background: var(--surface-2); color: var(--text); }
.or-folder.active { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.or-folder.active .ic { color: var(--accent-2); }
.or-folder.empty .or-folder-n { opacity: 0.5; }
.or-folder.drop-over { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.or-folder-new { margin-top: 4px; color: var(--text-3); }
.or-folder-tools { display: flex; gap: 12px; padding: 6px 10px; }
.or-folder-tools .linklike { height: 22px; font-size: var(--fs-xs); }
.or-row-wrap.dragging { opacity: 0.5; }

@media (max-width: 1200px) {
  .or-layout { grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); }
  .or-folders { grid-column: 1 / -1; flex-direction: row; align-items: center; max-height: none; overflow-x: auto; position: static; }
  .or-folders-title { display: none; }
  .or-folder { width: auto; flex: none; }
  .or-folder-new { margin-top: 0; }
  .or-folder-tools { flex: none; padding: 0 6px; }
}
@media (max-width: 900px) { .or-layout { grid-template-columns: minmax(0, 1fr); } }

.or-list { padding: 6px; max-height: calc(100vh - 290px); overflow-y: auto; }
@media (max-width: 900px) { .or-list { max-height: 46vh; } }
.or-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.or-row-wrap { position: relative; }
.or-row-wrap + .or-row-wrap { margin-top: 2px; }
.or-row-wrap .or-row { padding-left: 38px; }

/* Favorites (task queue #4): a yellow star, pinned rows go first. */
.or-star {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--text-3);
  opacity: 0.55;
  transition: color 0.16s var(--ease), opacity 0.16s var(--ease), background 0.16s var(--ease);
}
.or-row-wrap .or-star { position: absolute; left: 7px; top: 7px; }
.or-star .ic { width: 16px; height: 16px; }
.or-star:hover, .or-star:focus-visible { opacity: 1; color: var(--text); background: var(--surface-3); }
.or-star.on { color: #facc15; opacity: 1; }
.or-star.on .ic { fill: currentColor; }
.or-star-head { width: 30px; height: 30px; }
.or-star-head .ic { width: 19px; height: 19px; }

.or-group { display: flex; align-items: baseline; gap: 6px; padding: 12px 12px 6px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.or-group:first-child { padding-top: 6px; }
.or-group span { color: var(--text-3); opacity: 0.7; }

.or-sort { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: var(--fs-sm); color: var(--text-3); }
.or-sort select.task-input { width: auto; max-width: 220px; height: 28px; }
.or-sort + .or-sort { margin-left: 0; }
.or-row:hover { background: var(--surface-2); }
.or-row.selected { background: var(--surface-2); border-color: var(--line-2); }
.or-row-top { display: flex; align-items: center; gap: 8px; }
.or-row-name { font-size: var(--fs); font-weight: 560; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.or-row-top .or-status { margin-left: auto; }
.or-row-org { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.or-row-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.or-row-meta span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.or-empty { padding: 18px 12px; font-size: var(--fs-sm); color: var(--text-3); }

/* Tags: small pills on each row (up to 3, then "+N") and in the detail. */
.or-row-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.or-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
}
.or-row:hover .or-tag, .or-row.selected .or-tag { background: var(--surface-3); }
.or-tag-more { color: var(--text-3); }

.or-organize { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
.or-org-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; }
.or-org-row .or-field-label { display: inline-flex; align-items: center; gap: 6px; }
.or-org-row .or-field-label .ic { width: 13px; height: 13px; }
.or-org-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.or-org-body select.task-input { width: auto; height: 30px; }
.or-org-hint { font-size: var(--fs-xs); color: var(--text-3); }
.or-org-hint .linklike { height: 20px; font-size: var(--fs-xs); }
.or-tag-edit { gap: 6px; }
.or-tag-x { height: 24px; gap: 2px; padding: 0 2px 0 9px; font-size: var(--fs-xs); }
.or-tag-pick { color: inherit; font: inherit; }
.or-tag-pick:hover { color: var(--text); text-decoration: underline; }
.or-tag-rm { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 999px; color: var(--text-3); }
.or-tag-rm:hover { color: var(--text); background: var(--surface-3); }
.or-tag-rm .ic { width: 11px; height: 11px; }
.or-tag-input { width: 120px; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; color: var(--text); font: inherit; font-size: var(--fs-xs); }
.or-tag-input:focus { outline: none; border-style: solid; border-color: var(--accent-line); }

.or-prog { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.or-prog-helicon { color: var(--accent-2); }
.or-status {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  white-space: nowrap;
}
.or-status-found, .or-status-drafted { color: var(--warn); border-color: rgba(245, 182, 74, 0.35); background: var(--warn-soft); }
.or-status-approved { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-soft); }
.or-status-sent { color: var(--text); border-color: var(--line-3); }
.or-status-replied { color: var(--ok); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.1); }
.or-status-declined, .or-status-skipped { color: var(--text-3); }

.or-detail { min-height: 320px; }
.or-detail-empty { color: var(--text-3); font-size: var(--fs-sm); padding: 40px 0; text-align: center; }
.or-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.or-name { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.or-sub { font-size: var(--fs-sm); color: var(--text-2); margin-top: 2px; }
.or-head-pills { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.or-section { margin-top: 18px; }
.or-flag { margin-top: 12px; padding: 9px 12px; border-radius: 10px; font-size: var(--fs-sm); line-height: 1.45; color: var(--text); background: var(--warn-soft); border: 1px solid rgba(245, 182, 74, 0.3); }
.or-flag strong { color: var(--warn); font-weight: 560; margin-right: 4px; }
.or-section-title { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin: 0 0 6px; font-weight: 500; }
.or-prose { font-size: var(--fs); line-height: 1.55; color: var(--text); white-space: pre-wrap; }
.or-sources { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: var(--fs-xs); }
.or-sources a { color: var(--text-3); text-decoration: none; border-bottom: 1px solid var(--line-2); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.or-sources a:hover { color: var(--text); }
.or-verify { font-size: var(--fs-xs); color: var(--text-3); margin-top: 6px; }

.or-fields { display: flex; flex-direction: column; gap: 8px; }
.or-field { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 12px; }
.or-field-label { font-size: var(--fs-sm); color: var(--text-3); }
.or-field-hint { grid-column: 2; font-size: var(--fs-xs); color: var(--text-3); margin-top: -4px; }
.or-field-hint.warn { color: var(--warn); }
.or-message { min-height: 260px; line-height: 1.55; font-size: var(--fs); }
.or-draft-state { display: flex; align-items: center; gap: 10px; min-height: 20px; margin-top: 6px; font-size: var(--fs-xs); color: var(--text-3); }
.or-draft-state .linklike { height: 22px; font-size: var(--fs-xs); }

.or-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.or-actions .or-spacer { flex: 1; }
.or-actions select.task-input { width: auto; height: 34px; }
.or-send-note { font-size: var(--fs-xs); color: var(--text-3); margin-top: 8px; }
.or-error { color: var(--danger); font-size: var(--fs-sm); margin-top: 8px; min-height: 0; }
.or-ok { color: var(--ok); font-size: var(--fs-sm); margin-top: 8px; }

.or-log { display: flex; flex-direction: column; }
.or-log-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.or-log-item:first-child { border-top: 0; }
.or-log-when { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); padding-top: 2px; }
.or-log-chan { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-right: 6px; }
.or-log-sent .or-log-chan { color: var(--accent-2); }
.or-log-reply .or-log-chan { color: var(--ok); }
.or-log-failed .or-log-chan { color: var(--danger); }
.or-log details { margin-top: 6px; }
.or-log summary { cursor: pointer; color: var(--text-3); font-size: var(--fs-xs); }
.or-log pre { white-space: pre-wrap; font-family: var(--font); font-size: var(--fs-sm); color: var(--text-2); background: var(--sunken); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin: 6px 0 0; }
.or-log-add { display: flex; gap: 8px; margin-top: 10px; }
.or-log-add .task-input { flex: 1; }
