/* Ported from RETR.ChromeExtension/auth/auth.css to keep the Outlook add-in
   visually identical to the Gmail extension's login UI. */
:root {
  --retr-bg: #ffffff;
  --retr-surface: #f8fafc;
  --retr-fg: #1f2937;
  --retr-muted: #6b7280;
  --retr-purple: #5b5fc7;
  --retr-purple-hover: #4a4eb0;
  --retr-link: #6366f1;
  --retr-danger: #dc2626;
  --retr-danger-bg: #fef2f2;
  --retr-danger-border: #fecaca;
  --retr-success: #059669;
  --retr-success-bg: #ecfdf5;
  --retr-success-border: #a7f3d0;
  --retr-border: #d1d5db;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--retr-bg);
  color: var(--retr-fg);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 12px 22px;
}

.logo-wrap {
  display: flex;
  justify-content: flex-start;
  padding: 2px 0 4px;
}

.logo-badge {
  position: relative;
  display: inline-flex;
}

.logo {
  height: 36px;
  width: auto;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hidden {
  display: none !important;
}

h1 { margin: 0; font-size: 19px; text-align: center; }

.message {
  margin: 0;
  font-size: 14px;
  text-align: center;
}

.message.subtle {
  color: var(--retr-muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--retr-fg);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input:not([type]) {
  padding: 11px 12px;
  border: 1px solid var(--retr-border);
  border-radius: 6px;
  background: var(--retr-bg);
  color: var(--retr-fg);
  font-size: 14px;
  line-height: 1.2;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input:not([type]):focus {
  outline: none;
  border-color: var(--retr-purple);
}

input[readonly] {
  background: var(--retr-surface);
  color: var(--retr-muted);
  border-color: #e5e7eb;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--retr-muted);
  line-height: 1.4;
}

.checkbox-field input {
  margin-top: 2px;
}

.hint {
  margin: 0;
  font-size: 13px;
  color: var(--retr-muted);
  text-align: center;
}

a {
  color: var(--retr-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.error {
  margin: 0;
  font-size: 13px;
  color: var(--retr-danger);
  text-align: center;
}

.conflict-message {
  line-height: 1.45;
  text-align: left;
  padding: 10px 12px;
  background: var(--retr-danger-bg);
  border: 1px solid var(--retr-danger-border);
  border-radius: 8px;
}

.conflict-message a {
  color: var(--retr-danger);
  font-weight: 600;
  text-decoration: underline;
}

.notice {
  margin: 0;
  font-size: 13px;
  color: #059669;
  text-align: center;
  animation: retr-fade-in 0.25s ease;
}

@keyframes retr-fade-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 4px auto 0;
  border-radius: 50%;
  background: var(--retr-success-bg);
  color: var(--retr-success);
}

.back-button { align-self: flex-start; padding: 0; margin-bottom: -6px; }

.message.success-callout {
  text-align: left;
  line-height: 1.45;
  padding: 10px 12px;
  background: var(--retr-success-bg);
  border: 1px solid var(--retr-success-border);
  border-radius: 8px;
}

.success-callout a {
  color: var(--retr-success);
  font-weight: 600;
  text-decoration: underline;
}

.btn {
  padding: 11px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.btn-purple {
  background: var(--retr-purple);
  color: #ffffff;
  font-weight: 600;
}

.btn-purple:hover:not(:disabled) {
  background: var(--retr-purple-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--retr-fg);
  border: 1px solid var(--retr-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--retr-surface);
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--retr-muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.btn-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--retr-bg);
  color: var(--retr-fg);
  border: 1px solid var(--retr-border);
  font-weight: 500;
}

.btn-provider:hover:not(:disabled) {
  background: var(--retr-surface);
}

.provider-icon {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Ported from RETR.ChromeExtension/sidepanel/sidepanel.css — the
   "My Agent Relationships" list shown after sign-in. */
.my-agents-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.my-agents-filter {
  width: 100%;
  height: 38px;
  margin-bottom: 6px;
  padding: 8px 12px;
  color: var(--retr-fg);
  font: inherit;
  font-size: 14px;
  background: #fff;
  border: 1px solid #9ca3af;
  border-radius: 8px;
}

.my-agents-filter:focus {
  outline: none;
  border-color: var(--retr-purple);
  box-shadow: 0 0 0 2px rgba(91, 95, 199, 0.15);
}

.my-agents-heading {
  margin: 0;
  padding-bottom: 6px;
  color: #0f8f83;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--retr-border);
}

.my-agents-list {
  display: flex;
  flex-direction: column;
}

.my-agent-row {
  padding: 4px 3px 3px;
}

.my-agent-name {
  color: #7c4dff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.15;
}

.my-agent-company {
  margin-top: 0;
  color: var(--retr-muted);
  font-size: 11px;
  line-height: 1.15;
}

.my-agents-show-more {
  align-self: center;
  margin: 10px 0 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7c4dff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.my-agents-show-more:hover {
  text-decoration: underline;
}

.my-agents-status {
  margin: 4px 0 0;
  color: var(--retr-muted);
  font-size: 13px;
}

.my-agents-error {
  color: var(--retr-danger);
}

/* Ported from RETR.ChromeExtension/sidepanel/sidepanel.css — the
   "Sign in required" card shown in place of the inline login form, matching
   the Gmail extension's side-panel prompt exactly. */
.profile-login-prompt {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  background: #f7f5ff;
  text-align: center;
}

.profile-login-prompt.is-signing-in {
  border-color: #c7d2fe;
  background: #eef3ff;
}

.profile-login-title {
  color: var(--retr-fg);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.profile-login-message {
  color: var(--retr-fg);
  font-size: 12px;
  line-height: 1.4;
}

.profile-login-help {
  color: var(--retr-muted);
  font-size: 12px;
  line-height: 1.5;
}

.profile-login-button {
  width: 100%;
}

.profile-login-progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
}

.profile-login-progress::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid #c7d2fe;
  border-top-color: #4f46e5;
  border-radius: 999px;
  animation: retr-spin 0.9s linear infinite;
}

/* Always-visible footer with signed-in email + sign out — last child of
   #appView, styled to read as a footer (top border, muted, small text)
   rather than another content row. */
.app-footer {
  margin-top: 4px;
  padding: 10px 0 8px;
  border-top: 1px solid #e2e5ea;
  font-size: 12px;
}

.app-footer-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-footer-confirm-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
}

.app-footer .subtle {
  flex: 1 1 auto;
  /* Flex items refuse to shrink below their content's width by default, which
     silently defeats text-overflow — min-width:0 is what lets this actually
     truncate instead of pushing the sign-out control onto its own line. */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-footer-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.app-footer-identity-linked {
  cursor: pointer;
}

.app-footer-name.app-footer-identity-linked {
  border-radius: 4px;
}

.app-footer-name.app-footer-identity-linked:hover {
  background: #eef1f5;
}

.app-footer-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.app-footer-name {
  font-weight: 600;
  color: var(--retr-fg, #1f2430);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-footer-email {
  font-size: 11px;
  color: #8b93a3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #596273;
  cursor: pointer;
}

.icon-button:hover:not(:disabled) {
  background: #e4e7ec;
  color: #111827;
}

.icon-button:focus-visible {
  outline: 2px solid var(--retr-purple);
  outline-offset: 1px;
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.icon-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--retr-link);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.link-button:disabled {
  color: var(--retr-muted);
  cursor: default;
  text-decoration: none;
}

.link-button-danger {
  color: var(--retr-danger);
}

.link-button-danger:hover:not(:disabled) {
  text-decoration: underline;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: retr-spin 0.6s linear infinite;
  flex: 0 0 auto;
}

@keyframes retr-spin {
  to { transform: rotate(360deg); }
}

/* Ported class-for-class from RETR.ChromeExtension/sidepanel/sidepanel.css so
   the contact-card tab list and cards look identical to the Gmail extension. */
.tab-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #d8dce4;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
}

.tab {
  width: 100%;
  margin: 0;
  border: none;
  border-top: 1px solid #e2e5ea;
  background: #f3f4f6;
  color: #4b5563;
  padding: 8px 16px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tab:first-child {
  border-top: none;
}

.tab:hover:not(.tab-active) {
  background: #eceff3;
}

.tab-active {
  border-top: 1px solid #e2e5ea;
  border-left: 3px solid #9db4ff;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  padding: 8px 16px 8px 13px;
}

.tab:first-child.tab-active {
  border-top: none;
}

.tab-overview {
  display: flex;
  align-items: center;
  padding: 0;
  color: #1f2f57;
  font-weight: 700;
}

.tab-overview.tab-active {
  padding: 0 10px 0 0;
}

.tab-overview-select {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 8px 16px;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.tab-overview.tab-active .tab-overview-select {
  padding-left: 13px;
}

/* Refresh-all-profiles icon button, ported from RETR.ChromeExtension's
   overview tab (senders.js/sidepanel.css) — spins via the existing
   @keyframes retr-spin while a refresh (manual or background rescan) is
   in flight. */
.overview-refresh-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--retr-purple);
  cursor: pointer;
}

.overview-refresh-button:hover:not(:disabled) {
  color: var(--retr-purple-hover);
}

.overview-refresh-button:focus-visible {
  outline: 2px solid var(--retr-purple);
  outline-offset: 1px;
}

.overview-refresh-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.overview-refresh-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.overview-refresh-button-loading svg {
  animation: retr-spin 0.8s linear infinite;
}

/* "Overview" title pulse + animated "Processing..." label — ported from
   RETR.ChromeExtension/sidepanel/sidepanel.css. Both are driven by
   contact-cards-view.js toggling is-processing/is-visible while any tracked
   contact is still pending. */
.tab-overview-title {
  font-size: 15px;
  font-weight: inherit;
  color: #1f2f57;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 160ms ease, opacity 160ms ease;
}

.tab-overview-title.is-processing {
  color: #1f2f57;
  animation: retr-overview-title-pulse 1.4s ease-in-out infinite, retr-overview-title-glow 2.4s ease-in-out infinite;
}

.tab-label-overview {
  justify-content: flex-start !important;
  gap: 7px;
}

.overview-processing-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transform: translateY(0);
  transition: opacity 160ms ease, max-width 180ms ease;
}

.overview-processing-label::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
}

.overview-processing-label.is-visible {
  opacity: 0.88;
  max-width: 92px;
  animation: retr-processing-label-pulse 1.35s ease-in-out infinite, retr-processing-label-float 1.9s ease-in-out infinite;
}

.overview-processing-label.is-visible::after {
  animation: retr-processing-dots 0.95s steps(4, end) infinite;
}

@keyframes retr-overview-title-pulse {
  0%,
  100% {
    opacity: 0.95;
  }
  50% {
    opacity: 0.78;
  }
}

@keyframes retr-overview-title-glow {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(99, 102, 241, 0);
  }
  50% {
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.18);
  }
}

@keyframes retr-processing-label-pulse {
  0%,
  100% {
    opacity: 0.88;
  }
  50% {
    opacity: 0.62;
  }
}

@keyframes retr-processing-label-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.8px);
  }
}

