.agent-command-compact { align-self: start; }
#agents > .roles-hero { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 0 0 16px; border: 0; background: none; box-shadow: none; }
#agents > .roles-hero > div, #agents .agent-list-panel { display: none; }
#compact-agent-picker { flex: 1 1 220px; min-width: 0; min-height: 44px; max-width: 440px; padding: 10px 12px; border: 1px solid #bbcbd2; border-radius: 6px; background: #fff; color: #24364a; font: inherit; }
#agents .agents-layout { display: block; }
#agents .agent-command-panel { padding: 0; border: 0; background: none; box-shadow: none; min-height: 0; }
#agents .agent-action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
#agents .agent-action-grid .agent-calendar-cta { justify-content: flex-start; }
.agent-action-count { margin-left: auto; color: #45606b; font-size: 14px; }
.agent-action-count + svg { margin-left: 0 !important; }
#agents .agent-last-message { display: none; }
.agent-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.agent-detail-button { --action-bg: #1559d5; --action-ink: #fff; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 88px; padding: 16px; background: var(--action-bg); color: var(--action-ink); border: 1px solid #00000015; border-radius: 8px; text-align: left; cursor: pointer; font: inherit; font-weight: 700; box-shadow: inset 0 1px 0 #ffffff38, inset 0 -3px 0 #00000017, 0 4px 9px #142a3b12; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.agent-detail-button[data-agent-detail="messages"] { --action-bg: #1559d5; }
.agent-detail-button[data-agent-detail="agenda"] { --action-bg: #783bce; }
.agent-detail-button[data-agent-detail="portfolio"] { --action-bg: #bb1765; }
.agent-detail-button[data-agent-detail="assignment"] { --action-bg: #ffcb32; --action-ink: #332500; }
.agent-detail-button[data-agent-detail="leads"] { --action-bg: #49d1ed; --action-ink: #083d4c; }
.agent-detail-button[data-agent-detail="tasks"] { --action-bg: #21713d; }
.agent-detail-button[data-agent-detail="offers"] { --action-bg: #b64300; }
.agent-detail-button[data-agent-detail="access"] { --action-bg: #343e50; }
.agent-detail-button.agent-calendar-cta { --action-bg: #c82937; }
@media (hover: hover) { .agent-detail-button:hover { transform: translateY(-3px); filter: brightness(1.06); box-shadow: inset 0 1px 0 #ffffff50, inset 0 -3px 0 #00000017, 0 9px 18px #142a3b25; } }
.agent-detail-button:active { transform: translateY(1px); }
.agent-detail-button:focus-visible { outline: 3px solid #152b45; outline-offset: 3px; }
.agent-detail-button > svg { width: 22px; height: 22px; flex: 0 0 22px; }
.agent-detail-button > svg:first-child { box-sizing: border-box; width: 44px; height: 44px; flex-basis: 44px; padding: 6px; border: 0; border-radius: 8px; color: #203047; background: #fff; stroke-width: 2.4; box-shadow: 0 2px 4px #00000018; }
.agent-detail-button .agent-action-count { color: #203047; background: #fff; border-radius: 5px; min-width: 24px; text-align: center; padding: 3px 5px; font-weight: 800; }
.agent-detail-button > svg:last-child { width: 16px; flex-basis: 16px; margin-left: auto; color: var(--action-ink); opacity: .8; }
.agent-detail-button span { overflow-wrap: anywhere; }
.agent-compact-footer { display: flex; justify-content: flex-end; margin-top: 16px; }
.agent-detail-dialog { width: min(760px, calc(100vw - 24px)); }
.agent-detail-dialog > section[hidden] { display: none !important; }
.agent-detail-dialog > section { margin: 0; padding: 0; border: 0; background: transparent; }
.agent-detail-dialog .agent-access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agent-detail-dialog .agent-access-grid strong { overflow-wrap: anywhere; }
.agent-detail-dialog [data-agent-disable], .agent-detail-dialog [data-agent-reactivate] { margin-top: 24px; }
body:has(dialog[open]) { overflow: hidden; }
@media (max-width: 600px) {
  #compact-agent-picker { flex: 0 0 auto; width: 100%; max-width: none; height: 44px; }
  #agents .agent-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-action-grid { gap: 8px; }
  .agent-detail-button { padding: 10px; gap: 8px; min-height: 82px; font-size: 14px; }
  .agent-detail-button > svg:first-child { width: 36px; height: 36px; flex-basis: 36px; padding: 4px; }
  .agent-detail-button > svg:last-child { display: none; }
  .agent-detail-dialog .agent-password-form, .agent-detail-dialog .agent-access-grid { grid-template-columns: minmax(0, 1fr); }
  .agent-detail-dialog .agent-property-row, .agent-detail-dialog .section-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .agent-detail-button { transition: none; } .agent-detail-button:hover, .agent-detail-button:active { transform: none; } }
