/* Actual follow-up history shares the existing account scope and customer detail. */
.follow-history-controls { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:14px; padding:12px; border:1px solid #cbd6ce; border-radius:10px; background:#fff; color:#273a34; }
.follow-history-modes { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); flex:1 1 100%; min-width:0; gap:8px; }
.marketing-history-modes { grid-template-columns:repeat(4,minmax(0,1fr)); }
.follow-history-modes[hidden] { display:none; }
.follow-history-modes button { border:1px solid #cbd6ce; border-radius:6px; background:#f5f8f5; color:#52665c; padding:9px 3px; font-size:14px; font-weight:600; min-width:0; min-height:44px; white-space:nowrap; }
.follow-history-modes button[aria-pressed="true"] { background:#176b5d; border-color:#176b5d; color:#fff; }
.follow-history-range { flex:0 0 82px; min-width:0; margin-left:auto; }
.follow-history-range > span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.follow-history-range select { width:100%; min-height:44px; max-width:100%; padding:8px 18px 8px 6px; font-size:16px; color:#254d3e; background:#fff; border:1px solid #a9beb1; border-radius:6px; }
.follow-history-custom { flex:0 0 100%; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:8px; align-items:end; }
.follow-history-custom label { display:grid; gap:5px; color:#52665c; font-size:14px; min-width:0; }
.follow-history-custom input { width:100%; min-width:0; min-height:44px; padding:7px; border:1px solid #b7c8bd; border-radius:6px; background:#fff; color:#273a34; font-size:16px; box-sizing:border-box; }
.follow-history-custom button { min-height:44px; padding:8px 10px; border:0; border-radius:6px; color:#fff; background:#176b5d; font-size:14px; }
.follow-history-custom p { grid-column:1/-1; margin:0; font-size:14px; color:#a22e28; }
.follow-history-search { flex:1 1 100%; min-width:0; width:100%; min-height:44px; border:1px solid #b7c8bd; border-radius:6px; padding:8px 12px; font-size:16px; color:#273a34; background:#fff; }
.follow-history-hint { flex:1 1 100%; margin:0; color:#56665e; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
body .customer-card.follow-history-card { position:relative; display:grid; grid-template-columns:32px minmax(0,1fr); grid-template-rows:auto; aspect-ratio:auto; align-items:start; gap:8px 10px; width:100%; min-height:0; margin:0; padding:14px; border:1px solid #d0dbd4; border-radius:9px; background:#fff; color:#273a34; text-align:left; box-shadow:none; }
.follow-history-open { grid-column:1/-1; display:grid; grid-template-columns:32px minmax(0,1fr); align-items:start; gap:8px 10px; width:100%; min-width:0; border:0; padding:0; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.follow-history-open:focus-visible,.follow-delete-btn:focus-visible { outline:2px solid #176b5d; outline-offset:3px; }
.follow-history-card .wide-company-avatar { display:flex; align-items:center; justify-content:center; width:32px; height:36px; background:#e8f0e9; color:#466b4d; border-radius:6px; }
.follow-history-card .wide-row-main { min-width:0; }
.follow-history-card .wide-row-title { display:block; margin:0 0 5px; }
.follow-history-card .wide-row-title strong { font-size:18px; line-height:1.5; overflow-wrap:anywhere; }
.follow-history-card .wide-row-meta { display:block; font-size:14px; color:#56665e; line-height:1.6; }
.follow-history-stamp { display:block; color:#466250; font-size:14px; line-height:1.6; margin-top:5px; }
.follow-history-excerpt { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; font-size:14px; line-height:1.7; margin-top:4px; color:#273a34; }
.follow-history-card .wide-row-status { grid-column:2; display:flex; flex-direction:row; padding:0; font-size:14px; }
.follow-history-card .wide-due { display:inline-block; color:#325d48; background:#edf3e9; padding:3px 7px; border-radius:4px; font-size:14px; }
.follow-history-detail-scope { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:10px 12px; margin-bottom:10px; border:1px solid #cbd6ce; border-radius:7px; color:#294f3e; background:#eef5ef; font-size:14px; line-height:1.6; }
.follow-history-detail-scope button { color:#176b5d; background:#fff; border:1px solid #a9beb1; border-radius:6px; padding:7px 10px; min-height:36px; font-size:14px; font-weight:600; }
.follow-history-controls :is(button,select,input):focus-visible,.follow-history-detail-scope button:focus-visible { outline:2px solid #176b5d; outline-offset:2px; }
@media (min-width:768px) {
  #wideHistorySlot { flex:none; border-bottom:1px solid #d0dbd4; }
  #wideHistorySlot .follow-history-controls { border:0; border-radius:0; padding:10px 14px; margin:0; gap:8px; }
  #wideHistorySlot .follow-history-modes button { min-height:38px; padding:7px 3px; }
  #wideHistorySlot .follow-history-range select { width:100%; min-height:38px; font-size:14px; padding-top:6px; padding-bottom:6px; }
  #wideHistorySlot .follow-history-search { display:none; }
  body[data-auth="unlocked"] .customer-card.follow-history-card { grid-template-columns:32px minmax(0,1fr); border:0; border-bottom:1px solid #d0dbd4; border-radius:0; }
  body[data-auth="unlocked"] .customer-card.follow-history-card.selected { background:#e0eee5; box-shadow:inset 3px 0 0 #176b5d; }
  body[data-auth="unlocked"] .customer-card.follow-history-card:hover { background:#f0f6f1; }
  #wideHistorySlot .follow-history-custom { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  #wideHistorySlot .follow-history-custom button { grid-column:1/-1; min-height:36px; }
}
@media (max-width:767px) {
  .follow-history-controls { padding:10px; gap:8px; }
  .follow-history-custom { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .follow-history-custom button { grid-column:1/-1; }
  #panelFollow .follow-history-detail-scope { margin-top:6px; }
}

@media (max-width: 400px) {
  .follow-history-modes { gap:4px; }
  .follow-history-modes button { font-size:12px; padding-inline:1px; }
}
@media (min-width: 1024px) and (max-width: 1439px) {
  #wideHistorySlot .follow-history-controls { padding-inline:10px; }
  #wideHistorySlot .follow-history-modes { gap:4px; }
  #wideHistorySlot .follow-history-modes button { font-size:12px; padding-inline:1px; }
}