@keyframes retr-processing-dots {
  0% {
    width: 0;
  }
  25% {
    width: 0.35em;
  }
  50% {
    width: 0.7em;
  }
  75%,
  100% {
    width: 1.05em;
  }
}

.tab-label {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
}

.tab-badge {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.tab-badge-agent {
  background: rgba(8, 143, 143, 0.12);
  color: #088f8f;
  font-size: 12px;
}

.tab-badge-lo {
  background: rgba(157, 180, 255, 0.4);
  color: #395596;
}

/* Compact summary cards (agent/loan-officer overview cards) */
.summary-card-compact {
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.compact-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.compact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #088f8f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.lo-summary .compact-avatar {
  background: #5461b2;
}

.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.compact-name-section {
  flex: 1;
  min-width: 0;
}

.compact-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.compact-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--retr-fg);
}

.compact-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(8, 143, 143, 0.12);
  color: #088f8f;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  margin-left: 3px;
  flex-shrink: 0;
}

.lo-summary .compact-badge {
  background: rgba(84, 97, 178, 0.12);
  color: #5461b2;
}

.compact-company {
  font-size: 13px;
  color: var(--retr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-location {
  font-size: 12px;
  color: var(--retr-muted);
  margin-top: 2px;
}

.compact-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid #eef0f4;
  margin: 6px 0;
}

.metric-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--retr-fg);
  margin-bottom: 2px;
}

