.customer-followup-page {
  --followup-ink: #123047;
  --followup-green: #14876d;
  --followup-blue: #2475a8;
  --followup-gold: #d29b2c;
  --followup-danger: #c44a3f;
  color: var(--followup-ink);
}

.followup-hero,
.followup-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(120deg, #173a58 0%, #197a70 58%, #978238 120%);
  box-shadow: 0 18px 42px rgba(18, 48, 71, .14);
}

.followup-hero h3,
.followup-summary-head h3 { margin: 4px 0 6px; font-size: clamp(1.35rem, 2vw, 2rem); }
.followup-hero span,
.followup-summary-head span { color: rgba(255,255,255,.82); }
.followup-rule-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 560px; }
.followup-rule-pills span { padding: 9px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.1); font-size: .82rem; }
.followup-rule-pills b { color: #fff; }

.followup-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
  padding: 7px;
  border: 1px solid #d6e4ec;
  border-radius: 18px;
  background: #f6fafc;
}
.followup-tabs button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; border: 0; border-radius: 13px; color: #456275; background: transparent; font: inherit; font-weight: 800; cursor: pointer;
}
.followup-tabs button.active { color: #096a58; background: #e9f7f2; box-shadow: inset 0 0 0 1px #9fd9c9; }
.followup-tabs button b { min-width: 22px; padding: 2px 6px; border-radius: 999px; color: #fff; background: #d2832a; font-size: .72rem; }
.followup-notice { margin-bottom: 14px; padding: 11px 14px; border: 1px solid #cfe0e9; border-radius: 13px; background: #f7fbfd; color: #557084; font-size: .88rem; }
.followup-notice.success { border-color: #a4d9ca; color: #08715d; background: #eefaf6; }
.followup-notice.error { border-color: #efbbb5; color: #a8342c; background: #fff3f1; }
.followup-tab-panel { display: none; }
.followup-tab-panel.active { display: block; }

.followup-entry-layout,
.followup-review-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 16px; align-items: start; }
.followup-form { padding: 22px; }
.followup-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.followup-field-grid label,
.followup-note-field,
.followup-dialog label { display: grid; gap: 7px; color: #34566b; font-weight: 800; font-size: .85rem; }
.followup-field-grid input,
.followup-field-grid select,
.followup-note-field textarea,
.followup-dialog input,
.followup-dialog textarea,
.followup-summary-head select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #c9dce6; border-radius: 12px; background: #fff; color: #16364d; font: inherit;
}
.followup-field-grid input:disabled { background: #edf3f6; color: #526d7d; }
.followup-deposit-time-pair { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; padding: 14px; border: 1px solid #b9d9d0; border-radius: 16px; background: #f1faf7; }
.followup-deposit-time-pair label { display: grid; gap: 7px; color: #34566b; font-weight: 800; font-size: .85rem; }
.followup-deposit-time-pair > svg { align-self: center; width: 22px; height: 22px; color: #158269; }
.followup-deposit-time-pair input[readonly] { background: #f8fbfc; color: #587383; }
.followup-deposit-time-pair > small { grid-column: 1 / -1; color: #497263; font-weight: 800; }
.followup-localized-datetime { position: relative; display: flex; align-items: center; width: 100%; min-height: 46px; padding: 0; border: 1px solid #c9dce6; border-radius: 12px; background: #fff; overflow: hidden; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.followup-localized-datetime:focus, .followup-localized-datetime:focus-within { border-color: #16836d; box-shadow: 0 0 0 3px rgba(22,131,109,.15); outline: none; }
.followup-localized-datetime.is-readonly { background: #f8fbfc; cursor: default; }
.followup-date-value { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; clip-path: inset(50%); }
.followup-thai-date { display: block; width: 100%; padding: 10px 40px 10px 12px; color: #113d37; font-size: .92rem; font-weight: 900; line-height: 1.35; pointer-events: none; }
.followup-thai-date::after { content: "▣"; position: absolute; right: 13px; color: #17725f; font-size: .9rem; }
.followup-thai-date.is-empty { color: #718694; }
.followup-english-date { display: block; min-height: 22px; padding: 4px 9px; border-radius: 8px; background: #e4f5ef; color: #08715d; font-size: .74rem; font-weight: 800; line-height: 1.35; }
.followup-english-date.is-empty { background: #f1f5f7; color: #718694; }
.followup-month-guide { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; border: 1px solid #c6ded7; border-radius: 12px; background: #fff; color: #375d55; font-size: .76rem; line-height: 1.45; }
.followup-month-guide strong { color: #08715d; }
.followup-month-guide span { white-space: nowrap; }
.followup-thai-picker { width: min(520px, calc(100vw - 24px)); max-width: none; padding: 0; border: 0; border-radius: 20px; color: #16364d; background: #fff; box-shadow: 0 24px 70px rgba(15,45,61,.28); }
.followup-thai-picker::backdrop { background: rgba(9,35,49,.55); backdrop-filter: blur(3px); }
.followup-thai-picker-shell { display: grid; gap: 14px; padding: 20px; }
.followup-thai-picker-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid #d9e7ec; }
.followup-thai-picker-header small { color: #16836d; font-weight: 900; letter-spacing: .06em; }
.followup-thai-picker-header h3 { margin: 3px 0 0; font-size: 1.25rem; }
.followup-thai-picker-close { width: 38px; height: 38px; border: 1px solid #cbdde5; border-radius: 11px; background: #fff; color: #31586c; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.followup-thai-picker-month-nav { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 8px; text-align: center; }
.followup-thai-picker-nav-control { display: grid; place-items: center; width: 42px; height: 40px; border: 1px solid #c8dde5; border-radius: 11px; background: #f5fafb; color: #146c5c; font-size: 1.6rem; cursor: pointer; }
.followup-thai-picker-nav-control input, .followup-thai-picker-today-control input, .followup-thai-picker-days input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.followup-thai-picker-month-nav strong { color: #113d37; font-size: 1.05rem; }
.followup-thai-picker-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.followup-thai-picker-selectors label, .followup-thai-picker-time label { display: grid; gap: 5px; color: #486979; font-size: .78rem; font-weight: 900; }
.followup-thai-picker-selectors select, .followup-thai-picker-selectors input, .followup-thai-picker-time select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #c8dce5; border-radius: 10px; background: #fff; color: #16364d; font: inherit; font-weight: 800; }
.followup-thai-picker-weekdays, .followup-thai-picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.followup-thai-picker-weekdays strong { padding: 5px 0; color: #5b7584; text-align: center; font-size: .78rem; }
.followup-thai-picker-days > * { min-height: 42px; }
.followup-thai-picker-days label { display: grid; place-items: center; border: 1px solid transparent; border-radius: 10px; background: #f4f8fa; color: #173e54; font: inherit; font-weight: 800; cursor: pointer; }
.followup-thai-picker-days label:hover { border-color: #69b7a4; background: #e9f7f2; }
.followup-thai-picker-days label.is-today { border-color: #79a8bd; }
.followup-thai-picker-days label.is-selected { border-color: #0d8068; background: #16836d; color: #fff; box-shadow: 0 4px 12px rgba(22,131,109,.22); }
.followup-thai-picker-time { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: end; gap: 8px; margin: 0; padding: 12px; border: 1px solid #c9dfd8; border-radius: 13px; background: #f2faf7; }
.followup-thai-picker-time legend { padding: 0 6px; color: #176b5c; font-size: .82rem; font-weight: 900; }
.followup-thai-picker-time > span { padding-bottom: 11px; color: #315d56; font-weight: 900; }
.followup-thai-picker-actions { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid #d9e7ec; }
.followup-thai-picker-actions > div { display: flex; gap: 8px; }
.followup-thai-picker-actions button, .followup-thai-picker-actions label { display: grid; place-items: center; min-height: 40px; padding: 8px 13px; border-radius: 10px; font: inherit; font-weight: 900; cursor: pointer; }
.followup-thai-picker-actions .secondary { border: 1px solid #c8dce5; background: #fff; color: #31586c; }
.followup-thai-picker-actions .secondary.danger { color: #aa433f; }
.followup-thai-picker-actions .primary { border: 1px solid #16836d; background: #16836d; color: #fff; }
@media (max-width: 520px) {
  .followup-thai-picker-shell { padding: 15px; gap: 11px; }
  .followup-thai-picker-days > * { min-height: 38px; }
  .followup-thai-picker-actions { flex-direction: column; }
  .followup-thai-picker-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
}
.followup-return-time-pair { margin-top: 2px; }
.followup-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.followup-evidence-drop {
  position: relative; display: grid; justify-items: center; gap: 6px; min-height: 160px; padding: 20px; border: 1.5px dashed #90b9ca; border-radius: 18px; background: #f4fafc; text-align: center; cursor: pointer; outline: none;
}
.followup-evidence-drop:focus { box-shadow: 0 0 0 3px rgba(35,117,168,.18); }
.followup-evidence-drop.ready { border-color: #47ad8d; background: #eefaf6; }
.followup-evidence-drop.paste-only { cursor: copy; }
.followup-evidence-drop.paste-only:focus { border-color: #287da8; background: #edf8fc; }
.followup-evidence-drop.ready > svg { display: none; }
.followup-evidence-drop img { display: block; width: 100%; height: 150px; object-fit: contain; border: 1px solid #c8dce5; border-radius: 11px; background: #fff; }
.followup-evidence-drop img[hidden] { display: none; }
.followup-evidence-drop > svg { color: #287da8; width: 30px; height: 30px; }
.followup-evidence-drop span { color: #668092; font-size: .77rem; }
.followup-evidence-drop kbd { display: inline-block; padding: 2px 7px; border: 1px solid #aac8d6; border-bottom-width: 2px; border-radius: 6px; background: #fff; color: #155c7e; font: inherit; font-weight: 900; }
.followup-evidence-drop small { color: #08735e; font-weight: 800; word-break: break-all; }
.followup-note-field textarea { resize: vertical; }
.followup-form-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }

.followup-eligibility { position: sticky; top: 18px; padding: 24px; text-align: center; overflow: hidden; }
.followup-rate { display: grid; place-content: center; width: 126px; height: 126px; margin: 18px auto; border-radius: 50%; color: #08715d; background: conic-gradient(#1f9778 0 75%, #dcebe7 75%); box-shadow: inset 0 0 0 14px #fff; }
.followup-rate strong { font-size: 2rem; line-height: 1; }
.followup-rate span { font-size: .73rem; }
.followup-eligibility > div:last-of-type { display: flex; justify-content: space-between; margin: 18px 0; padding: 11px; border-radius: 12px; background: #f4f8fa; }
.followup-eligibility > small { display: flex; gap: 7px; text-align: left; color: #8b6720; }
.followup-eligibility.blocked .followup-rate { color: #b43b32; background: conic-gradient(#d95a4d 0 22%, #f2dfdc 22%); }

.followup-my-jobs { margin-top: 16px; }
.followup-card-list,
.followup-review-list { display: grid; gap: 10px; }
.followup-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; border: 1px solid #d5e3ea; border-radius: 15px; background: #fff;
}
.followup-card.is-highlighted { border-color: #e19a2b; box-shadow: 0 0 0 4px rgba(225, 154, 43, .18); animation: followup-highlight 1s ease-in-out 2; }
@keyframes followup-highlight { 50% { transform: translateY(-2px); box-shadow: 0 0 0 6px rgba(225, 154, 43, .24); } }
.followup-card h4 { margin: 3px 0; color: #16364d; }
.followup-card p { margin: 0; color: #668092; font-size: .82rem; }
.followup-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.followup-status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 999px; color: #23566e; background: #e9f3f7; font-size: .7rem; font-weight: 900; }
.followup-status.pending { color: #8c5c0b; background: #fff3d8; }
.followup-status.success { color: #076b56; background: #e7f7f1; }
.followup-status.danger { color: #aa3931; background: #feecea; }
.followup-empty { display: grid; place-items: center; gap: 8px; min-height: 180px; padding: 28px; color: #78909e; text-align: center; }
.followup-empty svg { width: 34px; height: 34px; }

.followup-review-layout { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.35fr); }
.followup-review-list { max-height: 720px; overflow: auto; }
.followup-review-item { width: 100%; padding: 14px; border: 1px solid #d8e5eb; border-radius: 14px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.followup-review-item.active { border-color: #42a585; background: #effaf6; box-shadow: 0 0 0 2px rgba(36,151,120,.12); }
.followup-review-item strong { display: block; margin: 4px 0; }
.followup-review-item small { color: #6b8291; }
.followup-review-detail { min-height: 420px; }
.followup-review-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.followup-review-facts div { padding: 10px; border: 1px solid #dce7ec; border-radius: 12px; background: #f7fafb; }
.followup-review-facts span { display: block; color: #718897; font-size: .72rem; }
.followup-review-facts b { display: block; margin-top: 4px; color: #15384e; overflow-wrap: anywhere; }
.followup-evidence-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.followup-review-form { display: grid; gap: 12px; padding: 14px; border-radius: 15px; background: #f5f9fb; }
.followup-review-form .followup-field-grid { margin: 0; }
.followup-review-decisions { display: flex; flex-wrap: wrap; gap: 8px; }

.followup-summary-head { margin-bottom: 16px; }
.followup-summary-head > div:last-child { display: flex; gap: 8px; align-items: center; }
.followup-summary-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.followup-summary-metrics article { padding: 18px; border: 1px solid #d8e5eb; border-radius: 18px; background: #fff; }
.followup-summary-metrics span { color: #6c8392; font-size: .76rem; }
.followup-summary-metrics strong { display: block; margin-top: 6px; color: #15384e; font-size: 1.35rem; }
.followup-summary-metrics article:last-child { color: #fff; border: 0; background: linear-gradient(125deg, #17694e, #138b76); }
.followup-summary-metrics article:last-child span,
.followup-summary-metrics article:last-child strong { color: #fff; }
.followup-employee-summary { display: grid; gap: 9px; }
.followup-employee-row { display: grid; grid-template-columns: minmax(140px, 1fr) repeat(4, minmax(90px, .7fr)) auto; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid #e2eaee; }
.followup-employee-row span { color: #668092; font-size: .78rem; }
.followup-employee-row b { color: #16364d; }
.followup-history { display: grid; gap: 9px; }
.followup-history-row { display: grid; grid-template-columns: minmax(130px, 1fr) repeat(4, minmax(90px, .7fr)) auto; gap: 9px; align-items: center; padding: 12px; border: 1px solid #e0e9ed; border-radius: 12px; }

.followup-dialog { width: min(560px, calc(100vw - 28px)); border: 0; border-radius: 20px; padding: 0; box-shadow: 0 26px 80px rgba(8,32,48,.34); }
.followup-dialog::backdrop { background: rgba(5, 27, 40, .54); backdrop-filter: blur(3px); }
.followup-dialog form { display: grid; gap: 14px; padding: 22px; }
.followup-return-rate-preview { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; padding: 12px; border: 1px solid #9fd6c3; border-radius: 14px; background: #eefaf6; color: #31586a; }
.followup-return-rate-preview span { display: grid; gap: 3px; font-size: .76rem; }
.followup-return-rate-preview b { color: #143c4f; }
.followup-return-rate-preview > strong { padding: 7px 10px; border-radius: 999px; background: #14795f; color: #fff; font-size: 1rem; }
.followup-return-rate-preview small { grid-column: 1 / -1; color: #2f6e5e; font-weight: 800; }
.followup-return-rate-preview.blocked { border-color: #efb1aa; background: #fff2f0; }
.followup-return-rate-preview.blocked > strong { background: #c64d43; }
.followup-return-rate-preview.blocked small { color: #a13f37; }
.followup-evidence-viewer { width: min(1040px, calc(100vw - 28px)); }
.followup-evidence-viewer-inner { display: grid; gap: 14px; padding: 18px; }
.followup-evidence-loading { min-height: 220px; display: grid; place-items: center; padding: 24px; border: 1px dashed #b9d1dd; border-radius: 14px; background: #edf3f6; color: #34566b; font-weight: 800; text-align: center; }
.followup-evidence-loading[hidden] { display: none; }
.followup-evidence-viewer img { display: block; width: 100%; max-height: min(76vh, 860px); object-fit: contain; border-radius: 14px; background: #edf3f6; }
.followup-evidence-viewer img[hidden] { display: none; }
.nav-button .nav-alert-badge.followup-fresh { animation: followup-badge-pop .9s ease-out 2; }
@keyframes followup-badge-pop { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.32); box-shadow: 0 0 0 7px rgba(225, 76, 66, .18); } }

@media (max-width: 1050px) {
  .followup-hero, .followup-summary-head { align-items: flex-start; flex-direction: column; }
  .followup-rule-pills { justify-content: flex-start; }
  .followup-entry-layout, .followup-review-layout { grid-template-columns: 1fr; }
  .followup-eligibility { position: static; }
  .followup-summary-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .followup-hero, .followup-summary-head { padding: 19px; border-radius: 18px; }
  .followup-tabs button span { font-size: .78rem; }
  .followup-field-grid, .followup-evidence-grid { grid-template-columns: 1fr; }
  .followup-deposit-time-pair { grid-template-columns: 1fr; align-items: stretch; }
  .followup-deposit-time-pair > svg { display: none; }
  .followup-form { padding: 15px; }
  .followup-summary-head > div:last-child { width: 100%; align-items: stretch; flex-direction: column; }
  .followup-summary-metrics { grid-template-columns: 1fr; }
  .followup-review-facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .followup-return-rate-preview { grid-template-columns: 1fr auto; }
  .followup-return-rate-preview > svg { display: none; }
  .followup-employee-row, .followup-history-row { grid-template-columns: 1fr 1fr; }
  .followup-employee-row > *:first-child, .followup-history-row > *:first-child { grid-column: 1 / -1; }
  .followup-form-actions { flex-direction: column-reverse; }
}
