/* Human and AI friends share one quiet, familiar conversation surface. */
.reply-composer {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f1f2f2;
  border-left: 3px solid #9ca7a2;
  border-radius: 4px;
  padding: 8px 10px;
  margin: 2px 20px 8px;
  color: #64706a;
}
.reply-composer > div {
  flex: 1;
  min-width: 0;
}
.reply-composer strong {
  font-size: 0.85rem;
  font-weight: 500;
}
.reply-composer p {
  font-size: 0.85rem;
  margin: 4px 0 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.quoted-message {
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 0;
  border-left: 3px solid #9ea69f;
  border-radius: 3px;
  background: #00000008;
  color: #616962;
  padding: 8px 10px;
  margin-bottom: 9px;
  width: 100%;
  max-width: 410px;
  cursor: pointer;
}
.quoted-message strong {
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.quoted-message span {
  font-size: 0.83rem;
  white-space: pre-wrap;
  max-height: 60px;
  overflow: hidden;
}
.outgoing .quoted-message {
  background: #1d5a1520;
  border-color: #5a9d4b;
}
.mentioned-people {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #3e6755;
  margin-bottom: 5px;
}
.mentioned-me {
  background: #f1d47777;
  border-radius: 3px;
  padding: 1px 4px;
}
.composer-file-picker {
  border: 0;
  background: none;
  color: #60836c;
  font-size: 0.82rem;
  padding: 2px 20px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.context-files {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 5px 20px 7px;
}
.context-files button {
  border: 1px solid #d3e5d7;
  background: #f0f8f1;
  border-radius: 4px;
  color: #3d7950;
  padding: 4px 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.context-files small {
  width: 100%;
  font-size: 0.75rem;
  color: #839087;
}
.message-reactions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.message-reactions button {
  background: #fff8;
  border: 1px solid #ddd9;
  padding: 3px 7px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
}
.message-reactions button.mine {
  background: #dcf0df;
  border-color: #76ba85;
}
.message-reactions small {
  font-size: 0.75rem;
  margin-left: 3px;
  color: #606c64;
}
.reaction-picker {
  display: flex;
  justify-content: space-around;
  border-bottom: 1px solid #eee;
  padding: 6px 0 18px;
  margin-bottom: 12px;
}
.reaction-picker button {
  border: 0;
  background: none;
  font-size: 1.6rem;
  padding: 8px;
  cursor: pointer;
}
.forward-label {
  color: #838b85;
  font-size: 0.75rem;
  margin-bottom: 6px;
}
.forward-preview {
  background: #f5f6f5;
  padding: 14px;
  border-radius: 8px;
  max-height: 150px;
  overflow: auto;
  white-space: pre-wrap;
  margin-bottom: 20px;
}
.file-analysis {
  border-top: 1px solid #d5ddd877;
  margin-top: 10px;
  padding-top: 7px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #7d867f;
}
.file-analysis.ready > span {
  color: #3f8b59;
}
.file-analysis .button {
  padding: 2px 0;
  min-height: 24px;
  font-size: 0.78rem;
}
.disclosure-status {
  font-size: 0.78rem;
  color: #8b7951;
  border-top: 1px solid #dfd2b677;
  margin-top: 8px;
  padding-top: 6px;
}
.answer-sources {
  border-top: 1px solid #d3dad477;
  margin-top: 10px;
  padding-top: 7px;
  font-size: 0.78rem;
  color: #6c796e;
}
.answer-sources summary {
  cursor: pointer;
}
.answer-sources div {
  padding: 7px 0;
}
.answer-sources p {
  margin: 4px 0;
  color: #89918b;
}
.message-selected > .message-body > .bubble {
  outline: 2px solid #64ad78;
  outline-offset: 3px;
}
.selected-message-label {
  font-size: 0.7rem;
  color: #469260;
}
.file-context-list > div {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}
.file-context-list label {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
}
.file-context-list strong,
.file-context-list small {
  display: block;
}
.file-context-list strong {
  font-size: 0.9rem;
  word-break: break-word;
}
.file-context-list small {
  font-size: 0.8rem;
  margin-top: 5px;
  color: #89928c;
}
.analysis-segments {
  max-height: 50vh;
  overflow: auto;
}
.analysis-segments section {
  padding: 12px 0;
  border-top: 1px solid #eee;
}
.analysis-segments pre {
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #59675d;
}
.quick-create-options {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.quick-create-options > button {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 5px 12px;
  text-align: left;
  padding: 20px;
  background: #fafbf9;
  border: 1px solid #e2e7e0;
  border-radius: 8px;
  cursor: pointer;
  color: #3d5142;
}
.quick-create-options > button:hover {
  background: #f0f7ee;
  border-color: #a9c6a5;
}
.quick-create-options > button svg {
  grid-row: span 2;
  align-self: center;
  color: #598762;
}
.quick-create-options strong {
  font-size: 1rem;
  font-weight: 500;
}
.quick-create-options span {
  font-size: 0.82rem;
  color: #92988e;
}
.quick-upload-label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed #a9c6ac;
  border-radius: 8px;
  padding: 16px;
  color: #527e58;
  cursor: pointer;
}
.quick-upload-label input {
  max-width: 270px;
  margin-left: auto;
  font-size: 0.8rem;
}
.quick-file-list > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  font-size: 0.84rem;
  border-bottom: 1px solid #f1f2ef;
}
.quick-file-list small {
  margin-left: auto;
  color: #92998f;
}
.asset-state {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: #8c968d;
  font-size: 0.8rem;
  margin: 18px 0 25px;
}
.asset-badge {
  padding: 3px 8px;
  border-radius: 4px;
  background: #edf0ec;
  color: #768270;
}
.asset-badge.review {
  background: #fff2d5;
  color: #9a772e;
}
.asset-badge.confirmed {
  background: #e5f3e7;
  color: #428a52;
}
.asset-tasks {
  border-top: 1px solid #e4e8e1;
  margin-top: 30px;
  padding-top: 20px;
}
.asset-tasks h3 {
  font-size: 1rem;
  font-weight: 500;
}
.asset-task {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #f0f1ed;
}
.asset-task > span {
  color: #6b9a64;
  font-size: 1.2rem;
}
.asset-task > div {
  flex: 1;
}
.asset-task strong {
  font-size: 0.9rem;
  font-weight: 500;
}
.asset-task p {
  font-size: 0.8rem;
  color: #8c9486;
  margin: 5px 0 0;
}
.asset-task.done strong {
  color: #9caa99;
  text-decoration: line-through;
}
.task-editor > div {
  display: grid;
  grid-template-columns: 1fr 120px 140px;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0e9;
}
.task-editor input,
.task-editor select {
  min-width: 0;
  border: 1px solid #dce4da;
  border-radius: 5px;
  padding: 9px;
  font: inherit;
  font-size: 0.85rem;
}
.task-editor label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 0.8rem;
}
.task-editor input[type='checkbox'] {
  width: auto;
}
.task-editor + .button {
  margin-top: 15px;
}
.contact-extras {
  display: flex;
  gap: 8px;
  margin: 0 0 15px;
}
.blocked-person,
.impact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 0;
  border-bottom: 1px solid #e9ece6;
}
.impact-row p {
  color: #909887;
  font-size: 0.8rem;
  margin: 7px 0 0;
}
.workflow-job {
  background: #fff;
  border: 1px solid #e6eae2;
  border-radius: 8px;
  padding: 17px;
  margin-bottom: 12px;
}
.workflow-job header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.workflow-job header strong {
  font-size: 0.95rem;
  font-weight: 500;
}
.workflow-job header span {
  font-size: 0.8rem;
  color: #788e6e;
}
.workflow-job p {
  font-size: 0.8rem;
  color: #92998d;
  line-height: 1.6;
}
.workflow-job footer {
  display: flex;
  gap: 8px;
}
.diagnostic-grid {
  border: 1px solid #e4e9de;
  border-radius: 8px;
  padding: 5px 15px;
  margin: 20px 0;
}
.diagnostic-grid > div {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f2ec;
  padding: 12px 0;
  font-size: 0.88rem;
}
.diagnostic-grid > div:last-child {
  border-bottom: 0;
}
.diagnostic-grid span {
  color: #85917b;
}
.diagnostic-grid strong {
  font-weight: 500;
  word-break: break-all;
}
.diagnostic-copy {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
  background: #f5f6f3;
  padding: 15px;
  border-radius: 6px;
  max-height: 50vh;
  overflow: auto;
}
.share-card {
  text-align: center;
}
.share-card > .avatar {
  margin: 0 auto;
}
.contact-qr {
  display: block;
  width: 180px;
  height: 180px;
  margin: 20px auto;
}
.toast button {
  background: transparent;
  border: 0;
  color: inherit;
  text-decoration: underline;
  padding-left: 14px;
  cursor: pointer;
}
.composer textarea {
  min-height: 60px;
}
.message-meta button {
  min-width: 22px;
  min-height: 22px;
}
.connection-strip.warning .button {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .reply-composer {
    margin-left: 12px;
    margin-right: 12px;
  }
  .context-files {
    margin-left: 12px;
    margin-right: 12px;
  }
  .composer-file-picker {
    padding-left: 12px;
  }
  .quick-upload-label {
    flex-wrap: wrap;
  }
  .quick-upload-label input {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
  .task-editor > div {
    grid-template-columns: 1fr 1fr;
  }
  .task-editor input[data-field='title'] {
    grid-column: span 2;
  }
  .contact-extras {
    justify-content: center;
  }
  .message-meta button {
    min-height: 28px;
    min-width: 28px;
  }
  .composer {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .messenger {
    height: 100dvh;
  }
  .modal-card {
    max-height: calc(100dvh - 24px);
  }
  .file-context-list strong {
    max-width: 220px;
  }
  .workflow-job header {
    align-items: flex-start;
  }
  .workflow-job footer {
    flex-wrap: wrap;
  }
}

.contact-qr {
  display: flex;
  justify-content: center;
  max-width: 240px;
  margin: 14px auto;
}
.contact-qr svg {
  width: 100%;
  height: auto;
}

.workflow-progress {
  display: flex;
  gap: 10px;
  align-items: center;
}
.workflow-progress progress {
  width: 100%;
  accent-color: #07a85c;
  height: 6px;
}
.workflow-progress small {
  white-space: nowrap;
  color: var(--secondary);
}
.approval-expiry {
  font-size: 12px;
  color: #8a8f89;
}

.date-range-fields:not([hidden]) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.file-bubble .file-analysis {
  margin: 0 14px 10px;
}
.approval-expiry {
  padding: 0 17px 7px;
}

.diagnostic-section {
  margin: 24px 0;
}
.diagnostic-section h3 {
  font-size: 14px;
  margin-bottom: 10px;
}
.diagnostic-section .diagnostic-grid {
  margin: 10px 0 12px;
}
.diagnostic-status-row > div {
  text-align: right;
  min-width: 0;
}
.diagnostic-status-row small {
  display: block;
  margin-top: 5px;
  color: #8a9484;
  font-size: 11px;
  line-height: 1.6;
  max-width: 340px;
}
.diagnostic-status-row > span {
  flex-shrink: 0;
}
.report-item {
  border: 1px solid #e1e6dc;
  border-radius: 7px;
  background: #fff;
  padding: 15px;
  margin: 10px 0;
}
.report-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.report-item header strong {
  font-size: 13px;
}
.report-item > p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  margin: 12px 0;
  font-size: 13px;
  color: #56634f;
}
.report-item > small {
  font-size: 11px;
  color: #98a08f;
}
.report-item footer {
  display: flex;
  gap: 10px;
  margin-top: 13px;
}
.report-status {
  font-size: 11px;
  color: #788b70;
  background: #edf1e9;
  border-radius: 4px;
  padding: 3px 7px;
}
.report-status.open {
  background: #fff2d9;
  color: #a2843d;
}
.report-status.resolved {
  background: #e5f3e5;
  color: #488253;
}
.diagnostic-raw {
  margin: 24px 0 0;
  border-top: 1px solid #e1e6dc;
  padding-top: 14px;
}
.diagnostic-raw summary {
  cursor: pointer;
  font-size: 12px;
  color: #7e8d73;
}
.admin-diagnostics > .field-hint {
  margin-bottom: 20px;
}
.admin-diagnostics .diagnostic-copy {
  margin-top: 14px;
}
@media (max-width: 760px) {
  .diagnostic-status-row small {
    max-width: 190px;
  }
  .report-item footer {
    flex-wrap: wrap;
  }
  .admin-diagnostics .diagnostic-grid {
    padding: 5px 10px;
  }
  .diagnostic-status-row {
    font-size: 12px;
  }
  .diagnostic-section h3 {
    font-size: 13px;
  }
}

.agent-preview-list {
  padding-left: 20px;
}
.agent-preview-list li {
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.agent-preview-list small {
  display: block;
  margin-top: 5px;
  color: var(--text-secondary, #666);
}
.agent-connect-steps li {
  margin: 10px 0;
}
.agent-file-fallback {
  margin-top: 20px;
}

.agent-body-preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.7;
}
.agent-body-preview {
  padding: 14px 0;
  border-bottom: 1px solid #e5e5e5;
}
