#schedulingReportsModal .scheduling-reports-panel.has-report-chat {
  grid-template-rows: auto minmax(90px, 1fr) minmax(230px, 1fr);
}
#schedulingReportsList {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
.report-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
  background: #fff;
}
.report-chat.hidden { display: none; }
@layer ui-controls {
  #reportChatClear.hidden { display: none !important; }
}
.report-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.report-chat-heading { flex: 1; min-width: 0; }
#schedulingReportsModal .report-chat-heading h3 {
  padding: 0;
  border: 0;
  font-size: calc(14px + var(--app-text-size-offset, 0px));
  font-weight: 400;
}
.report-chat-actions { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.report-chat-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
  flex: 1;
}
.report-chat-messages {
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
#reportChatText {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  padding: 10px;
  resize: none;
  overflow-y: auto;
  background: var(--history-note-bg);
  font: inherit;
  border: 1px solid var(--field-border);
  border-radius: 6px;
}
.report-chat-message { margin: 0 0 10px; min-width: 0; }
.report-chat-message:last-child { margin-bottom: 0; }
.report-chat-message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  font-size: calc(11px + var(--app-text-size-offset, 0px));
}
.report-chat-message-meta > span { overflow-wrap: anywhere; min-width: 0; }
.report-chat-message-content {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}
.report-chat-message-body {
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 6px;
  background: #edf1f5;
  color: var(--ink);
}
.report-chat-message-text {
  min-width: 0;
  padding: 3px 2px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: calc(13px + var(--app-text-size-offset, 0px));
  line-height: 1.4;
}
.report-chat-message.is-deleted .report-chat-message-body { background: transparent; color: var(--muted); font-style: italic; }
.report-chat-empty { color: var(--muted); font-size: calc(13px + var(--app-text-size-offset, 0px)); }
.report-chat-template { color: #345f9c; text-decoration: underline; overflow-wrap: anywhere; }
body.theme-dark .report-chat-template { color: #c5e3ff; }
.report-chat-message.is-own .report-chat-template,
.todo-task-message-own .report-chat-template { color: inherit; }
.report-chat-mention {
  padding: 1px 4px;
  border-radius: 3px;
  background: #edf4fc;
  color: #345f9c;
  font-weight: 600;
  text-decoration: none;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.report-chat-message:not(.is-own):has(.report-chat-mention) .report-chat-message-body {
  padding: 0;
  border-radius: 0;
  background: transparent;
}
#reportMentionsButton { --ui-bare-color: var(--chrome-ink); --ui-bare-margin-inline: -6px; position: relative; flex: 0 0 auto; align-self: center; }
#reportMentionsCount {
  position: absolute; top: -7px; right: -3px; min-width: 15px; height: 15px;
  padding: 0 3px; box-sizing: border-box; border-radius: 7px; background: #b42318;
  color: white; font-size: 10px; line-height: 15px; text-align: center;
}
.report-mentions-popup, .report-mention-suggestions {
  position: fixed; z-index: 4200; width: min(380px, calc(100vw - 16px));
  max-height: min(360px, calc(100dvh - 16px)); overflow: auto; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
  box-shadow: 0 6px 20px rgba(25, 38, 52, .2); padding: 4px;
}
.report-mention-suggestions { width: min(260px, calc(100vw - 16px)); max-height: 180px; }
.report-mentions-popup.hidden, .report-mention-suggestions.hidden { display: none; }
.report-mentions-popup h3 { margin: 0; padding: 8px; font-size: 13px; border-bottom: 1px solid var(--line); }
.report-mention-link, .report-mention-option {
  display: block; width: 100%; min-width: 0; padding: 8px; text-align: left;
  border: 0; border-radius: 3px; background: transparent; color: inherit;
  box-shadow: none; font: inherit; font-size: 13px; white-space: normal; overflow-wrap: anywhere;
}
.report-mention-link + .report-mention-link { border-top: 1px solid var(--line); }
.report-mention-link > span { display: block; }
.report-mention-link-title { font-weight: 600; }
.report-mention-link-meta, .report-mention-link-text { margin-top: 3px; font-size: 12px; }
.report-mention-link-meta { color: var(--muted); }
.report-mention-link-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-mention-link:hover, .report-mention-link:focus-visible, .report-mention-option[aria-selected="true"], .report-mention-option:hover { background: var(--table-row-hover-bg); }
body.theme-dark :is(.report-mentions-popup, .report-mention-suggestions) { background: var(--surface); }
.report-chat-status { color: #ad3428; font-size: calc(12px + var(--app-text-size-offset, 0px)); line-height: 1.3; overflow-wrap: anywhere; }
body.theme-dark .report-chat-message-body { background: #303b44; }
body.theme-dark .report-chat-mention { background: #304c66; color: #c5e3ff; }
.report-chat-message.is-own:not(.is-deleted) .report-chat-message-body { background: #4473e8; color: #fff; }
body.theme-dark .report-chat-message.is-own:not(.is-deleted) .report-chat-message-body { background: #4d78f0; }
body.theme-dark :is(.report-chat, .report-chat-messages) { background: var(--surface); }
body.theme-dark .report-chat-status { color: #ffb7ad; }
@media (max-width: 900px) {
  #schedulingReportsModal.has-report-chat .scheduling-reports-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(500px, 1fr) minmax(320px, 1fr);
    overflow-y: auto;
  }
  #schedulingReportsModal.has-report-chat .scheduling-reports-panel:last-child { grid-column: 1; grid-row: 4; }
  #schedulingReportsModal.has-report-chat .scheduling-reports-card .parts-config-header { padding-right: 34px; }
}
@media (max-width: 520px) {
  .report-chat-header { align-items: flex-start; flex-direction: column; gap: 6px; }
  .report-chat-actions { align-self: flex-end; }
  .report-chat-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(80px, 1fr) 84px; }
  #schedulingReportsModal .scheduling-reports-panel.has-report-chat { grid-template-rows: auto minmax(100px, 1fr) minmax(310px, 1fr); }
}
@media (max-height: 680px) and (min-width: 901px) {
  #schedulingReportsModal.has-report-chat .scheduling-reports-card { overflow-y: auto; }
  #schedulingReportsModal .scheduling-reports-panel.has-report-chat { min-height: 330px; }
}

/* Native personal report-follow list, using fictional DEMO state only. */
.report-title-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.report-follow-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin: 0 4px 0 0; color: var(--ink); }
#schedulingReportsModal :is(#reportChatHeading, #reportFollowLabel) { font: 400 calc(14px + var(--app-text-size-offset, 0px))/1.2 var(--app-font-family, "Segoe UI", "Trebuchet MS", sans-serif); }
#reportFollowLabel > span { font: inherit; }
#reportFollow { font: inherit; width: 1em; height: 1em; min-height: 0; margin: 0; accent-color: #4166bd; }
.report-follow-label.hidden { display: none; }
.report-follows-popup {
  --ink: #26384f;
  --muted: #526477;
  --table-row-hover-bg: #eef6ff;
  --report-follow-row-height: 31px;
  display: flex; flex-direction: column; position: fixed; z-index: 4200;
  width: min(360px, calc(100vw - 16px)); box-sizing: border-box; padding: 4px;
  border: 1px solid #b6c2d0; border-radius: 6px; background: #fff; color: var(--ink);
  box-shadow: 0 12px 28px rgba(18, 32, 55, .22); overflow: hidden;
}
.report-follows-popup.hidden { display: none; }
.report-follows-popup:focus, .report-follow-row:focus { outline: none; }
.report-follows-search { flex: 0 0 auto; margin: 0 0 4px; min-width: 0; }
#reportFollowsSearch { width: 100%; min-width: 0; }
.report-follows-status { padding: 6px 10px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.report-follows-list {
  min-height: 12px; max-height: calc(10 * var(--report-follow-row-height));
  overflow-y: scroll; overflow-x: hidden; scrollbar-gutter: stable;
  /* Android overlay scrollbars do not consume scrollbar-gutter space. */
  padding-inline-end: 16px;
}
.report-follow-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px;
  min-width: 0; height: var(--report-follow-row-height); box-sizing: border-box;
  border-left: 3px solid transparent; border-radius: 4px; background: #fff;
}
.report-follow-row + .report-follow-row { border-top: 1px solid rgba(148, 163, 184, .35); }
.report-follow-row:is(:hover, :focus-within, .is-selected) { background: var(--table-row-hover-bg); }
.report-follow-actions { display: flex; align-items: center; gap: 2px; }
#reportFollowsPopup .report-follow-name {
  box-sizing: border-box; width: 100%; min-width: 0; min-height: 0; height: 26px;
  padding: 2px 5px; border: 1px solid var(--field-border); border-radius: 4px;
  background: #fff; color: inherit; font: inherit; font-size: calc(13px + var(--app-text-size-offset, 0px));
}
.report-follow-caption {
  display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; height: 100%;
  box-sizing: border-box; padding: 4px 6px; color: inherit;
  text-align: left; font-size: calc(13px + var(--app-text-size-offset, 0px)); line-height: 22px;
}
.report-follow-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-follow-unread { flex: 0 0 auto; color: #4166bd; font-weight: 600; }
@media (max-width: 520px) {
  #schedulingReportsModal .scheduling-reports-list-header { flex-wrap: wrap; }
  #schedulingReportsModal .scheduling-reports-list-header .scheduling-reports-preview-actions { flex-wrap: wrap; margin-left: auto; }
}

.report-chat-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
#reportFollowsButton { --ui-bare-color: var(--chrome-ink); --ui-bare-margin-inline: -6px; position: relative; flex: 0 0 auto; align-self: center; }
#reportFollowsButton.is-empty:not(:disabled)::before { opacity: .45; }
#reportFollowsCount { position: absolute; top: -7px; right: -3px; min-width: 15px; height: 15px; padding: 0 3px; box-sizing: border-box; border-radius: 7px; background: #b42318; color: white; font-size: 10px; line-height: 15px; text-align: center; }
#reportFollowsPopup :is(input, button) { touch-action: manipulation; }
body.theme-dark .report-follows-popup { color-scheme: light; }
