.lead-review {
  box-sizing: border-box;
  width: min(1080px, calc(100vw - 24px));
  max-width: none;
  max-height: 88vh;
  max-height: 88dvh;
  overflow: hidden;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid #dce1e3;
  border-radius: 8px;
  background: white;
  color: #223545;
}
.lead-review[open] { display: flex; flex-direction: column; }
.lead-review [data-review-rows] { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.lead-review [data-review-status]:empty { display: none; }
.lead-review-heading, .lead-review-pages, .lead-review [data-review-status] { flex: none; }
.lead-review-heading h2 { margin: 0; font-size: clamp(18px, 2.2vw, 24px); }
.lead-review .lead-review-search {
  display: flex;
  flex: none;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 10px 0 2px;
  border: 0;
}
.lead-review .lead-review-search[hidden] { display: none; }
.lead-review-search input {
  width: min(460px, 100%);
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #bdc9cf;
  border-radius: 4px;
  font: inherit;
}
.lead-review-search button { flex: none; }
.lead-review .lead-review-actions { display: flex; align-items: center; gap: 8px; }
.lead-review [data-review-export] {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 5px 12px;
  border: 1px solid #b51f36;
  border-radius: 4px;
  background: #b51f36;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.lead-review [data-review-rows] .lead-review-table {
  margin: 0;
  min-width: 0;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.lead-review-table th, .lead-review-table td {
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid #e1e7ea;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
  white-space: normal;
  background: #fff;
  line-height: 1.35;
}
.lead-review-table thead th { position: sticky; top: 0; z-index: 1; background: #f0f4f5; color: #374c59; }
.lead-review-table th:nth-child(1) { width: 17%; }
.lead-review-table th:nth-child(2) { width: 17%; }
.lead-review-table th:nth-child(3) { width: 13%; }
.lead-review-table th:nth-child(4) { width: 21%; }
.lead-review-table th:last-child { width: 68px; }
.lead-review-table small { display: block; color: #526574; font-size: 12px; }
.lead-review-table .lead-review-mobile-tags { display: none; }
.lead-review-table tbody tr { cursor: pointer; }
.lead-review-table tbody tr:is(:hover, :focus-within) td { background: #faf5f6; }
.lead-review .lead-review-table button {
  min-height: 32px;
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: #a31d32;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.lead-review::backdrop { background: #1d283b66; }
.lead-review-heading, .lead-review-controls, .lead-review-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lead-review-heading { justify-content: space-between; }
.lead-review article {
  padding: 12px 0;
  border-top: 1px solid #dce1e3;
}
.lead-review article p, .lead-review [data-review-status] {
  margin: 5px 0;
  overflow-wrap: anywhere;
  color: #526574;
}
.lead-review article strong { overflow-wrap: anywhere; }
.lead-review-fields, .lead-review-form-fields {
  display: grid;
  gap: 8px 16px;
  margin: 10px 0;
}
.lead-review-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lead-review-fields > div, .lead-review-form-fields > div { min-width: 0; }
.lead-review dt { color: #526574; font-size: .86em; }
.lead-review dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.lead-review-form-details {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #e4e9eb;
  border-radius: 5px;
  background: #f8fafb;
}
.lead-review-form-details h3 { margin: 0; font-size: 1em; }
.lead-review-form-details p { white-space: pre-wrap; }
.lead-review-form-fields { margin-bottom: 0; }
.lead-review-timestamps { padding-top: 8px; border-top: 1px solid #e4e9eb; }
@media (max-width: 650px) {
  .lead-review-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; }
}
.lead-review .lead-review-controls { margin: 10px 0 0; padding: 0; border: 0; }
.lead-review button, .lead-review select {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #bdc9cf;
  border-radius: 4px;
  background: #fff;
  color: #223545;
  font: inherit;
}
.lead-review button[type="submit"] {
  border-color: #ae1d34;
  background: #ae1d34;
  color: white;
}
.lead-review button:disabled { opacity: .55; }
.lead-review [hidden] { display: none; }
.lead-review-pages { justify-content: flex-end; padding-top: 10px; }
.lead-review-pages span { margin-right: auto; color: #526574; }
@media (max-width: 650px) {
  .lead-review { padding: 12px; }
  .lead-review-heading { gap: 6px; }
  .lead-review .lead-review-actions { gap: 4px; }
  .lead-review .lead-review-table { font-size: 13px; }
  .lead-review-table th, .lead-review-table td { padding: 5px 3px; }
  .lead-review-table :is(th, td):nth-child(3), .lead-review-table :is(th, td):nth-child(5) { display: none; }
  .lead-review-table .lead-review-mobile-tags { display: block; margin-top: 3px; }
  .lead-review-table th:nth-child(1) { width: 24%; }
  .lead-review-table th:nth-child(2) { width: auto; }
  .lead-review-table th:nth-child(4) { width: 30%; }
  .lead-review-table th:last-child { width: 42px; }
}
button.lead-review-link {
  border: 0;
  padding: 2px 3px;
  background: none;
  color: #9f1930;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.lead-review-link:focus-visible { outline: 2px solid #9f1930; }
