:root {
  --ink: #102f3b;
  --muted: #6b7d84;
  --navy: #113f4e;
  --navy-deep: #082b36;
  --teal: #0a8f83;
  --teal-dark: #067267;
  --mint: #e1f5f0;
  --cream: #f3f6f5;
  --paper: #ffffff;
  --line: #dce7e5;
  --soft-line: #eaf0ef;
  --shadow: 0 14px 38px rgba(11, 48, 59, .08);
  --shadow-soft: 0 4px 18px rgba(11, 48, 59, .045);
  --radius: 16px;
}

body {
  background: #f3f6f5;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

h1, h2, h3, .metric-card strong, .clock-card strong {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.025em;
}

h2 { font-size: 27px; font-weight: 760; }
h3 { font-size: 18px; }
.eyebrow { color: #08786f; letter-spacing: .115em; }

.app-shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
  padding: 24px 16px 20px;
  background: linear-gradient(180deg, #092e39 0%, #0b3540 65%, #092b35 100%);
  border-right: 1px solid rgba(255,255,255,.05);
}
.brand { padding: 0 10px 30px; }
.brand-mark.small {
  border-radius: 11px;
  background: linear-gradient(145deg, #11a597, #08766e);
  box-shadow: 0 9px 24px rgba(2, 22, 28, .28);
}
.main-nav { gap: 7px; }
.nav-item {
  position: relative;
  min-height: 44px;
  gap: 0;
  padding: 11px 14px;
  border-radius: 10px;
  color: #aec6ca;
  font-size: 13px;
  font-weight: 650;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-item:hover { background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(28, 174, 158, .23), rgba(255,255,255,.07));
  color: #fff;
  box-shadow: inset 3px 0 #39c7b7;
}
.sidebar-footer { padding: 18px 10px 0; }

.topbar {
  min-height: 88px;
  padding: 18px 32px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 0 rgba(13, 58, 70, .04);
}
.privacy-banner {
  padding: 9px 32px;
  border-width: 0 0 1px;
  background: #fff9e9;
}
main { max-width: 1900px; margin: 0 auto; padding: 28px 32px 54px; }

.panel, .metric-card, .clock-card {
  border-color: #e0e9e7;
  box-shadow: var(--shadow-soft);
}
.panel { padding: 22px; }
.metric-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  padding: 18px;
}
.metric-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -32px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(13, 143, 131, .055);
}
.metric-card strong { margin: 11px 0 5px; font-size: 31px; font-weight: 750; }
.metric-follow-up { border-top: 3px solid #d18b29; }
.metric-booked { border-top: 3px solid #348564; }
.metric-not-booked { border-top: 3px solid #bf5a50; }
.metric-in-progress { border-top: 3px solid #337fa7; }

.dashboard-grid, .dashboard-ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dashboard-ops-grid { margin-top: 16px; grid-template-columns: .85fr 1.15fr; }
.active-csr-total { display: flex; align-items: baseline; gap: 7px; }
.active-csr-total strong { color: var(--teal); font-size: 28px; line-height: 1; }
.active-csr-total span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.team-presence-list { display: grid; gap: 4px; }
.presence-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 3px;
  border-bottom: 1px solid var(--soft-line);
}
.presence-row:last-child { border-bottom: 0; }
.presence-row div { display: grid; gap: 3px; }
.presence-row strong { font-size: 12px; }
.presence-row div span { color: var(--muted); font-size: 10px; }
.presence-status { color: #405e67; font-size: 11px; font-weight: 750; }
.presence-dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa8ad; box-shadow: 0 0 0 4px #edf1f2; }
.presence-dot.status-online { background: #2b9b6e; box-shadow: 0 0 0 4px #e3f5ec; }
.presence-dot.status-on-break { background: #d38b26; box-shadow: 0 0 0 4px #fff2dc; }
.presence-dot.status-clocked-out { background: #7a8d95; }

.clinic-volume-grid { display: grid; gap: 13px; }
.clinic-volume-row { display: grid; gap: 7px; }
.clinic-volume-row > div:first-child, .clinic-volume-split { display: flex; justify-content: space-between; gap: 10px; }
.clinic-volume-row strong { font-size: 12px; }
.clinic-volume-row span { color: var(--muted); font-size: 10px; }
.clinic-volume-bar, .hours-chart-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e9efee; }
.clinic-volume-bar span, .hours-chart-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0b8d82, #36b5a5); }
.clinic-volume-split { justify-content: flex-start; flex-wrap: wrap; }

.lead-tracker-intro { margin-bottom: 14px; }
.lead-scope-row { flex-wrap: wrap; }
.tracker-view-toggle { margin-left: auto; }
.lead-filter-bar {
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(128px, .74fr));
  padding: 12px;
  border-radius: 13px;
  box-shadow: var(--shadow-soft);
}
.lead-filter-bar input, .lead-filter-bar select { min-height: 39px; background: #fbfcfc; }
.lead-status-group {
  border-radius: 13px;
  box-shadow: var(--shadow-soft);
}
.lead-group-header { padding: 12px 15px; background: #fafcfc; }
.status-group-follow_up .lead-status-dot { background: #d18b29; }
.inline-lead-select.status-follow_up { border-color: #e5c58e; background: #fff7e7; }
.badge.lead-follow_up { background: #fff2d8; color: #89540c; }
.lead-row-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.lead-row-meta span { padding: 2px 6px; border-radius: 999px; background: #eef4f3; color: var(--muted); font-size: 9px; }
.clinic-inline { min-width: 155px; }
.add-task-row { padding: 11px 15px; background: #fbfdfd; }
.inline-task-actions button { width: auto; min-width: 50px; padding-inline: 8px; }

.clinic-folder {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  box-shadow: var(--shadow-soft);
}
.clinic-folder > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(90deg, #f8fbfa, #fff);
}
.clinic-folder > summary::-webkit-details-marker { display: none; }
.clinic-folder > summary > div:first-child { display: grid; gap: 3px; }
.clinic-folder > summary strong { font-size: 15px; }
.clinic-folder > summary span { color: var(--muted); font-size: 10px; }
.clinic-status-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.clinic-status-count { padding: 4px 7px; border-radius: 999px; background: #edf3f2; font-weight: 700; }
.clinic-folder-body { padding: 14px; background: #f5f8f7; }
.clinic-folder .lead-status-group:last-child { margin-bottom: 0; }

.drawer { width: min(720px, 100%); padding: 34px 38px; }
.drawer-section { padding: 25px 0; }
.task-comments-list, .task-attachments-list { display: grid; gap: 10px; }
.task-comment {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfc;
}
.task-comment.deleted { opacity: .65; background: #f2f4f4; }
.task-comment header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-comment header > div:first-child { display: grid; gap: 3px; }
.task-comment header strong { font-size: 12px; }
.task-comment header span { color: var(--muted); font-size: 10px; }
.task-comment header > div:last-child { display: flex; gap: 10px; }
.task-comment p { margin: 9px 0 0; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.task-comment p textarea { min-height: 95px; }
.comment-edit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.task-comment-composer { display: grid; gap: 10px; margin-top: 14px; }
.task-paste-zone {
  padding: 15px;
  border: 1px dashed #9fc6bf;
  border-radius: 11px;
  background: #f3faf8;
  color: #4d706f;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.task-paste-zone:focus { outline: 3px solid rgba(15,140,130,.12); border-color: var(--teal); }
.composer-actions { display: flex; justify-content: space-between; gap: 10px; }
.file-button { display: inline-flex; align-items: center; background: white; border-color: var(--line); color: var(--ink); }
.task-attachment {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 13px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfc;
}
.attachment-preview {
  display: grid;
  place-items: center;
  min-height: 82px;
  overflow: hidden;
  border-radius: 9px;
  background: #eaf0ef;
  color: var(--muted);
  font-size: 10px;
}
.attachment-preview a { display: grid; place-items: center; width: 100%; height: 100%; }
.attachment-preview img { width: 100%; height: 82px; object-fit: cover; }
.attachment-document { color: var(--teal-dark); font-size: 12px; font-weight: 800; }
.attachment-meta { display: grid; align-content: center; justify-items: start; gap: 5px; min-width: 0; }
.attachment-meta strong { max-width: 100%; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-meta span { color: var(--muted); font-size: 10px; }

.time-clock-widget { min-width: 260px; grid-template-columns: minmax(0, 1fr) auto; }
.time-clock-widget > div { grid-area: button; display: flex; align-items: center; gap: 8px; }
.time-clock-widget > div button { grid-area: auto; }
.clock-card-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.attendance-hours-chart {
  display: grid;
  gap: 12px;
  margin: 8px 0 20px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf9;
}
.hours-chart-row { display: grid; grid-template-columns: minmax(160px, .4fr) 1fr; align-items: center; gap: 14px; }
.hours-chart-row > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
.hours-chart-row strong { font-size: 11px; }
.hours-chart-row span { color: var(--muted); font-size: 10px; }
.hours-chart-track { height: 10px; }
.attendance-report-panel { margin-top: 18px; }

.eod-heading-actions { display: flex; align-items: flex-end; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.eod-clinic-filter { min-width: 210px; }

input, select, textarea { border-color: #cfdcda; border-radius: 9px; }
.button { border-radius: 9px; }
.button.primary { background: linear-gradient(135deg, #0a9185, #08796f); box-shadow: 0 7px 18px rgba(7, 121, 111, .16); }
.segmented { border-radius: 10px; }

@media (max-width: 1420px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .lead-filter-bar { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 1000px) {
  .dashboard-grid, .dashboard-ops-grid { grid-template-columns: 1fr; }
  .clinic-folder > summary { align-items: flex-start; flex-direction: column; }
  .clinic-status-summary { justify-content: flex-start; }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .tracker-view-toggle { margin-left: 0; }
  .drawer { padding: 28px 20px; }
}

@media (max-width: 600px) {
  .metric-grid, .lead-filter-bar { grid-template-columns: 1fr; }
  .metric-card { min-height: 110px; }
  .task-attachment { grid-template-columns: 1fr; }
  .attachment-preview img { height: 150px; }
  .hours-chart-row { grid-template-columns: 1fr; }
  .composer-actions { align-items: stretch; flex-direction: column; }
}


/* ClickUp-style Lead/Task comments and activity */
.activity-panel-heading { align-items: flex-start; margin-bottom: 18px; }
.activity-panel-heading h3 { margin-bottom: 4px; }
.activity-panel-heading p:not(.eyebrow) { max-width: 520px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.activity-count { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #cfe0dc; border-radius: 999px; background: #f4f9f7; color: #456863; font-size: 10px; font-weight: 800; }
.activity-thread { position: relative; display: grid; max-height: 560px; overflow-y: auto; padding: 4px 4px 14px; gap: 14px; scroll-behavior: smooth; }
.activity-thread::before { position: absolute; top: 20px; bottom: 28px; left: 20px; width: 1px; background: #dfe9e6; content: ""; }
.activity-thread-item { position: relative; z-index: 1; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 12px; }
.activity-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #106f68, #14a598); color: white; box-shadow: 0 0 0 4px #fff; font-size: 11px; font-weight: 850; letter-spacing: .03em; }
.activity-avatar.system { background: #e9f1ef; color: #426560; box-shadow: 0 0 0 4px #fff; }
.activity-thread-content { min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgba(17,48,44,.045); }
.comment-entry .activity-thread-content { border-color: #cfe2de; background: linear-gradient(180deg, #fff, #fbfdfc); }
.comment-entry.deleted .activity-thread-content { opacity: .68; background: #f3f5f4; }
.activity-thread-content > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.activity-thread-content > header > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.activity-thread-content > header strong { font-size: 12px; }
.activity-thread-content > header span { color: var(--muted); font-size: 10px; }
.activity-thread-content > p { margin: 9px 0 0; color: #283d3a; font-size: 12px; line-height: 1.62; white-space: pre-wrap; }
.comment-actions { display: flex; gap: 9px; }
.activity-kind { padding: 3px 7px; border-radius: 999px; background: #edf3f1; color: #55706c !important; font-weight: 800; }
.activity-change-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.activity-change-values > div { display: grid; gap: 3px; min-width: 0; padding: 8px 9px; border-radius: 9px; background: #f4f7f6; }
.activity-change-values span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.activity-change-values strong { overflow-wrap: anywhere; color: #29413d; font-size: 11px; line-height: 1.35; }
.comment-attachments { display: grid; gap: 9px; margin-top: 12px; }
.task-attachment.compact { grid-template-columns: 150px minmax(0, 1fr); padding: 8px; background: #f6faf9; }
.task-attachment.compact .attachment-preview { min-height: 92px; }
.task-attachment.compact .attachment-preview img { height: 92px; transition: transform .18s ease; }
.task-attachment.compact .attachment-preview a:hover img { transform: scale(1.025); }
.attachment-event .task-attachment { margin-top: 10px; }
.empty-activity { display: grid; justify-items: center; gap: 5px; padding: 28px 18px; border: 1px dashed #cbdcd8; border-radius: 12px; background: #f8fbfa; text-align: center; }
.empty-activity strong { font-size: 13px; }
.empty-activity span { color: var(--muted); font-size: 11px; }
.task-comment-composer { position: relative; z-index: 2; margin-top: 18px; padding: 15px; border: 1px solid #bfd8d3; border-radius: 14px; background: linear-gradient(180deg, #fff, #f7fbfa); box-shadow: 0 9px 24px rgba(20,72,65,.07); }
.comment-composer-heading { display: flex; align-items: center; gap: 10px; }
.comment-composer-heading .activity-avatar { width: 34px; height: 34px; box-shadow: none; font-size: 10px; }
.comment-composer-heading > div:last-child { display: grid; gap: 2px; }
.comment-composer-heading strong { font-size: 12px; }
.comment-composer-heading span { color: var(--muted); font-size: 10px; }
#taskCommentInput { min-height: 112px; resize: vertical; border-color: #c4d8d4; background: #fff; font-size: 12px; line-height: 1.55; }
#taskCommentInput:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,140,130,.1); }
.pending-comment-attachment { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid #cfe0dc; border-radius: 11px; background: #f3f8f7; }
.pending-attachment-preview { display: grid; place-items: center; height: 58px; overflow: hidden; border-radius: 8px; background: #e5eeec; color: var(--muted); font-size: 10px; font-weight: 800; }
.pending-attachment-preview a, .pending-attachment-preview img { width: 100%; height: 100%; }
.pending-attachment-preview img { object-fit: cover; }
.pending-comment-attachment > div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.pending-comment-attachment > div:nth-child(2) strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.pending-comment-attachment > div:nth-child(2) span { color: var(--muted); font-size: 10px; }
.comment-privacy-note { margin: 0; color: #637c78; font-size: 9.5px; line-height: 1.45; }

@media (max-width: 650px) {
  .activity-thread { max-height: none; }
  .activity-change-values { grid-template-columns: 1fr; }
  .task-attachment.compact { grid-template-columns: 1fr; }
  .task-attachment.compact .attachment-preview img { height: 170px; }
  .pending-comment-attachment { grid-template-columns: 64px minmax(0, 1fr); }
  .pending-comment-attachment > button { grid-column: 2; justify-self: start; }
}


/* Lead/Task row comment composer */
.lead-comments-cell { min-width: 210px; padding: 6px 8px !important; }
.row-comment-trigger {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.row-comment-trigger:hover,
.row-comment-trigger[aria-expanded="true"] {
  border-color: #c9dfda;
  background: #f2f9f7;
}
.row-comment-trigger:focus-visible { outline: 3px solid rgba(10,143,131,.16); border-color: var(--teal); }
.row-comment-trigger img { width: 18px; height: 18px; object-fit: contain; }
.row-comment-summary { display: grid; gap: 3px; min-width: 0; }
.row-comment-summary strong { color: #17685f; font-size: 11px; font-weight: 800; }
.row-comment-summary > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-comment-composer-row > td { max-width: none; padding: 0 !important; border-top: 0; background: #f4f9f8; }
.row-comment-form {
  position: sticky;
  left: 0;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(210px, .5fr);
  gap: 10px 14px;
  width: min(1080px, calc(100vw - 340px));
  padding: 15px 18px 16px 48px;
  border-top: 1px solid #d7e6e3;
  border-bottom: 1px solid #d7e6e3;
  box-shadow: inset 4px 0 #2aa697;
}
.row-comment-composer-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-comment-composer-heading .activity-avatar { width: 32px; height: 32px; box-shadow: none; font-size: 10px; }
.row-comment-composer-heading > div:last-child { display: grid; gap: 2px; }
.row-comment-composer-heading strong { font-size: 12px; }
.row-comment-composer-heading span { color: var(--muted); font-size: 10px; }
.row-comment-input {
  min-height: 88px;
  resize: vertical;
  border-color: #bad4cf;
  background: #fff;
  font-size: 12px;
  line-height: 1.55;
}
.row-comment-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10,143,131,.1); }
.row-comment-paste-zone {
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 12px;
  border: 1px dashed #9fc6bf;
  border-radius: 10px;
  background: #fafdFc;
  color: #52716d;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}
.row-comment-paste-zone:focus { outline: 3px solid rgba(10,143,131,.12); border-color: var(--teal); }
.row-comment-attachment-draft {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #cfe0dc;
  border-radius: 10px;
  background: #fff;
}
.row-comment-attachment-draft.hidden { display: none; }
.row-comment-attachment-draft > div:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.row-comment-attachment-draft > div:nth-child(2) strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.row-comment-attachment-draft > div:nth-child(2) span { color: var(--muted); font-size: 10px; }
.row-comment-composer-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.row-comment-action-spacer { display: none; }
.row-comment-form .comment-privacy-note,
.row-comment-form .row-comment-message { grid-column: 1 / -1; }
.row-comment-form .row-comment-message { margin: 0; }

@media (max-width: 900px) {
  .row-comment-form { grid-template-columns: 1fr; width: calc(100vw - 36px); padding-left: 18px; }
  .row-comment-composer-heading,
  .row-comment-attachment-draft,
  .row-comment-composer-actions,
  .row-comment-form .comment-privacy-note,
  .row-comment-form .row-comment-message { grid-column: 1; }
}


/* Compact inline Lead/Task comments */
.row-comment-inline-panel {
  position: sticky;
  left: 0;
  width: min(940px, calc(100vw - 360px));
  padding: 14px 18px 16px 48px;
  border-top: 1px solid #d7e6e3;
  border-bottom: 1px solid #d7e6e3;
  box-shadow: inset 4px 0 #2aa697;
}
.row-comment-thread-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.row-comment-thread-heading > div { display: flex; align-items: baseline; gap: 9px; }
.row-comment-thread-heading strong { font-size: 12px; color: var(--ink); }
.row-comment-thread-heading span { color: var(--muted); font-size: 10px; }
.row-comment-thread {
  display: grid;
  gap: 8px;
  max-height: 300px;
  margin-bottom: 12px;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce9e6;
  border-radius: 11px;
  background: #fff;
}
.row-comment-thread-state {
  padding: 18px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.row-comment-thread-state.error { color: #a63232; }
.row-comment-inline-panel .activity-thread-item {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 9px;
}
.row-comment-inline-panel .activity-avatar {
  width: 30px;
  height: 30px;
  font-size: 9px;
}
.row-comment-inline-panel .activity-thread-content > p { margin-top: 5px; }
.row-comment-inline-panel .task-attachment.compact { margin-top: 7px; }
.row-comment-inline-panel .attachment-preview img {
  max-height: 180px;
  cursor: default;
}
.row-comment-form {
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
}
.row-comment-form .row-comment-composer-heading { grid-column: 1; }
.row-comment-compose-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px auto;
  align-items: stretch;
  gap: 7px;
}
.row-comment-input {
  min-height: 68px;
  resize: vertical;
}
.row-comment-paperclip {
  display: grid;
  place-items: center;
  min-width: 38px;
  border: 1px solid #bad4cf;
  border-radius: 9px;
  background: #fff;
  color: #17685f;
  cursor: pointer;
  font-size: 17px;
}
.row-comment-paperclip:hover { border-color: var(--teal); background: #f2f9f7; }
.row-comment-paperclip:focus-within { outline: 3px solid rgba(10,143,131,.14); border-color: var(--teal); }
.row-comment-send { min-width: 70px; }
.row-comment-attachment-draft {
  grid-column: 1;
  margin-top: 1px;
}
.row-comment-form .comment-privacy-note,
.row-comment-form .row-comment-message { grid-column: 1; }
.row-comment-form .row-comment-message { min-height: 0; margin: 0; }

@media (max-width: 900px) {
  .row-comment-inline-panel {
    width: calc(100vw - 36px);
    padding: 14px 18px;
  }
}

@media (max-width: 600px) {
  .row-comment-compose-line { grid-template-columns: minmax(0, 1fr) 38px; }
  .row-comment-send { grid-column: 1 / -1; }
}
