/* Follow-ups: history status bar, record panel, form and the Follow-ups tab. Colours: blue open, amber due soon, red overdue, green done, grey cancelled. */
.fu-pill { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; white-space: nowrap; background: #e6f1fb; color: #1d5f99; }
.fu-pill.k-soon { background: #fff4d6; color: #85620b; }
.fu-pill.k-overdue { background: #fde8e6; color: #a33a2c; }
.fu-pill.k-done { background: #e5f4e8; color: #2f6b3a; }
.fu-pill.k-cancelled { background: #eceff1; color: #5d6b75; }
.fu-struck { text-decoration: line-through; color: #6b7780; }
.fu-muted { color: #6b7780; font-size: 11px; }
.fu-spacer { flex: 1 1 auto; }
.fu-error { color: #a33a2c; font-size: 12px; padding: 2px 0; }
.fu-link { border: 0; background: transparent; color: #176788; padding: 0 4px; font-size: 11px; cursor: pointer; text-decoration: underline; }

/* Account history entry (style B, status bar) */
.fu-entry { grid-area: content; margin: 2px 4px 4px 0; padding: 4px 8px; border-left: 3px solid #2d7dd2; background: #f6f9fc; font-size: 11px; color: #333; line-height: 1.35; }
.fu-entry.k-soon { border-left-color: #e0a100; background: #fffaf0; }
.fu-entry.k-overdue { border-left-color: #d64b3c; background: #fff6f5; }
.fu-entry.k-done { border-left-color: #3a9a4f; background: #f5faf6; }
.fu-entry.k-cancelled { border-left-color: #9aa5ad; background: #f6f7f8; }
.fu-entry-1 { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.fu-entry-1 b { font-size: 12px; overflow-wrap: anywhere; }
.fu-entry-2 { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; color: #555; margin-top: 2px; }
.fu-entry-3 { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; color: #444; }
.fu-entry-4 { display: flex; gap: 6px; align-items: center; margin-top: 3px; color: #6b7780; }
.fu-go { border: 1px solid #b9c7d0; background: white; color: #253746; border-radius: 4px; padding: 1px 6px; font-size: 11px; cursor: pointer; white-space: nowrap; }
.fu-go:hover { background: #eef5f9; }

/* Record panel */
.fu-panel { display: grid; gap: 4px; font-size: 12px; color: #253746; }
.fu-panel-head { display: flex; align-items: center; gap: 6px; font-weight: bold; background: #ccc; padding: 4px; }
.fu-panel-title { flex: 1 1 auto; }
.fu-add { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; font-size: 12px; font-weight: normal; }
.fu-quickview .fu-panel-head { background: transparent; padding: 0 0 2px; }
.fu-empty { padding: 2px 4px; }
.fu-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 6px; align-items: start; padding: 5px 4px; border-left: 3px solid #2d7dd2; border-bottom: 1px solid #e8e8e8; }
.fu-row.k-soon { border-left-color: #e0a100; }
.fu-row.k-overdue { border-left-color: #d64b3c; }
.fu-row.k-done { border-left-color: #3a9a4f; }
.fu-row.k-cancelled { border-left-color: #9aa5ad; }
.fu-avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #4a6fa5; color: white; font-size: 9px; font-weight: bold; }
.fu-row-main { min-width: 0; }
.fu-row-title { display: block; max-width: 100%; border: 0; background: transparent; padding: 0; font-weight: 600; font-size: 12px; text-align: left; cursor: pointer; color: #253746; overflow-wrap: anywhere; }
.fu-row-title:hover { text-decoration: underline; }
.fu-row-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 2px; color: #6b7780; font-size: 11px; }
.fu-due { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
/* Google Calendar button (CalendarLinksTemplate) and its picker (core.calendarpicker.ts): follow-ups, account history and My actions. */
.cal-link { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #7a8a96; font-size: 12px; text-decoration: none; vertical-align: middle; cursor: pointer; box-shadow: none; }
.cal-link:hover, .cal-link:focus-visible, .cal-link[aria-expanded="true"] { color: #168aaf; background: #e7f4f9; }
.cal-picker { position: fixed; z-index: 2000; width: 310px; max-width: calc(100vw - 16px); overflow: hidden; border: 1px solid #d6e0e6; border-radius: 10px; background: white; color: #253746; box-shadow: 0 16px 48px #0c243838, 0 2px 8px #0c24381a; font-size: 13px; line-height: 1.4; text-align: left; }
.cal-picker [hidden], .cal-picker-scrim[hidden] { display: none !important; }
.cal-picker button { font-family: inherit; box-shadow: none; }
.cal-picker button:focus-visible, .cal-picker input:focus-visible { outline: 2px solid #00a5d6; outline-offset: 1px; }
.cal-picker-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; border-bottom: 1px solid #e3e9ed; font-weight: 600; font-size: 12.5px; }
.cal-picker-head > i { color: #168aaf; }
.cal-picker-heading { flex: 1 1 auto; min-width: 0; }
.cal-picker-heading small { display: block; overflow: hidden; color: #697784; font-size: 11px; font-weight: 400; white-space: nowrap; text-overflow: ellipsis; }
.cal-picker-close { display: none; border: 0; background: transparent; color: #647684; font-size: 22px; line-height: 1; padding: 0 4px; cursor: pointer; }
.cal-picker-main { padding: 8px 8px 2px; }
.cal-picker-due { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; margin: 0; padding: 9px 10px; border: 1px solid #33bbee; border-radius: 8px; background: #eef8fc; color: #253746; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.cal-picker-due > i { color: #168aaf; text-align: center; }
.cal-picker-due small { display: block; color: #176788; font-size: 11px; font-weight: 400; }
.cal-picker-due:hover, .cal-picker-due:focus-visible { background: #dff1f8; }
.cal-picker-default { padding: 2px 6px; border-radius: 3px; background: #d3ecf6; color: #0f6684; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cal-picker-label { padding: 8px 12px 2px; color: #8a98a3; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cal-picker-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; padding: 4px 8px 6px; }
.cal-picker-chip { display: grid; gap: 1px; margin: 0; padding: 6px 10px; border: 1px solid #c9d6de; border-radius: 8px; background: white; color: #253746; font-size: 12.5px; text-align: left; cursor: pointer; }
.cal-picker-chip small { color: #697784; font-size: 11px; }
.cal-picker-chip:hover, .cal-picker-chip:focus-visible { border-color: #33bbee; background: #f1f9fc; }
.cal-picker-more { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: calc(100% - 8px); margin: 0 4px 4px; padding: 7px 8px; border: 0; border-top: 1px solid #edf1f4; border-radius: 0 0 6px 6px; background: transparent; color: #253746; font-size: 12.5px; text-align: left; cursor: pointer; }
.cal-picker-more > i { color: #7a8a96; text-align: center; }
.cal-picker-more:hover, .cal-picker-more:focus-visible { background: #eef7fb; }
.cal-picker-more[aria-expanded="true"] > i:last-child { transform: rotate(180deg); }
.cal-picker-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 12px 10px; }
.cal-picker-field { display: grid; gap: 2px; color: #455a66; font-size: 11px; }
.cal-picker-field input { box-sizing: border-box; width: 100%; height: 30px; padding: 0 6px; border: 1px solid #b9c7d0; border-radius: 4px; font: inherit; font-size: 12px; color: #253746; }
.cal-picker-go { grid-column: 1 / -1; height: 30px; border: 1px solid #168aaf; border-radius: 5px; background: #168aaf; color: white; font-size: 12px; font-weight: 500; cursor: pointer; }
.cal-picker-go:disabled { opacity: .45; cursor: default; }
.cal-picker-preview { padding: 8px 12px; border-top: 1px solid #e3e9ed; background: #fafcfd; color: #176788; font-size: 11px; }
.cal-picker-preview b { display: block; overflow: hidden; color: #253746; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.cal-picker-error { color: #a33a2c; }
.cal-picker-scrim { position: fixed; inset: 0; z-index: 1999; background: #0c243859; }
/* Phones: the same picker as a bottom sheet. */
.cal-picker.cal-picker-sheet { left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-width: none; max-height: 88dvh; overflow-y: auto; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.cal-picker-sheet .cal-picker-head { padding: 14px 16px 10px; font-size: 15px; }
.cal-picker-sheet .cal-picker-close { display: grid; place-items: center; min-width: 44px; min-height: 44px; margin: -12px -12px -12px 0; }
.cal-picker-sheet .cal-picker-due { min-height: 52px; font-size: 14px; }
.cal-picker-sheet .cal-picker-chip { min-height: 48px; font-size: 14px; }
.cal-picker-sheet .cal-picker-more { min-height: 48px; font-size: 14px; }
.cal-picker-sheet .cal-picker-field input, .cal-picker-sheet .cal-picker-go { height: 40px; font-size: 14px; }
.fu-row-notes { margin-top: 2px; color: #555; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fu-row-actions { display: flex; gap: 4px; }
.fu-row-actions button { height: 24px; padding: 0 8px; font-size: 11px; }

/* Form */
.fu-editor { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 8px; align-items: center; align-content: start; padding: 8px; border: 1px solid #d6e0e6; border-radius: 6px; background: #fbfcfd; font-size: 12px; }
.fu-editor > label { color: #455a66; }
.fu-editor input, .fu-editor select, .fu-editor textarea { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 12px; }
.fu-editor textarea { resize: vertical; min-height: 48px; }
.fu-editor-head, .fu-editor > .fu-muted, .fu-editor > .fu-error, .fu-editor-actions { grid-column: 1 / -1; }
.fu-editor-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.fu-editor-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fu-editor-actions button { height: 26px; padding: 0 10px; font-size: 12px; }
.fu-primary { background: #168aaf; color: white; border: 1px solid #168aaf; }
.fu-renewal-side .fu-editor { grid-template-columns: minmax(0, 1fr); }
.fu-renewal-side .fu-panel-head { flex-wrap: wrap; }
.fu-renewal-side .fu-panel-head > * { white-space: nowrap; }
.fu-renewal-side .fu-add-more { display: none; }
@media (max-width: 600px) { .fu-editor { grid-template-columns: minmax(0, 1fr); } }
/* optikam.mobile.css clips every dialog's content area; let the follow-up form scroll and keep its buttons in view */
#DialogVM > div:nth-child(2):has(> .fu-editor) { overflow-y: auto !important; }
#DialogVM .fu-editor-actions { position: sticky; bottom: 0; padding: 6px 0; background: #fbfcfd; }

/* Follow-ups tab */
.fu-tab { position: absolute; inset: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 8px; padding: 8px 10px; font-size: 13px; color: #253746; overflow: hidden; }
.fu-views { display: flex; gap: 2px; margin-left: 20px; }
/* With a side panel open the tab is narrow, so its header buttons switch to the icons the phone layout uses. */
#FollowUpsManagerVMHeader { container-type: inline-size; }
@container (max-width: 680px) {
    #FollowUpsManagerVMHeader .headerBtnLabel { display: none !important; }
    #FollowUpsManagerVMHeader .headerBtnIcon { display: inline !important; }
    #FollowUpsManagerVMHeader .headerButton { width: 33px !important; }
}
.fu-view { display: flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px 0; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #5b6b75; font-size: 14px; font-weight: 400; box-shadow: none; white-space: nowrap; }
#FollowUpsManagerVM .fu-view:hover { background: transparent; color: #000; box-shadow: none; transform: none; }
.fu-view.fu-view-active { color: #000; font-weight: 600; border-bottom-color: #33bbee; }
.fu-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.fu-filters label { display: grid; gap: 2px; font-size: 11px; color: #455a66; }
.fu-filters input, .fu-filters select { height: 28px; font-size: 12px; min-width: 110px; }
.fu-filters .fu-search input { min-width: 200px; }
.fu-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fu-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid #c9d6de; border-radius: 13px; background: white; color: #253746; font-size: 12px; cursor: pointer; }
.fu-chip[aria-pressed="true"] { background: #e3f3fa; border-color: #33bbee; }
.fu-chip b { font-weight: 600; color: #306279; }
.fu-chip.late b { color: #a33a2c; }
#FollowUpsManagerVM .fu-chip:hover { background: #eef5f9; box-shadow: none; transform: none; }
.fu-count { margin-left: auto; color: #6b7780; font-size: 12px; }
.fu-results { position: relative; min-height: 0; }
.fu-results-scroll { position: absolute; inset: 0; overflow: auto; }
.fu-table { width: 100%; height: 100%; }
.fu-table .fu-done { height: 22px; padding: 0 8px; font-size: 11px; }
.fu-board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 10px; align-items: start; min-width: 1000px; }
.fu-col { display: grid; gap: 6px; padding: 6px; border-radius: 6px; background: #f1f5f8; }
.fu-col h3 { display: flex; justify-content: space-between; margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #455a66; }
.fu-col.c-overdue h3 { color: #a33a2c; }
.fu-card { display: grid; gap: 3px; padding: 6px 8px; border-radius: 5px; border-left: 3px solid #2d7dd2; background: white; box-shadow: 0 1px 2px #0c243826; font-size: 12px; text-align: left; cursor: pointer; }
.fu-card.k-soon { border-left-color: #e0a100; }
.fu-card.k-overdue { border-left-color: #d64b3c; }
.fu-card.k-done { border-left-color: #3a9a4f; }
.fu-card.k-cancelled { border-left-color: #9aa5ad; }
.fu-card-title { font-weight: 600; overflow-wrap: anywhere; }
.fu-card-foot { display: flex; gap: 6px; align-items: center; color: #6b7780; font-size: 11px; }
.fu-record { display: inline-flex; gap: 4px; align-items: center; border: 0; background: transparent; padding: 0; color: #176788; font-size: 11px; cursor: pointer; text-align: left; }
.fu-record:hover { text-decoration: underline; }
.fu-split { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 10px; height: 100%; }
.fu-split-list { overflow: auto; border-right: 1px solid #e1e8ed; padding-right: 6px; }
.fu-split-group { display: flex; justify-content: space-between; padding: 6px 4px 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; color: #455a66; }
.fu-split-item { display: grid; gap: 3px; width: 100%; padding: 6px 8px; border: 0; border-left: 3px solid transparent; border-radius: 0; background: transparent; color: #253746; text-align: left; font-size: 12px; cursor: pointer; }
#FollowUpsManagerVM .fu-split-item:not(.fu-selected):hover { background: #f1f9fc; box-shadow: none; transform: none; }
.fu-split-item.fu-selected { background: #e3f3fa; border-left-color: #33bbee; }
.fu-split-item .fu-row-meta { margin: 0; }
.fu-split-detail { overflow: auto; padding: 4px 6px; }
.fu-split-detail h2 { margin: 6px 0; font-size: 18px; }
.fu-detail-grid { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 10px; align-items: baseline; margin: 8px 0; font-size: 12px; }
.fu-detail-grid dt { color: #6b7780; }
.fu-detail-grid dd { margin: 0; overflow-wrap: anywhere; }
.fu-empty-state { padding: 24px; color: #6b7780; text-align: center; }
@media (max-width: 900px) { .fu-split { grid-template-columns: minmax(0, 1fr); } }