.metric-label {
  font-size: 10px;
  color: var(--retr-muted);
  line-height: 1.3;
}

.compact-divider {
  height: 1px;
  background: #eef0f4;
  margin: 6px 0;
}

.compact-view-btn {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 4px 8px 1px;
  background: transparent;
  border: none;
  color: var(--retr-purple);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  border-radius: 4px;
}

.compact-view-btn:hover {
  background: #f3f0ff;
}

/* ============================================================================
   FULL PROFILE DETAIL VIEW ("More Stats and Information")
   Ported class-for-class from RETR.ChromeExtension/sidepanel/sidepanel.css.
   ============================================================================ */

.agent-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
}

.agent-profile-header {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  align-items: flex-start;
}

.agent-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #088f8f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.lo-card .agent-avatar {
  background: #5461b2;
}

.agent-info {
  flex: 1;
  min-width: 0;
}

.agent-name-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.agent-name-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--retr-fg);
}

.agent-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(8, 143, 143, 0.12);
  color: #088f8f;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.lo-badge {
  background: rgba(84, 97, 178, 0.12);
  color: #5461b2;
}

.agent-company {
  font-size: 13px;
  color: var(--retr-fg);
  margin-bottom: 2px;
}

.agent-location {
  font-size: 13px;
  color: var(--retr-muted);
}

