.broker-directory-section,
#broker-directory-root,
.broker-directory {
  min-width: 0;
  max-width: 100%;
}

.broker-directory-section {
  overflow: hidden;
}

.broker-directory {
  color: #20252b;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 12px;
  letter-spacing: 0;
}

.broker-directory-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
  padding: 8px 0 10px;
  border-bottom: 1px solid #dce5eb;
}

.broker-filter {
  display: grid;
  min-width: 0;
  gap: 3px;
  color: #5d6972;
  font-size: 11px;
  font-weight: 700;
}

.broker-filter span,
.broker-page-size span {
  white-space: nowrap;
}

.broker-filter input,
.broker-filter select,
.broker-page-size select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 4px 7px;
  border: 1px solid #cddae3;
  border-radius: 4px;
  color: #20252b;
  background: #fff;
  font: inherit;
  letter-spacing: 0;
}

.broker-filter input:focus,
.broker-filter select:focus,
.broker-page-size select:focus,
.broker-directory button:focus-visible,
.broker-directory a:focus-visible {
  outline: 2px solid #087c78;
  outline-offset: 1px;
}

.broker-directory-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 38px;
  padding: 5px 0;
}

.broker-filter-clear,
.broker-row-action,
.broker-contact-action,
.broker-directory-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #c7d5de;
  border-radius: 4px;
  color: #075b64;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.broker-filter-clear:hover,
.broker-row-action:hover,
.broker-contact-action:hover,
.broker-directory-pagination button:hover:not(:disabled) {
  border-color: #087c78;
  background: #e8f5f4;
}

.broker-page-size {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #5d6972;
  font-weight: 700;
}

.broker-page-size select {
  width: 62px;
}

.broker-directory-summary {
  min-width: 78px;
  color: #53616b;
  text-align: right;
}

.broker-directory-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-inline: contain;
  border: 1px solid #cbd7df;
}

.broker-directory-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  color: #20252b;
  font-size: 12px;
  letter-spacing: 0;
}

.broker-directory-table th {
  height: 34px;
  padding: 0 6px;
  overflow: hidden;
  border-right: 1px solid #bcc8d0;
  border-bottom: 1px solid #aebbc4;
  color: #20252b;
  background: #d1d1d1;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broker-directory-table th button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  height: 34px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
}

.broker-directory-table td {
  height: 38px;
  padding: 5px 6px;
  overflow: hidden;
  border-right: 1px solid #dce5eb;
  border-bottom: 1px solid #dce5eb;
  line-height: 1.25;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.broker-directory-table tbody tr:nth-child(4n + 3) td {
  background: #eef2f6;
}

.broker-directory-table tbody tr.selected td {
  background: #e7f4f3;
}

.broker-directory-heading-name,
.broker-directory-cell-name { width: 8.5%; font-weight: 700; }
.broker-directory-heading-title,
.broker-directory-cell-title { width: 8.5%; }
.broker-directory-heading-country,
.broker-directory-cell-country { width: 6.5%; }
.broker-directory-heading-city,
.broker-directory-cell-city { width: 5.5%; }
.broker-directory-heading-specialty,
.broker-directory-cell-specialty { width: 14%; }
.broker-directory-heading-email,
.broker-directory-cell-email { width: 12.5%; text-align: left; }
.broker-directory-heading-phone,
.broker-directory-cell-phone { width: 8.5%; text-align: left; }
.broker-directory-heading-whatsapp,
.broker-directory-heading-wechat,
.broker-directory-heading-linkedin,
.broker-directory-cell-whatsapp,
.broker-directory-cell-wechat,
.broker-directory-cell-linkedin { width: 4%; text-align: center; }

.broker-directory-heading-whatsapp,
.broker-directory-heading-wechat,
.broker-directory-heading-linkedin { padding-inline: 3px; font-size: 10px; }

.broker-contact-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #075b64;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broker-contact-text:hover {
  color: #087c78;
  text-decoration: underline;
}
.broker-directory-heading-relationship,
.broker-directory-cell-relationship { width: 6%; }
.broker-directory-heading-employment,
.broker-directory-cell-employment { width: 6%; }
.broker-directory-heading-verified,
.broker-directory-cell-verified { width: 7%; }
.broker-directory-heading-actions,
.broker-directory-cell-actions { width: 5%; text-align: center; }

