.message-row--agents .message-body,
.message-row--agent-properties .message-body { min-width: 0; width: 100%; max-width: none; flex: 1 1 0; }
.agent-directory { width: 100%; color: var(--ink); }
.agent-directory__header { margin: 0 0 16px; }
.agent-directory__title { margin: 0; font-size: 22px; line-height: 1.3; letter-spacing: -.02em; }
.agent-directory__hint { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.agent-directory__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.agent-card { display: flex; flex-direction: column; min-width: 0; padding: 18px; border: 1px solid rgba(34, 36, 40, .08); border-radius: 22px; background: var(--surface-strong, #fff); box-shadow: 0 4px 18px rgba(30, 32, 36, .025); }
.agent-card__heading { display: flex; align-items: flex-start; gap: 10px; min-height: 72px; flex-wrap: wrap; }
.agent-card__avatar { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface, #fbf8f3); color: var(--muted); font-size: 19px; font-weight: 600; }
.agent-card__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.agent-card__title { min-width: 0; flex: 1 1 112px; overflow-wrap: anywhere; }
.agent-card__title h3 { margin: 0; font-size: 17px; font-weight: 750; line-height: 1.3; letter-spacing: -.015em; }
.agent-card__city, .agent-card__organization { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.agent-card__notice { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.agent-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 18px; }
.agent-directory__button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid rgba(34, 36, 40, .13); border-radius: 13px; padding: 10px 13px; background: var(--surface, #fbf8f3); color: var(--ink); font: inherit; font-size: 13px; font-weight: 650; line-height: 1.3; text-decoration: none; cursor: pointer; transition: background var(--fast), border-color var(--fast); }
.agent-directory__button:hover { background: #f0ede8; border-color: rgba(34, 36, 40, .22); }
.agent-directory__button--objects { grid-column: 1 / -1; }
.agent-card__contact { display: none; min-width: 0; min-height: 42px; }
.agent-card__number { display: block; margin-top: 7px; font-size: 12px; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; user-select: text; }
.agent-card__qr { display: block; flex: 0 0 66px; width: 66px; height: 66px; margin-left: auto; background: #fff; }
.agent-card__qr svg { display: block; width: 66px; height: 66px; }
.agent-card__qr svg, .agent-card__qr svg * { stroke: none; stroke-width: 0; }
.agent-card__qr svg rect { fill: #fff; }
.agent-card__qr svg path { fill: #000; }
.agent-directory__button:focus-visible,
.agent-directory .property-results__more:focus-visible,
.agent-directory .agent-card__contact:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.agent-directory__button:disabled { opacity: .5; cursor: default; }
.agent-directory__controls { display: grid; gap: 8px; margin-top: 16px; }
.agent-directory__button--back { justify-self: center; border-color: transparent; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; }
.agent-directory__button--back:hover { background: transparent; color: var(--ink); border-color: transparent; }
.agent-directory__empty, .agent-directory__notice { margin: 12px 0; padding: 13px 15px; border: 1px solid rgba(34, 36, 40, .08); border-radius: 13px; background: var(--surface); font-size: 13px; line-height: 1.5; color: var(--muted); }
.agent-directory__filter { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; width: 100%; padding-top: 12px; font-size: 13px; color: var(--muted); }
.message-row--agent-properties .property-results__summary { flex-wrap: wrap; }
@media (hover: none) and (pointer: coarse) {
  .agent-card__qr, .agent-card__number { display: none; }
  .agent-card__contact { display: inline-flex; }
  .agent-card__heading { gap: 14px; }
  .agent-card__avatar { width: 72px; height: 72px; flex-basis: 72px; }
}
@media (max-width: 800px) {
  .agent-card { padding: 16px; }
  .agent-directory__title { font-size: 20px; }
  .agent-directory__filter { align-items: stretch; flex-direction: column; }
}
@media (max-width: 680px) {
  .message-row--agents .message-avatar { display: none; }
  .agent-card__qr { display: none; }
}
