/* Follow-ups uses the same calm, focused workspace styling as discovery pages. */
body[data-page="followups"] { background: #f7f8f5; }
body[data-page="followups"] .page-content { max-width: 1380px; padding-top: 38px; }
#followups { --followup-ink: #213d30; --followup-muted: #6d7b69; --followup-line: #e5eae3; }
#followups [hidden] { display: none !important; }
#followups button:focus-visible, #followups a:focus-visible, #followups summary:focus-visible { outline: 2px solid #377a55; outline-offset: 4px; }
#followups .followup-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
#followups .kicker { font-size: 10px; letter-spacing: 1.8px; color: #728574; }
#followups h1 { margin: 9px 0 10px; color: var(--followup-ink); font-size: clamp(29px, 3vw, 38px); letter-spacing: -1.6px; line-height: 1.15; font-weight: 800; }
#followups .followup-heading-dot { color: #79a282; }
#followups .followup-page-heading p { margin: 0; color: #748078; font-size: 13px; line-height: 1.7; }
#followups .followup-source-badge { display: inline-flex; align-items: center; gap: 8px; color: #6c7b70; font-size: 11px; white-space: nowrap; }
#followups .followup-source-badge svg { width: 17px; height: 17px; color: #80937e; }
#followups .followup-search-panel { margin-bottom: 20px; border: 1px solid #dce5da; border-radius: 17px; background: #fff; box-shadow: 0 4px 20px #223e2b04; overflow: hidden; }
#followups .followup-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 25px 0; }
#followups .followup-panel-heading > div { display: flex; align-items: center; gap: 10px; }
#followups .followup-panel-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #edf3eb; color: #477752; flex-shrink: 0; }
#followups .followup-panel-icon svg { width: 18px; height: 18px; }
#followups .followup-panel-heading h2 { margin: 0; font-size: 14px; font-weight: 800; color: #344e3b; letter-spacing: -.2px; }
#followups .followup-review-note { font-size: 10px; line-height: 1.6; color: #72816d; text-align: right; }
#followups .followup-controls { display: flex; align-items: end; gap: 14px; margin: 0; padding: 22px 25px 12px; }
#followups .followup-controls > .followup-field { flex: 1; }
#followups .followup-field { min-width: 0; color: #66756a; font-size: 11px; line-height: 1.5; font-weight: 700; }
#followups .followup-field input, #followups .followup-field select, #followups .followup-field textarea { width: 100%; height: 46px; margin-top: 8px; padding: 11px 13px; border: 1px solid #e1e6de; border-radius: 9px; background-color: #fbfcfa; color: #3b5141; font: 13px/1.5 Manrope, 'Helvetica Neue', Arial, sans-serif; }
#followups .followup-field textarea { height: auto; resize: vertical; line-height: 1.8; }
#followups .followup-field input::placeholder, #followups .followup-field textarea::placeholder { color: #84917e; }
#followups .followup-field input:focus, #followups .followup-field select:focus, #followups .followup-field textarea:focus { outline: 0; background-color: #fff; border-color: #83a78a; box-shadow: 0 0 0 3px #edf4eb; }
#followups #find-followups-btn { min-height: 46px; padding: 12px 20px; gap: 16px; border-radius: 9px; font-size: 12px; }
#followups #find-followups-btn span { font-size: 18px; font-weight: 400; }
#followups .followup-custom { flex-shrink: 0; gap: 10px; }
#followups .followup-custom .followup-field { min-width: 0; width: 95px; }
#followups .followup-range-hint { margin: 0; padding: 0 25px 19px; color: #74816d; font-size: 10px; line-height: 1.8; }
#followups .followup-instructions-panel { margin: 0 25px 22px; padding: 13px 15px; border: 1px solid #e7ecdf; border-radius: 9px; background: #fbfcf8; }
#followups .followup-instructions-panel > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; list-style: none; color: #66805b; font-size: 11px; font-weight: 700; cursor: pointer; }
#followups .followup-instructions-panel > summary::-webkit-details-marker { display: none; }
#followups .followup-instructions-panel > summary > span:last-child { transition: transform .15s; }
#followups .followup-instructions-panel[open] > summary > span:last-child { transform: rotate(180deg); }
#followups .followup-instructions-panel .optional { margin-left: 6px; font-size: 10px; color: #839276; }
#followups .followup-instructions { margin: 9px 0 0; }
#followups .followup-instructions textarea { max-width: none; background: #fff; font-size: 12px; }
#followups .followup-instructions-panel p { margin: 9px 0 0; font-size: 10px; color: #7e8e72; line-height: 1.7; }
#followups .followup-panel-footer { display: flex; align-items: center; gap: 16px; min-height: 46px; padding: 12px 25px; border-top: 1px solid #edf0e9; background: #f9fbf7; }
#followups .followup-search-status { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
#followups .followup-status-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #9bb59c; }
#followups .followup-status-dot.is-busy { background: #3e8255; box-shadow: 0 0 0 4px #e2eddf; animation: followup-pulse 1.8s ease-in-out infinite; }
#followups #followup-status { margin: 0; font-size: 11px; line-height: 1.6; color: #6f7d6b; }
#followups .followup-connection { font-size: 10px; color: #7e8b7d; white-space: nowrap; }
#followups .followup-connection.is-connected { color: #4e7d59; }
#followups .auto-followup-card { margin: 0 0 34px; padding: 0; border: 1px solid #dfe7d7; border-radius: 13px; background: #f1f5ed; overflow: hidden; }
#followups .auto-followup-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 23px; cursor: pointer; list-style: none; }
#followups .auto-followup-heading::-webkit-details-marker { display: none; }
#followups .followup-automation-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
#followups .followup-automation-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #e0e7d8; border-radius: 10px; background: #f9fbf5; color: #819472; }
#followups .followup-automation-icon svg { width: 19px; height: 19px; }
#followups .followup-automation-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #58734b; font-size: 13px; font-weight: 700; }
#followups .followup-premium-label { padding: 3px 6px; border: 1px solid #dfe5cd; border-radius: 5px; background: #edf1e2; color: #839162; font-size: 8px; font-weight: 700; }
#followups .followup-automation-summary { display: block; margin-top: 6px; color: #78886a; font-size: 10px; line-height: 1.6; }
#followups .followup-automation-state { display: flex; align-items: center; gap: 17px; flex-shrink: 0; }
#followups .auto-followup-state { display: inline-block; padding: 5px 9px; border: 1px solid #e0e6d8; border-radius: 6px; color: #859278; background: #f8faf3; font-size: 9px; font-weight: 700; }
#followups .auto-followup-state.is-enabled { border-color: #cadbbd; background: #e7f0de; color: #4f7840; }
#followups .followup-automation-chevron { color: #8a9c79; transition: transform .15s; }
#followups .auto-followup-card[open] .followup-automation-chevron { transform: rotate(180deg); }
#followups .followup-automation-content { padding: 0 23px 23px; border-top: 1px solid #e3eadb; background: #fcfdf9; }
#followups .followup-automation-description { margin: 18px 0; color: #6f8062; font-size: 12px; line-height: 1.8; }
#followups .auto-followup-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; margin-top: 18px; }
#followups .auto-followup-weekends { font-size: 11px; color: #667c59; }
#followups .auto-followup-instructions textarea { font-size: 12px; background: #fff; }
#followups .followup-next-run { margin: 17px 0 0; padding: 12px 14px; border: 1px solid #e3eadb; border-radius: 8px; background: #f3f7ec; color: #718260; font-size: 11px; line-height: 1.8; }
#followups .followup-next-run:empty { display: none; }
#followups .auto-followup-actions { align-items: flex-start; gap: 16px; margin-top: 18px; }
#followups #auto-followup-status { flex: 1; min-width: 150px; color: #6f8063; font-size: 11px; line-height: 1.8; }
#followups #auto-followup-status.error-text { color: #a05d4e; }
#followups .auto-followup-actions .button { padding: 10px 13px; gap: 8px; font-size: 11px; }
#followups .followup-queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 23px; }
#followups .followup-queue-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--followup-ink); font-size: 21px; letter-spacing: -.6px; }
#followups .followup-queue-heading p { margin: 6px 0 0; color: #6d7b6b; font-size: 12px; }
#followups #followup-count { display: inline-block; padding: 3px 7px; border: 1px solid #e0e8da; border-radius: 6px; background: #edf3e7; color: #738b64; font-size: 11px; letter-spacing: 0; }
#followups .followup-ready-count { color: #68805c; font-size: 11px; white-space: nowrap; }
#followups .followup-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 0 0 18px; padding: 13px 16px; border: 1px solid #e0e7d8; border-radius: 11px; background: #eef3e8; }
#followups .followup-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
#followups .followup-select { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: #617957; font-size: 11px; font-weight: 700; cursor: pointer; }
#followups input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: #497746; flex-shrink: 0; }
#followups #followup-selection-summary { color: #7b8a6e; font-size: 10px; }
#followups .followup-bulk-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#followups .followup-bulk-actions .button { min-height: 35px; padding: 9px 12px; border-radius: 8px; gap: 9px; font-size: 11px; }
#followups .followup-send-progress { margin-bottom: 18px; padding: 18px; border: 1px solid #bfd1b5; border-radius: 11px; background: #f0f5e9; scroll-margin-top: 16px; }
#followups .followup-send-progress.is-active { position: sticky; top: 16px; z-index: 5; box-shadow: 0 4px 16px #223e2b14; }
#followups .followup-send-heading { display: flex; align-items: center; gap: 10px; color: #36533c; font-size: 13px; }
#followups .followup-send-heading .followup-spinner { width: 17px; height: 17px; }
#followups .followup-send-progress p { margin: 9px 0 0; color: #617957; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
#followups .followup-send-progress progress { display: block; width: 100%; height: 9px; margin-top: 14px; accent-color: #497746; }
#followups .action-list { gap: 16px; }
#followups .followup-card { overflow: hidden; padding: 0; border: 1px solid #e0e7dd; border-radius: 15px; background: #fff; box-shadow: 0 2px 4px #223d2c02; transition: border-color .2s; }
#followups .followup-card.is-selected { border-color: #bfd1b5; }
#followups .followup-card.is-sent { border-color: #dce6d2; background: #fcfdf9; }
#followups .followup-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 25px 0; }
#followups .followup-person { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
#followups .followup-person-avatar { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #e0e8dc; border-radius: 12px; background: #edf3e9; color: #5b7b54; font-size: 14px; font-weight: 800; }
#followups .followup-person-avatar[data-tone="1"] { background: #eff1f7; border-color: #e4e7f0; color: #687796; }
#followups .followup-person-avatar[data-tone="2"] { background: #faf2e7; border-color: #eee5d7; color: #a38654; }
#followups .followup-person-avatar[data-tone="3"] { background: #f5eff3; border-color: #ece2e8; color: #96788e; }
#followups .followup-person-copy { min-width: 0; }
#followups .followup-person-copy strong { display: block; font-size: 14px; color: #36533c; line-height: 1.6; overflow-wrap: anywhere; }
#followups .followup-person-copy p { margin: 4px 0 0; font-size: 11px; line-height: 1.6; color: #71806c; overflow-wrap: anywhere; }
#followups .followup-person-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 7px; color: #7a8774; font-size: 10px; line-height: 1.5; }
#followups .followup-person-meta > span { display: inline-flex; align-items: center; gap: 5px; }
#followups .followup-icon { display: inline-block; flex-shrink: 0; width: 15px; height: 15px; vertical-align: middle; }
#followups .followup-person-meta .followup-icon { width: 12px; height: 12px; }
#followups .followup-sent-note { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding-top: 7px; color: #688653; font-size: 10px; }
#followups .followup-card-header .followup-select { flex-shrink: 0; padding-top: 7px; font-size: 10px; }
#followups .followup-card-context { padding: 18px 25px; }
#followups .followup-card h3 { margin: 0 0 13px; color: #243f30; font-size: 18px; line-height: 1.5; letter-spacing: -.4px; overflow-wrap: anywhere; }
#followups .followup-original { margin: 0; color: #6c825f; font-size: 11px; }
#followups .followup-original summary { display: flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; margin: 0; padding: 3px 0; list-style: none; cursor: pointer; font-weight: 700; }
#followups .followup-original summary::-webkit-details-marker { display: none; }
#followups .followup-original[open] summary { margin-bottom: 12px; }
#followups .followup-original .action-body { margin: 0; padding: 15px; border: 1px solid #e3eade; border-radius: 9px; background: #f8faf4; color: #6f7e64; font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 340px; overflow: auto; }
#followups .followup-draft-panel { padding: 18px 25px; border-top: 1px solid #edf1e7; background: #fcfdf9; }
#followups .followup-draft-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
#followups .followup-draft-label { color: #66805a; font-size: 11px; font-weight: 700; }
#followups .followup-draft-heading .button { min-height: 32px; padding: 7px 11px; border: 1px solid #dde8d5; border-radius: 7px; background: #edf3e7; color: #5c7d4f; font-size: 10px; gap: 7px; }
#followups .followup-draft-heading .button .followup-icon { width: 13px; height: 13px; }
#followups .followup-draft-panel textarea { display: block; width: 100%; min-height: 145px; padding: 14px 16px; border: 1px solid #dfe7d8; border-radius: 9px; outline: none; background: #fff; color: #49613f; font: 12px/1.85 Manrope, 'Helvetica Neue', Arial, sans-serif; resize: vertical; }
#followups .followup-draft-panel textarea:focus { border-color: #83a78a; box-shadow: 0 0 0 3px #edf4eb; }
#followups .followup-draft-panel textarea::placeholder { color: #91a083; }
#followups .followup-draft-panel textarea:disabled { background: #f7faf2; color: #7d8c71; }
#followups .followup-card.is-sent textarea { min-height: 100px; }
#followups .followup-card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
#followups .followup-card-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-left: auto; }
#followups .followup-item-status { font-size: 10px; line-height: 1.7; color: #7b8e6c; }
#followups .followup-item-status.error-text { color: #a45e50; }
#followups .followup-draft-state { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 5px; background: #f6efdf; color: #a18a56; font-size: 9px; font-weight: 700; white-space: nowrap; }
#followups .followup-draft-state[data-state="ready"], #followups .followup-draft-state[data-state="sent"] { background: #edf4e5; color: #6c8956; }
#followups .followup-draft-state[data-state="error"] { background: #fbefea; color: #ab7060; }
#followups .followup-loading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 18px; padding: 23px 25px; border: 1px solid #dce5d4; border-radius: 14px; background: #f0f5e9; }
#followups .followup-loading strong { color: #486440; font-size: 13px; }
#followups .followup-loading p { margin: 7px 0 0; color: #718467; font-size: 12px; line-height: 1.6; }
#followups .followup-spinner { width: 25px; height: 25px; flex-shrink: 0; border: 2px solid #d6e3cc; border-top-color: #59824b; border-radius: 50%; animation: followup-spin .85s linear infinite; }
#followups .empty-state { display: flex; align-items: center; flex-direction: column; padding: 52px 24px; border: 1px dashed #d9e2d1; border-radius: 15px; background: #fbfcf8; text-align: center; }
#followups .followup-empty-icon { display: grid; place-items: center; width: 82px; height: 82px; margin-bottom: 20px; border-radius: 24px; background: #eef3e6; color: #8daa79; }
#followups .followup-empty-icon svg { width: 57px; height: 57px; }
#followups .empty-state strong { color: #4e6c40; font-size: 17px; letter-spacing: -.4px; }
#followups .empty-state p { max-width: 360px; margin: 10px 0 0; color: #6d7b60; font-size: 12px; line-height: 1.9; }
#followups .followup-page-note { margin: 22px 0 0; color: #728066; font-size: 10px; text-align: center; line-height: 1.8; }
#followups .followup-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body[data-page="followups"] #gmail-reply-notice { margin-bottom: 24px; padding: 22px 25px; border: 1px solid #e4dfc6; border-radius: 14px; background: #fbfaf2; }
body[data-page="followups"] #gmail-reply-notice h2 { font-size: 18px; color: #615b39; }
body[data-page="followups"] #gmail-reply-notice p { color: #7b765d; font-size: 12px; line-height: 1.7; }
@keyframes followup-pulse { 50% { opacity: .5; } }
@keyframes followup-spin { to { transform: rotate(360deg); } }
@media (max-width: 1150px) { #followups .followup-source-badge { display: none; } }
@media (max-width: 900px) {
  #followups .followup-panel-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  #followups .auto-followup-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #followups .followup-controls { flex-wrap: wrap; }
  #followups .followup-controls > .followup-field { min-width: 180px; }
  #followups .followup-review-note { text-align: left; }
}
@media (max-width: 760px) {
  body[data-page="followups"] .sidebar-bottom { display: none; }
  body[data-page="followups"] .nav { scrollbar-width: none; }
}
@media (max-width: 650px) {
  body[data-page="followups"] .page-content { padding: 25px 20px; }
  #followups .followup-page-heading { margin-bottom: 24px; }
  #followups h1 { font-size: 31px; }
  #followups .followup-page-heading p { max-width: 290px; font-size: 12px; }
  #followups .followup-panel-heading { padding: 19px 18px 0; }
  #followups .followup-controls { display: grid; grid-template-columns: minmax(0, 1fr); padding: 18px 18px 12px; }
  #followups .followup-controls > .followup-field { min-width: 0; }
  #followups .followup-custom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #followups .followup-custom .followup-field { width: auto; }
  #followups .followup-range-hint { padding: 0 18px 18px; }
  #followups .followup-instructions-panel { margin: 0 18px 18px; }
  #followups .followup-panel-footer { padding: 12px 18px; }
  #followups .followup-connection { display: none; }
  #followups .followup-search-status { align-items: flex-start; }
  #followups .followup-status-dot { margin-top: 6px; }
  #followups .auto-followup-heading { padding: 18px; gap: 10px; }
  #followups .followup-automation-identity { align-items: flex-start; gap: 10px; }
  #followups .followup-automation-title { font-size: 12px; gap: 5px; }
  #followups .followup-automation-state { gap: 10px; }
  #followups .followup-automation-summary { font-size: 10px; }
  #followups .followup-automation-content { padding: 0 18px 18px; }
  #followups .auto-followup-fields { gap: 16px 10px; }
  #followups .auto-followup-fields > .followup-field:has(#auto-followup-timezone) { grid-column: 1 / -1; }
  #followups .auto-followup-actions { flex-direction: column; align-items: stretch; }
  #followups .auto-followup-actions > div { justify-content: flex-end; }
  #followups .followup-queue-heading { align-items: flex-start; }
  #followups .followup-queue-heading h2 { font-size: 20px; }
  #followups .followup-queue-heading p { font-size: 11px; }
  #followups .followup-ready-count { font-size: 10px; margin-top: 6px; }
  #followups .followup-toolbar { align-items: stretch; padding: 13px; gap: 12px; }
  #followups .followup-bulk-actions { justify-content: space-between; width: 100%; }
  #followups .followup-bulk-actions .button { flex: 1; padding: 9px; font-size: 10px; gap: 6px; }
  #followups .followup-selection { justify-content: space-between; width: 100%; }
  #followups .followup-card-header { padding: 20px 18px 0; gap: 12px; flex-wrap: wrap; }
  #followups .followup-person { width: 100%; gap: 10px; }
  #followups .followup-person-avatar { flex-basis: 36px; width: 36px; height: 36px; border-radius: 10px; font-size: 12px; }
  #followups .followup-person-copy strong { font-size: 13px; }
  #followups .followup-card-header .followup-select { padding-top: 0; margin-left: 46px; }
  #followups .followup-card-context { padding: 17px 18px; }
  #followups .followup-card h3 { font-size: 17px; }
  #followups .followup-draft-panel { padding: 16px 18px; }
  #followups .followup-draft-heading { flex-wrap: wrap; }
  #followups .followup-draft-panel textarea { padding: 12px; font-size: 12px; }
  #followups .followup-card-footer { align-items: flex-start; flex-direction: column-reverse; }
  #followups .followup-card-actions { width: 100%; }
  #followups .followup-loading { padding: 18px; }
}
@media (max-width: 370px) {
  #followups .followup-queue-heading { flex-direction: column; gap: 7px; }
  #followups .followup-bulk-actions { flex-direction: column; align-items: stretch; }
  #followups .followup-automation-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #followups *, #followups *::before, #followups *::after { animation: none !important; transition: none !important; }
}