.broker-specialty-list {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.broker-specialty-chip,
.broker-specialty-more,
.broker-status {
  display: inline-block;
  padding: 2px 5px;
  border: 1px solid #bad7d4;
  border-radius: 4px;
  color: #075b64;
  background: #edf8f7;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.broker-specialty-chip {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.broker-specialty-more,
.broker-status {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broker-specialty-more {
  flex: 0 0 auto;
  color: #5c4a24;
  border-color: #e2c990;
  background: #fff7e3;
}

.broker-specialty-more-mobile {
  display: none;
}

.broker-status-inactive,
.broker-status-to_verify {
  color: #6f3a24;
  border-color: #e0c2b5;
  background: #fff2ed;
}

.broker-directory-muted {
  color: #84919a;
}

.broker-directory-secondary-row {
  display: none;
}

.broker-directory-state {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  padding: 24px;
  color: #66737c;
  border: 1px solid #dce5eb;
  text-align: center;
}

.broker-directory-state strong {
  color: #243039;
  font-size: 13px;
}

.broker-directory-state button {
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid #087c78;
  border-radius: 4px;
  color: #fff;
  background: #087c78;
  cursor: pointer;
}

.broker-directory-error {
  color: #8a3f2b;
  background: #fff7f3;
}

.broker-directory-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #c4d7d5;
  border-top-color: #087c78;
  border-radius: 50%;
  animation: broker-directory-spin .8s linear infinite;
}

.broker-directory-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 40px;
  color: #53616b;
}

.broker-directory-pagination button:disabled {
  opacity: .4;
  cursor: default;
}

.broker-drawer-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
  background: rgba(7, 31, 42, .32);
}

.broker-drawer {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  width: min(680px, 100vw);
  height: 100dvh;
  max-width: 100%;
  overflow: hidden;
  border-left: 1px solid #b9c9d3;
  color: #20252b;
  background: #fff;
  box-shadow: -12px 0 28px rgba(7, 31, 42, .2);
  font-size: 13px;
  letter-spacing: 0;
}

.broker-drawer-header,
.broker-drawer-navigation,
.broker-drawer-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
}

.broker-drawer-header {
  justify-content: space-between;
  border-bottom: 1px solid #dce5eb;
}

.broker-drawer-header p,
.broker-drawer-header h2,
.broker-drawer-section h3,
.broker-drawer-section h4 {
  margin: 0;
}

.broker-drawer-header p {
  color: #5d6972;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.broker-drawer-header h2 {
  margin-top: 3px;
  font-size: 18px;
}

.broker-drawer-close,
.broker-drawer-navigation button,
.broker-drawer-comparison-actions button,
.broker-drawer-footer button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #b9c9d3;
  border-radius: 4px;
  color: #075b64;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.broker-drawer-close {
  width: 30px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.broker-drawer-navigation {
  justify-content: space-between;
  min-height: 46px;
  padding-block: 8px;
  border-bottom: 1px solid #e4ebef;
  color: #65737d;
}

.broker-drawer-navigation button:disabled {
  opacity: .45;
  cursor: default;
}

.broker-drawer-notice {
  min-height: 0;
  margin: 0;
  padding: 0 18px;
  color: #8a3f2b;
}

.broker-drawer-notice:empty { display: none; }

.broker-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.broker-drawer-section {
  padding: 16px 18px;
  border-bottom: 1px solid #dce5eb;
}

.broker-drawer-section h3 {
  margin-bottom: 10px;
  color: #243039;
  font-size: 14px;
}

.broker-drawer-section h4 {
  margin: 12px 0 6px;
  color: #68757e;
  font-size: 11px;
  text-transform: uppercase;
}

.broker-drawer-fields,
.broker-drawer-contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.broker-drawer-fields div,
.broker-drawer-contacts div { min-width: 0; }

.broker-drawer-fields dt,
.broker-drawer-contacts dt,
.broker-drawer-comparison dt {
  color: #68757e;
  font-size: 11px;
  font-weight: 700;
}

.broker-drawer-fields dd,
.broker-drawer-contacts dd,
.broker-drawer-comparison dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.broker-drawer-contacts a { color: #075b64; }

.broker-drawer-warning {
  display: block;
  margin-top: 3px;
  color: #9a452f;
  font-size: 11px;
}

.broker-drawer-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.broker-drawer-input {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: #5d6972;
  font-size: 11px;
  font-weight: 700;
}

.broker-drawer-input input,
.broker-drawer-input select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 7px;
  border: 1px solid #c7d5de;
  border-radius: 4px;
  color: #20252b;
  background: #fff;
  font: inherit;
  letter-spacing: 0;
}