.agent-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid #eef0f4;
}

.agent-actions {
  display: flex;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid #eef0f4;
}

.btn-profile,
.btn-track {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.btn-profile {
  background: white;
  color: #00897b;
  border-color: #00897b;
}

.btn-profile:hover {
  background: #f0f9f8;
}

.btn-track {
  background: #00897b;
  color: white;
  border-color: #00897b;
}

.btn-track:hover {
  background: #00796b;
  border-color: #00796b;
}

.stat-group-title {
  position: relative;
  padding-left: 10px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5f6b7f;
  margin: 12px 16px 8px;
}

.stat-group-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 12px;
  border-radius: 3px;
  transform: translateY(-50%);
  background: #d2d8e6;
}

.chart-wrap {
  position: relative;
  height: 170px;
  margin: 4px 16px 12px;
  padding: 8px;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  background: var(--retr-bg);
}

.profile-section-status {
  margin: 4px 16px 12px;
  padding: 10px 0;
  border-top: 1px solid #eef0f4;
  color: var(--retr-muted);
  font-size: 12px;
}

/* Processing indicator, ported from the Gmail extension's sidepanel.css
   (.profile-section-loading .subtle::before / @keyframes retr-pulse) so a
   pulsing dot shows wherever contact/section data is still being fetched. */
.is-loading::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--retr-purple);
  vertical-align: 1px;
  animation: retr-pulse 1.2s ease-in-out infinite;
}

.is-error {
  color: #b3261e;
}

.profile-section-retry {
  margin-left: 6px;
  padding: 2px 10px;
  border: 1px solid #00897b;
  border-radius: 4px;
  background: white;
  color: #00897b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.profile-section-retry:hover {
  background: #f0f9f8;
}

.profile-section-retry:disabled {
  opacity: 0.6;
  cursor: default;
}

.lo-branch-intel-period {
  margin: 0 16px 6px;
  color: var(--retr-muted);
  font-size: 11px;
}

@keyframes retr-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

/* Buyer Side / Top Buyer Agents relationship lists */
.lo-relationships {
  padding: 12px 0;
  border-top: 1px solid #eef0f4;
}

.lo-relationships > :not(.stat-group-title) {
  margin-left: 16px;
  margin-right: 16px;
}

.lo-totals {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--retr-fg);
  margin-bottom: 8px;
}

.lo-row {
  font-size: 13px;
  color: var(--retr-fg);
  line-height: 1.6;
}

.lo-count {
  color: var(--retr-muted);
}

.lo-name {
  color: #00897b;
  font-weight: 600;
}

.lo-branch {
  color: var(--retr-muted);
}

.lo-link {
  cursor: pointer;
}

.lo-link:hover {
  text-decoration: underline;
}

.lo-show-more {
  display: block;
  margin: 14px auto 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b61ff;
  font: inherit;
  cursor: pointer;
}

.lo-show-more:hover {
  text-decoration: underline;
}

/* Loan Summary table */
.lo-summary-wrap {
  margin: 0 16px 12px;
  border: 1px solid #eef0f4;
}

.lo-summary-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 11px;
}

.lo-summary-table th,
.lo-summary-table td {
  padding: 7px 6px;
  border-bottom: 1px solid #eef0f4;
  text-align: left;
  white-space: nowrap;
}

.lo-summary-table th {
  font-size: 10px;
  color: var(--retr-muted);
  font-weight: 600;
}