.broker-drawer-contact .broker-drawer-input { margin-top: 8px; }

.broker-drawer-specialties,
.broker-drawer-audit {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.broker-drawer-specialties li {
  padding: 7px 8px;
  border: 1px solid #bad7d4;
  border-radius: 4px;
  color: #075b64;
  background: #edf8f7;
}

.broker-drawer-comparisons { display: grid; gap: 10px; }

.broker-drawer-comparison {
  padding: 10px;
  border: 1px solid #e2c990;
  border-radius: 4px;
  background: #fffaf0;
}

.broker-drawer-comparison strong { display: block; text-transform: capitalize; }

.broker-drawer-comparison dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.broker-drawer-comparison-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.broker-drawer-audit li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f3;
  overflow-wrap: anywhere;
}

.broker-drawer-audit a { color: #075b64; }

.broker-drawer-footer {
  justify-content: space-between;
  border-top: 1px solid #dce5eb;
}

.broker-drawer-footer [type="submit"] {
  border-color: #087c78;
  color: #fff;
  background: #087c78;
}

.broker-drawer-archive {
  margin-left: auto;
  color: #8a3f2b !important;
}

.broker-drawer button:focus-visible,
.broker-drawer input:focus-visible,
.broker-drawer select:focus-visible,
.broker-drawer a:focus-visible {
  outline: 2px solid #087c78;
  outline-offset: 2px;
}

@keyframes broker-directory-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .broker-directory-filters { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 720px) {
  .broker-directory-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .broker-directory-toolbar { justify-content: flex-start; }
  .broker-directory-summary { margin-left: auto; }
  .broker-directory-table-wrap { overflow-x: hidden; }
  .broker-directory-table { min-width: 0; table-layout: fixed; }
  .broker-directory-table th,
  .broker-directory-table td { display: none; }
  .broker-directory-table th:nth-child(1),
  .broker-directory-table th:nth-child(5),
  .broker-directory-table th:nth-child(12),
  .broker-directory-table th:nth-child(14),
  .broker-directory-table td:nth-child(1),
  .broker-directory-table td:nth-child(5),
  .broker-directory-table td:nth-child(12),
  .broker-directory-table td:nth-child(14) { display: table-cell; }
  .broker-directory-heading-name,
  .broker-directory-cell-name { width: 27%; }
  .broker-directory-heading-specialty,
  .broker-directory-cell-specialty { width: 38%; }
  .broker-directory-heading-employment,
  .broker-directory-cell-employment { width: 23%; }
  .broker-directory-heading-actions,
  .broker-directory-cell-actions { width: 12%; }
  .broker-directory-table td { height: 42px; padding: 5px; }
  .broker-specialty-chip:nth-child(2) { display: none; }
  .broker-specialty-more-desktop { display: none; }
  .broker-specialty-more-mobile { display: inline-block; }
  .broker-directory-secondary-row:not([hidden]) { display: table-row; }
  .broker-directory-secondary-row td {
    display: table-cell;
    height: auto;
    padding: 10px;
    white-space: normal;
    background: #f7fafc;
  }
  .broker-directory-mobile-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin: 0;
  }
  .broker-directory-mobile-details div { min-width: 0; }
  .broker-directory-mobile-details dt { color: #68757e; font-size: 10px; font-weight: 700; }
  .broker-directory-mobile-details dd { margin: 3px 0 0; overflow-wrap: anywhere; }
  .broker-drawer { width: 100vw; height: 100dvh; border-left: 0; }
  .broker-drawer-fields,
  .broker-drawer-contacts,
  .broker-drawer-inputs,
  .broker-drawer-comparison dl { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .broker-directory-filters { grid-template-columns: 1fr; }
  .broker-directory-heading-name,
  .broker-directory-cell-name { width: 29%; }
  .broker-directory-heading-specialty,
  .broker-directory-cell-specialty { width: 35%; }
  .broker-directory-heading-employment,
  .broker-directory-cell-employment { width: 24%; }
  .broker-directory-mobile-details { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .broker-directory-spinner { animation: none; }
}