.lo-summary-numeric {
  text-align: right !important;
}

.lo-summary-type {
  font-weight: 500;
}

.lo-summary-table tbody tr:last-child td {
  border-bottom: 0;
  font-weight: 600;
}

/* Mutual Connections */
.mutual-connections {
  padding: 12px 16px;
  border-top: 1px solid #eef0f4;
}

/* .stat-group-title carries its own 16px horizontal margin, which would
   otherwise stack on top of this section's own 16px padding and double-indent
   the title relative to the rows below it. */
.mutual-connections > .stat-group-title,
.recent-listings > .stat-group-title {
  margin-left: 0;
  margin-right: 0;
}

.mc-row {
  font-size: 13px;
  color: var(--retr-fg);
  line-height: 1.6;
}

.mc-count {
  color: #00897b;
  font-weight: 600;
}

.mc-label {
  color: var(--retr-fg);
}

/* Recent Listings */
.recent-listings {
  padding: 12px 16px;
  border-top: 1px solid #eef0f4;
}

.recent-listings-count {
  font-size: 13px;
  color: #7b61ff;
  font-weight: 600;
}

/* State Volumes chart */
.lo-state-volume {
  padding: 12px 0 16px;
  border-top: 1px solid #eef0f4;
}

.lo-state-chart-wrap {
  margin: 8px 16px 0;
  padding: 8px;
  border: 1px solid #eef0f4;
  border-radius: 4px;
  background: #fff;
}

/* Employment History table */
.lo-employment {
  padding: 16px 0;
  border-top: 1px solid #eef0f4;
}

.lo-employment-disclaimer {
  margin: 3px 16px 12px;
  color: var(--retr-muted);
  font-size: 9px;
  line-height: 1.4;
}

.lo-employment-table {
  width: calc(100% - 32px);
  margin: 0 16px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
}

.lo-employment-table th,
.lo-employment-table td {
  padding: 7px 8px;
  border-top: 1px solid #dfe3eb;
  text-align: left;
  vertical-align: top;
}

.lo-employment-table th {
  color: var(--retr-fg);
  font-weight: 600;
}

.lo-employer-link {
  color: #7b61ff;
  text-decoration: none;
  cursor: pointer;
}

.lo-employer-link:hover {
  text-decoration: underline;
}

/* Branch Intel table */
.lo-branch-intel {
  padding: 12px 0;
  border-top: 1px solid #eef0f4;
}

.lo-branch-intel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.lo-branch-intel-details {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 500;
  color: #2f6fed;
  text-decoration: none;
}

.lo-branch-intel-table {
  width: calc(100% - 32px);
  margin: 0 16px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
}

.lo-branch-intel-table th,
.lo-branch-intel-table td {
  padding: 7px 8px;
  border-top: 1px solid #dfe3eb;
  text-align: left;
  vertical-align: top;
}

.lo-branch-intel-table th {
  color: var(--retr-fg);
  font-weight: 600;
}

.lo-branch-intel-table th:first-child,
.lo-branch-intel-table td:first-child {
  width: 34%;
}

.bi-row-label {
  font-weight: 700;
  color: var(--retr-fg);
}

.bi-row-sub {
  font-size: 9px;
  color: #8a94a6;
}

.bi-change-up {
  color: #00897b;
  font-weight: 600;
}

.bi-change-down {
  color: #d64545;
  font-weight: 600;
}

/* Agent (non-LO) cards: tighter spacing, matches sidepanel.css's
   .agent-card:not(.lo-card) overrides. */
.agent-card:not(.lo-card) .agent-metrics {
  padding-top: 10px;
}

.agent-card:not(.lo-card) .agent-actions {
  border-top: 0;
  padding-top: 4px;
}

.agent-card:not(.lo-card) .mc-count,
.agent-card:not(.lo-card) .mc-label {
  color: var(--retr-fg);
}

/* LO cards: slightly larger type than the Chrome extension's cramped
   sidepanel width — the Outlook taskpane has more room. */
.lo-card .stat-group-title,
.lo-card .metric-label,
.lo-card .lo-summary-table,
.lo-card .lo-summary-table th,
.lo-card .lo-employment-disclaimer,
.lo-card .lo-employment-table,
.lo-card .lo-branch-intel-table,
.lo-card .lo-branch-intel-details,
.lo-card .bi-row-sub {
  font-size: 12px;
}
